@volcengine/veplayer 2.7.1-rc.1 → 2.8.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).VePlayer={})}(this,(function(e){"use strict";var t=function(e){return e.H265="h265",e.H264="h264",e}(t||{}),n=function(e){return e.SoftFirst="soft-first",e.H264First="h264-first",e}(n||{}),r=function(e){return e.Software="software",e.Hardware="hardware",e}(r||{}),i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var a=function(e){return e&&e.Math==Math&&e},s=a("object"==typeof globalThis&&globalThis)||a("object"==typeof window&&window)||a("object"==typeof self&&self)||a("object"==typeof i&&i)||function(){return this}()||i||Function("return this")(),l=function(e){try{return!!e()}catch(t){return!0}},u=!l((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),c=u,h=Function.prototype,f=h.apply,d=h.call,p="object"==typeof Reflect&&Reflect.apply||(c?d.bind(f):function(){return d.apply(f,arguments)}),v=u,g=Function.prototype,y=g.call,m=v&&g.bind.bind(y,y),_=v?m:function(e){return function(){return y.apply(e,arguments)}},b=_,w=b({}.toString),k=b("".slice),E=function(e){return k(w(e),8,-1)},S=E,T=_,C=function(e){if("Function"===S(e))return T(e)},x="object"==typeof document&&document.all,P={all:x,IS_HTMLDDA:void 0===x&&void 0!==x},A=P.all,I=P.IS_HTMLDDA?function(e){return"function"==typeof e||e===A}:function(e){return"function"==typeof e},R={},O=!l((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),M=u,D=Function.prototype.call,L=M?D.bind(D):function(){return D.apply(D,arguments)},F={},N={}.propertyIsEnumerable,U=Object.getOwnPropertyDescriptor,B=U&&!N.call({1:2},1);F.f=B?function(e){var t=U(this,e);return!!t&&t.enumerable}:N;var V,H,j=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},z=l,W=E,K=Object,G=_("".split),q=z((function(){return!K("z").propertyIsEnumerable(0)}))?function(e){return"String"==W(e)?G(e,""):K(e)}:K,Y=function(e){return null==e},X=Y,$=TypeError,J=function(e){if(X(e))throw $("Can't call method on "+e);return e},Q=q,Z=J,ee=function(e){return Q(Z(e))},te=I,ne=P.all,re=P.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:te(e)||e===ne}:function(e){return"object"==typeof e?null!==e:te(e)},ie={},oe=ie,ae=s,se=I,le=function(e){return se(e)?e:void 0},ue=function(e,t){return arguments.length<2?le(oe[e])||le(ae[e]):oe[e]&&oe[e][t]||ae[e]&&ae[e][t]},ce=_({}.isPrototypeOf),he="undefined"!=typeof navigator&&String(navigator.userAgent)||"",fe=s,de=he,pe=fe.process,ve=fe.Deno,ge=pe&&pe.versions||ve&&ve.version,ye=ge&&ge.v8;ye&&(H=(V=ye.split("."))[0]>0&&V[0]<4?1:+(V[0]+V[1])),!H&&de&&(!(V=de.match(/Edge\/(\d+)/))||V[1]>=74)&&(V=de.match(/Chrome\/(\d+)/))&&(H=+V[1]);var me=H,_e=me,be=l,we=s.String,ke=!!Object.getOwnPropertySymbols&&!be((function(){var e=Symbol();return!we(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&_e&&_e<41})),Ee=ke&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Se=ue,Te=I,Ce=ce,xe=Object,Pe=Ee?function(e){return"symbol"==typeof e}:function(e){var t=Se("Symbol");return Te(t)&&Ce(t.prototype,xe(e))},Ae=String,Ie=function(e){try{return Ae(e)}catch(t){return"Object"}},Re=I,Oe=Ie,Me=TypeError,De=function(e){if(Re(e))return e;throw Me(Oe(e)+" is not a function")},Le=De,Fe=Y,Ne=function(e,t){var n=e[t];return Fe(n)?void 0:Le(n)},Ue=L,Be=I,Ve=re,He=TypeError,je={exports:{}},ze=s,We=Object.defineProperty,Ke=function(e,t){try{We(ze,e,{value:t,configurable:!0,writable:!0})}catch(n){ze[e]=t}return t},Ge="__core-js_shared__",qe=s[Ge]||Ke(Ge,{}),Ye=qe;(je.exports=function(e,t){return Ye[e]||(Ye[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 Xe=je.exports,$e=J,Je=Object,Qe=function(e){return Je($e(e))},Ze=Qe,et=_({}.hasOwnProperty),tt=Object.hasOwn||function(e,t){return et(Ze(e),t)},nt=_,rt=0,it=Math.random(),ot=nt(1..toString),at=function(e){return"Symbol("+(void 0===e?"":e)+")_"+ot(++rt+it,36)},st=Xe,lt=tt,ut=at,ct=ke,ht=Ee,ft=s.Symbol,dt=st("wks"),pt=ht?ft.for||ft:ft&&ft.withoutSetter||ut,vt=function(e){return lt(dt,e)||(dt[e]=ct&&lt(ft,e)?ft[e]:pt("Symbol."+e)),dt[e]},gt=L,yt=re,mt=Pe,_t=Ne,bt=function(e,t){var n,r;if("string"===t&&Be(n=e.toString)&&!Ve(r=Ue(n,e)))return r;if(Be(n=e.valueOf)&&!Ve(r=Ue(n,e)))return r;if("string"!==t&&Be(n=e.toString)&&!Ve(r=Ue(n,e)))return r;throw He("Can't convert object to primitive value")},wt=TypeError,kt=vt("toPrimitive"),Et=function(e,t){if(!yt(e)||mt(e))return e;var n,r=_t(e,kt);if(r){if(void 0===t&&(t="default"),n=gt(r,e,t),!yt(n)||mt(n))return n;throw wt("Can't convert object to primitive value")}return void 0===t&&(t="number"),bt(e,t)},St=Pe,Tt=function(e){var t=Et(e,"string");return St(t)?t:t+""},Ct=re,xt=s.document,Pt=Ct(xt)&&Ct(xt.createElement),At=function(e){return Pt?xt.createElement(e):{}},It=At,Rt=!O&&!l((function(){return 7!=Object.defineProperty(It("div"),"a",{get:function(){return 7}}).a})),Ot=O,Mt=L,Dt=F,Lt=j,Ft=ee,Nt=Tt,Ut=tt,Bt=Rt,Vt=Object.getOwnPropertyDescriptor;R.f=Ot?Vt:function(e,t){if(e=Ft(e),t=Nt(t),Bt)try{return Vt(e,t)}catch(n){}if(Ut(e,t))return Lt(!Mt(Dt.f,e,t),e[t])};var Ht=l,jt=I,zt=/#|\.prototype\./,Wt=function(e,t){var n=Gt[Kt(e)];return n==Yt||n!=qt&&(jt(t)?Ht(t):!!t)},Kt=Wt.normalize=function(e){return String(e).replace(zt,".").toLowerCase()},Gt=Wt.data={},qt=Wt.NATIVE="N",Yt=Wt.POLYFILL="P",Xt=Wt,$t=De,Jt=u,Qt=C(C.bind),Zt=function(e,t){return $t(e),void 0===t?e:Jt?Qt(e,t):function(){return e.apply(t,arguments)}},en={},tn=O&&l((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),nn=re,rn=String,on=TypeError,an=function(e){if(nn(e))return e;throw on(rn(e)+" is not an object")},sn=O,ln=Rt,un=tn,cn=an,hn=Tt,fn=TypeError,dn=Object.defineProperty,pn=Object.getOwnPropertyDescriptor,vn="enumerable",gn="configurable",yn="writable";en.f=sn?un?function(e,t,n){if(cn(e),t=hn(t),cn(n),"function"==typeof e&&"prototype"===t&&"value"in n&&yn in n&&!n[yn]){var r=pn(e,t);r&&r[yn]&&(e[t]=n.value,n={configurable:gn in n?n[gn]:r[gn],enumerable:vn in n?n[vn]:r[vn],writable:!1})}return dn(e,t,n)}:dn:function(e,t,n){if(cn(e),t=hn(t),cn(n),ln)try{return dn(e,t,n)}catch(r){}if("get"in n||"set"in n)throw fn("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var mn=en,_n=j,bn=O?function(e,t,n){return mn.f(e,t,_n(1,n))}:function(e,t,n){return e[t]=n,e},wn=s,kn=p,En=C,Sn=I,Tn=R.f,Cn=Xt,xn=ie,Pn=Zt,An=bn,In=tt,Rn=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return kn(e,this,arguments)};return t.prototype=e.prototype,t},On=function(e,t){var n,r,i,o,a,s,l,u,c,h=e.target,f=e.global,d=e.stat,p=e.proto,v=f?wn:d?wn[h]:(wn[h]||{}).prototype,g=f?xn:xn[h]||An(xn,h,{})[h],y=g.prototype;for(o in t)r=!(n=Cn(f?o:h+(d?".":"#")+o,e.forced))&&v&&In(v,o),s=g[o],r&&(l=e.dontCallGetSet?(c=Tn(v,o))&&c.value:v[o]),a=r&&l?l:t[o],r&&typeof s==typeof a||(u=e.bind&&r?Pn(a,wn):e.wrap&&r?Rn(a):p&&Sn(a)?En(a):a,(e.sham||a&&a.sham||s&&s.sham)&&An(u,"sham",!0),An(g,o,u),p&&(In(xn,i=h+"Prototype")||An(xn,i,{}),An(xn[i],o,a),e.real&&y&&(n||!y[o])&&An(y,o,a)))},Mn=E,Dn=Array.isArray||function(e){return"Array"==Mn(e)},Ln=Math.ceil,Fn=Math.floor,Nn=Math.trunc||function(e){var t=+e;return(t>0?Fn:Ln)(t)},Un=function(e){var t=+e;return t!=t||0===t?0:Nn(t)},Bn=Un,Vn=Math.min,Hn=function(e){return e>0?Vn(Bn(e),9007199254740991):0},jn=Hn,zn=function(e){return jn(e.length)},Wn=TypeError,Kn=function(e){if(e>9007199254740991)throw Wn("Maximum allowed index exceeded");return e},Gn=Tt,qn=en,Yn=j,Xn=function(e,t,n){var r=Gn(t);r in e?qn.f(e,r,Yn(0,n)):e[r]=n},$n={};$n[vt("toStringTag")]="z";var Jn="[object z]"===String($n),Qn=Jn,Zn=I,er=E,tr=vt("toStringTag"),nr=Object,rr="Arguments"==er(function(){return arguments}()),ir=Qn?er:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=nr(e),tr))?n:rr?er(t):"Object"==(r=er(t))&&Zn(t.callee)?"Arguments":r},or=I,ar=qe,sr=_(Function.toString);or(ar.inspectSource)||(ar.inspectSource=function(e){return sr(e)});var lr=ar.inspectSource,ur=_,cr=l,hr=I,fr=ir,dr=lr,pr=function(){},vr=[],gr=ue("Reflect","construct"),yr=/^\s*(?:class|function)\b/,mr=ur(yr.exec),_r=!yr.exec(pr),br=function(e){if(!hr(e))return!1;try{return gr(pr,vr,e),!0}catch(t){return!1}},wr=function(e){if(!hr(e))return!1;switch(fr(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return _r||!!mr(yr,dr(e))}catch(t){return!0}};wr.sham=!0;var kr=!gr||cr((function(){var e;return br(br.call)||!br(Object)||!br((function(){e=!0}))||e}))?wr:br,Er=Dn,Sr=kr,Tr=re,Cr=vt("species"),xr=Array,Pr=function(e){var t;return Er(e)&&(t=e.constructor,(Sr(t)&&(t===xr||Er(t.prototype))||Tr(t)&&null===(t=t[Cr]))&&(t=void 0)),void 0===t?xr:t},Ar=function(e,t){return new(Pr(e))(0===t?0:t)},Ir=l,Rr=me,Or=vt("species"),Mr=function(e){return Rr>=51||!Ir((function(){var t=[];return(t.constructor={})[Or]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Dr=On,Lr=l,Fr=Dn,Nr=re,Ur=Qe,Br=zn,Vr=Kn,Hr=Xn,jr=Ar,zr=Mr,Wr=me,Kr=vt("isConcatSpreadable"),Gr=Wr>=51||!Lr((function(){var e=[];return e[Kr]=!1,e.concat()[0]!==e})),qr=function(e){if(!Nr(e))return!1;var t=e[Kr];return void 0!==t?!!t:Fr(e)};Dr({target:"Array",proto:!0,arity:1,forced:!Gr||!zr("concat")},{concat:function(e){var t,n,r,i,o,a=Ur(this),s=jr(a,0),l=0;for(t=-1,r=arguments.length;t<r;t++)if(qr(o=-1===t?a:arguments[t]))for(i=Br(o),Vr(l+i),n=0;n<i;n++,l++)n in o&&Hr(s,l,o[n]);else Vr(l+1),Hr(s,l++,o);return s.length=l,s}});var Yr=ir,Xr=String,$r=function(e){if("Symbol"===Yr(e))throw TypeError("Cannot convert a Symbol value to a string");return Xr(e)},Jr={},Qr=Un,Zr=Math.max,ei=Math.min,ti=function(e,t){var n=Qr(e);return n<0?Zr(n+t,0):ei(n,t)},ni=ee,ri=ti,ii=zn,oi=function(e){return function(t,n,r){var i,o=ni(t),a=ii(o),s=ri(r,a);if(e&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}},ai={includes:oi(!0),indexOf:oi(!1)},si={},li=tt,ui=ee,ci=ai.indexOf,hi=si,fi=_([].push),di=function(e,t){var n,r=ui(e),i=0,o=[];for(n in r)!li(hi,n)&&li(r,n)&&fi(o,n);for(;t.length>i;)li(r,n=t[i++])&&(~ci(o,n)||fi(o,n));return o},pi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],vi=di,gi=pi,yi=Object.keys||function(e){return vi(e,gi)},mi=O,_i=tn,bi=en,wi=an,ki=ee,Ei=yi;Jr.f=mi&&!_i?Object.defineProperties:function(e,t){wi(e);for(var n,r=ki(t),i=Ei(t),o=i.length,a=0;o>a;)bi.f(e,n=i[a++],r[n]);return e};var Si,Ti=ue("document","documentElement"),Ci=at,xi=Xe("keys"),Pi=function(e){return xi[e]||(xi[e]=Ci(e))},Ai=an,Ii=Jr,Ri=pi,Oi=si,Mi=Ti,Di=At,Li="prototype",Fi="script",Ni=Pi("IE_PROTO"),Ui=function(){},Bi=function(e){return"<"+Fi+">"+e+"</"+Fi+">"},Vi=function(e){e.write(Bi("")),e.close();var t=e.parentWindow.Object;return e=null,t},Hi=function(){try{Si=new ActiveXObject("htmlfile")}catch(i){}var e,t,n;Hi="undefined"!=typeof document?document.domain&&Si?Vi(Si):(t=Di("iframe"),n="java"+Fi+":",t.style.display="none",Mi.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Bi("document.F=Object")),e.close(),e.F):Vi(Si);for(var r=Ri.length;r--;)delete Hi[Li][Ri[r]];return Hi()};Oi[Ni]=!0;var ji=Object.create||function(e,t){var n;return null!==e?(Ui[Li]=Ai(e),n=new Ui,Ui[Li]=null,n[Ni]=e):n=Hi(),void 0===t?n:Ii.f(n,t)},zi={},Wi=di,Ki=pi.concat("length","prototype");zi.f=Object.getOwnPropertyNames||function(e){return Wi(e,Ki)};var Gi={},qi=ti,Yi=zn,Xi=Xn,$i=Array,Ji=Math.max,Qi=function(e,t,n){for(var r=Yi(e),i=qi(t,r),o=qi(void 0===n?r:n,r),a=$i(Ji(o-i,0)),s=0;i<o;i++,s++)Xi(a,s,e[i]);return a.length=s,a},Zi=E,eo=ee,to=zi.f,no=Qi,ro="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Gi.f=function(e){return ro&&"Window"==Zi(e)?function(e){try{return to(e)}catch(t){return no(ro)}}(e):to(eo(e))};var io={};io.f=Object.getOwnPropertySymbols;var oo=bn,ao=function(e,t,n,r){return r&&r.enumerable?e[t]=n:oo(e,t,n),e},so=en,lo=function(e,t,n){return so.f(e,t,n)},uo={},co=vt;uo.f=co;var ho,fo,po,vo=ie,go=tt,yo=uo,mo=en.f,_o=function(e){var t=vo.Symbol||(vo.Symbol={});go(t,e)||mo(t,e,{value:yo.f(e)})},bo=L,wo=ue,ko=vt,Eo=ao,So=function(){var e=wo("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=ko("toPrimitive");t&&!t[r]&&Eo(t,r,(function(e){return bo(n,this)}),{arity:1})},To=ir,Co=Jn?{}.toString:function(){return"[object "+To(this)+"]"},xo=Jn,Po=en.f,Ao=bn,Io=tt,Ro=Co,Oo=vt("toStringTag"),Mo=function(e,t,n,r){if(e){var i=n?e:e.prototype;Io(i,Oo)||Po(i,Oo,{configurable:!0,value:t}),r&&!xo&&Ao(i,"toString",Ro)}},Do=I,Lo=s.WeakMap,Fo=Do(Lo)&&/native code/.test(String(Lo)),No=s,Uo=re,Bo=bn,Vo=tt,Ho=qe,jo=Pi,zo=si,Wo="Object already initialized",Ko=No.TypeError,Go=No.WeakMap;if(Fo||Ho.state){var qo=Ho.state||(Ho.state=new Go);qo.get=qo.get,qo.has=qo.has,qo.set=qo.set,ho=function(e,t){if(qo.has(e))throw Ko(Wo);return t.facade=e,qo.set(e,t),t},fo=function(e){return qo.get(e)||{}},po=function(e){return qo.has(e)}}else{var Yo=jo("state");zo[Yo]=!0,ho=function(e,t){if(Vo(e,Yo))throw Ko(Wo);return t.facade=e,Bo(e,Yo,t),t},fo=function(e){return Vo(e,Yo)?e[Yo]:{}},po=function(e){return Vo(e,Yo)}}var Xo={set:ho,get:fo,has:po,enforce:function(e){return po(e)?fo(e):ho(e,{})},getterFor:function(e){return function(t){var n;if(!Uo(t)||(n=fo(t)).type!==e)throw Ko("Incompatible receiver, "+e+" required");return n}}},$o=Zt,Jo=q,Qo=Qe,Zo=zn,ea=Ar,ta=_([].push),na=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(l,u,c,h){for(var f,d,p=Qo(l),v=Jo(p),g=$o(u,c),y=Zo(v),m=0,_=h||ea,b=t?_(l,y):n||a?_(l,0):void 0;y>m;m++)if((s||m in v)&&(d=g(f=v[m],m,p),e))if(t)b[m]=d;else if(d)switch(e){case 3:return!0;case 5:return f;case 6:return m;case 2:ta(b,f)}else switch(e){case 4:return!1;case 7:ta(b,f)}return o?-1:r||i?i:b}},ra={forEach:na(0),map:na(1),filter:na(2),some:na(3),every:na(4),find:na(5),findIndex:na(6),filterReject:na(7)},ia=On,oa=s,aa=L,sa=_,la=O,ua=ke,ca=l,ha=tt,fa=ce,da=an,pa=ee,va=Tt,ga=$r,ya=j,ma=ji,_a=yi,ba=zi,wa=Gi,ka=io,Ea=R,Sa=en,Ta=Jr,Ca=F,xa=ao,Pa=lo,Aa=Xe,Ia=si,Ra=at,Oa=vt,Ma=uo,Da=_o,La=So,Fa=Mo,Na=Xo,Ua=ra.forEach,Ba=Pi("hidden"),Va="Symbol",Ha="prototype",ja=Na.set,za=Na.getterFor(Va),Wa=Object[Ha],Ka=oa.Symbol,Ga=Ka&&Ka[Ha],qa=oa.TypeError,Ya=oa.QObject,Xa=Ea.f,$a=Sa.f,Ja=wa.f,Qa=Ca.f,Za=sa([].push),es=Aa("symbols"),ts=Aa("op-symbols"),ns=Aa("wks"),rs=!Ya||!Ya[Ha]||!Ya[Ha].findChild,is=la&&ca((function(){return 7!=ma($a({},"a",{get:function(){return $a(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=Xa(Wa,t);r&&delete Wa[t],$a(e,t,n),r&&e!==Wa&&$a(Wa,t,r)}:$a,os=function(e,t){var n=es[e]=ma(Ga);return ja(n,{type:Va,tag:e,description:t}),la||(n.description=t),n},as=function(e,t,n){e===Wa&&as(ts,t,n),da(e);var r=va(t);return da(n),ha(es,r)?(n.enumerable?(ha(e,Ba)&&e[Ba][r]&&(e[Ba][r]=!1),n=ma(n,{enumerable:ya(0,!1)})):(ha(e,Ba)||$a(e,Ba,ya(1,{})),e[Ba][r]=!0),is(e,r,n)):$a(e,r,n)},ss=function(e,t){da(e);var n=pa(t),r=_a(n).concat(hs(n));return Ua(r,(function(t){la&&!aa(ls,n,t)||as(e,t,n[t])})),e},ls=function(e){var t=va(e),n=aa(Qa,this,t);return!(this===Wa&&ha(es,t)&&!ha(ts,t))&&(!(n||!ha(this,t)||!ha(es,t)||ha(this,Ba)&&this[Ba][t])||n)},us=function(e,t){var n=pa(e),r=va(t);if(n!==Wa||!ha(es,r)||ha(ts,r)){var i=Xa(n,r);return!i||!ha(es,r)||ha(n,Ba)&&n[Ba][r]||(i.enumerable=!0),i}},cs=function(e){var t=Ja(pa(e)),n=[];return Ua(t,(function(e){ha(es,e)||ha(Ia,e)||Za(n,e)})),n},hs=function(e){var t=e===Wa,n=Ja(t?ts:pa(e)),r=[];return Ua(n,(function(e){!ha(es,e)||t&&!ha(Wa,e)||Za(r,es[e])})),r};ua||(Ka=function(){if(fa(Ga,this))throw qa("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?ga(arguments[0]):void 0,t=Ra(e),n=function(e){this===Wa&&aa(n,ts,e),ha(this,Ba)&&ha(this[Ba],t)&&(this[Ba][t]=!1),is(this,t,ya(1,e))};return la&&rs&&is(Wa,t,{configurable:!0,set:n}),os(t,e)},xa(Ga=Ka[Ha],"toString",(function(){return za(this).tag})),xa(Ka,"withoutSetter",(function(e){return os(Ra(e),e)})),Ca.f=ls,Sa.f=as,Ta.f=ss,Ea.f=us,ba.f=wa.f=cs,ka.f=hs,Ma.f=function(e){return os(Oa(e),e)},la&&Pa(Ga,"description",{configurable:!0,get:function(){return za(this).description}})),ia({global:!0,constructor:!0,wrap:!0,forced:!ua,sham:!ua},{Symbol:Ka}),Ua(_a(ns),(function(e){Da(e)})),ia({target:Va,stat:!0,forced:!ua},{useSetter:function(){rs=!0},useSimple:function(){rs=!1}}),ia({target:"Object",stat:!0,forced:!ua,sham:!la},{create:function(e,t){return void 0===t?ma(e):ss(ma(e),t)},defineProperty:as,defineProperties:ss,getOwnPropertyDescriptor:us}),ia({target:"Object",stat:!0,forced:!ua},{getOwnPropertyNames:cs}),La(),Fa(Ka,Va),Ia[Ba]=!0;var fs=ke&&!!Symbol.for&&!!Symbol.keyFor,ds=On,ps=ue,vs=tt,gs=$r,ys=Xe,ms=fs,_s=ys("string-to-symbol-registry"),bs=ys("symbol-to-string-registry");ds({target:"Symbol",stat:!0,forced:!ms},{for:function(e){var t=gs(e);if(vs(_s,t))return _s[t];var n=ps("Symbol")(t);return _s[t]=n,bs[n]=t,n}});var ws=On,ks=tt,Es=Pe,Ss=Ie,Ts=fs,Cs=Xe("symbol-to-string-registry");ws({target:"Symbol",stat:!0,forced:!Ts},{keyFor:function(e){if(!Es(e))throw TypeError(Ss(e)+" is not a symbol");if(ks(Cs,e))return Cs[e]}});var xs=_([].slice),Ps=Dn,As=I,Is=E,Rs=$r,Os=_([].push),Ms=On,Ds=ue,Ls=p,Fs=L,Ns=_,Us=l,Bs=I,Vs=Pe,Hs=xs,js=function(e){if(As(e))return e;if(Ps(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];"string"==typeof i?Os(n,i):"number"!=typeof i&&"Number"!=Is(i)&&"String"!=Is(i)||Os(n,Rs(i))}var o=n.length,a=!0;return function(e,t){if(a)return a=!1,t;if(Ps(this))return t;for(var r=0;r<o;r++)if(n[r]===e)return t}}},zs=ke,Ws=String,Ks=Ds("JSON","stringify"),Gs=Ns(/./.exec),qs=Ns("".charAt),Ys=Ns("".charCodeAt),Xs=Ns("".replace),$s=Ns(1..toString),Js=/[\uD800-\uDFFF]/g,Qs=/^[\uD800-\uDBFF]$/,Zs=/^[\uDC00-\uDFFF]$/,el=!zs||Us((function(){var e=Ds("Symbol")();return"[null]"!=Ks([e])||"{}"!=Ks({a:e})||"{}"!=Ks(Object(e))})),tl=Us((function(){return'"\\udf06\\ud834"'!==Ks("\udf06\ud834")||'"\\udead"'!==Ks("\udead")})),nl=function(e,t){var n=Hs(arguments),r=js(t);if(Bs(r)||void 0!==e&&!Vs(e))return n[1]=function(e,t){if(Bs(r)&&(t=Fs(r,this,Ws(e),t)),!Vs(t))return t},Ls(Ks,null,n)},rl=function(e,t,n){var r=qs(n,t-1),i=qs(n,t+1);return Gs(Qs,e)&&!Gs(Zs,i)||Gs(Zs,e)&&!Gs(Qs,r)?"\\u"+$s(Ys(e,0),16):e};Ks&&Ms({target:"JSON",stat:!0,arity:3,forced:el||tl},{stringify:function(e,t,n){var r=Hs(arguments),i=Ls(el?nl:Ks,null,r);return tl&&"string"==typeof i?Xs(i,Js,rl):i}});var il=io,ol=Qe;On({target:"Object",stat:!0,forced:!ke||l((function(){il.f(1)}))},{getOwnPropertySymbols:function(e){var t=il.f;return t?t(ol(e)):[]}}),_o("asyncIterator"),_o("hasInstance"),_o("isConcatSpreadable"),_o("iterator"),_o("match"),_o("matchAll"),_o("replace"),_o("search"),_o("species"),_o("split");var al=So;_o("toPrimitive"),al();var sl=ue,ll=Mo;_o("toStringTag"),ll(sl("Symbol"),"Symbol"),_o("unscopables"),Mo(s.JSON,"JSON",!0);var ul,cl,hl,fl=ie.Symbol,dl={},pl=O,vl=tt,gl=Function.prototype,yl=pl&&Object.getOwnPropertyDescriptor,ml=vl(gl,"name"),_l={EXISTS:ml,PROPER:ml&&"something"===function(){}.name,CONFIGURABLE:ml&&(!pl||pl&&yl(gl,"name").configurable)},bl=!l((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),wl=tt,kl=I,El=Qe,Sl=bl,Tl=Pi("IE_PROTO"),Cl=Object,xl=Cl.prototype,Pl=Sl?Cl.getPrototypeOf:function(e){var t=El(e);if(wl(t,Tl))return t[Tl];var n=t.constructor;return kl(n)&&t instanceof n?n.prototype:t instanceof Cl?xl:null},Al=l,Il=I,Rl=re,Ol=ji,Ml=Pl,Dl=ao,Ll=vt("iterator"),Fl=!1;[].keys&&("next"in(hl=[].keys())?(cl=Ml(Ml(hl)))!==Object.prototype&&(ul=cl):Fl=!0);var Nl=!Rl(ul)||Al((function(){var e={};return ul[Ll].call(e)!==e}));Il((ul=Nl?{}:Ol(ul))[Ll])||Dl(ul,Ll,(function(){return this}));var Ul={IteratorPrototype:ul,BUGGY_SAFARI_ITERATORS:Fl},Bl=Ul.IteratorPrototype,Vl=ji,Hl=j,jl=Mo,zl=dl,Wl=function(){return this},Kl=function(e,t,n,r){var i=t+" Iterator";return e.prototype=Vl(Bl,{next:Hl(+!r,n)}),jl(e,i,!1,!0),zl[i]=Wl,e},Gl=_,ql=De,Yl=I,Xl=String,$l=TypeError,Jl=function(e,t,n){try{return Gl(ql(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(r){}},Ql=an,Zl=function(e){if("object"==typeof e||Yl(e))return e;throw $l("Can't set "+Xl(e)+" as a prototype")},eu=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Jl(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(r){}return function(n,r){return Ql(n),Zl(r),t?e(n,r):n.__proto__=r,n}}():void 0),tu=On,nu=L,ru=_l,iu=Kl,ou=Pl,au=Mo,su=ao,lu=dl,uu=Ul,cu=ru.PROPER,hu=uu.BUGGY_SAFARI_ITERATORS,fu=vt("iterator"),du="keys",pu="values",vu="entries",gu=function(){return this},yu=function(e,t,n,r,i,o,a){iu(n,t,r);var s,l,u,c=function(e){if(e===i&&v)return v;if(!hu&&e in d)return d[e];switch(e){case du:case pu:case vu:return function(){return new n(this,e)}}return function(){return new n(this)}},h=t+" Iterator",f=!1,d=e.prototype,p=d[fu]||d["@@iterator"]||i&&d[i],v=!hu&&p||c(i),g="Array"==t&&d.entries||p;if(g&&(s=ou(g.call(new e)))!==Object.prototype&&s.next&&(au(s,h,!0,!0),lu[h]=gu),cu&&i==pu&&p&&p.name!==pu&&(f=!0,v=function(){return nu(p,this)}),i)if(l={values:c(pu),keys:o?v:c(du),entries:c(vu)},a)for(u in l)(hu||f||!(u in d))&&su(d,u,l[u]);else tu({target:t,proto:!0,forced:hu||f},l);return a&&d[fu]!==v&&su(d,fu,v,{name:i}),lu[t]=v,l},mu=function(e,t){return{value:e,done:t}},_u=ee,bu=dl,wu=Xo;en.f;var ku=yu,Eu=mu,Su="Array Iterator",Tu=wu.set,Cu=wu.getterFor(Su);ku(Array,"Array",(function(e,t){Tu(this,{type:Su,target:_u(e),index:0,kind:t})}),(function(){var e=Cu(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,Eu(void 0,!0)):Eu("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),bu.Arguments=bu.Array;var xu={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},Pu=s,Au=ir,Iu=bn,Ru=dl,Ou=vt("toStringTag");for(var Mu in xu){var Du=Pu[Mu],Lu=Du&&Du.prototype;Lu&&Au(Lu)!==Ou&&Iu(Lu,Ou,Mu),Ru[Mu]=Ru.Array}var Fu=fl;_o("dispose");var Nu=Fu;_o("asyncDispose");var Uu=On,Bu=_,Vu=ue("Symbol"),Hu=Vu.keyFor,ju=Bu(Vu.prototype.valueOf);Uu({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==Hu(ju(e))}catch(t){return!1}}});for(var zu=On,Wu=Xe,Ku=ue,Gu=_,qu=Pe,Yu=vt,Xu=Ku("Symbol"),$u=Xu.isWellKnown,Ju=Ku("Object","getOwnPropertyNames"),Qu=Gu(Xu.prototype.valueOf),Zu=Wu("wks"),ec=0,tc=Ju(Xu),nc=tc.length;ec<nc;ec++)try{var rc=tc[ec];qu(Xu[rc])&&Yu(rc)}catch(Qz){}zu({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if($u&&$u(e))return!0;try{for(var t=Qu(e),n=0,r=Ju(Zu),i=r.length;n<i;n++)if(Zu[r[n]]==t)return!0}catch(Qz){}return!1}}),_o("matcher"),_o("metadataKey"),_o("observable"),_o("metadata"),_o("patternMatch"),_o("replaceAll");var ic=Nu,oc=o(ic),ac=_,sc=Un,lc=$r,uc=J,cc=ac("".charAt),hc=ac("".charCodeAt),fc=ac("".slice),dc=function(e){return function(t,n){var r,i,o=lc(uc(t)),a=sc(n),s=o.length;return a<0||a>=s?e?"":void 0:(r=hc(o,a))<55296||r>56319||a+1===s||(i=hc(o,a+1))<56320||i>57343?e?cc(o,a):r:e?fc(o,a,a+2):i-56320+(r-55296<<10)+65536}},pc={codeAt:dc(!1),charAt:dc(!0)},vc=pc.charAt,gc=$r,yc=Xo,mc=yu,_c=mu,bc="String Iterator",wc=yc.set,kc=yc.getterFor(bc);mc(String,"String",(function(e){wc(this,{type:bc,string:gc(e),index:0})}),(function(){var e,t=kc(this),n=t.string,r=t.index;return r>=n.length?_c(void 0,!0):(e=vc(n,r),t.index+=e.length,_c(e,!1))}));var Ec=uo.f("iterator"),Sc=o(Ec);function Tc(e){return(Tc="function"==typeof oc&&"symbol"==typeof Sc?function(e){return typeof e}:function(e){return e&&"function"==typeof oc&&e.constructor===oc&&e!==oc.prototype?"symbol":typeof e})(e)}var Cc={exports:{}},xc=On,Pc=O,Ac=en.f;xc({target:"Object",stat:!0,forced:Object.defineProperty!==Ac,sham:!Pc},{defineProperty:Ac});var Ic=ie.Object,Rc=Cc.exports=function(e,t,n){return Ic.defineProperty(e,t,n)};Ic.defineProperty.sham&&(Rc.sham=!0);var Oc=Cc.exports,Mc=o(Oc);On({target:"Object",stat:!0,sham:!O},{create:ji});var Dc=ie.Object,Lc=o((function(e,t){return Dc.create(e,t)})),Fc=Qe,Nc=Pl,Uc=bl;On({target:"Object",stat:!0,forced:l((function(){Nc(1)})),sham:!Uc},{getPrototypeOf:function(e){return Nc(Fc(e))}});var Bc=ie.Object.getPrototypeOf,Vc=o(Bc),Hc=l,jc=function(e,t){var n=[][e];return!!n&&Hc((function(){n.call(null,t||function(){return 1},1)}))},zc=ra.forEach,Wc=jc("forEach")?[].forEach:function(e){return zc(this,e,arguments.length>1?arguments[1]:void 0)};On({target:"Array",proto:!0,forced:[].forEach!=Wc},{forEach:Wc});var Kc=ie,Gc=function(e){return Kc[e+"Prototype"]},qc=Gc("Array").forEach,Yc=ir,Xc=tt,$c=ce,Jc=qc,Qc=Array.prototype,Zc={DOMTokenList:!0,NodeList:!0},eh=o((function(e){var t=e.forEach;return e===Qc||$c(Qc,e)&&t===Qc.forEach||Xc(Zc,Yc(e))?Jc:t})),th=O,nh=Dn,rh=TypeError,ih=Object.getOwnPropertyDescriptor,oh=th&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(Qz){return Qz instanceof TypeError}}()?function(e,t){if(nh(e)&&!ih(e,"length").writable)throw rh("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},ah=Qe,sh=zn,lh=oh,uh=Kn;On({target:"Array",proto:!0,arity:1,forced:l((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(Qz){return Qz instanceof TypeError}}()},{push:function(e){var t=ah(this),n=sh(t),r=arguments.length;uh(n+r);for(var i=0;i<r;i++)t[n]=arguments[i],n++;return lh(t,n),n}});var ch=Gc("Array").push,hh=ce,fh=ch,dh=Array.prototype,ph=o((function(e){var t=e.push;return e===dh||hh(dh,e)&&t===dh.push?fh:t}));On({target:"Object",stat:!0},{setPrototypeOf:eu});var vh=ie.Object.setPrototypeOf,gh=o(vh),yh=ue,mh=zi,_h=io,bh=an,wh=_([].concat),kh=yh("Reflect","ownKeys")||function(e){var t=mh.f(bh(e)),n=_h.f;return n?wh(t,n(e)):t},Eh=tt,Sh=kh,Th=R,Ch=en,xh=re,Ph=bn,Ah=Error,Ih=_("".replace),Rh=String(Ah("zxcasd").stack),Oh=/\n\s*at [^:]*:[^\n]*/,Mh=Oh.test(Rh),Dh=j,Lh=!l((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Dh(1,7)),7!==e.stack)})),Fh=bn,Nh=function(e,t){if(Mh&&"string"==typeof e&&!Ah.prepareStackTrace)for(;t--;)e=Ih(e,Oh,"");return e},Uh=Lh,Bh=Error.captureStackTrace,Vh=dl,Hh=vt("iterator"),jh=Array.prototype,zh=function(e){return void 0!==e&&(Vh.Array===e||jh[Hh]===e)},Wh=ir,Kh=Ne,Gh=Y,qh=dl,Yh=vt("iterator"),Xh=function(e){if(!Gh(e))return Kh(e,Yh)||Kh(e,"@@iterator")||qh[Wh(e)]},$h=L,Jh=De,Qh=an,Zh=Ie,ef=Xh,tf=TypeError,nf=function(e,t){var n=arguments.length<2?ef(e):t;if(Jh(n))return Qh($h(n,e));throw tf(Zh(e)+" is not iterable")},rf=L,of=an,af=Ne,sf=function(e,t,n){var r,i;of(e);try{if(!(r=af(e,"return"))){if("throw"===t)throw n;return n}r=rf(r,e)}catch(Qz){i=!0,r=Qz}if("throw"===t)throw n;if(i)throw r;return of(r),n},lf=Zt,uf=L,cf=an,hf=Ie,ff=zh,df=zn,pf=ce,vf=nf,gf=Xh,yf=sf,mf=TypeError,_f=function(e,t){this.stopped=e,this.result=t},bf=_f.prototype,wf=function(e,t,n){var r,i,o,a,s,l,u,c=n&&n.that,h=!(!n||!n.AS_ENTRIES),f=!(!n||!n.IS_RECORD),d=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),v=lf(t,c),g=function(e){return r&&yf(r,"normal",e),new _f(!0,e)},y=function(e){return h?(cf(e),p?v(e[0],e[1],g):v(e[0],e[1])):p?v(e,g):v(e)};if(f)r=e.iterator;else if(d)r=e;else{if(!(i=gf(e)))throw mf(hf(e)+" is not iterable");if(ff(i)){for(o=0,a=df(e);a>o;o++)if((s=y(e[o]))&&pf(bf,s))return s;return new _f(!1)}r=vf(e,i)}for(l=f?e.next:r.next;!(u=uf(l,r)).done;){try{s=y(u.value)}catch(Qz){yf(r,"throw",Qz)}if("object"==typeof s&&s&&pf(bf,s))return s}return new _f(!1)},kf=$r,Ef=On,Sf=ce,Tf=Pl,Cf=eu,xf=function(e,t,n){for(var r=Sh(t),i=Ch.f,o=Th.f,a=0;a<r.length;a++){var s=r[a];Eh(e,s)||n&&Eh(n,s)||i(e,s,o(t,s))}},Pf=ji,Af=bn,If=j,Rf=function(e,t){xh(t)&&"cause"in t&&Ph(e,"cause",t.cause)},Of=function(e,t,n,r){Uh&&(Bh?Bh(e,t):Fh(e,"stack",Nh(n,r)))},Mf=wf,Df=function(e,t){return void 0===e?arguments.length<2?"":t:kf(e)},Lf=vt("toStringTag"),Ff=Error,Nf=[].push,Uf=function(e,t){var n,r=Sf(Bf,this);Cf?n=Cf(Ff(),r?Tf(this):Bf):(n=r?this:Pf(Bf),Af(n,Lf,"Error")),void 0!==t&&Af(n,"message",Df(t)),Of(n,Uf,n.stack,1),arguments.length>2&&Rf(n,arguments[2]);var i=[];return Mf(e,Nf,{that:i}),Af(n,"errors",i),n};Cf?Cf(Uf,Ff):xf(Uf,Ff,{name:!0});var Bf=Uf.prototype=Pf(Ff.prototype,{constructor:If(1,Uf),message:If(1,""),name:If(1,"AggregateError")});Ef({global:!0,constructor:!0,arity:2},{AggregateError:Uf});var Vf,Hf,jf,zf,Wf="undefined"!=typeof process&&"process"==E(process),Kf=ue,Gf=lo,qf=O,Yf=vt("species"),Xf=function(e){var t=Kf(e);qf&&t&&!t[Yf]&&Gf(t,Yf,{configurable:!0,get:function(){return this}})},$f=ce,Jf=TypeError,Qf=function(e,t){if($f(t,e))return e;throw Jf("Incorrect invocation")},Zf=kr,ed=Ie,td=TypeError,nd=function(e){if(Zf(e))return e;throw td(ed(e)+" is not a constructor")},rd=an,id=nd,od=Y,ad=vt("species"),sd=function(e,t){var n,r=rd(e).constructor;return void 0===r||od(n=rd(r)[ad])?t:id(n)},ld=TypeError,ud=function(e,t){if(e<t)throw ld("Not enough arguments");return e},cd=/(?:ipad|iphone|ipod).*applewebkit/i.test(he),hd=s,fd=p,dd=Zt,pd=I,vd=tt,gd=l,yd=Ti,md=xs,_d=At,bd=ud,wd=cd,kd=Wf,Ed=hd.setImmediate,Sd=hd.clearImmediate,Td=hd.process,Cd=hd.Dispatch,xd=hd.Function,Pd=hd.MessageChannel,Ad=hd.String,Id=0,Rd={},Od="onreadystatechange";gd((function(){Vf=hd.location}));var Md=function(e){if(vd(Rd,e)){var t=Rd[e];delete Rd[e],t()}},Dd=function(e){return function(){Md(e)}},Ld=function(e){Md(e.data)},Fd=function(e){hd.postMessage(Ad(e),Vf.protocol+"//"+Vf.host)};Ed&&Sd||(Ed=function(e){bd(arguments.length,1);var t=pd(e)?e:xd(e),n=md(arguments,1);return Rd[++Id]=function(){fd(t,void 0,n)},Hf(Id),Id},Sd=function(e){delete Rd[e]},kd?Hf=function(e){Td.nextTick(Dd(e))}:Cd&&Cd.now?Hf=function(e){Cd.now(Dd(e))}:Pd&&!wd?(zf=(jf=new Pd).port2,jf.port1.onmessage=Ld,Hf=dd(zf.postMessage,zf)):hd.addEventListener&&pd(hd.postMessage)&&!hd.importScripts&&Vf&&"file:"!==Vf.protocol&&!gd(Fd)?(Hf=Fd,hd.addEventListener("message",Ld,!1)):Hf=Od in _d("script")?function(e){yd.appendChild(_d("script"))[Od]=function(){yd.removeChild(this),Md(e)}}:function(e){setTimeout(Dd(e),0)});var Nd={set:Ed,clear:Sd},Ud=function(){this.head=null,this.tail=null};Ud.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 Bd,Vd,Hd,jd,zd,Wd=Ud,Kd=/ipad|iphone|ipod/i.test(he)&&"undefined"!=typeof Pebble,Gd=/web0s(?!.*chrome)/i.test(he),qd=s,Yd=Zt,Xd=R.f,$d=Nd.set,Jd=Wd,Qd=cd,Zd=Kd,ep=Gd,tp=Wf,np=qd.MutationObserver||qd.WebKitMutationObserver,rp=qd.document,ip=qd.process,op=qd.Promise,ap=Xd(qd,"queueMicrotask"),sp=ap&&ap.value;if(!sp){var lp=new Jd,up=function(){var e,t;for(tp&&(e=ip.domain)&&e.exit();t=lp.get();)try{t()}catch(Qz){throw lp.head&&Bd(),Qz}e&&e.enter()};Qd||tp||ep||!np||!rp?!Zd&&op&&op.resolve?((jd=op.resolve(void 0)).constructor=op,zd=Yd(jd.then,jd),Bd=function(){zd(up)}):tp?Bd=function(){ip.nextTick(up)}:($d=Yd($d,qd),Bd=function(){$d(up)}):(Vd=!0,Hd=rp.createTextNode(""),new np(up).observe(Hd,{characterData:!0}),Bd=function(){Hd.data=Vd=!Vd}),sp=function(e){lp.head||Bd(),lp.add(e)}}var cp=sp,hp=function(e){try{return{error:!1,value:e()}}catch(Qz){return{error:!0,value:Qz}}},fp=s.Promise,dp="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,pp=!dp&&!Wf&&"object"==typeof window&&"object"==typeof document,vp=s,gp=fp,yp=I,mp=Xt,_p=lr,bp=vt,wp=pp,kp=dp,Ep=me,Sp=gp&&gp.prototype,Tp=bp("species"),Cp=!1,xp=yp(vp.PromiseRejectionEvent),Pp={CONSTRUCTOR:mp("Promise",(function(){var e=_p(gp),t=e!==String(gp);if(!t&&66===Ep)return!0;if(!Sp.catch||!Sp.finally)return!0;if(!Ep||Ep<51||!/native code/.test(e)){var n=new gp((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[Tp]=r,!(Cp=n.then((function(){}))instanceof r))return!0}return!t&&(wp||kp)&&!xp})),REJECTION_EVENT:xp,SUBCLASSING:Cp},Ap={},Ip=De,Rp=TypeError,Op=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw Rp("Bad Promise constructor");t=e,n=r})),this.resolve=Ip(t),this.reject=Ip(n)};Ap.f=function(e){return new Op(e)};var Mp,Dp,Lp=On,Fp=Wf,Np=s,Up=L,Bp=ao,Vp=Mo,Hp=Xf,jp=De,zp=I,Wp=re,Kp=Qf,Gp=sd,qp=Nd.set,Yp=cp,Xp=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(Qz){}},$p=hp,Jp=Wd,Qp=Xo,Zp=fp,ev=Pp,tv=Ap,nv="Promise",rv=ev.CONSTRUCTOR,iv=ev.REJECTION_EVENT,ov=Qp.getterFor(nv),av=Qp.set,sv=Zp&&Zp.prototype,lv=Zp,uv=sv,cv=Np.TypeError,hv=Np.document,fv=Np.process,dv=tv.f,pv=dv,vv=!!(hv&&hv.createEvent&&Np.dispatchEvent),gv="unhandledrejection",yv=function(e){var t;return!(!Wp(e)||!zp(t=e.then))&&t},mv=function(e,t){var n,r,i,o=t.value,a=1==t.state,s=a?e.ok:e.fail,l=e.resolve,u=e.reject,c=e.domain;try{s?(a||(2===t.rejection&&Ev(t),t.rejection=1),!0===s?n=o:(c&&c.enter(),n=s(o),c&&(c.exit(),i=!0)),n===e.promise?u(cv("Promise-chain cycle")):(r=yv(n))?Up(r,n,l,u):l(n)):u(o)}catch(Qz){c&&!i&&c.exit(),u(Qz)}},_v=function(e,t){e.notified||(e.notified=!0,Yp((function(){for(var n,r=e.reactions;n=r.get();)mv(n,e);e.notified=!1,t&&!e.rejection&&wv(e)})))},bv=function(e,t,n){var r,i;vv?((r=hv.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),Np.dispatchEvent(r)):r={promise:t,reason:n},!iv&&(i=Np["on"+e])?i(r):e===gv&&Xp("Unhandled promise rejection",n)},wv=function(e){Up(qp,Np,(function(){var t,n=e.facade,r=e.value;if(kv(e)&&(t=$p((function(){Fp?fv.emit("unhandledRejection",r,n):bv(gv,n,r)})),e.rejection=Fp||kv(e)?2:1,t.error))throw t.value}))},kv=function(e){return 1!==e.rejection&&!e.parent},Ev=function(e){Up(qp,Np,(function(){var t=e.facade;Fp?fv.emit("rejectionHandled",t):bv("rejectionhandled",t,e.value)}))},Sv=function(e,t,n){return function(r){e(t,r,n)}},Tv=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,_v(e,!0))},Cv=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw cv("Promise can't be resolved itself");var r=yv(t);r?Yp((function(){var n={done:!1};try{Up(r,t,Sv(Cv,n,e),Sv(Tv,n,e))}catch(Qz){Tv(n,Qz,e)}})):(e.value=t,e.state=1,_v(e,!1))}catch(Qz){Tv({done:!1},Qz,e)}}};rv&&(uv=(lv=function(e){Kp(this,uv),jp(e),Up(Mp,this);var t=ov(this);try{e(Sv(Cv,t),Sv(Tv,t))}catch(Qz){Tv(t,Qz)}}).prototype,(Mp=function(e){av(this,{type:nv,done:!1,notified:!1,parent:!1,reactions:new Jp,rejection:!1,state:0,value:void 0})}).prototype=Bp(uv,"then",(function(e,t){var n=ov(this),r=dv(Gp(this,lv));return n.parent=!0,r.ok=!zp(e)||e,r.fail=zp(t)&&t,r.domain=Fp?fv.domain:void 0,0==n.state?n.reactions.add(r):Yp((function(){mv(r,n)})),r.promise})),Dp=function(){var e=new Mp,t=ov(e);this.promise=e,this.resolve=Sv(Cv,t),this.reject=Sv(Tv,t)},tv.f=dv=function(e){return e===lv||undefined===e?new Dp(e):pv(e)}),Lp({global:!0,constructor:!0,wrap:!0,forced:rv},{Promise:lv}),Vp(lv,nv,!1,!0),Hp(nv);var xv=vt("iterator"),Pv=!1;try{var Av=0,Iv={next:function(){return{done:!!Av++}},return:function(){Pv=!0}};Iv[xv]=function(){return this},Array.from(Iv,(function(){throw 2}))}catch(Qz){}var Rv=function(e,t){if(!t&&!Pv)return!1;var n=!1;try{var r={};r[xv]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(Qz){}return n},Ov=fp,Mv=Pp.CONSTRUCTOR||!Rv((function(e){Ov.all(e).then(void 0,(function(){}))})),Dv=L,Lv=De,Fv=Ap,Nv=hp,Uv=wf;On({target:"Promise",stat:!0,forced:Mv},{all:function(e){var t=this,n=Fv.f(t),r=n.resolve,i=n.reject,o=Nv((function(){var n=Lv(t.resolve),o=[],a=0,s=1;Uv(e,(function(e){var l=a++,u=!1;s++,Dv(n,t,e).then((function(e){u||(u=!0,o[l]=e,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise}});var Bv=On,Vv=Pp.CONSTRUCTOR;fp&&fp.prototype,Bv({target:"Promise",proto:!0,forced:Vv,real:!0},{catch:function(e){return this.then(void 0,e)}});var Hv=L,jv=De,zv=Ap,Wv=hp,Kv=wf;On({target:"Promise",stat:!0,forced:Mv},{race:function(e){var t=this,n=zv.f(t),r=n.reject,i=Wv((function(){var i=jv(t.resolve);Kv(e,(function(e){Hv(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var Gv=L,qv=Ap;On({target:"Promise",stat:!0,forced:Pp.CONSTRUCTOR},{reject:function(e){var t=qv.f(this);return Gv(t.reject,void 0,e),t.promise}});var Yv=an,Xv=re,$v=Ap,Jv=function(e,t){if(Yv(e),Xv(t)&&t.constructor===e)return t;var n=$v.f(e);return(0,n.resolve)(t),n.promise},Qv=On,Zv=fp,eg=Pp.CONSTRUCTOR,tg=Jv,ng=ue("Promise"),rg=!eg;Qv({target:"Promise",stat:!0,forced:true},{resolve:function(e){return tg(rg&&this===ng?Zv:this,e)}});var ig=L,og=De,ag=Ap,sg=hp,lg=wf;On({target:"Promise",stat:!0,forced:Mv},{allSettled:function(e){var t=this,n=ag.f(t),r=n.resolve,i=n.reject,o=sg((function(){var n=og(t.resolve),i=[],o=0,a=1;lg(e,(function(e){var s=o++,l=!1;a++,ig(n,t,e).then((function(e){l||(l=!0,i[s]={status:"fulfilled",value:e},--a||r(i))}),(function(e){l||(l=!0,i[s]={status:"rejected",reason:e},--a||r(i))}))})),--a||r(i)}));return o.error&&i(o.value),n.promise}});var ug=L,cg=De,hg=ue,fg=Ap,dg=hp,pg=wf,vg="No one promise resolved";On({target:"Promise",stat:!0,forced:Mv},{any:function(e){var t=this,n=hg("AggregateError"),r=fg.f(t),i=r.resolve,o=r.reject,a=dg((function(){var r=cg(t.resolve),a=[],s=0,l=1,u=!1;pg(e,(function(e){var c=s++,h=!1;l++,ug(r,t,e).then((function(e){h||u||(u=!0,i(e))}),(function(e){h||u||(h=!0,a[c]=e,--l||o(new n(a,vg)))}))})),--l||o(new n(a,vg))}));return a.error&&o(a.value),r.promise}});var gg=On,yg=fp,mg=l,_g=ue,bg=I,wg=sd,kg=Jv,Eg=yg&&yg.prototype;gg({target:"Promise",proto:!0,real:!0,forced:!!yg&&mg((function(){Eg.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=wg(this,_g("Promise")),n=bg(e);return this.then(n?function(n){return kg(t,e()).then((function(){return n}))}:e,n?function(n){return kg(t,e()).then((function(){throw n}))}:e)}});var Sg=ie.Promise,Tg=Ap,Cg=hp;On({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=Tg.f(this),n=Cg(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}});var xg=Sg,Pg=o(xg),Ag=On,Ig=Dn,Rg=_([].reverse),Og=[1,2];Ag({target:"Array",proto:!0,forced:String(Og)===String(Og.reverse())},{reverse:function(){return Ig(this)&&(this.length=this.length),Rg(this)}});var Mg=Gc("Array").reverse,Dg=ce,Lg=Mg,Fg=Array.prototype,Ng=function(e){var t=e.reverse;return e===Fg||Dg(Fg,e)&&t===Fg.reverse?Lg:t},Ug=o(Ng),Bg=On,Vg=Dn,Hg=kr,jg=re,zg=ti,Wg=zn,Kg=ee,Gg=Xn,qg=vt,Yg=xs,Xg=Mr("slice"),$g=qg("species"),Jg=Array,Qg=Math.max;Bg({target:"Array",proto:!0,forced:!Xg},{slice:function(e,t){var n,r,i,o=Kg(this),a=Wg(o),s=zg(e,a),l=zg(void 0===t?a:t,a);if(Vg(o)&&(n=o.constructor,(Hg(n)&&(n===Jg||Vg(n.prototype))||jg(n)&&null===(n=n[$g]))&&(n=void 0),n===Jg||void 0===n))return Yg(o,s,l);for(r=new(void 0===n?Jg:n)(Qg(l-s,0)),i=0;s<l;s++,i++)s in o&&Gg(r,i,o[s]);return r.length=i,r}});var Zg=Gc("Array").slice,ey=ce,ty=Zg,ny=Array.prototype,ry=function(e){var t=e.slice;return e===ny||ey(ny,e)&&t===ny.slice?ty:t},iy=o(ry);function oy(){oy=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Mc||function(e,t,n){e[t]=n.value},i="function"==typeof oc?oc:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,n){return Mc(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 u(e,t,n,i){var o=t&&t.prototype instanceof f?t:f,a=Lc(o.prototype),s=new S(i||[]);return r(a,"_invoke",{value:b(e,n,s)}),a}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(x){return{type:"throw",arg:x}}}e.wrap=u;var h={};function f(){}function d(){}function p(){}var v={};l(v,o,(function(){return this}));var g=Vc&&Vc(Vc(T([])));g&&g!==t&&n.call(g,o)&&(v=g);var y=p.prototype=f.prototype=Lc(v);function m(e){var t;eh(t=["next","throw","return"]).call(t,(function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(r,o,a,s){var l=c(e[r],e,o);if("throw"!==l.type){var u=l.arg,h=u.value;return h&&"object"==Tc(h)&&n.call(h,"__await")?t.resolve(h.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(h).then((function(e){u.value=e,a(u)}),(function(e){return i("throw",e,a,s)}))}s(l.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function b(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=w(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"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===h)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function w(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var i=c(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,h;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function k(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]),ph(t=this.tryEntries).call(t,n)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],eh(e).call(e,k,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 r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return d.prototype=p,r(y,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:d,configurable:!0}),d.displayName=l(p,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return gh?gh(e,p):(e.__proto__=p,l(e,s,"GeneratorFunction")),e.prototype=Lc(y),e},e.awrap=function(e){return{__await:e}},m(_.prototype),l(_.prototype,a,(function(){return this})),e.AsyncIterator=_,e.async=function(t,n,r,i,o){void 0===o&&(o=Pg);var a=new _(u(t,n,r,i),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 r in t)ph(n).call(n,r);return Ug(n).call(n),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,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,eh(t=this.tryEntries).call(t,E),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+iy(r).call(r,1))&&(this[r]=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 r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("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 r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}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 ay(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(Qz){return void n(Qz)}s.done?t(l):Pg.resolve(l).then(r,i)}function sy(e){return function(){var t=this,n=arguments;return new Pg((function(r,i){var o=e.apply(t,n);function a(e){ay(o,r,i,a,s,"next",e)}function s(e){ay(o,r,i,a,s,"throw",e)}a(void 0)}))}}On({target:"Array",stat:!0},{isArray:Dn});var ly=o(ie.Array.isArray);function uy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var cy=Xh,hy=o(cy),fy=an,dy=sf,py=Zt,vy=L,gy=Qe,yy=function(e,t,n,r){try{return r?t(fy(n)[0],n[1]):t(n)}catch(Qz){dy(e,"throw",Qz)}},my=zh,_y=kr,by=zn,wy=Xn,ky=nf,Ey=Xh,Sy=Array,Ty=function(e){var t=gy(e),n=_y(this),r=arguments.length,i=r>1?arguments[1]:void 0,o=void 0!==i;o&&(i=py(i,r>2?arguments[2]:void 0));var a,s,l,u,c,h,f=Ey(t),d=0;if(!f||this===Sy&&my(f))for(a=by(t),s=n?new this(a):Sy(a);a>d;d++)h=o?i(t[d],d):t[d],wy(s,d,h);else for(c=(u=ky(t,f)).next,s=n?new this:[];!(l=vy(c,u)).done;d++)h=o?yy(u,i,[l.value,d],!0):l.value,wy(s,d,h);return s.length=d,s},Cy=Ty;On({target:"Array",stat:!0,forced:!Rv((function(e){Array.from(e)}))},{from:Cy});var xy=ie.Array.from,Py=o(xy);function Ay(e,t){var n;if(e){if("string"==typeof e)return uy(e,t);var r=iy(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Py(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?uy(e,t):void 0}}function Iy(e){return function(e){if(ly(e))return uy(e)}(e)||function(e){if(void 0!==oc&&null!=hy(e)||null!=e["@@iterator"])return Py(e)}(e)||Ay(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 Ry(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Oy=uo.f("toPrimitive"),My=o(Oy);function Dy(e){var t=function(e,t){if("object"!==Tc(e)||null===e)return e;var n=e[My];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Tc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Tc(t)?t:String(t)}function Ly(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Mc(e,Dy(r.key),r)}}function Fy(e,t,n){return t&&Ly(e.prototype,t),n&&Ly(e,n),Mc(e,"prototype",{writable:!1}),e}function Ny(e,t,n){return(t=Dy(t))in e?Mc(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Uy=ie.Object.getOwnPropertySymbols,By=o(Uy),Vy=On,Hy=ai.indexOf,jy=jc,zy=C([].indexOf),Wy=!!zy&&1/zy([1],1,-0)<0;Vy({target:"Array",proto:!0,forced:Wy||!jy("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return Wy?zy(this,e,t)||0:Hy(this,e,t)}});var Ky=Gc("Array").indexOf,Gy=ce,qy=Ky,Yy=Array.prototype,Xy=function(e){var t=e.indexOf;return e===Yy||Gy(Yy,e)&&t===Yy.indexOf?qy:t},$y=o(Xy),Jy=Qe,Qy=yi;On({target:"Object",stat:!0,forced:l((function(){Qy(1)}))},{keys:function(e){return Qy(Jy(e))}});var Zy=ie.Object.keys,em=o(Zy);function tm(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=em(e);for(r=0;r<o.length;r++)n=o[r],$y(t).call(t,n)>=0||(i[n]=e[n]);return i}(e,t);if(By){var o=By(e);for(r=0;r<o.length;r++)n=o[r],$y(t).call(t,n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var nm=ra.filter;On({target:"Array",proto:!0,forced:!Mr("filter")},{filter:function(e){return nm(this,e,arguments.length>1?arguments[1]:void 0)}});var rm=Gc("Array").filter,im=ce,om=rm,am=Array.prototype,sm=function(e){var t=e.filter;return e===am||im(am,e)&&t===am.filter?om:t},lm=o(sm),um={exports:{}},cm=On,hm=l,fm=ee,dm=R.f,pm=O;cm({target:"Object",stat:!0,forced:!pm||hm((function(){dm(1)})),sham:!pm},{getOwnPropertyDescriptor:function(e,t){return dm(fm(e),t)}});var vm=ie.Object,gm=um.exports=function(e,t){return vm.getOwnPropertyDescriptor(e,t)};vm.getOwnPropertyDescriptor.sham&&(gm.sham=!0);var ym=um.exports,mm=o(ym),_m=kh,bm=ee,wm=R,km=Xn;On({target:"Object",stat:!0,sham:!O},{getOwnPropertyDescriptors:function(e){for(var t,n,r=bm(e),i=wm.f,o=_m(r),a={},s=0;o.length>s;)void 0!==(n=i(r,t=o[s++]))&&km(a,t,n);return a}});var Em=ie.Object.getOwnPropertyDescriptors,Sm=o(Em),Tm={exports:{}},Cm=On,xm=O,Pm=Jr.f;Cm({target:"Object",stat:!0,forced:Object.defineProperties!==Pm,sham:!xm},{defineProperties:Pm});var Am=ie.Object,Im=Tm.exports=function(e,t){return Am.defineProperties(e,t)};Am.defineProperties.sham&&(Im.sham=!0);var Rm=Tm.exports,Om=o(Rm);function Mm(e,t){var n=em(e);if(By){var r=By(e);t&&(r=lm(r).call(r,(function(t){return mm(e,t).enumerable}))),ph(n).apply(n,r)}return n}function Dm(e){for(var t=1;t<arguments.length;t++){var n,r,i=null!=arguments[t]?arguments[t]:{};t%2?eh(n=Mm(Object(i),!0)).call(n,(function(t){Ny(e,t,i[t])})):Sm?Om(e,Sm(i)):eh(r=Mm(Object(i))).call(r,(function(t){Mc(e,t,mm(i,t))}))}return e}var Lm=Gc("Array").concat,Fm=ce,Nm=Lm,Um=Array.prototype,Bm=o((function(e){var t=e.concat;return e===Um||Fm(Um,e)&&t===Um.concat?Nm:t})),Vm=On,Hm=ra.find,jm="find",zm=!0;jm in[]&&Array(1)[jm]((function(){zm=!1})),Vm({target:"Array",proto:!0,forced:zm},{find:function(e){return Hm(this,e,arguments.length>1?arguments[1]:void 0)}});var Wm=Gc("Array").find,Km=ce,Gm=Wm,qm=Array.prototype,Ym=o((function(e){var t=e.find;return e===qm||Km(qm,e)&&t===qm.find?Gm:t})),Xm={exports:{}},$m=l((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),Jm=l,Qm=re,Zm=E,e_=$m,t_=Object.isExtensible,n_=Jm((function(){t_(1)}))||e_?function(e){return!!Qm(e)&&((!e_||"ArrayBuffer"!=Zm(e))&&(!t_||t_(e)))}:t_,r_=!l((function(){return Object.isExtensible(Object.preventExtensions({}))})),i_=On,o_=_,a_=si,s_=re,l_=tt,u_=en.f,c_=zi,h_=Gi,f_=n_,d_=r_,p_=!1,v_=at("meta"),g_=0,y_=function(e){u_(e,v_,{value:{objectID:"O"+g_++,weakData:{}}})},m_=Xm.exports={enable:function(){m_.enable=function(){},p_=!0;var e=c_.f,t=o_([].splice),n={};n[v_]=1,e(n).length&&(c_.f=function(n){for(var r=e(n),i=0,o=r.length;i<o;i++)if(r[i]===v_){t(r,i,1);break}return r},i_({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:h_.f}))},fastKey:function(e,t){if(!s_(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!l_(e,v_)){if(!f_(e))return"F";if(!t)return"E";y_(e)}return e[v_].objectID},getWeakData:function(e,t){if(!l_(e,v_)){if(!f_(e))return!0;if(!t)return!1;y_(e)}return e[v_].weakData},onFreeze:function(e){return d_&&p_&&f_(e)&&!l_(e,v_)&&y_(e),e}};a_[v_]=!0;var __=Xm.exports,b_=On,w_=s,k_=__,E_=l,S_=bn,T_=wf,C_=Qf,x_=I,P_=re,A_=Mo,I_=en.f,R_=ra.forEach,O_=O,M_=Xo.set,D_=Xo.getterFor,L_=ao,F_=function(e,t,n){for(var r in t)n&&n.unsafe&&e[r]?e[r]=t[r]:L_(e,r,t[r],n);return e},N_=ji,U_=lo,B_=F_,V_=Zt,H_=Qf,j_=Y,z_=wf,W_=yu,K_=mu,G_=Xf,q_=O,Y_=__.fastKey,X_=Xo.set,$_=Xo.getterFor,J_={getConstructor:function(e,t,n,r){var i=e((function(e,i){H_(e,o),X_(e,{type:t,index:N_(null),first:void 0,last:void 0,size:0}),q_||(e.size=0),j_(i)||z_(i,e[r],{that:e,AS_ENTRIES:n})})),o=i.prototype,a=$_(t),s=function(e,t,n){var r,i,o=a(e),s=l(e,t);return s?s.value=n:(o.last=s={index:i=Y_(t,!0),key:t,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=s),r&&(r.next=s),q_?o.size++:e.size++,"F"!==i&&(o.index[i]=s)),e},l=function(e,t){var n,r=a(e),i=Y_(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return B_(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,q_?e.size=0:this.size=0},delete:function(e){var t=this,n=a(t),r=l(t,e);if(r){var i=r.next,o=r.previous;delete n.index[r.index],r.removed=!0,o&&(o.next=i),i&&(i.previous=o),n.first==r&&(n.first=i),n.last==r&&(n.last=o),q_?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=a(this),r=V_(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!l(this,e)}}),B_(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)}}),q_&&U_(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(e,t,n){var r=t+" Iterator",i=$_(t),o=$_(r);W_(e,t,(function(e,t){X_(this,{type:r,target:e,state:i(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)?K_("keys"==t?n.key:"values"==t?n.value:[n.key,n.value],!1):(e.target=void 0,K_(void 0,!0))}),n?"entries":"values",!n,!0),G_(t)}};(function(e,t,n){var r,i=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),a=i?"set":"add",s=w_[e],l=s&&s.prototype,u={};if(O_&&x_(s)&&(o||l.forEach&&!E_((function(){(new s).entries().next()})))){var c=(r=t((function(t,n){M_(C_(t,c),{type:e,collection:new s}),null!=n&&T_(n,t[a],{that:t,AS_ENTRIES:i})}))).prototype,h=D_(e);R_(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in l)||o&&"clear"==e||S_(c,e,(function(n,r){var i=h(this).collection;if(!t&&o&&!P_(n))return"get"==e&&void 0;var a=i[e](0===n?0:n,r);return t?this:a}))})),o||I_(c,"size",{configurable:!0,get:function(){return h(this).collection.size}})}else r=n.getConstructor(t,e,i,a),k_.enable();A_(r,e,!1,!0),u[e]=r,b_({global:!0,forced:!0},u),o||n.setStrong(r,e,i)})("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),J_);var Q_=ie.Map,Z_=Zt,eb=L,tb=De,nb=nd,rb=Y,ib=wf,ob=[].push,ab=function(e){var t,n,r,i,o=arguments.length,a=o>1?arguments[1]:void 0;return nb(this),(t=void 0!==a)&&tb(a),rb(e)?new this:(n=[],t?(r=0,i=Z_(a,o>2?arguments[2]:void 0),ib(e,(function(e){eb(ob,n,i(e,r++))}))):ib(e,ob,{that:n}),new this(n))};On({target:"Map",stat:!0,forced:!0},{from:ab});var sb=xs,lb=function(){return new this(sb(arguments))};On({target:"Map",stat:!0,forced:!0},{of:lb});var ub=Ie,cb=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(ub(e)+" is not a map")},hb=function(e,t){return 1==t?function(t,n){return t[e](n)}:function(t,n,r){return t[e](n,r)}},fb=ue("Map"),db={Map:fb,set:hb("set",2),get:hb("get",1),has:hb("has",1),remove:hb("delete",1),proto:fb.prototype},pb=cb,vb=db.remove;On({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=pb(this),n=!0,r=0,i=arguments.length;r<i;r++)e=vb(t,arguments[r]),n=n&&e;return!!n}});var gb=cb,yb=db.get,mb=db.has,_b=db.set;On({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var n,r,i=gb(this);return mb(i,e)?(n=yb(i,e),"update"in t&&(n=t.update(n,e,i),_b(i,e,n)),n):(r=t.insert(e,i),_b(i,e,r),r)}});var bb=L,wb=function(e,t,n){for(var r,i,o=n||e.next;!(r=bb(o,e)).done;)if(void 0!==(i=t(r.value)))return i},kb=function(e,t,n){return n?wb(e.entries(),(function(e){return t(e[1],e[0])})):e.forEach(t)},Eb=Zt,Sb=cb,Tb=kb;On({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=Sb(this),n=Eb(e,arguments.length>1?arguments[1]:void 0);return!1!==Tb(t,(function(e,r){if(!n(e,r,t))return!1}),!0)}});var Cb=Zt,xb=cb,Pb=kb,Ab=db.Map,Ib=db.set;On({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=xb(this),n=Cb(e,arguments.length>1?arguments[1]:void 0),r=new Ab;return Pb(t,(function(e,i){n(e,i,t)&&Ib(r,i,e)})),r}});var Rb=Zt,Ob=cb,Mb=kb;On({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=Ob(this),n=Rb(e,arguments.length>1?arguments[1]:void 0),r=Mb(t,(function(e,r){if(n(e,r,t))return{value:e}}),!0);return r&&r.value}});var Db=Zt,Lb=cb,Fb=kb;On({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=Lb(this),n=Db(e,arguments.length>1?arguments[1]:void 0),r=Fb(t,(function(e,r){if(n(e,r,t))return{key:r}}),!0);return r&&r.key}});var Nb=On,Ub=L,Bb=I,Vb=De,Hb=wf,jb=db.Map,zb=_([].push);Nb({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){var n=new(Bb(this)?this:jb);Vb(t);var r=Vb(n.has),i=Vb(n.get),o=Vb(n.set);return Hb(e,(function(e){var a=t(e);Ub(r,n,a)?zb(Ub(i,n,a),e):Ub(o,n,a,[e])})),n}});var Wb=function(e,t){return e===t||e!=e&&t!=t},Kb=cb,Gb=kb;On({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===Gb(Kb(this),(function(t){if(Wb(t,e))return!0}),!0)}});var qb=L,Yb=wf,Xb=I,$b=De,Jb=db.Map;On({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var n=new(Xb(this)?this:Jb);$b(t);var r=$b(n.set);return Yb(e,(function(e){qb(r,n,t(e),e)})),n}});var Qb=cb,Zb=kb;On({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=Zb(Qb(this),(function(t,n){if(t===e)return{key:n}}),!0);return t&&t.key}});var ew=Zt,tw=cb,nw=kb,rw=db.Map,iw=db.set;On({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=tw(this),n=ew(e,arguments.length>1?arguments[1]:void 0),r=new rw;return nw(t,(function(e,i){iw(r,n(e,i,t),e)})),r}});var ow=Zt,aw=cb,sw=kb,lw=db.Map,uw=db.set;On({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=aw(this),n=ow(e,arguments.length>1?arguments[1]:void 0),r=new lw;return sw(t,(function(e,i){uw(r,i,n(e,i,t))})),r}});var cw=cb,hw=wf,fw=db.set;On({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=cw(this),n=arguments.length,r=0;r<n;)hw(arguments[r++],(function(e,n){fw(t,e,n)}),{AS_ENTRIES:!0});return t}});var dw=De,pw=cb,vw=kb,gw=TypeError;On({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=pw(this),n=arguments.length<2,r=n?void 0:arguments[1];if(dw(e),vw(t,(function(i,o){n?(n=!1,r=i):r=e(r,i,o,t)})),n)throw gw("Reduce of empty map with no initial value");return r}});var yw=Zt,mw=cb,_w=kb;On({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=mw(this),n=yw(e,arguments.length>1?arguments[1]:void 0);return!0===_w(t,(function(e,r){if(n(e,r,t))return!0}),!0)}});var bw=De,ww=cb,kw=TypeError,Ew=db.get,Sw=db.has,Tw=db.set;On({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var n=ww(this),r=arguments.length;bw(t);var i=Sw(n,e);if(!i&&r<3)throw kw("Updating absent value");var o=i?Ew(n,e):bw(r>2?arguments[2]:void 0)(e,n);return Tw(n,e,t(o,e,n)),n}});var Cw=L,xw=De,Pw=I,Aw=an,Iw=TypeError,Rw=function(e,t){var n,r=Aw(this),i=xw(r.get),o=xw(r.has),a=xw(r.set),s=arguments.length>2?arguments[2]:void 0;if(!Pw(t)&&!Pw(s))throw Iw("At least one callback required");return Cw(o,r,e)?(n=Cw(i,r,e),Pw(t)&&(n=t(n),Cw(a,r,e,n))):Pw(s)&&(n=s(),Cw(a,r,e,n)),n};On({target:"Map",proto:!0,real:!0,forced:!0},{upsert:Rw}),On({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:Rw});var Ow=Q_,Mw=o(Ow),Dw=o(Ow),Lw=ra.map;On({target:"Array",proto:!0,forced:!Mr("map")},{map:function(e){return Lw(this,e,arguments.length>1?arguments[1]:void 0)}});var Fw=Gc("Array").map,Nw=ce,Uw=Fw,Bw=Array.prototype,Vw=o((function(e){var t=e.map;return e===Bw||Nw(Bw,e)&&t===Bw.map?Uw:t})),Hw=o(xg),jw=o(Xy),zw=o(Zy),Ww=o(ry),Kw=Ie,Gw=TypeError,qw=function(e,t){if(!delete e[t])throw Gw("Cannot delete property "+Kw(t)+" of "+Kw(e))},Yw=On,Xw=Qe,$w=ti,Jw=Un,Qw=zn,Zw=oh,ek=Kn,tk=Ar,nk=Xn,rk=qw,ik=Mr("splice"),ok=Math.max,ak=Math.min;Yw({target:"Array",proto:!0,forced:!ik},{splice:function(e,t){var n,r,i,o,a,s,l=Xw(this),u=Qw(l),c=$w(e,u),h=arguments.length;for(0===h?n=r=0:1===h?(n=0,r=u-c):(n=h-2,r=ak(ok(Jw(t),0),u-c)),ek(u+n-r),i=tk(l,r),o=0;o<r;o++)(a=c+o)in l&&nk(i,o,l[a]);if(i.length=r,n<r){for(o=c;o<u-r;o++)s=o+n,(a=o+r)in l?l[s]=l[a]:rk(l,s);for(o=u;o>u-r+n;o--)rk(l,o-1)}else if(n>r)for(o=u-r;o>c;o--)s=o+n-1,(a=o+r-1)in l?l[s]=l[a]:rk(l,s);for(o=0;o<n;o++)l[o+c]=arguments[o+2];return Zw(l,u-r+n),i}});var sk=Gc("Array").splice,lk=ce,uk=sk,ck=Array.prototype,hk=o((function(e){var t=e.splice;return e===ck||lk(ck,e)&&t===ck.splice?uk:t}));On({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var fk=o(ie.Number.isNaN),dk="\t\n\v\f\r                 \u2028\u2029\ufeff",pk=J,vk=$r,gk=dk,yk=_("".replace),mk=RegExp("^["+gk+"]+"),_k=RegExp("(^|[^"+gk+"])["+gk+"]+$"),bk=function(e){return function(t){var n=vk(pk(t));return 1&e&&(n=yk(n,mk,"")),2&e&&(n=yk(n,_k,"$1")),n}},wk={start:bk(1),end:bk(2),trim:bk(3)},kk=s,Ek=l,Sk=_,Tk=$r,Ck=wk.trim,xk=dk,Pk=kk.parseInt,Ak=kk.Symbol,Ik=Ak&&Ak.iterator,Rk=/^[+-]?0x/i,Ok=Sk(Rk.exec),Mk=8!==Pk(xk+"08")||22!==Pk(xk+"0x16")||Ik&&!Ek((function(){Pk(Object(Ik))}))?function(e,t){var n=Ck(Tk(e));return Pk(n,t>>>0||(Ok(Rk,n)?16:10))}:Pk;On({global:!0,forced:parseInt!=Mk},{parseInt:Mk});var Dk=o(ie.parseInt),Lk=Gc("Array").keys,Fk=ir,Nk=tt,Uk=ce,Bk=Lk,Vk=Array.prototype,Hk={DOMTokenList:!0,NodeList:!0},jk=o((function(e){var t=e.keys;return e===Vk||Uk(Vk,e)&&t===Vk.keys||Nk(Hk,Fk(e))?Bk:t})),zk=o(sm),Wk=O,Kk=_,Gk=L,qk=l,Yk=yi,Xk=io,$k=F,Jk=Qe,Qk=q,Zk=Object.assign,eE=Object.defineProperty,tE=Kk([].concat),nE=!Zk||qk((function(){if(Wk&&1!==Zk({b:1},Zk(eE({},"a",{enumerable:!0,get:function(){eE(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=Zk({},e)[n]||Yk(Zk({},t)).join("")!=r}))?function(e,t){for(var n=Jk(e),r=arguments.length,i=1,o=Xk.f,a=$k.f;r>i;)for(var s,l=Qk(arguments[i++]),u=o?tE(Yk(l),o(l)):Yk(l),c=u.length,h=0;c>h;)s=u[h++],Wk&&!Gk(a,l,s)||(n[s]=l[s]);return n}:Zk,rE=nE;On({target:"Object",stat:!0,arity:2,forced:Object.assign!==rE},{assign:rE});var iE=o(ie.Object.assign),oE=o(Uy),aE=o(ym),sE=o(Em),lE=o(Rm),uE=o(Oc),cE=o(ic),hE=o(Ec),fE=o(vh),dE=o(Bc),pE=_,vE=De,gE=re,yE=tt,mE=xs,_E=u,bE=Function,wE=pE([].concat),kE=pE([].join),EE={},SE=_E?bE.bind:function(e){var t=vE(this),n=t.prototype,r=mE(arguments,1),i=function(){var n=wE(r,mE(arguments));return this instanceof i?function(e,t,n){if(!yE(EE,t)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";EE[t]=bE("C,a","return new C("+kE(r,",")+")")}return EE[t](e,n)}(t,n.length,n):t.apply(e,n)};return gE(n)&&(i.prototype=n),i},TE=On,CE=p,xE=SE,PE=nd,AE=an,IE=re,RE=ji,OE=l,ME=ue("Reflect","construct"),DE=Object.prototype,LE=[].push,FE=OE((function(){function e(){}return!(ME((function(){}),[],e)instanceof e)})),NE=!OE((function(){ME((function(){}))})),UE=FE||NE;TE({target:"Reflect",stat:!0,forced:UE,sham:UE},{construct:function(e,t){PE(e),AE(t);var n=arguments.length<3?e:PE(arguments[2]);if(NE&&!FE)return ME(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 r=[null];return CE(LE,r,t),new(CE(xE,e,r))}var i=n.prototype,o=RE(IE(i)?i:DE),a=CE(e,o,t);return IE(a)?a:o}});var BE=ie.Reflect.construct,VE=o(BE),HE=o(BE),jE=tt,zE=L,WE=re,KE=an,GE=function(e){return void 0!==e&&(jE(e,"value")||jE(e,"writable"))},qE=R,YE=Pl;On({target:"Reflect",stat:!0},{get:function e(t,n){var r,i,o=arguments.length<3?t:arguments[2];return KE(t)===o?t[n]:(r=qE.f(t,n))?GE(r)?r.value:void 0===r.get?void 0:zE(r.get,o):WE(i=YE(t))?e(i,n,o):void 0}});var XE=ie.Reflect.get,$E=o(XE),JE=o(XE),QE=o(cy),ZE=o(xy),eS=o(Oy);function tS(e,t){var n=zw(e);if(oE){var r=oE(e);t&&(r=zk(r).call(r,(function(t){return aE(e,t).enumerable}))),n.push.apply(n,r)}return n}function nS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tS(Object(n),!0).forEach((function(t){sS(e,t,n[t])})):sE?lE(e,sE(n)):tS(Object(n)).forEach((function(t){uE(e,t,aE(n,t))}))}return e}function rS(e){return(rS="function"==typeof cE&&"symbol"==typeof hE?function(e){return typeof e}:function(e){return e&&"function"==typeof cE&&e.constructor===cE&&e!==cE.prototype?"symbol":typeof e})(e)}function iS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),uE(e,yS(r.key),r)}}function aS(e,t,n){return t&&oS(e.prototype,t),n&&oS(e,n),uE(e,"prototype",{writable:!1}),e}function sS(e,t,n){return(t=yS(t))in e?uE(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lS(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}}),uE(e,"prototype",{writable:!1}),t&&cS(e,t)}function uS(e){return(uS=fE?dE.bind():function(e){return e.__proto__||dE(e)})(e)}function cS(e,t){return(cS=fE?fE.bind():function(e,t){return e.__proto__=t,e})(e,t)}function hS(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fS(e,t){if(t&&("object"===Tc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return hS(e)}function dS(e){var t=function(){if("undefined"==typeof Reflect||!HE)return!1;if(HE.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(HE(Boolean,[],(function(){}))),!0}catch(rj){return!1}}();return function(){var n,r=uS(e);if(t){var i=uS(this).constructor;n=HE(r,arguments,i)}else n=r.apply(this,arguments);return fS(this,n)}}function pS(){return pS="undefined"!=typeof Reflect&&JE?JE.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=uS(e)););return e}(e,t);if(r){var i=aE(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},pS.apply(this,arguments)}function vS(e){return function(e){if(Array.isArray(e))return gS(e)}(e)||function(e){if(void 0!==cE&&null!=QE(e)||null!=e["@@iterator"])return ZE(e)}(e)||function(e,t){var n;if(!e)return;if("string"==typeof e)return gS(e,t);var r=Ww(n=Object.prototype.toString.call(e)).call(n,8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return ZE(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return gS(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 gS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yS(e){var t=function(e,t){if("object"!==Tc(e)||null===e)return e;var n=e[eS];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Tc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Tc(t)?t:String(t)}var mS={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,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 r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?Ww(r).call(r,1):r);return oE?Bm(i).call(i,oE(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,i,o,a){var s=n?n+e:e;if(!this._events[s])return!1;var l,u,c=this._events[s],h=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),h){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,r),!0;case 4:return c.fn.call(c.context,t,r,i),!0;case 5:return c.fn.call(c.context,t,r,i,o),!0;case 6:return c.fn.call(c.context,t,r,i,o,a),!0}for(u=1,l=new Array(h-1);u<h;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var f,d=c.length;for(u=0;u<d;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),h){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,r);break;case 4:c[u].fn.call(c[u].context,t,r,i);break;default:if(!l)for(f=1,l=new Array(h-1);f<h;f++)l[f-1]=arguments[f];c[u].fn.apply(c[u].context,l)}}return!0},s.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,i){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||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var l=0,u=[],c=s.length;l<c;l++)(s[l].fn!==t||i&&!s[l].once||r&&s[l].context!==r)&&u.push(s[l]);u.length?this._events[o]=1===u.length?u[0]:u:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,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}(mS);var _S=mS.exports,bS=o(_S),wS=Un,kS=$r,ES=J,SS=RangeError,TS=function(e){var t=kS(ES(this)),n="",r=wS(e);if(r<0||r==1/0)throw SS("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n},CS=_,xS=Hn,PS=$r,AS=J,IS=CS(TS),RS=CS("".slice),OS=Math.ceil,MS=function(e){return function(t,n,r){var i,o,a=PS(AS(t)),s=xS(n),l=a.length,u=void 0===r?" ":PS(r);return s<=l||""==u?a:((o=IS(u,OS((i=s-l)/u.length))).length>i&&(o=RS(o,0,i)),e?a+o:o+a)}},DS={start:MS(!1),end:MS(!0)},LS=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(he),FS=DS.start;On({target:"String",proto:!0,forced:LS},{padStart:function(e){return FS(this,e,arguments.length>1?arguments[1]:void 0)}});var NS=Gc("String").padStart,US=ce,BS=NS,VS=String.prototype,HS=o((function(e){var t=e.padStart;return"string"==typeof e||e===VS||US(VS,e)&&t===VS.padStart?BS:t})),jS=s,zS=l,WS=$r,KS=wk.trim,GS=dk,qS=_("".charAt),YS=jS.parseFloat,XS=jS.Symbol,$S=XS&&XS.iterator,JS=1/YS(GS+"-0")!=-1/0||$S&&!zS((function(){YS(Object($S))}))?function(e){var t=KS(WS(e)),n=YS(t);return 0===n&&"-"==qS(t,0)?-0:n}:YS;On({global:!0,forced:parseFloat!=JS},{parseFloat:JS});var QS=o(ie.parseFloat),ZS=_l.PROPER,eT=l,tT=dk,nT=wk.trim;On({target:"String",proto:!0,forced:function(e){return eT((function(){return!!tT[e]()||"​…᠎"!=="​…᠎"[e]()||ZS&&tT[e].name!==e}))}("trim")},{trim:function(){return nT(this)}});var rT=Gc("String").trim,iT=ce,oT=rT,aT=String.prototype,sT=o((function(e){var t=e.trim;return"string"==typeof e||e===aT||iT(aT,e)&&t===aT.trim?oT:t})),lT=Qi,uT=Math.floor,cT=function(e,t){var n=e.length,r=uT(n/2);return n<8?hT(e,t):fT(e,cT(lT(e,0,r),t),cT(lT(e,r),t),t)},hT=function(e,t){for(var n,r,i=e.length,o=1;o<i;){for(r=o,n=e[o];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==o++&&(e[r]=n)}return e},fT=function(e,t,n,r){for(var i=t.length,o=n.length,a=0,s=0;a<i||s<o;)e[a+s]=a<i&&s<o?r(t[a],n[s])<=0?t[a++]:n[s++]:a<i?t[a++]:n[s++];return e},dT=cT,pT=he.match(/firefox\/(\d+)/i),vT=!!pT&&+pT[1],gT=/MSIE|Trident/.test(he),yT=he.match(/AppleWebKit\/(\d+)\./),mT=!!yT&&+yT[1],_T=On,bT=_,wT=De,kT=Qe,ET=zn,ST=qw,TT=$r,CT=l,xT=dT,PT=jc,AT=vT,IT=gT,RT=me,OT=mT,MT=[],DT=bT(MT.sort),LT=bT(MT.push),FT=CT((function(){MT.sort(void 0)})),NT=CT((function(){MT.sort(null)})),UT=PT("sort"),BT=!CT((function(){if(RT)return RT<70;if(!(AT&&AT>3)){if(IT)return!0;if(OT)return OT<603;var e,t,n,r,i="";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(r=0;r<47;r++)MT.push({k:t+r,v:n})}for(MT.sort((function(e,t){return t.v-e.v})),r=0;r<MT.length;r++)t=MT[r].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));_T({target:"Array",proto:!0,forced:FT||!NT||!UT||!BT},{sort:function(e){void 0!==e&&wT(e);var t=kT(this);if(BT)return void 0===e?DT(t):DT(t,e);var n,r,i=[],o=ET(t);for(r=0;r<o;r++)r in t&&LT(i,t[r]);for(xT(i,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:TT(t)>TT(n)?1:-1}}(e)),n=ET(i),r=0;r<n;)t[r]=i[r++];for(;r<o;)ST(t,r++);return t}});var VT,HT=Gc("Array").sort,jT=ce,zT=HT,WT=Array.prototype,KT=o((function(e){var t=e.sort;return e===WT||jT(WT,e)&&t===WT.sort?zT:t})),GT="undefined"!=typeof window&&window.location&&jw(VT=window.location.href).call(VT,"xgplayerdebugger=1")>-1,qT="color: #525252; background-color: #90ee90;",YT="color: #525252; background-color: red;",XT="color: #525252; background-color: yellow; ",$T="%c[xgplayer]",JT={config:{debug:GT?3:0},logInfo:function(e){for(var t,n,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];this.config.debug>=3&&(n=console).log.apply(n,Bm(t=[$T,qT,e]).call(t,i))},logWarn:function(e){for(var t,n,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];this.config.debug>=1&&(n=console).warn.apply(n,Bm(t=[$T,XT,e]).call(t,i))},logError:function(e){var t,n;if(!(this.config.debug<1)){for(var r=this.config.debug>=2?"trace":"error",i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];(n=console)[r].apply(n,Bm(t=[$T,YT,e]).call(t,o))}}};var QT=function(){function e(t){iS(this,e),this.bufferedList=t}return aS(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}(),ZT={};function eC(e){var t=rS(e);return null!==e&&("object"===t||"function"===t)}function tC(e,t,n){var r,i,o,a,s,l,u=0,c=!1,h=!1,f=!0,d=!t&&0!==t&&"function"==typeof window.requestAnimationFrame;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=r,o=i;return r=i=void 0,u=t,a=e.apply(o,n)}function v(e,t){return d?(window.cancelAnimationFrame(s),window.requestAnimationFrame(e)):setTimeout(e,t)}function g(e){var n=e-l;return void 0===l||n>=t||n<0||h&&e-u>=o}function y(){var e=Date.now();if(g(e))return m(e);s=v(y,function(e){var n=e-u,r=t-(e-l);return h?Math.min(r,o-n):r}(e))}function m(e){return s=void 0,f&&r?p(e):(r=i=void 0,a)}function _(){for(var e=Date.now(),n=g(e),o=arguments.length,f=new Array(o),d=0;d<o;d++)f[d]=arguments[d];if(r=f,i=this,l=e,n){if(void 0===s)return function(e){return u=e,s=v(y,t),c?p(e):a}(l);if(h)return s=v(y,t),p(l)}return void 0===s&&(s=v(y,t)),a}return t=+t||0,eC(n)&&(c=!!n.leading,o=(h="maxWait"in n)?Math.max(+n.maxWait||0,t):o,f="trailing"in n?!!n.trailing:f),_.cancel=function(){void 0!==s&&function(e){if(d)return window.cancelAnimationFrame(e);clearTimeout(e)}(s),u=0,r=l=i=s=void 0},_.flush=function(){return void 0===s?a:m(Date.now())},_.pending=function(){return void 0!==s},_}function nC(){var e=(document.documentElement.getAttribute("lang")||navigator.language||"zh-cn").toLocaleLowerCase();return"zh-cn"===e&&(e="zh"),e}ZT.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]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=document.createElement(e);return i.className=r,i.innerHTML=t,zw(n).forEach((function(t){var r=t,o=n[t];"video"===e||"audio"===e||"live-video"===e?o&&i.setAttribute(r,o):i.setAttribute(r,o)})),i},ZT.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 r=document.createElement("div");r.innerHTML=e;var i=r.children;return r=null,i.length>0?(i=i[0],n&&ZT.addClass(i,n),t&&zw(t).forEach((function(e){i.setAttribute(e,t[e])})),i):null}catch(o){return JT.logError("util.createDomFromHtml",o),null}},ZT.hasClass=function(e,t){if(!e||!t)return!1;try{return Array.prototype.some.call(e.classList,(function(e){return e===t}))}catch(rj){var n=e.className&&"object"===rS(e.className)?e.getAttribute("class"):e.className;return n&&!!n.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}},ZT.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(rj){ZT.hasClass(e,t)||(e.className&&"object"===rS(e.className)?e.setAttribute("class",e.getAttribute("class")+" "+t):e.className+=" "+t)}},ZT.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(rj){ZT.hasClass(e,t)&&t.split(/\s+/g).forEach((function(t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className&&"object"===rS(e.className)?e.setAttribute("class",e.getAttribute("class").replace(n," ")):e.className=e.className.replace(n," ")}))}},ZT.toggleClass=function(e,t){e&&t.split(/\s+/g).forEach((function(t){ZT.hasClass(e,t)?ZT.removeClass(e,t):ZT.addClass(e,t)}))},ZT.classNames=function(){for(var e=arguments,t=[],n=function(n){if("String"===ZT.typeOf(e[n]))t.push(e[n]);else if("Object"===ZT.typeOf(e[n])){var r;Vw(r=zw(e[n])).call(r,(function(r){e[n][r]&&t.push(r)}))}},r=0;r<arguments.length;r++)n(r);return t.join(" ")},ZT.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(rj){JT.logError("util.findDom",rj),0===jw(n).call(n,"#")&&(e=t.getElementById(Ww(n).call(n,1)))}return e},ZT.getCss=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,!1)[t]},ZT.padStart=function(e,t,n){for(var r=String(n),i=t>>0,o=Math.ceil(i/r.length),a=[],s=String(e);o--;)a.push(r);return a.join("").substring(0,i-s.length)+s},ZT.format=function(e){if(window.isNaN(e))return"";e=Math.round(e);var t=HS(ZT).call(ZT,Math.floor(e/3600),2,0),n=HS(ZT).call(ZT,Math.floor((e-3600*t)/60),2,0),r=HS(ZT).call(ZT,Math.floor(e-3600*t-60*n),2,0);return("00"===t?[n,r]:[t,n,r]).join(":")},ZT.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},ZT.typeOf=function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},ZT.deepCopy=function(e,t){if("Object"===ZT.typeOf(t)&&"Object"===ZT.typeOf(e))return zw(t).forEach((function(n){if("Object"!==ZT.typeOf(t[n])||t[n]instanceof Node)if("Array"===ZT.typeOf(t[n])){var r;e[n]="Array"===ZT.typeOf(e[n])?Bm(r=e[n]).call(r,t[n]):t[n]}else e[n]=t[n];else void 0===e[n]||void 0===e[n]?e[n]=t[n]:ZT.deepCopy(e[n],t[n])})),e},ZT.deepMerge=function(e,t){var n;return Vw(n=zw(t)).call(n,(function(n){var r;"Array"===ZT.typeOf(t[n])&&"Array"===ZT.typeOf(e[n])?"Array"===ZT.typeOf(e[n])&&(r=e[n]).push.apply(r,vS(t[n])):ZT.typeOf(e[n])!==ZT.typeOf(t[n])||null===e[n]||"Object"!==ZT.typeOf(e[n])||t[n]instanceof window.Node?null!==t[n]&&(e[n]=t[n]):ZT.deepMerge(e[n],t[n])})),e},ZT.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},ZT.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""},ZT.setInterval=function(e,t,n,r){e._interval[t]||(e._interval[t]=window.setInterval(n.bind(e),r))},ZT.clearInterval=function(e,t){clearInterval(e._interval[t]),e._interval[t]=null},ZT.setTimeout=function(e,t,n){e._timers||(e._timers=[]);var r=setTimeout((function(){t(),ZT.clearTimeout(e,r)}),n);return e._timers.push(r),r},ZT.clearTimeout=function(e,t){var n=e._timers;if("Array"===ZT.typeOf(n)){for(var r=0;r<n.length;r++)if(n[r]===t){hk(n).call(n,r,1),clearTimeout(t);break}}else clearTimeout(t)},ZT.clearAllTimers=function(e){var t=e._timers;"Array"===ZT.typeOf(t)&&(Vw(t).call(t,(function(e){clearTimeout(e)})),e._timerIds=[])},ZT.createImgBtn=function(e,t,n,r){var i,o,a,s,l,u,c,h,f,d,p,v=ZT.createDom("xg-".concat(e),"",{},"xgplayer-".concat(e,"-img"));(v.style.backgroundImage='url("'.concat(t,'")'),n&&r)&&(["px","rem","em","pt","dp","vw","vh","vm","%"].every((function(e){var t,i;return!(jw(n).call(n,e)>-1&&jw(r).call(r,e)>-1)||(u=QS(sT(t=Ww(n).call(n,0,jw(n).call(n,e))).call(t)),c=QS(sT(i=Ww(r).call(r,0,jw(r).call(r,e))).call(i)),h=e,!1)})),v.style.width=Bm(i="".concat(u)).call(i,h),v.style.height=Bm(o="".concat(c)).call(o,h),v.style.backgroundSize=Bm(a=Bm(s=Bm(l="".concat(u)).call(l,h," ")).call(s,c)).call(a,h),v.style.margin="start"===e?Bm(f=Bm(d=Bm(p="-".concat(c/2)).call(p,h," auto auto -")).call(d,u/2)).call(f,h):"auto 5px auto 5px");return v},ZT.Hex2RGBA=function(e,t){var n,r=[];if(/^\#[0-9A-F]{3}$/i.test(e)){var i="#";e.replace(/[0-9A-F]/gi,(function(e){i+=e+e})),e=i}return/^#[0-9A-F]{6}$/i.test(e)?(e.replace(/[0-9A-F]{2}/gi,(function(e){r.push(Dk(e,16))})),Bm(n="rgba(".concat(r.join(","),", ")).call(n,t,")")):"rgba(255, 255, 255, 0.1)"},ZT.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},ZT.checkIsFunction=function(e){return e&&"function"==typeof e},ZT.checkIsObject=function(e){return null!==e&&"object"===rS(e)},ZT.hide=function(e){e.style.display="none"},ZT.show=function(e,t){e.style.display=t||"block"},ZT.isUndefined=function(e){if(null==e)return!0},ZT.isNotNull=function(e){return!(null==e)},ZT.setStyleFromCsstext=function(e,t){if(t)if("String"===ZT.typeOf(t)){var n=t.replace(/\s+/g,"").split(";");Vw(n).call(n,(function(t){if(t){var n=t.split(":");n.length>1&&(e.style[n[0]]=n[1])}}))}else{var r;Vw(r=zw(t)).call(r,(function(n){e.style[n]=t[n]}))}},ZT.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"],r=e.style.cssText;if(!r)return{};var i=r.replace(/\s+/g,"").split(";"),o={},a={};return Vw(i).call(i,(function(e){if(e){var t=e.split(":");t.length>1&&(!function(e,t){for(var n=0,r=t.length;n<r;n++)if(jw(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",""),Vw(t=zw(a)).call(t,(function(t){e.style[t]=a[t]})),o},ZT.getStyleFromCsstext=function(e){var t=e.style.cssText;if(!t)return{};var n=t.replace(/\s+/g,"").split(";"),r={};return Vw(n).call(n,(function(e){if(e){var t=e.split(":");t.length>1&&(r[t[0]]=t[1])}})),r},ZT.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 r=new window.Image;r.onload=function(e){r=null,t&&t(e)},r.onerror=function(e){r=null,n&&n(e)},r.src=e}},ZT.stopPropagation=function(e){e&&e.stopPropagation()},ZT.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},ZT.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},ZT.checkTouchSupport=function(){return"ontouchstart"in window},ZT.getBuffered2=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=[],r=0;r<e.length;r++)n.push({start:e.start(r)<.5?0:e.start(r),end:e.end(r)});KT(n).call(n,(function(e,t){var n=e.start-t.start;return n||t.end-e.end}));var i=[];if(t)for(var o=0;o<n.length;o++){var a=i.length;if(a){var s=i[a-1].end;n[o].start-s<t?n[o].end>s&&(i[a-1].end=n[o].end):i.push(n[o])}else i.push(n[o])}else i=n;return new QT(i)},ZT.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}},ZT.requestAnimationFrame=function(e){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(t)return t(e)},ZT.getHostFromUrl=function(e){if("String"!==ZT.typeOf(e))return"";var t=e.split("/"),n="";return t.length>3&&t[2]&&(n=t[2]),n},ZT.cancelAnimationFrame=function(e){var t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;t&&t(e)},ZT.isMSE=function(e){return e.media&&(e=e.media),!!(e&&e instanceof HTMLMediaElement)&&(/^blob/.test(e.currentSrc)||/^blob/.test(e.src))},ZT.isBlob=function(e){return"string"==typeof e&&/^blob/.test(e)},ZT.generateSessionId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(new Date).getTime();try{e=Dk(e)}catch(rj){e=0}return t+=e,window.performance&&"function"==typeof window.performance.now&&(t+=Dk(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)}))},ZT.createEvent=function(e){var t;return"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},ZT.adjustTimeByDuration=function(e,t,n){return t&&e&&(e>t||n&&e<t)?t:e},ZT.createPositionBar=function(e,t){var n=ZT.createDom("xg-bar","",{"data-index":-1},e);return t.appendChild(n),n},ZT.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]:"",r={scale:"".concat(t.scale||1),translate:Bm(e="".concat(t.x||0,"%, ")).call(e,t.y||0,"%"),rotate:"".concat(t.rotate||0,"deg")};return zw(r).forEach((function(e){var t,i=new RegExp("".concat(e,"\\([^\\(]+\\)"),"g"),o=Bm(t="".concat(e,"(")).call(t,r[e],")");i.test(n)?(i.lastIndex=-1,n=n.replace(i,o)):n+="".concat(o," ")})),n},ZT.convertDeg=function(e){return Math.abs(e)<=1?360*e:e%360},ZT.getIndexByTime=function(e,t){var n=t.length,r=-1;if(n<1)return r;if(e<=t[0].end||n<2)r=0;else if(e>t[n-1].end)r=n-1;else for(var i=1;i<n;i++)if(e>t[i-1].end&&e<=t[i].end){r=i;break}return r},ZT.getOffsetCurrentTime=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=-1;if((r=n>=0&&n<t.length?n:ZT.getIndexByTime(e,t))<0)return-1;var i=t.length,o=t[r],a=o.start,s=o.end,l=o.cTime,u=o.offset;return e<a?l:e>=a&&e<=s?e-u:e>s&&r>=i-1?s:-1},ZT.getCurrentTimeByOffset=function(e,t){var n=-1;if(!t||t.length<0)return e;for(var r=0;r<t.length;r++)if(e<=t[r].duration){n=r;break}if(-1!==n){var i=t[n].start;return n-1<0?i+e:i+(e-t[n-1].duration)}return e};var rC=/(Android)\s([\d.]+)/,iC=/(Version)\/([\d.]+)/,oC=["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"],aC={get device(){return aC.os.isPc?"pc":"mobile"},get browser(){var e,t;if("undefined"==typeof navigator)return"";var n=navigator.userAgent.toLowerCase(),r={ie:/rv:([\d.]+)\) like gecko/,firefox:/firefox\/([\d.]+)/,chrome:/chrome\/([\d.]+)/,opera:/opera.([\d.]+)/,safari:/version\/([\d.]+).*safari/};return Bm(e=[]).call(e,zk(t=zw(r)).call(t,(function(e){return r[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,r=/(?:Android)/.test(e),i=/(?:Firefox)/.test(e),o=/(?:iPad|PlayBook)/.test(e)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,a=o||r&&!/(?:Mobile)/.test(e)||i&&/(?:Tablet)/.test(e),s=/(?:iPhone)/.test(e)&&!a;return{isTablet:a,isPhone:s,isIpad:o,isIos:s||o,isAndroid:r,isPc:!(s||r||n||a),isSymbian:n,isWindowsPhone:t,isFireFox:i}},get osVersion(){if("undefined"==typeof navigator)return 0;var e=navigator.userAgent,t="",n=(t=/(?:iPhone)|(?:iPad|PlayBook)/.test(e)?iC:rC)?t.exec(e):[];if(n&&n.length>=3){var r=n[2].split(".");return r.length>0?Dk(r[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&&Vw(oC).call(oC,(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(Qz){return this._logger.error(e,Qz),!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 Hw.resolve(t);if(navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo)return navigator.mediaCapabilities.decodingInfo(e);var n=e.video||{},r=e.audio||{};try{var i=MediaSource.isTypeSupported(n.contentType),o=MediaSource.isTypeSupported(r.contentType);return Hw.resolve({supported:i&&o,smooth:!1,powerEfficient:!1})}catch(rj){return Hw.resolve(t)}}},sC="3.0.21-rc.21",lC={1:"media",2:"media",3:"media",4:"media",5:"media",6:"media"},uC={1:5101,2:5102,3:5103,4:5104,5:5105,6:5106},cC=aS((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{errorType:"",errorCode:0,errorMessage:"",originError:"",ext:{},mediaError:null};iS(this,e);var r=t&&t.i18n?t.i18n.ERROR_TYPES:null;if(t.media){var i,o=n.mediaError?n.mediaError:t.media.error||{},a=t.duration,s=t.currentTime,l=t.ended,u=t.src,c=t.currentSrc,h=t.media,f=h.readyState,d=h.networkState,p=n.errorCode||o.code;uC[p]&&(p=uC[p]);var v={playerVersion:sC,currentTime:s,duration:a,ended:l,readyState:f,networkState:d,src:u||c,errorType:n.errorType,errorCode:p,message:n.errorMessage||o.message,mediaError:o,originError:n.originError?n.originError.stack:"",host:ZT.getHostFromUrl(u||c)};return n.ext&&Vw(i=zw(n.ext)).call(i,(function(e){v[e]=n.ext[e]})),v}if(arguments.length>1){for(var g={playerVersion:sC,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=r?(r[arguments[0]]||{}).msg:"",g}})),hC="play",fC="ended",dC="pause",pC="error",vC="seeked",gC="timeupdate",yC="waiting",mC="canplay",_C="durationchange",bC="volumechange",wC="loadeddata",kC="emptied",EC="focus",SC="blur",TC="ready",CC="urlNull",xC="autoplay_started",PC="autoplay_was_prevented",AC="complete",IC="replay",RC="destroy",OC="urlchange",MC="download_speed_change",DC="leaveplayer",LC="enterplayer",FC="loading",NC="fullscreen_change",UC="cssFullscreen_change",BC="mini_state_change",VC="definition_change",HC="before_definition_change",jC="after_definition_change",zC="retry",WC="video_resize",KC="pip_change",GC="playnext",qC="shortcut",YC="user_action",XC="reset",$C="source_error",JC="source_success",QC=["play","playing","ended","pause","error","seeking","seeked","timeupdate","waiting","canplay","canplaythrough","durationchange","volumechange","loadeddata","loadedmetadata","ratechange","progress","loadstart","emptied","stalled","suspend","abort","lowdecode"],ZC=Object.freeze({__proto__:null,ABORT:"abort",AFTER_DEFINITION_CHANGE:jC,AUTOPLAY_PREVENTED:PC,AUTOPLAY_STARTED:xC,BEFORE_DEFINITION_CHANGE:HC,BUFFER_CHANGE:"bufferedChange",CANPLAY:mC,CANPLAY_THROUGH:"canplaythrough",COMPLETE:AC,CSS_FULLSCREEN_CHANGE:UC,DEFINITION_CHANGE:VC,DESTROY:RC,DOWNLOAD_SPEED_CHANGE:MC,DURATION_CHANGE:_C,EMPTIED:kC,ENDED:fC,ENTER_PLAYER:LC,ERROR:pC,FPS_STUCK:"fps_stuck",FULLSCREEN_CHANGE:NC,LEAVE_PLAYER:DC,LOADED_DATA:wC,LOADED_METADATA:"loadedmetadata",LOADING:FC,LOAD_START:"loadstart",MINI_STATE_CHANGE:BC,PAUSE:dC,PIP_CHANGE:KC,PLAY:hC,PLAYER_BLUR:SC,PLAYER_FOCUS:EC,PLAYING:"playing",PLAYNEXT:GC,PROGRESS:"progress",RATE_CHANGE:"ratechange",READY:TC,REPLAY:IC,RESET:XC,RETRY:zC,ROTATE:"rotate",SCREEN_SHOT:"screenShot",SEEKED:vC,SEEKING:"seeking",SEI_PARSED:"SEI_PARSED",SHORTCUT:qC,SOURCE_ERROR:$C,SOURCE_SUCCESS:JC,STALLED:"stalled",STATS_EVENTS:{STATS_INFO:"stats_info",STATS_DOWNLOAD:"stats_download",STATS_RESET:"stats_reset"},SUSPEND:"suspend",SWITCH_SUBTITLE:"switch_subtitle",TIME_UPDATE:gC,URL_CHANGE:OC,URL_NULL:CC,USER_ACTION:YC,VIDEO_EVENTS:QC,VIDEO_RESIZE:WC,VOLUME_CHANGE:bC,WAITING:yC,XGLOG:"xglog"});function ex(e,t){this&&this.emit&&("error"===e?this.errorHandler(e,t.error):this.emit(e,t))}var tx=function(e){lS(n,e);var t=dS(n);function n(e){var r;iS(this,n),(r=t.call(this,e))._hasStart=!1,r._currentTime=0,r._duration=0,r._internalOp={},r._lastMuted=!1,r.vtype="MP4",r._rate=-1,r.mediaConfig=iE({},{controls:!1,autoplay:e.autoplay,playsinline:e.playsinline,"x5-playsinline":e.playsinline,"webkit-playsinline":e.playsinline,"x5-video-player-fullscreen":e["x5-video-player-fullscreen"]||e.x5VideoPlayerFullscreen,"x5-video-orientation":e["x5-video-orientation"]||e.x5VideoOrientation,airplay:e.airplay,"webkit-airplay":e.airplay,tabindex:0|e.tabindex,mediaType:e.mediaType||"video","data-index":-1},e.videoConfig,e.videoAttributes);var i=e["x5-video-player-type"]||e.x5VideoPlayerType;return aC.isWeixin&&aC.os.isAndroid&&i&&(r.mediaConfig["x5-video-player-type"]=i,delete r.mediaConfig.playsinline,delete r.mediaConfig["webkit-playsinline"],delete r.mediaConfig["x5-playsinline"]),e.loop&&(r.mediaConfig.loop="loop"),e.autoplayMuted&&!Object.prototype.hasOwnProperty.call(r.mediaConfig,"muted")&&(r.mediaConfig.muted=!0),r.media=e.mediaEl instanceof HTMLMediaElement?e.mediaEl:"function"==typeof e.mediaEl?e.mediaEl(r.mediaConfig):ZT.createDom(r.mediaConfig.mediaType,"",r.mediaConfig,""),e.defaultPlaybackRate&&(r.media.defaultPlaybackRate=r.media.playbackRate=e.defaultPlaybackRate),"Number"===ZT.typeOf(e.volume)&&(r.volume=e.volume),e.autoplayMuted&&(r.media.muted=!0,r._lastMuted=!0),e.autoplay&&(r.media.autoplay=!0),e.playsinline&&(r.media.playsinline=!0),r._interval={},r.mediaEventMiddleware={},r.attachVideoEvents(),r}return aS(n,[{key:"setEventsMiddleware",value:function(e){var t,n=this;Vw(t=zw(e)).call(t,(function(t){n.mediaEventMiddleware[t]=e[t]}))}},{key:"removeEventsMiddleware",value:function(e){var t,n=this;Vw(t=zw(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=Vw(QC).call(QC,(function(t){var n,r=Bm(n="on".concat(t.charAt(0).toUpperCase())).call(n,Ww(t).call(t,1));return"function"==typeof e[r]&&e.on(t,e[r]),sS({},t,function(e,t){return function(n,r){var i={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:ZT.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&&(i.isMutedChange=t._lastMuted!==t.muted,t._lastMuted=t.muted),"error"===e&&(i.error=r||t.video.error),t.mediaEventMiddleware[e]){var a=ex.bind(t,e,i);try{t.mediaEventMiddleware[e].call(t,i,a)}catch(s){throw ex.call(t,e,i),s}}else ex.call(t,e,i)}}(t,e))}))),this._evHandlers.forEach((function(e){var n=zw(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=zw(e)[0];t.removeEventListener(n,e[n],!1)})),this._evHandlers.forEach((function(t){var n,r=zw(t)[0],i=Bm(n="on".concat(r.charAt(0).toUpperCase())).call(n,Ww(r).call(r,1));"function"==typeof e[i]&&e.off(r,e[i])})),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(ZT.createDom("source","",{src:"".concat(e.src),type:"".concat(e.type||""),"data-index":t+1}))}));var r=e.children;if(r){this._videoSourceCount=r.length,this._videoSourceIndex=r.length,this._vLoadeddata=function(e){n.emit(JC,{src:e.target.currentSrc,host:ZT.getHostFromUrl(e.target.currentSrc)})};for(var i=null,o=0;o<this._evHandlers.length;o++)if("error"===zw(this._evHandlers[o])[0]){i=this._evHandlers[o];break}!this._sourceError&&(this._sourceError=function(e){var t=Dk(e.target.getAttribute("data-index"),10);if(n._videoSourceIndex--,0===n._videoSourceIndex||t>=n._videoSourceCount){var r={code:4,message:"sources_load_error"};i?i.error(e,r):n.errorHandler("error",r)}var o=lC[4];n.emit($C,new cC(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<r.length;a++)r[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,r=n.code?lC[n.code]:"other";n.message;this.media.currentSrc||this.media.srcObject||(n={code:6,message:"empty_src"}),this.emit(e,new cC(this,{errorType:r,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 r=0,i=e.length;r<i&&(t[0]=e.start(r),t[1]=e.end(r),!(t[0]<=n&&n<=t[1]));r++);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?ZT.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(OC,e),this.emit(yC),this._currentTime=0,this._duration=0,ZT.isMSE(this.media)?this.onWaiting():(this._detachSourceEvents(this.media),"Array"===ZT.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 r,i,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(i=pS(uS(n.prototype),"emit",this)).call.apply(i,Bm(r=[this,e,t]).call(r,a))}},{key:"on",value:function(e,t){for(var r,i,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(i=pS(uS(n.prototype),"on",this)).call.apply(i,Bm(r=[this,e,t]).call(r,a))}},{key:"once",value:function(e,t){for(var r,i,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(i=pS(uS(n.prototype),"once",this)).call.apply(i,Bm(r=[this,e,t]).call(r,a))}},{key:"off",value:function(e,t){for(var r,i,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(i=pS(uS(n.prototype),"off",this)).call.apply(i,Bm(r=[this,e,t]).call(r,a))}},{key:"offAll",value:function(){pS(uS(n.prototype),"removeAllListeners",this).call(this)}}]),n}(bS),nx=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"}};iS(this,e),this.indexedDB=window.indexedDB||window.webkitindexedDB,this.IDBKeyRange=window.IDBKeyRange||window.webkitIDBKeyRange,this.myDB=t}return aS(e,[{key:"openDB",value:function(e){var t=this,n=this,r=this.myDB.version||1,i=n.indexedDB.open(n.myDB.name,r);i.onerror=function(e){},i.onsuccess=function(r){t.myDB.db=r.target.result,e.call(n)},i.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,r=this.myDB.db.transaction(e,"readwrite").objectStore(e),i=0;i<t.length;i++)(n=r.add(t[i])).onerror=function(){},n.onsuccess=function(){}}},{key:"putData",value:function(e,t){for(var n,r=this.myDB.db.transaction(e,"readwrite").objectStore(e),i=0;i<t.length;i++)(n=r.put(t[i])).onerror=function(){},n.onsuccess=function(){}}},{key:"getDataByKey",value:function(e,t,n){var r=this,i=this.myDB.db.transaction(e,"readwrite").objectStore(e).get(t);i.onerror=function(){n.call(r,null)},i.onsuccess=function(e){var t=e.target.result;n.call(r,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}(),rx=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],ix=["requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen"],ox=["exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen"],ax="data-xgplayerid";function sx(e,t,n){for(var r,i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];var s,l=t.call.apply(t,Bm(r=[e]).call(r,o));n&&"function"==typeof n&&(l&&l.then?l.then((function(){for(var t,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];n.call.apply(n,Bm(t=[e]).call(t,i))})):n.call.apply(n,Bm(s=[e]).call(s,o)))}function lx(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 r,i=arguments,o=this;if(n.pre)try{var a,s;(s=n.pre).call.apply(s,Bm(a=[this]).call(a,Ww(Array.prototype).call(arguments)))}catch(rj){var l,u;throw rj.message=Bm(l=Bm(u="[pluginName: ".concat(this.pluginName,":")).call(u,e,":pre error] >> ")).call(l,rj.message),rj}if(this.__hooks&&this.__hooks[e])try{var c,h=gx(this,e,t);if(h)if(h.then)h.then((function(e){var r;!1!==e&&sx.apply(void 0,Bm(r=[o,t,n.next]).call(r,vS(i)))})).catch((function(e){throw e}));else sx.apply(void 0,Bm(c=[this,t,n.next]).call(c,Ww(Array.prototype).call(arguments)));else if(void 0===h){var f;sx.apply(void 0,Bm(f=[this,t,n.next]).call(f,Ww(Array.prototype).call(arguments)))}}catch(rj){var d,p;throw rj.message=Bm(d=Bm(p="[pluginName: ".concat(this.pluginName,":")).call(p,e,"] >> ")).call(d,rj.message),rj}else sx.apply(void 0,Bm(r=[this,t,n.next]).call(r,Ww(Array.prototype).call(arguments)))}.bind(this)}function ux(e,t){var n=this.__hooks;if(!n||!Array.isArray(n[e]))return-1;for(var r=n[e],i=0;i<r.length;i++)if(r[i]===t)return i;return-1}function cx(e,t){var n=this.__hooks;if(n)return n.hasOwnProperty(e)?(Array.isArray(n[e])||(n[e]=[]),-1===ux.call(this,e,t)&&n[e].push(t),!0):(console.warn("has no supported hook which name [".concat(e,"]")),!1)}function hx(e,t){var n=this.__hooks;if(n)if(Array.isArray(n[e])){var r=n[e],i=ux.call(this,e,t);-1!==i&&hk(r).call(r,i,1)}else n[e]&&(n[e]=null)}function fx(e){if(this.plugins&&this.plugins[e.toLowerCase()]){for(var t=this.plugins[e.toLowerCase()],n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.useHooks&&t.useHooks.apply(t,r)}}function dx(e){if(this.plugins&&this.plugins[e.toLowerCase()]){var t=this.plugins[e.toLowerCase()];if(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.removeHooks&&t.removeHooks.apply(t,r)}}}function px(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.__hooks={},t&&Vw(t).call(t,(function(t){e.__hooks[t]=null})),uE(e,"hooks",{get:function(){var t;return e.__hooks&&Vw(t=zw(e.__hooks)).call(t,(function(t){if(e.__hooks[t])return t}))}})}function vx(e){e.__hooks=null}function gx(e,t,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];if(e.__hooks&&Array.isArray(e.__hooks[t])){var a,s=e.__hooks[t],l=-1;return function e(t,n,r){for(var i,o,a=arguments.length,u=new Array(a>3?a-3:0),c=3;c<a;c++)u[c-3]=arguments[c];if(l++,0===s.length||l===s.length)return r.call.apply(r,Bm(o=[t,t]).call(o,u));var h,f=s[l],d=f.call.apply(f,Bm(i=[t,t]).call(i,u));return d&&d.then?d.then((function(i){var o;return!1===i?null:e.apply(void 0,Bm(o=[t,n,r]).call(o,u))})).catch((function(e){console.warn("[runHooks]".concat(n," reject"),e.message)})):!1!==d?e.apply(void 0,Bm(h=[t,n,r]).call(h,u)):void 0}.apply(void 0,Bm(a=[e,t,n]).call(a,i))}var u;return n.call.apply(n,Bm(u=[e,e]).call(u,i))}function yx(e,t){var n;JT.logError(Bm(n="[".concat(e,"] event or callback cant be undefined or null when call ")).call(n,t))}var mx=function(){function e(t){iS(this,e),ZT.checkIsFunction(this.beforeCreate)&&this.beforeCreate(t),px(this),this.__args=t,this.__events={},this.__onceEvents={},this.config=t.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(t)}return aS(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=ZT.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)})):yx(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(r){n.__onceEvents[r]=t,n.player.once(e,t)})):yx(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(r){delete n.__events[e],n.player.off(r,t)})):yx(this.pluginName,"plugin.off(event, callback)")}},{key:"offAll",value:function(){var e=this;["__events","__onceEvents"].forEach((function(t){zw(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 r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];(n=this.player).emit.apply(n,Bm(t=[e]).call(t,i))}}},{key:"emitUserAction",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.player){var r=nS(nS({},n),{},{pluginName:this.pluginName});this.player.emitUserAction(e,t,r)}}},{key:"hook",value:function(e,t){var n;return lx.call.apply(lx,Bm(n=[this]).call(n,Ww(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){for(var n,r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return cx.call.apply(cx,Bm(n=[this]).call(n,Ww(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){for(var n,r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return hx.call.apply(hx,Bm(n=[this]).call(n,Ww(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,r=this.pluginName;this.offAll(),ZT.clearAllTimers(this),ZT.checkIsFunction(this.destroy)&&this.destroy(),Vw(e=["player","playerConfig","pluginName","logger","__args","__hooks"]).call(e,(function(e){t[e]=null})),n.unRegisterPlugin(r),vx(this)}}],[{key:"defineGetterOrSetter",value:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&uE(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]&&uE(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 _x=Element.prototype;_x.matches=_x.matchesSelector||_x.mozMatchesSelector||_x.msMatchesSelector||_x.oMatchesSelector||_x.webkitMatchesSelector}var bx=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}};function wx(e,t,n,r,i){var o=kx.apply(this,arguments);return e.addEventListener(n,o,i),{destroy:function(){e.removeEventListener(n,o,i)}}}function kx(e,t,n,r){return function(n){n.delegateTarget=bx(n.target,t),n.delegateTarget&&r.call(e,n)}}var Ex=function(e,t,n,r,i){return"function"==typeof e.addEventListener?wx.apply(null,arguments):"function"==typeof n?wx.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Vw(Array.prototype).call(e,(function(e){return wx(e,t,n,r,i)})))},Sx=o(Ex),Tx={CONTROLS:"controls",ROOT:"root"},Cx={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"},xx="xg-icon-disable";function Px(e){return!!e&&(jw(e)&&/^(?:http|data:|\/)/.test(e))}function Ax(e,t){var n,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",s=null;if(e instanceof window.Element)return ZT.addClass(e,i),Vw(r=zw(o)).call(r,(function(t){e.setAttribute(t,o[t])})),e;if(Px(e)||Px(e.url))return o.src=Px(e)?e:e.url||"",s=ZT.createDom(e.tag||"img","",o,"xg-img ".concat(i));if("function"==typeof e)try{var l,u;return(s=e())instanceof window.Element?(ZT.addClass(s,i),Vw(l=zw(o)).call(l,(function(e){s.setAttribute(e,o[e])})),s):(JT.logWarn(Bm(u="warn>>icons.".concat(t," in config of plugin named [")).call(u,a,"] is a function mast return an Element Object")),null)}catch(rj){return JT.logError("Plugin named [".concat(a,"]:createIcon"),rj),null}return"string"==typeof e?ZT.createDomFromHtml(e,o,i):(JT.logWarn(Bm(n="warn>>icons.".concat(t," in config of plugin named [")).call(n,a,"] is invalid")),null)}function Ix(e,t){var n,r=t.config.icons||t.playerConfig.icons;Vw(n=zw(e)).call(n,(function(n){var i=e[n],o=i&&i.class?i.class:"",a=i&&i.attr?i.attr:{},s=null;r&&r[n]&&(o=function(e,t){var n;return"object"===rS(e)&&e.class&&"string"==typeof e.class?Bm(n="".concat(t," ")).call(n,e.class):t}(r[n],o),a=function(e,t){var n;return"object"===rS(e)&&e.attr&&"object"===rS(e.attr)&&Vw(n=zw(e.attr)).call(n,(function(n){t[n]=e.attr[n]})),t}(r[n],a),s=Ax(r[n],n,o,a,t.pluginName)),!s&&i&&(s=Ax(i.icon?i.icon:i,a,o,{},t.pluginName)),t.icons[n]=s}))}var Rx=function(e){lS(n,e);var t=dS(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return iS(this,n),(e=t.call(this,r)).__delegates=[],e}return aS(n,[{key:"__init",value:function(e){if(pS(uS(n.prototype),"__init",this).call(this,e),e.root){var t=e.root,r=null;this.icons={},this.root=null,this.parent=null,Ix(this.registerIcons()||{},this),this.langText={};var i,o,a,s=this.registerLanguageTexts()||{};o=this,Vw(a=zw(i=s)).call(a,(function(e){uE(o.langText,e,{get:function(){var t=o.lang,n=o.i18n;return n[e]?n[e]:i[e]&&i[e][t]||""}})}));var l="";try{l=this.render()}catch(rj){var u;throw JT.logError("Plugin:".concat(this.pluginName,":render"),rj),new Error(Bm(u="Plugin:".concat(this.pluginName,":render:")).call(u,rj.message))}if(l)(r=n.insert(l,t,e.index)).setAttribute("data-index",e.index);else{if(!e.tag)return;(r=ZT.createDom(e.tag,"",e.attr,e.name)).setAttribute("data-index",e.index),t.appendChild(r)}this.root=r,this.parent=t;var c=this.config.attr||{},h=this.config.style||{};this.setAttr(c),this.setStyle(h),this.config.index&&this.root.setAttribute("data-index",this.config.index),this.__registerChildren()}}},{key:"__registerChildren",value:function(){var e=this;if(this.root){this._children=[];var t,n=this.children();if(n&&"object"===rS(n))if(zw(n).length>0)Vw(t=zw(n)).call(t,(function(t){var r,i,o=t,a=n[o],s={root:e.root};"function"==typeof a?(r=e.config[o]||{},i=a):"object"===rS(a)&&"function"==typeof a.plugin&&(r=a.options?ZT.deepCopy(e.config[o]||{},a.options):e.config[o]||{},i=a.plugin),s.config=r,void 0!==r.index&&(s.index=r.index),r.root&&(s.root=r.root),e.registerPlugin(i,s,o)}))}}},{key:"updateLang",value:function(e){e||(e=this.lang);var t=this.root,n=this.i18n,r=this.langText;t&&function e(t,n){for(var r=0;r<t.children.length;r++)t.children[r].children.length>0?e(t.children[r],n):n(t.children[r])}(t,(function(t){var i=t.getAttribute&&t.getAttribute("lang-key");if(i){var o=n[i.toUpperCase()]||r[i];o&&(t.innerHTML="function"==typeof o?o(e):o)}}))}},{key:"lang",get:function(){return this.player.lang}},{key:"changeLangTextKey",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.i18n||{},r=this.langText;e.setAttribute&&e.setAttribute("lang-key",t);var i=n[t]||r[t]||"";i&&(e.innerHTML=i)}},{key:"plugins",value:function(){return this._children}},{key:"disable",value:function(){this.config.disable=!0,ZT.addClass(Ym(this).call(this,".xgplayer-icon"),xx)}},{key:"enable",value:function(){this.config.disable=!1,ZT.removeClass(Ym(this).call(this,".xgplayer-icon"),xx)}},{key:"children",value:function(){return{}}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";t.root=t.root||this.root;var i=pS(uS(n.prototype),"registerPlugin",this).call(this,e,t,r);return this._children.push(i),i}},{key:"registerIcons",value:function(){return{}}},{key:"registerLanguageTexts",value:function(){return{}}},{key:"find",value:function(e){if(this.root)return this.root.querySelector(e)}},{key:"bind",value:function(e,t,r){var i=this;if(arguments.length<3&&"function"==typeof t)Array.isArray(e)?e.forEach((function(e){i.bindEL(e,t)})):this.bindEL(e,t);else{var o,a=n.delegate.call(this,this.root,e,t,r);this.__delegates=Bm(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 r,i=Bm(r="".concat(e,"_")).call(r,t),o=0;o<this.__delegates.length;o++)if(this.__delegates[o].key===i){var a;this.__delegates[o].destroy(),hk(a=this.__delegates).call(a,o,1);break}}},{key:"setStyle",value:function(e,t){var n,r=this;if(this.root)return"String"===ZT.typeOf(e)?this.root.style[e]=t:void("Object"===ZT.typeOf(e)&&Vw(n=zw(e)).call(n,(function(t){r.root.style[t]=e[t]})))}},{key:"setAttr",value:function(e,t){var n,r=this;if(this.root)return"String"===ZT.typeOf(e)?this.root.setAttribute(e,t):void("Object"===ZT.typeOf(e)&&Vw(n=zw(e)).call(n,(function(t){r.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?Ym(this).call(this,e).appendChild(t):e.appendChild(t)}catch(n){return JT.logError("Plugin:appendChild",n),null}}},{key:"render",value:function(){return""}},{key:"destroy",value:function(){}},{key:"__destroy",value:function(){var e,t,r,i=this,o=this.player;(Vw(e=this.__delegates).call(e,(function(e){e.destroy()})),this.__delegates=[],this._children instanceof Array)&&(Vw(r=this._children).call(r,(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)),pS(uS(n.prototype),"__destroy",this).call(this),this.icons={},Vw(t=["root","parent"]).call(t,(function(e){i[e]=null}))}}],[{key:"insert",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t.children.length,i=Number(n),o=e instanceof window.Node;if(r){for(var a=0,s=null,l="";a<r;a++){s=t.children[a];var u=Number(s.getAttribute("data-index"));if(u>=i){l="beforebegin";break}u<i&&(l="afterend")}return o?"afterend"===l?t.appendChild(e):t.insertBefore(e,s):s.insertAdjacentHTML(l,e),"afterend"===l?t.children[t.children.length-1]:t.children[a]}return o?t.appendChild(e):t.insertAdjacentHTML("beforeend",e),t.children[t.children.length-1]}},{key:"defaultConfig",get:function(){return{}}},{key:"delegate",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=[];if(e instanceof window.Node&&"function"==typeof r)if(Array.isArray(n))n.forEach((function(n){var a,s=Sx(e,t,n,r,i);s.key=Bm(a="".concat(t,"_")).call(a,n),o.push(s)}));else{var a,s=Sx(e,t,n,r,i);s.key=Bm(a="".concat(t,"_")).call(a,n),o.push(s)}return o}},{key:"ROOT_TYPES",get:function(){return Tx}},{key:"POSITIONS",get:function(){return Cx}}]),n}(mx),Ox=function(){function e(){var t=this;if(iS(this,e),sS(this,"__trigger",(function(e){var n=(new Date).getTime();t.timeStamp=n;for(var r=0;r<e.length;r++)t.__runHandler(e[r].target)})),this.__handlers=[],this.timeStamp=0,this.observer=null,window.ResizeObserver)try{this.observer=new window.ResizeObserver(function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return eC(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),tC(e,t,{leading:r,trailing:i,maxWait:t})}(this.__trigger,100,{trailing:!0})),this.timeStamp=(new Date).getTime()}catch(rj){console.error(rj)}}return aS(e,[{key:"addObserver",value:function(e,t){if(this.observer){this.observer.observe(e);for(var n=e.getAttribute(ax),r=this.__handlers,i=-1,o=0;o<r.length;o++)r[o]&&e===r[o].target&&(i=o);i>-1?this.__handlers[i].handler=t:this.__handlers.push({target:e,handler:t,playerId:n})}}},{key:"unObserver",value:function(e){var t,n,r=-1;Vw(t=this.__handlers).call(t,(function(t,n){e===t.target&&(r=n)}));try{var i;null===(i=this.observer)||void 0===i||i.unobserve(e)}catch(rj){}r>-1&&hk(n=this.__handlers).call(n,r,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(Qz){console.error(Qz)}return!0}return!1}}]),e}(),Mx=null;var Dx={pluginGroup:{},init:function(e){var t,n,r=e._pluginInfoId;r||(r=(new Date).getTime(),e._pluginInfoId=r),!e.config.closeResizeObserver&&(t=e.root,n=function(){e.resize()},Mx||(Mx=new Ox),Mx.addObserver(t,n)),this.pluginGroup[r]={_originalOptions:e.config||{},_plugins:{}}},formatPluginInfo:function(e,t){var n=null,r=null;return e.plugin&&"function"==typeof e.plugin?(n=e.plugin,r=e.options):(n=e,r={}),t&&(r.config=t||{}),{PLUFGIN:n,options:r}},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=zw(t),r=null,i=0;i<n.length;i++)if(e.toLowerCase()===n[i].toLowerCase()){r=t[n[i]];break}return"Object"===ZT.typeOf(r)?{root:r.root,position:r.position}:{}},lazyRegister:function(e,t){var n=this,r=t.timeout||1500;return Hw.race([t.loader().then((function(t){var r;r=t&&t.__esModule?t.default:t,n.register(e,r,t.options)})),new Hw((function(e,t){setTimeout((function(){t(new Error("timeout"))}),r)}))])},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 r=e._pluginInfoId;if(r&&this.pluginGroup[r]){this.pluginGroup[r]._plugins||(this.pluginGroup[r]._plugins={});var i=this.pluginGroup[r]._plugins,o=this.pluginGroup[r]._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=zw(o),l=0;l<s.length;l++)if(a.toLowerCase()===s[l].toLowerCase()){var u=o[s[l]];"Object"===ZT.typeOf(u)?n.config=iE({},n.config,o[s[l]]):"Boolean"===ZT.typeOf(u)&&(n.config.disable=!u);break}t.defaultConfig&&zw(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{i[a.toLowerCase()]&&(this.unRegister(r,a.toLowerCase()),console.warn("the is one plugin with same pluginName [".concat(a,"] exist, destroy the old instance")));var c=new t(n);return i[a.toLowerCase()]=c,i[a.toLowerCase()].func=t,c&&"function"==typeof c.afterCreate&&c.afterCreate(),c}catch(h){throw console.error(h),h}}else console.warn("not supported plugin [".concat(a,"]"))}}},unRegister:function(e,t){e._pluginInfoId&&(e=e._pluginInfoId),t=t.toLowerCase();try{var n=this.pluginGroup[e]._plugins[t];n&&(n.pluginName&&n.__destroy(),delete this.pluginGroup[e]._plugins[t])}catch(rj){var r;console.error(Bm(r="[unRegister:".concat(t,"] cgid:[")).call(r,e,"] error"),rj)}},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 r=t.toLowerCase();return this.pluginGroup[n]._plugins[r]},beforeInit:function(e){var t=this;function n(e){return e&&e.then?e:new Hw((function(e){e()}))}return new Hw((function(r){if(t.pluginGroup)return(e._loadingPlugins&&e._loadingPlugins.length?Hw.all(e._loadingPlugins):Hw.resolve()).then((function(){var i,o=e._pluginInfoId;if(t.pluginGroup[o]){var a=t.pluginGroup[o]._plugins,s=[];zw(a).forEach((function(e){if(a[e]&&a[e].beforePlayerInit)try{var t=a[e].beforePlayerInit();s.push(n(t))}catch(rj){throw s.push(n(null)),rj}})),Hw.all(Bm(i=[]).call(i,s)).then((function(){r()})).catch((function(e){console.error(e),r()}))}else r()}))}))},afterInit:function(e){var t=e._pluginInfoId;if(t&&this.pluginGroup[t]){var n=this.pluginGroup[t]._plugins;zw(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 r=this.pluginGroup[n]._plugins;zw(r).forEach((function(t){if(r[t].updateLang)r[t].updateLang(e);else try{r[t].lang=e}catch(Qz){console.warn("".concat(t," setLang"))}}))}},reRender:function(e){var t=this,n=e._pluginInfoId;if(n&&this.pluginGroup[n]){var r=[],i=this.pluginGroup[n]._plugins;zw(i).forEach((function(e){"controls"!==e&&i[e]&&(r.push({plugin:i[e].func,options:i[e].__args}),t.unRegister(n,e))})),r.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||{};zw(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,r,i;n=e.root,null===(i=Mx)||void 0===i||i.unObserver(n,r);for(var o=this.pluginGroup[t]._plugins,a=0,s=zw(o);a<s.length;a++){var l=s[a];this.unRegister(t,l)}delete this.pluginGroup[t],delete e._pluginInfoId}}},Lx="xgplayer",Fx="xgplayer-is-enter",Nx="xgplayer-pause",Ux="xgplayer-playing",Bx="xgplayer-ended",Vx="xgplayer-isloading",Hx="xgplayer-is-error",jx="xgplayer-replay",zx="xgplayer-nostart",Wx="xgplayer-inactive",Kx="xgplayer-is-fullscreen",Gx="xgplayer-is-cssfullscreen",qx="xgplayer-rotate-fullscreen",Yx="xgplayer-rotate-parent",Xx="xgplayer-fullscreen-parent",$x="xgplayer-fullscreen-inner",Jx="no-controls",Qx="flex-controls",Zx="controls-autohide",eP="top-bar-autohide",tP="not-allow-autoplay",nP="seeking";function rP(){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:nC(),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 iP=function(e){lS(n,e);var t=dS(n);function n(){var e,r;iS(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return sS(hS(r=t.call.apply(t,Bm(e=[this]).call(e,o))),"onMouseEnter",(function(e){var t=hS(r),n=t.player;t.playerConfig.closeControlsBlur&&n.focus({autoHide:!1})})),sS(hS(r),"onMouseLeave",(function(e){hS(r).player.focus()})),r}return aS(n,[{key:"beforeCreate",value:function(e){e.config.mode||"mobile"!==aC.device||(e.config.mode="flex"),e.player.config.marginControls&&(e.config.autoHide=!1)}},{key:"afterCreate",value:function(){var e,t=this,n=this.config,r=n.disable,i=n.height,o=n.mode;if(!r){"flex"===o&&this.player.addClass(Qx);var a={height:"".concat(i,"px")};Vw(e=zw(a)).call(e,(function(e){t.root.style[e]=a[e]})),this.left=Ym(this).call(this,"xg-left-grid"),this.center=Ym(this).call(this,"xg-center-grid"),this.right=Ym(this).call(this,"xg-right-grid"),this.innerRoot=Ym(this).call(this,"xg-inner-controls"),this.on(BC,(function(e){e?ZT.addClass(t.root,"mini-controls"):ZT.removeClass(t.root,"mini-controls")}));var s=this.playerConfig.isMobileSimulateMode;"mobile"!==aC.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&&ZT.addClass(this.root,Zx)}},{key:"pauseAutoHide",value:function(){ZT.removeClass(this.root,Zx)}},{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]:{},r=arguments.length>2?arguments[2]:void 0;if(this.root){var i=e.defaultConfig||{};if(!t.root){switch(t.position?t.position:t.config&&t.config.position?t.config.position:i.position){case Cx.CONTROLS_LEFT:t.root=this.left;break;case Cx.CONTROLS_RIGHT:t.root=this.right;break;case Cx.CONTROLS_CENTER:t.root=this.center;break;case Cx.CONTROLS:t.root=this.root;break;default:t.root=this.left}return pS(uS(n.prototype),"registerPlugin",this).call(this,e,t,r)}}}},{key:"destroy",value:function(){"mobile"!==aC.device&&(this.unbind("mouseenter",this.onMouseEnter),this.unbind("mouseleave",this.onMouseLeave)),this.left=null,this.center=null,this.right=null,this.innerRoot=null}},{key:"render",value:function(){var e=this.config,t=e.mode,n=e.autoHide,r=e.initShow;if(!e.disable){var i=ZT.classNames({"xgplayer-controls":!0},{"flex-controls":"flex"===t},{"bottom-controls":"bottom"===t},sS({},Zx,n),{"xgplayer-controls-initshow":r||!n});return'<xg-controls class="'.concat(i,'" unselectable="on">\n <xg-inner-controls class="xg-inner-controls xg-pos">\n <xg-left-grid class="xg-left-grid">\n </xg-left-grid>\n <xg-center-grid class="xg-center-grid"></xg-center-grid>\n <xg-right-grid class="xg-right-grid">\n </xg-right-grid>\n </xg-inner-controls>\n </xg-controls>')}}}],[{key:"pluginName",get:function(){return"controls"}},{key:"defaultConfig",get:function(){return{disable:!1,autoHide:!0,mode:"",initShow:!1}}}]),n}(Rx),oP={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"}},aP={lang:{},langKeys:[],textKeys:[]};function sP(e,t){return zw(t).forEach((function(n){var r,i=ZT.typeOf(t[n]),o=ZT.typeOf(e[n]);"Array"===i?("Array"!==o&&(e[n]=[]),(r=e[n]).push.apply(r,vS(t[n]))):"Object"===i?("Object"!==o&&(e[n]={}),sP(e[n],t[n])):e[n]=t[n]})),e}function lP(){var e;Vw(e=zw(aP.lang.en)).call(e,(function(e){aP.textKeys[e]=e}))}function uP(e,t){var n=e.LANG;if(t||(t=aP),t.lang){var r=e.TEXT||{};"zh"===n&&(n="zh-cn"),t.lang[n]?sP(t.lang[n],r):(t.langKeys.push(n),t.lang[n]=r),lP()}}uP(oP);var cP={get textKeys(){return aP.textKeys},get langKeys(){return aP.langKeys},get lang(){var e,t={};return Vw(e=aP.langKeys).call(e,(function(e){t[e]=aP.lang[e]})),aP.lang["zh-cn"]&&(t.zh=aP.lang["zh-cn"]||{}),t},extend:function(e,t){var n=[];if(t||(t=aP),t.lang){var r;if("Array"!==ZT.typeOf(e))n=Vw(r=zw(e)).call(r,(function(t){return{LANG:"zh"===t?"zh-cn":t,TEXT:e[t]}}));else n=e;var i=t.lang;Vw(n).call(n,(function(e){"zh"===e.LANG&&(e.LANG="zh-cn"),i[e.LANG]?sP(i[e.LANG]||{},e.TEXT||{}):uP(e,t)})),lP()}},use:uP,init:function(e){var t,n={lang:{},langKeys:[],textKeys:{},pId:e};return sP(n.lang,aP.lang),(t=n.langKeys).push.apply(t,vS(aP.langKeys)),sP(n.textKeys,aP.textKeys),n}},hP=1,fP=2,dP=3,pP=4,vP=5,gP=6,yP=7,mP=["ERROR","INITIAL","READY","ATTACHING","ATTACHED","NOTALLOW","RUNNING","ENDED","DESTROYED"],_P={},bP=null,wP=function(e){lS(n,e);var t=dS(n);function n(){return iS(this,n),t.apply(this,arguments)}return aS(n,[{key:"add",value:function(e){e&&(_P[e.playerId]=e,1===zw(_P).length&&this.setActive(e.playerId,!0))}},{key:"remove",value:function(e){e&&(e.isUserActive,delete _P[e.playerId])}},{key:"_iterate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];for(var n in _P)if(Object.prototype.hasOwnProperty.call(_P,n)){var r=_P[n];if(t){if(e(r))break}else e(r)}}},{key:"forEach",value:function(e){this._iterate(e)}},{key:"find",value:function(e){var t=null;return this._iterate((function(n){var r=e(n);return r&&(t=n),r}),!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(_P[e])return t?this.forEach((function(t){e===t.playerId?(t.isUserActive=!0,t.isInstNext=!1):t.isUserActive=!1})):_P[e].isUserActive=t,e}},{key:"getActiveId",value:function(){for(var e=zw(_P),t=0;t<e.length;t++){var n=_P[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(_P[e])return t?this.forEach((function(t){e===t.playerId?(t.isUserActive=!1,t.isInstNext=!0):t.isInstNext=!1})):_P[e].isInstNext=t,e}}],[{key:"getInstance",value:function(){return bP||(bP=new n),bP}}]),n}(_S.EventEmitter);var kP=["play","pause","replay","retry"],EP=0,SP=0,TP=null,CP=function(e){lS(n,e);var t=dS(n);function n(e){var r;iS(this,n);var i,o=ZT.deepMerge(rP(),e);sS(hS(r=t.call(this,o)),"canPlayFunc",(function(){if(r.config){var e=r.config,t=e.autoplay,n=e.defaultPlaybackRate;JT.logInfo("player","canPlayFunc, startTime",r.__startTime),r._seekToStartTime(),r.playbackRate=n,(t||r._useAutoplay)&&r.mediaPlay(),r.off(mC,r.canPlayFunc),r.removeClass(Fx)}})),sS(hS(r),"onFullscreenChange",(function(e,t){var n=function(){ZT.setTimeout(hS(r),(function(){r.resize()}),100)},i=ZT.getFullScreenEl();r._fullActionFrom?r._fullActionFrom="":r.emit(YC,{eventType:"system",action:"switch_fullscreen",pluginName:"player",currentTime:r.currentTime,duration:r.duration,props:[{prop:"fullscreen",from:!0,to:!1}]});var o=function(e,t,n){if(e){var r=e.getAttribute(n);return!(!r||r!==t||"VIDEO"!==e.tagName&&"AUDIO"!==e.tagName)}}(i,r.playerId,ax);if(t||i&&(i===r._fullscreenEl||o))n(),!r.config.closeFocusVideoFocus&&r.media.focus(),r.fullscreen=!0,r.changeFullStyle(r.root,i,Kx),r.emit(NC,!0,r._fullScreenOffset),r.cssfullscreen&&r.exitCssFullscreen();else if(r.fullscreen){n();var a=hS(r),s=a._fullScreenOffset;if(a.config.needFullscreenScroll?(window.scrollTo(s.left,s.top),ZT.setTimeout(hS(r),(function(){r.fullscreen=!1,r._fullScreenOffset=null}),100)):(!r.config.closeFocusVideoFocus&&r.media.focus(),r.fullscreen=!1,r._fullScreenOffset=null),r.cssfullscreen)r.removeClass(Kx);else{var l=r._fullscreenEl;l||!r.root.contains(e.target)&&e.target!==r.root||(l=e.target),r.recoverFullStyle(r.root,l,Kx)}r._fullscreenEl=null,r.emit(NC,!1)}})),sS(hS(r),"_onWebkitbeginfullscreen",(function(e){r._fullscreenEl=r.media,r.onFullscreenChange(e,!0)})),sS(hS(r),"_onWebkitendfullscreen",(function(e){r.onFullscreenChange(e,!1)})),px(hS(r),kP),r.config=o,r._pluginInfoId=ZT.generateSessionId(),(i=hS(r)).logInfo=JT.logInfo.bind(i),i.logWarn=JT.logWarn.bind(i),i.logError=JT.logError.bind(i);var a=r.constructor.defaultPreset;if(r.config.presets.length){var s,l=jw(s=r.config.presets).call(s,"default");l>=0&&a&&(r.config.presets[l]=a)}else a&&r.config.presets.push(a);if(r.userTimer=null,r.waitTimer=null,r.handleSource=!0,r._state=hP,r.isAd=!1,r.isError=!1,r._hasStart=!1,r.isSeeking=!1,r.isCanplay=!1,r._useAutoplay=!1,r.__startTime=-1,r.rotateDeg=0,r.isActive=!1,r.fullscreen=!1,r.cssfullscreen=!1,r.isRotateFullscreen=!1,r._fullscreenEl=null,r.timeSegments=[],r._cssfullscreenEl=null,r.curDefinition=null,r._orgCss="",r._fullScreenOffset=null,r._videoHeight=0,r._videoWidth=0,r.videoPos={pi:1,scale:0,rotate:-1,x:0,y:0,h:-1,w:-1,vy:0,vx:0},r.sizeInfo={width:0,height:0,left:0,top:0},r._accPlayed={t:0,acc:0,loopAcc:0},r._offsetInfo={currentTime:-1,duration:0},r.innerContainer=null,r.controls=null,r.topBar=null,r.root=null,r.__i18n=cP.init(r._pluginInfoId),aC.os.isAndroid&&aC.osVersion>0&&aC.osVersion<6&&(r.config.autoplay=!1),r.database=new nx,r.isUserActive=!1,r._onceSeekCanplay=null,r._isPauseBeforeSeek=0,r.innerStates={isActiveLocked:!1},r.instManager=TP,!r._initDOM())return console.error(new Error("can't find the dom which id is ".concat(r.config.id," or this.config.el does not exist"))),fS(r);var u=r.config,c=u.definition,h=void 0===c?{}:c;if(!u.url&&h.list&&h.list.length>0){var f,d=Ym(f=h.list).call(f,(function(e){return e.definition&&e.definition===h.defaultDefinition}));d||(h.defaultDefinition=h.list[0].definition,d=h.list[0]),r.config.url=d.url,r.curDefinition=d}return r._bindEvents(),r._registerPresets(),r._registerPlugins(),Dx.onPluginsReady(hS(r)),r.getInitDefinition(),r.setState(fP),ZT.setTimeout(hS(r),(function(){r.emit(TC)}),0),r.onReady&&r.onReady(),(r.config.videoInit||r.config.autoplay)&&(!r.hasStart||r.state<pP)&&r.start(),r}return aS(n,[{key:"_initDOM",value:function(){var e,t,n,r,i=this;if(this.root=this.config.id?document.getElementById(this.config.id):null,!this.root){var o=this.config.el;if(!o||1!==o.nodeType)return this.emit(pC,new cC("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=zw(_P),n=0;n<t.length;n++){var r=_P[t[n]];if(r.root===e)return r}return null}(this.root);if(a&&(JT.logWarn("The is an Player instance already exists in this.root, destroy it and reinitialize"),a.destroy()),this.root.setAttribute(ax,this.playerId),this.media.setAttribute(ax,this.playerId),null===(r=TP)||void 0===r||r.add(this),Dx.init(this),this._initBaseDoms(),this.config.controls){var s=this.config.controls.root||null,l=Dx.register(this,iP,{root:s});this.controls=l}var u="mobile"===this.config.isMobileSimulateMode?"mobile":aC.device;if(this.addClass(Bm(e=Bm(t=Bm(n="".concat(Lx," ")).call(n,Wx," xgplayer-")).call(t,u," ")).call(e,this.config.controls?"":Jx)),this.config.autoplay?this.addClass(Fx):this.addClass(zx),this.config.fluid){var c=this.config,h=c.width,f=c.height;"number"==typeof h&&"number"==typeof f||(h=600,f=337.5);var d={width:"100%",height:"0","max-width":"100%","padding-top":"".concat(100*f/h,"%")};zw(d).forEach((function(e){i.root.style[e]=d[e]}))}else["width","height"].forEach((function(e){i.config[e]&&("number"!=typeof i.config[e]?i.root.style[e]=i.config[e]:i.root.style[e]="".concat(i.config[e],"px"))}));var p=this.root.getBoundingClientRect(),v=p.width,g=p.height,y=p.left,m=p.top;return this.sizeInfo.width=v,this.sizeInfo.height=g,this.sizeInfo.left=y,this.sizeInfo.top=m,!0}},{key:"_initBaseDoms",value:function(){this.topBar=null,this.leftBar=null,this.rightBar=null,this.config.marginControls&&(this.innerContainer=ZT.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()+Ww(t).call(t,1)])})),rx.forEach((function(t){document&&document.addEventListener(t,e.onFullscreenChange)})),aC.os.isIos&&(this.media.addEventListener("webkitbeginfullscreen",this._onWebkitbeginfullscreen),this.media.addEventListener("webkitendfullscreen",this._onWebkitendfullscreen)),this.once(wC,this.resize),this.playFunc=function(){e.config.closeFocusVideoFocus||e.media.focus()},this.once(hC,this.playFunc)}},{key:"_unbindEvents",value:function(){var e=this;this.root.removeEventListener("mousemove",this.mousemoveFunc),rx.forEach((function(t){document.removeEventListener(t,e.onFullscreenChange)})),this.playFunc&&this.off(hC,this.playFunc),this.off(mC,this.canPlayFunc),this.media.removeEventListener("webkitbeginfullscreen",this._onWebkitbeginfullscreen),this.media.removeEventListener("webkitendfullscreen",this._onWebkitendfullscreen)}},{key:"_clearUserTimer",value:function(){this.userTimer&&(ZT.clearTimeout(this,this.userTimer),this.userTimer=null)}},{key:"_startInit",value:function(e){var t=this;if(this.media&&(e&&""!==e&&("Array"!==ZT.typeOf(e)||0!==e.length)||(e="",this.emit(CC),JT.logWarn("config.url is null, please get url and run player._startInit(url)"),!this.config.nullUrlStart))){this.handleSource&&(this._detachSourceEvents(this.media),"Array"===ZT.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"===ZT.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 r=this.media.readyState;JT.logInfo("_startInit readyState",r),this.config.autoplay&&(!ZT.isMSE(this.media)&&this.load(),(aC.os.isIpad||aC.os.isPhone)&&this.mediaPlay());var i=this.config.startTime;this.__startTime=i>0?i:-1,this.config.startTime=0,r>=2&&this.duration>0?this.canPlayFunc():this.on(mC,this.canPlayFunc),(!this.hasStart||this.state<pP)&&Dx.afterInit(this),this.hasStart=!0,this.setState(pP),ZT.setTimeout(this,(function(){t.emit(AC)}),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||[],r=this.config.plugins||[],i=this.config.i18n||[];t&&cP.extend(i,this.__i18n);var o=n.join("||").toLowerCase().split("||"),a=this.plugins;r.forEach((function(n){try{var r=n.plugin?n.plugin.pluginName:n.pluginName;if(r&&jw(o).call(o,r.toLowerCase())>-1)return null;if(!t&&a[r.toLowerCase()])return;if(n.lazy&&n.loader){var i=Dx.lazyRegister(e,n);return void(n.forceBeforeInit&&(i.then((function(){var t,n;hk(t=e._loadingPlugins).call(t,jw(n=e._loadingPlugins).call(n,i),1)})).catch((function(t){var n,r;JT.logError("_registerPlugins:loadingPlugin",t),hk(n=e._loadingPlugins).call(n,jw(r=e._loadingPlugins).call(r,i),1)})),e._loadingPlugins.push(i)))}return e.registerPlugin(n)}catch(s){JT.logError("_registerPlugins:",s)}}))}},{key:"_registerPresets",value:function(){var e=this;this.config.presets.forEach((function(t){!function(e,t){var n,r,i,o=t.preset&&t.options?new t.preset(t.options,e.config):new t({},e.config),a=o.plugins,s=void 0===a?[]:a,l=o.ignores,u=void 0===l?[]:l,c=o.icons,h=void 0===c?{}:c,f=o.i18n,d=void 0===f?[]:f;e.config.plugins||(e.config.plugins=[]),e.config.ignores||(e.config.ignores=[]),(r=e.config.plugins).push.apply(r,vS(s)),(i=e.config.ignores).push.apply(i,vS(u)),Vw(n=zw(h)).call(n,(function(t){e.config.icons[t]||(e.config.icons[t]=h[t])}));var p=e.config.i18n||[];d.push.apply(d,vS(p)),e.config.i18n=d}(e,t)}))}},{key:"_getRootByPosition",value:function(e){var t=null;switch(e){case Cx.ROOT_RIGHT:this.rightBar||(this.rightBar=ZT.createPositionBar("xg-right-bar",this.root)),t=this.rightBar;break;case Cx.ROOT_LEFT:this.leftBar||(this.leftBar=ZT.createPositionBar("xg-left-bar",this.root)),t=this.leftBar;break;case Cx.ROOT_TOP:this.topBar||(this.topBar=ZT.createPositionBar("xg-top-bar",this.root),this.config.topBarAutoHide&&ZT.addClass(this.topBar,eP)),t=this.topBar;break;default:t=this.innerContainer||this.root}return t}},{key:"registerPlugin",value:function(e,t){var n=Dx.formatPluginInfo(e,t),r=n.PLUFGIN,i=n.options,o=this.config.plugins;!Dx.checkPluginIfExits(r.pluginName,o)&&o.push(r);var a=Dx.getRootByConfig(r.pluginName,this.config);a.root&&(i.root=a.root),a.position&&(i.position=a.position);var s,l=i.position?i.position:i.config&&i.config.position||r.defaultConfig&&r.defaultConfig.position;return!i.root&&"string"==typeof l&&jw(l).call(l,"controls")>-1?null===(s=this.controls)||void 0===s?void 0:s.registerPlugin(r,i,r.pluginName):(i.root||(i.root=this._getRootByPosition(l)),Dx.register(this,r,i))}},{key:"deregister",value:function(e){"string"==typeof e?Dx.unRegister(this,e):e instanceof mx&&Dx.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 mx&&(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 r;hk(r=this.config.plugins).call(r,n,1);break}}}},{key:"plugins",get:function(){return Dx.getPlugins(this)}},{key:"getPlugin",value:function(e){var t=Dx.findPlugin(this,e);return t&&t.pluginName?t:null}},{key:"addClass",value:function(e){this.root&&(ZT.hasClass(this.root,e)||ZT.addClass(this.root,e))}},{key:"removeClass",value:function(e){this.root&&ZT.removeClass(this.root,e)}},{key:"hasClass",value:function(e){if(this.root)return ZT.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>dP))return e||this.config.url||this.getInitDefinition(),this.hasStart=!0,this.setState(dP),this._registerPlugins(!1),Dx.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",JT.logError("start:beforeInit:",e),e}))}},{key:"switchURL",value:function(e,t){var n=this,r=e;"Object"===ZT.typeOf(e)&&(r=e.url),r=this.preProcessUrl(r).url;var i=this.currentTime;this.__startTime=i;var o=this.paused&&!this.isError;return this.src=r,new Hw((function(e,t){var i=function(e){n.off("timeupdate",a),n.off("canplay",a),t(e)},a=function(){n._seekToStartTime(),o&&n.pause(),n.off("error",i),e(!0)};n.once("error",i),r?(aC.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<pP)return this.removeClass(zx),this.addClass(Fx),this.start(),void(this._useAutoplay=!0);this.state<gP&&(this.removeClass(zx),!this.isCanplay&&this.addClass(Fx));var t=pS(uS(n.prototype),"play",this).call(this);return void 0!==t&&t&&t.then?t.then((function(){e.removeClass(tP),e.addClass(Ux),e.state<gP&&(JT.logInfo(">>>>playPromise.then"),e.setState(gP),e.emit(xC))})).catch((function(t){if(JT.logWarn(">>>>playPromise.catch",t.name),e.media&&e.media.error)return e.onError(),void e.removeClass(Fx);"NotAllowedError"===t.name&&(e._errorTimer=ZT.setTimeout(e,(function(){e._errorTimer=null,e.emit(PC),e.addClass(tP),e.removeClass(Fx),e.pause(),e.setState(vP)}),0))})):(JT.logWarn("video.play not return promise"),this.state<gP&&(this.setState(gP),this.removeClass(tP),this.removeClass(zx),this.removeClass(Fx),this.addClass(Ux),this.emit(xC))),t}},{key:"mediaPause",value:function(){pS(uS(n.prototype),"pause",this).call(this)}},{key:"videoPause",value:function(){pS(uS(n.prototype),"pause",this).call(this)}},{key:"play",value:function(){var e=this;return this.removeClass(Nx),gx(this,"play",(function(){return e.mediaPlay()}))}},{key:"pause",value:function(){var e=this;gx(this,"pause",(function(){pS(uS(n.prototype),"pause",e).call(e)}))}},{key:"seek",value:function(e,t){var n=this;if(this.media&&!fk(Number(e))&&this.hasStart){var r=this.config,i=r.isSeekedPlay,o=r.seekedStatus,a=t||(i?"play":o);e=e<0?0:e>this.duration?Dk(this.duration,10):e,!this._isPauseBeforeSeek&&(this._isPauseBeforeSeek=this.paused?2:1),this._onceSeekCanplay&&this.off(vC,this._onceSeekCanplay),this._onceSeekCanplay=function(){switch(n.removeClass(Fx),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(vC,this._onceSeekCanplay),this.state<gP?(this.removeClass(zx),this.currentTime=e,this.play()):this.currentTime=e}}},{key:"getInitDefinition",value:function(){var e,t=this,n=this.config,r=n.definition;!n.url&&r&&r.list&&r.list.length>0&&r.defaultDefinition&&Vw(e=r.list).call(e,(function(e){e.definition===r.defaultDefinition&&(t.config.url=e.url,t.curDefinition=e)}))}},{key:"changeDefinition",value:function(e,t){var n=this,r=this.config.definition;if(Array.isArray(null==r?void 0:r.list)&&r.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=Dk(e.bitrate,10)||0),this.emit(VC,{from:t,to:e}),this.hasStart){var i=this.switchURL(e.url,nS({seamless:!1!==r.seamless&&"undefined"!=typeof MediaSource&&"function"==typeof MediaSource.isTypeSupported},e));i&&i.then?i.then((function(){n.emit(jC,{from:t,to:e})})):this.emit(jC,{from:t,to:e})}else this.config.url=e.url}},{key:"reload",value:function(){this.load(),this.reloadFunc=function(){this.play()},this.once(wC,this.reloadFunc)}},{key:"resetState",value:function(){var e=this,t=[tP,Ux,zx,Nx,jx,Fx,Bx,Hx,Vx];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(zx),this.emit(XC)}},{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&&(Vw(t).call(t,(function(t){e.deregister(t)})),n)){var r,i=rP();jk(r=zw(this.config)).call(r,(function(t){"undefined"===e.config[t]||"plugins"!==t&&"presets"!==t&&"el"!==t&&"id"!==t||(e.config[t]=i[t])}))}}},{key:"destroy",value:function(){var e,t,r=this,i=this.innerContainer,o=this.root,a=this.media;if(o&&a){if(this.hasStart=!1,this._useAutoplay=!1,o.removeAttribute(ax),a.removeAttribute(ax),this.updateAcc("destroy"),this._unbindEvents(),this._detachSourceEvents(this.media),ZT.clearAllTimers(this),this.emit(RC),null===(t=TP)||void 0===t||t.remove(this),Dx.destroy(this),vx(this),pS(uS(n.prototype),"destroy",this).call(this),this.fullscreen&&this._fullscreenEl===this.root&&this.exitFullscreen(),i)for(var s=i.children,l=0;l<s.length;l++)i.removeChild(s[l]);!i&&a instanceof window.Node&&o.contains(a)&&!this.config.remainMediaAfterDestroy&&o.removeChild(a),Vw(e=["topBar","leftBar","rightBar","innerContainer"]).call(e,(function(e){r[e]&&o.removeChild(r[e]),r[e]=null}));var u=o.className.split(" ");u.length>0?o.className=zk(u).call(u,(function(e){return jw(e).call(e,"xgplayer")<0})).join(" "):o.className="",this.removeAttribute("data-xgfill"),["isSeeking","isCanplay","isActive","cssfullscreen","fullscreen"].forEach((function(e){r[e]=!1}))}}},{key:"replay",value:function(){var e=this;this.removeClass(Bx),this.currentTime=0,this.isSeeking=!1,gx(this,"replay",(function(){e.once(vC,(function(){var t=e.mediaPlay();t&&t.catch&&t.catch((function(e){console.log(e)}))})),e.emit(IC),e.onPlay()}))}},{key:"retry",value:function(){var e=this;this.removeClass(Hx),this.addClass(Vx),gx(this,"retry",(function(){var t=e.currentTime,n=e.config.url,r=ZT.isMSE(e.media)?{url:n}:e.preProcessUrl(n);e.src=r.url,!e.config.isLive&&(e.currentTime=t),e.once(mC,(function(){e.mediaPlay()}))}))}},{key:"changeFullStyle",value:function(e,t,n,r){e&&(r||(r=Xx),this._orgCss||(this._orgCss=ZT.filterStyleFromText(e)),ZT.addClass(e,n),t&&t!==e&&!this._orgPCss&&(this._orgPCss=ZT.filterStyleFromText(t),ZT.addClass(t,r),t.setAttribute(ax,this.playerId)))}},{key:"recoverFullStyle",value:function(e,t,n,r){r||(r=Xx),this._orgCss&&(ZT.setStyleFromCsstext(e,this._orgCss),this._orgCss=""),ZT.removeClass(e,n),t&&t!==e&&this._orgPCss&&(ZT.setStyleFromCsstext(t,this._orgPCss),this._orgPCss="",ZT.removeClass(t,r),t.removeAttribute(ax))}},{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:ZT.scrollTop(),left:ZT.scrollLeft()},this._fullscreenEl=e,this._fullActionFrom="get",ZT.getFullScreenEl()===this._fullscreenEl)return this.onFullscreenChange(),Hw.resolve();try{for(var r=0;r<ix.length;r++){var i=ix[r];if(e[i]){var o="webkitRequestFullscreen"===i?e.webkitRequestFullscreen(window.Element.ALLOW_KEYBOARD_INPUT):e[i]();return o&&o.then?o:Hw.resolve()}}return n.fullscreenEnabled||n.webkitSupportsFullscreen?(n.webkitEnterFullscreen(),Hw.resolve()):Hw.reject(new Error("call getFullscreen fail"))}catch(a){return Hw.reject(new Error("call getFullscreen fail"))}}},{key:"exitFullscreen",value:function(e){if(this.isRotateFullscreen&&this.exitRotateFullscreen(),this._fullscreenEl||ZT.getFullScreenEl()){this.root;var t=this.media;this._fullActionFrom="exit";try{for(var n=0;n<ox.length;n++){var r=ox[n];if(document[r]){var i=document[r]();return i&&i.then?i:Hw.resolve()}}return t&&t.webkitSupportsFullscreen?(t.webkitExitFullScreen(),Hw.resolve()):Hw.reject(new Error("call exitFullscreen fail"))}catch(o){return Hw.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?Bm(e="".concat($x," ")).call(e,Gx):Gx;this.changeFullStyle(this.root,t,n);var r=this.config.fullscreen,i=void 0===r?{}:r;(!0===i.useCssFullscreen||"function"==typeof i.useCssFullscreen&&i.useCssFullscreen())&&(this.fullscreen=!0,this.emit(NC,!0)),this._cssfullscreenEl=t,this.cssfullscreen=!0,this.emit(UC,!0)}},{key:"exitCssFullscreen",value:function(){var e,t=this._cssfullscreenEl?Bm(e="".concat($x," ")).call(e,Gx):Gx;if(this.fullscreen){var n=this.config.fullscreen,r=void 0===n?{}:n;!0===r.useCssFullscreen||"function"==typeof r.useCssFullscreen&&r.useCssFullscreen()?(this.recoverFullStyle(this.root,this._cssfullscreenEl,t),this.fullscreen=!1,this.emit(NC,!1)):this.removeClass(t)}else this.recoverFullStyle(this.root,this._cssfullscreenEl,t);this._cssfullscreenEl=null,this.cssfullscreen=!1,this.emit(UC,!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?Bm(e="".concat($x," ")).call(e,qx):qx;this._fullscreenEl=t||this.root,this.changeFullStyle(this.root,t,n,Yx),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(NC,!0)}},{key:"exitRotateFullscreen",value:function(e){var t,n=this._fullscreenEl!==this.root?Bm(t="".concat($x," ")).call(t,qx):qx;this.recoverFullStyle(this.root,this._fullscreenEl,n,Yx),this.isRotateFullscreen=!1,this.fullscreen=!1,this.setRotateDeg(0),this.emit(NC,!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(EC,nS({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(SC,nS({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(Wx),this._clearUserTimer(),void 0!==t.isLock&&(n.isActiveLocked=t.isLock),!1===t.autoHide||!0===t.isLock||n.isActiveLocked)this._clearUserTimer();else{var r=t&&t.delay?t.delay:this.config.inactive;this.userTimer=ZT.setTimeout(this,(function(){e.userTimer=null,e.blur()}),r)}}},{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(Wx)}}},{key:"onEmptied",value:function(){this.updateAcc("emptied")}},{key:"onCanplay",value:function(){this.removeClass(Fx),this.removeClass(Hx),this.removeClass(Vx),this.isCanplay=!0,this.waitTimer&&ZT.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(_C,(function(){e._seekToStartTime()})))}},{key:"onLoadstart",value:function(){this.removeClass(Hx),this.isCanplay=!1}},{key:"onPlay",value:function(){this.state===yP&&this.setState(gP),this.removeClass(Nx),this.ended&&this.removeClass(Bx),!this.config.closePlayVideoFocus&&this.focus()}},{key:"onPause",value:function(){this.addClass(Nx),this.updateAcc("pause"),this.config.closePauseVideoFocus||(this._clearUserTimer(),this.focus())}},{key:"onEnded",value:function(){this.updateAcc("ended"),this.addClass(Bx),this.setState(yP)}},{key:"onError",value:function(){this.isError=!0,this.updateAcc("error"),this.removeClass(tP),this.removeClass(zx),this.removeClass(Fx),this.removeClass(Vx),this.addClass(Hx)}},{key:"onSeeking",value:function(){this.isSeeking||this.updateAcc("seeking"),this.isSeeking=!0,this.addClass(nP)}},{key:"onSeeked",value:function(){this.isSeeking=!1,this.waitTimer&&ZT.clearTimeout(this,this.waitTimer),this.removeClass(Vx),this.removeClass(nP)}},{key:"onWaiting",value:function(){var e=this;this.waitTimer&&ZT.clearTimeout(this,this.waitTimer),this.updateAcc("waiting"),this.waitTimer=ZT.setTimeout(this,(function(){e.addClass(Vx),e.emit(FC),ZT.clearTimeout(e,e.waitTimer),e.waitTimer=null}),this.config.minWaitDelay)}},{key:"onPlaying",value:function(){var e=this;this.isError=!1,[zx,Nx,Bx,Hx,jx,Vx].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(Vx))&&this.media.readyState>2&&(this.removeClass(Vx),ZT.clearTimeout(this,this.waitTimer),this.waitTimer=null),!this.paused&&this.state===vP&&this.duration&&(this.setState(gP),this.emit(xC)),this._accPlayed.t||this.paused||this.ended||(this._accPlayed.t=(new Date).getTime())}},{key:"onVolumechange",value:function(){"Number"===ZT.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 r="String"===ZT.typeOf(e)?e:e.type||"";n.props&&"Array"!==ZT.typeOf(n.props)&&(n.props=[n.props]),this.emit(YC,nS({eventType:r,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,r=void 0===n?0:n,i=t.endDiff,o=void 0===i?0:i,a=this.media.buffered;if(!a||0===a.length||!this.duration)return!0;for(var s=e||this.media.currentTime||.2,l=a.length,u=0;u<l;u++)if(a.start(u)+r<=s&&a.end(u)-o>s)return!0;return!1}},{key:"resizePosition",value:function(){var e,t=this,n=this.videoPos,r=n.vy,i=n.vx,o=n.h,a=n.w,s=this.videoPos.rotate;if(!(s<0&&o<0&&a<0)){var l=this.videoPos._pi;if(!l&&this.media.videoHeight&&(l=this.media.videoWidth/this.media.videoHeight*100),l){this.videoPos.pi=l;var u={rotate:s=s<0?0:s},c=0,h=0,f=1,d=Math.abs(s/90),p=this.root,v=this.innerContainer,g=p.offsetWidth,y=v?v.offsetHeight:p.offsetHeight,m={},_=y,b=g;if(d%2==0)f=o>0?100/o:a>0?100/a:1,u.scale=f,c=r>0?(100-o)/2-r:0,u.y=2===d?0-c:c,h=i>0?(100-a)/2-i:0,u.x=2===d?0-h:h,m.width="".concat(b,"px"),m.height="".concat(_,"px"),m.maxWidth="",m.maxHeight="";else if(d%2==1){_=g;var w=y-g;h=-w/2/(b=y)*100,u.x=3===d?h+r/2:h-r/2,c=w/2/_*100,u.y=3===d?c+i/2:c-i/2,u.scale=f,m.width="".concat(b,"px"),m.maxWidth="".concat(b,"px"),m.height="".concat(_,"px"),m.maxHeight="".concat(_,"px")}var k=ZT.getTransformStyle(u,this.media.style.transform||this.media.style.webkitTransform);m.transform=k,m.webkitTransform=k,Vw(e=zw(m)).call(e,(function(e){t.media.style[e]=m[e]}))}}}},{key:"position",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{h:0,y:0,x:0,w:0};if(this.media&&e&&e.h){var t=this.videoPos;t.h=100*e.h||0,t.w=100*e.w||0,t.vx=100*e.x||0,t.vy=100*e.y||0,this.resizePosition()}}},{key:"setConfig",value:function(e){var t,n=this;e&&Vw(t=zw(e)).call(t,(function(t){if("plugins"!==t){n.config[t]=e[t];var r=n.plugins[t.toLowerCase()];r&&"Function"===ZT.typeOf(r.setConfig)&&r.setConfig(e[t])}}))}},{key:"playNext",value:function(e){var t=this;this.resetState(),this.setConfig(e),this._currentTime=0,this._duration=0,gx(this,"playnext",(function(){t.start(),t.emit(GC,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,r=n.videoWidth,i=n.videoHeight,o=this.config,a=o.fitVideoSize,s=o.videoFillMode;if("fill"!==s&&"cover"!==s&&"contain"!==s||this.setAttribute("data-xgfill",s),i&&r){this._videoHeight=i,this._videoWidth=r;var l=this.controls&&this.innerContainer?this.controls.root.getBoundingClientRect().height:0,u=t.width,c=t.height-l,h=Dk(r/i*1e3,10),f=Dk(u/c*1e3,10),d=u,p=c,v={};"auto"===a&&f>h||"fixWidth"===a?(p=u/h*1e3,this.config.fluid?v.paddingTop="".concat(100*p/d,"%"):v.height="".concat(p+l,"px")):("auto"===a&&f<h||"fixHeight"===a)&&(d=h*c/1e3,v.width="".concat(d,"px")),this.fullscreen||this.cssfullscreen||zw(v).forEach((function(t){e.root.style[t]=v[t]})),("fillHeight"===s&&f<h||"fillWidth"===s&&f>h)&&this.setAttribute("data-xgfill","cover");var g={videoScale:h,vWidth:d,vHeight:p,cWidth:d,cHeight:p+l};this.resizePosition(),this.emit(WC,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=Bm(e="".concat(100*t,"% ")).call(e,100*n,"%")}},{key:"setState",value:function(e){var t;JT.logInfo("setState",Bm(t="state from:".concat(mP[this.state]," to:")).call(t,mP[e])),this._state=e}},{key:"preProcessUrl",value:function(e,t){var n=this.config,r=n.preProcessUrl,i=n.preProcessUrlOptions,o=iE({},i,t);return ZT.isBlob(e)||"function"!=typeof r?{url:e}:r(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(fP),this.emit("hasstart"))}},{key:"isPlaying",get:function(){return this._state===gP||this._state===yP},set:function(e){e?this.setState(gP):this._state>=gP&&this.setState(pP)}},{key:"definitionList",get:function(){return this.config&&this.config.definition&&this.config.definition.list||[]},set:function(e){var t=this,n=this.config.definition,r=null,i=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&&(r=e),n.defaultDefinition===e.definition&&(i=e)})),!i&&e.length>0&&(i=e[0]),r?this.changeDefinition(r):i&&this.changeDefinition(i)}},{key:"videoFrameInfo",get:function(){var e={total:0,dropped:0,corrupted:0,droppedRate:0,droppedDuration:0};if(!this.media||!this.media.getVideoPlaybackQuality)return e;var t=this.media.getVideoPlaybackQuality();return e.dropped=t.droppedVideoFrames||0,e.total=t.totalVideoFrames||0,e.corrupted=t.corruptedVideoFrames||0,e.total>0&&(e.droppedRate=e.dropped/e.total*100,e.droppedDuration=Dk(this.cumulateTime/e.total*e.dropped,0)),e}},{key:"lang",get:function(){return this.config.lang},set:function(e){var t,n;0!==zk(t=cP.langKeys).call(t,(function(t){return t===e})).length||"zh"===e?(this.config.lang=e,Dx.setLang(e,this)):console.error(Bm(n="Sorry, set lang fail, because the language [".concat(e,"] is not supported now, list of all supported languages is [")).call(n,cP.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 sC}},{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 pS(uS(n.prototype),"readyState",this)}},{key:"error",get:function(){var e=pS(uS(n.prototype),"error",this);return this.i18n[e]||e}},{key:"networkState",get:function(){return pS(uS(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=ZT.convertDeg(e))%90==0&&e!==this.videoPos.rotate&&(this.videoPos.rotate=e,this.resizePosition())}},{key:"avgSpeed",get:function(){return SP},set:function(e){SP=e}},{key:"realTimeSpeed",get:function(){return EP},set:function(e){EP=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 lx.call.apply(lx,Bm(n=[this]).call(n,Ww(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){var n;return cx.call.apply(cx,Bm(n=[this]).call(n,Ww(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){var n;return hx.call.apply(hx,Bm(n=[this]).call(n,Ww(Array.prototype).call(arguments)))}},{key:"usePluginHooks",value:function(e,t,n){for(var r,i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];return fx.call.apply(fx,Bm(r=[this]).call(r,Ww(Array.prototype).call(arguments)))}},{key:"removePluginHooks",value:function(e,t,n){for(var r,i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];return dx.call.apply(dx,Bm(r=[this]).call(r,Ww(Array.prototype).call(arguments)))}},{key:"setUserActive",value:function(e,t){var n;"boolean"==typeof t&&t!==this.muted&&(this.addInnerOP("volumechange"),ZT.typeOf(t)===Boolean&&(this.muted=t)),null===(n=TP)||void 0===n||n.setActive(this.playerId,e)}}],[{key:"debugger",get:function(){return JT.config.debug},set:function(e){JT.config.debug=e}},{key:"instManager",get:function(){return TP},set:function(e){TP=e}},{key:"getCurrentUserActivePlayerId",value:function(){var e;return null===(e=TP)||void 0===e?void 0:e.getActiveId()}},{key:"setCurrentUserActive",value:function(e,t){var n;null===(n=TP)||void 0===n||n.setActive(e,t)}},{key:"isHevcSupported",value:function(){return aC.isHevcSupported()}},{key:"probeConfigSupported",value:function(e){return aC.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}(tx);sS(CP,"defaultPreset",null),sS(CP,"XgVideoProxy",null),CP.instManager=wP.getInstance();function xP(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var PP=SE;On({target:"Function",proto:!0,forced:Function.bind!==PP},{bind:PP});var AP,IP,RP=Gc("Function").bind,OP=ce,MP=RP,DP=Function.prototype,LP=o((function(e){var t=e.bind;return e===DP||OP(DP,e)&&t===DP.bind?MP:t}));function FP(e,t){var n;return(FP=gh?LP(n=gh).call(n):function(e,t){return e.__proto__=t,e})(e,t)}function NP(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Lc(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Mc(e,"prototype",{writable:!1}),t&&FP(e,t)}function UP(e){var t;return(UP=gh?LP(t=Vc).call(t):function(e){return e.__proto__||Vc(e)})(e)}function BP(){if("undefined"==typeof Reflect||!VE)return!1;if(VE.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(VE(Boolean,[],(function(){}))),!0}catch(rj){return!1}}function VP(e){var t=BP();return function(){var n,r=UP(e);if(t){var i=UP(this).constructor;n=VE(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Tc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return xP(e)}(this,n)}}function HP(e,t,n){var r;BP()?HP=LP(r=VE).call(r):HP=function(e,t,n){var r=[null];ph(r).apply(r,t);var i=new(LP(Function).apply(e,r));return n&&FP(i,n.prototype),i};return HP.apply(null,arguments)}function jP(e){var t="function"==typeof Mw?new Mw:void 0;return jP=function(e){if(null===e||(n=e,-1===$y(r=Function.toString.call(n)).call(r,"[native code]")))return e;var n,r;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,i)}function i(){return HP(e,arguments,UP(this).constructor)}return i.prototype=Lc(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),FP(i,e)},jP(e)}var zP=function(e){return e.Fatal="Fatal",e.Error="Error",e.Warn="Warn",e}(zP||{}),WP=function(e){return e[e.MANIFEST_HLS_ERROR=1100]="MANIFEST_HLS_ERROR",e[e.MANIFEST_DASH_ERROR=1200]="MANIFEST_DASH_ERROR",e[e.NETWORK=2100]="NETWORK",e[e.NETWORK_TIMEOUT=2101]="NETWORK_TIMEOUT",e[e.NETWORK_FORBIDDEN=2103]="NETWORK_FORBIDDEN",e[e.NETWORK_NOTFOUND=2104]="NETWORK_NOTFOUND",e[e.NETWORK_RANGE_NOT_SATISFIABLE=2116]="NETWORK_RANGE_NOT_SATISFIABLE",e[e.DEMUX_FLV_ERROR=3100]="DEMUX_FLV_ERROR",e[e.DEMUX_HLS_ERROR=3200]="DEMUX_HLS_ERROR",e[e.DEMUX_MP4_ERROR=3300]="DEMUX_MP4_ERROR",e[e.DEMUX_FMP4_ERROR=3400]="DEMUX_FMP4_ERROR",e[e.DEMUX_SIDX_ERROR=3410]="DEMUX_SIDX_ERROR",e[e.REMUX_FMP4_ERROR=4100]="REMUX_FMP4_ERROR",e[e.REMUX_MP4_ERROR=4200]="REMUX_MP4_ERROR",e[e.MEDIA_ERR_ABORTED=5101]="MEDIA_ERR_ABORTED",e[e.MEDIA_ERR_NETWORK=5102]="MEDIA_ERR_NETWORK",e[e.MEDIA_ERR_DECODE=5103]="MEDIA_ERR_DECODE",e[e.MEDIA_ERR_SRC_NOT_SUPPORTED=5104]="MEDIA_ERR_SRC_NOT_SUPPORTED",e[e.MEDIA_ERR_CODEC_NOT_SUPPORTED=5105]="MEDIA_ERR_CODEC_NOT_SUPPORTED",e[e.MEDIA_ERR_URL_EMPTY=5106]="MEDIA_ERR_URL_EMPTY",e[e.MEDIA_MSE_ADD_SB=5200]="MEDIA_MSE_ADD_SB",e[e.MEDIA_MSE_APPEND_BUFFER=5201]="MEDIA_MSE_APPEND_BUFFER",e[e.MEDIA_MSE_OTHER=5202]="MEDIA_MSE_OTHER",e[e.MEDIA_MSE_FULL=5203]="MEDIA_MSE_FULL",e[e.MEDIA_MSE_HIJACK=5204]="MEDIA_MSE_HIJACK",e[e.MEDIA_EME_HIJACK=5301]="MEDIA_EME_HIJACK",e[e.DRM_LICENSE=7100]="DRM_LICENSE",e[e.DRM_CUSTOM_LICENSE=7200]="DRM_CUSTOM_LICENSE",e[e.OTHER=8e3]="OTHER",e[e.RUNTIME_NO_CANPLAY_ERROR=9001]="RUNTIME_NO_CANPLAY_ERROR",e[e.RUNTIME_BUFFERBREAK_ERROR=9002]="RUNTIME_BUFFERBREAK_ERROR",e[e.RUNTIME_BWAITING_TIMEOUT_ERROR=9002]="RUNTIME_BWAITING_TIMEOUT_ERROR",e[e.MODULE_LOAD_ERROR=110]="MODULE_LOAD_ERROR",e.UNKNOWN="UNKNOWN",e}(WP||{}),KP=(Ny(AP={},2100,{messageTextKey:"NETWORK",level:"Error"}),Ny(AP,2101,{messageTextKey:"NETWORK_TIMEOUT",level:"Error"}),Ny(AP,2103,{messageTextKey:"NETWORK_FORBIDDEN",level:"Error"}),Ny(AP,2104,{messageTextKey:"NETWORK_NOTFOUND",level:"Error"}),Ny(AP,5101,{messageTextKey:"MEDIA_ERR_ABORTED",level:"Error"}),Ny(AP,5102,{messageTextKey:"MEDIA_ERR_NETWORK",level:"Error"}),Ny(AP,5103,{messageTextKey:"MEDIA_ERR_DECODE",level:"Error"}),Ny(AP,5104,{messageTextKey:"MEDIA_ERR_SRC_NOT_SUPPORTED",level:"Error"}),Ny(AP,5105,{messageTextKey:"MEDIA_ERR_CODEC_NOT_SUPPORTED",level:"Error"}),Ny(AP,5106,{messageTextKey:"MEDIA_ERR_URL_EMPTY",level:"Error"}),Ny(AP,110,{messageTextKey:"MODULE_LOAD_ERROR",level:"Fatal"}),Ny(AP,7100,{messageTextKey:"DRM_LICENSE",level:"Fatal"}),AP),GP=(Ny(IP={},"manifest",{messageTextKey:"MANIFEST",level:"Error"}),Ny(IP,"network",{messageTextKey:"NETWORK",level:"Error"}),Ny(IP,"demux",{messageTextKey:"DEMUX",level:"Error"}),Ny(IP,"remux",{messageTextKey:"REMUX",level:"Error"}),Ny(IP,"media",{messageTextKey:"MEDIA",level:"Error"}),Ny(IP,"drm",{messageTextKey:"DRM",level:"Error"}),Ny(IP,"other",{messageTextKey:"OTHER",level:"Error"}),Ny(IP,"runtime",{messageTextKey:"RUNTIME",level:"Error"}),IP),qP=function(e){NP(n,e);var t=VP(n);function n(e,r){var i,o,a,s,l,u,c;Ry(this,n);var h="string"==typeof e?{message:e}:e,f=null!==(i=null!==(o=null!==(a=null==r?void 0:r.getText(null==h?void 0:h.messageTextKey))&&void 0!==a?a:null==h?void 0:h.message)&&void 0!==o?o:null==h||null===(s=h.error)||void 0===s?void 0:s.message)&&void 0!==i?i:null==r?void 0:r.getText("UNKNOWN");return Ny(xP(c=t.call(this,f)),"errorCode",void 0),Ny(xP(c),"level",void 0),Ny(xP(c),"ext",void 0),c.errorCode=null!==(l=null==h?void 0:h.errorCode)&&void 0!==l?l:"UNKNOWN",c.level=null!==(u=null==h?void 0:h.level)&&void 0!==u?u:"Error",c.ext=null==h?void 0:h.ext,c}return Fy(n)}(jP(Error));function YP(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return new qP(Dm(Dm({errorCode:e},KP[e]),t),n)}function XP(e,t){var n,r,i=KP[e.errorCode]||GP[e.errorType],o=e.errorCode;return new qP({messageTextKey:null==i?void 0:i.messageTextKey,message:null!==(n=null==e?void 0:e.message)&&void 0!==n?n:o,errorCode:o,level:null!==(r=null==i?void 0:i.level)&&void 0!==r?r:"Error",ext:e},t)}var $P=function(e){lS(n,e);var t=dS(n);function n(){return iS(this,n),t.apply(this,arguments)}return aS(n,[{key:"isEndedShow",get:function(){return this.config.isEndedShow},set:function(e){this.config.isEndedShow=e}},{key:"hide",value:function(){ZT.addClass(this.root,"hide")}},{key:"show",value:function(e){ZT.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(fC,(function(){e.isEndedShow&&ZT.removeClass(e.root,"hide")})),this.config.hideCanplay?(this.once(gC,(function(){e.onTimeUpdate()})),this.on(OC,(function(){ZT.removeClass(e.root,"hide"),ZT.addClass(e.root,"xg-showplay"),e.once(gC,(function(){e.onTimeUpdate()}))}))):this.on(hC,(function(){ZT.addClass(e.root,"hide")}))}},{key:"setConfig",value:function(e){var t=this;zw(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?ZT.removeClass(this.root,"xg-showplay"):this.once(gC,(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,r=n.poster,i=n.hideCanplay,o=n.fillMode,a=n.notHidden,s=this.getBgSize(o),l=r?Bm(e="background-image:url(".concat(r,");")).call(e,s):s;return Bm(t='<xg-poster class="xgplayer-poster '.concat(a?"xg-not-hidden":i?"xg-showplay":"",'" style="')).call(t,l,'">\n </xg-poster>')}}],[{key:"pluginName",get:function(){return"poster"}},{key:"defaultConfig",get:function(){return{isEndedShow:!0,hideCanplay:!1,notHidden:!1,poster:"",fillMode:"fixWidth"}}}]),n}(Rx);function JP(){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 QP(){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 ZP={};function eA(e){var t;e?window.clearTimeout(e):Vw(t=zw(ZP)).call(t,(function(e){window.clearTimeout(ZP[e].id),delete ZP[e]}))}var tA=function(e){lS(n,e);var t=dS(n);function n(e){var r;return iS(this,n),sS(hS(r=t.call(this,e)),"onPlayerReset",(function(){r.autoPlayStart=!1;var e="auto"===r.config.mode?"auto-hide":"hide";r.setAttr("data-state","play"),ZT.removeClass(r.root,e),r.show()})),sS(hS(r),"onAutoplayStart",(function(){if(!r.autoPlayStart){var e="auto"===r.config.mode?"auto-hide":"hide";ZT.addClass(r.root,e),r.autoPlayStart=!0,r.toggleTo("play")}})),r.autoPlayStart=!1,r}return aS(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(TC,(function(){n&&(n.lang&&"en"===n.lang?ZT.addClass(t.root,"lang-is-en"):"jp"===n.lang&&ZT.addClass(t.root,"lang-is-jp"))})),this.on(xC,this.onAutoplayStart),this.on(PC,(function(){var t="auto"===e.config.mode?"auto-hide":"hide";e.setAttr("data-state","play"),ZT.removeClass(e.root,t),e.show()})),this.on(hC,(function(){e.toggleTo("play")})),this.on(dC,(function(){e.toggleTo("pause")})),this.on(XC,(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:JP,class:"xg-icon-play"},startPause:{icon:QP,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(){ZT.addClass(this.root,"hide")}},{key:"show",value:function(e){ZT.removeClass(this.root,"hide")}},{key:"focusHide",value:function(){ZT.addClass(this.root,"focus-hide")}},{key:"recover",value:function(){ZT.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 ZP[e]&&window.clearTimeout(ZP[e].id),ZP[e]={},n.start&&n.start(),ZP[e].id=window.setTimeout((function(){n.end&&n.end(),window.clearTimeout(ZP[e].id),delete ZP[e]}),t),ZP[e].id}("pauseplay",400,{start:function(){ZT.addClass(t.root,"interact"),t.show(),t.switchStatus(!0)},end:function(){ZT.removeClass(t.root,"interact"),!e&&t.hide(),t._animateId=null}})}},{key:"endAnimate",value:function(){ZT.removeClass(this.root,"interact"),eA(this._animateId),this._animateId=null}},{key:"switchPausePlay",value:function(e){var t=this.player;(e.cancelable&&e.preventDefault(),e.stopPropagation(),t.state<fP)||(this.player.paused||t.state!==gP?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<gP)&&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),eA(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}(Rx),nA=function(e){lS(n,e);var t=dS(n);function n(){return iS(this,n),t.apply(this,arguments)}return aS(n,[{key:"render",value:function(){var e=this.config.innerHtml,t=ZT.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="",r=1;r<=12;r++)n+='<div class="xgplayer-enter-bar'.concat(r,'"></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}(Rx);function rA(e,t,n){try{var r,i;return Bm(r=Bm(i=' <div class="xg-tips '.concat(n?"hide":" ",'" lang-key="')).call(i,e.i18nKeys[t],'">\n ')).call(r,e.i18n[t],"\n </div>")}catch(rj){return'<div class="xg-tips hide"></div>'}}var iA=function(e){lS(n,e);var t=dS(n);function n(){return iS(this,n),t.apply(this,arguments)}return aS(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 Bm(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:Cx.CONTROLS_RIGHT,index:10}}}]),n}(Rx);function oA(e){var t=QS(e);return-1===jw(e).call(e,"%")&&!fk(t)&&t}var aA=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],sA=aA.length;function lA(e){if("string"==typeof e&&(e=document.querySelector(e)),e&&"object"===rS(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<sA;t++)e[aA[t]]=0;return e}();var n={};n.width=e.offsetWidth,n.height=e.offsetHeight;for(var r=n.isBorderBox="border-box"===t.boxSizing,i=0;i<sA;i++){var o=aA[i],a=t[o],s=QS(a);n[o]=fk(s)?0:s}var l=n.paddingLeft+n.paddingRight,u=n.paddingTop+n.paddingBottom,c=n.marginLeft+n.marginRight,h=n.marginTop+n.marginBottom,f=n.borderLeftWidth+n.borderRightWidth,d=n.borderTopWidth+n.borderBottomWidth,p=r,v=oA(t.width);!1!==v&&(n.width=v+(p?0:l+f));var g=oA(t.height);return!1!==g&&(n.height=g+(p?0:u+d)),n.innerWidth=n.width-(l+f),n.innerHeight=n.height-(u+d),n.outerWidth=n.width+c,n.outerHeight=n.height+h,n}}function uA(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.identifier===t)return r}}var cA="dragStart",hA="dragMove",fA="dragEnded",dA={mousedown:["mousemove","mouseup"],touchstart:["touchmove","touchend","touchcancel"],pointerdown:["pointermove","pointerup","pointercancel"]},pA=function(e){lS(n,e);var t=dS(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return iS(this,n),(r=t.call(this)).isEnabled=!0,r.isDragging=!1,r.isDown=!1,r.position={},r.downPoint={},r.dragPoint={x:0,y:0},r.startPos={x:0,y:0},r._root=e instanceof Element?e:document.querySelector(e),r._handlerDom=i.handle instanceof Element?i.handle:document.querySelector(i.handle),r._root&&r._handlerDom?(r._bindStartEvent(),r):fS(r)}return aS(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)]),Vw(e=dA[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=dA[this._startKey];Vw(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&&(Vw(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=Bm(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=uA(e.changedTouches,this.touchIdentifier);t&&this.dragMove(e,t)}},{key:"ontouchend",value:function(e){var t=uA(e.changedTouches,this.touchIdentifier);t&&this.dragEnd(e,t),e.preventDefault()}},{key:"ontouchcancel",value:function(e){var t=uA(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=lA(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(cA,this.startPos)}},{key:"dragEnd",value:function(e,t){this._root&&(this._unbindPostStartEvents(),this.isDragging&&(this._root.style.transform="",this.setLeftTop(),this.emit(fA)),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,r=n.x,i=n.y,o=this._dragPointerMove(e,t),a=o.x,s=o.y;a=this.checkContain("x",a,r),s=this.checkContain("y",s,i),this.position.x=r+a,this.position.y=i+s,this.dragPoint.x=a,this.dragPoint.y=s,this.emit(hA,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=fk(t)?0:t,this.position.y=fk(n)?0:n,this._addTransformPosition(e)}},{key:"_addTransformPosition",value:function(e){var t=e.transform;if(0===jw(t).call(t,"matrix")){var n=t.split(","),r=0===jw(t).call(t,"matrix3d")?12:4,i=Dk(n[r],10),o=Dk(n[r+1],10);this.position.x+=i,this.position.y+=o}}},{key:"_getPositionCoord",value:function(e,t){if(-1!==jw(e).call(e,"%")){var n=lA(this._root.parentNode);return n?QS(e)/100*n[t]:0}return Dk(e,10)}}]),n}(bS),vA=function(e){lS(n,e);var t=dS(n);function n(e){var r;iS(this,n),sS(hS(r=t.call(this,e)),"onCancelClick",(function(e){r.exitMini(),r.isClose=!0})),sS(hS(r),"onCenterClick",(function(e){var t=hS(r).player;t.paused?t.play():t.pause()})),sS(hS(r),"onScroll",(function(e){if(!(!window.scrollY&&0!==window.scrollY||Math.abs(window.scrollY-r.pos.scrollY)<50)){var t=Dk(ZT.getCss(r.player.root,"height"));t+=r.config.scrollTop,r.pos.scrollY=window.scrollY,window.scrollY>t+5?!r.isMini&&!r.isClose&&r.getMini():window.scrollY<=t&&(r.isMini&&r.exitMini(),r.isClose=!1)}})),r.isMini=!1,r.isClose=!1;var i=hS(r).config;return r.pos={left:i.left<0?window.innerWidth-i.width-20:i.left,top:i.top<0?window.innerHeight-i.height-20:i.top,height:r.config.height,width:r.config.width,scrollY:window.scrollY||0},r.lastStyle=null,r}return aS(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(dC,(function(){e.setAttr("data-state","pause")})),this.on(hC,(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(iA,n,iA.pluginName)}var r=ZT.checkTouchSupport()?"touchend":"click";this.bind(".mini-cancel-btn",r,this.onCancelClick),this.bind(".play-icon",r,this.onCenterClick),this.config.disableDrag||(this._draggabilly=new pA(this.player.root,{handle:this.root})),this.config.isScrollSwitch&&window.addEventListener("scroll",this.onScroll)}}},{key:"registerIcons",value:function(){return{play:{icon:JP,class:"xg-icon-play"},pause:{icon:QP,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,r=this.playerConfig,i=this.config.target||this.player.root;this.lastStyle={},ZT.addClass(n.root,"xgplayer-mini"),Vw(e=["width","height","top","left"]).call(e,(function(e){t.lastStyle[e]=i.style[e],i.style[e]="".concat(t.pos[e],"px")})),r.fluid&&(i.style["padding-top"]=""),this.emit(BC,!0),n.isMini=this.isMini=!0}}},{key:"exitMini",value:function(){var e=this;if(!this.isMini)return!1;var t,n=this.player,r=this.playerConfig,i=this.config.target||this.player.root;(ZT.removeClass(n.root,"xgplayer-mini"),this.lastStyle)&&Vw(t=zw(this.lastStyle)).call(t,(function(t){i.style[t]=e.lastStyle[t]}));this.lastStyle=null,r.fluid&&(n.root.style.width="100%",n.root.style.height="0",n.root.style["padding-top"]="".concat(100*r.height/r.width,"%")),this.emit(BC,!1),this.isMini=n.isMini=!1}},{key:"destroy",value:function(){window.removeEventListener("scroll",this.onScroll);var e=ZT.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(rA(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}(Rx),gA={mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mousemove:"onMouseMove"},yA=["videoClick","videoDbClick"],mA=function(e){lS(n,e);var t=dS(n);function n(){var e,r;iS(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return sS(hS(r=t.call.apply(t,Bm(e=[this]).call(e,o))),"onMouseMove",(function(e){var t=hS(r),n=t.player,i=t.playerConfig;n.isActive||(n.focus({autoHide:!i.closeDelayBlur}),!i.closeFocusVideoFocus&&n.media.focus())})),sS(hS(r),"onMouseEnter",(function(e){var t=hS(r),n=t.playerConfig,i=t.player;!n.closeFocusVideoFocus&&i.media.focus(),n.closeDelayBlur?i.focus({autoHide:!1}):i.focus(),r.emit(LC)})),sS(hS(r),"onMouseLeave",(function(e){var t=r.playerConfig,n=t.closePlayerBlur,i=t.leavePlayerTime,o=t.closeDelayBlur;n||o||(i?r.player.focus({autoHide:!0,delay:i}):r.player.blur({ignorePaused:!0})),r.emit(DC)})),sS(hS(r),"onVideoClick",(function(e){var t=hS(r),n=t.player,i=t.playerConfig;e.target&&i.closeVideoClick||e.target!==n.root&&e.target!==n.media&&e.target!==n.innerContainer&&e.target!==n.media.__canvas||(e.preventDefault(),i.closeVideoStopPropagation||e.stopPropagation(),r._clickCount++,r.clickTimer&&(clearTimeout(r.clickTimer),r.clickTimer=null),r.clickTimer=setTimeout((function(){r._clickCount&&(r._clickCount--,gx(hS(r),yA[0],(function(e,t){r.switchPlayPause(t.e)}),{e:e,paused:n.paused}),clearTimeout(r.clickTimer),r.clickTimer=null)}),300))})),sS(hS(r),"onVideoDblClick",(function(e){var t=hS(r),n=t.player,i=t.playerConfig;i.closeVideoDblclick||!e.target||e.target!==n.media&&e.target!==n.media.__canvas||(!i.closeVideoClick&&r._clickCount<2?r._clickCount=0:(r._clickCount=0,r.clickTimer&&(clearTimeout(r.clickTimer),r.clickTimer=null),e.preventDefault(),e.stopPropagation(),gx(hS(r),yA[1],(function(e,t){r.emitUserAction(t.e,"switch_fullscreen",{props:"fullscreen",from:n.fullscreen,to:!n.fullscreen}),n.fullscreen?n.exitFullscreen():n.getFullscreen()}),{e:e,fullscreen:n.fullscreen})))})),r}return aS(n,[{key:"afterCreate",value:function(){var e=this;this._clickCount=0,Vw(yA).call(yA,(function(t){e.__hooks[t]=null})),"mobile"===this.playerConfig.isMobileSimulateMode||"mobile"===aC.device&&!aC.os.isIpad||this.initEvents()}},{key:"initEvents",value:function(){var e,t=this,n=this.player,r=n.media,i=n.root,o=this.playerConfig.enableContextmenu;i&&i.addEventListener("click",this.onVideoClick,!1),i&&i.addEventListener("dblclick",this.onVideoDblClick,!1),Vw(e=zw(gA)).call(e,(function(e){i.addEventListener(e,t[gA[e]],!1)})),!o&&r&&r.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,r=n.video,i=n.root;this.clickTimer&&clearTimeout(this.clickTimer),i.removeEventListener("click",this.onVideoClick,!1),i.removeEventListener("dblclick",this.onVideoDblClick,!1),r.removeEventListener("contextmenu",this.onContextmenu,!1),Vw(e=zw(gA)).call(e,(function(e){i.removeEventListener(e,t[gA[e]],!1)}))}}],[{key:"pluginName",get:function(){return"pc"}},{key:"defaultConfig",get:function(){return{}}}]),n}(mx),_A="press",bA="pressend",wA="doubleclick",kA="click",EA="touchmove",SA="touchstart",TA="touchend",CA={start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},xA={start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseleave"};function PA(e){return e&&e.length>0?e[e.length-1]:null}var AA=function(){function e(t){var n,r=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{eventType:"touch"};iS(this,e),sS(this,"onTouchStart",(function(e){var t=r._pos,n=r.root,i=PA(e.touches);t.x=i?Dk(i.pageX,10):e.pageX,t.y=i?Dk(i.pageX,10):e.pageX,t.start=!0,r.__setPress(e),n.addEventListener(r.events.end,r.onTouchEnd),n.addEventListener(r.events.cancel,r.onTouchCancel),n.addEventListener(r.events.move,r.onTouchMove),r.trigger(SA,e)})),sS(this,"onTouchCancel",(function(e){r.onTouchEnd(e)})),sS(this,"onTouchEnd",(function(e){var t=r._pos,n=r.root;r.__clearPress(),n.removeEventListener(r.events.cancel,r.onTouchCancel),n.removeEventListener(r.events.end,r.onTouchEnd),n.removeEventListener(r.events.move,r.onTouchMove),e.moving=t.moving,e.press=t.press,t.press&&r.trigger(bA,e),r.trigger(TA,e),!t.press&&!t.moving&&r.__setDb(e),t.press=!1,t.start=!1,t.moving=!1})),sS(this,"onTouchMove",(function(e){var t=r._pos,n=r.config,i=PA(e.touches),o=i?Dk(i.pageX,10):e.pageX,a=i?Dk(i.pageY,10):e.pageX,s=o-t.x,l=a-t.y;Math.abs(l)<n.miniStep&&Math.abs(s)<n.miniStep||(r.__clearPress(),t.press&&r.trigger(bA,e),t.press=!1,t.moving=!0,r.trigger(EA,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},Vw(n=zw(i)).call(n,(function(e){r.config[e]=i[e]})),this.root=t,this.events="mouse"===i.eventType?xA:CA,this.pressIntrvalId=null,this.dbIntrvalId=null,this.__handlers={},this._initEvent()}return aS(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(_A,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(wA,e);this.dbIntrvalId=setTimeout((function(){t.__clearDb(),t._pos.start||t._pos.press||t._pos.moving||t.trigger(kA,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,r=this.__handlers[e],i=-1,o=0;o<r.length;o++)if(r[o]===t){i=o;break}if(i>=0)hk(n=this.__handlers[e]).call(n,i,1)}}},{key:"trigger",value:function(e,t){var n;this.__handlers[e]&&Vw(n=this.__handlers[e]).call(n,(function(n){try{n(t)}catch(Qz){console.error("trigger>>:".concat(e),Qz)}}))}},{key:"destroy",value:function(){var e=this,t={touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"};zw(t).forEach((function(n){e.root.removeEventListener(n,e[t[n]])}))}}]),e}();function IA(){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 RA="auto",OA="seeking",MA="playbackrate",DA=["videoClick","videoDbClick"],LA=function(e){lS(n,e);var t=dS(n);function n(e){var r;return iS(this,n),sS(hS(r=t.call(this,e)),"onTouchStart",(function(e){var t=hS(r),n=t.player,i=t.config,o=t.pos,a=t.playerConfig,s=r.getTouche(e);if(s&&!i.disableGesture&&r.duration>0&&!n.ended){o.isStart=!0,r.timer&&clearTimeout(r.timer),ZT.checkIsFunction(a.disableSwipeHandler)&&a.disableSwipeHandler(),Ym(r).call(r,".xg-dur").innerHTML=ZT.format(r.duration);var l=r.root.getBoundingClientRect();90===n.rotateDeg?(o.top=l.left,o.left=l.top,o.width=l.height,o.height=l.width):(o.top=l.top,o.left=l.left,o.width=l.width,o.height=l.height);var u=Dk(s.pageX-o.left,10),c=Dk(s.pageY-o.top,10);o.x=90===n.rotateDeg?c:u,o.y=90===n.rotateDeg?u:c,o.scopeL=i.scopeL*o.width,o.scopeR=(1-i.scopeR)*o.width,o.scopeM1=o.width*(1-i.scopeM)/2,o.scopeM2=o.width-o.scopeM1}})),sS(hS(r),"onTouchMove",(function(e){var t=r.getTouche(e),n=hS(r),i=n.pos,o=n.config,a=n.player;if(t&&!o.disableGesture&&r.duration&&i.isStart){var s=o.miniMoveStep,l=o.hideControlsActive,u=Dk(t.pageX-i.left,10),c=Dk(t.pageY-i.top,10),h=90===a.rotateDeg?c:u,f=90===a.rotateDeg?u:c;if(Math.abs(h-i.x)>s||Math.abs(f-i.y)>s){var d=h-i.x,p=f-i.y,v=i.scope;if(-1===v&&(0===(v=r.checkScope(h,f,d,p,i))&&(l?a.blur():a.focus({autoHide:!1}),!i.time&&(i.time=Dk(1e3*a.currentTime,10)+1e3*r.timeOffset)),i.scope=v),-1===v||v>0&&!o.gestureY||0===v&&!o.gestureX)return;r.executeMove(d,p,v,i.width,i.height),i.x=h,i.y=f}}})),sS(hS(r),"onTouchEnd",(function(e){var t=hS(r),n=t.player,i=t.pos,o=t.playerConfig;if(setTimeout((function(){n.getPlugin("progress")&&n.getPlugin("progress").resetSeekState()}),10),i.isStart){i.scope>-1&&e.cancelable&&e.preventDefault();var a=r.config,s=a.disableGesture,l=a.gestureX;!s&&l?r.endLastMove(i.scope):i.time=0,i.scope=-1,r.resetPos(),ZT.checkIsFunction(o.enableSwipeHandler)&&o.enableSwipeHandler(),r.changeAction(RA)}})),sS(hS(r),"onRootTouchMove",(function(e){!r.config.disableGesture&&r.config.gestureX&&r.checkIsRootTarget(e)&&(e.stopPropagation(),r.pos.isStart?r.onTouchMove(e):r.onTouchStart(e))})),sS(hS(r),"onRootTouchEnd",(function(e){r.pos.scope>-1&&r.onTouchEnd(e)})),r.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},r.timer=null,r}return aS(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:IA,class:"xg-seek-pre"}}}},{key:"afterCreate",value:function(){var e,t=this;Vw(DA).call(DA,(function(e){t.__hooks[e]=null}));var n=this.playerConfig,r=this.config,i=this.player;!0===n.closeVideoDblclick&&(r.closedbClick=!0),this.resetPos(),ZT.isUndefined(n.disableGesture)||(r.disableGesture=!!n.disableGesture),this.appendChild(".xg-seek-icon",this.icons.seekTipIcon),this.xgMask=ZT.createDom("xg-mask","",{},"xgmask"),i.root.appendChild(this.xgMask),this.initCustomStyle(),this.registerThumbnail();var o="mouse"===this.domEventType?"mouse":"touch";this.touch=new AA(this.root,{eventType:o,needPreventDefault:!this.config.disableGesture}),this.root.addEventListener("contextmenu",(function(e){e.preventDefault()})),i.root.addEventListener("touchmove",this.onRootTouchMove,!0),i.root.addEventListener("touchend",this.onRootTouchEnd,!0),i.root.addEventListener("touchcancel",this.onRootTouchEnd,!0);var a=this.player.controls;a&&a.center&&(a.center.addEventListener("touchmove",this.onRootTouchMove,!0),a.center.addEventListener("touchend",this.onRootTouchEnd,!0),a.center.addEventListener("touchcancel",this.onRootTouchEnd,!0)),this.on(_C,(function(){var e=t.player,n=t.config;e.duration>0&&1e3*e.duration<n.moveDuration&&(n.moveDuration=1e3*e.duration)})),this.on([mC,fC],(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(Vw(e=zw(s)).call(e,(function(e){t.touch.on(e,(function(n){t[s[e]](n)}))})),!r.disableActive){var l=i.plugins.progress;l&&(l.addCallBack("dragmove",(function(e){t.activeSeekNote(e.currentTime,e.forward)})),["dragend","click"].forEach((function(e){l.addCallBack(e,(function(){t.changeAction(RA)}))})))}}},{key:"registerThumbnail",value:function(){var e=this.player.plugins.thumbnail;if(e&&e.usable){this.thumbnail=e.createThumbnail(null,"mobile-thumbnail");var t=Ym(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,r=e.timePreviewStyle,i=e.curTimeColor,o=e.durationColor;t&&(Ym(this).call(this,".xg-curbar").style.backgroundColor=t);n&&(Ym(this).call(this,".xg-bar").style.backgroundColor=n);if(r){var a=Ym(this).call(this,".time-preview");zw(r).forEach((function(e){a.style[e]=r[e]}))}var s=i||t,l=o;s&&(Ym(this).call(this,".xg-cur").style.color=s),l&&(Ym(this).call(this,".xg-dur").style.color=l),this.config.disableTimeProgress&&ZT.addClass(Ym(this).call(this,".xg-timebar"),"hide")}},{key:"resetPos",value:function(){var e,t=this;this.pos?(this.pos.isStart=!1,this.pos.scope=-1,Vw(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,r,i){var o=i.width,a=-1;if(e<0||e>o)return a;var s=0===r?Math.abs(n):Math.abs(n/r);return Math.abs(n)>0&&s>=1.73&&e>i.scopeM1&&e<i.scopeM2?a=0:(0===Math.abs(n)||s<=.57)&&(a=e<i.scopeL?1:e>i.scopeR?2:3),a}},{key:"executeMove",value:function(e,t,n,r,i){switch(n){case 0:this.updateTime(e/r*this.config.scopeM);break;case 1:this.updateBrightness(t/i);break;case 2:aC.os.isIos||this.updateVolume(t/i)}}},{key:"endLastMove",value:function(e){var t=this,n=this.pos,r=this.player,i=this.config,o=(n.time-this.timeOffset)/1e3;if(0===e)r.seek(Number(o).toFixed(1)),i.hideControlsEnd?r.blur():r.focus(),this.timer=setTimeout((function(){t.pos.time=0}),500);this.changeAction(RA)}},{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,r=this.playerConfig;t.state<gP?r.closeVideoClick||(this.sendUseAction(ZT.createEvent("click")),t.play()):!n.closedbClick||r.closeVideoClick?t.isActive?t.blur():t.focus():r.closeVideoClick||((t.isActive||n.focusVideoClick)&&(this.sendUseAction(ZT.createEvent("click")),this.switchPlayPause()),t.focus())}},{key:"dbClickHandler",value:function(e){var t=this.config,n=this.player;!t.closedbClick&&n.state>=gP&&(this.sendUseAction(ZT.createEvent("dblclick")),this.switchPlayPause())}},{key:"onClick",value:function(e){var t=this,n=this.player;gx(this,DA[0],(function(e,n){t.clickHandler(n.e)}),{e:e,paused:n.paused})}},{key:"onDbClick",value:function(e){var t=this,n=this.player;gx(this,DA[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,r=this.player;n.disablePress||(t.rate=this.player.playbackRate,this.emitUserAction("press","change_rate",{prop:"playbackRate",from:r.playbackRate,to:n.pressRate}),r.playbackRate=n.pressRate,this.changeAction(MA))}},{key:"onPressEnd",value:function(e){var t=this.pos,n=this.config,r=this.player;n.disablePress||(this.emitUserAction("pressend","change_rate",{prop:"playbackRate",from:r.playbackRate,to:t.rate}),r.playbackRate=t.rate,t.rate=1,this.changeAction(RA))}},{key:"updateTime",value:function(e){var t=this.player,n=this.config,r=this.player.duration;e=Number(e.toFixed(4));var i=Dk(e*n.moveDuration,10)+this.timeOffset;i=(i+=this.pos.time)<0?0:i>1e3*r?1e3*r-200:i,t.getPlugin("time")&&t.getPlugin("time").updateTime(i/1e3),t.getPlugin("progress")&&t.getPlugin("progress").updatePercent(i/1e3/this.duration,!0),this.activeSeekNote(i/1e3,e>0),n.isTouchingSeek&&t.seek(Number((i-this.timeOffset)/1e3).toFixed(1)),this.pos.time=i}},{key:"updateVolume",value:function(e){this.player.rotateDeg&&(e=-e);var t=this.player,n=this.pos;if(e=Dk(100*e,10),n.volume+=e,!(Math.abs(n.volume)<10)){var r=Dk(10*t.volume,10)-Dk(n.volume/10,10);r=r>10?10:r<1?0:r,t.volume=r/10,n.volume=0}}},{key:"updateBrightness",value:function(e){var t=this.pos,n=this.config,r=this.xgMask;if(n.darkness){this.player.rotateDeg&&(e=-e);var i=t.light+.8*e;i=i>n.maxDarkness?n.maxDarkness:i<0?0:i,r&&(r.style.backgroundColor="rgba(0,0,0,".concat(i,")")),t.light=i}}},{key:"activeSeekNote",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.player,r=this.config,i=!(this.duration!==1/0&&this.duration>0);if(e&&"number"==typeof e&&!i&&!r.disableActive){e<0?e=0:e>n.duration&&(e=n.duration-.2),this.changeAction(OA);var o=n.plugins.start;if(o&&o.focusHide(),Ym(this).call(this,".xg-dur").innerHTML=ZT.format(this.duration),Ym(this).call(this,".xg-cur").innerHTML=ZT.format(e),Ym(this).call(this,".xg-curbar").style.width="".concat(e/this.duration*100,"%"),t)ZT.removeClass(Ym(this).call(this,".xg-seek-show"),"xg-back");else ZT.addClass(Ym(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<pP)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,r="normal"!==this.config.gradient?"gradient ".concat(this.config.gradient):"gradient";return Bm(e=Bm(t=Bm(n='\n <xg-trigger class="trigger">\n <div class="'.concat(r,'"></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}(Rx);On({target:"String",proto:!0},{repeat:TS});var FA=Gc("String").repeat,NA=ce,UA=FA,BA=String.prototype,VA=o((function(e){var t=e.repeat;return"string"==typeof e||e===BA||NA(BA,e)&&t===BA.repeat?UA:t}));function HA(e){var t=e.tagName;return!("INPUT"!==t&&"TEXTAREA"!==t&&!e.isContentEditable)}var jA=function(e){lS(n,e);var t=dS(n);function n(){var e,r;iS(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return sS(hS(r=t.call.apply(t,Bm(e=[this]).call(e,o))),"onBodyKeyDown",(function(e){if(r.player){var t=e||window.event,n=t.keyCode,i=hS(r),o=i._keyState,a=i.player,s=r.config,l=s.disable,u=s.disableBodyTrigger,c=s.isIgnoreUserActive;l||u||!a.isUserActive&&!c||HA(t.target)||!r.checkIsVisible()||t.metaKey||t.altKey||t.ctrlKey?o.isBodyKeyDown=!1:(VA(e)||o.isKeyDown||((t.target===document.body||r.config.isGlobalTrigger&&!HA(t.target))&&r.checkCode(n,!0)&&(o.isBodyKeyDown=!0),document.addEventListener("keyup",r.onBodyKeyUp)),o.isBodyKeyDown&&r.handleKeyDown(t))}})),sS(hS(r),"onBodyKeyUp",(function(e){r.player&&(document.removeEventListener("keyup",r.onBodyKeyUp),r.handleKeyUp(e))})),sS(hS(r),"onKeydown",(function(e){if(r.player){var t=e||window.event,n=hS(r)._keyState;if(!VA(t)){if(r.config.disable||r.config.disableRootTrigger||t.metaKey||t.altKey||t.ctrlKey)return;!t||37!==t.keyCode&&!r.checkCode(t.keyCode)||t.target!==r.player.root&&t.target!==r.player.video&&t.target!==r.player.controls.el||(n.isKeyDown=!0),r.player.root.addEventListener("keyup",r.onKeyup)}n.isKeyDown&&r.handleKeyDown(t)}})),sS(hS(r),"onKeyup",(function(e){r.player&&(r.player.root.removeEventListener("keyup",r.onKeyup),r.handleKeyUp(e))})),r}return aS(n,[{key:"mergekeyCodeMap",value:function(){var e,t=this,n=this.config.keyCodeMap;n&&Vw(e=zw(n)).call(e,(function(e){var r;t.keyCodeMap[e]?Vw(r=["keyCode","action","disable","pressAction","disablePress","isBodyTarget"]).call(r,(function(r){n[e][r]&&(t.keyCodeMap[e][r]=n[e][r])})):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;zw(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,r=e.bottom,i=window.innerHeight;return!(n<0&&n<0-.9*t||r>0&&r-i>.9*t)}},{key:"checkCode",value:function(e,t){var n,r=this,i=!1;return Vw(n=zw(this.keyCodeMap)).call(n,(function(n){r.keyCodeMap[n]&&e===r.keyCodeMap[n].keyCode&&!r.keyCodeMap[n].disable&&(i=!t||t&&!r.keyCodeMap[n].noBodyTarget)})),i}},{key:"downVolume",value:function(e){var t=this.player;if(!(t.volume<=0)){var n=QS((t.volume-.1).toFixed(1)),r={volume:{from:t.volume,to:n}};this.emitUserAction(e,"change_volume",{props:r}),t.volume=n>=0?n:0}}},{key:"upVolume",value:function(e){var t=this.player;if(!(t.volume>=1)){var n=QS((t.volume+.1).toFixed(1)),r={volume:{from:t.volume,to:n}};this.emitUserAction(e,"change_volume",{props:r}),t.volume=n<=1?n:1}}},{key:"seek",value:function(e){var t=this.player,n=t.currentTime,r=t.offsetCurrentTime,i=t.duration,o=t.offsetDuration,a=t.timeSegments,s=r>-1?r:n,l=o||i,u=VA(e)&&this.seekStep>=4?Dk(this.seekStep/2,10):this.seekStep;s+u<=l?s+=u:s=l;var c=ZT.getCurrentTimeByOffset(s,a),h={currentTime:{from:n,to:c}};this.emitUserAction(e,"seek",{props:h}),this.player.currentTime=c}},{key:"seekBack",value:function(e){var t=this.player,n=t.currentTime,r=t.offsetCurrentTime,i=t.timeSegments,o=(r>-1?r:n)-(VA(e)?Dk(this.seekStep/2,10):this.seekStep);o<0&&(o=0);var a={currentTime:{from:n,to:o=ZT.getCurrentTimeByOffset(o,i)}};this.emitUserAction(e,"seek",{props:a}),this.player.currentTime=o}},{key:"changePlaybackRate",value:function(e){var t=this._keyState,n=this.config,r=this.player;0===t.playbackRate&&(t.playbackRate=r.playbackRate,r.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,r=t.cssfullscreen;n&&(this.emitUserAction("keyup","switch_fullscreen",{prop:"fullscreen",from:n,to:!n}),t.exitFullscreen()),r&&(this.emitUserAction("keyup","switch_css_fullscreen",{prop:"cssfullscreen",from:r,to:!r}),t.exitCssFullscreen())}},{key:"handleKeyDown",value:function(e){var t=this._keyState;if(VA(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 r,i=zw(this.keyCodeMap),o=0;o<i.length;o++){var a=this.keyCodeMap[i[o]],s=a.action,l=a.keyCode,u=a.disable,c=a.pressAction,h=a.disablePress;if(l===e){if(!(u||n&&h)){var f=n&&c||s;"function"==typeof f?s(t,this.player,n):"string"==typeof f&&"function"==typeof this[f]&&this[f](t,this.player,n),this.emit(qC,nS({key:i[o],target:t.target,isPress:n},this.keyCodeMap[i[o]]))}(r=t).preventDefault(),r.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}(mx);function zA(){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 WA=function(e){lS(n,e);var t=dS(n);function n(){return iS(this,n),t.apply(this,arguments)}return aS(n,[{key:"registerIcons",value:function(){return{loadingIcon:zA}}},{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:Cx.ROOT}}}]),n}(Rx),KA=On,GA=ra.findIndex,qA="findIndex",YA=!0;qA in[]&&Array(1)[qA]((function(){YA=!1})),KA({target:"Array",proto:!0,forced:YA},{findIndex:function(e){return GA(this,e,arguments.length>1?arguments[1]:void 0)}});var XA=Gc("Array").findIndex,$A=ce,JA=XA,QA=Array.prototype,ZA=o((function(e){var t=e.findIndex;return e===QA||$A(QA,e)&&t===QA.findIndex?JA:t})),eI=function(e){lS(n,e);var t=dS(n);function n(){var e,r;iS(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return sS(hS(r=t.call.apply(t,Bm(e=[this]).call(e,o))),"_onMouseenter",(function(e){r.emit("icon_mouseenter",{pluginName:r.pluginName})})),sS(hS(r),"_onMouseLeave",(function(e){r.emit("icon_mouseleave",{pluginName:r.pluginName})})),r}return aS(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}(Rx),tI=function(e){lS(n,e);var t=dS(n);function n(){var e,r;iS(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return sS(hS(r=t.call.apply(t,Bm(e=[this]).call(e,o))),"btnClick",(function(e){e.preventDefault(),e.stopPropagation();var t=hS(r).player;return r.emitUserAction(e,"switch_play_pause",{prop:"paused",from:t.paused,to:!t.paused}),t.ended?t.replay():t.paused?(t.play(),r.animate(!1)):(t.pause(),r.animate(!0)),!1})),r}return aS(n,[{key:"afterCreate",value:function(){pS(uS(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([hC,dC,pC,kC],(function(){e.animate(t.paused)}))}},{key:"registerIcons",value:function(){return{play:{icon:JP,class:"xg-icon-play"},pause:{icon:QP,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=Ym(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(){pS(uS(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(rA(this,"PLAY_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"play"}},{key:"defaultConfig",get:function(){return{position:Cx.CONTROLS_LEFT,index:0,disable:!1}}}]),n}(eI);function nI(){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 rI=function(e){lS(n,e);var t=dS(n);function n(){return iS(this,n),t.apply(this,arguments)}return aS(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:nI,class:"xg-fullscreen-back"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(this.root,e.screenBack)}},{key:"show",value:function(){ZT.addClass(this.root,"show")}},{key:"hide",value:function(){ZT.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:Cx.ROOT_TOP,index:0}}}]),n}(Rx);function iI(){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 oI(){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 aI=function(e){lS(n,e);var t=dS(n);function n(){var e,r;iS(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return sS(hS(r=t.call.apply(t,Bm(e=[this]).call(e,o))),"_onOrientationChange",(function(e){r.player.fullscreen&&r.config.rotateFullscreen&&(90===window.orientation||-90===window.orientation?r.player.setRotateDeg(0):r.player.setRotateDeg(90))})),r}return aS(n,[{key:"afterCreate",value:function(){var e=this;pS(uS(n.prototype),"afterCreate",this).call(this);var t=this.config,r=this.playerConfig;if(!t.disable){t.target&&(this.playerConfig.fullscreenTarget=this.config.target);var i=ZT.getFullScreenEl();r.fullscreenTarget===i&&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(NC,(function(t){var n=Ym(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:rI,options:{config:{onClick:function(t){e.handleFullscreen(t)}}}})),"mobile"===aC.device&&window.addEventListener("orientationchange",this._onOrientationChange)}}},{key:"registerIcons",value:function(){return{fullscreen:{icon:iI,class:"xg-get-fullscreen"},exitFullscreen:{icon:oI,class:"xg-exit-fullscreen"}}}},{key:"destroy",value:function(){pS(uS(n.prototype),"destroy",this).call(this),this.unbind(".xgplayer-icon","mobile"===aC.device?"touchend":"click",this.handleFullscreen),"mobile"===aC.device&&window.removeEventListener("orientationchange",this._onOrientationChange)}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.fullscreen),this.appendChild(".xgplayer-icon",e.exitFullscreen)}},{key:"toggleFullScreen",value:function(e){e instanceof Event&&(e.preventDefault(),e.stopPropagation());var t=this.player,n=this.config;!0===n.useCssFullscreen||"function"==typeof n.useCssFullscreen&&n.useCssFullscreen()?(t.fullscreen?t.exitCssFullscreen():t.getCssFullscreen(),this.animate(t.fullscreen)):n.rotateFullscreen?(t.fullscreen?t.exitRotateFullscreen():t.getRotateFullscreen(),this.animate(t.fullscreen)):n.switchCallback&&"function"==typeof n.switchCallback?n.switchCallback(t.fullscreen):t.fullscreen?(t.exitFullscreen(),n.useScreenOrientation&&this.unlockScreen()):(t.getFullscreen().catch((function(e){})),n.useScreenOrientation&&t.aspectRatio>1&&this.lockScreen(n.lockOrientationType))}},{key:"animate",value:function(e){e?this.setAttr("data-state","full"):this.setAttr("data-state","normal"),this.topBackIcon&&(e?(this.topBackIcon.show(),this.hide()):(this.topBackIcon.hide(),this.show()))}},{key:"render",value:function(){if(!this.config.disable){return'<xg-icon class="xgplayer-fullscreen">\n <div class="xgplayer-icon">\n </div>\n '.concat(rA(this,"FULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}},{key:"lockScreen",value:function(e){try{screen.orientation.lock(e).catch((function(e){}))}catch(rj){}}},{key:"unlockScreen",value:function(){try{screen.orientation.unlock().catch((function(e){}))}catch(rj){}}}],[{key:"pluginName",get:function(){return"fullscreen"}},{key:"defaultConfig",get:function(){return{position:Cx.CONTROLS_RIGHT,index:0,useCssFullscreen:!1,rotateFullscreen:!1,useScreenOrientation:!1,lockOrientationType:"landscape",switchCallback:null,target:null,disable:!1,needBackIcon:!1}}}]),n}(eI);function sI(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="0 -10 28 40">\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M358.4 358.4h-204.8v307.2h204.8l256 256v-819.2l-256 256z"></path>\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="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 lI(){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 uI(){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 cI=function(e){lS(n,e);var t=dS(n);function n(){var e,r;iS(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return sS(hS(r=t.call.apply(t,Bm(e=[this]).call(e,o))),"onBarMousedown",(function(e){var t=hS(r).player,n=Ym(r).call(r,".xgplayer-bar");ZT.event(e);var i=n.getBoundingClientRect(),o=ZT.getEventPos(e,t.zoom),a=i.height-(o.clientY-i.top);if(o.h=a,o.barH=i.height,r.pos=o,!(a<-2))return r.updateVolumePos(a,e),document.addEventListener("mouseup",r.onBarMouseUp),r._d.isStart=!0,!1})),sS(hS(r),"onBarMouseMove",(function(e){var t=hS(r)._d;if(t.isStart){var n=hS(r),i=n.pos,o=n.player;e.preventDefault(),e.stopPropagation(),ZT.event(e);var a=ZT.getEventPos(e,o.zoom);t.isMoving=!0;var s=i.h-a.clientY+i.clientY;s>i.barH||r.updateVolumePos(s,e)}})),sS(hS(r),"onBarMouseUp",(function(e){ZT.event(e),document.removeEventListener("mouseup",r.onBarMouseUp);var t=hS(r)._d;t.isStart=!1,t.isMoving=!1})),sS(hS(r),"onMouseenter",(function(e){r._d.isActive=!0,r.focus(),r.emit("icon_mouseenter",{pluginName:r.pluginName})})),sS(hS(r),"onMouseleave",(function(e){r._d.isActive=!1,r.unFocus(100,!1,e),r.emit("icon_mouseleave",{pluginName:r.pluginName})})),sS(hS(r),"onVolumeChange",(function(e){if(r.player){var t=r.player,n=t.muted,i=t.volume;r._d.isMoving||(Ym(r).call(r,".xgplayer-drag").style.height=n||0===i?"4px":"".concat(100*i,"%"),r.config.showValueLabel&&r.updateVolumeValue()),r.animate(n,i)}})),r}return aS(n,[{key:"registerIcons",value:function(){return{volumeSmall:{icon:lI,class:"xg-volume-small"},volumeLarge:{icon:sI,class:"xg-volume"},volumeMuted:{icon:uI,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,r=t.volume;if(n.volumeColor)Ym(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"!==aC.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(bC,this.onVolumeChange),this.once(wC,this.onVolumeChange),"Number"!==ZT.typeOf(r)&&(this.player.volume=this.config.default),this.onVolumeChange()}}},{key:"updateVolumePos",value:function(e,t){var n=this.player,r=Ym(this).call(this,".xgplayer-drag"),i=Ym(this).call(this,".xgplayer-bar");if(i&&r){var o=Dk(e/i.getBoundingClientRect().height*1e3,10);r.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,r=Ym(this).call(this,".xgplayer-value-label"),i=Math.max(Math.min(t,1),0);r.innerText=n?0:Math.round(100*i)}},{key:"focus",value:function(){this.player.focus({autoHide:!1}),this._timerId&&(ZT.clearTimeout(this,this._timerId),this._timerId=null),ZT.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],r=arguments.length>2?arguments[2]:void 0,i=this._d,o=this.player;i.isActive||(this._timerId&&(ZT.clearTimeout(this,this._timerId),this._timerId=null),this._timerId=ZT.setTimeout(this,(function(){i.isActive||(n?o.blur():o.focus(),ZT.removeClass(e.root,"slide-show"),i.isStart&&e.onBarMouseUp(r)),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&&(ZT.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"===aC.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 Bm(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:Cx.CONTROLS_RIGHT,index:1,disable:!1,showValueLabel:!1,default:.6,miniVolume:.2}}}]),n}(Rx);function hI(){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 fI(){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 dI="picture-in-picture",pI="inline",vI="fullscreen",gI=function(e){lS(n,e);var t=dS(n);function n(){var e,r;iS(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return sS(hS(r=t.call.apply(t,Bm(e=[this]).call(e,o))),"switchPIP",(function(e){if(!r.isPIPAvailable())return!1;e.stopPropagation&&e.stopPropagation(),r.isPip?(r.exitPIP(),r.emitUserAction(e,"change_pip",{props:"pip",from:!0,to:!1}),r.setAttr("data-state","normal")):4===r.player.media.readyState&&(r.requestPIP(),r.emitUserAction(e,"change_pip",{props:"pip",from:!1,to:!0}),r.setAttr("data-state","pip"))})),r}return aS(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()&&(pS(uS(n.prototype),"afterCreate",this).call(this),this.pMode=pI,this.initPipEvents(),this.config.showIcon&&this.initIcons(),this.once(AC,(function(){e.config.showIcon&&(ZT.removeClass(Ym(e).call(e,".xgplayer-icon"),"xg-icon-disable"),e.bind("click",e.switchPIP))})))}},{key:"registerIcons",value:function(){return{pipIcon:{icon:hI,class:"xg-get-pip"},pipIconExit:{icon:fI,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;ZT.setTimeout(e,(function(){!n&&t.mediaPlay()}),0),!n&&t.mediaPlay(),e.setAttr("data-state","normal"),e.pipWindow=null,t.emit(KC,!1)},this.enterPIPCallback=function(n){t.emit(KC,!0),null!=n&&n.pictureInPictureWindow&&(e.pipWindow=n.pictureInPictureWindow),e.setAttr("data-state","pip")},this.onWebkitpresentationmodechanged=function(n){var r=t.media.webkitPresentationMode;e.pMode===vI&&r!==vI&&t.onFullscreenChange(null,!1),e.pMode=r,r===dI?e.enterPIPCallback(n):r===pI&&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,r=zk(t=Vw(n=vS(document.styleSheets)).call(n,(function(t){try{var n;return Vw(n=vS(t.cssRules)).call(n,(function(e){return e.cssText})).join("")}catch(rj){var r=document.createElement("link");r.rel="stylesheet",r.type=t.type,r.media=t.media,r.href=t.href,e.document.head.appendChild(r)}return""}))).call(t,Boolean).join("\n"),i=document.createElement("style");i.textContent=r,e.document.head.appendChild(i)}},{key:"requestPIP",value:function(){var e=this,t=this.player,r=this.playerConfig,i=this.config;if(this.isPIPAvailable()&&!this.isPip)try{var o=r.poster;if(o&&(t.media.poster="String"===ZT.typeOf(o)?o:o.poster),i.preferDocument&&this.isDocPIPAvailable()){var a={};if(i.width&&i.height)a.width=i.width,a.height=i.height;else{var s=t.root.getBoundingClientRect();a.width=s.width,a.height=s.height}documentPictureInPicture.requestWindow(a).then((function(n){var r=i.docPiPNode,o=i.docPiPStyle;e.enterPIPCallback();var a=r||t.root,s=a.parentElement,l=a.previousSibling,u=a.nextSibling;e.copyStyleIntoPiPWindow(n);var c=document.createElement("style");if(c.append("body{padding:0; margin:0;}"),o){var h="";"string"==typeof o?h=o:"function"==typeof o&&(h=o.call(i)),h&&c.append(h)}else a===t.root&&c.append("\n .xgplayer{width: 100%!important; height: 100%!important;}\n ");n.document.head.append(c),n.document.body.append(a),n.addEventListener("pagehide",(function(t){s&&(u?s.insertBefore(a,u):l?s.insertBefore(a,l.nextSibling):s.appendChild(a)),e.leavePIPCallback()}),{once:!0})}))}else n.checkWebkitSetPresentationMode(t.media)?t.media.webkitSetPresentationMode("picture-in-picture"):t.media.requestPictureInPicture();return!0}catch(l){return console.error("requestPiP",l),!1}}},{key:"exitPIP",value:function(){var e=this.player;try{var t;if(this.isPIPAvailable()&&this.isPip)this.isDocPIPAvailable()&&null!==(t=documentPictureInPicture)&&void 0!==t&&t.window?documentPictureInPicture.window.close():n.checkWebkitSetPresentationMode(e.media)?e.media.webkitSetPresentationMode("inline"):document.exitPictureInPicture();return!0}catch(r){return console.error("exitPIP",r),!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===dI}},{key:"isPIPAvailable",value:function(){var e=this.player.media;return"Boolean"===ZT.typeOf(document.pictureInPictureEnabled)&&document.pictureInPictureEnabled&&("Boolean"===ZT.typeOf(e.disablePictureInPicture)&&!e.disablePictureInPicture||e.webkitSupportsPresentationMode&&"Function"===ZT.typeOf(e.webkitSetPresentationMode))||this.isDocPIPAvailable()}},{key:"isDocPIPAvailable",value:function(){return"documentPictureInPicture"in window&&/^(https|file)/.test(location.protocol)}},{key:"destroy",value:function(){pS(uS(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(rA(this,"PIP",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"pip"}},{key:"defaultConfig",get:function(){return{position:Cx.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}(eI),yI=l,mI=vt("iterator"),_I=!yI((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,r){t.delete("b"),n+=r+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[mI]||"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})),bI=_,wI=2147483647,kI=/[^\0-\u007E]/,EI=/[.\u3002\uFF0E\uFF61]/g,SI="Overflow: input needs wider integers to process",TI=RangeError,CI=bI(EI.exec),xI=Math.floor,PI=String.fromCharCode,AI=bI("".charCodeAt),II=bI([].join),RI=bI([].push),OI=bI("".replace),MI=bI("".split),DI=bI("".toLowerCase),LI=function(e){return e+22+75*(e<26)},FI=function(e,t,n){var r=0;for(e=n?xI(e/700):e>>1,e+=xI(e/t);e>455;)e=xI(e/35),r+=36;return xI(r+36*e/(e+38))},NI=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=AI(e,n++);if(i>=55296&&i<=56319&&n<r){var o=AI(e,n++);56320==(64512&o)?RI(t,((1023&i)<<10)+(1023&o)+65536):(RI(t,i),n--)}else RI(t,i)}return t}(e);var n,r,i=e.length,o=128,a=0,s=72;for(n=0;n<e.length;n++)(r=e[n])<128&&RI(t,PI(r));var l=t.length,u=l;for(l&&RI(t,"-");u<i;){var c=wI;for(n=0;n<e.length;n++)(r=e[n])>=o&&r<c&&(c=r);var h=u+1;if(c-o>xI((wI-a)/h))throw TI(SI);for(a+=(c-o)*h,o=c,n=0;n<e.length;n++){if((r=e[n])<o&&++a>wI)throw TI(SI);if(r==o){for(var f=a,d=36;;){var p=d<=s?1:d>=s+26?26:d-s;if(f<p)break;var v=f-p,g=36-p;RI(t,PI(LI(p+v%g))),f=xI(v/g),d+=36}RI(t,PI(LI(f))),s=FI(a,h,u==l),a=0,u++}}a++,o++}return II(t,"")},UI=On,BI=s,VI=L,HI=_,jI=O,zI=_I,WI=ao,KI=lo,GI=F_,qI=Mo,YI=Kl,XI=Xo,$I=Qf,JI=I,QI=tt,ZI=Zt,eR=ir,tR=an,nR=re,rR=$r,iR=ji,oR=j,aR=nf,sR=Xh,lR=ud,uR=dT,cR=vt("iterator"),hR="URLSearchParams",fR=hR+"Iterator",dR=XI.set,pR=XI.getterFor(hR),vR=XI.getterFor(fR),gR=Object.getOwnPropertyDescriptor,yR=function(e){if(!jI)return BI[e];var t=gR(BI,e);return t&&t.value},mR=yR("fetch"),_R=yR("Request"),bR=yR("Headers"),wR=_R&&_R.prototype,kR=bR&&bR.prototype,ER=BI.RegExp,SR=BI.TypeError,TR=BI.decodeURIComponent,CR=BI.encodeURIComponent,xR=HI("".charAt),PR=HI([].join),AR=HI([].push),IR=HI("".replace),RR=HI([].shift),OR=HI([].splice),MR=HI("".split),DR=HI("".slice),LR=/\+/g,FR=Array(4),NR=function(e){return FR[e-1]||(FR[e-1]=ER("((?:%[\\da-f]{2}){"+e+"})","gi"))},UR=function(e){try{return TR(e)}catch(Qz){return e}},BR=function(e){var t=IR(e,LR," "),n=4;try{return TR(t)}catch(Qz){for(;n;)t=IR(t,NR(n--),UR);return t}},VR=/[!'()~]|%20/g,HR={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},jR=function(e){return HR[e]},zR=function(e){return IR(CR(e),VR,jR)},WR=YI((function(e,t){dR(this,{type:fR,iterator:aR(pR(e).entries),kind:t})}),"Iterator",(function(){var e=vR(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),!0),KR=function(e){this.entries=[],this.url=null,void 0!==e&&(nR(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===xR(e,0)?DR(e,1):e:rR(e)))};KR.prototype={type:hR,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,o,a,s,l=sR(e);if(l)for(n=(t=aR(e,l)).next;!(r=VI(n,t)).done;){if(o=(i=aR(tR(r.value))).next,(a=VI(o,i)).done||(s=VI(o,i)).done||!VI(o,i).done)throw SR("Expected sequence with length 2");AR(this.entries,{key:rR(a.value),value:rR(s.value)})}else for(var u in e)QI(e,u)&&AR(this.entries,{key:u,value:rR(e[u])})},parseQuery:function(e){if(e)for(var t,n,r=MR(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(n=MR(t,"="),AR(this.entries,{key:BR(RR(n)),value:BR(PR(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],AR(n,zR(e.key)+"="+zR(e.value));return PR(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var GR=function(){$I(this,qR);var e=dR(this,new KR(arguments.length>0?arguments[0]:void 0));jI||(this.length=e.entries.length)},qR=GR.prototype;if(GI(qR,{append:function(e,t){lR(arguments.length,2);var n=pR(this);AR(n.entries,{key:rR(e),value:rR(t)}),jI||this.length++,n.updateURL()},delete:function(e){lR(arguments.length,1);for(var t=pR(this),n=t.entries,r=rR(e),i=0;i<n.length;)n[i].key===r?OR(n,i,1):i++;jI||(this.length=n.length),t.updateURL()},get:function(e){lR(arguments.length,1);for(var t=pR(this).entries,n=rR(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){lR(arguments.length,1);for(var t=pR(this).entries,n=rR(e),r=[],i=0;i<t.length;i++)t[i].key===n&&AR(r,t[i].value);return r},has:function(e){lR(arguments.length,1);for(var t=pR(this).entries,n=rR(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){lR(arguments.length,1);for(var n,r=pR(this),i=r.entries,o=!1,a=rR(e),s=rR(t),l=0;l<i.length;l++)(n=i[l]).key===a&&(o?OR(i,l--,1):(o=!0,n.value=s));o||AR(i,{key:a,value:s}),jI||(this.length=i.length),r.updateURL()},sort:function(){var e=pR(this);uR(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=pR(this).entries,r=ZI(e,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new WR(this,"keys")},values:function(){return new WR(this,"values")},entries:function(){return new WR(this,"entries")}},{enumerable:!0}),WI(qR,cR,qR.entries,{name:"entries"}),WI(qR,"toString",(function(){return pR(this).serialize()}),{enumerable:!0}),jI&&KI(qR,"size",{get:function(){return pR(this).entries.length},configurable:!0,enumerable:!0}),qI(GR,hR),UI({global:!0,constructor:!0,forced:!zI},{URLSearchParams:GR}),!zI&&JI(bR)){var YR=HI(kR.has),XR=HI(kR.set),$R=function(e){if(nR(e)){var t,n=e.body;if(eR(n)===hR)return t=e.headers?new bR(e.headers):new bR,YR(t,"content-type")||XR(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),iR(e,{body:oR(0,rR(n)),headers:oR(0,t)})}return e};if(JI(mR)&&UI({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return mR(e,arguments.length>1?$R(arguments[1]):{})}}),JI(_R)){var JR=function(e){return $I(this,wR),new _R(e,arguments.length>1?$R(arguments[1]):{})};wR.constructor=JR,JR.prototype=wR,UI({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:JR})}}var QR,ZR=On,eO=O,tO=_I,nO=s,rO=Zt,iO=_,oO=ao,aO=lo,sO=Qf,lO=tt,uO=nE,cO=Ty,hO=Qi,fO=pc.codeAt,dO=function(e){var t,n,r=[],i=MI(OI(DI(e),EI,"."),".");for(t=0;t<i.length;t++)n=i[t],RI(r,CI(kI,n)?"xn--"+NI(n):n);return II(r,".")},pO=$r,vO=Mo,gO=ud,yO={URLSearchParams:GR,getState:pR},mO=Xo,_O=mO.set,bO=mO.getterFor("URL"),wO=yO.URLSearchParams,kO=yO.getState,EO=nO.URL,SO=nO.TypeError,TO=nO.parseInt,CO=Math.floor,xO=Math.pow,PO=iO("".charAt),AO=iO(/./.exec),IO=iO([].join),RO=iO(1..toString),OO=iO([].pop),MO=iO([].push),DO=iO("".replace),LO=iO([].shift),FO=iO("".split),NO=iO("".slice),UO=iO("".toLowerCase),BO=iO([].unshift),VO="Invalid scheme",HO="Invalid host",jO="Invalid port",zO=/[a-z]/i,WO=/[\d+-.a-z]/i,KO=/\d/,GO=/^0x/i,qO=/^[0-7]+$/,YO=/^\d+$/,XO=/^[\da-f]+$/i,$O=/[\0\t\n\r #%/:<>?@[\\\]^|]/,JO=/[\0\t\n\r #/:<>?@[\\\]^|]/,QO=/^[\u0000-\u0020]+/,ZO=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,eM=/[\t\n\r]/g,tM=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)BO(t,e%256),e=CO(e/256);return IO(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,o=0;o<8;o++)0!==e[o]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(t=r,n=i),t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=RO(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},nM={},rM=uO({},nM,{" ":1,'"':1,"<":1,">":1,"`":1}),iM=uO({},rM,{"#":1,"?":1,"{":1,"}":1}),oM=uO({},iM,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),aM=function(e,t){var n=fO(e,0);return n>32&&n<127&&!lO(t,e)?e:encodeURIComponent(e)},sM={ftp:21,file:null,http:80,https:443,ws:80,wss:443},lM=function(e,t){var n;return 2==e.length&&AO(zO,PO(e,0))&&(":"==(n=PO(e,1))||!t&&"|"==n)},uM=function(e){var t;return e.length>1&&lM(NO(e,0,2))&&(2==e.length||"/"===(t=PO(e,2))||"\\"===t||"?"===t||"#"===t)},cM=function(e){return"."===e||"%2e"===UO(e)},hM={},fM={},dM={},pM={},vM={},gM={},yM={},mM={},_M={},bM={},wM={},kM={},EM={},SM={},TM={},CM={},xM={},PM={},AM={},IM={},RM={},OM=function(e,t,n){var r,i,o,a=pO(e);if(t){if(i=this.parse(a))throw SO(i);this.searchParams=null}else{if(void 0!==n&&(r=new OM(n,!0)),i=this.parse(a,null,r))throw SO(i);(o=kO(new wO)).bindURL(this),this.searchParams=o}};OM.prototype={type:"URL",parse:function(e,t,n){var r,i,o,a,s,l=this,u=t||hM,c=0,h="",f=!1,d=!1,p=!1;for(e=pO(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=DO(e,QO,""),e=DO(e,ZO,"$1")),e=DO(e,eM,""),r=cO(e);c<=r.length;){switch(i=r[c],u){case hM:if(!i||!AO(zO,i)){if(t)return VO;u=dM;continue}h+=UO(i),u=fM;break;case fM:if(i&&(AO(WO,i)||"+"==i||"-"==i||"."==i))h+=UO(i);else{if(":"!=i){if(t)return VO;h="",u=dM,c=0;continue}if(t&&(l.isSpecial()!=lO(sM,h)||"file"==h&&(l.includesCredentials()||null!==l.port)||"file"==l.scheme&&!l.host))return;if(l.scheme=h,t)return void(l.isSpecial()&&sM[l.scheme]==l.port&&(l.port=null));h="","file"==l.scheme?u=SM:l.isSpecial()&&n&&n.scheme==l.scheme?u=pM:l.isSpecial()?u=mM:"/"==r[c+1]?(u=vM,c++):(l.cannotBeABaseURL=!0,MO(l.path,""),u=AM)}break;case dM:if(!n||n.cannotBeABaseURL&&"#"!=i)return VO;if(n.cannotBeABaseURL&&"#"==i){l.scheme=n.scheme,l.path=hO(n.path),l.query=n.query,l.fragment="",l.cannotBeABaseURL=!0,u=RM;break}u="file"==n.scheme?SM:gM;continue;case pM:if("/"!=i||"/"!=r[c+1]){u=gM;continue}u=_M,c++;break;case vM:if("/"==i){u=bM;break}u=PM;continue;case gM:if(l.scheme=n.scheme,i==QR)l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=hO(n.path),l.query=n.query;else if("/"==i||"\\"==i&&l.isSpecial())u=yM;else if("?"==i)l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=hO(n.path),l.query="",u=IM;else{if("#"!=i){l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=hO(n.path),l.path.length--,u=PM;continue}l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,l.path=hO(n.path),l.query=n.query,l.fragment="",u=RM}break;case yM:if(!l.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){l.username=n.username,l.password=n.password,l.host=n.host,l.port=n.port,u=PM;continue}u=bM}else u=_M;break;case mM:if(u=_M,"/"!=i||"/"!=PO(h,c+1))continue;c++;break;case _M:if("/"!=i&&"\\"!=i){u=bM;continue}break;case bM:if("@"==i){f&&(h="%40"+h),f=!0,o=cO(h);for(var v=0;v<o.length;v++){var g=o[v];if(":"!=g||p){var y=aM(g,oM);p?l.password+=y:l.username+=y}else p=!0}h=""}else if(i==QR||"/"==i||"?"==i||"#"==i||"\\"==i&&l.isSpecial()){if(f&&""==h)return"Invalid authority";c-=cO(h).length+1,h="",u=wM}else h+=i;break;case wM:case kM:if(t&&"file"==l.scheme){u=CM;continue}if(":"!=i||d){if(i==QR||"/"==i||"?"==i||"#"==i||"\\"==i&&l.isSpecial()){if(l.isSpecial()&&""==h)return HO;if(t&&""==h&&(l.includesCredentials()||null!==l.port))return;if(a=l.parseHost(h))return a;if(h="",u=xM,t)return;continue}"["==i?d=!0:"]"==i&&(d=!1),h+=i}else{if(""==h)return HO;if(a=l.parseHost(h))return a;if(h="",u=EM,t==kM)return}break;case EM:if(!AO(KO,i)){if(i==QR||"/"==i||"?"==i||"#"==i||"\\"==i&&l.isSpecial()||t){if(""!=h){var m=TO(h,10);if(m>65535)return jO;l.port=l.isSpecial()&&m===sM[l.scheme]?null:m,h=""}if(t)return;u=xM;continue}return jO}h+=i;break;case SM:if(l.scheme="file","/"==i||"\\"==i)u=TM;else{if(!n||"file"!=n.scheme){u=PM;continue}if(i==QR)l.host=n.host,l.path=hO(n.path),l.query=n.query;else if("?"==i)l.host=n.host,l.path=hO(n.path),l.query="",u=IM;else{if("#"!=i){uM(IO(hO(r,c),""))||(l.host=n.host,l.path=hO(n.path),l.shortenPath()),u=PM;continue}l.host=n.host,l.path=hO(n.path),l.query=n.query,l.fragment="",u=RM}}break;case TM:if("/"==i||"\\"==i){u=CM;break}n&&"file"==n.scheme&&!uM(IO(hO(r,c),""))&&(lM(n.path[0],!0)?MO(l.path,n.path[0]):l.host=n.host),u=PM;continue;case CM:if(i==QR||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&lM(h))u=PM;else if(""==h){if(l.host="",t)return;u=xM}else{if(a=l.parseHost(h))return a;if("localhost"==l.host&&(l.host=""),t)return;h="",u=xM}continue}h+=i;break;case xM:if(l.isSpecial()){if(u=PM,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=QR&&(u=PM,"/"!=i))continue}else l.fragment="",u=RM;else l.query="",u=IM;break;case PM:if(i==QR||"/"==i||"\\"==i&&l.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=UO(s=h))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(l.shortenPath(),"/"==i||"\\"==i&&l.isSpecial()||MO(l.path,"")):cM(h)?"/"==i||"\\"==i&&l.isSpecial()||MO(l.path,""):("file"==l.scheme&&!l.path.length&&lM(h)&&(l.host&&(l.host=""),h=PO(h,0)+":"),MO(l.path,h)),h="","file"==l.scheme&&(i==QR||"?"==i||"#"==i))for(;l.path.length>1&&""===l.path[0];)LO(l.path);"?"==i?(l.query="",u=IM):"#"==i&&(l.fragment="",u=RM)}else h+=aM(i,iM);break;case AM:"?"==i?(l.query="",u=IM):"#"==i?(l.fragment="",u=RM):i!=QR&&(l.path[0]+=aM(i,nM));break;case IM:t||"#"!=i?i!=QR&&("'"==i&&l.isSpecial()?l.query+="%27":l.query+="#"==i?"%23":aM(i,nM)):(l.fragment="",u=RM);break;case RM:i!=QR&&(l.fragment+=aM(i,rM))}c++}},parseHost:function(e){var t,n,r;if("["==PO(e,0)){if("]"!=PO(e,e.length-1))return HO;if(t=function(e){var t,n,r,i,o,a,s,l=[0,0,0,0,0,0,0,0],u=0,c=null,h=0,f=function(){return PO(e,h)};if(":"==f()){if(":"!=PO(e,1))return;h+=2,c=++u}for(;f();){if(8==u)return;if(":"!=f()){for(t=n=0;n<4&&AO(XO,f());)t=16*t+TO(f(),16),h++,n++;if("."==f()){if(0==n)return;if(h-=n,u>6)return;for(r=0;f();){if(i=null,r>0){if(!("."==f()&&r<4))return;h++}if(!AO(KO,f()))return;for(;AO(KO,f());){if(o=TO(f(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;h++}l[u]=256*l[u]+i,2!=++r&&4!=r||u++}if(4!=r)return;break}if(":"==f()){if(h++,!f())return}else if(f())return;l[u++]=t}else{if(null!==c)return;h++,c=++u}}if(null!==c)for(a=u-c,u=7;0!=u&&a>0;)s=l[u],l[u--]=l[c+a-1],l[c+--a]=s;else if(8!=u)return;return l}(NO(e,1,-1)),!t)return HO;this.host=t}else if(this.isSpecial()){if(e=dO(e),AO($O,e))return HO;if(t=function(e){var t,n,r,i,o,a,s,l=FO(e,".");if(l.length&&""==l[l.length-1]&&l.length--,(t=l.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=l[r]))return e;if(o=10,i.length>1&&"0"==PO(i,0)&&(o=AO(GO,i)?16:8,i=NO(i,8==o?1:2)),""===i)a=0;else{if(!AO(10==o?YO:8==o?qO:XO,i))return e;a=TO(i,o)}MO(n,a)}for(r=0;r<t;r++)if(a=n[r],r==t-1){if(a>=xO(256,5-t))return null}else if(a>255)return null;for(s=OO(n),r=0;r<n.length;r++)s+=n[r]*xO(256,3-r);return s}(e),null===t)return HO;this.host=t}else{if(AO(JO,e))return HO;for(t="",n=cO(e),r=0;r<n.length;r++)t+=aM(n[r],nM);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return lO(sM,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&lM(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,i=e.host,o=e.port,a=e.path,s=e.query,l=e.fragment,u=t+":";return null!==i?(u+="//",e.includesCredentials()&&(u+=n+(r?":"+r:"")+"@"),u+=tM(i),null!==o&&(u+=":"+o)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?a[0]:a.length?"/"+IO(a,"/"):"",null!==s&&(u+="?"+s),null!==l&&(u+="#"+l),u},setHref:function(e){var t=this.parse(e);if(t)throw SO(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new MM(e.path[0]).origin}catch(Qz){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+tM(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(pO(e)+":",hM)},getUsername:function(){return this.username},setUsername:function(e){var t=cO(pO(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=aM(t[n],oM)}},getPassword:function(){return this.password},setPassword:function(e){var t=cO(pO(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=aM(t[n],oM)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?tM(e):tM(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,wM)},getHostname:function(){var e=this.host;return null===e?"":tM(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,kM)},getPort:function(){var e=this.port;return null===e?"":pO(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=pO(e))?this.port=null:this.parse(e,EM))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+IO(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,xM))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=pO(e))?this.query=null:("?"==PO(e,0)&&(e=NO(e,1)),this.query="",this.parse(e,IM)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=pO(e))?("#"==PO(e,0)&&(e=NO(e,1)),this.fragment="",this.parse(e,RM)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var MM=function(e){var t=sO(this,DM),n=gO(arguments.length,1)>1?arguments[1]:void 0,r=_O(t,new OM(e,!1,n));eO||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},DM=MM.prototype,LM=function(e,t){return{get:function(){return bO(this)[e]()},set:t&&function(e){return bO(this)[t](e)},configurable:!0,enumerable:!0}};if(eO&&(aO(DM,"href",LM("serialize","setHref")),aO(DM,"origin",LM("getOrigin")),aO(DM,"protocol",LM("getProtocol","setProtocol")),aO(DM,"username",LM("getUsername","setUsername")),aO(DM,"password",LM("getPassword","setPassword")),aO(DM,"host",LM("getHost","setHost")),aO(DM,"hostname",LM("getHostname","setHostname")),aO(DM,"port",LM("getPort","setPort")),aO(DM,"pathname",LM("getPathname","setPathname")),aO(DM,"search",LM("getSearch","setSearch")),aO(DM,"searchParams",LM("getSearchParams")),aO(DM,"hash",LM("getHash","setHash"))),oO(DM,"toJSON",(function(){return bO(this).serialize()}),{enumerable:!0}),oO(DM,"toString",(function(){return bO(this).serialize()}),{enumerable:!0}),EO){var FM=EO.createObjectURL,NM=EO.revokeObjectURL;FM&&oO(MM,"createObjectURL",rO(FM,EO)),NM&&oO(MM,"revokeObjectURL",rO(NM,EO))}vO(MM,"URL"),ZR({global:!0,constructor:!0,forced:!tO,sham:!eO},{URL:MM});var UM=On,BM=l,VM=ud,HM=$r,jM=_I,zM=ue("URL");UM({target:"URL",stat:!0,forced:!(jM&&BM((function(){zM.canParse()})))},{canParse:function(e){var t=VM(arguments.length,1),n=HM(e),r=t<2||void 0===arguments[1]?void 0:HM(arguments[1]);try{return!!new zM(n,r)}catch(Qz){return!1}}});var WM=o(ie.URL),KM=function(){function e(t){iS(this,e),this.config=t.config,this.parent=t.root,this.root=ZT.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 r="touch"===this.config.domEventType?"touchend":"click";this._delegates=Rx.delegate.call(this,this.root,"li",r,this.onItemClick)}return aS(e,[{key:"renderItemList",value:function(e){var t,n=this,r=this.config,i=this.root;(e?r.data=e:e=r.data,r.style)&&Vw(t=zw(r.style)).call(t,(function(e){i.style[e]=r[e]}));e.length>0&&(this.attrKeys=zw(e[0])),this.root.innerHTML="",Vw(e).call(e,(function(e,t){var r=e.selected?"option-item selected":"option-item";e["data-index"]=t,n.root.appendChild(ZT.createDom("li","<span>".concat(e.showText,"</span>"),e,r))}))}},{key:"onItemClick",value:function(e){e.delegateTarget||(e.delegateTarget=e.target);var t=e.delegateTarget;if(t&&ZT.hasClass(t,"selected"))return!1;var n="function"==typeof this.config.onItemClick?this.config.onItemClick:null,r=this.root.querySelector(".selected");ZT.addClass(t,"selected"),r&&ZT.removeClass(r,"selected"),n(e,{from:r?this.getAttrObj(r,this.attrKeys):null,to:this.getAttrObj(t,this.attrKeys)})}},{key:"getAttrObj",value:function(e,t){if(!e||!t)return{};var n={};Vw(t).call(t,(function(t){n[t]=e.getAttribute(t)}));var r=e.getAttribute("data-index");return r&&(n.index=Number(r)),n}},{key:"show",value:function(){ZT.removeClass(this.root,"hide"),ZT.addClass(this.root,"active")}},{key:"hide",value:function(){ZT.removeClass(this.root,"active"),ZT.addClass(this.root,"hide")}},{key:"setStyle",value:function(e){var t=this;zw(e).forEach((function(n){t.root.style[n]=e[n]}))}},{key:"destroy",value:function(){var e;this._delegates&&(Vw(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}(),GM=ie,qM=p;GM.JSON||(GM.JSON={stringify:JSON.stringify});var YM=function(e,t,n){return qM(GM.JSON.stringify,null,arguments)},XM=o(YM),$M=o(uo.f("toStringTag")),JM=re,QM=E,ZM=vt("match"),eD=function(e){var t;return JM(e)&&(void 0!==(t=e[ZM])?!!t:"RegExp"==QM(e))},tD=TypeError,nD=function(e){if(eD(e))throw tD("The method doesn't accept regular expressions");return e},rD=vt("match"),iD=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[rD]=!1,"/./"[e](t)}catch(Qz){}}return!1},oD=On,aD=C;R.f;var sD=Hn,lD=$r,uD=nD,cD=J,hD=iD,fD=aD("".startsWith),dD=aD("".slice),pD=Math.min;oD({target:"String",proto:!0,forced:!hD("startsWith")},{startsWith:function(e){var t=lD(cD(this));uD(e);var n=sD(pD(arguments.length>1?arguments[1]:void 0,t.length)),r=lD(e);return fD?fD(t,r,n):dD(t,n,n+r.length)===r}});var vD=Gc("String").startsWith,gD=ce,yD=vD,mD=String.prototype,_D=o((function(e){var t=e.startsWith;return"string"==typeof e||e===mD||gD(mD,e)&&t===mD.startsWith?yD:t})),bD=ai.includes;On({target:"Array",proto:!0,forced:l((function(){return!Array(1).includes()}))},{includes:function(e){return bD(this,e,arguments.length>1?arguments[1]:void 0)}});var wD=Gc("Array").includes,kD=On,ED=nD,SD=J,TD=$r,CD=iD,xD=_("".indexOf);kD({target:"String",proto:!0,forced:!CD("includes")},{includes:function(e){return!!~xD(TD(SD(this)),TD(ED(e)),arguments.length>1?arguments[1]:void 0)}});var PD,AD=Gc("String").includes,ID=ce,RD=wD,OD=AD,MD=Array.prototype,DD=String.prototype,LD=o((function(e){var t=e.includes;return e===MD||ID(MD,e)&&t===MD.includes?RD:"string"==typeof e||e===DD||ID(DD,e)&&t===DD.includes?OD:t})),FD={SEI:"sei",PLAYER_CREATE_FINISH:"playerCreateFinish",FALLBACK_ERROR:"fallbackError",FALLBACK:"fallback",AUTOPLAY_STARTED:"autoplayStarted",AUTOPLAY_PREVENTED:"autoplayWasPrevented",DOWNLOAD_SPEED_CHANGE:"downloadSpeedChange",FULLSCREEN_CHANGE:"fullscreenChange",CSS_FULLSCREEN_CHANGE:"cssFullscreenChange",MINI_STATE_CHANGE:"miniStateChange",DEFINITION_CHANGE:"definitionChange",BEFORE_DEFINITION_CHANGE:"beforeDefinitionChange",AFTER_DEFINITION_CHANGE:"afterDefinitionChange",VIDEO_RESIZE:"videoResize",PIP_CHANGE:"pipChange",USER_ACTION:"userAction",AUTOPLAY_UNMUTE:"autoplayUnmute",LONG_WAITING:"longWaiting",DEFINITION_FALLBACK:"definitionFallback",AUTOPLAY_FAIL:"autoplayFail",AUTOPLAY_SUCCESS:"autoplaySuccess",ERROR_REFRESH_CLICK:"errorRefreshClick",SOURCE_CHANGE:"sourceChange",ABR_SWITCH_START:"abrSwitchStart",ABR_SWITCH_SUCCESS:"abrSwitchSuccess",ABR_SWITCH_FAILED:"abrSwitchFailed",AD_FIRST_QUARTILE:"ad_first_quartile",AD_MIDPOINT:"ad_midpoint",AD_THIRD_QUARTILE:"ad_third_quartile",AD_CLICK:"ad_click",AD_IMPRESSION:"ad_impression",AD_RESUME:"ad_resume",AD_START:"ad_start",AD_PLAY:"ad_play",AD_PAUSE:"ad_pause",AD_TIME_UPDATE:"ad_time_update",AD_SKIPPED:"ad_skipped",AD_ERROR:"ad_error",AD_COMPLETE:"ad_complete",AD_ALL_COMPLETED:"ad_all_completed"},ND=Dm(Dm({},ZC),FD),UD=(Ny(PD={},FD.SEI,{event:"core_event",shouldCallback:function(e){return"core.sei"===(null==e?void 0:e.eventName)}}),Ny(PD,FD.AUTOPLAY_STARTED,{event:xC}),Ny(PD,FD.AUTOPLAY_PREVENTED,{event:PC}),Ny(PD,FD.FULLSCREEN_CHANGE,{event:NC}),Ny(PD,FD.CSS_FULLSCREEN_CHANGE,{event:UC}),Ny(PD,FD.MINI_STATE_CHANGE,{event:BC}),Ny(PD,FD.DEFINITION_CHANGE,{event:VC}),Ny(PD,FD.BEFORE_DEFINITION_CHANGE,{event:HC}),Ny(PD,FD.AFTER_DEFINITION_CHANGE,{event:jC}),Ny(PD,FD.VIDEO_RESIZE,{event:WC}),Ny(PD,FD.PIP_CHANGE,{event:KC}),Ny(PD,FD.USER_ACTION,{event:YC}),Ny(PD,FD.DOWNLOAD_SPEED_CHANGE,{event:MC}),Ny(PD,FD.ABR_SWITCH_START,{event:"switch_definition_start"}),Ny(PD,FD.ABR_SWITCH_SUCCESS,{event:"switch_definition_success"}),Ny(PD,FD.ABR_SWITCH_FAILED,{event:"switch_definition_fail"}),PD);var BD=/["'&<>]/;function VD(e){var t,n=""+e,r=BD.exec(n);if(!r)return n;var i,o="",a=0;for(i=r.index;i<n.length;i++){switch(n.charCodeAt(i)){case 34:t="&quot;";break;case 38:t="&amp;";break;case 39:t="&#x27;";break;case 60:t="&lt;";break;case 62:t="&gt;";break;default:continue}a!==i&&(o+=n.substring(a,i)),a=i+1,o+=t}return a!==i?o+n.substring(a,i):o}function HD(e,t){return function(e){if(ly(e))return e}(e)||function(e,t){var n=null==e?null:void 0!==oc&&hy(e)||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(ph(s).call(s,r.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||Ay(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 jD=O,zD=_,WD=yi,KD=ee,GD=zD(F.f),qD=zD([].push),YD=function(e){return function(t){for(var n,r=KD(t),i=WD(r),o=i.length,a=0,s=[];o>a;)n=i[a++],jD&&!GD(r,n)||qD(s,e?[n,r[n]]:r[n]);return s}},XD={entries:YD(!0),values:YD(!1)},$D=XD.entries;On({target:"Object",stat:!0},{entries:function(e){return $D(e)}});var JD=o(ie.Object.entries);var QD=De,ZD=Qe,eL=q,tL=zn,nL=TypeError,rL=function(e){return function(t,n,r,i){QD(n);var o=ZD(t),a=eL(o),s=tL(o),l=e?s-1:0,u=e?-1:1;if(r<2)for(;;){if(l in a){i=a[l],l+=u;break}if(l+=u,e?l<0:s<=l)throw nL("Reduce of empty array with no initial value")}for(;e?l>=0:s>l;l+=u)l in a&&(i=n(i,a[l],l,o));return i}},iL={left:rL(!1),right:rL(!0)}.left;On({target:"Array",proto:!0,forced:!Wf&&me>79&&me<83||!jc("reduce")},{reduce:function(e){var t=arguments.length;return iL(this,e,t,t>1?arguments[1]:void 0)}});var oL=Gc("Array").reduce,aL=ce,sL=oL,lL=Array.prototype,uL=o((function(e){var t=e.reduce;return e===lL||aL(lL,e)&&t===lL.reduce?sL:t}));var cL=function(){function e(t){var n;Ry(this,e),Ny(this,"definition",void 0),Ny(this,"source",void 0),Ny(this,"text",void 0),Ny(this,"fallbackUrl",void 0),Ny(this,"urls",void 0),Ny(this,"_currentUrlRef",void 0);var r=t.url,i=t.definition,o=t.text,a=t.source,s=t.fallbackUrls;this.definition=i,this.text=o,this.source=a,this.urls=Bm(n=[r]).call(n,Iy(null!=s?s:[])),this.fallbackUrl=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t={url:e[0],next:null},n=t,r=1;r<e.length;r++){var i=r===e.length-1?t:null,o={url:e[r],next:i};n.next=o,n=o}return t}(this.urls),this._currentUrlRef=this.fallbackUrl}return Fy(e,[{key:"url",get:function(){return this._currentUrlRef.url},set:function(e){this._currentUrlRef.url=e}},{key:"next",value:function(){var e=this._currentUrlRef.next;return e&&(this._currentUrlRef=e),this._currentUrlRef}}]),e}(),hL=function(){function e(t,n,r){var i=this;Ry(this,e),Ny(this,"name",void 0),Ny(this,"text",void 0),Ny(this,"definitions",void 0),this.definitions=Vw(t).call(t,(function(e){return new cL(iE({},e,{source:i}))})),this.name=n,this.text=r}return Fy(e,[{key:"defaultDefinition",get:function(){return this.definitions[0]}},{key:"add",value:function(e){this.definitions.push(e)}}],[{key:"normalize",value:function(t){if(void 0===t)throw new Error('"input" cannot be undefined');var n=void 0,r=void 0,i=void 0;if("string"==typeof t?n=t:Array.isArray(t)?i=t:(n=t.url,r=t.fallbackUrls,i=t.sources),"string"==typeof n)return e.normalizeUrl(n,r);if(Array.isArray(i)){if(0===i.length)throw new Error('"sources" cannot be an empty array');return Vw(i).call(i,(function(t){var n;return new e(Vw(n=t.definitions).call(n,(function(e){return"string"==typeof e?{url:e,definition:"unknown"}:e})),t.name,t.text)}))}return[]}},{key:"normalizeUrl",value:function(t,n){var r=new e([],"unknown");return r.add(new cL({definition:"unknown",url:t,source:r,fallbackUrls:n})),[r]}}]),e}(),fL=function(){function e(t){var n,r,i,o;Ry(this,e),Ny(this,"defaultSource",void 0),Ny(this,"defaultDefinition",void 0),Ny(this,"maxFallbackRound",void 0),Ny(this,"_currentDefinition",void 0),Ny(this,"_sources",void 0),Ny(this,"_fallbackCount",0);var a=t.url,s=t.defaultDefinition,l=t.defaultSource,u=t.sources,c=t.maxFallbackRound;this.defaultDefinition=s,this.defaultSource=l,this.maxFallbackRound=null!=c?c:1,this._sources=u;var h=a?Ym(this).call(this,a):null===(n=Ym(r=this.sources).call(r,(function(e){return void 0===l||e.name===l})))||void 0===n?void 0:Ym(i=n.definitions).call(i,(function(e){return void 0===s||e.definition===s}));this._currentDefinition=null!=h?h:null===(o=this._sources)||void 0===o||null===(o=o[0])||void 0===o||null===(o=o.definitions)||void 0===o?void 0:o[0]}return Fy(e,[{key:"sources",get:function(){return this._sources}},{key:"definition",get:function(){return this._currentDefinition}},{key:"source",get:function(){var e;return null===(e=this.definition)||void 0===e?void 0:e.source}},{key:"url",get:function(){var e;return null===(e=this.definition)||void 0===e?void 0:e.url},set:function(e){this.definition&&(this.definition.url=e)}},{key:"find",value:function(e,t){var n,r,i,o,a,s=this;if("string"==typeof e)return Ym(o=uL(a=this.sources).call(a,(function(e,t){return Bm(e).call(e,t.definitions)}),[])).call(o,(function(t){return t.url===e}));var l=Ym(n=this.sources).call(n,(function(t){var n,r;return t.name===(null!==(n=null==e?void 0:e.source)&&void 0!==n?n:null===(r=s.source)||void 0===r?void 0:r.name)})),u=null==l?void 0:Ym(r=l.definitions).call(r,(function(t){var n,r;return t.definition===(null!==(n=null==e?void 0:e.definition)&&void 0!==n?n:null===(r=s.definition)||void 0===r?void 0:r.definition)}));return u||(null!=t&&t.fallbackToFirstDefinition&&null!=l&&null!==(i=l.definitions)&&void 0!==i&&i.length?null==l?void 0:l.definitions[0]:void 0)}},{key:"fallback",value:function(){var e;if(this._fallbackCount++,!(this._fallbackCount>=this.maxFallbackRound*this.definition.urls.length)){var t=null===(e=this._currentDefinition)||void 0===e?void 0:e.next();return null==t?void 0:t.url}this.resetFallback()}},{key:"switch",value:function(e){return this._currentDefinition=e,this.resetFallback(),e}},{key:"updateSources",value:function(e,t){var n,r,i,o,a;return this._sources=hL.normalize(e),this._currentDefinition=null!==(n=Ym(this).call(this,null!=t?t:{source:null!==(r=this.defaultSource)&&void 0!==r?r:null===(i=this._currentDefinition)||void 0===i?void 0:i.source.name,definition:null!==(o=this.defaultDefinition)&&void 0!==o?o:null===(a=this._currentDefinition)||void 0===a?void 0:a.definition}))&&void 0!==n?n:this._sources[0].definitions[0],this.resetFallback(),this}},{key:"resetFallback",value:function(){this._fallbackCount=0}}]),e}();function dL(){var e;"undefined"!=typeof Reflect&&$E?dL=LP(e=$E).call(e):dL=function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=UP(e)););return e}(e,t);if(r){var i=mm(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}};return dL.apply(this,arguments)}function pL(){return(new DOMParser).parseFromString('<svg width="150" height="162" viewBox="0 0 150 162" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M127.718 112.831H6.13675C4.19663 112.831 2.25651 108.974 2.90322 104.475C3.54993 99.9761 8.07687 99.9761 13.8972 99.9761C11.9571 97.4052 9.37028 88.4069 15.8373 81.3369C22.3044 74.2668 25.5379 74.2668 34.5918 75.5526C33.9451 63.9837 47.526 34.4178 77.2744 35.0605C107.023 35.7032 116.077 54.3421 119.957 63.3404C129.011 62.6976 147.765 66.554 149.706 87.1214C151.258 103.575 135.694 111.117 127.718 112.831Z" fill="#F1F4F8"/>\n<path d="M44.9346 91.6022L43.6782 99.8032" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n<path d="M47.3545 125.695L48.6109 117.494" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n<path d="M31.5347 97.7378L38.7295 101.869" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n<path d="M60.7544 119.559L53.5595 115.428" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n<path d="M69.6755 44.5318L138.35 26.0209C139.115 25.8148 139.804 26.5367 139.563 27.2909L121.081 85.1146C120.982 85.4243 120.739 85.6665 120.429 85.7641L52.0645 107.28C51.2996 107.521 50.5766 106.809 50.8062 106.04L68.9776 45.2111C69.0768 44.879 69.3409 44.622 69.6755 44.5318Z" fill="#D0D6E0" stroke="#D0D6E0" stroke-width="4" stroke-linecap="round"/>\n<path d="M83.1285 52.7415C91.6454 54.3438 107.322 62.0019 101.894 79.8155" stroke="white" stroke-width="3" stroke-linecap="round"/>\n<path d="M84.138 62.3385C88.3894 63.1384 96.2148 66.9611 93.5053 75.8531" stroke="white" stroke-width="3" stroke-linecap="round"/>\n<ellipse cx="83.6417" cy="71.98" rx="3.08443" ry="3.07025" transform="rotate(12.6375 83.6417 71.98)" fill="white"/>\n<path d="M43.4699 110.358C39.5425 109.114 30.6316 108.203 26.4077 114.511C21.1278 122.397 36.5031 152.755 2.11053 160.141" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n</svg>\n',"image/svg+xml").firstChild}var vL=function(e){NP(n,e);var t=VP(n);function n(){var e,r;Ry(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Ny(xP(r=t.call.apply(t,Bm(e=[this]).call(e,o))),"_error",void 0),r}return Fy(n,[{key:"_errorTip",get:function(){var e,t,n,r=this.player.config.i18nManager,i=null===(e=this._error)||void 0===e?void 0:e.errorCode;return this.config.errorTipsText?r.normalize(this.config.errorTipsText):Bm(t="".concat(i?"[".concat(i,"] "):"")).call(t,null===(n=this._error)||void 0===n?void 0:n.message)}},{key:"afterCreate",value:function(){this._handleRefresh=this._handleRefresh.bind(this),this._focus=this._focus.bind(this),this._initEvents(),this._initIcons(),"mobile"===aC.device&&this.bind("touchend",this._focus),this.bind(".veplayer-error-refresh","click",this._handleRefresh)}},{key:"registerIcons",value:function(){return{error:{icon:pL,class:"veplayer-error-svg"}}}},{key:"updateLang",value:function(){this.config.showRefresh&&this._renderRefresh(),this._renderExtraTips()}},{key:"showError",value:function(e){this._error=e instanceof qP?e:XP(e),this.config.showErrorTip&&this._renderText(this._errorTip),this._renderExtraTips(),dL(UP(n.prototype),"show",this).call(this)}},{key:"hideError",value:function(){dL(UP(n.prototype),"hide",this).call(this)}},{key:"destroy",value:function(){"mobile"===aC.device&&this.unbind("touchend",this._focus),this.unbind(".veplayer-error-refresh","click",this._handleRefresh),this.off(ND.FALLBACK_ERROR,this.showError.bind(this)),this.off(mC,this.hideError.bind(this))}},{key:"render",value:function(){var e,t=this.player.config.i18nManager;return Bm(e='<veplayer-error class="veplayer-error">\n <div class="veplayer-error-cover">\n '.concat(this.config.showErrorImg?'<div class="veplayer-error-img"></div>':"",'\n <div class="veplayer-error-tips"></div>\n ')).call(e,this.config.showRefresh?'<div class="veplayer-error-refresh">'.concat(t.getText("ERROR_REFRESH"),"</div>"):"",'\n <div class="veplayer-error-extra"></div>\n </div>\n </veplayer-error>')}},{key:"_focus",value:function(){this.player.focus({autoHide:!0})}},{key:"_initIcons",value:function(){this.config.showErrorImg&&this.appendChild(".veplayer-error-img",this.icons.error)}},{key:"_initEvents",value:function(){this.on(ND.FALLBACK_ERROR,this.showError.bind(this)),this.on(mC,this.hideError.bind(this)),this.on(hC,this.hideError.bind(this)),this.on(zC,this.hideError.bind(this))}},{key:"_renderText",value:function(e){var t=Ym(this).call(this,".veplayer-error-tips");t&&(t.innerText=e)}},{key:"_renderExtraTips",value:function(){var e,t=this,n=Ym(this).call(this,".veplayer-error-extra");n&&(n.innerHTML="");var r=this.player.config.i18nManager;null===(e=this.config.extraTips)||void 0===e||e.forEach((function(e){if(e){var n,i=ZT.createDom("div",Bm(n="".concat(r.normalize(e.label),": ")).call(n,r.normalize(e.value)),void 0,"veplayer-error-detail-info");t.appendChild(".veplayer-error-extra",i)}}))}},{key:"_handleRefresh",value:function(){var e,t;null===(e=this.player)||void 0===e||e.emit(ND.ERROR_REFRESH_CLICK),null===(t=this.player)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.veplayer)||void 0===t||t.retry(),this.hideError()}},{key:"_renderRefresh",value:function(){var e,t=this.player.config.i18nManager,n=Ym(this).call(this,".veplayer-error-refresh");n&&(n.innerHTML=null!==(e=t.getText("ERROR_REFRESH"))&&void 0!==e?e:"")}}],[{key:"pluginName",get:function(){return"error"}},{key:"defaultConfig",get:function(){return{showErrorImg:!0,showErrorTip:!0,showRefresh:!0,errorTipsText:"",extraTips:[],position:Rx.POSITIONS.ROOT}}}]),n}(Rx),gL=function(e){NP(n,e);var t=VP(n);function n(){var e,r;Ry(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Ny(xP(r=t.call.apply(t,Bm(e=[this]).call(e,o))),"_toastNumber",0),Ny(xP(r),"_toastMap",{}),r}return Fy(n,[{key:"toast",value:function(e,t){var n=this,r=t||{},i=r.duration,o=void 0===i?2e3:i,a=r.closable,s=void 0!==a&&a,l=this._toastNumber+1;this._toastNumber=l;var u=this._renderToast(e,s,l);return this.root.appendChild(u),this._toastMap[l]=u,setTimeout((function(){n.remove(l)}),o),l}},{key:"remove",value:function(e){var t=this._toastMap[e];t&&(this.root.contains(t)&&this.root.removeChild(t),delete this._toastMap[e])}},{key:"render",value:function(){return'<veplayer-toast class="veplayer-toast"></veplayer-toast>'}},{key:"_renderToast",value:function(e,t,n){var r=this,i=ZT.createDom("div","",void 0,"veplayer-toast-container"),o=ZT.checkIsObject(e)?e:ZT.createDom("div",e,void 0,"veplayer-toast-txt");if(i.appendChild(o),t){var a=ZT.createDom("span","×",void 0,"veplayer-toast-close");a.addEventListener("click",(function(){r.remove(n)})),i.appendChild(a)}return i}}],[{key:"pluginName",get:function(){return"toast"}},{key:"defaultConfig",get:function(){return{index:5}}}]),n}(Rx);function yL(){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 mL=function(){function e(t){Ry(this,e),Ny(this,"_root",void 0),Ny(this,"_config",void 0),Ny(this,"_parent",void 0),Ny(this,"_listDom",void 0),Ny(this,"_container",void 0),Ny(this,"_titleDom",void 0),Ny(this,"_player",void 0),Ny(this,"_delegates",void 0),Ny(this,"_listType",void 0);var n=t.config,r=t.root,i=t.player;this._config=n,this._parent=r,this._player=i,this._listType=n.listType,this.renderPanel(),this._initEvents(),this._bindDomEvent()}return Fy(e,[{key:"changeMode",value:function(e){this.updatePanel(e),this._listType=e}},{key:"renderItemList",value:function(e){var t,n=this,r=this._config;return e&&(r.list=e),this._listDom||(this._listDom=ZT.createDom("div","",{},"item-list-panel-content")),this._listDom.innerHTML="",null===(t=r.list)||void 0===t||Vw(t).call(t,(function(e,t){var r,i,o=e.selected?"panel-item select-in":"panel-item ".concat(null!==(r=e.className)&&void 0!==r?r:"");e["data-index"]=t;var a=ZT.createDom("div","",e,o);e.showText&&("string"==typeof e.showText?a.innerHTML=e.showText:a.appendChild(e.showText)),null===(i=n._listDom)||void 0===i||i.appendChild(a)})),this._listDom}},{key:"renderTitle",value:function(){var e,t,n=this._player.config.i18nManager;if(null!==(e=this._config.panel)&&void 0!==e&&e.title&&this._listType!==_L.Inner)return this._titleDom||(this._titleDom=ZT.createDom("div","",{},"xg-mobile-panel-title")),this._titleDom.innerHTML=n.normalize(null===(t=this._config.panel)||void 0===t?void 0:t.title),this._titleDom}},{key:"updatePanel",value:function(e){this._root&&ZT.removeClass(this._root,"panel-".concat(this._listType)),this._root&&ZT.addClass(this._root,"panel-".concat(e));var t="mobile"===aC.device?"touchend":"click";e===_L.Inner?this._container&&this._bind(this._container,t,this._handleHide.bind(this)):this._container&&this._unbind(this._container,t,this._handleHide.bind(this))}},{key:"renderPanel",value:function(){var e,t,n,r=Bm(e="xg-mobile-panel panel-".concat(this._config.listType," ")).call(e,null!==(t=null===(n=this._config)||void 0===n||null===(n=n.panel)||void 0===n?void 0:n.className)&&void 0!==t?t:"");this._root=ZT.createDom("div","",{},r),this._parent&&this._parent.appendChild(this._root);var i=this.renderTitle(),o=this.renderItemList();this._container=ZT.createDom("div","",{},"xg-mobile-panel-content"),this._root.appendChild(this._container),i&&this._container.appendChild(i),o&&this._container.appendChild(o)}},{key:"show",value:function(){this._root&&(ZT.removeClass(this._root,"hide"),ZT.addClass(this._root,"active"))}},{key:"hide",value:function(){this._root&&(ZT.removeClass(this._root,"active"),ZT.addClass(this._root,"hide"))}},{key:"destroy",value:function(){this._parent&&this._root&&this._parent.removeChild(this._root),this._unbindDomEvent(),this._unbindEvents()}},{key:"_bind",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e&&"on".concat(t)in e&&"function"==typeof n&&e.addEventListener(t,n,r)}},{key:"_unbind",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e&&"on".concat(t)in e&&"function"==typeof n&&e.removeEventListener(t,n,r)}},{key:"_initEvents",value:function(){var e;this._config.isAutoChange&&(window.addEventListener("orientationchange",this._handleOrientationChange.bind(this)),null===(e=this._player)||void 0===e||e.on(NC,this._handleOrientationChange.bind(this)))}},{key:"_unbindEvents",value:function(){var e;window.removeEventListener("orientationchange",this._handleOrientationChange.bind(this)),null===(e=this._player)||void 0===e||e.off(NC,this._handleOrientationChange.bind(this))}},{key:"_handleOrientationChange",value:function(){var e,t,n,r=LD(e=[90,-90,"90","-90"]).call(e,window.orientation);if(null!==(t=this._player)&&void 0!==t&&t.fullscreen&&r)this.changeMode(_L.Fullscreen);else if(this._listType!==(null===(n=this._config)||void 0===n?void 0:n.listType)){var i;this.changeMode(null===(i=this._config)||void 0===i?void 0:i.listType)}}},{key:"_bindDomEvent",value:function(){var e="mobile"===aC.device?"touchend":"click";this._listType===_L.Inner&&this._container&&this._bind(this._container,e,this._handleHide.bind(this)),this._root&&this._bind(this._root,e,this._handleHide.bind(this)),this._container&&this._bind(this._container,e,this._stopPropagation),this._listDom&&(this._delegates=Rx.delegate.call(this,this._listDom,".panel-item",e,this._onItemClick.bind(this),!0))}},{key:"_unbindDomEvent",value:function(){var e,t="mobile"===aC.device?"touchend":"click";(this._root&&this._unbind(this._root,t,this._handleHide.bind(this)),this._container&&this._unbind(this._container,t,this._handleHide.bind(this)),this._container&&this._unbind(this._container,t,this._stopPropagation),this._delegates)&&(Vw(e=this._delegates).call(e,(function(e){e.destroy&&e.destroy()})),this._delegates=null)}},{key:"_stopPropagation",value:function(e){e.stopPropagation(),e.preventDefault()}},{key:"_onItemClick",value:function(e){var t,n,r,i,o=e.delegateTarget,a="function"==typeof this._config.onOptionClick?this._config.onOptionClick:null,s="function"==typeof this._config.onItemClick?this._config.onItemClick:null,l=null===(t=this._root)||void 0===t?void 0:t.querySelector(".selected");ZT.addClass(o,"selected"),l&&(ZT.removeClass(l,"selected"),i=Number(l.getAttribute("data-index")));var u=Number(o.getAttribute("data-index")),c={from:void 0!==Tc(i)?null===(n=this._config.list)||void 0===n?void 0:n[i]:void 0,to:null===(r=this._config.list)||void 0===r?void 0:r[u]};null==a||a(e,c),o&&i===u||null==s||s(e,c)}},{key:"_handleHide",value:function(e){var t,n;e.stopPropagation(),e.preventDefault(),null===(t=(n=this._config).hide)||void 0===t||t.call(n)}}]),e}(),_L=function(e){return e.Middle="middle",e.Bottom="bottom",e.Fullscreen="fullscreen",e.Inner="inner",e}(_L||{}),bL=function(e){return e.Icon="Icon",e.Text="Text",e}(bL||{}),wL="mobile"===aC.device,kL=["bottom","fullscreen","inner"],EL=["middle"],SL=["bottom","inner","fullscreen"],TL=["bottom","inner","fullscreen"],CL=function(e){NP(n,e);var t=VP(n);function n(e){var r;return Ry(this,n),Ny(xP(r=t.call(this,e)),"optionsList",void 0),Ny(xP(r),"_isIcon",void 0),Ny(xP(r),"_isActive",void 0),Ny(xP(r),"_curIndex",void 0),Ny(xP(r),"activeEvent",void 0),Ny(xP(r),"onEnter",(function(e){e.preventDefault(),e.stopPropagation(),r.emit("icon_mouseenter",{pluginName:r.pluginName}),r.toggle(!0)})),Ny(xP(r),"onLeave",(function(e){e.preventDefault(),e.stopPropagation(),r.emit("icon_mouseleave",{pluginName:r.pluginName}),r._isActive&&r.toggle(!1)})),r._isIcon=!1,r._isActive=!1,r._curIndex=0,r}return Fy(n,[{key:"updateLang",value:function(){this.config.list&&this.renderItemList(this.config.list,this._curIndex)}},{key:"afterCreate",value:function(){var e=this,t=this.config;this.config.listType=this._getListType(),this.initIcons(),t.hidePortrait&&ZT.addClass(this.root,"portrait"),wL&&this.on(EC,(function(){e._isActive&&(e.optionsList&&e.optionsList.hide(),e._isActive=!1)})),t.list&&this.renderItemList(t.list),this.activeEvent=wL?"touchend":"mouseenter",this.bind(this.activeEvent,this.onEnter),this.bind("mouseleave",this.onLeave)}},{key:"initIcons",value:function(){var e=this,t=this.icons,n=zw(t);if(n.length>0&&"Icon"===this.config.renderType)return n.forEach((function(n){e.appendChild(".xgplayer-icon",t[n])})),void(this._isIcon=!0);var r=this.appendChild(".xgplayer-icon",ZT.createDom("span","",{},"icon-text"));r&&ZT.addClass(r,"btn-text")}},{key:"show",value:function(){!this.config.list||this.config.list.length<1||this.config.hideOnSingleOption&&1===this.config.list.length||ZT.addClass(this.root,"show")}},{key:"hide",value:function(){ZT.removeClass(this.root,"show")}},{key:"toggle",value:function(e){if(e!==this._isActive){var t=this.player.controls,n=this.config.listType;e?(n&&LD(SL).call(SL,n)?null==t||t.blur():null==t||t.focus(),this.optionsList&&this.optionsList.show()):(n&&LD(SL).call(SL,n)?null==t||t.focus():null==t||t.focusAwhile(),this.optionsList&&this.optionsList.hide()),this._isActive=e}}},{key:"onItemClick",value:function(e,t){var n;e.preventDefault(),e.stopPropagation();var r=this.config.listType;this._curIndex=null===(n=t.to)||void 0===n?void 0:n.index,this.changeCurrentText(),(this.config.isItemClickHide||r&&LD(SL).call(SL,r))&&this.toggle(!1)}},{key:"onOptionClick",value:function(e,t){e.preventDefault(),e.stopPropagation()}},{key:"changeCurrentText",value:function(){if(!this._isIcon){var e=this.config.list,t=e&&this._curIndex<e.length?this._curIndex:0,n=null==e?void 0:e[t];if(n){var r,i=Ym(this).call(this,".icon-text"),o=this.player.config.i18nManager;if(i)i.innerHTML=o.normalize(null!==(r=null==n?void 0:n.iconText)&&void 0!==r?r:null==n?void 0:n.text)}}}},{key:"renderItemList",value:function(e,t){var r,i=this,o=this.config,a=this.optionsList,s=this.player;if("number"==typeof t&&(this._curIndex=t),a)return a.renderItemList(e),this.changeCurrentText(),void(a instanceof mL&&a.renderTitle());this.config.isShowIcon&&(this.optionsList=o.listType&&LD(TL).call(TL,o.listType)?new mL({config:{list:e||[],onItemClick:function(e,t){i.onItemClick(e,t)},onOptionClick:function(e,t){i.onOptionClick(e,t)},panel:this.config.panel,listType:null!==(r=o.listType)&&void 0!==r?r:n.defaultConfig.listType,isAutoChange:o.isAutoChange,hide:function(){return i.toggle(!1)}},root:s.root,player:s}):new KM({config:{data:e||[],onItemClick:function(e,t){i.onItemClick(e,t)}},root:this.root}),this.changeCurrentText(),this.show())}},{key:"destroy",value:function(){this.activeEvent&&this.unbind(this.activeEvent,this.onEnter),this.unbind("mouseleave",this.onLeave),this.optionsList&&(this.optionsList.destroy(),this.optionsList=void 0)}},{key:"render",value:function(){return this.config.isShowIcon?'<xg-icon class="xg-options-icon '.concat(this.config.className||"",'">\n <div class="xgplayer-icon">\n </div>\n </xg-icon>'):""}},{key:"_getListType",value:function(){var e,t=this.config.listType;return null!==(e=this.player)&&void 0!==e&&null!==(e=e.config)&&void 0!==e&&e.listType&&(t=this.player.config.listType),wL||t&&LD(kL).call(kL,t)||(t="bottom"),wL||t&&LD(EL).call(EL,t)||(t="middle"),t}}],[{key:"pluginName",get:function(){return"optionsIcon"}},{key:"defaultConfig",get:function(){return{position:wL?dU.ROOT_TOP_RIGHT:dU.CONTROLS_RIGHT,listType:wL?"bottom":"middle",index:100,list:[],listStyle:{},hidePortrait:!0,isShowIcon:!1,renderType:wL?"Icon":"Text",isItemClickHide:!0,hideOnSingleOption:!0,isAutoChange:!0}}}]),n}(Rx),xL=function(e){NP(n,e);var t=VP(n);function n(){return Ry(this,n),t.apply(this,arguments)}return Fy(n,[{key:"updateLang",value:function(){this.renderItemList()}},{key:"beforeCreate",value:function(e){var t=e.player.config.sources.sourceManager;e.config.list=t.sources}},{key:"registerIcons",value:function(){return{source:{icon:yL}}}},{key:"renderItemList",value:function(){var e=this.config.sourceManager,t=e.sources,r=e.source,i=this.player.config.i18nManager;if(t.length<2)this.hide();else{var o=Vw(t).call(t,(function(e){var t;return Dm(Dm({},e),{},{showText:null!==(t=i.normalize(e.text))&&void 0!==t?t:e.name,selected:!1})})),a=ZA(o).call(o,(function(e){return e.name===(null==r?void 0:r.name)}));this.config.list=t,a>-1&&(o[a].selected=!0),dL(UP(n.prototype),"renderItemList",this).call(this,o,a)}}},{key:"onItemClick",value:function(e,t){var r,i=this;dL(UP(n.prototype),"onItemClick",this).call(this,e,t),null===(r=this.player.config)||void 0===r||r.veplayer.switch({source:t.to.name},{fallbackToFirstDefinition:!0}).catch((function(){i.renderItemList()}))}}],[{key:"pluginName",get:function(){return"sources"}},{key:"defaultConfig",get:function(){return Dm(Dm({},CL.defaultConfig),{},{index:4,panel:{title:{jp:"ライン選ぶ",en:"Line Choose","zh-cn":"线路选择","zh-hk":"線路選擇"}},list:[],className:"xgplayer-sources",hidePortrait:!1,isShowIcon:!0})}},{key:"textTips",get:function(){return{jp:"ライン",en:"Line","zh-cn":"线路","zh-hk":"線路"}}}]),n}(CL);function PL(){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 AL={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",a="[object Boolean]",s="[object Date]",l="[object Function]",u="[object GeneratorFunction]",c="[object Map]",h="[object Number]",f="[object Object]",d="[object Promise]",p="[object RegExp]",v="[object Set]",g="[object String]",y="[object Symbol]",m="[object WeakMap]",_="[object ArrayBuffer]",b="[object DataView]",w="[object Float32Array]",k="[object Float64Array]",E="[object Int8Array]",S="[object Int16Array]",T="[object Int32Array]",C="[object Uint8Array]",x="[object Uint8ClampedArray]",P="[object Uint16Array]",A="[object Uint32Array]",I=/\w*$/,R=/^\[object .+?Constructor\]$/,O=/^(?:0|[1-9]\d*)$/,M={};M[o]=M["[object Array]"]=M[_]=M[b]=M[a]=M[s]=M[w]=M[k]=M[E]=M[S]=M[T]=M[c]=M[h]=M[f]=M[p]=M[v]=M[g]=M[y]=M[C]=M[x]=M[P]=M[A]=!0,M["[object Error]"]=M[l]=M[m]=!1;var D="object"==Tc(i)&&i&&i.Object===Object&&i,L="object"==("undefined"==typeof self?"undefined":Tc(self))&&self&&self.Object===Object&&self,F=D||L||Function("return this")(),N=t&&!t.nodeType&&t,U=N&&e&&!e.nodeType&&e,B=U&&U.exports===N;function V(e,t){return e.set(t[0],t[1]),e}function H(e,t){return e.add(t),e}function j(e,t,n,r){var i=-1,o=e?e.length:0;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function z(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(rj){}return t}function W(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function K(e,t){return function(n){return e(t(n))}}function G(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var q,Y=Array.prototype,X=Function.prototype,$=Object.prototype,J=F["__core-js_shared__"],Q=(q=/[^.]+$/.exec(J&&jk(J)&&jk(J).IE_PROTO||""))?"Symbol(src)_1."+q:"",Z=X.toString,ee=$.hasOwnProperty,te=$.toString,ne=RegExp("^"+Z.call(ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),re=B?F.Buffer:void 0,ie=F.Symbol,oe=F.Uint8Array,ae=K(dE,Object),se=Object.create,le=$.propertyIsEnumerable,ue=hk(Y),ce=oE,he=re?re.isBuffer:void 0,fe=K(zw,Object),de=Ue(F,"DataView"),pe=Ue(F,"Map"),ve=Ue(F,"Promise"),ge=Ue(F,"Set"),ye=Ue(F,"WeakMap"),me=Ue(Object,"create"),_e=ze(de),be=ze(pe),we=ze(ve),ke=ze(ge),Ee=ze(ye),Se=ie?ie.prototype:void 0,Te=Se?Se.valueOf:void 0;function Ce(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function xe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Pe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ae(e){this.__data__=new xe(e)}function Ie(e,t){var n=Ke(e)||function(e){return function(e){return function(e){return!!e&&"object"==Tc(e)}(e)&&Ge(e)}(e)&&ee.call(e,"callee")&&(!le.call(e,"callee")||te.call(e)==o)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,i=!!r;for(var a in e)!t&&!ee.call(e,a)||i&&("length"==a||He(a,r))||n.push(a);return n}function Re(e,t,n){var r=e[t];ee.call(e,t)&&We(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function Oe(e,t){for(var n=e.length;n--;)if(We(e[n][0],t))return n;return-1}function Me(e,t,n,r,i,d,m){var R;if(r&&(R=d?r(e,i,d,m):r(e)),void 0!==R)return R;if(!Xe(e))return e;var O=Ke(e);if(O){if(R=function(e){var t=e.length,n=e.constructor(t);t&&"string"==typeof e[0]&&ee.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!t)return function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n<r;)t[n]=e[n];return t}(e,R)}else{var D=Ve(e),L=D==l||D==u;if(qe(e))return function(e,t){if(t)return Ww(e).call(e);var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(D==f||D==o||L&&!d){if(z(e))return d?e:{};if(R=function(e){return"function"!=typeof e.constructor||je(e)?{}:(t=ae(e),Xe(t)?se(t):{});var t}(L?{}:e),!t)return function(e,t){return Fe(e,Be(e),t)}(e,function(e,t){return e&&Fe(t,$e(t),e)}(R,e))}else{if(!M[D])return d?e:{};R=function(e,t,n,r){var i=e.constructor;switch(t){case _:return Le(e);case a:case s:return new i(+e);case b:return function(e,t){var n=t?Le(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,r);case w:case k:case E:case S:case T:case C:case x:case P:case A:return function(e,t){var n=t?Le(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,r);case c:return function(e,t,n){var r=t?n(W(e),!0):W(e);return j(r,V,new e.constructor)}(e,r,n);case h:case g:return new i(e);case p:return function(e){var t=new e.constructor(e.source,I.exec(e));return t.lastIndex=e.lastIndex,t}(e);case v:return function(e,t,n){var r=t?n(G(e),!0):G(e);return j(r,H,new e.constructor)}(e,r,n);case y:return o=e,Te?Object(Te.call(o)):{}}var o}(e,D,Me,t)}}m||(m=new Ae);var F=m.get(e);if(F)return F;if(m.set(e,R),!O)var N=n?function(e){return function(e,t,n){var r=t(e);return Ke(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,$e,Be)}(e):$e(e);return function(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););}(N||e,(function(i,o){N&&(i=e[o=i]),Re(R,o,Me(i,t,n,r,o,e,m))})),R}function De(e){return!(!Xe(e)||(t=e,Q&&Q in t))&&(Ye(e)||z(e)?ne:R).test(ze(e));var t}function Le(e){var t=new e.constructor(e.byteLength);return new oe(t).set(new oe(e)),t}function Fe(e,t,n,r){n||(n={});for(var i=-1,o=t.length;++i<o;){var a=t[i],s=r?r(n[a],e[a],a,n,e):void 0;Re(n,a,void 0===s?e[a]:s)}return n}function Ne(e,t){var n,r,i=e.__data__;return("string"==(r=Tc(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:Vw(i)}function Ue(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return De(n)?n:void 0}Ce.prototype.clear=function(){this.__data__=me?me(null):{}},Ce.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Ce.prototype.get=function(e){var t=this.__data__;if(me){var r=t[e];return r===n?void 0:r}return ee.call(t,e)?t[e]:void 0},Ce.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:ee.call(t,e)},Ce.prototype.set=function(e,t){return this.__data__[e]=me&&void 0===t?n:t,this},xe.prototype.clear=function(){this.__data__=[]},xe.prototype.delete=function(e){var t=this.__data__,n=Oe(t,e);return!(n<0)&&(n==t.length-1?t.pop():ue.call(t,n,1),!0)},xe.prototype.get=function(e){var t=this.__data__,n=Oe(t,e);return n<0?void 0:t[n][1]},xe.prototype.has=function(e){return Oe(this.__data__,e)>-1},xe.prototype.set=function(e,t){var n=this.__data__,r=Oe(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},Pe.prototype.clear=function(){this.__data__={hash:new Ce,map:new(pe||xe),string:new Ce}},Pe.prototype.delete=function(e){return Ne(this,e).delete(e)},Pe.prototype.get=function(e){return Ne(this,e).get(e)},Pe.prototype.has=function(e){return Ne(this,e).has(e)},Pe.prototype.set=function(e,t){return Ne(this,e).set(e,t),this},Ae.prototype.clear=function(){this.__data__=new xe},Ae.prototype.delete=function(e){return this.__data__.delete(e)},Ae.prototype.get=function(e){return this.__data__.get(e)},Ae.prototype.has=function(e){return this.__data__.has(e)},Ae.prototype.set=function(e,t){var n=this.__data__;if(n instanceof xe){var r=n.__data__;if(!pe||r.length<199)return r.push([e,t]),this;n=this.__data__=new Pe(r)}return n.set(e,t),this};var Be=ce?K(ce,Object):function(){return[]},Ve=function(e){return te.call(e)};function He(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||O.test(e))&&e>-1&&e%1==0&&e<t}function je(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||$)}function ze(e){if(null!=e){try{return Z.call(e)}catch(rj){}try{return e+""}catch(rj){}}return""}function We(e,t){return e===t||e!=e&&t!=t}(de&&Ve(new de(new ArrayBuffer(1)))!=b||pe&&Ve(new pe)!=c||ve&&Ve(ve.resolve())!=d||ge&&Ve(new ge)!=v||ye&&Ve(new ye)!=m)&&(Ve=function(e){var t=te.call(e),n=t==f?e.constructor:void 0,r=n?ze(n):void 0;if(r)switch(r){case _e:return b;case be:return c;case we:return d;case ke:return v;case Ee:return m}return t});var Ke=Array.isArray;function Ge(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!Ye(e)}var qe=he||function(){return!1};function Ye(e){var t=Xe(e)?te.call(e):"";return t==l||t==u}function Xe(e){var t=Tc(e);return!!e&&("object"==t||"function"==t)}function $e(e){return Ge(e)?Ie(e):function(e){if(!je(e))return fe(e);var t=[];for(var n in Object(e))ee.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return Me(e,!0,!0)}}(AL,AL.exports);var IL=o(AL.exports),RL=function(e){NP(r,e);var t,n=VP(r);function r(){var e,t;Ry(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Ny(xP(t=n.call.apply(n,Bm(e=[this]).call(e,o))),"_waitingStartTime",0),Ny(xP(t),"_timer",void 0),Ny(xP(t),"_toastId",void 0),t}return Fy(r,[{key:"updateLang",value:function(){this.renderItemList()}},{key:"beforeCreate",value:function(e){var t,n=e.player.config.sources.sourceManager;e.config.list=null===(t=n.source)||void 0===t?void 0:t.definitions}},{key:"afterCreate",value:function(){var e,t;dL(UP(r.prototype),"afterCreate",this).call(this),(null!==(e=null===(t=this.player.config.sourceManager.source)||void 0===t?void 0:t.definitions)&&void 0!==e?e:[]).length<2?this.hide():(this.renderItemList(),this.on(ND.WAITING,this._waiting.bind(this)),this.on(ND.PLAYING,this._clearTimer.bind(this)),this.on(ND.PAUSE,this._clearTimer.bind(this)),this.on(ND.PLAY,this._clearTimer.bind(this)),this._initTimeUpdateEvent())}},{key:"registerIcons",value:function(){return{source:{icon:PL}}}},{key:"renderItemList",value:function(){var e,t,n,i=this,o=this.player.config.sourceManager,a=null!==(e=null===(t=o.source)||void 0===t?void 0:t.definitions)&&void 0!==e?e:[];if(a.length<2)this.hide();else{var s=Vw(a).call(a,(function(e){var t;return{url:e.url,definition:e.definition||"",showText:null!==(t=i.player.config.i18nManager.normalize(e.text))&&void 0!==t?t:e.definition,selected:!1}})),l=ZA(a).call(a,(function(e){var t;return e.definition===(null===(t=o.definition)||void 0===t?void 0:t.definition)}));this.config.list=null===(n=o.source)||void 0===n?void 0:n.definitions,l>-1&&(s[l].selected=!0),dL(UP(r.prototype),"renderItemList",this).call(this,s,l)}}},{key:"onItemClick",value:function(e,t){var n,i=this;this._showToast(t.to),dL(UP(r.prototype),"onItemClick",this).call(this,e,t),null===(n=this.player.config)||void 0===n||n.veplayer.switch({definition:t.to.definition}).catch((function(){i.renderItemList()}))}},{key:"fallback",value:(t=sy(oy().mark((function e(){var t,n,r,i,o,a,s,l=arguments;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=l.length>0&&void 0!==l[0]?l[0]:{toast:!0},i=this.player.config.sourceManager,!((o=ZA(t=this.config.demotePriority).call(t,(function(e){var t;return e===(null===(t=i.definition)||void 0===t?void 0:t.definition)})))<0)){e.next=5;break}return e.abrupt("return");case 5:if(a=IL(i.definition),s=this._getNextDefinition(o)){e.next=9;break}return e.abrupt("return");case 9:if(!r.toast){e.next=15;break}return e.next=12,this._toast(s);case 12:if(e.sent){e.next=15;break}return e.abrupt("return");case 15:this.player.emit(ND.DEFINITION_FALLBACK,{from:a,to:s}),null===(n=this.player.config)||void 0===n||n.veplayer.switch({definition:s.definition}).catch((function(){}));case 17:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"_waiting",value:function(){var e=this;if(!this._timer){this._waitingStartTime=Date.now();var t=this.player.currentTime;this._timer=window.setTimeout((function(){e.player&&e.player.currentTime<=t+.1&&(e.player.emit(ND.LONG_WAITING),e.config.needFallback&&e.fallback({toast:!0}),e._clearTimer())}),this.config.longWaitingTime)}}},{key:"_clearTimer",value:function(){this._timer&&(clearTimeout(this._timer),this._timer=void 0),this._waitingStartTime&&(this._waitingStartTime=0)}},{key:"_toast",value:function(e){var t=this,n=this.player.config.i18nManager;return new Hw((function(r){var i,o,a=null===(i=t.player)||void 0===i?void 0:i.getPlugin("toast");if(a){var s=ZT.createDom("div",n.getText("DEFINITION_FALLBACK_TOAST"),void 0,"veplayer-toast-txt"),l=null!==(o=t.player.config.i18nManager.normalize(e.text))&&void 0!==o?o:e.definition,u=ZT.createDom("span",l,void 0,"veplayer-toast-txt-bt");s.appendChild(u);var c=a.toast(s,{duration:5e3,closable:!0});u.addEventListener("click",(function(){a.remove(c),r(!0)}))}else r(!1)}))}},{key:"_getNextDefinition",value:function(e){var t,n=this.player.config.sourceManager;if(null!==(t=n.source)&&void 0!==t&&t.definitions.length&&!(e+1>=this.config.demotePriority.length)){var r=e+1,i=Ym(n).call(n,{definition:this.config.demotePriority[r]});return i||this._getNextDefinition(r)}}},{key:"_initTimeUpdateEvent",value:function(){var e=this,t=this.player.currentTime;this.on(ND.TIME_UPDATE,(function(){var n=e.player.currentTime;n!==t?(t=n,e._clearTimer()):t=n}))}},{key:"_showToast",value:function(e){var t,n,r,i=this,o=null===(t=this.player)||void 0===t?void 0:t.getPlugin("toast"),a=this.player.config.i18nManager;o&&(this._toastId&&o.remove(this._toastId),this._toastId=o.toast(Bm(n="".concat(a.getText("DEFINITION_SWITCHING")," ")).call(n,null!==(r=e.showText)&&void 0!==r?r:e.definition," ..."),{duration:2e3,closable:!0}),this.player.once(ND.AFTER_DEFINITION_CHANGE,(function(){void 0!==i._toastId&&o.remove(i._toastId)})))}}],[{key:"pluginName",get:function(){return"definition"}},{key:"defaultConfig",get:function(){return Dm(Dm({},CL.defaultConfig),{},{index:3,list:[],panel:{title:{jp:"クラリティセレクション",en:"Definition Choose","zh-cn":"清晰度选择","zh-hk":"清晰度選擇"}},className:"xgplayer-definition",hidePortrait:!1,isShowIcon:!0,longWaitingTime:5e3,needFallback:!1,demotePriority:["uhd","hd","sd","ld","ao"]})}},{key:"textTips",get:function(){return{jp:"明快さ",en:"Definition","zh-cn":"清晰度","zh-hk":"清晰度"}}}]),r}(CL),OL={"biz:vod":"veplayer.biz.vod.[env].[ext]","biz:live":"veplayer.biz.live.[env].[ext]","plugin:flv":"veplayer.plugin.flv.[env].[ext]","plugin:mp4":"veplayer.plugin.mp4.[env].[ext]","plugin:hls":"veplayer.plugin.hls.[env].[ext]","plugin:hlsjs":"veplayer.plugin.hlsjs.[env].[ext]","plugin:shaka":"veplayer.plugin.shaka.[env].[ext]","plugin:rtm":"veplayer.plugin.rtm.[env].[ext]","plugin:xgvideo":"veplayer.plugin.xgvideo.[env].[ext]","plugin:drm":"veplayer.plugin.drm.[env].[ext]","plugin:abr":"veplayer.plugin.abr.[env].[ext]"},ML=function(e){return e.BizVod="biz:vod",e.BizLive="biz:live",e.PluginFlv="plugin:flv",e.PluginMp4="plugin:mp4",e.PluginHls="plugin:hls",e.PluginHlsJs="plugin:hlsjs",e.PluginShaka="plugin:shaka",e.PluginRtm="plugin:rtm",e.PluginXgvideo="plugin:xgvideo",e.PluginDrm="plugin:drm",e.PluginAbr="plugin:abr",e}(ML||{}),DL=function(){function e(t){var n=this;Ry(this,e),Ny(this,"modules",{}),Ny(this,"mountPromiseMap",{}),Ny(this,"_baseUrl",void 0),Ny(this,"_moduleSystem",void 0),Ny(this,"load",function(){var e=sy(oy().mark((function e(t,r){var i,o,a,s,l;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n._moduleSystem){e.next=2;break}throw new Error('You have to specify moduleSystem first, call "setModuleSystem(moduleSystem)" to set module system');case 2:if(OL[t]){e.next=4;break}throw new Error('Invalid module name: "'.concat(t,'"'));case 4:if("esm"!==n._moduleSystem){e.next=11;break}if(n.modules[t]){e.next=9;break}throw new Error('Dynamic module "'.concat(t,'" not found, you have to register it first under ESM'));case 9:return o=n.modules[t].exports,e.abrupt("return",null!==(i=o.default)&&void 0!==i?i:o);case 11:if(!n.modules[t]){e.next=21;break}if(1!==n.modules[t].state){e.next=16;break}return e.abrupt("return",n.modules[t].exports);case 16:if(0!==n.modules[t].state){e.next=20;break}return e.abrupt("return",n.mountPromiseMap[t].then((function(e){var t;return null!==(t=e.default)&&void 0!==t?t:e})));case 20:throw null!==(a=n.modules[t].error)&&void 0!==a?a:new Error('Dynamic module "'.concat(t,'" load failed.'));case 21:return s=[n._baseUrl,OL[t]].join("/").replace("[env]","production").replace("[ext]","js"),l={src:null!=r?r:s,name:t,state:0,exports:{__PLUGIN_NAME__:t}},n.modules[t]=l,n.mountPromiseMap[t]=n._mount(l),e.abrupt("return",n.mountPromiseMap[t]);case 26:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()),Ny(this,"registerPlugin",(function(e,t){if(!n._moduleSystem)throw new Error("You have to specify moduleSystem first, call setModuleSystem(moduleSystem) to set module system");return"esm"===n._moduleSystem?(n.modules[e]={src:"esm:".concat(e),name:e,state:1,exports:t},n.modules[e].exports):(n.modules[e]?n.modules[e].exports=t:n.modules[e]={src:"umd:".concat(e),name:e,state:1,exports:t},n.modules[e].exports)})),Ny(this,"register",(function(e){return Vw(e).call(e,(function(e){return n.registerPlugin(e.__PLUGIN_NAME__,e)}))})),this._baseUrl=t.baseUrl}return Fy(e,[{key:"baseUrl",get:function(){return this._baseUrl}},{key:"moduleSystem",get:function(){return this._moduleSystem}},{key:"setModuleSystem",value:function(e){this._moduleSystem=e}},{key:"setBaseUrl",value:function(e){this._baseUrl=e}},{key:"_mount",value:function(e){var t=this.modules;return new Hw((function(n,r){var i=document.createElement("script");i.src=e.src,i.onload=function(){e.state=1,n(t[e.name].exports),i.onload=null},i.onerror=function(t){e.state=2,e.error=t,r(t),i.onerror=null},document.body.appendChild(i)}))}}]),e}(),LL=o(Ng),FL="Expected a function",NL="__lodash_placeholder__",UL=1,BL=2,VL=4,HL=8,jL=16,zL=32,WL=64,KL=128,GL=512,qL=1/0,YL=9007199254740991,XL=17976931348623157e292,$L=NaN,JL=[["ary",KL],["bind",UL],["bindKey",BL],["curry",HL],["curryRight",jL],["flip",GL],["partial",zL],["partialRight",WL],["rearg",256]],QL="[object Function]",ZL="[object GeneratorFunction]",eF="[object Symbol]",tF=/^\s+|\s+$/g,nF=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,rF=/\{\n\/\* \[wrapped with (.+)\] \*/,iF=/,? & /,oF=/^[-+]0x[0-9a-f]+$/i,aF=/^0b[01]+$/i,sF=/^\[object .+?Constructor\]$/,lF=/^0o[0-7]+$/i,uF=/^(?:0|[1-9]\d*)$/,cF=Dk,hF="object"==Tc(i)&&i&&i.Object===Object&&i,fF="object"==("undefined"==typeof self?"undefined":Tc(self))&&self&&self.Object===Object&&self,dF=hF||fF||Function("return this")();function pF(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)}function vF(e,t){return!!(e?e.length:0)&&function(e,t,n){if(t!=t)return function(e,t,n,r){var i=e.length,o=n+(r?1:-1);for(;r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}(e,gF,n);var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,0)>-1}function gF(e){return e!=e}function yF(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&a!==NL||(e[n]=NL,o[i++]=n)}return o}var mF,_F,bF,wF=Function.prototype,kF=Object.prototype,EF=dF["__core-js_shared__"],SF=(mF=/[^.]+$/.exec(EF&&jk(EF)&&jk(EF).IE_PROTO||""))?"Symbol(src)_1."+mF:"",TF=wF.toString,CF=kF.hasOwnProperty,xF=kF.toString,PF=RegExp("^"+TF.call(CF).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),AF=Object.create,IF=Math.max,RF=Math.min,OF=(_F=BF(Object,"defineProperty"),(bF=BF.name)&&bF.length>2?_F:void 0);function MF(e){if(!GF(e)||function(e){return!!SF&&SF in e}(e))return!1;var t=function(e){var t=GF(e)?xF.call(e):"";return t==QL||t==ZL}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(rj){}return t}(e)?PF:sF;return t.test(function(e){if(null!=e){try{return TF.call(e)}catch(rj){}try{return e+""}catch(rj){}}return""}(e))}function DF(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n,r=GF(n=e.prototype)?AF(n):{},i=e.apply(r,t);return GF(i)?i:r}}function LF(e,t,n,r,i,o,a,s,l,u){var c=t&KL,h=t&UL,f=t&BL,d=t&(HL|jL),p=t&GL,v=f?void 0:DF(e);return function g(){for(var y=arguments.length,m=Array(y),_=y;_--;)m[_]=arguments[_];if(d)var b=UF(g),w=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&r++;return r}(m,b);if(r&&(m=function(e,t,n,r){for(var i=-1,o=e.length,a=n.length,s=-1,l=t.length,u=IF(o-a,0),c=Array(l+u),h=!r;++s<l;)c[s]=t[s];for(;++i<a;)(h||i<o)&&(c[n[i]]=e[i]);for(;u--;)c[s++]=e[i++];return c}(m,r,i,d)),o&&(m=function(e,t,n,r){for(var i=-1,o=e.length,a=-1,s=n.length,l=-1,u=t.length,c=IF(o-s,0),h=Array(c+u),f=!r;++i<c;)h[i]=e[i];for(var d=i;++l<u;)h[d+l]=t[l];for(;++a<s;)(f||i<o)&&(h[d+n[a]]=e[i++]);return h}(m,o,a,d)),y-=w,d&&y<u){var k=yF(m,b);return FF(e,t,LF,g.placeholder,n,m,k,s,l,u-y)}var E=h?n:this,S=f?E[e]:e;return y=m.length,s?m=function(e,t){var n=e.length,r=RF(t.length,n),i=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(e);for(;r--;){var o=t[r];e[r]=jF(o,n)?i[o]:void 0}return e}(m,s):p&&y>1&&LL(m).call(m),c&&l<y&&(m.length=l),this&&this!==dF&&this instanceof g&&(S=v||DF(S)),S.apply(E,m)}}function FF(e,t,n,r,i,o,a,s,l,u){var c=t&HL;t|=c?zL:WL,(t&=~(c?WL:zL))&VL||(t&=~(UL|BL));var h=n(e,t,i,c?o:void 0,c?a:void 0,c?void 0:o,c?void 0:a,s,l,u);return h.placeholder=r,zF(h,e,t)}function NF(e,t,n,r,i,o,a,s){var l=t&BL;if(!l&&"function"!=typeof e)throw new TypeError(FL);var u=r?r.length:0;if(u||(t&=~(zL|WL),r=i=void 0),a=void 0===a?a:IF(XF(a),0),s=void 0===s?s:XF(s),u-=i?i.length:0,t&WL){var c=r,h=i;r=i=void 0}var f=[e,t,n,r,i,c,h,o,a,s];if(e=f[0],t=f[1],n=f[2],r=f[3],i=f[4],!(s=f[9]=null==f[9]?l?0:e.length:IF(f[9]-u,0))&&t&(HL|jL)&&(t&=~(HL|jL)),t&&t!=UL)d=t==HL||t==jL?function(e,t,n){var r=DF(e);return function i(){for(var o=arguments.length,a=Array(o),s=o,l=UF(i);s--;)a[s]=arguments[s];var u=o<3&&a[0]!==l&&a[o-1]!==l?[]:yF(a,l);return(o-=u.length)<n?FF(e,t,LF,i.placeholder,void 0,a,u,void 0,void 0,n-o):pF(this&&this!==dF&&this instanceof i?r:e,this,a)}}(e,t,s):t!=zL&&t!=(UL|zL)||i.length?LF.apply(void 0,f):function(e,t,n,r){var i=t&UL,o=DF(e);return function t(){for(var a=-1,s=arguments.length,l=-1,u=r.length,c=Array(u+s),h=this&&this!==dF&&this instanceof t?o:e;++l<u;)c[l]=r[l];for(;s--;)c[l++]=arguments[++a];return pF(h,i?n:this,c)}}(e,t,n,r);else var d=function(e,t,n){var r=t&UL,i=DF(e);return function t(){return(this&&this!==dF&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n);return zF(d,e,t)}function UF(e){return e.placeholder}function BF(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return MF(n)?n:void 0}function VF(e){var t=e.match(rF);return t?t[1].split(iF):[]}function HF(e,t){var n=t.length,r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(nF,"{\n/* [wrapped with "+t+"] */\n")}function jF(e,t){return!!(t=null==t?YL:t)&&("number"==typeof e||uF.test(e))&&e>-1&&e%1==0&&e<t}var zF=OF?function(e,t,n){var r,i=t+"";return OF(e,"toString",{configurable:!0,enumerable:!1,value:(r=HF(i,WF(VF(i),n)),function(){return r})})}:function(e){return e};function WF(e,t){return function(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););}(JL,(function(n){var r="_."+n[0];t&n[1]&&!vF(e,r)&&e.push(r)})),KT(e).call(e)}function KF(e,t,n){var r=NF(e,HL,void 0,void 0,void 0,void 0,void 0,t=n?void 0:t);return r.placeholder=KF.placeholder,r}function GF(e){var t=Tc(e);return!!e&&("object"==t||"function"==t)}function qF(e){return"symbol"==Tc(e)||function(e){return!!e&&"object"==Tc(e)}(e)&&xF.call(e)==eF}function YF(e){return e?(e=function(e){if("number"==typeof e)return e;if(qF(e))return $L;if(GF(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=GF(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(tF,"");var n=aF.test(e);return n||lF.test(e)?cF(Ww(e).call(e,2),n?2:8):oF.test(e)?$L:+e}(e))===qL||e===-qL?(e<0?-1:1)*XL:e==e?e:0:0===e?e:0}function XF(e){var t=YF(e),n=t%1;return t==t?n?t-n:t:0}KF.placeholder={};var $F=o(KF),JF=p,QF=ee,ZF=Un,eN=zn,tN=jc,nN=Math.min,rN=[].lastIndexOf,iN=!!rN&&1/[1].lastIndexOf(1,-0)<0,oN=tN("lastIndexOf"),aN=iN||!oN?function(e){if(iN)return JF(rN,this,arguments)||0;var t=QF(this),n=eN(t),r=n-1;for(arguments.length>1&&(r=nN(r,ZF(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}:rN;On({target:"Array",proto:!0,forced:aN!==[].lastIndexOf},{lastIndexOf:aN});var sN,lN,uN=Gc("Array").lastIndexOf,cN=ce,hN=uN,fN=Array.prototype,dN=o((function(e){var t=e.lastIndexOf;return e===fN||cN(fN,e)&&t===fN.lastIndexOf?hN:t})),pN=null!==(sN=null===(lN=document.currentScript)||void 0===lN?void 0:lN.src)&&void 0!==sN?sN:"https://tosv.byted.org/obj/lux/sdk/@byted/veplayer/".concat("2.7.1-rc.1","/object/umd/"),vN=new DL({baseUrl:Ww(pN).call(pN,0,dN(pN).call(pN,"/"))}),gN=vN.registerPlugin,yN=vN.register;function mN(e,t){return _N.apply(this,arguments)}function _N(){return _N=sy(oy().mark((function e(t,n){var r;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,vN.load(t,n);case 3:return e.abrupt("return",e.sent);case 6:throw e.prev=6,e.t0=e.catch(0),YP(WP.MODULE_LOAD_ERROR,{ext:{name:t,cdn:null===e.t0||void 0===e.t0||null===(r=e.t0.target)||void 0===r?void 0:r.src},error:e.t0});case 9:case"end":return e.stop()}}),e,null,[[0,6]])}))),_N.apply(this,arguments)}var bN=function(e){if(e){_D(e).call(e,"//")&&(e=location.protocol+e);try{return new WM(e)}catch(Qz){return}}};function wN(e){var t,n={},r=function(e,t){var n=void 0!==oc&&hy(e)||e["@@iterator"];if(!n){if(ly(e)||(n=Ay(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){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}}}}(e.attributes);try{for(r.s();!(t=r.n()).done;){var i=t.value;n[i.name]=i.value}}catch(o){r.e(o)}finally{r.f()}return n}function kN(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return zw(t).forEach((function(n){var r=n,i=t[n];i&&(null==e||e.setAttribute(r,i))})),e}function EN(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=wN(e);return zw(n).forEach((function(n){t[n]?null==e||e.setAttribute(n,t[n]):null==e||e.removeAttribute(n)})),e}var SN=Object.freeze({__proto__:null,getAttributes:wN,replaceAttributes:EN,setAttributes:kN}),TN=['video/mp4;codecs="hev1.1.6.L120.90"','video/mp4;codecs="hev1.2.4.L120.90"','video/mp4;codecs="hev1.3.E.L120.90"','video/mp4;codecs="hev1.4.10.L120.90"'],CN=$F((function(e,t){var n;return null==t?void 0:LD(n=t.split("?")[0].toLowerCase()).call(n,e)})),xN=CN(".m3u8"),PN=CN(".mp4"),AN=CN(".flv"),IN=CN(".sdp"),RN=CN(".mpd");function ON(e){return xN(e)?"hls":AN(e)?"flv":IN(e)?"rtm":PN(e)?"mp4":RN(e)?"dash":"unknown"}function MN(){return(MN=sy(oy().mark((function e(){var t,n;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,mN(ML.PluginXgvideo);case 2:return t=e.sent,n=t.XGVideoPlugin,e.abrupt("return",null==n?void 0:n.isSupported());case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var DN=Dm(Dm(Dm({},ZT),SN),{},{getStreamType:ON,isMseSupported:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.H264;return e===t.H265?aC.isHevcSupported():e===t.H264?aC.isMSESupport():aC.isMSESupport(e)},isSoftDecodeSupported:function(){return MN.apply(this,arguments)},isMMSSupported:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.H264;return void 0!==window.ManagedMediaSource&&(e===t.H264?window.ManagedMediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'):e===t.H265?TN.some((function(e){return window.ManagedMediaSource.isTypeSupported(e)})):window.ManagedMediaSource.isTypeSupported(e))},appendSearchParams:function(e,t){var n,r=bN(e);if(!e||!r)return null!==(n=e)&&void 0!==n?n:"";var i,o=_D(e).call(e,"//");for(var a in t){var s,l,u=t[a];if(null!=r&&r.searchParams.has(a))null==r||null===(s=r.searchParams)||void 0===s||s.set(a,u);else null==r||null===(l=r.searchParams)||void 0===l||l.append(a,u)}return e=r.toString(),o?null===(i=e)||void 0===i?void 0:i.replace(location.protocol,""):e},getUrlObject:bN}),LN=aC.isWeixin,FN=aC.os,NN=aC.device,UN=FN.isAndroid,BN=FN.isIos,VN="mobile"===NN,HN=0,jN=!1,zN=function(e){NP(n,e);var t=VP(n);function n(e){var r;return Ry(this,n),Ny(xP(r=t.call(this,e)),"_hasSetUserAutoplay",void 0),Ny(xP(r),"_timer",void 0),Ny(xP(r),"_wxTimer",void 0),Ny(xP(r),"_state",{mode:0,showUnmuteBt:!1}),Ny(xP(r),"userClickPlay",(function(){if(!jN){var e=r.player.play();e&&e.then?e.then((function(){console.log("user action autoplay success"),jN=!0})).catch((function(e){console.warn("user action autoplay fail:",e)})):(console.warn("no play promise"),jN=!0)}})),r}return Fy(n,[{key:"afterCreate",value:function(){this.initState(),this.initEvents(),this.setWXAutoPlay()}},{key:"updateLang",value:function(){this.renderUnmuteBt()}},{key:"initState",value:function(){this._state.mode=this.player.muted?1:0}},{key:"initEvents",value:function(){this.player.on(PC,this.handleAutoplayPrevented.bind(this)),this.player.on(xC,this.handleAutoplayStart.bind(this)),this.player.on(bC,this.handleVolumechange.bind(this)),this.setUserActionAutoPlay()}},{key:"setWXAutoPlay",value:function(){LN&&this.player.config.autoplay&&this.config.enableWxJsBridgeAutoplay&&(window.WeixinJSBridge?this.wxPlay():document.addEventListener("WeixinJSBridgeReady",this.wxPlay.bind(this),!1))}},{key:"wxCanPlayFn",value:function(){var e=this;window.WeixinJSBridge&&window.WeixinJSBridge.invoke("getNetworkType",{},(function(){e._wxTimer=window.setTimeout((function(){e._wxTimer&&clearTimeout(e._wxTimer);var t=e.player.play();t&&t.then?t.then((function(){console.log("wechat autoplay success")})).catch((function(t){console.warn("wechat autoplay fail:",t),e._state.showUnmuteBt=!1,e.renderUnmuteBt()})):console.warn("wechat browser no play promise")}))}))}},{key:"wxPlay",value:function(){this.player.readyState>=2?this.wxCanPlayFn():UN?this.player.once(mC,this.wxCanPlayFn.bind(this)):BN&&this.player.once(AC,this.wxCanPlayFn.bind(this))}},{key:"setUserActionAutoPlay",value:function(){var e=this;this.config.enableUserActionAutoplay&&this.player.once(FD.AUTOPLAY_FAIL,(function(){e._hasSetUserAutoplay=!0,(e.config.userActionDom instanceof window.Node?e.config.userActionDom:window.document.body).addEventListener("click",e.userClickPlay,!1)}))}},{key:"handleAutoplayPrevented",value:function(){return 0===this._state.mode?(console.warn("unmute autoplay fail"),this.player.emit(FD.AUTOPLAY_FAIL,{mode:"unmute"}),UN&&LN?void(this._state.mode=2):void(this.config.enableDegradeMuteAutoplay&&this.changeMuteMode())):1===this._state.mode?(console.warn("mute autoplay fail"),this.player.emit(FD.AUTOPLAY_FAIL,{mode:"mute"}),void(this._state.mode=2)):2===this._state.mode?(this.player.emit(FD.AUTOPLAY_FAIL,{mode:"noSupport"}),void console.warn("not support autoplay")):void 0}},{key:"changeMuteMode",value:function(){var e=this;this.player.muted=!0,this._state.showUnmuteBt=!0,this._state.mode=1,this.renderUnmuteBt(),this._timer=window.setTimeout((function(){e._timer&&window.clearTimeout(e._timer);var t=e.player.play();t&&t.then?t.then((function(){console.log("degrade mute autoplay success")})).catch((function(t){console.warn("degrade mute autoplay fail:",t),e.player.muted=!1,e._state.showUnmuteBt=!1,e.renderUnmuteBt()})):console.warn("no play promise")}))}},{key:"handleAutoplayStart",value:function(){if(0!==this._state.mode)return 1===this._state.mode?(this.player.emit(FD.AUTOPLAY_SUCCESS,{mode:"mute"}),this._state.showUnmuteBt=!0,void this.renderUnmuteBt()):2===this._state.mode?(this.player.emit(FD.AUTOPLAY_SUCCESS,{mode:"click"}),this.player.muted=!1,this._state.showUnmuteBt=!1,void this.renderUnmuteBt()):void 0;this.player.emit(FD.AUTOPLAY_SUCCESS,{mode:"unmute"})}},{key:"handleVolumechange",value:function(){this._state.mode=this.player.muted?1:0,this._state.showUnmuteBt&&(this._state.showUnmuteBt=!1,this.renderUnmuteBt(),this.player.paused&&this.player.readyState>=1&&this.player.play())}},{key:"renderUnmuteBt",value:function(){var e=this.root,t=this.player.config.i18nManager;if(e&&(e.innerHTML="",this._state.showUnmuteBt)){var n=t.getText("UNMUTE"),r=ZT.createDom("div",n,void 0,"veplayer-unmute-bt");e.appendChild(r),this.bind(".veplayer-unmute-bt","click",this.cancelUnmute.bind(this)),this.bind(".veplayer-unmute-bt","touchend",this.cancelUnmute.bind(this))}}},{key:"cancelUnmute",value:function(){var e=Date.now();if(e-HN>200){HN=e,this.player.muted=!1,this._state.showUnmuteBt=!1,this.renderUnmuteBt(),this.emit(FD.AUTOPLAY_UNMUTE);var t="mobile"===aC.device,n=IN(this.player.config.url);t&&n&&(this.player.volume>.5?this.player.volume=this.player.volume-.1:this.player.volume=this.player.volume+.1)}}},{key:"destroy",value:function(){if(this.player.off(PC,this.handleAutoplayPrevented.bind(this)),this.player.off(xC,this.handleAutoplayStart.bind(this)),this.player.off(bC,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=VN?"touch":"click";(this.config.userActionDom instanceof window.Node?this.config.userActionDom:window.document.body).removeEventListener(e,this.userClickPlay,!1)}}},{key:"render",value:function(){return'<div class="veplayer-unmute"></div>'}}],[{key:"pluginName",get:function(){return"autoplayPlugin"}},{key:"defaultConfig",get:function(){return{position:Rx.POSITIONS.ROOT,enableDegradeMuteAutoplay:!1,enableWxJsBridgeAutoplay:!1,userActionDom:window.document.body,enableUserActionAutoplay:!1}}}]),n}(Rx),WN=XD.values;On({target:"Object",stat:!0},{values:function(e){return WN(e)}});var KN=o(ie.Object.values);function GN(){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 qN,YN,XN=function(e){NP(n,e);var t=VP(n);function n(){return Ry(this,n),t.apply(this,arguments)}return Fy(n,[{key:"onItemClick",value:function(){}},{key:"onOptionClick",value:function(){this.toggle(!1)}},{key:"updateLang",value:function(){var e,t=this,n=this.player.config.i18nManager;null===(e=this.config.plugins)||void 0===e||e.forEach((function(e){var r,i=null!==(r=n.normalize(e.textTips))&&void 0!==r?r:e.pluginName;if(t.player.root){var o=ZT.findDom(t.player.root,".panel-plugin-".concat(e.pluginName," .panel-icon-bt-text"));o&&(o.innerHTML=i)}}))}},{key:"beforeCreate",value:function(e){var t,n=e.player.config.i18nManager;e.config.list=null===(t=e.config.plugins)||void 0===t?void 0:Vw(t).call(t,(function(t,r){var i,o=ZT.createDom("div","",{},"panel-icon-bt panel-plugin-".concat(t.pluginName)),a=ZT.createDom("div","",{},"panel-icon-svg"),s=null!==(i=n.normalize(t.textTips))&&void 0!==i?i:t.pluginName;return o.appendChild(a),o.appendChild(ZT.createDom("span",s,{"plugin-index":r},"panel-icon-bt-text")),{showText:o,plugin:e.player.registerPlugin({plugin:t,options:{root:a}})}}))}},{key:"hideChild",value:function(e){if(e){var t;null===(t=e.hide)||void 0===t||t.call(e);var n=document.querySelector(".panel-plugin-".concat(e.pluginName));n&&ZT.addClass(n,"hide")}}},{key:"showChild",value:function(e){if(e){var t;null===(t=e.show)||void 0===t||t.call(e);var n=document.querySelector(".panel-plugin-".concat(e.pluginName));n&&ZT.removeClass(n,"hide")}}},{key:"registerIcons",value:function(){return{more:{icon:GN}}}}],[{key:"pluginName",get:function(){return"more"}},{key:"defaultConfig",get:function(){return Dm(Dm({},CL.defaultConfig),{},{index:1,plugins:[],list:[],hideOnSingleOption:!1,isShowIcon:!0,hidePortrait:!1,renderType:bL.Icon,panel:{className:"more-panel-content"}})}}]),n}(CL),$N=function(e){return e.ROOT_TOP_RIGHT="rootTopRight",e.ROOT_TOP_RIGHT_COLLAPSE="rootTopRightCollapse",e}($N||{}),JN=function(e){NP(n,e);var t=VP(n);function n(){return Ry(this,n),t.apply(this,arguments)}return Fy(n,[{key:"registerIcons",value:function(){return{more:{icon:GN,class:"xgplayer-more-svg"}}}},{key:"children",value:function(){var e=this,t=this._getPlugins(),n=t.plugins,r=t.collapsePlugins,i={};return n.forEach((function(t){i[t.pluginName]={plugin:t,options:{root:e.root}}})),r.length&&(i[XN.pluginName]={plugin:XN,options:{root:this.root,plugins:r}}),i}},{key:"render",value:function(){return'<xg-right-grid class="xg-right-grid xgplayer-rightTop-iconList"></xg-right-grid>'}},{key:"_getPlugins",value:function(){var e,t=this,n=[],r=[],i=null===(e=this.player.config.ignores)||void 0===e?void 0:Vw(e).call(e,(function(e){return e.toLowerCase()}));return this.config.plugins.forEach((function(e){var o,a=e.pluginName.toLowerCase();null!=i&&LD(i).call(i,a)||("rootTopRight"===(null!==(o=t.player.config[a].position)&&void 0!==o?o:e.defaultConfig.position)?n.push(e):r.push(e))})),{plugins:null!=n?n:[],collapsePlugins:null!=r?r:[]}}}],[{key:"pluginName",get:function(){return"topRightBar"}},{key:"defaultConfig",get:function(){return{position:Rx.POSITIONS.ROOT_TOP,plugins:[]}}},{key:"isTopRightPlugin",value:function(e,t){var n,r,i,o,a,s=null!==(r=null===(i=t[null==e||null===(n=e.pluginName)||void 0===n?void 0:n.toLowerCase()])||void 0===i?void 0:i.position)&&void 0!==r?r:null==e||null===(o=e.defaultConfig)||void 0===o?void 0:o.position;return!!LD(a=KN($N)).call(a,s)}}]),n}(Rx),QN=[tI,aI,cI,vA,gI,$P,tA,WA,nA,vL,gL,xL,RL,zN],ZN=Bm(qN=[]).call(qN,QN,[jA,mA,JN]),eU=Bm(YN=[]).call(YN,QN,[LA,JN]),tU="pc"===aC.device?ZN:eU;function nU(){return(new DOMParser).parseFromString('<svg width="21" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.892 2h4.445v1.778H3.892v4.444H2.114V3.778C2.114 2.796 2.91 2 3.892 2zm4.445 16v-4.444c0-.982-.796-1.778-1.778-1.778H2.114v1.778h2.944L2.264 16.35a.9.9 0 001.272 1.273l2.988-2.987a.918.918 0 00.035-.037V18h1.778zm8-6.222v4.444h-4.445V18h4.445c.981 0 1.777-.796 1.777-1.778v-4.444h-1.777zM11.892 2v4.445c0 .981.796 1.777 1.778 1.777h4.444V6.445H15.17l2.568-2.568a.9.9 0 10-1.273-1.273L13.67 5.4V2h-1.778z" fill="#fff"/></svg>',"image/svg+xml").firstChild}function rU(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.778 2h4.444v1.778H3.778v4.444H2V3.778C2 2.796 2.796 2 3.778 2zM2 11.778v4.444C2 17.204 2.796 18 3.778 18h4.444v-1.778H4.823l2.313-2.313a.9.9 0 00-1.272-1.273l-2.086 2.086v-2.944H2zm14.222 0v4.444h-4.444V18h4.444c.982 0 1.778-.796 1.778-1.778v-4.444h-1.778zM18 8.222V3.778C18 2.796 17.204 2 16.222 2h-4.444v1.778h2.945l-2.587 2.586a.9.9 0 101.273 1.273l2.813-2.813v3.398H18z" fill="#fff"/></svg>',"image/svg+xml").firstChild}var iU={startPlay:function(){return(new DOMParser).parseFromString('<svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="60" height="60" rx="30" fill="#000" fill-opacity=".4"/><path d="M40.243 28.3a2 2 0 010 3.401L24.06 41.712c-1.332.825-3.052-.134-3.052-1.7V19.988c0-1.566 1.72-2.525 3.052-1.7l16.184 10.01z" fill="#fff"/></svg>',"image/svg+xml").firstChild},play:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.121 8.299a2 2 0 010 3.402l-7.94 4.91c-1.332.825-3.051-.133-3.051-1.7V5.09c0-1.567 1.72-2.525 3.052-1.701l7.939 4.911z" fill="#fff"/></svg>',"image/svg+xml").firstChild},pause:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="5.313" y="3.75" width="3.125" height="12.5" rx=".625" fill="#fff"/><rect x="11.563" y="3.75" width="3.125" height="12.5" rx=".625" fill="#fff"/></svg>',"image/svg+xml").firstChild},fullscreen:rU,exitFullscreen:nU,replay:function(){return(new DOMParser).parseFromString('<svg width="72" height="72" viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg"><g fill="#FFF" fill-rule="evenodd"><circle fill-opacity=".3" cx="36" cy="36" r="36"/><path d="M40.167 32.667a.833.833 0 01-.834-.834v-1.666c0-.46.373-.834.834-.834h5.409a11.653 11.653 0 00-9.576-5c-6.443 0-11.667 5.224-11.667 11.667S29.557 47.667 36 47.667c5.285 0 9.749-3.514 11.183-8.333h3.445C49.112 46.014 43.138 51 36 51c-8.284 0-15-6.716-15-15 0-8.284 6.716-15 15-15 4.713 0 8.918 2.173 11.668 5.572l-.001-4.739c0-.46.373-.833.833-.833h1.667c.46 0 .833.373.833.833V31c0 .879-.68 1.598-1.542 1.662l-.125.005h-9.166z"/></g></svg>',"image/svg+xml").firstChild},volumeLarge:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.867 2.5h.55c.44 0 .799.34.83.771l.003.062v13.334c0 .44-.34.799-.771.83l-.062.003h-.55a.833.833 0 01-.444-.128l-.064-.045-4.867-3.744a.831.831 0 01-.322-.59l-.003-.07V7.077c0-.235.099-.458.271-.615l.054-.045L9.36 2.673a.832.832 0 01.43-.17l.078-.003h.55-.55zm6.767 2.278A7.474 7.474 0 0118.75 10a7.477 7.477 0 01-2.128 5.234.4.4 0 01-.57-.004l-.587-.586a.442.442 0 01.005-.617A5.812 5.812 0 0017.083 10c0-1.557-.61-2.97-1.603-4.017a.442.442 0 01-.003-.615l.586-.586a.4.4 0 01.57-.004zM2.5 6.667c.23 0 .417.186.417.416v5.834c0 .23-.187.416-.417.416h-.833a.417.417 0 01-.417-.416V7.083c0-.23.187-.416.417-.416H2.5zm11.768.46A4.153 4.153 0 0115.417 10c0 1.12-.442 2.137-1.162 2.886a.388.388 0 01-.555-.007l-.577-.578c-.176-.176-.156-.467.009-.655A2.49 2.49 0 0013.75 10a2.49 2.49 0 00-.61-1.636c-.163-.188-.182-.477-.006-.653l.578-.578a.388.388 0 01.556-.006z" fill="#fff"/></svg>',"image/svg+xml").firstChild},volumeMuted:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.045 2.5h.55c.44 0 .8.34.831.771l.003.062v13.334c0 .44-.34.799-.771.83l-.063.003h-.55a.833.833 0 01-.443-.128l-.065-.045-4.866-3.744a.831.831 0 01-.323-.59l-.003-.07V7.077c0-.235.1-.458.272-.615l.054-.045 4.866-3.744a.832.832 0 01.43-.17l.078-.003h.55-.55zM2.68 6.667c.23 0 .416.186.416.416v5.834c0 .23-.186.416-.416.416h-.834a.417.417 0 01-.416-.416V7.083c0-.23.186-.416.416-.416h.834zm10.467.294a.417.417 0 01.59 0l1.767 1.768L17.27 6.96a.417.417 0 01.589 0l.59.59a.417.417 0 010 .589L16.68 9.908l1.768 1.767c.15.15.162.387.035.55l-.035.04-.589.589a.417.417 0 01-.59 0l-1.767-1.768-1.768 1.768a.417.417 0 01-.59 0l-.588-.59a.417.417 0 010-.589l1.767-1.768-1.767-1.767a.417.417 0 01-.035-.55l.035-.04.589-.589z" fill="#fff"/></svg>',"image/svg+xml").firstChild},volumeSmall:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.867 2.5h.55c.44 0 .799.34.83.771l.003.062v13.334c0 .44-.34.799-.771.83l-.062.003h-.55a.833.833 0 01-.444-.128l-.064-.045-4.867-3.744a.831.831 0 01-.322-.59l-.003-.07V7.077c0-.235.099-.458.271-.615l.054-.045L9.36 2.673a.832.832 0 01.43-.17l.078-.003h.55-.55zM2.5 6.667c.23 0 .417.186.417.416v5.834c0 .23-.187.416-.417.416h-.833a.417.417 0 01-.417-.416V7.083c0-.23.187-.416.417-.416H2.5zm11.768.46A4.153 4.153 0 0115.417 10c0 1.12-.442 2.137-1.162 2.886a.388.388 0 01-.555-.007l-.577-.578c-.176-.176-.156-.467.009-.655A2.49 2.49 0 0013.75 10a2.49 2.49 0 00-.61-1.636c-.163-.188-.182-.477-.006-.653l.578-.578a.388.388 0 01.556-.006z" fill="#fff"/></svg>',"image/svg+xml").firstChild}},oU=Dm(Dm({},iU),{},{fullscreen:rU,exitFullscreen:nU}),aU=Dm(Dm({},iU),{},{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}}),sU="pc"===aC.device?oU:aU,lU=Dm(Dm({},oP.TEXT),{},{DEFINITION_FALLBACK_TOAST:"The current network is unstable, it is recommended to switch to ",DEFINITION_SWITCHING:"Switching to",ERROR_REFRESH:"Refresh",UNMUTE:"Click to unmute",MANIFEST:"Video parsing error",NETWORK:"Network error",NETWORK_TIMEOUT:"Network timeout",NETWORK_FORBIDDEN:"Authentication error",NETWORK_NOTFOUND:"Stream does not exist",DEMUX:"Video parsing error",REMUX:"Video parsing error",MEDIA:"An error occurred, Please try again",MEDIA_ERR_CODEC_NOT_SUPPORTED:"Audio/video codec is not supported",MEDIA_ERR_URL_EMPTY:"The stream address is not specified",DRM:"Permission verification failed",DRM_LICENSE:"Commercial DRM Permission verification failed",OTHER:"Unknown error",RUNTIME:"An error occurred, Please try again",MODULE_LOAD_ERROR:"CDN fetch error",UNKNOWN:"Unknown error"}),uU=Dm(Dm({},{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:"直播"}),{},{DEFINITION_FALLBACK_TOAST:"当前网络不稳定,建议切换到",DEFINITION_SWITCHING:"正在切换至",ERROR_REFRESH:"刷新",UNMUTE:"点击取消静音",MANIFEST:"视频解析错误",NETWORK:"网络错误",NETWORK_TIMEOUT:"网络超时",NETWORK_FORBIDDEN:"鉴权异常",NETWORK_NOTFOUND:"播放地址不存在",DEMUX:"视频解析错误",REMUX:"视频解析错误",MEDIA:"播放异常,请重试",MEDIA_ERR_CODEC_NOT_SUPPORTED:"不支持的音频/视频格式",MEDIA_ERR_URL_EMPTY:"当前播放地址为空",DRM:"权限验证失败",DRM_LICENSE:"商业 DRM LICENSE 鉴权失败",OTHER:"其他报错",RUNTIME:"播放异常,请重试",MODULE_LOAD_ERROR:"插件模块加载异常",UNKNOWN:"未知报错"}),cU=function(){function e(t){var n;if(Ry(this,e),Ny(this,"_lang",void 0),this._lang=(null==t?void 0:t.lang)||nC()||"en","zh"===this._lang&&(this._lang="zh-cn"),null!=t&&null!==(n=t.i18n)&&void 0!==n&&n.texts){var r,i,o=Vw(r=JD(null==t||null===(i=t.i18n)||void 0===i?void 0:i.texts)).call(r,(function(e){var t=HD(e,2);return{LANG:t[0],TEXT:t[1]}}));e.extend(o)}}return Fy(e,[{key:"setLang",value:function(e){this._lang=e}},{key:"getLang",value:function(){return this._lang}},{key:"normalize",value:function(e){return e?"string"==typeof e?e:e[this._lang]:""}},{key:"getText",value:function(e){var t,n,r;if(e){var i=null==cP?void 0:cP.lang;return null!==(t=null==i||null===(n=i[this._lang])||void 0===n?void 0:n[e])&&void 0!==t?t:null==i||null===(r=i.en)||void 0===r?void 0:r[e]}}}],[{key:"langKeys",get:function(){return cP.langKeys}},{key:"isLangValid",value:function(e){var t;return LD(t=cP.langKeys).call(t,e)||"zh"===e}},{key:"extend",value:function(e,t){cP.extend(e,t)}}]),e}(),hU=function(){function e(t){Ry(this,e),Ny(this,"_videoAttributes",void 0),Ny(this,"_el",void 0),this._videoAttributes=wN(t),this._el=t}return Fy(e,[{key:"options",get:function(){var e=this;return{remainMediaAfterDestroy:!0,mediaEl:function(t){return kN(e._el,t)}}}},{key:"destroy",value:function(){EN(this._el,this._videoAttributes)}}]),e}(),fU=["autoplay"],dU=Dm(Dm({},Rx.POSITIONS),$N),pU={id:"veplayer",width:"100%",height:"100%",decodeType:r.Hardware,fullscreen:{useCssFullscreen:!1}},vU=function(e){var t,n,r,i,o=e.autoplay,a=tm(e,fU);if(a.poster)if("string"==typeof a.poster)a.poster=VD(a.poster);else if("string"==typeof(null===(t=a.poster)||void 0===t?void 0:t.poster)){var s;a.poster.poster=VD(null===(s=a.poster)||void 0===s?void 0:s.poster)}(a.icons=Dm(Dm({},sU),a.icons?(n=a.icons,r={},JD(null!=n?n:{}).forEach((function(e){var t=HD(e,2),n=t[0],i=t[1];"string"==typeof i?console.warn("icons.".concat(n," has been removed")):r[n]=i})),r):{}),a.autoplay=Boolean(o),o&&"boolean"!=typeof o)&&(a.autoplayMuted=null==o?void 0:o.muted,a.videoAttributes=Dm(Dm({},null!==(i=a.videoAttributes)&&void 0!==i?i:{}),{},{muted:null==o?void 0:o.muted}),a.autoplayPlugin=o);return delete a.i18n,a},gU=function(){function e(){var t,n,r,i,o,a,s,l,u,c,h,f,d,p=this,v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Ry(this,e),Ny(this,"_player",void 0),Ny(this,"_sourceManager",void 0),Ny(this,"_preparePlugins",void 0),Ny(this,"_previousPrepareResult",void 0),Ny(this,"_i18nManager",void 0),Ny(this,"_events",{}),Ny(this,"_customMedia",void 0),Ny(this,"_errorCallback",void 0),Ny(this,"_beforeFallbackError",void 0),this._sourceManager=v.sourceManager,this._preparePlugins=v.preparePlugins,this._previousPrepareResult=v.prepareResult,this._beforeFallbackError=v.beforeFallbackError,this._i18nManager=null!==(t=v.i18nManager)&&void 0!==t?t:new cU({i18n:v.i18n}),v.mediaElement&&(this._customMedia=new hU(v.mediaElement));var g=vU(Dm(Dm(Dm({},v),null===(n=this._customMedia)||void 0===n?void 0:n.options),null===(r=this._previousPrepareResult)||void 0===r?void 0:r.options)),y=Bm(i=[]).call(i,Iy(null!==(o=null===(a=this._previousPrepareResult)||void 0===a?void 0:a.plugins)&&void 0!==o?o:[]),Iy(null!==(s=v.plugins)&&void 0!==s?s:tU)),m=[],_=[];y.forEach((function(e){JN.isTopRightPlugin(e,v)?m.push(e):_.push(e)})),this._player=new CP(Dm(Dm(Dm({},pU),g),{},{definition:Dm({list:null!==(l=null===(u=this._sourceManager.source)||void 0===u?void 0:u.definitions)&&void 0!==l?l:[],defaultDefinition:null===(c=this._sourceManager.definition)||void 0===c?void 0:c.definition},null!==(h=v.definition)&&void 0!==h?h:{}),url:null===(f=this._sourceManager.definition)||void 0===f?void 0:f.url,sources:Dm(Dm({},null!==(d=v.sources)&&void 0!==d?d:{}),{},{sourceManager:this._sourceManager}),topRightBar:{plugins:m},plugins:_,i18nManager:this._i18nManager,veplayer:this})),this.emit(ND.PLAYER_CREATE_FINISH,this._player),this._errorCallback=function(e){return p._handleFallback(e)},this._player.on(pC,this._errorCallback)}var t,n,r,i,o,a,s;return Fy(e,[{key:"readyState",get:function(){return this._player.readyState}},{key:"buffered",get:function(){return this._player.buffered}},{key:"played",get:function(){return this._player.played}},{key:"cumulateTime",get:function(){return this._player.cumulateTime}},{key:"isFocused",get:function(){return this._player.isActive}},{key:"isFullscreen",get:function(){return this._player.isFullscreen}},{key:"isCssFullscreen",get:function(){return this._player.isCssfullScreen}},{key:"networkState",get:function(){return this._player.networkState}},{key:"paused",get:function(){return this._player.paused}},{key:"ended",get:function(){return this._player.ended}},{key:"state",get:function(){return this._player.state}},{key:"url",get:function(){return this._player.config.url}},{key:"source",get:function(){var e;return null===(e=this._sourceManager.source)||void 0===e?void 0:e.name}},{key:"playerVersion",get:function(){return"2.7.1-rc.1"}},{key:"definition",get:function(){var e;return null===(e=this._sourceManager.definition)||void 0===e?void 0:e.definition}},{key:"crossOrigin",get:function(){return this._player.crossOrigin},set:function(e){this._player.crossOrigin=e}},{key:"volume",get:function(){return this._player.volume},set:function(e){this._player.volume=e}},{key:"muted",get:function(){return this._player.muted},set:function(e){this._player.muted=e}},{key:"lang",get:function(){return this._i18nManager.getLang()},set:function(e){if(this._player.lang!==e)if(cU.isLangValid(e))this._i18nManager.setLang(e),this._player.lang=e;else{var t,n,r,i,o=cU.langKeys.join(","),a={en:Bm(t="Sorry, we couldn't set the language to ".concat(e," because it's not currently supported. The list of supported languages includes ")).call(t,o,"."),"zh-cn":Bm(n="不支持当前设置的语言".concat(e,", 支持的语言有")).call(n,o,", 请重新设置")};console.error((null===(r=this._i18nManager)||void 0===r||null===(i=r.normalize)||void 0===i?void 0:i.call(r,a))||a.en)}}},{key:"_src",get:function(){return this._player.currentSrc}},{key:"switch",value:(s=sy(oy().mark((function e(t,n){var r,i,o,a;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"!=typeof t||1!==this._sourceManager.sources.length||1!==(null===(r=this._sourceManager.sources)||void 0===r||null===(r=r[0].definitions)||void 0===r?void 0:r.length)){e.next=5;break}return this._sourceManager.updateSources(t),e.next=4,this._switchUrl(t,{seamless:null==n?void 0:n.seamless});case 4:return e.abrupt("return",this._sourceManager.definition);case 5:if(o=Ym(i=this._sourceManager).call(i,t,n)){e.next=8;break}throw new Error("string"==typeof t?"No definition found for url: ".concat(t):Bm(a="No definition found for source: ".concat(t.source,", definition: ")).call(a,t.definition));case 8:return e.next=10,this._switch(o);case 10:return e.abrupt("return",o);case 11:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"updatePlaylist",value:function(e,t){var n=this._sourceManager.updateSources(e,t);return this._switch(n.definition)}},{key:"once",value:function(e,t){var n,r=this._transformEvent(e,t),i=r.xgCallback,o=r.xgEventName;i&&(null!==(n=this._events)&&void 0!==n&&n[e]||(this._events[e]=new Dw),this._events[e].set(t,i),this._player.once(o,i))}},{key:"off",value:function(e,t){var n,r=null===(n=this._events[e])||void 0===n?void 0:n.get(t),i=this._transformEvent(e).xgEventName;r&&(this._player.off(i,r),this._events[e].delete(t))}},{key:"emit",value:function(e,t){var n=this._transformEvent(e).xgEventName;this._player.emit(n,t)}},{key:"offAll",value:function(){this._events={},this._player.offAll()}},{key:"on",value:function(e,t){var n,r=this._transformEvent(e,t),i=r.xgCallback,o=r.xgEventName;i&&(null!==(n=this._events)&&void 0!==n&&n[e]||(this._events[e]=new Dw),this._events[e].set(t,i),this._player.on(o,i))}},{key:"play",value:function(){return this._player.play()}},{key:"pause",value:function(){return this._player.pause()}},{key:"requestPIP",value:function(){var e;null===(e=this._player.plugins.pip)||void 0===e||e.requestPIP()}},{key:"exitPIP",value:function(){var e;null===(e=this._player.plugins.pip)||void 0===e||e.exitPIP()}},{key:"retry",value:function(){return this._player.retry()}},{key:"focus",value:function(e){return this._player.focus(e)}},{key:"blur",value:function(e){return this._player.blur(e)}},{key:"canPlayType",value:function(e){return this._player.canPlayType(e)}},{key:"requestFullscreen",value:function(e){return this._player.getFullscreen(e)}},{key:"exitFullscreen",value:function(e){return this._player.exitFullscreen(e)}},{key:"requestCssFullscreen",value:function(e){return this._player.getCssFullscreen(e)}},{key:"exitCssFullscreen",value:function(){return this._player.exitCssFullscreen()}},{key:"registerPlugin",value:function(e,t){return this._player.registerPlugin(e,t)}},{key:"unRegisterPlugin",value:function(e){return this._player.unRegisterPlugin(e)}},{key:"showIcon",value:function(e){var t=this,n=this._player.getPlugin("more");e.forEach((function(e){var r=t._player.getPlugin(e);r&&null!=r&&r.root&&(r.config.position===dU.ROOT_TOP_RIGHT_COLLAPSE?null==n||n.showChild(r):r.show())}))}},{key:"hideIcon",value:function(e){var t=this,n=this._player.getPlugin("more");e.forEach((function(e){var r=t._player.getPlugin(e);r&&null!=r&&r.root&&(r.config.position===dU.ROOT_TOP_RIGHT_COLLAPSE?null==n||n.hideChild(r):r.hide())}))}},{key:"destroy",value:function(){var e;this._player.off(pC,this._errorCallback),this._player.destroy(),null===(e=this._customMedia)||void 0===e||e.destroy()}},{key:"prepare",value:(a=sy(oy().mark((function e(t){var n,r,i,o,a,s,l,u,c,h,f,d,p=this;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===(n=this._preparePlugins)||void 0===n?void 0:n.call(this,t);case 2:return null!=(o=e.sent)&&o.protocol&&null!==(r=this._previousPrepareResult)&&void 0!==r&&r.protocol?a=o.protocol===(null===(s=this._previousPrepareResult)||void 0===s?void 0:s.protocol):(h=null!==(l=null==o||null===(u=o.options)||void 0===u?void 0:u.url)&&void 0!==l?l:t,f=null===(c=this._player)||void 0===c||null===(c=c.config)||void 0===c?void 0:c.url,a=f&&ON(h)===ON(f)),a||null===(d=this._previousPrepareResult)||void 0===d||null===(d=d.plugins)||void 0===d||d.forEach((function(e){p._player.unRegisterPlugin(e.pluginName)})),this._previousPrepareResult=o,null!=o&&o.options&&this._player.setConfig(o.options),e.abrupt("return",{plugins:a?[]:null==o||null===(i=o.plugins)||void 0===i?void 0:Vw(i).call(i,(function(e){return p._player.registerPlugin(e)})),options:null==o?void 0:o.options,isSameProtocol:a,useSrc:null==o?void 0:o.useSrc});case 8:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"_handleFallback",value:(o=sy(oy().mark((function e(t){var n,r,i,o=this;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._player.addClass(Fx),n=this._sourceManager.url,r=this._sourceManager.fallback()){e.next=19;break}return i=XP(t,this._i18nManager),e.prev=5,e.next=8,this._beforeFallbackError(i);case 8:if(e.sent.canEmitError){e.next=12;break}return e.abrupt("return");case 12:e.next=16;break;case 14:e.prev=14,e.t0=e.catch(5);case 16:return this._player.removeClass(Fx),this.emit(ND.FALLBACK_ERROR,i),e.abrupt("return");case 19:this._player.once("canplay",(function(){o._sourceManager.resetFallback()})),this.emit(ND.FALLBACK,{from:{url:n},to:{url:r}}),this._switchUrl(r);case 22:case"end":return e.stop()}}),e,this,[[5,14]])}))),function(e){return o.apply(this,arguments)})},{key:"_transformEvent",value:function(e,t){var n=this;return e===pC?{xgCallback:t?function(e){t(XP(e,n._i18nManager))}:void 0,xgEventName:e}:function(e,t){var n=UD[e];if(n)return{xgEventName:n.event,xgCallback:t?n.shouldCallback?function(){for(var e,r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];null!==(e=n.shouldCallback)&&void 0!==e&&e.call.apply(e,Bm(r=[n]).call(r,o))&&(null==t||t.apply(void 0,o))}:t:void 0};return{xgEventName:e,xgCallback:t}}(e,t)}},{key:"_switch",value:(i=sy(oy().mark((function e(t){var n,r,i,o,a,s,l,u,c,h,f,d;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=IL(this._sourceManager.definition),s=this._player.paused&&!this._player.isError,e.next=4,this.prepare(t.url);case 4:if(e.t0=e.sent,e.t0){e.next=7;break}e.t0={};case 7:if(l=e.t0,u=l.plugins,c=l.options,h=l.isSameProtocol,f=l.useSrc,null!=c&&c.url&&(t.url=null==c?void 0:c.url),this._sourceManager.switch(t),null===(n=this._player)||void 0===n||null===(n=n.plugins)||void 0===n||n.sources.renderItemList(),null===(r=this._player)||void 0===r||null===(r=r.plugins)||void 0===r||r.definition.renderItemList(),d=(null==t||null===(i=t.source)||void 0===i?void 0:i.name)!==(null==a||null===(o=a.source)||void 0===o?void 0:o.name),this._player.config.url=t.url,!h){e.next=22;break}d?(this.emit(ND.SOURCE_CHANGE),this._player.switchURL(t.url)):this._player.changeDefinition(t,a),e.next=26;break;case 22:return this.emit(d?ND.SOURCE_CHANGE:ND.DEFINITION_CHANGE),e.next=25,this._switchDifferentProtocolUrl(u,t.url,s,f);case 25:!d&&this.emit(ND.AFTER_DEFINITION_CHANGE);case 26:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"_switchDifferentProtocolUrl",value:(r=sy(oy().mark((function e(t,n,r,i){var o,a,s=this;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i&&this._player.media&&(null!==(o=this._player.config)&&void 0!==o&&o.preProcessUrl&&(n=null===(a=this._player.config)||void 0===a?void 0:a.preProcessUrl(n).url),this._player.media.src=n),null==t||!t.length){e.next=4;break}return e.next=4,this._callBeforePlayerInitForUrl(t);case 4:return e.abrupt("return",new Hw((function(e){var t=s._player.currentTime,n=function(){s._player.currentTime=t,r&&s._player.once(mC,(function(){s._player.pause()})),e()};aC.os.isAndroid?s.once(gC,(function(){n()})):s.once(mC,(function(){n()})),s._player.play()})));case 5:case"end":return e.stop()}}),e,this)}))),function(e,t,n,i){return r.apply(this,arguments)})},{key:"_switchUrl",value:(n=sy(oy().mark((function e(t,n){var r,i,o,a,s,l,u,c,h;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=this._player.paused&&!this._player.isError,e.next=3,this.prepare(t);case 3:if(e.t0=e.sent,e.t0){e.next=6;break}e.t0={};case 6:if(o=e.t0,a=o.plugins,s=o.options,l=o.isSameProtocol,u=o.useSrc,c=null!==(r=null==s?void 0:s.url)&&void 0!==r?r:t,this._sourceManager.url=c,this._player.config.url=c,!l){e.next=20;break}if(!(h=this._player.switchURL(c,{seamless:null==n?void 0:n.seamless}))||!h.then){e.next=18;break}return e.abrupt("return",h);case 18:e.next=21;break;case 20:return e.abrupt("return",this._switchDifferentProtocolUrl(a,c,i,u));case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"_callBeforePlayerInitForUrl",value:function(e){var t=this;return new Hw((function(n){null==e||e.forEach((function(e){e.beforePlayerInit()})),t._player.on(ND.CANPLAY,(function(){n(void 0)}))}))}}],[{key:"create",value:(t=sy(oy().mark((function t(){var n,r,i,o,a,s,l,u,c=arguments;return oy().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=c.length>0&&void 0!==c[0]?c[0]:{},a=c.length>1?c[1]:void 0,s=new fL({sources:hL.normalize({url:o.url,fallbackUrls:o.fallbackUrls,sources:o.playlist}),url:o.url,defaultSource:o.defaultSource,defaultDefinition:o.defaultDefinition,maxFallbackRound:o.maxFallbackRound}),t.next=5,null==o||null===(n=o.preparePlugins)||void 0===n?void 0:n.call(o,null!==(r=s.url)&&void 0!==r?r:"");case 5:return null!=(l=t.sent)&&null!==(i=l.options)&&void 0!==i&&i.url&&(s.url=null==l||null===(u=l.options)||void 0===u?void 0:u.url),o.url=s.url,t.abrupt("return",new(null!=a?a:e)(Dm(Dm({},o),{},{prepareResult:l,sourceManager:s})));case 9:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)})}]),e}();function yU(e){var t=uL(e).call(e,(function(e,t){return e+t.byteLength}),0),n=new Uint8Array(t),r=0;return e.forEach((function(e){n.set(e,r),r+=e.byteLength})),n}function mU(e,t){return QS(null==e?void 0:e.toFixed(t||4))}var _U,bU,wU=uE,kU=function(e,t,n){return function(e,t,n){t in e?wU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==Tc(t)?t+"":t,n),n},EU="ScriptData",SU="Sequence_Header",TU="RawData",CU=[5500,11e3,22e3,44e3],xU="aac",PU="pcma",AU="pcmu",IU="avc",RU="bytevc1",OU=function(){function e(t){var n=this;Ry(this,e),kU(this,"type",0),kU(this,"tagSize",0),kU(this,"timestamp",0),kU(this,"duration",0),kU(this,"header",null),kU(this,"body",null),kU(this,"bodyView",null),kU(this,"tailsize",null),zw(t).forEach((function(e){n[e]=t[e]}))}return Fy(e,[{key:"streamType",get:function(){switch(this.type){case 18:return"scriptData";case 9:return"video";case 8:return"audio"}}},{key:"packetType",get:function(){var e;return null==(e=this.bodyView)?void 0:e.packetType}},{key:"frameType",get:function(){var e;return null==(e=this.bodyView)?void 0:e.frameType},set:function(e){this.bodyView.frameType=e}},{key:"dts",get:function(){return this.timestamp}},{key:"pts",get:function(){var e;return((null==(e=this.bodyView)?void 0:e.cts)||0)+this.timestamp}},{key:"ptsTime",get:function(){return this.pts?mU(this.pts/1e3):0}},{key:"dtsTime",get:function(){return this.dts?mU(this.dts/1e3):0}},{key:"sampleView",get:function(){var e,t,n;if("Sequence_Header"!==(null==(e=this.bodyView)?void 0:e.packetType)&&18!==this.type)return{dts:this.timestamp,pts:((null==(t=this.bodyView)?void 0:t.cts)||0)+this.timestamp,data:this._getSampleData(),units:null==(n=this.bodyView)?void 0:n.units}}},{key:"size",get:function(){var e,t;return null==(t=null==(e=this.sampleView)?void 0:e.data)?void 0:t.length}},{key:"data",get:function(){return this._getSampleData()}},{key:"nalTypes",get:function(){var e,t;return null==(t=null==(e=this.bodyView)?void 0:e.units)?void 0:Vw(t).call(t,(function(e){return e.type}))}},{key:"nalSizes",get:function(){var e,t;return null==(t=null==(e=this.bodyView)?void 0:e.units)?void 0:Vw(t).call(t,(function(e){return e.unit.length}))}},{key:"keyframe",get:function(){return"I"===this.frameType}},{key:"isSample",get:function(){return"scriptData"!==this.streamType&&"Sequence_Header"!==this.packetType}},{key:"isVideo",get:function(){return this.isSample&&"video"===this.streamType}},{key:"isAudio",get:function(){return this.isSample&&"audio"===this.streamType}},{key:"isSqHeader",get:function(){return"Sequence_Header"===this.packetType}},{key:"timescale",get:function(){return 1e3}},{key:"isHevc",get:function(){var e;return"bytevc1"===(null==(e=this.bodyView)?void 0:e.codecType)}},{key:"_getSampleData",value:function(){var e,t;if("audio"===this.streamType)return this.bodyView.sample;var n=(null==(t=this.bodyView)?void 0:zk(e=t.units).call(e,(function(e){return!e.isSei})))||[],r=uL(n).call(n,(function(e,t){return e+(t.unit.byteLength+4)}),0),i=new Uint8Array(r),o=0;return n.forEach((function(e){i.set([0,0,0,1],o),o+=4,i.set(e.unit,o),o+=e.unit.byteLength})),i}}]),e}(),MU=function(){function e(){Ry(this,e)}return Fy(e,null,[{key:"decode",value:function(t){for(var n=[],r=t,i=0,o=t.length;i<o;)if(r[i]<128)n.push(String.fromCharCode(r[i])),++i;else{if(r[i]<192);else if(r[i]<224){if(e._checkContinuation(r,i,1)){var a=(31&r[i])<<6|63&r[i+1];if(a>=128){n.push(String.fromCharCode(65535&a)),i+=2;continue}}}else if(r[i]<240){if(e._checkContinuation(r,i,2)){var s=(15&r[i])<<12|(63&r[i+1])<<6|63&r[i+2];if(s>=2048&&55296!=(63488&s)){n.push(String.fromCharCode(65535&s)),i+=3;continue}}}else if(r[i]<248&&e._checkContinuation(r,i,3)){var l=(7&r[i])<<18|(63&r[i+1])<<12|(63&r[i+2])<<6|63&r[i+3];if(l>65536&&l<1114112){l-=65536,n.push(String.fromCharCode(l>>>10|55296)),n.push(String.fromCharCode(1023&l|56320)),i+=4;continue}}n.push(String.fromCharCode(65533)),++i}return n.join("")}},{key:"_checkContinuation",value:function(e,t,n){var r=e;if(t+n<r.length){for(;n--;)if(128!=(192&r[++t]))return!1;return!0}return!1}}]),e}(),DU=function(){function e(){Ry(this,e)}return Fy(e,null,[{key:"parse",value:function(t){if(!(t.length<3)){var n={},r=e._parseValue(new DataView(t.buffer,t.byteOffset,t.byteLength));try{var i=e._parseValue(new DataView(t.buffer,t.byteOffset+r.size,t.byteLength-r.size));n[r.data]=i.data}catch(rj){}return n}}},{key:"_parseValue",value:function(t){var n,r=t.byteLength,i=1,o=!1;switch(t.getUint8(0)){case 0:n=t.getFloat64(1),i+=8;break;case 1:n=!!t.getUint8(1),i+=1;break;case 2:var a=e._parseString(new DataView(t.buffer,t.byteOffset+i,t.byteLength-i));n=a.data,i+=a.size;break;case 3:n={};var s=0;for(9==(16777215&t.getUint32(r-4))&&(s=3);i<r-4;){var l=e._parseObject(new DataView(t.buffer,t.byteOffset+i,t.byteLength-i-s)),u=l.size,c=l.data;if(l.isEnd)break;n[c.name]=c.value,i+=u}if(i<=r-3)9===(16777215&t.getUint32(i-1))&&(i+=3);break;case 8:n={},i+=4;var h=0;for(9==(16777215&t.getUint32(r-4))&&(h=3);i<r-8;){var f=e._parseObject(new DataView(t.buffer,t.byteOffset+i,t.byteLength-i-h)),d=f.size,p=f.data;if(f.isEnd)break;n[p.name]=p.value,i+=d}if(i<=r-3)9===(16777215&t.getUint32(i-1))&&(i+=3);break;case 9:n=void 0,i=1,o=!0;break;case 10:n=[];var v=t.getUint32(1);i+=4;for(var g=0;g<v;g++){var y=e._parseValue(new DataView(t.buffer,t.byteOffset+i,t.byteLength-i)),m=y.data,_=y.size;n.push(m),i+=_}break;case 11:var b=t.getFloat64(i)+6e4*t.getInt16(i+8);n=new Date(b),i+=10;break;case 12:var w=t.getUint32(1);i+=4,n="",w>0&&(n=MU.decode(new Uint8Array(t.buffer,t.byteOffset+i,w))),i+=w;break;default:i=r}return{data:n,size:i,isEnd:o}}},{key:"_parseString",value:function(e){var t=e.getUint16(0),n="";return t>0&&(n=MU.decode(new Uint8Array(e.buffer,e.byteOffset+2,t))),{data:n,size:2+t}}},{key:"_parseObject",value:function(t){if(!(t.byteLength<3)){var n=e._parseString(t),r=e._parseValue(new DataView(t.buffer,t.byteOffset+n.size,t.byteLength-n.size));return{data:{name:n.data,value:r.data},size:n.size+r.size,isEnd:r.isEnd}}}}]),e}(),LU="undefined"!=typeof window,FU=LU&&navigator.userAgent.toLocaleLowerCase(),NU=LU&&LD(FU).call(FU,"firefox"),UU=LU&&LD(FU).call(FU,"android"),BU=uE,VU=function(){function e(){Ry(this,e)}return Fy(e,null,[{key:"parseADTS",value:function(t,n){for(var r=t.length,i=0;i+2<r&&(255!==t[i]||240!=(246&t[i+1]));)i++;if(!(i>=r)){var o=i,a=[],s=(60&t[i+2])>>>2,l=e.FREQ[s];if(!l)throw new Error("Invalid sampling index: ".concat(s));for(var u,c,h=1+((192&t[i+2])>>>6),f=(1&t[i+2])<<2|(192&t[i+3])>>>6,d=e._getConfig(s,f,h),p=d.config,v=d.codec,g=0,y=e.getFrameDuration(l);i+7<r;)if(255===t[i]&&240==(246&t[i+1])){if(r-i<(c=(3&t[i+3])<<11|t[i+4]<<3|(224&t[i+5])>>5))break;u=2*(1&~t[i+1]);var m=mU(n+g*y);a.push({pts:m,dts:m,ptsTime:mU(m/9e4),dtsTime:mU(m/9e4),data:t.subarray(i+7+u,i+c)}),g++,i+=c}else i++;return{skip:o,remaining:i>=r?void 0:t.subarray(i),frames:a,nbFrame:a.length,samplingFrequencyIndex:s,sampleRate:l,objectType:h,channelCount:f,codec:v,config:p,originCodec:"mp4a.40.".concat(h)}}}},{key:"parseAudioSpecificConfig",value:function(t){if(t.length){var n=t[0]>>>3,r=(7&t[0])<<1|t[1]>>>7,i=(120&t[1])>>>3,o=e.FREQ[r];if(!o)throw new Error("Invalid sampling index: ".concat(r));var a=e._getConfig(r,i,n);return{samplingFrequencyIndex:r,sampleRate:o,objectType:n,channelCount:i,config:a.config,codec:a.codec,originCodec:"mp4a.40.".concat(n)}}}},{key:"getFrameDuration",value:function(e){return 1024*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:9e4)/e}},{key:"_getConfig",value:function(e,t,n){var r,i,o=[];return NU?e>=6?(r=5,i=e-3):(r=2,i=e):UU?(r=2,i=e):(r=n,i=e,e>=6?i=e-3:1===t&&(r=2,i=e)),o[0]=r<<3,o[0]|=(14&e)>>1,o[1]=(1&e)<<7,o[1]|=t<<3,5===r&&(o[1]|=(14&i)>>1,o[2]=(1&i)<<7,o[2]|=8,o[3]=0),{config:o,codec:"mp4a.40.".concat(r)}}},{key:"getSilentFrame",value:function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}}}]),e}(),HU=VU;bU=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],function(e,t,n){t in e?BU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(HU,"symbol"!==Tc(_U="FREQ")?_U+"":_U,bU);var jU=uE,zU=function(e,t,n){return function(e,t,n){t in e?jU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==Tc(t)?t+"":t,n),n},WU=function(){function e(t){if(Ry(this,e),zU(this,"_bytesAvailable"),zU(this,"_bitsAvailable",0),zU(this,"_word",0),!t)throw new Error("ExpGolomb data params is required");this._data=t,this._bytesAvailable=t.byteLength,this._bytesAvailable&&this._loadWord()}return Fy(e,[{key:"_loadWord",value:function(){var e=this._data.byteLength-this._bytesAvailable,t=Math.min(4,this._bytesAvailable);if(0===t)throw new Error("No bytes available");var n=new Uint8Array(4);n.set(this._data.subarray(e,e+t)),this._word=new DataView(n.buffer).getUint32(0),this._bitsAvailable=8*t,this._bytesAvailable-=t}},{key:"skipBits",value:function(e){if(this._bitsAvailable>e)this._word<<=e,this._bitsAvailable-=e;else{e-=this._bitsAvailable;var t=Math.floor(e/8);e-=8*t,this._bytesAvailable-=t,this._loadWord(),this._word<<=e,this._bitsAvailable-=e}}},{key:"readBits",value:function(e){if(e>32)throw new Error("Cannot read more than 32 bits");var t=Math.min(this._bitsAvailable,e),n=this._word>>>32-t;return this._bitsAvailable-=t,this._bitsAvailable>0?this._word<<=t:this._bytesAvailable>0&&this._loadWord(),(t=e-t)>0&&this._bitsAvailable?n<<t|this.readBits(t):n}},{key:"skipLZ",value:function(){var e;for(e=0;e<this._bitsAvailable;++e)if(0!=(this._word&2147483648>>>e))return this._word<<=e,this._bitsAvailable-=e,e;return this._loadWord(),e+this.skipLZ()}},{key:"skipUEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"readUEG",value:function(){var e=this.skipLZ();return this.readBits(e+1)-1}},{key:"readEG",value:function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}},{key:"readBool",value:function(){return 1===this.readBits(1)}},{key:"readUByte",value:function(){return this.readBits(8)}},{key:"skipScalingList",value:function(e){for(var t=8,n=8,r=0;r<e;r++)0!==n&&(n=(t+this.readEG()+256)%256),t=0===n?t:n}},{key:"readSliceType",value:function(){return this.readUByte(),this.readUEG(),this.readUEG()}},{key:"firstMbInSlice",value:function(){return this.readUByte(),this.readUEG()}}]),e}();function KU(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<24>>>0)+(e[t+1]<<16)+(e[t+2]<<8)+(e[t+3]||0)}var GU=function(){function e(){Ry(this,e)}return Fy(e,null,[{key:"parseAnnexB",value:function(e){for(var t=e.length,n=2,r=0;null!==e[n]&&1!==e[n];)n++;if((r=++n+2)>=t)return[];for(var i=[];r<t;)switch(e[r]){case 0:if(0!==e[r-1]){r+=2;break}if(0!==e[r-2]){r++;break}n!==r-2&&i.push(e.subarray(n,r-2));do{r++}while(1!==e[r]&&r<t);r=(n=r+1)+2;break;case 1:if(0!==e[r-1]||0!==e[r-2]){r+=3;break}n!==r-2&&i.push(e.subarray(n,r-2)),r=(n=r+1)+2;break;default:r+=3}return n<t&&i.push(e.subarray(n)),i}},{key:"parseNalu",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;if(!(e.length<4)){for(var n,r=e.length,i=[],o=0;o+t<r;)if(n=KU(e,o),3===t&&(n>>>=8),o+=t,n){if(o+n>r)break;i.push(e.subarray(o,o+n)),o+=n}return i}}},{key:"parseNaluType",value:function(e,t){return null==e?void 0:Vw(e).call(e,(function(e){var n=t?e[0]>>>1&63:31&e[0],r=t&&(39===n||40===n),i={type:n,unit:e,isSei:r=r||!t&&6===n};switch(n){case 5:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:if(!t&&5!==n||t&&5===n)break;i.frameType="I"}return t||1!==n||(i.frameType=function(e){var t=new WU(e).readSliceType();return 2===t||4===t||7===t||9===t?"I":0===t||3===t||5===t||8===t?"P":1===t||6===t?"B":void 0}(e)),!t||0!==n&&1!==n||(i.frameType="P"),!t&&n<=5&&(i.firstMbInSlice=new WU(e).firstMbInSlice()),t&&n<=21&&(i.firstMbInSlice=128==(128&e[2])),i}))}},{key:"parseSEI",value:function(e){for(var t=e.length,n=1,r=0,i=0,o="";255===e[n];)r+=255,n++;for(r+=e[n++];255===e[n];)i+=255,n++;if(i+=e[n++],5===r&&t>n+16)for(var a=0;a<16;a++)o+=e[n].toString(16),n++;return{payload:e.subarray(n),type:r,size:i,uuid:o}}},{key:"removeEPB",value:function(e){for(var t=e.byteLength,n=[],r=1;r<t-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(!n.length)return e;var i=t-n.length,o=new Uint8Array(i),a=0;for(r=0;r<i;a++,r++)a===n[0]&&(a++,n.shift()),o[r]=e[a];return o}}]),e}(),qU=function(){function e(){Ry(this,e)}return Fy(e,null,[{key:"parseAVCDecoderConfigurationRecord",value:function(t){if(!(t.length<7)){for(var n,r,i=1+(3&t[4]),o=[],a=[],s=6,l=31&t[5],u=0;u<l;u++)if(r=t[s]<<8|t[s+1],s+=2,r){var c=t.subarray(s,s+r);s+=r,o.push(c),n||(n=e.parseSPS(GU.removeEPB(c)))}var h,f=t[s];s++;for(var d=0;d<f;d++)h=t[s]<<8|t[s+1],s+=2,h&&(a.push(t.subarray(s,s+h)),s+=h);return{sps:n,spsArr:o,ppsArr:a,nalUnitSize:i}}}},{key:"parseSPS",value:function(e){var t=new WU(e);t.readUByte();var n=t.readUByte(),r=t.readUByte(),i=t.readUByte();t.skipUEG();var o=420;if(100===n||110===n||122===n||244===n||44===n||83===n||86===n||118===n||128===n||138===n||144===n){var a=t.readUEG();if(a<=3&&(o=[0,420,422,444][a]),3===a&&t.skipBits(1),t.skipUEG(),t.skipUEG(),t.skipBits(1),t.readBool())for(var s=3!==a?8:12,l=0;l<s;l++)t.readBool()&&(l<6?t.skipScalingList(16):t.skipScalingList(64))}t.skipUEG();var u=t.readUEG();if(0===u)t.readUEG();else if(1===u){t.skipBits(1),t.skipUEG(),t.skipUEG();for(var c=t.readUEG(),h=0;h<c;h++)t.skipUEG()}t.skipUEG(),t.skipBits(1);var f=t.readUEG(),d=t.readUEG(),p=t.readBits(1);0===p&&t.skipBits(1),t.skipBits(1);var v,g,y,m,_,b=0,w=0,k=0,E=0;if(t.readBool()&&(b=t.readUEG(),w=t.readUEG(),k=t.readUEG(),E=t.readUEG()),t.readBool()){if(t.readBool())switch(t.readUByte()){case 1:v=[1,1];break;case 2:v=[12,11];break;case 3:v=[10,11];break;case 4:v=[16,11];break;case 5:v=[40,33];break;case 6:v=[24,11];break;case 7:v=[20,11];break;case 8:v=[32,11];break;case 9:v=[80,33];break;case 10:v=[18,11];break;case 11:v=[15,11];break;case 12:v=[64,33];break;case 13:v=[160,99];break;case 14:v=[4,3];break;case 15:v=[3,2];break;case 16:v=[2,1];break;case 255:v=[t.readUByte()<<8|t.readUByte(),t.readUByte()<<8|t.readUByte()]}if(t.readBool()&&t.readBool(),t.readBool()&&(t.readBits(4),t.readBool()&&t.readBits(24)),t.readBool()&&(t.readUEG(),t.readUEG()),t.readBool()){var S=t.readBits(32),T=t.readBits(32);g=t.readBool(),_=(y=T)/(m=2*S)}}for(var C=e.subarray(1,4),x="avc1.",P=0;P<3;P++){var A=C[P].toString(16);A.length<2&&(A="0".concat(A)),x+=A}return{codec:x,profileIdc:n,profileCompatibility:r,levelIdc:i,chromaFormat:o,width:Math.ceil(16*(f+1)-2*(b+w)),height:(2-p)*(d+1)*16-(p?2:4)*(k+E),sarRatio:v,fpsNum:y,fpsDen:m,fps:_,fixedFrame:g}}}]),e}(),YU=function(){function e(){Ry(this,e)}return Fy(e,null,[{key:"parseHEVCDecoderConfigurationRecord",value:function(t){if(!(t.length<23)){for(var n,r,i,o,a=1+(3&t[21]),s=[],l=[],u=[],c=23,h=t[22],f=0;f<h;f++){r=63&t[c],i=t[c+1]<<8|t[c+2],c+=3;for(var d=0;d<i;d++)if(o=t[c]<<8|t[c+1],c+=2,o){switch(r){case 32:u.push(t.subarray(c,c+o));break;case 33:var p=t.subarray(c,c+o);n||(n=e.parseSPS(GU.removeEPB(p))),s.push(p);break;case 34:l.push(t.subarray(c,c+o))}c+=o}}return{sps:n,spsArr:s,ppsArr:l,vpsArr:u,nalUnitSize:a}}}},{key:"parseSPS",value:function(e){var t=new WU(e);t.readUByte(),t.readUByte(),t.readBits(4);var n=t.readBits(3);t.readBits(1);var r=this._parseProfileTierLevel(t,n);t.readUEG();var i=t.readUEG(),o=420;i<=3&&(o=[0,420,422,444][i]);var a=0;3===i&&(a=t.readBits(1));var s,l,u,c,h=t.readUEG(),f=t.readUEG(),d=t.readBits(1);(1===d&&(s=t.readUEG(),l=t.readUEG(),u=t.readUEG(),c=t.readUEG()),1===d)&&(h-=(1!==i&&2!==i||0!==a?1:2)*(l+s),f-=(1===i&&0===a?2:1)*(c+u));return{codec:"hev1.1.6.L93.B0",width:h,height:f,chromaFormat:o,bitDepthLumaMinus8:t.readUEG(),bitDepthChromaMinus8:t.readUEG(),generalProfileSpace:r.generalProfileSpace,generalTierFlag:r.generalTierFlag,generalProfileIdc:r.generalProfileIdc,generalLevelIdc:r.generalLevelIdc}}},{key:"_parseProfileTierLevel",value:function(e,t){var n,r,i;(arguments.length>2&&void 0!==arguments[2]?arguments[2]:1)&&(n=e.readBits(2),r=e.readBits(1),i=e.readBits(5)),e.readBits(32),e.readBits(1),e.readBits(1),e.readBits(1),e.readBits(1),e.readBits(16),e.readBits(16),e.readBits(12);for(var o=e.readUByte(),a=[],s=[],l=0;l<t;l++)a[l]=e.readBits(1),s[l]=e.readBits(1);t>0&&e.readBits(2*(8-t));for(var u=0;u<t;u++)0!==a[u]&&(e.readBits(2),e.readBits(1),e.readBits(5),e.readBits(16),e.readBits(16),e.readBits(4),e.readBits(16),e.readBits(16),e.readBits(12)),0!==s[u]&&e.readBits(8);return{generalProfileSpace:n,generalTierFlag:r,generalProfileIdc:i,generalLevelIdc:o}}}]),e}();function XU(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=zk(t=e.items).call(t,(function(e){return e.isSample&&e.isVideo}))[0],o=zk(n=e.items).call(n,(function(e){return e.isSample&&e.isAudio}))[0],a=Math.min((null==o?void 0:o.dtsTime)||0,(null==i?void 0:i.dtsTime)||0);return a-=r,e.items.forEach((function(e){e.time=mU(e.dtsTime-a)})),e}function $U(e){var t,n=zk(t=e.items).call(t,(function(e){return e.isVideo})),r=[],i=-1,o={},a={};return n.forEach((function(e,t){(e.keyframe||t===n.length-1)&&(i=-1===i?e.time:i,r.push({time:e.time,value:mU(e.time-i)}),i=e.time);var s=Math.ceil(e.time+1e-5);o[s]?o[s]++:o[s]=1,a[s]?a[s]+=8*e.size:a[s]=8*e.size})),{bitRates:JU(a),gops:zk(r).call(r,(function(e){return e.value})),frameRates:JU(o)}}function JU(e){var t=zw(e);return Vw(t).call(t,(function(t){return{time:Number(t),value:e[t]}}))}function QU(e){var t,n,r,i,o=uL(t=Ww(n=KT(r=zk(i=Ww(e).call(e)).call(i,(function(e){return e.isSample}))).call(r,(function(e,t){return e.time>t.time?1:-1}))).call(n,0,3)).call(t,(function(e,t){return e+t.size}),0);return o>1e3?mU(o/1e3)+"KB":o+"B"}function ZU(e){return uL(e).call(e,(function(e,t){return e+t.size}),0)/uL(e).call(e,(function(e,t){return e+t.duration}),0)*8e3}function eB(e){if(null==e?void 0:e.profileIdc)switch(e.profileIdc){case 66:return"66(Baseline)";case 77:return"77(Main)";case 100:return"100(High)"}}var tB=uE,nB=function(e,t,n){return function(e,t,n){t in e?tB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==Tc(t)?t+"":t,n),n},rB=function(){function e(){Ry(this,e),nB(this,"_nalUnitSize",0),nB(this,"_lastAudio",null),nB(this,"_lastVideo",null),nB(this,"_videoStartDts",-1),nB(this,"_audioStartDts",-1)}return Fy(e,[{key:"parse",value:function(e){for(var t=e.byteLength,n=e.subarray(0,13),r=13,i=Dm(Dm({header:n},this._parseHeader(n)),{},{items:[]});r+11<t;){var o=e.subarray(r,r+11),a=o[1]<<16|o[2]<<8|o[3],s=r+11+a;if(s>t)break;var l=e.subarray(r+11,s),u=new OU(Dm({tagSize:11+a+4,header:o,body:l,tailsize:e.subarray(s,s+4)},this._parseTag(o,l)));u.isAudio&&(this._lastAudio&&(this._lastAudio.duration=u.dts-this._lastAudio.dts),this._lastAudio=u),u.isVideo&&(this._lastVideo&&(this._lastVideo.duration=u.dts-this._lastVideo.dts),this._lastVideo=u),i.items.push(u),r=s+4}var c=XU(i);return c.rates=$U(c),this._addMetadataToFirstKeyFrame(c),c}},{key:"getSnapshoot",value:function(t,n){var r,i,o,a,s=zk(r=t.items).call(r,(function(e){return 8===e.type}))[0],l=zk(i=t.items).call(i,(function(e){return 9===e.type}))[0],u=s&&s.bodyView||s,c=l&&l.bodyView||l,h=zk(o=t.items).call(o,(function(e){return e.isVideo})).length,f=this._getNbFrame(t,"I"),d=this._getNbFrame(t,"P"),p=this._getNbFrame(t,"B"),v=0;if(null==n?void 0:n.gopCacheBuffer){var g,y=(new e).parse(n.gopCacheBuffer),m=zk(g=y.items).call(g,(function(e){return e.isVideo})),_=null==(a=m[m.length-1])?void 0:a.time;_&&(v=_-n.take/1e3)}return{rates:t.rates,audio:u?iE({},u,this._getExt(t,"audio")):null,video:c?iE({},c,this._getExt(t,"video"),{topThreeFrameSize:QU(t.items),gopCache:mU(v),profile:eB(c.sps),iFrames:f,pFrames:d,bFrames:p,iPercent:mU(f/h*100),pPercent:mU(d/h*100),bPercent:mU(p/h*100)}):null}}},{key:"_addMetadataToFirstKeyFrame",value:function(e){var t,n,r,i=zk(t=e.items).call(t,(function(e){return 9===e.type}))[0];if(i&&(null==(r=i.bodyView)?void 0:r.sps)){var o=zk(n=e.items).call(n,(function(e){return e.isVideo&&e.keyframe}))[0];o&&(o.bodyView.sps=i.bodyView.sps,o.bodyView.vpsArr=i.bodyView.vpsArr,o.bodyView.spsArr=i.bodyView.spsArr,o.bodyView.ppsArr=i.bodyView.ppsArr)}}},{key:"_getExt",value:function(e,t){var n,r,i,o=zk(n=e.items).call(n,(function(e){return e.streamType===t&&e.isSample})),a=zk(r=e.items).call(r,(function(e){var n;return e.streamType===t&&(null==(n=e.bodyView)?void 0:n.packetType)===SU}))[0];if(!o.length)return 0;var s=o[0],l=o[o.length-1],u=0;return"audio"===t&&(u=a&&1024/(null==(i=a.bodyView)?void 0:i.sampleRate)*1e3),"video"===t&&(u=s.duration),{avgBits:ZU(o),startDts:o[0].dts,duration:(l.timestamp-s.timestamp)/1e3,refDuration:u,frameLength:o.length}}},{key:"_getNbFrame",value:function(e,t){var n;return zk(n=e.items).call(n,(function(e){return e.isVideo&&e.frameType===t})).length}},{key:"_parseHeader",value:function(e){return{hasAudio:!!(e[4]>>2&1),hasVideo:!!(1&e[4])}}},{key:"_parseTag",value:function(e,t){var n,r=31&e[0],i=(e[7]<<24>>>0)+(e[4]<<16)+(e[5]<<8)+e[6];switch(r){case 18:n=iE({packetType:EU},DU.parse(t));break;case 9:n=this._parseVideo(t,i);break;case 8:n=this._parseAudio(t,i)}return{type:r,timestamp:i,bodyView:n}}},{key:"_parseAudio",value:function(e){if(e.length){var t=(240&e[0])>>>4;if(10===t||7===t||8===t){if(10!==t){var n=(12&e[0])>>2,r=(2&e[0])>>1,i=1&e[0];return Dm({format:t,sampleRate:CU[n],sampleSize:r?2:1,channelCount:i+1},this._parseG711(e))}return this._parseAac(e,t)}console.warn("Unsupported sound format: ".concat(t))}}},{key:"_parseG711",value:function(e,t){return{codecType:7===t?PU:AU,sampleRate:8e3,sample:e.subarray(1),packetType:TU}}},{key:"_parseAac",value:function(e,t){if(0===e[1]){var n=e.subarray(2);return Dm(Dm({},HU.parseAudioSpecificConfig(n)),{},{format:t,timescale:1e3,codecType:xU,packetType:SU,sequenceData:[n],frameType:"A"})}if(1===e[1])return{sample:e.subarray(2),format:t,codecType:xU,packetType:TU,frameType:"A"}}},{key:"_parseVideo",value:function(e,t){if(!(e.length<6)){var n=(240&e[0])>>>4,r=15&e[0];if(7===r||12===r){var i=12===r,o=e[1],a=(e[2]<<16|e[3]<<8|e[4])<<8>>8;if(0===o){var s=e.subarray(5),l=i?YU.parseHEVCDecoderConfigurationRecord(s):qU.parseAVCDecoderConfigurationRecord(s);return this._nalUnitSize=l.nalUnitSize,Dm({codecId:r,codecType:i?RU:IU,packetType:SU,timescale:1e3,sequenceData:[s]},l)}if(1===o){var u=GU.parseNalu(e.subarray(5),this._nalUnitSize);if(!u||!u.length)return;var c={dts:t,cts:a,units:u=GU.parseNaluType(u,i)};return 1===n&&(c.keyframe=!0),u.forEach((function(e){var t=e.type,n=e.unit,r=e.frameType;switch(t){case 5:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:if(!i&&5!==t||i&&5===t)break;c.keyframe=!0,c.frameType="I";break;case 6:case 39:case 40:if(!i&&6!==t||i&&6===t)break;c.seis?c.seis.push(GU.parseSEI(GU.removeEPB(n))):c.seis=[GU.parseSEI(GU.removeEPB(n))];break;case 32:if(!i)break;c.vpsArr?c.vpsArr.push(n):c.vpsArr=[n];break;case 7:case 33:if(!i&&7!==t||i&&7===t)break;c.spsArr?c.spsArr.push(n):c.spsArr=[n];var o=GU.removeEPB(n);c.sps=i?YU.parseSPS(o):qU.parseSPS(o);break;case 8:case 34:if(!i&&8!==t||i&&8===t)break;c.ppsArr?c.ppsArr.push(n):c.ppsArr=[n];break;case 1:case 0:c.frameType=r}})),Dm({codecId:r,codecType:i?RU:IU,packetType:TU},c)}}else console.warn("Unsupported codecId: ".concat(r))}}}]),e}(),iB="FLV",oB="MPEG-TS",aB="MP4";function sB(e,t){var n;return Vw(n=[e[t],e[t+1],e[t+2],e[t+3]]).call(n,(function(e){return String.fromCharCode(e)})).join("")}var lB=uE,uB=function(e,t,n){return function(e,t,n){t in e?lB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==Tc(t)?t+"":t,n),n},cB=Fy((function e(t){var n=t.startIndictor,r=t.packetType,i=t.pid,o=t.afc;Ry(this,e),uB(this,"startIndictor",0),uB(this,"pid",0),uB(this,"afc",0),uB(this,"eleInfo",null),uB(this,"packetType",""),this.startIndictor=n,this.packetType=r,this.pid=i,this.afc=o})),hB=function(){function e(t){var n=t.header,r=t.headerObject,i=t.body,o=t.eleInfo,a=t.bodyView,s=t.headerView;Ry(this,e),uB(this,"header",null),uB(this,"headerView",null),uB(this,"body",null),uB(this,"bodyView",null),uB(this,"eleInfo",null),uB(this,"duration",0),this.header=n,this.headerView=s||new cB(r),this.eleInfo=o,this.body=i,this.bodyView=a}return Fy(e,[{key:"type",get:function(){var e;return null==(e=this.headerView)?void 0:e.packetType}},{key:"streamType",get:function(){return this.eleInfo?this.eleInfo[this.headerView.pid]:""}},{key:"packetType",get:function(){var e;return null==(e=this.headerView)?void 0:e.packetType}},{key:"frameType",get:function(){var e;return null==(e=this.bodyView)?void 0:e.frameType}},{key:"pts",get:function(){var e;return null==(e=this.bodyView)?void 0:e.pts}},{key:"ptsTime",get:function(){return this.pts?mU(this.pts/9e4):0}},{key:"dtsTime",get:function(){return this.dts?mU(this.dts/9e4):0}},{key:"dts",get:function(){var e;return null==(e=this.bodyView)?void 0:e.dts}},{key:"keyframe",get:function(){return"I"===this.frameType}},{key:"nalTypes",get:function(){var e,t;return null==(t=null==(e=this.bodyView)?void 0:e.units)?void 0:Vw(t).call(t,(function(e){return e.type}))}},{key:"nalSizes",get:function(){var e,t;return null==(t=null==(e=this.bodyView)?void 0:e.units)?void 0:Vw(t).call(t,(function(e){return e.unit.length}))}},{key:"isSample",get:function(){return"PES"===this.packetType}},{key:"timescale",get:function(){return 9e4}},{key:"isHevc",get:function(){var e,t;return"bytevc1"===(null==(t=null==(e=this.eleInfo)?void 0:e.video)?void 0:t.codecType)}},{key:"sampleView",get:function(){var e;if("PES"===this.type)return{dts:this.dts,pts:this.pts,units:null==(e=this.bodyView)?void 0:e.units,data:this._getSampleData()}}},{key:"data",get:function(){return this._getSampleData()}},{key:"size",get:function(){var e,t;return null==(t=null==(e=this.sampleView)?void 0:e.data)?void 0:t.length}},{key:"isVideo",get:function(){return this.isSample&&"video"===this.streamType}},{key:"isAudio",get:function(){return this.isSample&&"audio"===this.streamType}},{key:"_getSampleData",value:function(){var e,t;if("audio"===this.streamType)return this.bodyView.data;var n=(null==(t=this.bodyView)?void 0:zk(e=t.units).call(e,(function(e){return!e.isSei&&!e.isDivision})))||[],r=uL(n).call(n,(function(e,t){return e+(t.unit.byteLength+4)}),0),i=new Uint8Array(r),o=0;return n.forEach((function(e){i.set([0,0,0,1],o),o+=4,i.set(e.unit,o),o+=e.unit.byteLength})),i}}]),e}(),fB=function(){function e(){Ry(this,e)}return Fy(e,[{key:"parse",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=function(e){for(var t=Math.min(1e3,e.byteLength-564),n=0;n<t;n++)if(71===e[n]&&71===e[n+188]&&71===e[n+376])return n;return-1}(e);if(-1===n)throw new Error("invalid ts file");var r=e.byteLength;r-=(r-n)%188;for(var i,o=[],a=[],s=[],l=0,u=n;u<r;){var c=e.subarray(u,u+188),h=c.subarray(0,4),f=this._parseTsHeader(c.subarray(0,4));u+=188;var d=void 0,p=void 0,v=4,g="";switch((null==f?void 0:f.afc)>1&&(v+=1+Math.min(c[v],183)),f.pid){case 0:v+=1+c[v],d=c.subarray(v),g="PAT",p={pmtId:l=this._parsePAT(d)};break;default:if(f.pid===l){v+=1+c[v],d=c.subarray(v),p=i=this._parsePMT(d),g="PMT";break}if(!i||!i[f.pid])continue;d=c.subarray(v),g="PES"}if(f.packetType=g,"PES"===g){var y="video"===i[f.pid]?a:s;f.startIndictor&&y.length&&(o.push(new hB(Dm(Dm({},this._concatPesChunk(y)),{},{eleInfo:i}))),y="video"===i[f.pid]?a=[]:s=[]),y.push({header:h,headerObject:f,body:d})}else o.push(new hB({header:h,headerObject:f,body:d,eleInfo:i,bodyView:p}))}a.length&&(o.push(new hB(Dm(Dm({},this._concatPesChunk(a)),{},{eleInfo:i}))),a=[]),s.length&&(o.push(new hB(Dm(Dm({},this._concatPesChunk(s)),{},{eleInfo:i}))),s=[]);var m=XU({items:this._parsePES(o)},t);return m.rates=$U(m),m}},{key:"getSnapshoot",value:function(e){var t,n,r,i=e.items,o=e.rates,a=zk(i).call(i,(function(e){return"video"===e.streamType})),s=zk(i).call(i,(function(e){return"audio"===e.streamType})),l=Ym(i).call(i,(function(e){return"PMT"===e.type})),u=a[0],c=s[0],h=a.length,f=this._getNbFrame(a,"I"),d=this._getNbFrame(a,"P"),p=this._getNbFrame(a,"B"),v={rates:o,video:u?iE({},null==u?void 0:u.bodyView,{codecType:u.eleInfo.video.codecType,frameLength:h,topThreeFrameSize:QU(i),avgBits:ZU(a),profile:eB(null==(t=null==u?void 0:u.bodyView)?void 0:t.sps),iFrames:f,pFrames:d,bFrames:p,iPercent:mU(f/h*100),pPercent:mU(d/h*100),bPercent:mU(p/h*100),timescale:9e4},this._getDuration(a,"video")):null,audio:c?iE({},null==c?void 0:c.bodyView,{codecType:c.eleInfo.audio.codecType,frameLength:s.length,timescale:9e4,avgBits:ZU(s)},this._getDuration(s,"audio")):null};return l&&(null==(n=l.bodyView)?void 0:n.noSupported)&&(v.noSupported=null==(r=l.bodyView)?void 0:r.noSupported),v}},{key:"getRates",value:function(e){return $U(e)}},{key:"_getDuration",value:function(e,t){var n,r=e[0],i=e[e.length-1],o=0;return"audio"===t&&(o=1024/(null==(n=r.bodyView)?void 0:n.sampleRate)*1e3),"video"===t&&(o=r.duration),{duration:(i.pts-r.pts)/9e4,refDuration:o}}},{key:"_getNbKeyFrame",value:function(e){return zk(e).call(e,(function(e){var t;return null==(t=e.bodyView)?void 0:t.keyframe})).length}},{key:"_getNbFrame",value:function(e,t){return zk(e).call(e,(function(e){return e.frameType===t})).length}},{key:"_parseTsHeader",value:function(e){if(71===e[0]){var t={};return t.startIndictor=(64&e[1])>>6,t.pid=((31&e[1])<<8)+e[2],t.afc=(48&e[3])>>4,t}return null}},{key:"_parsePAT",value:function(e){return(31&e[10])<<8|e[11]}},{key:"_parsePMT",value:function(e){var t=0,n=3+((15&e[1])<<8|e[2])-4;e[3],e[4],t=t+11+((15&e[10])<<8|e[11])+1;for(var r,i={video:null,audio:null,noSupported:0};t<n;){r=e[t];var o=(31&e[t+1])<<8|e[t+2];switch(r){case 27:case 36:i.video={elePid:o,streamType:r,codecType:27===r?"avc":"bytevc1"},i[o]="video";break;case 15:i.audio={elePid:o,streamType:r,codecType:"aac"},i[o]="audio";break;default:i.noSupported=r,console.warn("unsupported streamType,",r)}t+=5+((15&e[t+3])<<8|e[t+4])}return i}},{key:"_concatPesChunk",value:function(e){var t=uL(e).call(e,(function(e,t){return e+t.body.byteLength}),0),n=new Uint8Array(t),r=0;return e.forEach((function(e){var t=e.body;n.set(t,r),r+=t.byteLength})),Dm(Dm({},e[0]),{},{body:n,packetType:"PES"})}},{key:"_parsePES",value:function(e){var t=this,n=[];return e.forEach((function(e,r){if(e.isSample){var i=e,o=t._parsePESInternal(i.body)||{},a=o.data,s=o.pts,l=o.dts;if(a){if(e.isVideo&&(i.bodyView=t._parseVideoFrame(a,s,l,"bytevc1"===i.eleInfo.video.codecType),t._lastVideo&&(t._lastVideo.duration=1e3*(e.dtsTime-t._lastVideo.dtsTime)),t._lastVideo=i),e.isAudio){var u=HU.parseADTS(a,s),c=u.frames;return delete u.frames,void(null==c||c.forEach((function(e){var r=new hB(iE({},i,{bodyView:Dm(Dm(Dm({},u),e),{},{frameType:"A"})}));n.push(r),t._lastAudio&&(t._lastAudio.duration=1e3*(r.dtsTime-t._lastAudio.dtsTime)),t._lastAudio=r})))}n.push(e)}}else n.push(e)})),n}},{key:"_parsePESInternal",value:function(e){var t=e[8];if(!(0===t||e.length<t+9)&&1===(e[0]<<16|e[1]<<8|e[2])){var n=(e[4]<<8)+e[5];if(!(n&&n>e.length-6)){var r,i,o=e[7];return 192&o&&(r=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,64&o?r-(i=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2)>54e5&&(r=i):i=r),i=i||r,{data:e.subarray(9+t),pts:r,dts:i}}}}},{key:"_parseVideoFrame",value:function(e,t,n,r){var i=GU.parseAnnexB(e);if(i.length){var o={units:i=GU.parseNaluType(i,r),pts:t,dts:n};return i.forEach((function(e){var t=e.unit,n=e.type,i=e.frameType;switch(n){case 5:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:if(!r&&5!==n||r&&5===n)break;o.keyframe=!0,o.frameType="I";break;case 6:case 39:case 40:if(!r&&6!==n||r&&6===n)break;o.seis?o.seis.push(GU.parseSEI(GU.removeEPB(t))):o.seis=[GU.parseSEI(GU.removeEPB(t))];break;case 32:if(!r)break;o.vpsArr?o.vpsArr.push(t):o.vpsArr=[t];break;case 7:case 33:if(!r&&7!==n||r&&7===n)break;o.spsArr?o.spsArr.push(t):o.spsArr=[t];var a=GU.removeEPB(t);o.sps=r?YU.parseSPS(a):qU.parseSPS(a);break;case 8:case 34:if(!r&&8!==n||r&&8===n)break;o.ppsArr?o.ppsArr.push(t):o.ppsArr=[t];break;case 9:case 35:break;case 0:case 1:o.frameType=i}})),o}}}]),e}(),dB=Gc("Array").entries,pB=ir,vB=tt,gB=ce,yB=dB,mB=Array.prototype,_B={DOMTokenList:!0,NodeList:!0},bB=o((function(e){var t=e.entries;return e===mB||gB(mB,e)&&t===mB.entries||vB(_B,pB(e))?yB:t})),wB=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;Ry(this,e),this._offset=n,this._buffer=t,this._length=t.byteLength}return Fy(e,[{key:"offset",get:function(){return this._offset},set:function(e){this._offset=e}},{key:"forward",value:function(e){this._offset+=e}},{key:"subarray",value:function(e){return e?this._buffer.subarray(this._offset,this._offset+e):this._buffer.subarray(this._offset,e)}},{key:"slice",value:function(e){for(var t=this._offset,n=this._buffer,r=[],i=0;i<e;i++)r.push(n[t+i]);return new Uint8Array(r)}},{key:"readU8",value:function(){return this._buffer[this._offset]}},{key:"readU16",value:function(){var e=this._offset,t=this._buffer;return t[e]<<8|t[e+1]}},{key:"readU24",value:function(){var e=this._offset,t=this._buffer;return t[e]<<16|t[e+1]<<8|t[e+12]}},{key:"readU32",value:function(){var e=this._offset,t=this._buffer;return t[e]*(1<<24)+65536*t[e+1]+256*t[e+2]+t[e+3]}},{key:"read32",value:function(){var e=this._offset,t=this._buffer;return t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]}}]),e}(),kB=uE,EB=function(e,t,n){return function(e,t,n){t in e?kB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==Tc(t)?t+"":t,n),n},SB=function(){function e(t,n,r,i,o,a,s,l,u,c){Ry(this,e),EB(this,"dts",0),EB(this,"pts",0),EB(this,"units",null),EB(this,"timescale",0),EB(this,"offset",0),EB(this,"duration",0),EB(this,"data",null),EB(this,"size",0),EB(this,"streamType",""),EB(this,"_frameType",""),EB(this,"isHevc",!1),this.dts=t,this.pts=n,this.units=r,this.timescale=i,this.offset=o,this.data=a,this.size=s,this.duration=l,this.streamType=u,this.isHevc=c}return Fy(e,[{key:"isSample",get:function(){return!0}},{key:"dtsTime",get:function(){return this.dts/this.timescale}},{key:"ptsTime",get:function(){return this.pts/this.timescale}},{key:"frameType",get:function(){var e,t;return"audio"===this.streamType?"A":this._frameType||(null==(t=this.units)?void 0:zk(e=Vw(t).call(t,(function(e){return e.frameType}))).call(e,Boolean)[0])},set:function(e){this._frameType=e}},{key:"nalTypes",get:function(){var e;return null==(e=this.units)?void 0:Vw(e).call(e,(function(e){return e.type}))}},{key:"nalSizes",get:function(){var e;return null==(e=this.units)?void 0:Vw(e).call(e,(function(e){return e.unit.length}))}},{key:"keyframe",get:function(){return"I"===this.frameType}},{key:"isVideo",get:function(){return"video"===this.streamType}},{key:"isAudio",get:function(){return"audio"===this.streamType}}]),e}(),TB={ftyp:"file type and compatibility",free:"free box",moov:"container for all metadata",mvhd:"movie header,overall declarations",trak:"container for an individual track or stream",tkhd:"track header,overall information about the track",tref:"track reference container",mdia:"container for the media information in a track",mdhd:"media header,oervall information about the media",hdlr:"declares the media type",minf:"media information container",vmhd:"video media header",smhd:"sound media header",dinf:"data information box",stbl:"sample table box",stsd:"sample descriptions(codec types, etc)",stts:"decoding time to sample",ctts:"compostion time to sample",cslg:"compostion to decode timeline mapping",stsc:"sample to chunk",stsz:"sample size",stco:"chunk offset",stss:"sync sample table",sdtp:"independent abd disposable samples",sbgp:"sample to group",mvex:"movid extends box",moof:"movie fragment",mfhd:"movie fragment header",traf:"track fragment",tfhd:"track fragment header",trun:"track fragment run",tfdt:"track fragment decode time",mdat:"media data",meta:"metadata",avc1:"h264 codec info box",hev1:"hevc codec info box"};function CB(e,t){return{isLeading:(12&e[t])>>2,dependsOn:3&e[t],isDenpendedOn:(192&e[t+1])>>6,hasRedundancy:(48&e[t+1])>>4,padding:(14&e[t+1])>>1,nonSync:1&e[t+1],degradationPriority:e[t+2]<<8|e[t+3]}}function xB(e,t){var n;return Vw(n=[e[t],e[t+1],e[t+2],e[t+3]]).call(n,(function(e){return String.fromCharCode(e)})).join("")}function PB(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=0;r<e.byteLength;){var i,o=e[r]*(1<<24)+65536*e[r+1]+256*e[r+2]+e[r+3];if(1===o){var a=xB(e,r+4);if("mdat"===a){var s,l=new DataView(e.buffer),u=l.getUint32(r+8)*Math.pow(2,32)+l.getUint32(r+12);console.log(Bm(s="".concat(a,": largesize=")).call(s,u)),o=u}}if(o){var c=e.subarray(r,r+o),h=xB(c,4);n.push({size:o,length:c.byteLength,start:r+t,type:h,sizetypeRepresent:Ww(i=c.subarray(0,8)).call(i),body:c.subarray(8),typeDes:TB[h]||""}),r+=o}else r+=4}return n}function AB(e,t,n){if(e)for(var r=0;r<e.length;r++){var i=e[r];if(i.type===t){if(!n)return i;if(n(i))return i}if(i.bodyView instanceof Array){var o=AB(i.bodyView,t,n);if(o){if(!n)return o;if(n(o))return o}}}}function IB(e,t){return AB(e,"trak",(function(e){var n=AB(e.bodyView,"hdlr");return n&&n.bodyView.handlerType===t}))}function RB(e,t,n){var r,i,o,a,s,l,u,c,h,f,d,p,v,g,y,m,_,b,w,k=IB(e,t);if(!k)return null;var E=AB(k.bodyView,"stbl"),S=AB(k.bodyView,"mdhd")||{},T=(null==(c=null==(u=zk(r=E.bodyView).call(r,(function(e){return"stts"===e.type}))[0])?void 0:u.bodyView)?void 0:bB(c))||[];null==(f=null==(h=zk(i=E.bodyView).call(i,(function(e){return"stss"===e.type}))[0])?void 0:h.bodyView)||bB(f);var C=(null==(p=null==(d=zk(o=E.bodyView).call(o,(function(e){return"ctts"===e.type}))[0])?void 0:d.bodyView)?void 0:bB(p))||[],x=(null==(g=null==(v=zk(a=E.bodyView).call(a,(function(e){return"stsc"===e.type}))[0])?void 0:v.bodyView)?void 0:bB(g))||[],P=(null==(m=null==(y=zk(s=E.bodyView).call(s,(function(e){return"stsz"===e.type}))[0])?void 0:y.bodyView)?void 0:bB(m))||[],A=(null==(b=null==(_=zk(l=E.bodyView).call(l,(function(e){return"stco"===e.type}))[0])?void 0:_.bodyView)?void 0:bB(b))||[],I=!!AB(E.bodyView,"hvcC"),R="vide"===t;if(!x.length||!A.length||!P.length)return[];for(var O,M=S.bodyView,D=M.timescale,L=void 0===D?1:D,F=M.duration,N=P.length,U=A.length,B=1,V=0,H=[],j=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=0,i=0,o=0,a=0,s=0,l=[];t=Vw(t).call(t,(function(e){return Dm({},e)})),n=Vw(n).call(n,(function(e){return Dm({},e)}));for(;o<e;){var u=t[r],c=n[i];u.sampleCount&&(a+=u.sampleDelta),u.sampleCount--,u.sampleCount||r++,c&&(s=c.sampleOffset,c.sampleCount--,c.sampleCount||i++),l.push({dts:a,pts:a+s}),o++}return l}(N,T,C);B<=U;){var z=x[V];(null==z?void 0:z.firstChunk)!==B?(H.push(iE({},O,{firstChunk:B,offset:A[B-1]})),B++):(H.push(Dm(Dm({},z),{},{offset:A[B-1]})),O=z,B++,V++)}var W=Vw(P).call(P,(function(e,t){var r=H[0],i=r.offset;r.offset+=e,r.samplesPreChunk--,r.samplesPreChunk||H.shift();var o=j[t],a=n.subarray(i,i+e);if(R){var s=GU.parseNalu(a);return new SB(o.dts,o.pts,GU.parseNaluType(s,I),L,i,a,e,0,"video",I)}return new SB(o.dts,o.pts,null,L,i,a,e,0,"audio")}));uL(W).call(W,(function(e,t){return e?(e.duration=(t.dts-e.dts)/L*1e3,t):t}),null);var K=null==(w=AB(null==k?void 0:k.bodyView,"vide"===t?I?"hvcC":"avcC":"mp4a"))?void 0:w.bodyView;return Dm(Dm(Dm({samples:W,iFrames:zk(W).call(W,(function(e){return"I"===e.frameType})).length,pFrames:zk(W).call(W,(function(e){return"P"===e.frameType})).length,bFrames:zk(W).call(W,(function(e){return"B"===e.frameType})).length},S.bodyView),{},{frameLength:N,duration:F/L,timescale:L},K),null==K?void 0:K.ests)}function OB(e,t){var n=function(e){var t,n,r,i,o=IB(e,"vide"),a=IB(e,"soun"),s=AB(null==o?void 0:o.bodyView,"tkhd"),l=AB(null==a?void 0:a.bodyView,"tkhd"),u=AB(null==o?void 0:o.bodyView,"mdhd"),c=AB(null==a?void 0:a.bodyView,"mdhd"),h=AB(null==o?void 0:o.bodyView,"avcC")||AB(null==o?void 0:o.bodyView,"hvcC"),f=AB(null==a?void 0:a.bodyView,"mp4a"),d=a?Dm(Dm(Dm({type:"audio",trackId:null==(n=l.bodyView)?void 0:n.trackId},c.bodyView),null==f?void 0:f.bodyView),null==(r=null==f?void 0:f.bodyView)?void 0:r.ests):null,p=o?Dm(Dm({type:"video",trackId:null==(i=s.bodyView)?void 0:i.trackId},null==u?void 0:u.bodyView),null==h?void 0:h.bodyView):null;return Ny(t={},(null==d?void 0:d.trackId)||0,d),Ny(t,(null==p?void 0:p.trackId)||0,p),t}(e),r=ZA(e).call(e,(function(e){return"moof"===e.type}));if(-1===r)return!1;n.lastVdts=-1,n.lastAdts=-1;for(var i=r;i<e.length&&"moof"===e[i].type;i+=2){var o=e[i];e[i+1].bodyView=MB(o,t,n)}return!0}function MB(e,t,n){var r,i,o=zk(r=e.bodyView).call(r,(function(e){return"traf"===e.type})),a=zk(i=Vw(o).call(o,(function(e){var t=AB(e.bodyView,"tfhd"),r=AB(e.bodyView,"tfdt"),i=AB(e.bodyView,"trun");if(t&&i){var o=t.bodyView.trackId;return Dm({trackId:o,baseDataOffset:t.bodyView.baseDataOffset,defaultSampleDuration:t.bodyView.defaultSampleDuration,defaultSampleSize:t.bodyView.defaultSampleSize,baseMediaDecodeTime:r.bodyView.baseMediaDecodeTime,dataOffset:i.bodyView.dataOffset,samples:i.bodyView.samples,sampleCount:i.bodyView.sampleCount},n[o])}}))).call(i,Boolean);return Vw(a).call(a,(function(e){var n,r,i,o=e.baseDataOffset,a=e.defaultSampleDuration,s=void 0===a?0:a,l=e.defaultSampleSize,u=void 0===l?0:l,c=e.dataOffset,h=e.baseMediaDecodeTime,f=void 0===h?0:h,d=e.samples,p=e.sps,v=e.timescale,g=e.type,y=o+c,m=0;return e.samples=Vw(d).call(d,(function(e){var n=t.subarray(y,y+e.size);m+=e.duration||s;var r=f+m;if("video"===g){var i="hev1.1.6.L93.B0"===(null==p?void 0:p.codec),o=GU.parseNalu(n);return y+=e.size,new SB(r,r+(e.ctOffset||0),GU.parseNaluType(o,i),v,y,n,e.size||u,(e.duration||s)/v*1e3,"video",i)}return y+=e.size,new SB(r,r+(e.ctOffset||0),null,v,y,n,e.size||u,(e.duration||s)/v*1e3,"audio")})),e.frameLength=e.samples.length,e.duration=m/v,e.iFrames=zk(n=e.samples).call(n,(function(e){return"I"===e.frameType})).length,e.pFrames=zk(r=e.samples).call(r,(function(e){return"P"===e.frameType})).length,e.bFrames=zk(i=e.samples).call(i,(function(e){return"B"===e.frameType})).length,e}))}var DB=Math.pow(2,32);var LB=an,FB=L,NB=tt,UB=ce,BB=function(){var e=LB(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},VB=RegExp.prototype,HB=ce,jB=function(e){var t=e.flags;return void 0!==t||"flags"in VB||NB(e,"flags")||!UB(VB,e)?t:FB(BB,e)},zB=RegExp.prototype,WB=o((function(e){return e===zB||HB(zB,e)?jB(e):e.flags})),KB=function(){var e=[];e[3]="ES_Descriptor",e[4]="DecoderConfigDescriptor",e[5]="DecoderSpecificInfo",e[6]="SLConfigDescriptor",this.getDescriptorName=function(t){return e[t]};var t=this,n={};return this.parseOneDescriptor=function(t){var r,i,o=0,a=t.readU8();for(t.forward(1),i=t.readU8(),t.forward(1);128&i;)o=(127&i)<<7,i=t.readU8(),t.forward(1);return o+=127&i,(r=e[a]?new n[e[a]](o):new n.Descriptor(o)).parse(t),r},n.Descriptor=function(e,t){this.tag=e,this.size=t,this.descs=[]},n.Descriptor.prototype.parse=function(e){this.data=Ww(e).call(e,this.size),e.forward(this.size)},n.Descriptor.prototype.findDescriptor=function(e){for(var t=0;t<this.descs.length;t++)if(this.descs[t].tag===e)return this.descs[t];return null},n.Descriptor.prototype.parseRemainingDescriptors=function(e){for(var n=e.offset;e.offset<n+this.size;){var r=t.parseOneDescriptor(e);this.descs.push(r)}},n.ES_Descriptor=function(e){n.Descriptor.call(this,3,e)},n.ES_Descriptor.prototype=new n.Descriptor,n.ES_Descriptor.prototype.parse=function(e){if(this.ES_ID=e.readU16(),e.forward(2),this.flags=e.readU8(),e.forward(1),this.size-=3,128&WB(this)?(this.dependsOn_ES_ID=e.readU16(),e.forward(2),this.size-=2):this.dependsOn_ES_ID=0,64&WB(this)){var t,n=e.readU8();e.forward(1),this.URL=Vw(t=ZE(Ww(e).call(e,n))).call(t,(function(e){return String.fromCharCode(e)})),e.forward(n),this.size-=n+1}else this.URL="";32&WB(this)?(this.OCR_ES_ID=e.readU16(),e.forward(2),this.size-=2):this.OCR_ES_ID=0,this.parseRemainingDescriptors(e)},n.ES_Descriptor.prototype.getOTI=function(e){var t=this.findDescriptor(4);return t?t.oti:0},n.ES_Descriptor.prototype.getAudioConfig=function(e){var t=this.findDescriptor(4);if(!t)return null;var n=t.findDescriptor(5);if(n&&n.data){var r=(248&n.data[0])>>3;return 31===r&&n.data.length>=2&&(r=32+((7&n.data[0])<<3)+((224&n.data[1])>>5)),r}return null},n.DecoderConfigDescriptor=function(e){n.Descriptor.call(this,4,e)},n.DecoderConfigDescriptor.prototype=new n.Descriptor,n.DecoderConfigDescriptor.prototype.parse=function(e){this.oti=e.readU8(),e.forward(1),this.streamType=e.readU8(),e.forward(1),this.bufferSize=e.readU24(),e.forward(3),this.maxBitrate=e.readU32(),e.forward(4),this.avgBitrate=e.readU32(),e.forward(4),this.size-=13,this.parseRemainingDescriptors(e)},n.DecoderSpecificInfo=function(e){n.Descriptor.call(this,5,e)},n.DecoderSpecificInfo.prototype=new n.Descriptor,n.SLConfigDescriptor=function(e){n.Descriptor.call(this,6,e)},n.SLConfigDescriptor.prototype=new n.Descriptor,this};function GB(e){var t,n,r,i=Ym(t=e.descs).call(t,(function(e){return 4===e.tag}));i&&(n=Ym(r=i.descs).call(r,(function(e){return 5===e.tag})));var o=iE({},i);return delete o.descs,o.config=(null==n?void 0:n.data.length)?ZE(null==n?void 0:n.data):[],o}function qB(e){return Vw(e).call(e,(function(e){return e.toString(16)})).join("")}function YB(e){var t=e.body,n={},r=t[0],i=new wB(t);if(i.forward(4),n.systemId=qB(Ww(i).call(i,16)),i.forward(16),r>0){var o=i.readU32();n.kids=[];var a=0;for(i.forward(4);a<o;)n.kids.push(qB(Ww(i).call(i,16))),i.forward(16),a++}var s,l=i.readU32();return i.forward(4),n.dataSize=l,n.data=Ww(i).call(i,l),n.dataToBase64=btoa((s=n.data,Vw(s).call(s,(function(e){return String.fromCharCode(e)})).join(""))),n}var XB=Math.pow(2,32);var $B=Math.pow(2,32);function JB(e){var t=e.body,n={samples:[]},r=new wB(t);n.version=r.readU8(),r.forward(1),n.flags=Ww(r).call(r,3);var i,o,a,s,l=(i=WB(n),o=HD(i,3),a=o[1],{dataOffsetPresent:!!(1&(s=o[2])),firstSampleFlagsPresent:!!(4&s),sampleDurationPresent:!!(1&a),sampleSizePresent:!!((2&a)>>1),sampleFlagsPresent:!!((4&a)>>2),sampleCompositionTimeOffsetPresent:!!((8&a)>>3)}),u=l.dataOffsetPresent,c=l.firstSampleFlagsPresent,h=l.sampleDurationPresent,f=l.sampleSizePresent,d=l.sampleFlagsPresent,p=l.sampleCompositionTimeOffsetPresent;n.trFlags=l,r.forward(3),n.sampleCount=r.readU32(),r.forward(4),u&&(n.dataOffset=r.readU32(),r.forward(4)),c&&(n.firstSampleFlags=CB(t,r.offset),r.forward(4));for(var v=0;v<n.sampleCount;){var g={};h&&(g.duration=r.readU32(),r.forward(4)),f&&(g.size=r.readU32(),r.forward(4)),d&&(g.flags=CB(t,r.offset),r.forward(4)),p&&(g.ctOffset=r.readU32(),r.forward(4)),n.samples.push(g),v++}return n}function QB(e){var t=PB(e instanceof ArrayBuffer?new Uint8Array(e):e,0);if(ZB(t),!OB(t,e)){var n,r=AB(t,"mdat");if(r)r.bodyView=zk(n=[Dm({type:"video"},RB(t,"vide",e)),Dm({type:"audio"},RB(t,"soun",e))]).call(n,(function(e){return!!e.samples}))}return t}function ZB(e){var t=0;e.forEach((function(e){switch(e.type){case"ftyp":case"styp":e.bodyView=function(e){var t=e.body,n=e.length,r=new wB(t),i={compatible:[]};i.major=sB(t,0),r.forward(4),i.version=r.readU32(),r.forward(4);for(var o=r.offset;o<n-8;)i.compatible.push(sB(t,o)),o+=4;return i}(e);break;case"moov":case"trak":case"mvex":case"mdia":case"minf":case"dinf":case"moof":case"traf":case"stbl":e.bodyView=PB(e.body,e.start+8),ZB(e.bodyView);break;case"stsd":var n=function(e){var t=e.body,n=e.start,r=new wB(t);r.forward(4);var i=r.readU32();return r.forward(4),{entryCount:i,childData:PB(r.subarray(),n+8+8)}}(e),r=n.entryCount,i=n.childData;e.entryCount=r,e.bodyView=i,ZB(e.bodyView);break;case"mvhd":e.bodyView=(h=e.body,f=new wB(h),d={},f.forward(4),d.createTime=f.readU32(),f.forward(4),d.modifyTime=f.readU32(),f.forward(4),d.timescale=f.readU32(),f.forward(4),d.duration=f.readU32(),f.forward(4),d.rate=f.readU32(),f.forward(4),f.forward(2),f.forward(70),d.nextTrackId=f.readU32(),d);break;case"tkhd":e.bodyView=function(e){var t=e.body,n=new wB(t,4),r={},i=n.readU8();r.version=i,1===i?n.forward(16):n.forward(8),r.trackId=n.readU32(),n.forward(4),1===i?(r.duration=n.readU32()*$B,n.forward(4),r.duration+=n.readU32()):r.duration=n.readU32();var o=t.byteLength;return o-=8,n.offset=o,r.width=n.readU32()>>16,n.forward(4),r.height=n.readU32()>>16,r}(e);break;case"mehd":e.bodyView=function(e){var t,n=e.body,r=new wB(n);if(r.forward(4),1===n[0]){var i=r.readU32();r.forward(4),t=i*(1<<30)*2+r.readU32()}else t=r.readU32();return{fragDuration:t}}(e);break;case"mdhd":e.bodyView=function(e){var t=e.body,n={},r=new wB(t),i=t[0];return r.forward(4),1===i?(r.forward(16),n.timescale=r.readU32(),r.forward(4),n.duration=r.readU32()*DB,r.forward(4),n.duration+=r.readU32()):(r.forward(8),n.timescale=r.readU32(),r.forward(4),n.duration=r.readU32()),n}(e);break;case"hdlr":e.bodyView=function(e){return{handlerType:sB(e.body,8)}}(e);break;case"trex":e.bodyView=function(e){var t=e.body,n={},r=new wB(t);return r.forward(4),n.trackId=r.readU32(),r.forward(4),n.defaultSdescriptionIndex=r.readU32(),r.forward(4),n.defaultSampleDuration=r.readU32(),r.forward(4),n.defaultSampleSize=r.readU32(),r.forward(4),n.defaultSampleFlags=CB(t,r.offset),n}(e);break;case"trun":e.bodyView=JB(e),t=e.bodyView.samples.length;break;case"tfdt":e.bodyView=function(e){var t=e.body,n=new wB(t),r=0;return n.forward(4),1===t[0]?(r=n.readU32()*XB,n.forward(4),r+=n.readU32()):r=n.readU32(),{baseMediaDecodeTime:r}}(e);break;case"avc1":case"hvc1":case"hev1":e.bodyView=function(e){var t=e.body,n=e.start,r=new wB(t);return r.forward(78),PB(r.subarray(),n+78+8)}(e),ZB(e.bodyView);break;case"mp4a":e.bodyView=function(e){var t=e.body,n=Ww(t).call(t,28),r=(new KB).parseOneDescriptor(new wB(Ww(n).call(n,12),0)),i=(null==r?void 0:r.getAudioConfig)&&r.getAudioConfig();return{channelCount:t[17],samplesize:t[19],sampleRate:t[24]<<8|t[25],objectType:i,codec:"mp4a.40."+i,ests:GB(r)}}(e),e.bodyView&&(e.bodyView.codecType="aac");break;case"avcC":e.bodyView=function(e){var t=e.body,n={spsArr:[],ppsArr:[]},r=new wB(t);n.configVersion=t[0],n.avcProfile=t[1],n.profileComptibility=t[2],n.avcLevel=t[3],r.forward(4),r.forward(1);var i=31&Ww(r).call(r,1);r.forward(1);for(var o=0;o<i;o++){var a=r.readU16();r.forward(2),n.spsArr.push(r.subarray(a)),r.forward(a)}var s=Ww(r).call(r,1);r.forward(1);for(var l=0;l<s;l++){var u=r.readU16();r.forward(2),n.ppsArr.push(r.subarray(u)),r.forward(u)}return n}(e);var o=e.bodyView;if(o.codecType="avc",!(null==o?void 0:o.sps)){var a=o.spsArr[0],s=GU.removeEPB(a);o.sps=qU.parseSPS(s)}break;case"hvcC":e.bodyView=function(e){var t=e.body;if(!(t.length<23)){t[21];for(var n,r,i,o=[],a=[],s=[],l=23,u=t[22],c=0;c<u;c++){n=63&t[l],r=t[l+1]<<8|t[l+2],l+=3;for(var h=0;h<r;h++)if(i=t[l]<<8|t[l+1],l+=2,i){switch(n){case 32:s.push(t.subarray(l,l+i));break;case 33:o.push(t.subarray(l,l+i));break;case 34:a.push(t.subarray(l,l+i))}l+=i}}return{spsArr:o,ppsArr:a,vpsArr:s}}}(e);var l=e.bodyView;if(l.codecType="bytevc1",!(null==l?void 0:l.sps)){var u=l.spsArr[0],c=GU.removeEPB(u);l.sps=YU.parseSPS(c)}break;case"btrt":e.bodyView=function(e){var t=e.body,n=new wB(t),r=n.readU32();n.forward(4);var i=n.readU32();return n.forward(4),{bufferSizeDB:r,maxBitrate:i,avgBitrate:n.readU32()}}(e);break;case"stts":e.bodyView=function(e){var t=e.body,n=new wB(t);n.forward(4);var r=n.readU32(),i=[];n.forward(4);for(var o=0;o<r;o++){var a=n.readU32();n.forward(4);var s=n.readU32();n.forward(4),i.push({sampleCount:a,sampleDelta:s})}return{entries:i,count:i.length}}(e),bB(e.bodyView).length&&(t=bB(e.bodyView)[0].sampleCount);break;case"ctts":e.bodyView=function(e){var t=e.body,n=new wB(t);n.forward(4);var r=n.readU32(),i=[];n.forward(4);for(var o=0;o<r;o++){var a=n.readU32();n.forward(4);var s=n.readU32();n.forward(4),i.push({sampleCount:a,sampleOffset:s})}return{entries:i,count:i.length}}(e);break;case"cslg":e.bodyView=function(e){var t,n,r,i,o=e.body,a=new wB(o);return a.forward(4),t=a.read32(),a.forward(4),n=a.read32(),a.forward(4),r=a.read32(),a.forward(4),i=a.read32(),a.forward(4),{compositionToDTSShift:t,leastDecodeToDisplayDelta:n,greatestDecodeToDisplayDelta:r,compositionStartTime:i,compositionEndTime:a.read32()}}(e);break;case"stss":e.bodyView=function(e){var t=e.body,n=new wB(t);n.forward(4);var r=[],i=n.readU32();n.forward(4);for(var o=0;o<i;o++){var a=n.readU32();r.push(a),n.forward(4)}return{entries:r,count:r.length}}(e);break;case"stsz":e.bodyView=function(e){var t=e.body,n=new wB(t);n.forward(4);var r=[],i=n.readU32();n.forward(4);var o=n.readU32();if(n.forward(4),0===i)for(var a=0;a<o;a++){var s=n.readU32();r.push(s),n.forward(4)}else console.warn("parse stsz, sample size not equal 0");return{entries:r,count:r.length}}(e);break;case"stsc":e.bodyView=function(e){var t=e.body,n=new wB(t);n.forward(4);var r=[],i=n.readU32();n.forward(4);for(var o=0;o<i;o++){var a=n.readU32();n.forward(4);var s=n.readU32();n.forward(4);var l=n.readU32();n.forward(4),r.push({firstChunk:a,samplesPreChunk:s,sampleDesIndex:l})}return{entries:r,count:r.length}}(e);break;case"stco":e.bodyView=function(e){var t=e.body,n=new wB(t);n.forward(4);var r=n.readU32(),i=[];n.forward(4);for(var o=0;o<r;o++){var a=n.readU32();i.push(a),n.forward(4)}return{entries:i,count:i.length}}(e);break;case"sdtp":e.bodyView=function(e,t){var n=e.body,r=new wB(n);r.forward(4);for(var i,o,a,s,l=[],u=0;u<t;u++){var c=r.readU8();i=(192&c)>>6,o=(48&c)>>4,a=(12&c)>>2,s=3&c,l.push({isLeading:i,dependsOn:o,isDenpendedOn:a,hasRedundancy:s}),r.forward(1)}return{entries:l}}(e,t);break;case"mfhd":e.bodyView=function(e){var t=e.body,n=new wB(t);return n.forward(4),{seqNumber:n.readU32()}}(e);break;case"tfhd":e.bodyView=function(e){var t=e.body,n=new wB(t);n.forward(1);var r=Ww(n).call(n,3),i=r[0]<<16|r[1]<<8|r[2],o={flags:r},a={baseDataOffsetPresent:!!(1&i),sampleDescriptionIndexPresent:!!(2&i),defaultSampleDurationPresent:!!(8&i),defaultSampleSizePresent:!!(16&i),defaultSampleFlagsPresent:!!(32&i),durationIsEmpty:!!(65536&i),defaultBaseIsMoof:!!(131072&i)};if(o.tfFlags=a,n.forward(3),o.trackId=n.readU32(),a.baseDataOffsetPresent){n.forward(4);var s=n.readU32();n.forward(4);var l=n.readU32();o.baseDataOffset=s<<32|l}else o.baseDataOffset=0,console.warn("base data offset not detected in tfhd");return a.sampleDescriptionIndexPresent&&(n.forward(4),o.sampleDescriptionIndex=n.readU32()),a.defaultSampleDurationPresent&&(n.forward(4),o.defaultSampleDuration=n.readU32()),a.defaultSampleSizePresent&&(n.forward(4),o.defaultSampleSize=n.readU32()),a.defaultSampleFlagsPresent&&(n.forward(4),o.defaultSampleFlags=n.readU32()),o}(e);break;case"pssh":e.bodyView=YB(e)}var h,f,d}))}var eV=function(){function e(){Ry(this,e)}return Fy(e,[{key:"parse",value:function(e){return QB(e)}},{key:"parseV2",value:function(e,t){var n,r,i,o,a,s,l=zk(e).call(e,(function(e){return"mdat"===e.type})),u=[],c=null==(r=null==(n=l[0])?void 0:n.bodyView)?void 0:zk(r).call(r,(function(e){return"video"===e.type}))[0],h=null==(o=null==(i=l[0])?void 0:i.bodyView)?void 0:zk(o).call(o,(function(e){return"audio"===e.type}))[0],f=Math.min((null==(a=null==h?void 0:h.samples[0])?void 0:a.dtsTime)||0,(null==(s=null==c?void 0:c.samples[0])?void 0:s.dtsTime)||0);l.forEach((function(e){e.bodyView.forEach((function(e){e.samples.forEach((function(e){e.time=mU(e.dtsTime-f),u.push(e)}))}))}));var d={items:KT(u).call(u,(function(e,t){return e.time>t.time?1:-1}))};return this._addMetadataToFirstKeyFrame(c),d.rates=$U(d),d}},{key:"getSnapshoot",value:function(e){return function(e){var t,n,r,i,o,a,s=zk(e).call(e,(function(e){return"mdat"===e.type}));if(!s.length){var l=IB(e,"vide"),u=IB(e,"soun"),c=null==(n=AB(null==l?void 0:l.bodyView,"mdhd"))?void 0:n.bodyView,h=(null==(r=AB(null==l?void 0:l.bodyView,"avcC"))?void 0:r.bodyView)||(null==(i=AB(null==l?void 0:l.bodyView,"hvcC"))?void 0:i.bodyView),f=null==(o=AB(null==u?void 0:u.bodyView,"mdhd"))?void 0:o.bodyView,d=null==(a=AB(null==u?void 0:u.bodyView,"mp4a"))?void 0:a.bodyView;try{return{video:Dm(Dm({},c),{},{duration:(null==c?void 0:c.duration)/c.timescale},h),audio:Dm(Dm(Dm({},f),{},{duration:(null==f?void 0:f.duration)/f.timescale},d),d.ests)}}catch(rj){}return{}}var p=uL(t=Vw(s).call(s,(function(e){return e.bodyView}))).call(t,(function(e,t){return Bm(e).call(e,t)}),[]),v=uL(p).call(p,(function(e,t){var n,r=t.type,i=t.frameLength,o=t.iFrames,a=t.pFrames,s=t.bFrames,l=t.duration;return e[r]?(e[r].frameLength+=i,e[r].iFrames+=o,e[r].pFrames+=a,e[r].bFrames+=s,e[r].duration+=l,e):(e[r]=iE({},t),e[r].refDuration||(e[r].refDuration=null==(n=t.samples[0])?void 0:n.duration),e)}),{}),g=v.video;if(g){var y=g.frameLength,m=g.iFrames,_=g.pFrames,b=g.bFrames;g.iPercent=mU(m/y*100),g.pPercent=mU(_/y*100),g.bPercent=mU(b/y*100)}return v}(e)}},{key:"_addMetadataToFirstKeyFrame",value:function(e){var t;if(e){var n=zk(t=e.samples).call(t,(function(e){return e.keyframe}))[0];n&&(n.sps=e.sps,n.vpsArr=e.vpsArr,n.spsArr=e.spsArr,n.ppsArr=e.ppsArr)}}}]),e}(),tV=.2,nV=40,rV=.3,iV=.5,oV=.1,aV=function(){function e(){Ry(this,e)}return Fy(e,[{key:"detect",value:function(e){var t=null==e?void 0:Ym(e).call(e,(function(e){return e.isSample&&"video"===e.streamType})),n=null==e?void 0:Ym(e).call(e,(function(e){return e.isSample&&"audio"===e.streamType}));if(t&&n){var r,i,o,a=t.pts-n.pts,s=mU(a/t.timescale);if(a/t.timescale>=tV)return[{description:Bm(r=Bm(i=Bm(o="【音视频首帧gap差距过大】视频首帧pts: ".concat(t.pts,", 音频首帧pts: ")).call(o,n.pts,", delta: ")).call(i,a,"(")).call(r,s,"s)"),tips:"".concat(s>10?"可能造成无法起播问题":"")}]}}}]),e}(),sV=function(){function e(){Ry(this,e)}return Fy(e,[{key:"detect",value:function(e){var t=null==e?void 0:zk(e).call(e,(function(e){return e.isSample&&"video"===e.streamType})),n=null==e?void 0:zk(e).call(e,(function(e){return e.isSample&&"audio"===e.streamType})),r=!!e[0]&&e[0]instanceof OU;return[this._checkBreak(t,"video"),this._checkBreak(n,"audio"),r&&this._checkConsecutiveFrameBreak(null==e?void 0:zk(e).call(e,(function(e){return e.isSample})))]}},{key:"_checkBreak",value:function(e,t){var n=e.length;if(n)for(var r=0;r<n-1;r++){var i,o,a,s;if(Math.abs(e[r].dtsTime-e[r+1].dtsTime)>iV)return{description:Bm(i=Bm(o=Bm(a=Bm(s="【".concat(t,"时间戳发生跳变】,当前帧dts: ")).call(s,e[r].dts,", time:")).call(a,e[r].time,", 后一帧dts: ")).call(o,e[r+1].dts,", time:")).call(i,e[r+1].time)}}}},{key:"_checkConsecutiveFrameBreak",value:function(e){var t=e.length;if(t)for(var n=0;n<t-1;n++)if(Math.abs(e[n].dtsTime-e[n+1].dtsTime)>oV){var r,i,o,a,s,l=e[n],u=e[n+1];return{description:Bm(r=Bm(i=Bm(o=Bm(a=Bm(s="【前后帧dts差距过大】,当前帧(".concat(l.streamType,")dts: ")).call(s,l.dts,", time:")).call(a,l.time,", 后一帧(")).call(o,u.streamType,")dts: ")).call(i,u.dts,", time:")).call(r,u.time),tips:"可能造成播放画面卡顿或者声音卡顿"}}}}]),e}(),lV=function(){function e(){Ry(this,e)}return Fy(e,[{key:"detect",value:function(e){return[this._checkKeyFrame(e),this._checkAudioFrameDataFull(e)]}},{key:"_checkKeyFrame",value:function(e){var t=null==e?void 0:zk(e).call(e,(function(e){return e.isSample&&"video"===e.streamType}))[0];if(t&&"I"!==t.frameType)return{description:"【视频首帧非关键帧】",tips:"可能播放花屏或者报解码错误"}}},{key:"_checkAudioFrameDataFull",value:function(e){var t=null==e?void 0:zk(e).call(e,(function(e){return e.isSample&&"audio"===e.streamType})),n=t.length;if(n)for(var r=0;r<n;r++){var i,o=t[r].data;if((null==o?void 0:o.length)<nV)return{description:Bm(i="【音频帧数据较少】 pts=".concat(t[r].pts,", time=")).call(i,t[r].time),tips:"可能由于音频数据原因导致解码报错"}}}}]),e}(),uV=function(){function e(){Ry(this,e)}return Fy(e,[{key:"detect",value:function(e,t){return[this._hasVideoMetadata(e),this._hasAudioMetadata(e),this._checkRepeatedSps(e),this._metadataOnlyInSequeceHeader(e,t)]}},{key:"_hasVideoMetadata",value:function(e){var t,n=null==(t=null==e?void 0:zk(e).call(e,(function(e){return"video"===e.streamType}))[0])?void 0:t.bodyView;if(n&&!n.sps)return{description:"【未检测到视频metadata信息】",tips:"可能视频无法播放或者报解码错误"}}},{key:"_hasAudioMetadata",value:function(e){var t,n=null==(t=null==e?void 0:zk(e).call(e,(function(e){return"audio"===e.streamType}))[0])?void 0:t.bodyView;if(n&&(!n.config||!n.sampleRate||!n.channelCount))return{description:"【未检测到音频metadata信息】",tips:"可能视频无法播放或者报解码错误"}}},{key:"_checkRepeatedSps",value:function(e){var t,n=null==e?void 0:zk(e).call(e,(function(e){return"video"===e.streamType}))[0],r=(null==(t=null==n?void 0:n.bodyView)?void 0:t.spsArr)||[];if(n&&r.length>1&&r[0].join(",")!==r[1].join(","))return{description:"【关键帧前包含多个sps信息】"}}},{key:"_metadataOnlyInSequeceHeader",value:function(e,t){var n;if("FLV"===t){var r=null==e?void 0:Ym(e).call(e,(function(e){return e.keyframe}));if(r){var i=r.isHevc;return-1===jw(n=r.nalTypes).call(n,i?33:7)?{description:"【sps、pps信息只存在于Sequence Header中】"}:void 0}}}}]),e}(),cV=function(){function e(){Ry(this,e)}return Fy(e,[{key:"detect",value:function(e){var t=null==e?void 0:Ym(e).call(e,(function(e){return e.isSample&&"video"===e.streamType}));if(t)return t.isHevc?[{id:1,description:"【H265编码格式】",tips:"对于不支持H265解码的设备无法播放"}]:void 0}}]),e}(),hV=function(){function e(){Ry(this,e)}return Fy(e,[{key:"detect",value:function(e){if(null==e?void 0:Ym(e).call(e,(function(e){return e.isSample&&"B"===e.frameType})))return[{description:"【存在B帧】"}]}}]),e}(),fV=function(){function e(){Ry(this,e)}return Fy(e,[{key:"detect",value:function(e){var t=null==e?void 0:zk(e).call(e,(function(e){return e.isSample&&"video"===e.streamType})),n=null==e?void 0:zk(e).call(e,(function(e){return e.isSample&&"audio"===e.streamType}));if(t.length&&n.length){var r,i,o=t[t.length-1].ptsTime-t[0].ptsTime,a=n[n.length-1].ptsTime-n[0].ptsTime;if(Math.abs(o-a)>=rV)return[{description:Bm(r=Bm(i="【音视频时长存在差距】, video=".concat(o,"s, audio=")).call(i,a,"s, delta=")).call(r,mU(o-a),"s"),tips:"可能造成播放画面卡顿或者声音卡顿"}]}}}]),e}(),dV=function(){function e(){Ry(this,e)}return Fy(e,[{key:"detect",value:function(e){var t=null==e?void 0:zk(e).call(e,(function(e){return e.isSample&&"video"===e.streamType})),n=null==e?void 0:zk(e).call(e,(function(e){return e.isSample&&"audio"===e.streamType}));if(t.length||n.length)return t.length&&n.length?void 0:[{description:"【流开始只包含".concat(t.length?"音频":"视频","】"),tips:"可能播放没有声音或者没有画面"}]}}]),e}();function pV(e,t){var n,r,i;return zk(n=uL(r=Vw(i=[new cV,new aV,new sV,new lV,new uV,new fV,new hV,new dV]).call(i,(function(n){return n.detect(e,t)}))).call(r,(function(e,t){return Bm(e).call(e,t)}),[])).call(n,Boolean)}var vV=uE,gV=function(e,t,n){return function(e,t,n){t in e?vV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==Tc(t)?t+"":t,n),n},yV=function(){function e(t){var n=this;Ry(this,e),gV(this,"_opts",null),gV(this,"_controller",null),gV(this,"_reader",null),gV(this,"_loading",!1),gV(this,"_chunks",[]),gV(this,"_readStream",(function(e,t){var r=0;n._reader=e.getReader();var i=n._chunks;return function e(){var o;return null==(o=n._reader)?void 0:o.read().then((function(n){var o=n.value,a=n.done;return i.push(o),t(r,o),a?Hw.resolve(yU(zk(i).call(i,Boolean))):(r+=o.byteLength,e())}))}()})),this._opts=t}return Fy(e,[{key:"request",value:function(){var e=this,t=this._opts,n=t.url,r=t.onProgress,i=t.contentType,o=void 0===i?"ArrayBuffer":i,a=t.loadTimeout,s=void 0===a?5e3:a,l=t.headers;return this._controller=new AbortController,Hw.race([fetch(n,{signal:this._controller.signal,headers:l}),new Hw((function(t,n){setTimeout((function(){var t;e._loading||(n({code:0,message:"timeout"}),null==(t=e._controller)||t.abort())}),s)}))]).then((function(t){return t.ok&&t.status>=200&&t.status<300?(e._loading=!0,t):Hw.reject({code:t.status,message:t.statusText})})).then((function(t){switch(o){case"TEXT":return t.text();case"JSON":return t.json();case"ArrayBuffer":return r?e._readStream(t.clone().body,r):t.arrayBuffer()}})).catch((function(t){if(e._loading=!1,"AbortError"!==t.name)return Hw.reject({code:t.code||0,message:t.message})}))}},{key:"cancel",value:function(){var e,t;try{null==(e=this._reader)||e.cancel(),null==(t=this._controller)||t.abort(),this._reader=null,this._controller=null}catch(rj){}}}]),e}(),mV=function(){function e(){Ry(this,e)}var t;return Fy(e,[{key:"parse",value:(t=sy(oy().mark((function e(t,n){var r,i,o,a,s,l,u,c,h,f,d,p=this;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=[],this._loader=new yV(Dm(Dm({url:t},n),{},{onProgress:function(e,t){u.push(t),e>n.probeSize&&p._loader.cancel()}})),e.next=4,this._loader.request();case 4:return c=new rB,h=c.parse(yU(u)),f=c.getSnapshoot(h),d=null==(r=f.video)?void 0:r.sps,e.abrupt("return",{codec:null==(i=f.video)?void 0:i.codecType,codecStr:null==d?void 0:d.codec,width:null==d?void 0:d.width,height:null==d?void 0:d.height,vDration:null==(o=null==f?void 0:f.video)?void 0:o.duration,aDuration:null==(a=null==f?void 0:f.audio)?void 0:a.duration,sampleRate:null==(s=null==f?void 0:f.audio)?void 0:s.sampleRate,channelCount:null==(l=null==f?void 0:f.audio)?void 0:l.channelCount,views:h,snap:f});case 9:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})}]),e}(),_V={exports:{}};_V.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||uE(e,t,{enumerable:!0,get:r})},n.r=function(e){void 0!==cE&&$M&&uE(e,$M,{value:"Module"}),uE(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==Tc(e)&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),uE(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},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=0)}([function(e,t,n){function r(e,t){var n=zw(e);if(oE){var r=oE(e);t&&(r=zk(r).call(r,(function(t){return aE(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){return(i="function"==typeof cE&&"symbol"==Tc(hE)?function(e){return Tc(e)}:function(e){return e&&"function"==typeof cE&&e.constructor===cE&&e!==cE.prototype?"symbol":Tc(e)})(e)}function o(e,t,n){return t in e?uE(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.r(t),n.d(t,"m3u8Parser",(function(){return h})),n.d(t,"mpdParser",(function(){return g}));var a=/EXT(?:-X-)?([^:]+):?(.*)$/,s=/([^,="]+)((="[^"]+")|(=[^,]+))*/g;function l(e){var t;return uL(t=e.split("-")).call(t,(function(e,t){return e+(e?t.charAt(0)+Ww(t).call(t,1).toLowerCase():t.toLowerCase())}),"")}function u(e){if(!/^#EXT/.test(e)&&/^\s*#/.test(e))return null;var t,n,u=a.exec(e);return u?(t=l(u[1]),n=function(e,t){if(!e)return null;var n=Vw(t=e.match(s)).call(t,(function(e){return function(e){var t=sT(e).call(e).replace("=","|").split("|");if(2==t.length)return o({},l(t[0]),t[1].replace(/("|')/g,""));var n=QS(t[0]);return fk(n)?t[0]:n}(e)}));return 1===n.length?n[0]:0===zk(n).call(n,(function(e){return"object"===i(e)})).length?n:uL(n).call(n,(function(e,t){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){o(e,t,n[t])})):sE?lE(e,sE(n)):r(Object(n)).forEach((function(t){uE(e,t,aE(n,t))}))}return e}({},e,{},t)}),{})}(u[2])):(t="url",n=e),o({},t,n)}function c(e,t){if(/^https?/.test(e)||/^data:/.test(e)||/^sdk:/.test(e))return e;for(t=Ww(n=t.split("/")).call(n,0,-1),e=e.split("/");e.length;){var n,r=e.shift();-1==jw(t).call(t,r)&&t.push(r)}return t.join("/")}var h=function(e,t,n){var r,i,o;if(!e||!t)return{error:1,msg:"invalid input"};var a,s=zk(r=Vw(i=zk(o=e.split("\n")).call(o,Boolean)).call(i,(function(e){return u(sT(e).call(e))}))).call(r,Boolean);if(!s.length)return{error:1,msg:"invalid m3u8"};a=0!==zk(s).call(s,(function(e){return!!e.streamInf})).length?{master:!0,m3u8Url:t,levels:[],medias:[]}:{master:!1,m3u8Url:t,duration:0,startSN:0,endSN:0,segments:[],live:!0};try{a=function(e,t,n){for(var r=t.master,i=e.length,o=0,a=0,s=0,l=0,u=0,h=-1,f=0;f<i;f++){var d=e[f];for(var p in d){var v=d[p];switch(v&&v.uri&&(v.url=c(v.uri,t.m3u8Url)),p){case"inf":var g={start:a,end:a+(Array.isArray(v)?v[0]:v),cc:o,sn:s+l};h>=0&&(g.keyIndex=h),l++,a=g.end,t.segments.push(g);break;case"start":a=v;break;case"discontinuity":o++;break;case"mediaSequence":s=v;break;case"streamInf":u++,v.levelId=u,t.levels.push(v);break;case"media":t.medias.push(v);break;case"endlist":t.live=!1;break;case"key":h++,t.key?t.key.push(v):t.key=[v];break;case"url":var y=r?t.levels:t.segments;if(!y.length)throw new Error("invalid m3u8");r?y[u-1].url=c(v,t.m3u8Url):y[l-1].url=c(v,t.m3u8Url);break;default:v&&(t[p]=v)}}n&&(t=n(d,t))}return r||(t.startSN=s,t.endSN=s+l-1,t.duration=a),t}(s,a,n)}catch(l){return{error:1,msg:l.message}}return a},f=/\s*(<\/?[^>]+>)/,d=/\s*(?:<\/?([^\s>]+))?\s*([^>]+)*(?:\/?>)?/,p=/\s*([^=]+)="([^"]+)"/g;function v(e,t){for(var n,r,i,o=[],a=e.length,s=0;s<a;s++)if((n=e[s]).closed)if(r=o.pop(),"pureValue"!==n.tagName){if(r&&r.tagName===n.tagName?i=o.pop():(i=r,r=n),!i){o.push(r);break}var l=r,u=l.tagName,c=l.attrs,h=i.attrs[u];t&&(c=t(u,c)),i.attrs[u]=h?Array.isArray(h)?Bm(h).call(h,c):[h,c]:c,o.push(i)}else r.attrs?r.attrs.value=n.attrs.value:r.attrs=n.attrs,o.push(r);else o.push(n);var f,d,p,v=o[0];return v?"undefined"!=v.tagName?(f={},d=v.tagName,p=v.attrs,d in f?uE(f,d,{value:p,enumerable:!0,configurable:!0,writable:!0}):f[d]=p,f):v.tagName:null}var g=function(e,t){if(!e)return{error:1,msg:"invalid input"};try{var n,r,i;return v(zk(n=Vw(r=zk(i=e.split(f)).call(i,Boolean)).call(r,(function(e){return function(e){var t,n,r=e.match(d),i={},o=(t=r&&r[1])?uL(n=t.split("_")).call(n,(function(e,t){return e?e+=t.charAt(0).toUpperCase()+Ww(t).call(t,1):e=t.charAt(0).toLowerCase()+Ww(t).call(t,1)}),""):"";if(r&&r[1]&&r[2]){for(var a,s={};null!=(a=p.exec(r[2]));)s[a[1]]=a[2];return"?xml"===o?null:(i.tagName=o,i.attrs=s,i.closed=/\/$/.test(r[2]),i)}return r?/^<\//.test(r[0])?(i.tagName=o,i.closed=!0,i):/^</.test(r[0])?(i.tagName=o,i.attrs={},i):(i.tagName="pureValue",i.attrs={value:r[2]},i.closed=!0,i):null}(e)}))).call(n,Boolean),t)}catch(o){return{error:1,msg:o.message}}}}]);var bV=_V.exports;function wV(e){return kV.apply(this,arguments)}function kV(){return kV=sy(oy().mark((function e(t){var n,r,i,o=arguments;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new yV(Dm(Dm({url:t},o.length>1&&void 0!==o[1]?o[1]:{}),{},{contentType:"TEXT"})),e.next=4,n.request();case 4:return r=e.sent,i=bV.m3u8Parser(r,t,(function(e,t){var n;if(!e.url||!/^\//.test(e.url))return t;var r=e.url,i=t.segments[t.segments.length-1];return i.url=Ww(n=i.url.split("/")).call(n,0,3).join("/")+r,t})),e.abrupt("return",i);case 7:case"end":return e.stop()}}),e)}))),kV.apply(this,arguments)}var EV,SV=function(){function e(){Ry(this,e)}var t;return Fy(e,[{key:"parse",value:(t=sy(oy().mark((function e(t,n){var r,i,o,a,s,l,u,c,h,f,d,p,v,g,y,m;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,wV(t,n);case 2:if(!(u=e.sent).master){e.next=7;break}return e.next=6,wV(u.levels[0].url);case 6:u=e.sent;case 7:if(null==u?void 0:u.segments.length){e.next=9;break}throw new Error("invalid m3u8");case 9:c=[],h=n.nbSegment,f=0,d=oy().mark((function e(){var t;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new yV(Dm(Dm({url:u.segments[f].url},n),{},{onProgress:function(e,r){c.push(r),e>n.probeSize&&t.cancel()}})),e.next=3,t.request();case 3:h--,f++;case 5:case"end":return e.stop()}}),e)}));case 13:if(!h){e.next=17;break}return e.delegateYield(d(),"t0",15);case 15:e.next=13;break;case 17:return p=new Uint8Array(yU(zk(c).call(c,Boolean))),v=new fB,g=v.parse(p),y=v.getSnapshoot(g),m=null==(r=y.video)?void 0:r.sps,e.abrupt("return",{codec:null==(i=y.video)?void 0:i.codecType,codecStr:null==m?void 0:m.codec,width:null==m?void 0:m.width,height:null==m?void 0:m.height,vDration:null==(o=null==y?void 0:y.video)?void 0:o.duration,aDuration:null==(a=null==y?void 0:y.audio)?void 0:a.duration,sampleRate:null==(s=null==y?void 0:y.audio)?void 0:s.sampleRate,channelCount:null==(l=null==y?void 0:y.audio)?void 0:l.channelCount,views:g,snap:y});case 23:case"end":return e.stop()}}),e)}))),function(e,n){return t.apply(this,arguments)})}]),e}(),TV=function(){function e(){Ry(this,e)}var t;return Fy(e,[{key:"parse",value:(t=sy(oy().mark((function e(t,n){var r,i,o,a,s,l,u,c,h,f,d,p,v,g,y,m,_,b,w;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=new yV(Dm(Dm({url:t},n),{},{contentType:"ArrayBuffer",headers:{Range:"bytes=0-1499"}})),h=[],e.next=4,c.request();case 4:return f=e.sent,d=new Uint8Array(f),p=(new eV).parse(d),v=Ym(p).call(p,(function(e){return"mdat"===e.type})),(g=Ym(p).call(p,(function(e){return"moov"===e.type})))?(h.push(g.start),h.push(g.start+g.size)):v&&h.push(v.start+v.size),c=new yV(Dm(Dm({url:t},n),{},{contentType:"ArrayBuffer",headers:{Range:Bm(r="bytes=".concat(h[0],"-")).call(r,h[1]||"")}})),e.next=13,c.request();case 13:return y=e.sent,m=new eV,_=m.parse(y),b=m.getSnapshoot(_),w=null==(i=b.video)?void 0:i.sps,e.abrupt("return",{codec:null==(o=b.video)?void 0:o.codecType,codecStr:null==w?void 0:w.codec,width:null==w?void 0:w.width,height:null==w?void 0:w.height,vDration:null==(a=null==b?void 0:b.video)?void 0:a.duration,aDuration:null==(s=null==b?void 0:b.audio)?void 0:s.duration,sampleRate:null==(l=null==b?void 0:b.audio)?void 0:l.sampleRate,channelCount:null==(u=null==b?void 0:b.audio)?void 0:u.channelCount,views:m.parseV2(_,!0),snap:b});case 19:case"end":return e.stop()}}),e)}))),function(e,n){return t.apply(this,arguments)})}]),e}(),CV=function(){function e(){Ry(this,e)}var t;return Fy(e,[{key:"parseUrl",value:(t=sy(oy().mark((function e(t){var n,r,i,o,a=arguments;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=iE({timeout:5e3,probeSize:8e4,nbSegment:1},r=a.length>1&&void 0!==a[1]?a[1]:{}),!/flv/.test(t)){e.next=9;break}return e.next=5,(new mV).parse(t,r);case 5:i=e.sent,o=iB,e.next=20;break;case 9:if(!/m3u8?/.test(t)){e.next=16;break}return e.next=12,(new SV).parse(t,r);case 12:i=e.sent,o=oB,e.next=20;break;case 16:return e.next=18,(new TV).parse(t,r);case 18:i=e.sent,o=aB;case 20:return i.exceps=zk(n=pV(i.views.items,o)).call(n,(function(e){return 1!==e.id})),e.abrupt("return",i);case 22:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})}]),e}(),xV=function(e){var t,n;return{retryCount:0,disconnectRetryCount:null!==(t=null==e||null===(n=e.flv)||void 0===n?void 0:n.retryCount)&&void 0!==t?t:void 0}},PV=function(e){var t;return{options:{flv:Dm(Dm({},xV(e)),null!==(t=null==e?void 0:e.flv)&&void 0!==t?t:{})},module:ML.PluginFlv}},AV=function(e){var t;return{options:{flv:Dm(Dm({preferMMS:!0},xV(e)),null!==(t=null==e?void 0:e.flv)&&void 0!==t?t:{})},module:ML.PluginFlv}},IV=function(e,t){var n;return{options:{hls:Dm({retryCount:0,pollRetryCount:0,allowedStreamTrackChange:!1},null!==(n=null==e?void 0:e.hls)&&void 0!==n?n:{})},module:t?ML.PluginHlsJs:ML.PluginHls}},RV=function(){return{options:{mediaType:"xg-video",innerDegrade:1,codecType:t.H264},module:ML.PluginXgvideo,afterLoad:function(e){e.isSupported()&&e.setDecodeCapacity({preloadDecoder:t.H264,wasmFallbackToAsm:!1,reuseWasmDecoder:!1,disabledWhenErrorOccur:!1})}}},OV=function(){return{options:{mediaType:"xg-video",innerDegrade:1,codecType:t.H265},module:ML.PluginXgvideo,afterLoad:function(e){e.isSupported()&&e.setDecodeCapacity({preloadDecoder:t.H265,wasmFallbackToAsm:!1,reuseWasmDecoder:!1})}}};function MV(e){return DV.apply(this,arguments)}function DV(){return(DV=sy(oy().mark((function e(t){return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.codec){e.next=2;break}return e.abrupt("return",t.codec);case 2:if(t.degradation!==n.SoftFirst||!t.url){e.next=6;break}return e.next=5,LV(t.url);case 5:return e.abrupt("return",e.sent);case 6:return e.abrupt("return","unknown");case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function LV(e){return FV.apply(this,arguments)}function FV(){return(FV=sy(oy().mark((function e(n){var r,i;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(new CV).parseUrl(n);case 3:if(r=e.sent,"bytevc1"!==(i=r.codec)){e.next=9;break}return e.abrupt("return",t.H265);case 9:if("avc"!==i){e.next=11;break}return e.abrupt("return",t.H264);case 11:return e.abrupt("return","unknown");case 14:return e.prev=14,e.t0=e.catch(0),console.error("detect codec error: ",e.t0),e.abrupt("return","unknown");case 18:case"end":return e.stop()}}),e,null,[[0,14]])})))).apply(this,arguments)}function NV(e,t){return UV.apply(this,arguments)}function UV(){return(UV=sy(oy().mark((function e(i,o){return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.decodeType!==r.Software){e.next=2;break}return e.abrupt("return",!0);case 2:if("unknown"!==o){e.next=4;break}return e.abrupt("return",!1);case 4:return e.next=6,MV(i);case 6:if(e.sent!==t.H265){e.next=12;break}if(!aC.isHevcSupported()){e.next=10;break}return e.abrupt("return",!1);case 10:if(i.degradation!==n.SoftFirst){e.next=12;break}return e.abrupt("return",!0);case 12:return e.abrupt("return",!1);case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function BV(e){return uL(e).call(e,(function(e,t){return iE(e,null==t?void 0:t.options)}),{})}var VV=qP,HV=function(e){return e[e.INVALID_PARAMETER=210]="INVALID_PARAMETER",e[e.EMPTY_RTM_FALLBACK_PARAMETER=211]="EMPTY_RTM_FALLBACK_PARAMETER",e[e.INVALID_LOGGER=220]="INVALID_LOGGER",e}(HV||{}),jV=Dm(Dm({},HV),WP),zV=Dm(Dm({},KP),{},(Ny(EV={},210,{messageTextKey:"INVALID_PARAMETER",level:zP.Fatal}),Ny(EV,211,{messageTextKey:"EMPTY_RTM_FALLBACK_PARAMETER",level:zP.Warn}),Ny(EV,220,{messageTextKey:"INVALID_LOGGER",level:zP.Warn}),EV));function WV(e,t){return new VV(Dm({errorCode:e},zV[e]),t)}var KV=NaN,GV="[object Symbol]",qV=/^\s+|\s+$/g,YV=/^[-+]0x[0-9a-f]+$/i,XV=/^0b[01]+$/i,$V=/^0o[0-7]+$/i,JV=Dk,QV="object"==Tc(i)&&i&&i.Object===Object&&i,ZV="object"==("undefined"==typeof self?"undefined":Tc(self))&&self&&self.Object===Object&&self,eH=QV||ZV||Function("return this")(),tH=Object.prototype.toString,nH=Math.max,rH=Math.min,iH=function(){return eH.Date.now()};function oH(e){var t=Tc(e);return!!e&&("object"==t||"function"==t)}function aH(e){return"symbol"==Tc(e)||function(e){return!!e&&"object"==Tc(e)}(e)&&tH.call(e)==GV}function sH(e){if("number"==typeof e)return e;if(aH(e))return KV;if(oH(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=oH(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(qV,"");var n=XV.test(e);return n||$V.test(e)?JV(Ww(e).call(e,2),n?2:8):YV.test(e)?KV:+e}var lH=function(e,t,n){var r,i,o,a,s,l,u=0,c=!1,h=!1,f=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function d(t){var n=r,o=i;return r=i=void 0,u=t,a=e.apply(o,n)}function p(e){var n=e-l;return void 0===l||n>=t||n<0||h&&e-u>=o}function v(){var e=iH();if(p(e))return g(e);s=setTimeout(v,function(e){var n=t-(e-l);return h?rH(n,o-(e-u)):n}(e))}function g(e){return s=void 0,f&&r?d(e):(r=i=void 0,a)}function y(){var e=iH(),n=p(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return function(e){return u=e,s=setTimeout(v,t),c?d(e):a}(l);if(h)return s=setTimeout(v,t),d(l)}return void 0===s&&(s=setTimeout(v,t)),a}return t=sH(t)||0,oH(n)&&(c=!!n.leading,o=(h="maxWait"in n)?nH(sH(n.maxWait)||0,t):o,f="trailing"in n?!!n.trailing:f),y.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=i=s=void 0},y.flush=function(){return void 0===s?a:g(iH())},y},uH=o(lH),cH=Dm(Dm({},ND),{},{TIME_SHIFT_CHANGE:"timeShiftChange",REFRESH_CLICK:"refreshClick"});function hH(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M10 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 fH=Rx.POSITIONS,dH=function(e){NP(n,e);var t=VP(n);function n(){return Ry(this,n),t.apply(this,arguments)}return Fy(n,[{key:"afterCreate",value:function(){this.config.disable||(this.appendChild(".xgplayer-icon",this.icons.refresh),this._initEvents())}},{key:"registerIcons",value:function(){return{refresh:{icon:hH,class:"xgplayer-refresh-svg"}}}},{key:"destroy",value:function(){this.unbind(["touchend","click"],this._handleRefresh)}},{key:"render",value:function(){var e=this.player.config.i18nManager;return'\n <xg-icon class="veplayer-refresh">\n <div class="xgplayer-icon">\n </div>\n <div class="xg-tips" lang-key="refresh">'.concat(e.getText("REFRESH"),"</div>\n </xg-icon>\n ")}},{key:"_handleRefresh",value:function(e){var t=this.player;if(t){var n,r;if(e.preventDefault(),e.stopPropagation(),t.addClass("xgplayer-is-enter"),t.pause(),t)t.emit(cH.REFRESH_CLICK),null===(n=this.player)||void 0===n||null===(n=n.config)||void 0===n||null===(n=n.veplayer)||void 0===n||n.retry(),null===(r=this.player)||void 0===r||null===(r=r.plugins)||void 0===r||null===(r=r.error)||void 0===r||r.hideError();t.once(mC,(function(){t.removeClass("xgplayer-is-enter")}))}}},{key:"_initEvents",value:function(){this._handleRefresh=uH(this._handleRefresh.bind(this),200);var e="mobile"===aC.device?"touchend":"click";this.bind(e,this._handleRefresh),this.show()}}],[{key:"pluginName",get:function(){return"refresh"}},{key:"defaultConfig",get:function(){return{position:fH.CONTROLS_LEFT,index:1,disable:!1}}}]),n}(Rx),pH=o(uo.f("asyncIterator")),vH=o(ie.URLSearchParams),gH=Mk;On({target:"Number",stat:!0,forced:Number.parseInt!=gH},{parseInt:gH});var yH=o(ie.Number.parseInt),mH=JS;On({target:"Number",stat:!0,forced:Number.parseFloat!=mH},{parseFloat:mH});var _H=o(ie.Number.parseFloat);function bH(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),uE(e,r.key,r)}}function wH(e,t,n){return t&&bH(e.prototype,t),n&&bH(e,n),e}function kH(e,t,n){return t in e?uE(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EH(e,t){var n=zw(e);if(oE){var r=oE(e);t&&(r=zk(r).call(r,(function(t){return aE(e,t).enumerable}))),n.push.apply(n,r)}return n}function SH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?EH(Object(n),!0).forEach((function(t){kH(e,t,n[t])})):sE?lE(e,sE(n)):EH(Object(n)).forEach((function(t){uE(e,t,aE(n,t))}))}return e}void 0===cE||(hE||(cE.iterator=cE("Symbol.iterator"))),void 0===cE||(pH||(cE.asyncIterator=cE("Symbol.asyncIterator")));var TH="xgplayer_device_id",CH="xgplayer_user_id",xH=function(e){if(!document.cookie)return null;for(var t=document.cookie.split(";"),n=0,r=t.length;n<r;n++){var i,o=t[n];if(jw(i=t[n]).call(i,e)>=0)return o.split("=")[1]||null}},PH=function(e){return String(Math.floor(Math.random()*Math.pow(10,e)))},AH=function(){var e=xH(TH);if(e)return e;var t=PH(11);return document.cookie=TH+"="+t+";max-age=31536000;path=/",t},IH=function(){var e=xH(CH);if(e)return e;var t=PH(12);return document.cookie=CH+"="+t+";max-age=31536000;path=/",t};var RH={get device(){return RH.os.isPc?"pc":"mobile"},get browser(){var e=function(){var e=navigator.userAgent.toLowerCase(),t={},n={IE:window.ActiveXObject||"ActiveXObject"in window,Chrome:jw(e).call(e,"chrome")>-1&&jw(e).call(e,"safari")>-1,Firefox:jw(e).call(e,"firefox")>-1,Opera:jw(e).call(e,"opera")>-1,Safari:jw(e).call(e,"safari")>-1&&-1==jw(e).call(e,"chrome"),Edge:jw(e).call(e,"edge")>-1,QQBrowser:/qqbrowser/.test(e),WeixinBrowser:/MicroMessenger/i.test(e)};for(var r in n)if(n[r]){var i="";if("IE"===r)i=e.match(/(msie\s|trident.*rv:)([\w.]+)/)[2];else if("Chrome"===r){for(var o in navigator.mimeTypes)"application/360softmgrplugin"===navigator.mimeTypes[o].type&&(r="360");var a=e.match(/chrome\/([\d.]+)/);i=a?a[1]:"-1"}else if("Firefox"===r){var s=e.match(/firefox\/([\d.]+)/);i=s?s[1]:"-1"}else if("Opera"===r){var l=e.match(/opera\/([\d.]+)/);i=l?l[1]:"-1"}else if("Safari"===r){var u=e.match(/version\/([\d.]+)/);i=u?u[1]:"-1"}else if("Edge"===r){var c=e.match(/edge\/([\d.]+)/);i=c?c[1]:"-1"}else if("QQBrowser"===r){var h=e.match(/qqbrowser\/([\d.]+)/);i=h?h[1]:"-1"}t.type=r,t.versions=Dk(i)}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,r=/(?:Android)/.test(e),i=/(?:Firefox)/.test(e),o=/(?:iPad|PlayBook)/.test(e)||r&&!/(?:Mobile)/.test(e)||i&&/(?:Tablet)/.test(e),a=/(?:iPhone)/.test(e)&&!o;return{isTablet:o,isPhone:a,isAndroid:r,isPc:!(a||r||n||o),isSymbian:n,isWindowsPhone:t,isFireFox:i}},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 r=t[n];if(r.r.test(e))return r.s}return"unknown"}};function OH(){return Date.now()}function MH(e){var t="unknown";return"string"!=typeof e?t:jw(e).call(e,".flv")>-1?"flv":jw(e).call(e,".m3u8")>-1?"m3u8":jw(e).call(e,".mp4")>-1?"mp4":jw(e).call(e,".sdp")>-1?"rts":t}function DH(e){return"undefined"!=typeof MediaSource?+MediaSource.isTypeSupported("video/mp4; codecs="+e):0}function LH(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.flvlive)return e.plugins.flvlive;if(e.plugins.hlslive)return e.plugins.hlslive;if(e.plugins.hlsvod)return e.plugins.hlsvod;if(e.plugins.hlslivemobile)return e.plugins.hlslivemobile;if(e.plugins.flvlivemobile)return e.plugins.flvlivemobile}return e.newHls||e.newFlv||e.__core__||e.flv}var FH={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"},NH=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}wH(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&&_D(t).call(t,"//")?window.location.protocol+t:t,e.live_stream_session_id=function(e,t,n){var r=new vH(e.split("?")[1]);return r.get(t)||r.get(n)}(e.cdn_play_url,"_session_id","session_id"),e.play_format=MH(e.cdn_play_url),e.timestamp=OH();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(Qz){}return e}(),r=n.cpu_core_number,i=n.memory_usage,o=n.network_downlink;e.cpu_core_number=r,e.memory_usage=i,e.network_downlink=o,e.muted=+this._player.muted,iE(e,SH({},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,SH({},e)))},e}(),UH=function(){return void 0!==navigator.onLine?navigator.onLine?(e=navigator.connection)&&(e.effectiveType||e.type)||RH.device:"none":"unknown";var e},BH=["play","playing","pause","ended","seeking","seeked","timeupdate","waiting","canplay","canplaythrough","durationchange","ratechange","volumechange","loadeddata"],VH=function(){function e(e){this.options=e,this.logger=new HH(e),this.restart=this.restart.bind(this),this.bindUrlChange()}var t=e.prototype;return t.restart=function(e){this.destroy("string"!=typeof e&&Boolean(e)),this.logger=new HH(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=iE(this.options.ext||{},e),this.logger&&this.logger.updateExt(e)},t.sendLog=function(e){this.logger.sendLog(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}(),HH=function(){function e(e){if(!e.player)throw new Error("option player is necessary");this.options=iE({},e,function(e){return{device_id:e.device_id||AH(),user_id:e.user_id||IH(),error_report_stop:"boolean"!=typeof e.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 NH(this.options),this.init(),this.started=!1,this.destroyed=!1,this.completed=!1,this.firstFrameViewed=!1,this.cacheRtcStats={},this.cachePlaying={}}wH(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,r=void 0!==n.hlsOps;this.commonParams=SH({os:RH.operation_os},function(e){var t,n=e.player,r=n.config.mediaType;return SH({project_key:e.project_key,live_sdk_version:LH(n)||n.hlsOps?"2":"-1",player_sdk_version:n.version,logger_version:"1.1.0-alpha.17",product_line:e.product_line,user_id:e.user_id,device_id:e.device_id,logger_id:PH(12),app_name:e.app_name,cdn_ip:e.cdn_ip,is_wasm:+(!!r&&"video"!==r),review_is_live:n.config.isLive?2:1,isSupportedH265:DH("hev1.1.6.L93.B0,mp4a.40.2"),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:RH.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&&_D(t=n.config.url).call(t,"//")?window.location.protocol+n.config.url:n.config.url,play_format:MH(n.config.url),codec_support:-1},e.ext)}(t)),this.log=iE({},{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:-1,drop_percent:-1,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 i=this;for(var o in this.log){var a=function(t){uE(e.log[o],t,{get:function(){return null==this["_"+t]?i.commonParams[t]:this["_"+t]},set:function(e){this["_"+t]=e},enumerable:!0})};for(var s in this.commonParams)a(s);r&&uE(this.log[o],"m3u8",{get:function(){if(n.__core__){var e=n.__core__.m3u8Text;return e?Ww(e).call(e,0,25e4):""}return""},enumerable:!0}),uE(this.log[o],"volume",{get:function(){if(n&&n.video)return n.volume||0},enumerable:!0}),uE(this.log[o],"access",{get:function(){return UH()},enumerable:!0})}},t.sendLog=function(e){for(var t in this.commonParams)void 0===e[t]&&(e[t]=this["_"+t]||this.commonParams[t]);this.logmanager.push(e)},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=LH(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=OH(),this.logmanager.push(this.log.start_play,!0))},t.initWindowListener=function(){"pc"===RH.device?window.addEventListener("beforeunload",this.handleUserLeave):"mobile"===RH.device&&(window.addEventListener("beforeunload",this.handleUserLeave),window.addEventListener("pagehide",this.handleUserLeave))},t.removeWindowListener=function(){"pc"===RH.device?window.removeEventListener("beforeunload",this.handleUserLeave):"mobile"===RH.device&&(window.removeEventListener("beforeunload",this.handleUserLeave),window.removeEventListener("pagehide",this.handleUserLeave))},t.initEvt=function(){var e=this,t=this.player;BH.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,r=e.pts,i=e.type,o=e.meta,a=e.sei,s=e.decodeFps,l=e.url,u=e.state;switch(t){case"core.ttfb":this.handleTTFB(e);break;case"core.loadresponseheaders":var c=n.get("X-Server-Ip");void 0!==this.player.hlsOps&&(this.log.play_stop.review_ts_count+=1),c&&(this.commonParams.cdn_ip=c);break;case"core.loadretry":this.log.play_stop.retry_count++;break;case"core.keyframe":this.handleKeyframe(r);break;case"core.metadataparsed":this.handleMetaDataLoaded(i,o);break;case"core.sei":this.handleSEIParsed(a);break;case"core.lowdecode":this.commonParams.is_wasm&&(iE(this.log.play_low_decode,e||{}),this.log.play_low_decode.decode_fps=s,this.log.play_low_decode.timestamp=OH(),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(iE({url:l,state:u},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,Ww(Array.prototype).call(e,0))}catch(rj){}t.destroyed||t.handlePlayerComlete()}},t.handleTTFB=function(e){var t=e||{},n=t.end,r=t.elapsed,i=t.responseUrl,o=t.url;this.log.first_frame.ttfb=r||-1,this.log.first_frame.ttfb_end=n||0,this.log.first_frame.is_redirect=+(o!==i),this.log.play_result.is_redirect=this.log.first_frame.is_redirect},t.handleUrlChange=function(e){this.logmanager.push(iE(this.log.play_url_change,{url:e,timestamp:OH()}))},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=OH(),this.logmanager.push(this.log.source_opened)},t.handleBufferAppend=function(){this.log.source_updateend.timestamp=OH(),this.logmanager.push(this.log.source_updateend)},t.handlePlayerPause=function(){this.log.pause.timestamp=OH(),this.logmanager.push(this.log.pause,!0),this.stallEnd()},t.handlePlayerError=function(e){this.errorNumber=1;var t=e.errorType,n=e.errorCode;iE(this.log.play_error,SH({timestamp:OH(),code:e.httpCode||n||("parse"===t?31:21),info:e.message,detail:XM(e)},this.videoSize)),this.logmanager.push(this.log.play_error,!0),this.destroyed||(0===this.log.first_frame.first_frame_view&&(iE(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=OH()),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))),this.options.error_report_stop?this.destroy(!0):this.updatePlayStopParams())},t.handlePlayerLoadStream=function(e){var t=e.url,n=e.offersdp,r=e.sessionId;if("string"==typeof t){var i=this.log.play_loadstream;i.timestamp=OH(),i.loadstream_url=t,i.offersdp=n,i.sessionId=r,this.logmanager.push(i)}},t.handlePlayerLoadedStream=function(e){var t=this.log.play_stream_loaded;t.timestamp=OH(),iE(t,e),this.logmanager.push(t)},t.handleSEIParsed=function(e){try{var t=this,n=t.log,r=n.playing,i=n.first_frame,o=function(){if(100===e.code){var n=function(e){var t,n,r,i,o,a;for(t="",r=e.length,n=0;n<r;)switch((i=e[n++])>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:t+=String.fromCharCode(i);break;case 12:case 13:o=e[n++],t+=String.fromCharCode((31&i)<<6|63&o);break;case 14:o=e[n++],a=e[n++],t+=String.fromCharCode((15&i)<<12|(63&o)<<6|(63&a)<<0)}return t}(e.content);n=Ww(n).call(n,jw(n).call(n,"{"),dN(n).call(n,"}")+1);var o=function(e,t){try{var n=e()}catch(rj){return t(rj)}return n&&n.then?n.then(void 0,t):n}((function(){var e=JSON.parse(n);return Hw.resolve(t.getPlayerBuffer()).then((function(n){var o=n+t.ntpTime-e.ts;r.sei_delay=o,r.sei_source=e.source,r.ntp_sync=t.options.ntp?1:0,r.ntp_delta=t.ntp_delta,i.first_sei_delay=o,i.ntp_sync=t.options.ntp?1:0,i.ntp_delta=t.ntp_delta}))}),(function(){}));if(o&&o.then)return o.then((function(){}))}}();return Hw.resolve(o&&o.then?o.then((function(){})):void 0)}catch(rj){return Hw.reject(rj)}},t.handleMetaDataLoaded=function(e,t){this.log.play_stop.meta=this.log.play_stop.meta||{},e&&(this.log.play_stop.meta[e]=t),this.log.play_metadata_loaded.timestamp=OH(),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=DH(t.codec))),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){iE(this.log.play_av_unsync,e||{}),this.log.play_av_unsync.timestamp=OH(),this.logmanager.push(this.log.play_av_unsync)},t.handleStreamException=function(e){this.logmanager.push(iE({},this.log.stream_exception,e))},t.handlePlayerComlete=function(){this.completed||(this.completed=!0,this.core=LH(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(){try{var e=this;return Hw.resolve(e.getRtcStats({onlyJb:!0})).then((function(t){if(void 0!==t.video_jb_delay)return t.video_jb_delay;var n=e.player.video.buffered;if(n){var r=Math.max(0,n.length-1);try{var i=yH(1e3*(n.end(r)-e.player.video.currentTime));return e.log.playing.audio_buffer_time=e.log.playing.video_buffer_time=i,i}catch(rj){return 0}}}))}catch(rj){return Hw.reject(rj)}},t.getTransferCost=function(e){var t;if(!(null===(t=this.core)||void 0===t?void 0:t.transferCost))return{};if(e)return this.core.transferCost;var n=this.core.transferCost,r=n.demuxCost,i=n.remuxCost,o=n.appendCost,a={demuxCost:r-this.cachePlaying.demuxCost,remuxCost:i-this.cachePlaying.remuxCost,appendCost:o-this.cachePlaying.appendCost};return iE(this.cachePlaying,this.core.transferCost),a},t.getPlayerDownloadSpeed=function(){return this.core&&this.core.core&&"function"==typeof this.core.core.speedInfo&&this.core.core.speedInfo().speed||{}},t.getPlayerQuality=function(){var e=this.player.video;if(e)if(e.getVideoPlaybackQuality){var t=e.getVideoPlaybackQuality();this.log.playing.drop_count=t.droppedVideoFrames-this.tempDroppedFrameCount,this.log.playing.drop_percent=_H((t.droppedVideoFrames-this.tempDroppedFrameCount)/(t.totalVideoFrames-this.tempTotalFrameCount)).toFixed(1),this.log.play_stop.drop_percent=_H(t.droppedVideoFrames/t.totalVideoFrames).toFixed(1),this.tempDroppedFrameCount=t.droppedVideoFrames,this.tempTotalFrameCount=t.totalVideoFrames}else if(null!=e.webkitDroppedFrameCount){var n=e.webkitDroppedFrameCount;this.log.playing.drop_count=n-this.tempDroppedFrameCount,this.tempDroppedFrameCount=n}},t.getRtcStats=function(e){var t=e.duration,n=void 0===t?1e3:t,r=e.onlyJb,i=void 0!==r&&r;try{var o=this,a=o.player.plugins.rts||o.player.plugins.rtm,s=a&&a.pc,l={};return s?Hw.resolve(s.getStats()).then((function(e){return e.forEach((function(e){var t=e.type,r=e.mediaType,a=e.bytesReceived,s=e.packetsReceived,u=e.audioLevel,c=e.concealmentEvents,h=e.remoteTimestamp,f=e.timestamp,d=e.framesDropped,p=e.keyFramesDecoded,v=e.totalDecodeTime,g=e.framesDecoded,y=e.frameHeight,m=e.frameWidth,_=e.framesReceived,b=e.jitterBufferDelay,w=e.jitterBufferEmittedCount,k=e.jitter,E=e.nackCount,S=e.packetsLost,T=e.pliCount,C=e.totalSamplesReceived,x=e.concealedSamples,P=e.currentRoundTripTime,A=e.decoderImplementation,I=e.mimeType,R=e.freezeCount,O=e.totalFreezesDuration,M=e.totalPausesDuration;switch(t){case"inbound-rtp":if("audio"===r)l.audio_bytes_received=a-(o.cacheRtcStats.audioBytesReceived||0),o.cacheRtcStats.audioBytesReceived=a,l.audio_packets_lost=S-(o.cacheRtcStats.audioPacketsLost||0),l.audio_packets_received=s-(o.cacheRtcStats.audioPacketsReceived||0),o.cacheRtcStats.audioPacketsLost=S,o.cacheRtcStats.audioPacketsReceived=s,l.audio_level=u,l.concealment_event=c,l.audio_fraction_lost=l.audio_packets_lost/l.audio_packets_received,void 0!==o.cacheRtcStats.totalSamplesReceived&&(l.audio_rec_sample_rate=(C-o.cacheRtcStats.totalSamplesReceived)/n),o.cacheRtcStats.totalSamplesReceived=C,l.concealed_samples=x,l.total_samples_received=C;else{if(l.video_jb_delay=b/w*1e3,i)return l;l.frames_dropped=d,l.iframes_decoded=p,l.video_bytes_received=a-(o.cacheRtcStats.videoBytesReceived||0),o.cacheRtcStats.videoBytesReceived=a,l.video_dec_time=v,l.video_decoded_delay_ms=l.video_dec_elapse/g,l.video_frame_height=y,l.video_frame_width=m,void 0!==o.cacheRtcStats.framesDecoded&&(l.video_decode_framerate=(g-o.cacheRtcStats.framesDecoded)/n),o.cacheRtcStats.framesDecoded=g,void 0!==o.cacheRtcStats.framesReceived&&(l.video_recv_framerate=(_-o.cacheRtcStats.framesReceived)/n),void 0!==o.cacheRtcStats.freezeCount&&(l.freeze_count=R-o.cacheRtcStats.freezeCount,l.freeze_duration=O-o.cacheRtcStats.totalFreezesDuration),o.cacheRtcStats.freezeCount=R,o.cacheRtcStats.totalFreezesDuration=O,o.cacheRtcStats.framesReceived=_,l.total_pauses_duration=M,l.video_jitter=1e3*k,l.video_nack_count=E,l.video_packets_lost=S-(o.cacheRtcStats.videoPacketsLost||0),l.video_packets_received=s-(o.cacheRtcStats.videoPacketsReceived||0),l.video_fraction_lost=l.video_packets_lost/l.video_packets_received,o.cacheRtcStats.videoPacketsLost=S,o.cacheRtcStats.videoPacketsReceived=s,l.video_pli_count=T,l.decoder_name=A}break;case"remote-outbound-rtp":l.e2e_delay_ms=f-h;break;case"track":void 0!==m&&(l.video_frame_width=m,l.video_frame_height=y);break;case"candidate-pair":l.rtt=1e3*P;break;case"codec":LD(I).call(I,"video")?l.video_codec=I:l.audio_codec=r}})),iE(o.log.playing,{video_download_size:l.video_bytes_received,decode_fps:l.video_decode_framerate,width:l.video_frame_width,height:l.video_frame_height,current_speed:(l.audio_bytes_received+l.video_bytes_received)/n}),l})):Hw.resolve(l)}catch(rj){return Hw.reject(rj)}},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,r=t.log.playing.timestamp;t.inWaitingStart&&t.inWaitingStart<OH()&&(n=Math.min(t.options.playingInterval||t.log.playing.play_time,OH()-Math.max(t.inWaitingStart,r))),t.getPlayerQuality(),t.getPlayerBuffer();var i=t.getTransferCost(!1);if(!t.options.downloadSpeedInterval){var o=t.getPlayerDownloadSpeed(),a=o.speed,s=o.avgSpeed;t.log.playing.current_speed=a,t.log.playing.avg_speed=s}var l=OH(),u=l-r,c=(n>200?n:0)+t.log.playing.stall_time,h=(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)),iE(t.log.playing,SH(SH({timestamp:l,stop_time:l,duration:e?0:u/1e3,stall_time_per_100sec:c/u*100,stall_count_per_100sec:1e3*h/u*100,stall_count:h,stall_time:c,play_current_time:t.player.currentTime},i),t.videoSize)),Hw.resolve(t.getRtcStats({duration:u,first:e,onlyJb:!1})).then((function(n){var r={};if(t.core){if(t.core.getStats){var i=t.core.getStats()||{},o=i.bitrate,a=i.avgSpeed;iE(r,{bitrate:o,avg_speed:a,rate:a/o})}if(t.core.getNetWorkInfo){var s,l=(t.core.getNetWorkInfo()||{}).lostRate,c=((null===(s=t.core.core)||void 0===s?void 0:s._opts)||{}).networkEvaluateInterval;iE(r,{lostRate:l,networkEvaluateInterval:c})}}t.logmanager.push(iE({},t.log.playing,SH(SH({play_time:e?0:u},n),r)),!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(rj){return Hw.reject(rj)}},t.handlePlayerPlaying=function(){try{var e=this;if(e.player&&e.player.video.readyState<3)return Hw.resolve();if(e.player.off("playing",e.handlePlayerPlaying),e.player.off("timeupdate",e.handlePlayerPlaying),!e.player.video)return e.destroyFunc(),Hw.resolve();if(e.player.paused)return e.handleVideopause(),Hw.resolve();if(e.core&&e.core.getStats){var t=(e.core.getStats()||{}).fps;e.commonParams.fps=t}return Hw.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 Hw.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 Hw.resolve(n&&n.then?n.then((function(){})):void 0)}catch(rj){return Hw.reject(rj)}}),1e3),e.clearStallTimer(),e.handleVideoplaying(),e.started||e.reportStartPlay(),e.saveBuffered()}))}catch(rj){return Hw.reject(rj)}},t.handlePlayerReady=function(){var e=this;this.log.start_play.start_play_time=OH(),this.player.config.autoplay&&this.reportStartPlay(),this.options.playResultThreshold&&(this.log.play_result.threshold=this.options.playResultThreshold),this.clearPlayResultTimer(),this.log.play_result.start=OH(),this.playResultTimer=setTimeout((function(){e.log.play_result.timestamp>=e.log.play_result.start||e.player&&!e.player.paused&&e.player.video&&(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;if(!this.inWaitingStart&&this.log.first_frame.timestamp){this.log.stall.timestamp=this.inWaitingStart=this.log.stall.stall_start=OH(),this.log.stall_start.ready_state=this.log.stall.ready_state=this.player.video.readyState,this.log.stall_start.timestamp=OH(),this.log.stall_start.stall_start_time=OH(),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;var t=this.getPlayerDownloadSpeed(),n=t.speed,r=t.avgSpeed;this.log.stall.current_speed=n,this.log.stall.avg_speed=r,iE(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=OH();this.reportStartPlay(),this.log.first_frame.start=e},t.stallEnd=function(){this.clearStallTimer();var e=OH();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=OH(),this.log.playing.stall_count++,iE(this.log.stall,SH({},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(),iE(this.log.playing,{is_last:1}),this.reportPlaying()},t.handleVideoerror=function(){var e=this;this.errorNumber=1;var t=this.player.video.error;iE(this.log.play_error,SH(SH({timestamp:OH()},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=FH[t.code],void 0!==e.log.first_frame_failed.timestamp&&(e.log.first_frame_failed.timestamp=OH()),e.logmanager.push(e.log.first_frame_failed,!0),e.log.play_result.is_threshold||(e.log.play_result.reason=FH[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"===RH.device?window.removeEventListener("beforeunload",this.handleUserLeave):"mobile"===RH.device&&window.removeEventListener("pagehide",this.handleUserLeave),BH.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.clearPlayingInterval(),this.clearStallTimer(),this.clearPlayResultTimer(),clearTimeout(this.collectDownloadSpeedTimer),this._player=null)},t.handleUserLeave=function(){try{var e=this;return e.destroyed||!e.started?Hw.resolve():(e.destroyed=!0,Hw.resolve(e.updatePlayStopParams()).then((function(){e.reportPlayStop(),e.clearPlayingInterval(),e.clearStallTimer(),clearTimeout(e.collectDownloadSpeedTimer),e.removeWindowListener()})))}catch(rj){return Hw.reject(rj)}},t.saveBuffered=function(){try{var e=this.getBuffered();e&&e.length&&(this.log.play_stop.buffered=e)}catch(Qz){}},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(Qz){}},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)},t.reportFirstframe=function(){if(!this.firstFrameViewed){if(this.core&&this.core.getStats){var e=(this.core.getStats()||{}).fps;this.commonParams.fps=e}var t=this.getTransferCost(!0);this.firstFrameViewed=!0;var n=OH();iE(this.log.first_frame,SH(SH({first_frame_view:n-this.log.start_play.start_play_time||n,timestamp:n},t),this.videoSize)),this.log.first_frame.ttfb_end&&(this.log.first_frame.ttdb=n-this.log.first_frame.ttfb_end),this.logmanager.push(this.log.first_frame),this.clearPlayResultTimer(),this.log.play_result.result=1,this.logmanager.push(this.log.play_result),this.log.play_stop.is_stream_received=1}},t.updatePlayStopParams=function(){try{var e,t=function(){iE(o,SH({timestamp:i,stop_time:i,duration:n.playedTime/1e3,play_time:n.playedTime/1e3},n.videoSize)),0===n.errorNumber&&(o.play_time_on_no_frame=o.stop_time-n.log.start_play.start_play_time)},n=this,r=function(e){var t,n=zk(t=performance.getEntriesByType("resource")).call(t,(function(t){return t.name===e}));if(n.length){var r=n[0],i=n[n.length-1];return{dns_parse_time:yH(r.domainLookupEnd-r.domainLookupStart),redirect:yH(r.redirectEnd-r.redirectStart),ttfb:yH(i.responseStart-i.requestStart)}}return{dns_parse_time:-1,redirect:-1,ttfb:-1}}(n._url),i=OH();n.playedTime=i-n.log.start_play.start_play_time;var o=n.log.play_stop;if(iE(o,SH({},0===o.stall_count&&{stall_time:0})),n.inWaitingStart&&i-n.inWaitingStart>200&&(o.stall_time+=i-n.inWaitingStart),n.inWaitingStart=0,iE(o,SH({stall_time_per_100sec:o.stall_time/n.playedTime*100,stall_count_per_100sec:1e3*o.stall_count/n.playedTime*100},r)),0===n.log.play_stop.stall_count_per_100sec&&(n.log.play_stop.stall_time_per_100sec=0),n.log.play_stop.stall_time_per_100sec>100||n.log.play_stop.stall_time_per_100sec<0)return Hw.resolve();if(n.log.playing.index?(iE(n.log.playing,{is_last:1}),n.reportPlaying()):(n.log.play_stop.error_code=n.log.play_error.code,n.log.play_stop.error_info=n.log.play_error.info),i=OH(),null===(e=n.core)||void 0===e?void 0:e.getStats){var a=n.core.getStats()||{},s=a.totalReceivedByte,l=a.totalReceivedCost;iE(n.log.play_stop,{totalReceivedByte:s,totalReceivedCost:l,totalAverageSpeed:8*s/(l/1e3)})}var u=function(){var e;if(null===(e=n.core)||void 0===e?void 0:e.getStatsSnapshoot)return Hw.resolve(n.core.getStatsSnapshoot()).then((function(e){var t=e.video||{},n=t.packetsLost,r=t.packetsReceived;iE(o,{packetsLost:n,packetsReceived:r,totalLostRate:n/(n+r)})}))}();return Hw.resolve(u&&u.then?u.then(t):t())}catch(rj){return Hw.reject(rj)}},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}(),jH=On,zH=r_,WH=l,KH=re,GH=__.onFreeze,qH=Object.freeze;jH({target:"Object",stat:!0,forced:WH((function(){qH(1)})),sham:!zH},{freeze:function(e){return qH&&KH(e)?qH(GH(e)):e}});var YH,XH=o(ie.Object.freeze),$H=function(){return $H=iE||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},$H.apply(this,arguments)};function JH(e,t){var n="function"==typeof cE&&QE(e);if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function QH(){for(var e=[],t=0;t<arguments.length;t++)e=Bm(e).call(e,JH(arguments[t]));return e}var ZH,ej,tj,nj,rj,ij=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 r(i){t(i),n.off(e,r)}))},e.prototype.off=function(e,t){if(e&&this._hooks[e]&&this._hooks[e].length)if(t){var n,r,i=jw(n=this._hooks[e]).call(n,t);-1!==i&&hk(r=this._hooks[e]).call(r,i,1)}else this._hooks[e]=[]},e.prototype.emit=function(e,t,n){if(n){var r;if(!e)return;-1!==jw(r=this._cache).call(r,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&&QH(this._hooks[e]).forEach((function(e){try{e(t)}catch(n){}}))},e.prototype.set=function(e){var t;e&&-1===jw(t=this._cache).call(t,e)&&this._cache.push(e)},e}(),oj=function(e){return null!=e&&"[object Object]"==Object.prototype.toString.call(e)},aj=(ZH=+Date.now()+Number(Ww(YH=""+Math.random()).call(YH,2,8)),function(){return ZH+=1}),sj=function(e){var t=document.createElement("a");return t.href=e,t},lj=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,r=n?sj(n).hostname:"";!function(e){var t={};try{var n=sj(e).search;(n=Ww(n).call(n,1)).split("&").forEach((function(e){var n,r,i=e.split("=");i.length&&(n=i[0],r=i[1]);try{t[n]=decodeURIComponent(void 0===r?"":r)}catch(o){t[n]=r}}))}catch(r){}}(window.location.href);var i=/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:i,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:r}},e.prototype.browser=function(){var e,t,n="",r=""+QS(this.appVersion),i=this.userAgent;return-1!==jw(i).call(i,"Edge")||-1!==jw(i).call(i,"Edg")?(n="Microsoft Edge",-1!==jw(i).call(i,"Edge")?(e=jw(i).call(i,"Edge"),r=i.substring(e+5)):(e=jw(i).call(i,"Edg"),r=i.substring(e+4))):-1!==(e=jw(i).call(i,"MSIE"))?(n="Microsoft Internet Explorer",r=i.substring(e+5)):-1!==(e=jw(i).call(i,"Lark"))?(n="Lark",r=i.substring(e+5,e+11)):-1!==(e=jw(i).call(i,"MetaSr"))?(n="sougoubrowser",r=i.substring(e+7,e+10)):-1!==jw(i).call(i,"MQQBrowser")||-1!==jw(i).call(i,"QQBrowser")?(n="qqbrowser",-1!==jw(i).call(i,"MQQBrowser")?(e=jw(i).call(i,"MQQBrowser"),r=i.substring(e+11,e+15)):-1!==jw(i).call(i,"QQBrowser")&&(e=jw(i).call(i,"QQBrowser"),r=i.substring(e+10,e+17))):-1!==jw(i).call(i,"Chrome")?-1!==(e=jw(i).call(i,"MicroMessenger"))?(n="weixin",r=i.substring(e+15,e+20)):-1!==(e=jw(i).call(i,"360"))?(n="360browser",r=i.substring(jw(i).call(i,"Chrome")+7)):-1!==jw(i).call(i,"baidubrowser")||-1!==jw(i).call(i,"BIDUBrowser")?(-1!==jw(i).call(i,"baidubrowser")?(e=jw(i).call(i,"baidubrowser"),r=i.substring(e+13,e+16)):-1!==jw(i).call(i,"BIDUBrowser")&&(e=jw(i).call(i,"BIDUBrowser"),r=i.substring(e+12,e+15)),n="baidubrowser"):-1!==(e=jw(i).call(i,"xiaomi"))?-1!==jw(i).call(i,"openlanguagexiaomi")?(n="openlanguage xiaomi",r=i.substring(e+7,e+13)):(n="xiaomi",r=i.substring(e-7,e-1)):-1!==(e=jw(i).call(i,"TTWebView"))?(n="TTWebView",r=i.substring(e+10,e+23)):(-1!==(e=jw(i).call(i,"Chrome"))||-1!==(e=jw(i).call(i,"Chrome")))&&(n="Chrome",r=i.substring(e+7)):-1!==jw(i).call(i,"Safari")?-1!==(e=jw(i).call(i,"QQ"))?(n="qqbrowser",r=i.substring(e+10,e+16)):-1!==(e=jw(i).call(i,"Safari"))&&(n="Safari",r=i.substring(e+7),-1!==(e=jw(i).call(i,"Version"))&&(r=i.substring(e+8))):-1!==(e=jw(i).call(i,"Firefox"))?(n="Firefox",r=i.substring(e+8)):-1!==(e=jw(i).call(i,"MicroMessenger"))?(n="weixin",r=i.substring(e+15,e+20)):-1!==(e=jw(i).call(i,"QQ"))?(n="qqbrowser",r=i.substring(e+3,e+8)):-1!==(e=jw(i).call(i,"Opera"))&&(n="Opera",r=i.substring(e+6),-1!==(e=jw(i).call(i,"Version"))&&(r=i.substring(e+8))),-1!==(t=jw(r).call(r,";"))&&(r=r.substring(0,t)),-1!==(t=jw(r).call(r," "))&&(r=r.substring(0,t)),-1!==(t=jw(r).call(r,")"))&&(r=r.substring(0,t)),{browser:n,browser_version:r}},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)/}],r=0;r<n.length;r++){var i=n[r];if(i.r.test(this.userAgent)){"Mac OS X"===(e=i.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?Ww(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){jw(e).call(e,"Build/")>-1&&(t=Ww(e).call(e,0,jw(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 (",""),r=jw(n).call(n,";");t=Ww(n).call(n,0,r)}}catch(i){return sT(t).call(t)}return sT(t).call(t)},e.prototype.isNewIpad=function(){return void 0!==this.userAgent&&"MacIntel"===navigator.platform&&"number"==typeof navigator.maxTouchPoints&&navigator.maxTouchPoints>1},e}(),uj=(ej=function(e,t){e.exports=function(){function e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}return function t(n,r){function i(t,i,o){if("undefined"!=typeof document){"number"==typeof(o=e({},r,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(i,t)+a}}return Object.create({set:i,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],r={},i=0;i<t.length;i++){var o=t[i].split("="),a=Ww(o).call(o,1).join("=");try{var s=decodeURIComponent(o[0]);if(r[s]=n.read(a,s),e===s)break}catch(l){}}return e?r[e]:r}},remove:function(t,n){i(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:XH(r)},converter:{value:XH(n)}})}({read:function(e){return'"'===e[0]&&(e=Ww(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:"/"})}()},ej(tj={exports:{}}),tj.exports),cj=uj,hj=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}(),fj={getItem:function(e){try{var t=localStorage.getItem(e),n=t;try{t&&"string"==typeof t&&(n=JSON.parse(t))}catch(r){}return n||{}}catch(r){}return{}},setItem:function(e,t){try{var n="string"==typeof t?t:XM(t);localStorage.setItem(e,n)}catch(r){}},removeItem:function(e){try{localStorage.removeItem(e)}catch(t){}},getCookie:function(e,t){try{return cj.get(e,{domain:t||document.domain})}catch(n){return""}},setCookie:function(e,t,n,r){try{var i=r||document.domain,o=+new Date+n;cj.set(e,t,{expires:new Date(o),path:"/",domain:i})}catch(a){}},isSupportLS:function(){try{return localStorage.setItem("_ranger-test-key","hi"),localStorage.getItem("_ranger-test-key"),localStorage.removeItem("_ranger-test-key"),!0}catch(rj){return!1}}()},dj={getItem:function(e){try{var t=sessionStorage.getItem(e),n=t;try{t&&"string"==typeof t&&(n=JSON.parse(t))}catch(r){}return n||{}}catch(r){}return{}},setItem:function(e,t){try{var n="string"==typeof t?t:XM(t);sessionStorage.setItem(e,n)}catch(r){}},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(rj){return!1}}()},pj=function(){function e(e,t){this._storage=t&&"session"===t?dj:!e&&fj.isSupportLS?fj:new hj}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,r){this._storage.setCookie(e,t,n,r)},e.prototype.removeItem=function(e){this._storage.removeItem(e)},e}(),vj={cn:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az24z1mz1jz1az1cz18z1nz1nz1jz1mz1ez4az1az1mz1k",va:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az1gz22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",sg:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k"},gj=void 0,yj=(new Date).getTimezoneOffset(),mj=Dk(""+-yj/60,10),_j=60*yj,bj=function(){function e(e,t){this.is_first_time=!0,this.initConfig=t,this.collect=e;var n=new lj(t.app_id).init(),r="__tea_cache_first_"+t.app_id;this.configKey="__tea_cache_config_"+t.app_id,this.sessionStorage=new pj(!1,"session"),this.localStorage=new pj(!1,"local");var i=this.localStorage.getItem(r);i&&1==i?this.is_first_time=!1:(this.is_first_time=!0,this.localStorage.setItem(r,"1")),this.envInfo={user:{user_unique_id:gj,user_type:gj,user_id:gj,user_is_auth:gj,user_is_login:gj,device_id:gj,web_id:gj,user_unique_id_type:gj},header:{app_id:gj,app_name:gj,app_install_id:gj,install_id:gj,app_package:gj,app_channel:gj,app_version:gj,ab_version:gj,os_name:n.os_name,os_version:n.os_version,device_model:n.device_model,ab_client:gj,traffic_type:gj,client_ip:gj,device_brand:gj,os_api:gj,access:gj,language:n.language,region:gj,app_language:gj,app_region:gj,creative_id:gj,ad_id:gj,campaign_id:gj,log_type:gj,rnd:gj,platform:n.platform,sdk_version:"0.0.3-lite",sdk_lib:"js",province:gj,city:gj,timezone:mj,tz_offset:_j,tz_name:gj,sim_region:gj,carrier:gj,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:gj,utm_content:gj,utm_source:gj,utm_medium:gj,utm_campaign:gj,custom:{},wechat_unionid:gj,wechat_openid:gj}},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 r,i=[];n=n<=25?n:n%25;var o=String.fromCharCode(n+97);r=e.split(o);for(var a=0;a<r.length;a++){var s=Dk(r[a],n);s=1*s^64;var l=String.fromCharCode(s);i.push(l)}return i.join("")}}(e,0,25)}(vj[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;zw(e).forEach((function(n){var r;"evtParams"===n?t.evtParams=$H({},t.evtParams||{},e.evtParams||{}):"_staging_flag"===n?t.evtParams=$H({},t.evtParams||{},{_staging_flag:e._staging_flag}):"reportErrorCallback"===n&&"function"==typeof e[n]?t.reportErrorCallback=e[n]:Object.hasOwnProperty.call(t.envInfo.user,n)?jw(r=["user_id","web_id","user_unique_id"]).call(r,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(XM(this.envInfo[e])):JSON.parse(XM(this.envInfo))}catch(t){console.log("get config stringify error ")}},e}();(rj=nj||(nj={})).Init="init",rj.Config="config",rj.Start="start",rj.Ready="ready",rj.TokenComplete="token-complete",rj.TokenStorage="token-storage",rj.TokenFetch="token-fetch",rj.TokenError="token-error",rj.ConfigUuid="config-uuid",rj.TokenChange="token-change",rj.TokenReset="token-reset",rj.SessionReset="session-reset",rj.SessionResetTime="session-reset-time",rj.Event="event",rj.Events="events",rj.EventNow="event-now",rj.CleanEvents="clean-events",rj.BeconEvent="becon-event";var wj=nj;function kj(e,t,n,r,i,o,a,s,l){try{var u=new XMLHttpRequest,c=s||"POST";u.open(c,""+e,!0),u.setRequestHeader("Content-Type","application/json; charset=utf-8"),n&&(u.timeout=n,u.ontimeout=function(){o&&o(t,5005)}),u.onload=function(){if(i){var e=null;if(u.responseText){try{e=JSON.parse(u.responseText)}catch(n){e={}}i(e,t)}}},u.onerror=function(){u.abort(),o&&o(t,500)},l?u.send(t):u.send(XM(t))}catch(h){}}var Ej,Sj=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 pj(!0),this.localStorage=new pj(!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(wj.Ready,(function(){n.reportAll(!1)})),this.collect.on(wj.Event,(function(e){n.event(e)})),this.collect.on(wj.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=QH(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 r=this.reportTime;this.reportTimeout=setTimeout((function(){t.report(!1),t.reportTimeout=null}),r)}}catch(i){}},e.prototype.beconEvent=function(e){var t=QH(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 r;r=Ww(e).call(e,n,n+this.eventLimit);var i=this.split(this.merge(r));this.send(i,t)}else i=this.split(this.merge(e)),this.send(i,t)},e.prototype.merge=function(e){var t=this,n=this.configManager.get(),r=n.header,i=n.user;r.custom=XM(r.custom);var o=this.configManager.get("evtParams"),a=Vw(e).call(e,(function(e){try{return zw(o).length&&(e.params=$H({},o,e.params)),e.session_id=t.collect.sessionManager.getSessionId(),e.params=XM(e.params),e}catch(rj){return e}})),s=[];if(!zw(i).length)return console.warn("user info error,cant report"),s;var l=JSON.parse(XM({events:a,user:i,header:r}));return l.local_time=Math.floor(Date.now()/1e3),l.verbose=1,s.push(l),s},e.prototype.split=function(e){return Vw(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;r=n.reportUrl,i=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(r,XM(i))||s(r,i):kj(r,i,o,0,a,s,0,"",false)}catch(l){console.warn("something error, "+XM(l.stack))}var r,i,o,a,s}))},e}(),Tj=function e(t){return t?(t^16*Math.random()>>t/4).toString(10):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e)},Cj=function(){var e;return Ww(e=Tj().replace(/-/g,"")).call(e,0,19)},xj=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 pj(!1),this.tokenKey="__tea_cache_tokens_"+t.app_id,this.collect.on(wj.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:""},r=Cj();kj(t,n,3e5,0,(function(t){var n;t&&0===t.e?n=t.web_id:(n=r,e.collect.configManager.set({localWebId:r}),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")||r,user_unique_id:e.configManager.get("user_unique_id")||r}),e.collect.configManager.set({localWebId:r}),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(wj.TokenComplete)):console.warn("token error")},e.prototype.setUuid=function(e){var t;if(e&&-1===jw(t=["null","undefined","Null","None"]).call(t,e)){var n=String(e),r=this.configManager.get("user_unique_id"),i=this.cacheToken&&this.cacheToken.user_unique_id;if(n===r&&n===i)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(wj.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}(),Pj=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)}))},Aj=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.storage=new pj(!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(wj.SessionReset,(function(){n.resetSessionId()})),this.collect.on(wj.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:Pj(),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:Pj(),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:Pj(),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:Pj(),timestamp:Date.now()},this.storage.setItem(this.sessionKey,e))},e}(),Ij=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 ij,this.Types=wj,this.adapters.fetch=kj,this.adapters.storage=pj}return e.prototype.init=function(e){var t,n,r=this;this.inited?console.log("init can be call only one time"):e&&oj(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!==jw(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 bj(this,e),this.initConfig=e,e.disable_auto_pv&&(this.disableAutoPageView=!0),this.configManager.set({app_id:e.app_id}),this.eventManager=new Sj,this.tokenManager=new xj,this.sessionManager=new Aj,Hw.all([new Hw((function(e){r.once(wj.TokenComplete,(function(){e(!0)}))})),new Hw((function(e){r.once(wj.Start,(function(){e(!0)}))}))]).then((function(){r.sdkReady=!0,r.emit(wj.Ready),console.info("appid: "+e.app_id+", userInfo:"+XM(r.configManager.get("user"))),console.info("appid: "+e.app_id+", sdk is ready, version is 0.0.3-lite, you can report now !!!"),r.pageView()})),this.tokenManager.apply(this,e),this.eventManager.apply(this,e),this.sessionManager.apply(this,e),this.emit(wj.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&&oj(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=$H({},e);t.user_unique_id;var n=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&jw(t).call(t,r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof oE){var i=0;for(r=oE(e);i<r.length;i++)jw(t).call(t,r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(t,["user_unique_id"]);t.hasOwnProperty("user_unique_id")&&this.emit(wj.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(wj.Start))},e.prototype.event=function(e,t){var n=this;try{var r=[];Array.isArray(e)?e.forEach((function(e){r.push(n.processEvent(e[0],e[1]||{}))})):r.push(this.processEvent(e,t)),r.length&&(this.emit(wj.Event,r),this.emit(wj.SessionResetTime))}catch(i){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(wj.BeconEvent,n),this.emit(wj.SessionResetTime))}},e.prototype.processEvent=function(e,t){void 0===t&&(t={});try{var n=e;/^event\./.test(e)&&(n=Ww(e).call(e,6));var r=t;"object"!=Tc(r)&&(r={}),r.event_index=aj();var i=void 0;return r.local_ms?(i=r.local_ms,delete r.local_ms):i=+new Date,{event:n,params:r,local_time_ms:i}}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=$H({},t,e);this.event("predefine_pageview",n)},e}(),Rj=new Ij("default"),Oj=new Uint8Array(16);function Mj(){if(!Ej&&!(Ej="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ej(Oj)}for(var Dj=[],Lj=0;Lj<256;++Lj){var Fj;Dj.push(Ww(Fj=(Lj+256).toString(16)).call(Fj,1))}var Nj={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Uj(e,t,n){if(Nj.randomUUID&&!t&&!e)return Nj.randomUUID();var r=(e=e||{}).random||(e.rng||Mj)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Dj[e[t+0]]+Dj[e[t+1]]+Dj[e[t+2]]+Dj[e[t+3]]+"-"+Dj[e[t+4]]+Dj[e[t+5]]+"-"+Dj[e[t+6]]+Dj[e[t+7]]+"-"+Dj[e[t+8]]+Dj[e[t+9]]+"-"+Dj[e[t+10]]+Dj[e[t+11]]+Dj[e[t+12]]+Dj[e[t+13]]+Dj[e[t+14]]+Dj[e[t+15]]}(r)}var Bj="veplayer_live_device_id",Vj="veplayer_live_user_id",Hj=function(e){return Math.floor((9*Math.random()+1)*Math.pow(10,e-1)).toString()},jj=function(e){var t=DN.getUrlObject(e);return t?null!=t&&t.searchParams.get("_session_id")?e:DN.appendSearchParams(e,{_session_id:zj()}):null!=e?e:""},zj=function(){return Uj().replace(/-/g,"")+"."+Date.now()+"."+function(e){for(var t=0,n=0,r=(e+="").length,i=0;i<r;i++)((t=31*t+e.charCodeAt(n++))>0x7fffffffffff||t<-0x800000000000)&&(t&=0xffffffffffff);return t<0&&(t+=0x7ffffffffffff),t}(Uj().replace(/-/g,""))},Wj=function(e){NP(n,e);var t=VP(n);function n(){var e,r;Ry(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Ny(xP(r=t.call.apply(t,Bm(e=[this]).call(e,o))),"_liveLogger",void 0),r}return Fy(n,[{key:"beforeCreate",value:function(e){var t,n,r,i;e.config.enable&&(e.config.userId=(null===(t=e.config)||void 0===t?void 0:t.userId)||((r=localStorage.getItem(Vj))||(r=Hj(12),localStorage.setItem(Vj,r),r)),e.config.deviceId=(null===(n=e.config)||void 0===n?void 0:n.deviceId)||((i=localStorage.getItem(Bj))||(i=Hj(11),localStorage.setItem(Bj,i),i)))}},{key:"afterCreate",value:function(){this.config.enable&&this.open()}},{key:"destroy",value:function(){this.close()}},{key:"close",value:function(){var e;null===(e=this._liveLogger)||void 0===e||e.destroy(!1),this._liveLogger=void 0}},{key:"open",value:function(){this._liveLogger||(this._start(),this.config.showUserIdInErrorPanel&&this.player.plugins.error&&(this.player.plugins.error.config.extraTips=[{label:"userId",value:null==Rj?void 0:Rj.getConfig("user_unique_id")}]))}},{key:"_createTea",value:function(){Rj.init({app_id:468759,channel:"cn"}),Rj.start(),Rj.config({user_unique_id:this.config.userId,device_id:this.config.deviceId})}},{key:"_start",value:function(){this._createTea(),this._liveLogger=new VH({Tea:Rj,player:this.player,aid:this.config.appId||654925,project_key:this.config.appId,app_name:this.config.appName||this.config.appId,user_id:this.config.userId,device_id:this.config.deviceId,error_report_stop:!0,ext:{veplayer_version:"2.7.1-rc.1",flv_version:"3.0.21-rc.21",hls_version:"3.0.21-rc.21",rts_version:"0.2.1-alpha.14"}})}}],[{key:"pluginName",get:function(){return"logger"}},{key:"defaultConfig",get:function(){return{appId:654925,enable:!0,showUserIdInErrorPanel:!0}}}]),n}(Rx);function Kj(e,t){return"number"!=typeof e?"-":t?t(e):e.toString()}var Gj=function(e){NP(n,e);var t=VP(n);function n(){var e,r;Ry(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Ny(xP(r=t.call.apply(t,Bm(e=[this]).call(e,o))),"_pollTimer",void 0),Ny(xP(r),"_visible",void 0),Ny(xP(r),"_playPlugin",void 0),r}return Fy(n,[{key:"_streamType",get:function(){return DN.getStreamType(this.player.config.url)}},{key:"afterCreate",value:function(){var e=this;this._playPlugin=this.player.plugins[this._streamType],this.player.on(cH.ERROR,(function(){return e.close()})),this.config.visible&&this.player.once(cH.LOADED_DATA,(function(){return e.open()}))}},{key:"open",value:function(){var e;this._visible||(LD(e=["flv","hls"]).call(e,this._streamType)?this.player.plugins[this._streamType]?(this.root.style.display="block",this._tick(),this._visible=!0):console.warn("不支持或未加载".concat(this._streamType,"插件")):console.warn("仅支持flv和hls格式的信息展示"))}},{key:"close",value:function(){this._visible&&(clearTimeout(this._pollTimer),this.root.innerHTML="",this.root.style.display="none",this._visible=!1)}},{key:"destroy",value:function(){var e=this;this.close(),this.player.off(cH.LOADED_DATA,(function(){return e.open()})),this.player.off(cH.ERROR,(function(){return e.close()}))}},{key:"render",value:function(){return'\n <xg-live-panel class="veplayer-live-panel">\n </xg-live-panel>\n '}},{key:"_tick",value:function(){var e=this;clearTimeout(this._pollTimer),this._renderPanel(),this._pollTimer=window.setTimeout((function(){e._tick()}),this.config.interval)}},{key:"_getStats",value:function(){var e;return null===(e=this._playPlugin)||void 0===e?void 0:e.getStats()}},{key:"_getPanelData",value:function(){var e,t,n,r,i,o=this._getStats()||{},a="".concat(this._streamType,"_live"),s=this._playPlugin.softDecode,l=[(e=Dm(Dm({},o),{},{format:a}),{rows:[{key:"format",labelTextKey:"FORMAT",value:null!==(t=null==e?void 0:e.format)&&void 0!==t?t:"-"},{key:"fps",labelTextKey:"FPS",value:Kj(e.fps,(function(e){return"".concat(e," fps")}))},{key:"bitrate",labelTextKey:"BITRATE",value:Kj(e.bitrate,(function(e){return"".concat((e/1e3).toFixed(2)," kbps")}))},{key:"gop",labelTextKey:"GOP",value:Kj(e.gop,(function(e){return"".concat(e," frames")}))},{key:"resolution",labelTextKey:"RESOLUTION",value:Bm(n="".concat(Kj(e.width)," * ")).call(n,Kj(e.height))},{key:"encodeType",labelTextKey:"ENCODE_TYPE",value:null!==(r=e.encodeType)&&void 0!==r?r:"-"},{key:"bufferEnd",labelTextKey:"BUFFER_END",value:Kj(Number(null===(i=e.bufferEnd)||void 0===i?void 0:i.toFixed(2)))},{key:"currentTime",labelTextKey:"CURRENT_TIME",value:Kj(e.currentTime,(function(e){return e.toFixed(4)+"s"}))}]})];return s&&l.push(function(e){return{titleTextKey:"DECODE_INFO",rows:[{key:"decodeEfficiency",labelTextKey:"DECODE_EFFICIENCY",value:Kj(e.decodeFps,(function(e){return e+" frames/s"}))},{key:"decodeCost",labelTextKey:"DECODE_COST",value:Kj(e.decodeFps,(function(e){return(e?(1e3/e).toFixed():0)+"ms"}))}]}}(o)),l}},{key:"_renderPanel",value:function(){var e=this,t=this._getPanelData(),n=this.root;n&&(n.innerHTML="",t.forEach((function(t){e._renderGroup(n,t)})))}},{key:"_renderGroup",value:function(e,t){var n=this,r=t.title,i=t.titleTextKey,o=t.rows,a=this.player.config.i18nManager;if(r||i){var s,l=this._genTitleDom(null!==(s=a.getText(i))&&void 0!==s?s:r);e.appendChild(l)}o.forEach((function(t){var r=n._genRowDom(t);e.appendChild(r)}))}},{key:"_genTitleDom",value:function(e){var t=ZT.createDom("xg-live-panel","",void 0,"veplayer-live-panel-row"),n=ZT.createDom("xg-live-panel",e,void 0,"veplayer-live-panel-row-title");return t.appendChild(n),t}},{key:"_genRowDom",value:function(e){var t=this.player.config.i18nManager,n=ZT.createDom("veplayer-live-panel-row","",void 0,"veplayer-live-panel-row"),r=ZT.createDom("xg-live-panel",t.getText(e.labelTextKey),void 0,"veplayer-live-panel-row-label");n.appendChild(r);var i=ZT.createDom("xg-live-panel",e.value);return n.appendChild(i),n}}],[{key:"pluginName",get:function(){return"infoPanel"}},{key:"defaultConfig",get:function(){return{visible:!1,interval:500}}}]),n}(Rx),qj="https://www.volcengine.com/docs/6469/138655#日志上报",Yj=Dm(Dm({},lU),{},{INVALID_PARAMETER:"The imported parameter is empty, please pass in necessary parameters such as the stream address",INVALID_LOGGER:"Log options not configured correctly. Please refer to this document ".concat(qj," to configure the logs."),EMPTY_RTM_FALLBACK_PARAMETER:"Fallback URL for RTM is not configured. Please set enableFallback: false to disable fallback, or configure fallbackUrl for FLV and HLS formats based on the browser environment.",FORMAT:"format",FPS:"fps",BITRATE:"bitrate",GOP:"gop",RESOLUTION:"resolution",ENCODE_TYPE:"encodeType",BUFFER_END:"bufferEnd",CURRENT_TIME:"currentTime",DECODE_EFFICIENCY:"efficiency",DECODE_COST:"cost",DECODE_INFO:"decodeInfo",REFRESH:"refresh"}),Xj=Dm(Dm({},uU),{},{INVALID_PARAMETER:"入参为空,请传入流地址等必要参数",INVALID_LOGGER:"未正确配置质量日志参数, 请参考 ".concat(qj," 配置"),EMPTY_RTM_FALLBACK_PARAMETER:"未配置 RTM 降级地址 fallbackUrl,请设置 enableFallback: false 取消降级或根据浏览器环境配置 FLV、HLS 格式降级地址",FORMAT:"格式",FPS:"帧率",BITRATE:"码率",GOP:"GOP",RESOLUTION:"视频分辨率",ENCODE_TYPE:"编码方式",BUFFER_END:"Buffer 水位",CURRENT_TIME:"播放进度",DECODE_EFFICIENCY:"解码效率",DECODE_COST:"解码消耗",DECODE_INFO:"软解信息",REFRESH:"刷新"}),$j="hls",Jj="ll-hls",Qj="flv",Zj="rtm",ez="ll-flv",tz=DN.isMMSSupported,nz=DN.isMseSupported;function rz(){return aC.os.isIos}function iz(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.H264;return(rz()?tz:nz)(e)}var oz=function(e){return e.Error="Error",e.Stall="Stall",e}(oz||{}),az=function(){function e(t){Ry(this,e),Ny(this,"nextProtocol",void 0),Ny(this,"preProtocol",void 0),Ny(this,"protocolStrategy",void 0),Ny(this,"_fallback",void 0),this._fallback=t.fallback}return Fy(e,[{key:"_getKindFallbackStrategy",value:function(e){var t,n,r,i,o;return null!==(t=null!==(n=null===(r=this._fallback)||void 0===r||null===(r=r.fallbackStrategy)||void 0===r||null===(r=r[this.protocolType])||void 0===r?void 0:r[e])&&void 0!==n?n:null===(i=this._fallback)||void 0===i||null===(i=i.fallbackStrategy)||void 0===i||null===(i=i.all)||void 0===i?void 0:i[e])&&void 0!==t?t:null===(o=this.defaultFallbackStrategy)||void 0===o?void 0:o[e]}},{key:"errorFallbackStrategy",get:function(){return this._getKindFallbackStrategy("Error")}},{key:"stallFallbackStrategy",get:function(){return this._getKindFallbackStrategy("Stall")}},{key:"shouldFallbackWhenError",value:function(e){var t,n,r,i;return null!==(t=this.errorFallbackStrategy)&&void 0!==t&&t.shouldFallback?null===(r=this.errorFallbackStrategy)||void 0===r?void 0:r.shouldFallback(this.protocolType,e):!(null===(n=this.errorFallbackStrategy)||void 0===n||!n.excludeList)&&!LD(i=this.errorFallbackStrategy.excludeList).call(i,e.error.errorCode)}}]),e}(),sz=DN.appendSearchParams,lz=function(){var e=sy(oy().mark((function e(n){var r,i,o,a,s,l,u,c,h,f,d,p,v,g,y,m,_,b,w,k,E;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return p=null==n||null===(r=n.flv)||void 0===r?void 0:r.enableLowLatency,v=null===(i=null==n||null===(o=n.flv)||void 0===o||null===(o=o.lowLatency)||void 0===o?void 0:o.enableFrameChasing)||void 0===i||i,g=null!==(a=null==n||null===(s=n.flv)||void 0===s||null===(s=s.lowLatency)||void 0===s?void 0:s.abrPts)&&void 0!==a?a:"-800",e.next=5,MV(n);case 5:return y=e.sent,e.next=8,NV(n,y);case 8:if(e.sent&&(d=y===t.H265?OV():RV(),f=PV(n)),iz("unknown"===y?t.H264:y)&&(f=rz()?AV(n):PV(n)),f||d){e.next=13;break}return e.abrupt("return",{});case 13:return e.next=15,Hw.all([(null===(l=f)||void 0===l?void 0:l.module)&&mN(f.module).catch((function(){})),(null===(u=d)||void 0===u?void 0:u.module)&&mN(d.module).catch((function(){}))]);case 15:return m=e.sent,_=HD(m,2),b=_[0],(null==(w=_[1])?void 0:w.XGVideoPlugin)&&(null===(c=d)||void 0===c||null===(h=c.afterLoad)||void 0===h||h.call(c,null==w?void 0:w.XGVideoPlugin)),k=BV([f,d]),E=[],p&&(k.url=sz(n.url,{abr_pts:g})),b&&(E.push(b.FlvPlugin),p&&v&&E.push(b.Adaptive)),e.abrupt("return",{options:k,plugins:E});case 25:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),uz=function(e){NP(o,e);var t,n,r,i=VP(o);function o(){return Ry(this,o),i.apply(this,arguments)}return Fy(o,[{key:"protocolType",get:function(){return Qj}},{key:"defaultFallbackStrategy",get:function(){return{}}},{key:"canPlay",value:(r=sy(oy().mark((function e(){return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{canPlay:iz()});case 1:case"end":return e.stop()}}),e)}))),function(){return r.apply(this,arguments)})},{key:"shouldFallbackWhenStall",value:function(){return!1}},{key:"getProtocolStrategy",value:(n=sy(oy().mark((function e(t,n){var r;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.enableSelector,e.abrupt("return",lz(r?Dm(Dm({},t),{},{flv:Dm(Dm({},t.flv),{},{enableLowLatency:!1})}):t));case 2:case"end":return e.stop()}}),e)}))),function(e,t){return n.apply(this,arguments)})},{key:"getAbrStrategy",value:(t=sy(oy().mark((function e(t){var n,r,i,o;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=null==t||null===(n=t.flv)||void 0===n?void 0:n.abr){e.next=3;break}return e.abrupt("return",{});case 3:return e.next=5,mN(ML.PluginAbr).catch((function(){}));case 5:return o=e.sent,e.abrupt("return",{options:{abr:Dm(Dm({},i),{},{open:null===(r=i.enable)||void 0===r||r})},plugins:[null==o?void 0:o.AbrPlugin]});case 7:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"getDrmStrategy",value:function(){}}],[{key:"suffix",get:function(){return".flv"}},{key:"generateUrl",value:function(e,t){var n,r=t.generateUrlFromOtherProtocol;return null!==(n=e[Qj])&&void 0!==n?n:r()}},{key:"canGenerateOtherProtocol",value:function(){return!0}}]),o}(az),cz=function(e){NP(r,e);var t,n=VP(r);function r(){return Ry(this,r),n.apply(this,arguments)}return Fy(r,[{key:"protocolType",get:function(){return ez}},{key:"getProtocolStrategy",value:(t=sy(oy().mark((function e(t){return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",lz(Dm(Dm({},t),{},{flv:Dm(Dm({},t.flv),{},{enableLowLatency:!0})})));case 1:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})}]),r}(uz),hz=function(e){return e.Fairplay="fairplay",e}(hz||{});function fz(e){if(null!=e&&e.fairplay&&("safari"===aC.browser||aC.os.isIos))return"fairplay"}function dz(e){var t=e.drm,n=e.streamType,r=fz(t);return!r||("fairplay"!==r||"hls"!==n)}var pz=DN.isMseSupported;function vz(e){var t,n;return!(null==e||null===(t=e.hls)||void 0===t||!t.enableHlsJs)||"ssai"===(null==e||null===(n=e.ad)||void 0===n?void 0:n.adType)}var gz=function(){var e=sy(oy().mark((function e(n){var r,i,o,a,s,l,u,c,h,f,d,p,v,g,y;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(dz({drm:n.drm,streamType:"hls"})){e.next=2;break}return e.abrupt("return",{options:{},plugins:[]});case 2:return e.next=4,MV(n);case 4:return c=e.sent,e.next=7,NV(n,c);case 7:if(h=e.sent,f=vz(n),h&&(u=c===t.H265?OV():RV(),l=IV(n,f)),("mobile"!==aC.device||null!=n&&null!==(r=n.hls)&&void 0!==r&&r.enableMSE)&&pz("unknown"===c?t.H264:c)&&(l=IV(n,f)),l||u){e.next=13;break}return e.abrupt("return",{});case 13:return e.next=15,Hw.all([(null===(i=l)||void 0===i?void 0:i.module)&&mN(l.module).catch((function(){})),(null===(o=u)||void 0===o?void 0:o.module)&&mN(u.module).catch((function(){}))]);case 15:return d=e.sent,p=HD(d,2),v=p[0],(null==(g=p[1])?void 0:g.XGVideoPlugin)&&(null===(a=u)||void 0===a||null===(s=a.afterLoad)||void 0===s||s.call(a,null==g?void 0:g.XGVideoPlugin)),y=BV([l,u]),e.abrupt("return",{options:y,plugins:null!=v&&v.HlsPlugin?[v.HlsPlugin]:[]});case 22:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function yz(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function mz(e){return uL(e).call(e,(function(e,t){var n,r,i=uL(n=t.definitions).call(n,(function(e,t){var n=function(e){return"string"==typeof e?ON(e):e.type?e.type:ON(e.url)}(t);return yz(e,n,t),e}),{});return Vw(r=zw(i)).call(r,(function(n){yz(e,n,Dm(Dm({},t),{},{definitions:i[n]}))})),e}),{})}function _z(e,t){var n=[];return null==e||e.forEach((function(e){var r=[];e.definitions.forEach((function(e){var n;"string"==typeof e?r.push(t(e)):r.push(Dm(Dm({},e),{},{url:t(e.url),fallbackUrls:null===(n=e.fallbackUrls)||void 0===n?void 0:Vw(n).call(n,(function(e){return t(e)}))}))})),n.push(Dm(Dm({},e),{},{definitions:r}))})),n}var bz=["getDrmConfig"],wz=function(){var e=sy(oy().mark((function e(t,n){var r,i,o,a,s,l,u,c,h,f,d;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=fz(t.drm),!t.url||r!==hz.Fairplay){e.next=18;break}return e.prev=2,a=null!==(i=null==t||null===(o=t.drm)||void 0===o?void 0:o.fairplay)&&void 0!==i?i:{},s=a.getDrmConfig,l=tm(a,bz),e.next=6,Hw.all([mN(ML.PluginDrm).then((function(e){return e.DrmPlugin})).catch((function(){})),null==s?void 0:s({url:t.url})]);case 6:return u=e.sent,c=HD(u,2),h=c[0],f=c[1],d=iE({},l,null==t?void 0:t.drm,f),f&&(null==n||n.updateDrmConfig(f)),e.abrupt("return",{options:{drm:d},plugins:h?[h]:[]});case 15:e.prev=15,e.t0=e.catch(2),console.log(e.t0);case 18:return e.abrupt("return",{});case 19:case"end":return e.stop()}}),e,null,[[2,15]])})));return function(t,n){return e.apply(this,arguments)}}(),kz=function(e){NP(o,e);var t,n,r,i=VP(o);function o(){return Ry(this,o),i.apply(this,arguments)}return Fy(o,[{key:"protocolType",get:function(){return $j}},{key:"defaultFallbackStrategy",get:function(){return{}}},{key:"canPlay",value:(r=sy(oy().mark((function e(){return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{canPlay:!0});case 1:case"end":return e.stop()}}),e)}))),function(){return r.apply(this,arguments)})},{key:"shouldFallbackWhenStall",value:function(){return!1}},{key:"getProtocolStrategy",value:(n=sy(oy().mark((function e(t){return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",gz(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return n.apply(this,arguments)})},{key:"getAbrStrategy",value:(t=sy(oy().mark((function e(t){var n,r,i,o;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=null==t||null===(n=t.hls)||void 0===n?void 0:n.abr){e.next=3;break}return e.abrupt("return",{});case 3:return e.next=5,mN(ML.PluginAbr).catch((function(){}));case 5:return o=e.sent,e.abrupt("return",{options:{hlsabr:Dm(Dm({},i),{},{open:null===(r=i.enable)||void 0===r||r})},plugins:[null==o?void 0:o.HlsAbrPlugin]});case 7:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"getDrmStrategy",value:function(e,t){return wz(e,t)}}],[{key:"suffix",get:function(){return".m3u8"}},{key:"canGenerateOtherProtocol",value:function(){return!0}},{key:"generateUrl",value:function(e,t){var n=t.generateUrlFromOtherProtocol;return e[$j]?e[$j]:e[Jj]?_z(e[Jj],(function(e){return DN.appendSearchParams(e,{fpkey_normal_hls:"1"})})):n()}}]),o}(az),Ez=function(e){NP(i,e);var t,n,r=VP(i);function i(){return Ry(this,i),r.apply(this,arguments)}return Fy(i,[{key:"protocolType",get:function(){return Jj}},{key:"defaultFallbackStrategy",get:function(){return{}}},{key:"canPlay",value:(n=sy(oy().mark((function e(){return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{canPlay:!0});case 1:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})},{key:"shouldFallbackWhenStall",value:function(){return!1}},{key:"getProtocolStrategy",value:(t=sy(oy().mark((function e(t){return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",gz(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"getAbrStrategy",value:function(){}},{key:"getDrmStrategy",value:function(){}}],[{key:"suffix",get:function(){return".m3u8"}},{key:"generateUrl",value:function(e){return e[Jj]}},{key:"canGenerateOtherProtocol",value:function(){return!0}}]),i}(az);function Sz(){return Tz.apply(this,arguments)}function Tz(){return(Tz=sy(oy().mark((function e(){var t,n;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,mN(ML.PluginRtm);case 2:return t=e.sent,n=t.RtmPlugin,e.abrupt("return",n.isSupported());case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Cz(){return xz.apply(this,arguments)}function xz(){return xz=sy(oy().mark((function e(){var t,n,r,i=arguments;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.length>0&&void 0!==i[0]?i[0]:zz.H264,e.next=3,mN(ML.PluginRtm);case 3:if(n=e.sent,r=n.RtmPlugin,t!==zz.H264){e.next=7;break}return e.abrupt("return",r.isSupportedH264());case 7:return e.abrupt("return",!1);case 8:case"end":return e.stop()}}),e)}))),xz.apply(this,arguments)}var Pz=["fallbackUrl","enableRTMAutoTranscode"],Az={options:{},module:ML.PluginRtm},Iz=function(e){return"pc"===aC.device?e.replace(".sdp",".flv"):e.replace(".sdp",".m3u8")},Rz=function(){var e=sy(oy().mark((function e(n,r,i){var o,a,s,l,u,c,h,f,d,p,v,g,y,m,_,b,w,k,E,S,T,C,x,P,A;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u="",c=n.url,h=n.playlist,f=n.rtm||{},d=f.fallbackUrl,p=f.enableRTMAutoTranscode,v=tm(f,Pz),g=n.rtm||{},y=g.enableFallback,m=void 0===y||y,null!=h&&h.length&&(m=!1),_=p||"true"===(null===(o=bN(c))||void 0===o?void 0:o.searchParams.get("enableRTMAutoTranscode")),m&&(d?u=d:_&&c?u=Iz(c):console.warn(WV(jV.EMPTY_RTM_FALLBACK_PARAMETER,i).message)),"flv"===(b=u&&DN.getStreamType(u))&&DN.isMseSupported(t.H264)?l=PV(n):"hls"===b&&("mobile"!==aC.device||null!=n&&null!==(a=n.hls)&&void 0!==a&&a.enableMSE)&&DN.isMseSupported(t.H264)&&(l=IV(n)),e.next=11,Hw.all([mN(Az.module).then((function(e){return e.RtmPlugin})).catch((function(){})),l&&mN(l.module).then((function(e){var t,n;return(null===(t=l)||void 0===t?void 0:t.module)===ML.PluginFlv?e.FlvPlugin:(null===(n=l)||void 0===n?void 0:n.module)===ML.PluginHls?e.HlsPlugin:void 0})).catch((function(){}))]);case 11:if(w=e.sent,k=HD(w,2),E=k[0],S=k[1],!u){e.next=25;break}return e.next=18,Hw.all([Sz(),Cz()]);case 18:if(T=e.sent,C=HD(T,2),x=C[0],P=C[1],x&&P){e.next=25;break}return r&&r.emit("degrade",{url:u,originRtmUrl:c,code:"NOT_SUPPORT",message:"not support rtm or h264",isRTMSupported:x,isRTMSupportCodec:P}),e.abrupt("return",{options:Dm(Dm({},(null===(A=l)||void 0===A?void 0:A.options)||{}),{},{url:u,_RTMdegrade:{_originRtmUrl:c,_isRTMSupported:x,_isRTMSupportCodec:P}}),plugins:S?[S]:[]});case 25:return e.abrupt("return",{options:Dm(Dm({},(null===(s=l)||void 0===s?void 0:s.options)||{}),{},{url:p?DN.appendSearchParams(c,{enableRTMAutoTranscode:"true"}):void 0,_RTMdegrade:void 0,rts:Dm(Dm({retryCount:0},v),{},{backupURL:u,backupConstruct:S})}),plugins:E?[E]:[]});case 26:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),Oz=function(e){NP(i,e);var t,n,r=VP(i);function i(){return Ry(this,i),r.apply(this,arguments)}return Fy(i,[{key:"protocolType",get:function(){return Zj}},{key:"defaultFallbackStrategy",get:function(){return Ny({},oz.Error,{shouldFallback:function(){return!0}})}},{key:"canPlay",value:(n=sy(oy().mark((function e(){var t,n,r,i;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Hw.all([Sz(),Cz()]);case 2:return t=e.sent,n=HD(t,2),r=n[0],i=n[1],e.abrupt("return",{canPlay:r&&i});case 7:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})},{key:"shouldFallbackWhenStall",value:function(){return!1}},{key:"getProtocolStrategy",value:(t=sy(oy().mark((function e(t,n){var r,i,o;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.player,i=n.i18n,o=n.enableSelector,e.next=3,Rz(o?{options:t,rtm:Dm(Dm({},t.rtm),{},{enableFallback:!1})}:t,r,i);case 3:return this.protocolStrategy=e.sent,e.abrupt("return",this.protocolStrategy);case 5:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})},{key:"getAbrStrategy",value:function(){}},{key:"getDrmStrategy",value:function(){}}],[{key:"suffix",get:function(){return".sdp"}},{key:"canGenerateOtherProtocol",value:function(e){var t;return null===(t=e.rtm)||void 0===t?void 0:t.enableRTMAutoTranscode}},{key:"generateUrl",value:function(e,t){var n,r=t.generateUrlFromOtherProtocol,i=t.options;return e[Zj]?e[Zj]:null!==(n=i.rtm)&&void 0!==n&&n.enableRTMAutoTranscode?r():void console.warn("生成 rtm 地址失败。请传入 rtm 播放地址,或开启自动转码")}}]),i}(az),Mz=function(){function e(t){var n=t.queue,r=t.streams,i=t.options;Ry(this,e),Ny(this,"current",void 0),Ny(this,"_queue",void 0),Ny(this,"_streams",void 0),Ny(this,"_options",void 0),this._queue=n,this._streams=r,this._options=i,this.current=this._getStartProtocol()}var t;return Fy(e,[{key:"getProtocol",value:(t=sy(oy().mark((function e(){var t;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.current){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.current.canPlay();case 4:if(e.t1=t=e.sent,e.t0=null!==e.t1,!e.t0){e.next=8;break}e.t0=void 0!==t;case 8:if(!e.t0){e.next=12;break}e.t2=t,e.next=13;break;case 12:e.t2={};case 13:if(!e.t2.canPlay){e.next=17;break}return e.abrupt("return",this.current);case 17:return this.next(),e.abrupt("return",this.getProtocol());case 19:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"next",value:function(){var e;this.current=null===(e=this.current)||void 0===e?void 0:e.nextProtocol}},{key:"_getStartProtocol",value:function(){for(var e,t=this._queue.length-1;t>=0;t--){var n=this._queue[t],r=this._streams[n];r&&(e&&(e.preProtocol=r,r.nextProtocol=e),e=r)}return e}}]),e}(),Dz=function(e){NP(n,e);var t=VP(n);function n(e){var r=e.streams,i=e.options;return Ry(this,n),t.call(this,{queue:n.queue,streams:r,options:i})}return Fy(n)}(Mz);Ny(Dz,"queue",[Zj,ez,Qj,Jj,$j]);var Lz,Fz=function(e){NP(n,e);var t=VP(n);function n(e){var r,i=e.streams,o=e.options;return Ry(this,n),t.call(this,{queue:null===(r=o.fallback)||void 0===r?void 0:r.fallbackOrder,streams:i,options:o})}return Fy(n)}(Mz);Ny(Fz,"queue",void 0);var Nz=function(){function e(t){Ry(this,e),Ny(this,"_options",void 0),Ny(this,"_selector",void 0),Ny(this,"_protocol",void 0),Ny(this,"_playlistMap",{}),this._options=t,this._init({url:t.url,playlist:t.playlist})}var t,n,r,i,o;return Fy(e,[{key:"enableSelector",get:function(){return!!this._selector}},{key:"protocol",get:function(){return this._protocol}},{key:"playlist",get:function(){var e;return null!==(e=this._protocol)&&void 0!==e&&e.protocolType&&this._playlistMap?this._playlistMap[this._protocol.protocolType]:void 0}},{key:"getProtocol",value:(o=sy(oy().mark((function e(){return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._selector){e.next=4;break}return e.next=3,this._selector.getProtocol();case 3:this._protocol=e.sent;case 4:return e.abrupt("return",this._protocol);case 5:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"update",value:(i=sy(oy().mark((function e(t){var n,r;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.url,r=t.playlist,this._options=Dm(Dm({},this._options),{},{url:n,playlist:r}),this._init({url:n,playlist:r}),e.next=5,this.getProtocol();case 5:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"next",value:(r=sy(oy().mark((function e(){return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._selector){e.next=2;break}return e.abrupt("return");case 2:return this._selector.next(),e.next=5,this.getProtocol();case 5:return e.abrupt("return",this._protocol);case 6:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"getStrategy",value:(n=sy(oy().mark((function e(t,n){var r,i,o,a,s,l,u,c,h,f,d,p,v,g,y,m,_,b,w;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=this._protocol,e.next=3,Hw.all([null==s?void 0:s.getProtocolStrategy(this._options,{player:t,i18n:n,enableSelector:!!this._selector}),null==s||null===(r=s.getDrmStrategy)||void 0===r?void 0:r.call(s,this._options,t),null==s||null===(i=s.getAbrStrategy)||void 0===i?void 0:i.call(s,this._options)]);case 3:return l=e.sent,u=HD(l,3),c=u[0],h=u[1],f=u[2],p=(d=null!=c?c:{}).options,v=d.plugins,y=(g=null!=h?h:{}).options,m=g.plugins,b=(_=null!=f?f:{}).options,w=_.plugins,e.abrupt("return",{options:iE({},p,y,b),plugins:Bm(o=[]).call(o,Iy(null!=v?v:[]),Iy(null!=m?m:[]),Iy(null!=w?w:[])),useSrc:!(null!=c&&null!==(a=c.plugins)&&void 0!==a&&a.length),protocol:null==s?void 0:s.protocolType});case 12:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"_init",value:function(t){var n=t.url,r=t.playlist;if(r){var i,o,a=mz(r),s="low"===this._options.latencyMode?Dz:Fz,l=null!==(i=null==s?void 0:s.queue)&&void 0!==i?i:null===(o=this._options.fallback)||void 0===o?void 0:o.fallbackOrder;if(null!=l&&l.length){var u=e._generateProtocolMap(l,a,this._options),c=u.protocolMap,h=u.playlistMap;return this._playlistMap=h,void(this._selector=new s({streams:c,options:this._options}))}this._playlistMap=a,this._initSingleProtocol(zw(a)[0])}else n&&this._initSingleProtocol(ON(n))}},{key:"_initSingleProtocol",value:function(t){t&&(this._protocol=new e._protocolMap[t](this._options))}}],[{key:"create",value:(t=sy(oy().mark((function t(n){var r;return oy().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=new e(n),t.next=3,r.getProtocol();case 3:return t.abrupt("return",r);case 4:case"end":return t.stop()}}),t)}))),function(e){return t.apply(this,arguments)})},{key:"_generateProtocolMap",value:function(t,n,r){var i={},o={},a=Ym(t).call(t,(function(t){return e._protocolMap[t].canGenerateOtherProtocol(r)&&n[t]}));return t.forEach((function(t){var s,l,u=null!==(s=null===(l=e._protocolMap[t])||void 0===l?void 0:l.generateUrl(n,{generateUrlFromOtherProtocol:function(){if(a)return function(e,t,n){return _z(e,(function(e){return e.replace(t,n)}))}(n[a],e._protocolMap[a].suffix,e._protocolMap[t].suffix)},options:r}))&&void 0!==s?s:n[t];u&&(o[t]=u,i[t]=new e._protocolMap[t](r))})),{protocolMap:i,playlistMap:o}}}]),e}();Ny(Nz,"_protocolMap",(Ny(Lz={},Qj,uz),Ny(Lz,ez,cz),Ny(Lz,$j,kz),Ny(Lz,Jj,Ez),Ny(Lz,Zj,Oz),Lz));var Uz,Bz=function(){function e(){var t=this;Ry(this,e),Ny(this,"player",void 0),Ny(this,"protocolManager",void 0),Ny(this,"beforeFallbackError",function(){var e=sy(oy().mark((function e(n){var r,i,o,a;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(r=t.protocolManager)&&void 0!==r&&null!==(r=r.protocol)&&void 0!==r&&r.shouldFallbackWhenError({error:n})&&null!==(i=t.protocolManager)&&void 0!==i&&null!==(i=i.protocol)&&void 0!==i&&i.nextProtocol){e.next=2;break}return e.abrupt("return",{canEmitError:!0});case 2:return e.next=4,null===(o=t.protocolManager)||void 0===o?void 0:o.next();case 4:if(e.sent&&null!==(a=t.protocolManager)&&void 0!==a&&a.playlist){e.next=7;break}return e.abrupt("return",{canEmitError:!0});case 7:return t.fallback(),e.abrupt("return",{canEmitError:!1});case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}var t;return Fy(e,[{key:"initErrorFallback",value:function(e,t){this.player=e,this.protocolManager=t}},{key:"fallback",value:(t=sy(oy().mark((function e(){var t,n,r,i,o,a;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(t=this.protocolManager)&&void 0!==t&&t.playlist){e.next=2;break}return e.abrupt("return");case 2:o=null===(n=this.player)||void 0===n?void 0:n.definition,a=null===(r=this.player)||void 0===r?void 0:r.source,null===(i=this.player)||void 0===i||i.updatePlaylist(this.protocolManager.playlist,{definition:o,source:a},!1);case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),Vz=new Bz;cU.extend([{LANG:"zh-cn",TEXT:Xj},{LANG:"en",TEXT:Yj}]);var Hz={autoplay:{muted:!0}},jz=Bm(Uz=[]).call(Uz,Iy(tU),[dH,Wj,Gj]),zz=function(e){return e.H264="h264",e}(zz||{}),Wz=function(e){NP(i,e);var t,n,r=VP(i);function i(e){var t;return Ry(this,i),Ny(xP(t=r.call(this,e)),"_protocolManager",void 0),t}return Fy(i,[{key:"playTime",get:function(){var e;if(null===(e=this._player)||void 0===e||null===(e=e.played)||void 0===e||!e.length)return 0;for(var t=this._player.played.length,n=0,r=0;r<t;r++){var i,o,a=null===(i=this._player)||void 0===i?void 0:i.played.start(r);n+=(null===(o=this._player)||void 0===o?void 0:o.played.end(r))-a}return n}},{key:"ad",get:function(){var e;return null===(e=this._player.plugins)||void 0===e||null===(e=e.ad)||void 0===e?void 0:e.adManager}},{key:"openLog",value:function(){var e;null===(e=this._player.plugins)||void 0===e||e.logger.open()}},{key:"closeLog",value:function(){var e;null===(e=this._player.plugins)||void 0===e||e.logger.close()}},{key:"openInfoPanel",value:function(){var e;null===(e=this._player.plugins)||void 0===e||e.infopanel.open()}},{key:"closeInfoPanel",value:function(){var e;null===(e=this._player.plugins)||void 0===e||e.infopanel.close()}},{key:"openAbr",value:function(){var e,t,n=this.url&&ON(this.url);"flv"!==n?"hls"===n&&(null===(e=this._player.plugins)||void 0===e||null===(e=e.hlsabr)||void 0===e||e.switchAbr(!0)):null===(t=this._player.plugins)||void 0===t||null===(t=t.abr)||void 0===t||t.switchAbr(!0)}},{key:"closeAbr",value:function(){var e,t,n=this.url&&ON(this.url);"flv"!==n?"hls"===n&&(null===(e=this._player.plugins)||void 0===e||null===(e=e.hlsabr)||void 0===e||e.switchAbr(!1)):null===(t=this._player.plugins)||void 0===t||null===(t=t.abr)||void 0===t||t.switchAbr(!1)}},{key:"updateDrmConfig",value:function(e){var t;null===(t=this._player)||void 0===t||null===(t=t.plugins)||void 0===t||null===(t=t.drm)||void 0===t||t.updateDrmConfig(e)}},{key:"switchAbr",value:function(e){var t;if(null!==(t=this._player.plugins)&&void 0!==t&&t.abr){if(void 0!==(null==e?void 0:e.bitrate)){var n=this._player.plugins.abr.config.urls[e.bitrate];if(!n)return;this.switch(n,{seamless:!0}),this._player.plugins.abr.bitrate=e.bitrate}var r;if(void 0!==(null==e?void 0:e.enable))null===(r=this._player.plugins)||void 0===r||r.abr.switchAbr(e.enable)}}},{key:"getRTMNetWorkInfo",value:function(){var e;return null===(e=this._player)||void 0===e||null===(e=e.plugins)||void 0===e||null===(e=e.rts)||void 0===e?void 0:e.getNetWorkInfo()}},{key:"getRTMStats",value:(n=sy(oy().mark((function e(){var t;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",null===(t=this._player)||void 0===t||null===(t=t.plugins)||void 0===t||null===(t=t.rts)||void 0===t?void 0:t.getStatsSnapshoot());case 1:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"getFLVStats",value:function(){var e;return null===(e=this._player)||void 0===e||null===(e=e.plugins)||void 0===e||null===(e=e.flv)||void 0===e?void 0:e.getStats()}},{key:"getHLSStats",value:function(){var e;return null===(e=this._player)||void 0===e||null===(e=e.plugins)||void 0===e||null===(e=e.hls)||void 0===e?void 0:e.getStats()}},{key:"updatePlaylist",value:(t=sy(oy().mark((function e(t,n){var r,o=arguments;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o.length>2&&void 0!==o[2]&&!o[2]){e.next=4;break}return e.next=4,null===(r=this._protocolManager)||void 0===r?void 0:r.update({playlist:t});case 4:return e.abrupt("return",dL(UP(i.prototype),"updatePlaylist",this).call(this,t,n));case 5:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})}]),i}(gU);function Kz(e){return Gz.apply(this,arguments)}function Gz(){return(Gz=sy(oy().mark((function e(t){var n,r,i,o,a,s,l,u,c,h;return oy().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=void 0,s=new cU({lang:null==t?void 0:t.lang,i18n:null==t?void 0:t.i18n}),t&&(t.url||t.playlist)){e.next=4;break}throw WV(jV.INVALID_PARAMETER,s);case 4:return null!==(n=t.logger)&&void 0!==n&&n.appId||!1===(null==t||null===(r=t.logger)||void 0===r?void 0:r.enable)||console.warn(WV(jV.INVALID_LOGGER,s).message),l=Dm(Dm({},t),{},{plugins:Bm(i=[]).call(i,Iy(jz),Iy(null!==(o=t.plugins)&&void 0!==o?o:[]))}),e.next=8,Nz.create(l);case 8:if(u=e.sent,t.url||null!=u&&u.playlist){e.next=11;break}throw WV(jV.INVALID_PARAMETER,s);case 11:return e.next=13,gU.create(Dm(Dm(Dm({},Hz),l),{},{playlist:null==u?void 0:u.playlist,beforeFallbackError:Vz.beforeFallbackError,isLive:!0,i18nManager:s,preProcessUrl:function(e){return CN(".ts",e)?{url:e}:{url:jj(e)}},preparePlugins:function(e){return sy(oy().mark((function t(){return oy().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u.enableSelector){t.next=3;break}return t.next=3,u.update({url:e});case 3:return t.abrupt("return",u.getStrategy(a,s));case 4:case"end":return t.stop()}}),t)})))()}}),Wz);case 13:return(a=e.sent)._protocolManager=u,Vz.initErrorFallback(a,u),a&&(h=null===(c=a)||void 0===c||null===(c=c._player)||void 0===c||null===(c=c.config)||void 0===c?void 0:c._RTMdegrade)&&a.emit("degrade",{originRtmUrl:h._originRtmUrl,code:"NOT_SUPPORT",message:"not support rtm or h264",isRTMSupported:h._isRTMSupported,isRTMSupportCodec:h._isRTMSupportCodec}),e.abrupt("return",a);case 18:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var qz,Yz=Object.freeze({__proto__:null,ErrorCode:jV,Events:cH});qz="umd",vN.setModuleSystem(qz);var Xz=DN.isMseSupported,$z=DN.isSoftDecodeSupported,Jz=DN.isMMSSupported;void 0!==VePlayer.registerPlugin?VePlayer.registerPlugin(ML.BizLive,{createLivePlayer:Kz}):gN(ML.BizLive,{createLivePlayer:Kz}),e.Codec=t,e.DecodeType=r,e.Degradation=n,e.DynamicModule=ML,e.EN=lU,e.ListType=_L,e.POSITIONS=dU,e.Plugin=Rx,e.RTMCodec=zz,e.Sniffer=aC,e.ZH_CN=uU,e.createLivePlayer=Kz,e.isFLVSupported=iz,e.isMMSSupported=Jz,e.isMseSupported=Xz,e.isRTMSupportCodec=Cz,e.isRTMSupported=Sz,e.isSoftDecodeSupported=$z,e.live=Yz,e.load=mN,e.register=yN,e.registerPlugin=gN,e.util=DN}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).VePlayer={})}(this,(function(e){"use strict";var t=function(e){return e.H265="h265",e.H264="h264",e}(t||{}),n=function(e){return e.SoftFirst="soft-first",e.H264First="h264-first",e}(n||{}),r=function(e){return e.Software="software",e.Hardware="hardware",e}(r||{}),i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var a=function(e){return e&&e.Math==Math&&e},s=a("object"==typeof globalThis&&globalThis)||a("object"==typeof window&&window)||a("object"==typeof self&&self)||a("object"==typeof i&&i)||function(){return this}()||i||Function("return this")(),c=function(e){try{return!!e()}catch(t){return!0}},l=!c((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),u=l,d=Function.prototype,h=d.apply,f=d.call,p="object"==typeof Reflect&&Reflect.apply||(u?f.bind(h):function(){return f.apply(h,arguments)}),v=l,g=Function.prototype,y=g.call,m=v&&g.bind.bind(y,y),_=v?m:function(e){return function(){return y.apply(e,arguments)}},b=_,R=b({}.toString),w=b("".slice),G=function(e){return w(R(e),8,-1)},T=G,k=_,S=function(e){if("Function"===T(e))return k(e)},E="object"==typeof document&&document.all,M={all:E,IS_HTMLDDA:void 0===E&&void 0!==E},D=M.all,z=M.IS_HTMLDDA?function(e){return"function"==typeof e||e===D}:function(e){return"function"==typeof e},A={},P=!c((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),x=l,C=Function.prototype.call,F=x?C.bind(C):function(){return C.apply(C,arguments)},I={},H={}.propertyIsEnumerable,O=Object.getOwnPropertyDescriptor,L=O&&!H.call({1:2},1);I.f=L?function(e){var t=O(this,e);return!!t&&t.enumerable}:H;var X,U,B=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},N=c,V=G,j=Object,K=_("".split),W=N((function(){return!j("z").propertyIsEnumerable(0)}))?function(e){return"String"==V(e)?K(e,""):j(e)}:j,Q=function(e){return null==e},q=Q,Z=TypeError,Y=function(e){if(q(e))throw Z("Can't call method on "+e);return e},$=W,J=Y,ee=function(e){return $(J(e))},te=z,ne=M.all,re=M.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:te(e)||e===ne}:function(e){return"object"==typeof e?null!==e:te(e)},ie={},oe=ie,ae=s,se=z,ce=function(e){return se(e)?e:void 0},le=function(e,t){return arguments.length<2?ce(oe[e])||ce(ae[e]):oe[e]&&oe[e][t]||ae[e]&&ae[e][t]},ue=_({}.isPrototypeOf),de="undefined"!=typeof navigator&&String(navigator.userAgent)||"",he=s,fe=de,pe=he.process,ve=he.Deno,ge=pe&&pe.versions||ve&&ve.version,ye=ge&&ge.v8;ye&&(U=(X=ye.split("."))[0]>0&&X[0]<4?1:+(X[0]+X[1])),!U&&fe&&(!(X=fe.match(/Edge\/(\d+)/))||X[1]>=74)&&(X=fe.match(/Chrome\/(\d+)/))&&(U=+X[1]);var me=U,_e=me,be=c,Re=s.String,we=!!Object.getOwnPropertySymbols&&!be((function(){var e=Symbol();return!Re(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&_e&&_e<41})),Ge=we&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Te=le,ke=z,Se=ue,Ee=Object,Me=Ge?function(e){return"symbol"==typeof e}:function(e){var t=Te("Symbol");return ke(t)&&Se(t.prototype,Ee(e))},De=String,ze=function(e){try{return De(e)}catch(t){return"Object"}},Ae=z,Pe=ze,xe=TypeError,Ce=function(e){if(Ae(e))return e;throw xe(Pe(e)+" is not a function")},Fe=Ce,Ie=Q,He=function(e,t){var n=e[t];return Ie(n)?void 0:Fe(n)},Oe=F,Le=z,Xe=re,Ue=TypeError,Be={exports:{}},Ne=s,Ve=Object.defineProperty,je=function(e,t){try{Ve(Ne,e,{value:t,configurable:!0,writable:!0})}catch(n){Ne[e]=t}return t},Ke="__core-js_shared__",We=s[Ke]||je(Ke,{}),Qe=We;(Be.exports=function(e,t){return Qe[e]||(Qe[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 qe=Be.exports,Ze=Y,Ye=Object,$e=function(e){return Ye(Ze(e))},Je=$e,et=_({}.hasOwnProperty),tt=Object.hasOwn||function(e,t){return et(Je(e),t)},nt=_,rt=0,it=Math.random(),ot=nt(1..toString),at=function(e){return"Symbol("+(void 0===e?"":e)+")_"+ot(++rt+it,36)},st=qe,ct=tt,lt=at,ut=we,dt=Ge,ht=s.Symbol,ft=st("wks"),pt=dt?ht.for||ht:ht&&ht.withoutSetter||lt,vt=function(e){return ct(ft,e)||(ft[e]=ut&&ct(ht,e)?ht[e]:pt("Symbol."+e)),ft[e]},gt=F,yt=re,mt=Me,_t=He,bt=function(e,t){var n,r;if("string"===t&&Le(n=e.toString)&&!Xe(r=Oe(n,e)))return r;if(Le(n=e.valueOf)&&!Xe(r=Oe(n,e)))return r;if("string"!==t&&Le(n=e.toString)&&!Xe(r=Oe(n,e)))return r;throw Ue("Can't convert object to primitive value")},Rt=TypeError,wt=vt("toPrimitive"),Gt=function(e,t){if(!yt(e)||mt(e))return e;var n,r=_t(e,wt);if(r){if(void 0===t&&(t="default"),n=gt(r,e,t),!yt(n)||mt(n))return n;throw Rt("Can't convert object to primitive value")}return void 0===t&&(t="number"),bt(e,t)},Tt=Me,kt=function(e){var t=Gt(e,"string");return Tt(t)?t:t+""},St=re,Et=s.document,Mt=St(Et)&&St(Et.createElement),Dt=function(e){return Mt?Et.createElement(e):{}},zt=Dt,At=!P&&!c((function(){return 7!=Object.defineProperty(zt("div"),"a",{get:function(){return 7}}).a})),Pt=P,xt=F,Ct=I,Ft=B,It=ee,Ht=kt,Ot=tt,Lt=At,Xt=Object.getOwnPropertyDescriptor;A.f=Pt?Xt:function(e,t){if(e=It(e),t=Ht(t),Lt)try{return Xt(e,t)}catch(n){}if(Ot(e,t))return Ft(!xt(Ct.f,e,t),e[t])};var Ut=c,Bt=z,Nt=/#|\.prototype\./,Vt=function(e,t){var n=Kt[jt(e)];return n==Qt||n!=Wt&&(Bt(t)?Ut(t):!!t)},jt=Vt.normalize=function(e){return String(e).replace(Nt,".").toLowerCase()},Kt=Vt.data={},Wt=Vt.NATIVE="N",Qt=Vt.POLYFILL="P",qt=Vt,Zt=Ce,Yt=l,$t=S(S.bind),Jt=function(e,t){return Zt(e),void 0===t?e:Yt?$t(e,t):function(){return e.apply(t,arguments)}},en={},tn=P&&c((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),nn=re,rn=String,on=TypeError,an=function(e){if(nn(e))return e;throw on(rn(e)+" is not an object")},sn=P,cn=At,ln=tn,un=an,dn=kt,hn=TypeError,fn=Object.defineProperty,pn=Object.getOwnPropertyDescriptor,vn="enumerable",gn="configurable",yn="writable";en.f=sn?ln?function(e,t,n){if(un(e),t=dn(t),un(n),"function"==typeof e&&"prototype"===t&&"value"in n&&yn in n&&!n[yn]){var r=pn(e,t);r&&r[yn]&&(e[t]=n.value,n={configurable:gn in n?n[gn]:r[gn],enumerable:vn in n?n[vn]:r[vn],writable:!1})}return fn(e,t,n)}:fn:function(e,t,n){if(un(e),t=dn(t),un(n),cn)try{return fn(e,t,n)}catch(r){}if("get"in n||"set"in n)throw hn("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var mn=en,_n=B,bn=P?function(e,t,n){return mn.f(e,t,_n(1,n))}:function(e,t,n){return e[t]=n,e},Rn=s,wn=p,Gn=S,Tn=z,kn=A.f,Sn=qt,En=ie,Mn=Jt,Dn=bn,zn=tt,An=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return wn(e,this,arguments)};return t.prototype=e.prototype,t},Pn=function(e,t){var n,r,i,o,a,s,c,l,u,d=e.target,h=e.global,f=e.stat,p=e.proto,v=h?Rn:f?Rn[d]:(Rn[d]||{}).prototype,g=h?En:En[d]||Dn(En,d,{})[d],y=g.prototype;for(o in t)r=!(n=Sn(h?o:d+(f?".":"#")+o,e.forced))&&v&&zn(v,o),s=g[o],r&&(c=e.dontCallGetSet?(u=kn(v,o))&&u.value:v[o]),a=r&&c?c:t[o],r&&typeof s==typeof a||(l=e.bind&&r?Mn(a,Rn):e.wrap&&r?An(a):p&&Tn(a)?Gn(a):a,(e.sham||a&&a.sham||s&&s.sham)&&Dn(l,"sham",!0),Dn(g,o,l),p&&(zn(En,i=d+"Prototype")||Dn(En,i,{}),Dn(En[i],o,a),e.real&&y&&(n||!y[o])&&Dn(y,o,a)))},xn=G,Cn=Array.isArray||function(e){return"Array"==xn(e)},Fn=Math.ceil,In=Math.floor,Hn=Math.trunc||function(e){var t=+e;return(t>0?In:Fn)(t)},On=Hn,Ln=function(e){var t=+e;return t!=t||0===t?0:On(t)},Xn=Ln,Un=Math.min,Bn=function(e){return e>0?Un(Xn(e),9007199254740991):0},Nn=Bn,Vn=function(e){return Nn(e.length)},jn=TypeError,Kn=function(e){if(e>9007199254740991)throw jn("Maximum allowed index exceeded");return e},Wn=kt,Qn=en,qn=B,Zn=function(e,t,n){var r=Wn(t);r in e?Qn.f(e,r,qn(0,n)):e[r]=n},Yn={};Yn[vt("toStringTag")]="z";var $n="[object z]"===String(Yn),Jn=$n,er=z,tr=G,nr=vt("toStringTag"),rr=Object,ir="Arguments"==tr(function(){return arguments}()),or=Jn?tr:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=rr(e),nr))?n:ir?tr(t):"Object"==(r=tr(t))&&er(t.callee)?"Arguments":r},ar=z,sr=We,cr=_(Function.toString);ar(sr.inspectSource)||(sr.inspectSource=function(e){return cr(e)});var lr=sr.inspectSource,ur=_,dr=c,hr=z,fr=or,pr=lr,vr=function(){},gr=[],yr=le("Reflect","construct"),mr=/^\s*(?:class|function)\b/,_r=ur(mr.exec),br=!mr.exec(vr),Rr=function(e){if(!hr(e))return!1;try{return yr(vr,gr,e),!0}catch(t){return!1}},wr=function(e){if(!hr(e))return!1;switch(fr(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return br||!!_r(mr,pr(e))}catch(t){return!0}};wr.sham=!0;var Gr=!yr||dr((function(){var e;return Rr(Rr.call)||!Rr(Object)||!Rr((function(){e=!0}))||e}))?wr:Rr,Tr=Cn,kr=Gr,Sr=re,Er=vt("species"),Mr=Array,Dr=function(e){var t;return Tr(e)&&(t=e.constructor,(kr(t)&&(t===Mr||Tr(t.prototype))||Sr(t)&&null===(t=t[Er]))&&(t=void 0)),void 0===t?Mr:t},zr=function(e,t){return new(Dr(e))(0===t?0:t)},Ar=c,Pr=me,xr=vt("species"),Cr=function(e){return Pr>=51||!Ar((function(){var t=[];return(t.constructor={})[xr]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Fr=Pn,Ir=c,Hr=Cn,Or=re,Lr=$e,Xr=Vn,Ur=Kn,Br=Zn,Nr=zr,Vr=Cr,jr=me,Kr=vt("isConcatSpreadable"),Wr=jr>=51||!Ir((function(){var e=[];return e[Kr]=!1,e.concat()[0]!==e})),Qr=function(e){if(!Or(e))return!1;var t=e[Kr];return void 0!==t?!!t:Hr(e)};Fr({target:"Array",proto:!0,arity:1,forced:!Wr||!Vr("concat")},{concat:function(e){var t,n,r,i,o,a=Lr(this),s=Nr(a,0),c=0;for(t=-1,r=arguments.length;t<r;t++)if(Qr(o=-1===t?a:arguments[t]))for(i=Xr(o),Ur(c+i),n=0;n<i;n++,c++)n in o&&Br(s,c,o[n]);else Ur(c+1),Br(s,c++,o);return s.length=c,s}});var qr=or,Zr=String,Yr=function(e){if("Symbol"===qr(e))throw TypeError("Cannot convert a Symbol value to a string");return Zr(e)},$r={},Jr=Ln,ei=Math.max,ti=Math.min,ni=function(e,t){var n=Jr(e);return n<0?ei(n+t,0):ti(n,t)},ri=ee,ii=ni,oi=Vn,ai=function(e){return function(t,n,r){var i,o=ri(t),a=oi(o),s=ii(r,a);if(e&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}},si={includes:ai(!0),indexOf:ai(!1)},ci={},li=tt,ui=ee,di=si.indexOf,hi=ci,fi=_([].push),pi=function(e,t){var n,r=ui(e),i=0,o=[];for(n in r)!li(hi,n)&&li(r,n)&&fi(o,n);for(;t.length>i;)li(r,n=t[i++])&&(~di(o,n)||fi(o,n));return o},vi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],gi=pi,yi=vi,mi=Object.keys||function(e){return gi(e,yi)},_i=P,bi=tn,Ri=en,wi=an,Gi=ee,Ti=mi;$r.f=_i&&!bi?Object.defineProperties:function(e,t){wi(e);for(var n,r=Gi(t),i=Ti(t),o=i.length,a=0;o>a;)Ri.f(e,n=i[a++],r[n]);return e};var ki,Si=le("document","documentElement"),Ei=at,Mi=qe("keys"),Di=function(e){return Mi[e]||(Mi[e]=Ei(e))},zi=an,Ai=$r,Pi=vi,xi=ci,Ci=Si,Fi=Dt,Ii="prototype",Hi="script",Oi=Di("IE_PROTO"),Li=function(){},Xi=function(e){return"<"+Hi+">"+e+"</"+Hi+">"},Ui=function(e){e.write(Xi("")),e.close();var t=e.parentWindow.Object;return e=null,t},Bi=function(){try{ki=new ActiveXObject("htmlfile")}catch(i){}var e,t,n;Bi="undefined"!=typeof document?document.domain&&ki?Ui(ki):(t=Fi("iframe"),n="java"+Hi+":",t.style.display="none",Ci.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Xi("document.F=Object")),e.close(),e.F):Ui(ki);for(var r=Pi.length;r--;)delete Bi[Ii][Pi[r]];return Bi()};xi[Oi]=!0;var Ni=Object.create||function(e,t){var n;return null!==e?(Li[Ii]=zi(e),n=new Li,Li[Ii]=null,n[Oi]=e):n=Bi(),void 0===t?n:Ai.f(n,t)},Vi={},ji=pi,Ki=vi.concat("length","prototype");Vi.f=Object.getOwnPropertyNames||function(e){return ji(e,Ki)};var Wi={},Qi=ni,qi=Vn,Zi=Zn,Yi=Array,$i=Math.max,Ji=function(e,t,n){for(var r=qi(e),i=Qi(t,r),o=Qi(void 0===n?r:n,r),a=Yi($i(o-i,0)),s=0;i<o;i++,s++)Zi(a,s,e[i]);return a.length=s,a},eo=G,to=ee,no=Vi.f,ro=Ji,io="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Wi.f=function(e){return io&&"Window"==eo(e)?function(e){try{return no(e)}catch(t){return ro(io)}}(e):no(to(e))};var oo={};oo.f=Object.getOwnPropertySymbols;var ao=bn,so=function(e,t,n,r){return r&&r.enumerable?e[t]=n:ao(e,t,n),e},co=en,lo=function(e,t,n){return co.f(e,t,n)},uo={},ho=vt;uo.f=ho;var fo,po,vo,go=ie,yo=tt,mo=uo,_o=en.f,bo=function(e){var t=go.Symbol||(go.Symbol={});yo(t,e)||_o(t,e,{value:mo.f(e)})},Ro=F,wo=le,Go=vt,To=so,ko=function(){var e=wo("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=Go("toPrimitive");t&&!t[r]&&To(t,r,(function(e){return Ro(n,this)}),{arity:1})},So=or,Eo=$n?{}.toString:function(){return"[object "+So(this)+"]"},Mo=$n,Do=en.f,zo=bn,Ao=tt,Po=Eo,xo=vt("toStringTag"),Co=function(e,t,n,r){if(e){var i=n?e:e.prototype;Ao(i,xo)||Do(i,xo,{configurable:!0,value:t}),r&&!Mo&&zo(i,"toString",Po)}},Fo=z,Io=s.WeakMap,Ho=Fo(Io)&&/native code/.test(String(Io)),Oo=s,Lo=re,Xo=bn,Uo=tt,Bo=We,No=Di,Vo=ci,jo="Object already initialized",Ko=Oo.TypeError,Wo=Oo.WeakMap;if(Ho||Bo.state){var Qo=Bo.state||(Bo.state=new Wo);Qo.get=Qo.get,Qo.has=Qo.has,Qo.set=Qo.set,fo=function(e,t){if(Qo.has(e))throw Ko(jo);return t.facade=e,Qo.set(e,t),t},po=function(e){return Qo.get(e)||{}},vo=function(e){return Qo.has(e)}}else{var qo=No("state");Vo[qo]=!0,fo=function(e,t){if(Uo(e,qo))throw Ko(jo);return t.facade=e,Xo(e,qo,t),t},po=function(e){return Uo(e,qo)?e[qo]:{}},vo=function(e){return Uo(e,qo)}}var Zo={set:fo,get:po,has:vo,enforce:function(e){return vo(e)?po(e):fo(e,{})},getterFor:function(e){return function(t){var n;if(!Lo(t)||(n=po(t)).type!==e)throw Ko("Incompatible receiver, "+e+" required");return n}}},Yo=Jt,$o=W,Jo=$e,ea=Vn,ta=zr,na=_([].push),ra=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(c,l,u,d){for(var h,f,p=Jo(c),v=$o(p),g=Yo(l,u),y=ea(v),m=0,_=d||ta,b=t?_(c,y):n||a?_(c,0):void 0;y>m;m++)if((s||m in v)&&(f=g(h=v[m],m,p),e))if(t)b[m]=f;else if(f)switch(e){case 3:return!0;case 5:return h;case 6:return m;case 2:na(b,h)}else switch(e){case 4:return!1;case 7:na(b,h)}return o?-1:r||i?i:b}},ia={forEach:ra(0),map:ra(1),filter:ra(2),some:ra(3),every:ra(4),find:ra(5),findIndex:ra(6),filterReject:ra(7)},oa=Pn,aa=s,sa=F,ca=_,la=P,ua=we,da=c,ha=tt,fa=ue,pa=an,va=ee,ga=kt,ya=Yr,ma=B,_a=Ni,ba=mi,Ra=Vi,wa=Wi,Ga=oo,Ta=A,ka=en,Sa=$r,Ea=I,Ma=so,Da=lo,za=qe,Aa=ci,Pa=at,xa=vt,Ca=uo,Fa=bo,Ia=ko,Ha=Co,Oa=Zo,La=ia.forEach,Xa=Di("hidden"),Ua="Symbol",Ba="prototype",Na=Oa.set,Va=Oa.getterFor(Ua),ja=Object[Ba],Ka=aa.Symbol,Wa=Ka&&Ka[Ba],Qa=aa.TypeError,qa=aa.QObject,Za=Ta.f,Ya=ka.f,$a=wa.f,Ja=Ea.f,es=ca([].push),ts=za("symbols"),ns=za("op-symbols"),rs=za("wks"),is=!qa||!qa[Ba]||!qa[Ba].findChild,os=la&&da((function(){return 7!=_a(Ya({},"a",{get:function(){return Ya(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=Za(ja,t);r&&delete ja[t],Ya(e,t,n),r&&e!==ja&&Ya(ja,t,r)}:Ya,as=function(e,t){var n=ts[e]=_a(Wa);return Na(n,{type:Ua,tag:e,description:t}),la||(n.description=t),n},ss=function(e,t,n){e===ja&&ss(ns,t,n),pa(e);var r=ga(t);return pa(n),ha(ts,r)?(n.enumerable?(ha(e,Xa)&&e[Xa][r]&&(e[Xa][r]=!1),n=_a(n,{enumerable:ma(0,!1)})):(ha(e,Xa)||Ya(e,Xa,ma(1,{})),e[Xa][r]=!0),os(e,r,n)):Ya(e,r,n)},cs=function(e,t){pa(e);var n=va(t),r=ba(n).concat(hs(n));return La(r,(function(t){la&&!sa(ls,n,t)||ss(e,t,n[t])})),e},ls=function(e){var t=ga(e),n=sa(Ja,this,t);return!(this===ja&&ha(ts,t)&&!ha(ns,t))&&(!(n||!ha(this,t)||!ha(ts,t)||ha(this,Xa)&&this[Xa][t])||n)},us=function(e,t){var n=va(e),r=ga(t);if(n!==ja||!ha(ts,r)||ha(ns,r)){var i=Za(n,r);return!i||!ha(ts,r)||ha(n,Xa)&&n[Xa][r]||(i.enumerable=!0),i}},ds=function(e){var t=$a(va(e)),n=[];return La(t,(function(e){ha(ts,e)||ha(Aa,e)||es(n,e)})),n},hs=function(e){var t=e===ja,n=$a(t?ns:va(e)),r=[];return La(n,(function(e){!ha(ts,e)||t&&!ha(ja,e)||es(r,ts[e])})),r};ua||(Ka=function(){if(fa(Wa,this))throw Qa("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?ya(arguments[0]):void 0,t=Pa(e),n=function(e){this===ja&&sa(n,ns,e),ha(this,Xa)&&ha(this[Xa],t)&&(this[Xa][t]=!1),os(this,t,ma(1,e))};return la&&is&&os(ja,t,{configurable:!0,set:n}),as(t,e)},Ma(Wa=Ka[Ba],"toString",(function(){return Va(this).tag})),Ma(Ka,"withoutSetter",(function(e){return as(Pa(e),e)})),Ea.f=ls,ka.f=ss,Sa.f=cs,Ta.f=us,Ra.f=wa.f=ds,Ga.f=hs,Ca.f=function(e){return as(xa(e),e)},la&&Da(Wa,"description",{configurable:!0,get:function(){return Va(this).description}})),oa({global:!0,constructor:!0,wrap:!0,forced:!ua,sham:!ua},{Symbol:Ka}),La(ba(rs),(function(e){Fa(e)})),oa({target:Ua,stat:!0,forced:!ua},{useSetter:function(){is=!0},useSimple:function(){is=!1}}),oa({target:"Object",stat:!0,forced:!ua,sham:!la},{create:function(e,t){return void 0===t?_a(e):cs(_a(e),t)},defineProperty:ss,defineProperties:cs,getOwnPropertyDescriptor:us}),oa({target:"Object",stat:!0,forced:!ua},{getOwnPropertyNames:ds}),Ia(),Ha(Ka,Ua),Aa[Xa]=!0;var fs=we&&!!Symbol.for&&!!Symbol.keyFor,ps=Pn,vs=le,gs=tt,ys=Yr,ms=qe,_s=fs,bs=ms("string-to-symbol-registry"),Rs=ms("symbol-to-string-registry");ps({target:"Symbol",stat:!0,forced:!_s},{for:function(e){var t=ys(e);if(gs(bs,t))return bs[t];var n=vs("Symbol")(t);return bs[t]=n,Rs[n]=t,n}});var ws=Pn,Gs=tt,Ts=Me,ks=ze,Ss=fs,Es=qe("symbol-to-string-registry");ws({target:"Symbol",stat:!0,forced:!Ss},{keyFor:function(e){if(!Ts(e))throw TypeError(ks(e)+" is not a symbol");if(Gs(Es,e))return Es[e]}});var Ms=_([].slice),Ds=Cn,zs=z,As=G,Ps=Yr,xs=_([].push),Cs=Pn,Fs=le,Is=p,Hs=F,Os=_,Ls=c,Xs=z,Us=Me,Bs=Ms,Ns=function(e){if(zs(e))return e;if(Ds(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];"string"==typeof i?xs(n,i):"number"!=typeof i&&"Number"!=As(i)&&"String"!=As(i)||xs(n,Ps(i))}var o=n.length,a=!0;return function(e,t){if(a)return a=!1,t;if(Ds(this))return t;for(var r=0;r<o;r++)if(n[r]===e)return t}}},Vs=we,js=String,Ks=Fs("JSON","stringify"),Ws=Os(/./.exec),Qs=Os("".charAt),qs=Os("".charCodeAt),Zs=Os("".replace),Ys=Os(1..toString),$s=/[\uD800-\uDFFF]/g,Js=/^[\uD800-\uDBFF]$/,ec=/^[\uDC00-\uDFFF]$/,tc=!Vs||Ls((function(){var e=Fs("Symbol")();return"[null]"!=Ks([e])||"{}"!=Ks({a:e})||"{}"!=Ks(Object(e))})),nc=Ls((function(){return'"\\udf06\\ud834"'!==Ks("\udf06\ud834")||'"\\udead"'!==Ks("\udead")})),rc=function(e,t){var n=Bs(arguments),r=Ns(t);if(Xs(r)||void 0!==e&&!Us(e))return n[1]=function(e,t){if(Xs(r)&&(t=Hs(r,this,js(e),t)),!Us(t))return t},Is(Ks,null,n)},ic=function(e,t,n){var r=Qs(n,t-1),i=Qs(n,t+1);return Ws(Js,e)&&!Ws(ec,i)||Ws(ec,e)&&!Ws(Js,r)?"\\u"+Ys(qs(e,0),16):e};Ks&&Cs({target:"JSON",stat:!0,arity:3,forced:tc||nc},{stringify:function(e,t,n){var r=Bs(arguments),i=Is(tc?rc:Ks,null,r);return nc&&"string"==typeof i?Zs(i,$s,ic):i}});var oc=oo,ac=$e;Pn({target:"Object",stat:!0,forced:!we||c((function(){oc.f(1)}))},{getOwnPropertySymbols:function(e){var t=oc.f;return t?t(ac(e)):[]}}),bo("asyncIterator"),bo("hasInstance"),bo("isConcatSpreadable"),bo("iterator"),bo("match"),bo("matchAll"),bo("replace"),bo("search"),bo("species"),bo("split");var sc=ko;bo("toPrimitive"),sc();var cc=le,lc=Co;bo("toStringTag"),lc(cc("Symbol"),"Symbol"),bo("unscopables"),Co(s.JSON,"JSON",!0);var uc,dc,hc,fc=ie.Symbol,pc={},vc=P,gc=tt,yc=Function.prototype,mc=vc&&Object.getOwnPropertyDescriptor,_c=gc(yc,"name"),bc={EXISTS:_c,PROPER:_c&&"something"===function(){}.name,CONFIGURABLE:_c&&(!vc||vc&&mc(yc,"name").configurable)},Rc=!c((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),wc=tt,Gc=z,Tc=$e,kc=Rc,Sc=Di("IE_PROTO"),Ec=Object,Mc=Ec.prototype,Dc=kc?Ec.getPrototypeOf:function(e){var t=Tc(e);if(wc(t,Sc))return t[Sc];var n=t.constructor;return Gc(n)&&t instanceof n?n.prototype:t instanceof Ec?Mc:null},zc=c,Ac=z,Pc=re,xc=Ni,Cc=Dc,Fc=so,Ic=vt("iterator"),Hc=!1;[].keys&&("next"in(hc=[].keys())?(dc=Cc(Cc(hc)))!==Object.prototype&&(uc=dc):Hc=!0);var Oc=!Pc(uc)||zc((function(){var e={};return uc[Ic].call(e)!==e}));Ac((uc=Oc?{}:xc(uc))[Ic])||Fc(uc,Ic,(function(){return this}));var Lc={IteratorPrototype:uc,BUGGY_SAFARI_ITERATORS:Hc},Xc=Lc.IteratorPrototype,Uc=Ni,Bc=B,Nc=Co,Vc=pc,jc=function(){return this},Kc=function(e,t,n,r){var i=t+" Iterator";return e.prototype=Uc(Xc,{next:Bc(+!r,n)}),Nc(e,i,!1,!0),Vc[i]=jc,e},Wc=_,Qc=Ce,qc=z,Zc=String,Yc=TypeError,$c=function(e,t,n){try{return Wc(Qc(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(r){}},Jc=an,el=function(e){if("object"==typeof e||qc(e))return e;throw Yc("Can't set "+Zc(e)+" as a prototype")},tl=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=$c(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(r){}return function(n,r){return Jc(n),el(r),t?e(n,r):n.__proto__=r,n}}():void 0),nl=Pn,rl=F,il=bc,ol=Kc,al=Dc,sl=Co,cl=so,ll=pc,ul=Lc,dl=il.PROPER,hl=ul.BUGGY_SAFARI_ITERATORS,fl=vt("iterator"),pl="keys",vl="values",gl="entries",yl=function(){return this},ml=function(e,t,n,r,i,o,a){ol(n,t,r);var s,c,l,u=function(e){if(e===i&&v)return v;if(!hl&&e in f)return f[e];switch(e){case pl:case vl:case gl:return function(){return new n(this,e)}}return function(){return new n(this)}},d=t+" Iterator",h=!1,f=e.prototype,p=f[fl]||f["@@iterator"]||i&&f[i],v=!hl&&p||u(i),g="Array"==t&&f.entries||p;if(g&&(s=al(g.call(new e)))!==Object.prototype&&s.next&&(sl(s,d,!0,!0),ll[d]=yl),dl&&i==vl&&p&&p.name!==vl&&(h=!0,v=function(){return rl(p,this)}),i)if(c={values:u(vl),keys:o?v:u(pl),entries:u(gl)},a)for(l in c)(hl||h||!(l in f))&&cl(f,l,c[l]);else nl({target:t,proto:!0,forced:hl||h},c);return a&&f[fl]!==v&&cl(f,fl,v,{name:i}),ll[t]=v,c},_l=function(e,t){return{value:e,done:t}},bl=ee,Rl=pc,wl=Zo;en.f;var Gl=ml,Tl=_l,kl="Array Iterator",Sl=wl.set,El=wl.getterFor(kl);Gl(Array,"Array",(function(e,t){Sl(this,{type:kl,target:bl(e),index:0,kind:t})}),(function(){var e=El(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,Tl(void 0,!0)):Tl("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),Rl.Arguments=Rl.Array;var Ml={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},Dl=s,zl=or,Al=bn,Pl=pc,xl=vt("toStringTag");for(var Cl in Ml){var Fl=Dl[Cl],Il=Fl&&Fl.prototype;Il&&zl(Il)!==xl&&Al(Il,xl,Cl),Pl[Cl]=Pl.Array}var Hl=fc;bo("dispose");var Ol=Hl;bo("asyncDispose");var Ll=Pn,Xl=_,Ul=le("Symbol"),Bl=Ul.keyFor,Nl=Xl(Ul.prototype.valueOf);Ll({target:"Symbol",stat:!0},{isRegistered:function(e){try{return void 0!==Bl(Nl(e))}catch(t){return!1}}});for(var Vl=Pn,jl=qe,Kl=le,Wl=_,Ql=Me,ql=vt,Zl=Kl("Symbol"),Yl=Zl.isWellKnown,$l=Kl("Object","getOwnPropertyNames"),Jl=Wl(Zl.prototype.valueOf),eu=jl("wks"),tu=0,nu=$l(Zl),ru=nu.length;tu<ru;tu++)try{var iu=nu[tu];Ql(Zl[iu])&&ql(iu)}catch(KTe){}Vl({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(e){if(Yl&&Yl(e))return!0;try{for(var t=Jl(e),n=0,r=$l(eu),i=r.length;n<i;n++)if(eu[r[n]]==t)return!0}catch(KTe){}return!1}}),bo("matcher"),bo("metadataKey"),bo("observable"),bo("metadata"),bo("patternMatch"),bo("replaceAll");var ou=Ol,au=o(ou),su=_,cu=Ln,lu=Yr,uu=Y,du=su("".charAt),hu=su("".charCodeAt),fu=su("".slice),pu=function(e){return function(t,n){var r,i,o=lu(uu(t)),a=cu(n),s=o.length;return a<0||a>=s?e?"":void 0:(r=hu(o,a))<55296||r>56319||a+1===s||(i=hu(o,a+1))<56320||i>57343?e?du(o,a):r:e?fu(o,a,a+2):i-56320+(r-55296<<10)+65536}},vu={codeAt:pu(!1),charAt:pu(!0)},gu=vu.charAt,yu=Yr,mu=Zo,_u=ml,bu=_l,Ru="String Iterator",wu=mu.set,Gu=mu.getterFor(Ru);_u(String,"String",(function(e){wu(this,{type:Ru,string:yu(e),index:0})}),(function(){var e,t=Gu(this),n=t.string,r=t.index;return r>=n.length?bu(void 0,!0):(e=gu(n,r),t.index+=e.length,bu(e,!1))}));var Tu=uo.f("iterator"),ku=o(Tu);function Su(e){return(Su="function"==typeof au&&"symbol"==typeof ku?function(e){return typeof e}:function(e){return e&&"function"==typeof au&&e.constructor===au&&e!==au.prototype?"symbol":typeof e})(e)}var Eu={exports:{}},Mu=Pn,Du=P,zu=en.f;Mu({target:"Object",stat:!0,forced:Object.defineProperty!==zu,sham:!Du},{defineProperty:zu});var Au=ie.Object,Pu=Eu.exports=function(e,t,n){return Au.defineProperty(e,t,n)};Au.defineProperty.sham&&(Pu.sham=!0);var xu=Eu.exports,Cu=o(xu);Pn({target:"Object",stat:!0,sham:!P},{create:Ni});var Fu=ie.Object,Iu=o((function(e,t){return Fu.create(e,t)})),Hu=$e,Ou=Dc,Lu=Rc;Pn({target:"Object",stat:!0,forced:c((function(){Ou(1)})),sham:!Lu},{getPrototypeOf:function(e){return Ou(Hu(e))}});var Xu=ie.Object.getPrototypeOf,Uu=o(Xu),Bu=c,Nu=function(e,t){var n=[][e];return!!n&&Bu((function(){n.call(null,t||function(){return 1},1)}))},Vu=ia.forEach,ju=Nu("forEach")?[].forEach:function(e){return Vu(this,e,arguments.length>1?arguments[1]:void 0)};Pn({target:"Array",proto:!0,forced:[].forEach!=ju},{forEach:ju});var Ku=ie,Wu=function(e){return Ku[e+"Prototype"]},Qu=Wu("Array").forEach,qu=or,Zu=tt,Yu=ue,$u=Qu,Ju=Array.prototype,ed={DOMTokenList:!0,NodeList:!0},td=o((function(e){var t=e.forEach;return e===Ju||Yu(Ju,e)&&t===Ju.forEach||Zu(ed,qu(e))?$u:t})),nd=P,rd=Cn,id=TypeError,od=Object.getOwnPropertyDescriptor,ad=nd&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(KTe){return KTe instanceof TypeError}}()?function(e,t){if(rd(e)&&!od(e,"length").writable)throw id("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},sd=$e,cd=Vn,ld=ad,ud=Kn;Pn({target:"Array",proto:!0,arity:1,forced:c((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(KTe){return KTe instanceof TypeError}}()},{push:function(e){var t=sd(this),n=cd(t),r=arguments.length;ud(n+r);for(var i=0;i<r;i++)t[n]=arguments[i],n++;return ld(t,n),n}});var dd=Wu("Array").push,hd=ue,fd=dd,pd=Array.prototype,vd=o((function(e){var t=e.push;return e===pd||hd(pd,e)&&t===pd.push?fd:t}));Pn({target:"Object",stat:!0},{setPrototypeOf:tl});var gd=ie.Object.setPrototypeOf,yd=o(gd),md=le,_d=Vi,bd=oo,Rd=an,wd=_([].concat),Gd=md("Reflect","ownKeys")||function(e){var t=_d.f(Rd(e)),n=bd.f;return n?wd(t,n(e)):t},Td=tt,kd=Gd,Sd=A,Ed=en,Md=re,Dd=bn,zd=Error,Ad=_("".replace),Pd=String(zd("zxcasd").stack),xd=/\n\s*at [^:]*:[^\n]*/,Cd=xd.test(Pd),Fd=B,Id=!c((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Fd(1,7)),7!==e.stack)})),Hd=bn,Od=function(e,t){if(Cd&&"string"==typeof e&&!zd.prepareStackTrace)for(;t--;)e=Ad(e,xd,"");return e},Ld=Id,Xd=Error.captureStackTrace,Ud=pc,Bd=vt("iterator"),Nd=Array.prototype,Vd=function(e){return void 0!==e&&(Ud.Array===e||Nd[Bd]===e)},jd=or,Kd=He,Wd=Q,Qd=pc,qd=vt("iterator"),Zd=function(e){if(!Wd(e))return Kd(e,qd)||Kd(e,"@@iterator")||Qd[jd(e)]},Yd=F,$d=Ce,Jd=an,eh=ze,th=Zd,nh=TypeError,rh=function(e,t){var n=arguments.length<2?th(e):t;if($d(n))return Jd(Yd(n,e));throw nh(eh(e)+" is not iterable")},ih=F,oh=an,ah=He,sh=function(e,t,n){var r,i;oh(e);try{if(!(r=ah(e,"return"))){if("throw"===t)throw n;return n}r=ih(r,e)}catch(KTe){i=!0,r=KTe}if("throw"===t)throw n;if(i)throw r;return oh(r),n},ch=Jt,lh=F,uh=an,dh=ze,hh=Vd,fh=Vn,ph=ue,vh=rh,gh=Zd,yh=sh,mh=TypeError,_h=function(e,t){this.stopped=e,this.result=t},bh=_h.prototype,Rh=function(e,t,n){var r,i,o,a,s,c,l,u=n&&n.that,d=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),f=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),v=ch(t,u),g=function(e){return r&&yh(r,"normal",e),new _h(!0,e)},y=function(e){return d?(uh(e),p?v(e[0],e[1],g):v(e[0],e[1])):p?v(e,g):v(e)};if(h)r=e.iterator;else if(f)r=e;else{if(!(i=gh(e)))throw mh(dh(e)+" is not iterable");if(hh(i)){for(o=0,a=fh(e);a>o;o++)if((s=y(e[o]))&&ph(bh,s))return s;return new _h(!1)}r=vh(e,i)}for(c=h?e.next:r.next;!(l=lh(c,r)).done;){try{s=y(l.value)}catch(KTe){yh(r,"throw",KTe)}if("object"==typeof s&&s&&ph(bh,s))return s}return new _h(!1)},wh=Yr,Gh=Pn,Th=ue,kh=Dc,Sh=tl,Eh=function(e,t,n){for(var r=kd(t),i=Ed.f,o=Sd.f,a=0;a<r.length;a++){var s=r[a];Td(e,s)||n&&Td(n,s)||i(e,s,o(t,s))}},Mh=Ni,Dh=bn,zh=B,Ah=function(e,t){Md(t)&&"cause"in t&&Dd(e,"cause",t.cause)},Ph=function(e,t,n,r){Ld&&(Xd?Xd(e,t):Hd(e,"stack",Od(n,r)))},xh=Rh,Ch=function(e,t){return void 0===e?arguments.length<2?"":t:wh(e)},Fh=vt("toStringTag"),Ih=Error,Hh=[].push,Oh=function(e,t){var n,r=Th(Lh,this);Sh?n=Sh(Ih(),r?kh(this):Lh):(n=r?this:Mh(Lh),Dh(n,Fh,"Error")),void 0!==t&&Dh(n,"message",Ch(t)),Ph(n,Oh,n.stack,1),arguments.length>2&&Ah(n,arguments[2]);var i=[];return xh(e,Hh,{that:i}),Dh(n,"errors",i),n};Sh?Sh(Oh,Ih):Eh(Oh,Ih,{name:!0});var Lh=Oh.prototype=Mh(Ih.prototype,{constructor:zh(1,Oh),message:zh(1,""),name:zh(1,"AggregateError")});Gh({global:!0,constructor:!0,arity:2},{AggregateError:Oh});var Xh,Uh,Bh,Nh,Vh="undefined"!=typeof process&&"process"==G(process),jh=le,Kh=lo,Wh=P,Qh=vt("species"),qh=function(e){var t=jh(e);Wh&&t&&!t[Qh]&&Kh(t,Qh,{configurable:!0,get:function(){return this}})},Zh=ue,Yh=TypeError,$h=function(e,t){if(Zh(t,e))return e;throw Yh("Incorrect invocation")},Jh=Gr,ef=ze,tf=TypeError,nf=function(e){if(Jh(e))return e;throw tf(ef(e)+" is not a constructor")},rf=an,of=nf,af=Q,sf=vt("species"),cf=function(e,t){var n,r=rf(e).constructor;return void 0===r||af(n=rf(r)[sf])?t:of(n)},lf=TypeError,uf=function(e,t){if(e<t)throw lf("Not enough arguments");return e},df=/(?:ipad|iphone|ipod).*applewebkit/i.test(de),hf=s,ff=p,pf=Jt,vf=z,gf=tt,yf=c,mf=Si,_f=Ms,bf=Dt,Rf=uf,wf=df,Gf=Vh,Tf=hf.setImmediate,kf=hf.clearImmediate,Sf=hf.process,Ef=hf.Dispatch,Mf=hf.Function,Df=hf.MessageChannel,zf=hf.String,Af=0,Pf={},xf="onreadystatechange";yf((function(){Xh=hf.location}));var Cf=function(e){if(gf(Pf,e)){var t=Pf[e];delete Pf[e],t()}},Ff=function(e){return function(){Cf(e)}},If=function(e){Cf(e.data)},Hf=function(e){hf.postMessage(zf(e),Xh.protocol+"//"+Xh.host)};Tf&&kf||(Tf=function(e){Rf(arguments.length,1);var t=vf(e)?e:Mf(e),n=_f(arguments,1);return Pf[++Af]=function(){ff(t,void 0,n)},Uh(Af),Af},kf=function(e){delete Pf[e]},Gf?Uh=function(e){Sf.nextTick(Ff(e))}:Ef&&Ef.now?Uh=function(e){Ef.now(Ff(e))}:Df&&!wf?(Nh=(Bh=new Df).port2,Bh.port1.onmessage=If,Uh=pf(Nh.postMessage,Nh)):hf.addEventListener&&vf(hf.postMessage)&&!hf.importScripts&&Xh&&"file:"!==Xh.protocol&&!yf(Hf)?(Uh=Hf,hf.addEventListener("message",If,!1)):Uh=xf in bf("script")?function(e){mf.appendChild(bf("script"))[xf]=function(){mf.removeChild(this),Cf(e)}}:function(e){setTimeout(Ff(e),0)});var Of={set:Tf,clear:kf},Lf=function(){this.head=null,this.tail=null};Lf.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 Xf,Uf,Bf,Nf,Vf,jf=Lf,Kf=/ipad|iphone|ipod/i.test(de)&&"undefined"!=typeof Pebble,Wf=/web0s(?!.*chrome)/i.test(de),Qf=s,qf=Jt,Zf=A.f,Yf=Of.set,$f=jf,Jf=df,ep=Kf,tp=Wf,np=Vh,rp=Qf.MutationObserver||Qf.WebKitMutationObserver,ip=Qf.document,op=Qf.process,ap=Qf.Promise,sp=Zf(Qf,"queueMicrotask"),cp=sp&&sp.value;if(!cp){var lp=new $f,up=function(){var e,t;for(np&&(e=op.domain)&&e.exit();t=lp.get();)try{t()}catch(KTe){throw lp.head&&Xf(),KTe}e&&e.enter()};Jf||np||tp||!rp||!ip?!ep&&ap&&ap.resolve?((Nf=ap.resolve(void 0)).constructor=ap,Vf=qf(Nf.then,Nf),Xf=function(){Vf(up)}):np?Xf=function(){op.nextTick(up)}:(Yf=qf(Yf,Qf),Xf=function(){Yf(up)}):(Uf=!0,Bf=ip.createTextNode(""),new rp(up).observe(Bf,{characterData:!0}),Xf=function(){Bf.data=Uf=!Uf}),cp=function(e){lp.head||Xf(),lp.add(e)}}var dp=cp,hp=function(e){try{return{error:!1,value:e()}}catch(KTe){return{error:!0,value:KTe}}},fp=s.Promise,pp="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,vp=!pp&&!Vh&&"object"==typeof window&&"object"==typeof document,gp=s,yp=fp,mp=z,_p=qt,bp=lr,Rp=vt,wp=vp,Gp=pp,Tp=me,kp=yp&&yp.prototype,Sp=Rp("species"),Ep=!1,Mp=mp(gp.PromiseRejectionEvent),Dp={CONSTRUCTOR:_p("Promise",(function(){var e=bp(yp),t=e!==String(yp);if(!t&&66===Tp)return!0;if(!kp.catch||!kp.finally)return!0;if(!Tp||Tp<51||!/native code/.test(e)){var n=new yp((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[Sp]=r,!(Ep=n.then((function(){}))instanceof r))return!0}return!t&&(wp||Gp)&&!Mp})),REJECTION_EVENT:Mp,SUBCLASSING:Ep},zp={},Ap=Ce,Pp=TypeError,xp=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw Pp("Bad Promise constructor");t=e,n=r})),this.resolve=Ap(t),this.reject=Ap(n)};zp.f=function(e){return new xp(e)};var Cp,Fp,Ip=Pn,Hp=Vh,Op=s,Lp=F,Xp=so,Up=Co,Bp=qh,Np=Ce,Vp=z,jp=re,Kp=$h,Wp=cf,Qp=Of.set,qp=dp,Zp=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(KTe){}},Yp=hp,$p=jf,Jp=Zo,ev=fp,tv=Dp,nv=zp,rv="Promise",iv=tv.CONSTRUCTOR,ov=tv.REJECTION_EVENT,av=Jp.getterFor(rv),sv=Jp.set,cv=ev&&ev.prototype,lv=ev,uv=cv,dv=Op.TypeError,hv=Op.document,fv=Op.process,pv=nv.f,vv=pv,gv=!!(hv&&hv.createEvent&&Op.dispatchEvent),yv="unhandledrejection",mv=function(e){var t;return!(!jp(e)||!Vp(t=e.then))&&t},_v=function(e,t){var n,r,i,o=t.value,a=1==t.state,s=a?e.ok:e.fail,c=e.resolve,l=e.reject,u=e.domain;try{s?(a||(2===t.rejection&&Tv(t),t.rejection=1),!0===s?n=o:(u&&u.enter(),n=s(o),u&&(u.exit(),i=!0)),n===e.promise?l(dv("Promise-chain cycle")):(r=mv(n))?Lp(r,n,c,l):c(n)):l(o)}catch(KTe){u&&!i&&u.exit(),l(KTe)}},bv=function(e,t){e.notified||(e.notified=!0,qp((function(){for(var n,r=e.reactions;n=r.get();)_v(n,e);e.notified=!1,t&&!e.rejection&&wv(e)})))},Rv=function(e,t,n){var r,i;gv?((r=hv.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),Op.dispatchEvent(r)):r={promise:t,reason:n},!ov&&(i=Op["on"+e])?i(r):e===yv&&Zp("Unhandled promise rejection",n)},wv=function(e){Lp(Qp,Op,(function(){var t,n=e.facade,r=e.value;if(Gv(e)&&(t=Yp((function(){Hp?fv.emit("unhandledRejection",r,n):Rv(yv,n,r)})),e.rejection=Hp||Gv(e)?2:1,t.error))throw t.value}))},Gv=function(e){return 1!==e.rejection&&!e.parent},Tv=function(e){Lp(Qp,Op,(function(){var t=e.facade;Hp?fv.emit("rejectionHandled",t):Rv("rejectionhandled",t,e.value)}))},kv=function(e,t,n){return function(r){e(t,r,n)}},Sv=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,bv(e,!0))},Ev=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw dv("Promise can't be resolved itself");var r=mv(t);r?qp((function(){var n={done:!1};try{Lp(r,t,kv(Ev,n,e),kv(Sv,n,e))}catch(KTe){Sv(n,KTe,e)}})):(e.value=t,e.state=1,bv(e,!1))}catch(KTe){Sv({done:!1},KTe,e)}}};iv&&(uv=(lv=function(e){Kp(this,uv),Np(e),Lp(Cp,this);var t=av(this);try{e(kv(Ev,t),kv(Sv,t))}catch(KTe){Sv(t,KTe)}}).prototype,(Cp=function(e){sv(this,{type:rv,done:!1,notified:!1,parent:!1,reactions:new $p,rejection:!1,state:0,value:void 0})}).prototype=Xp(uv,"then",(function(e,t){var n=av(this),r=pv(Wp(this,lv));return n.parent=!0,r.ok=!Vp(e)||e,r.fail=Vp(t)&&t,r.domain=Hp?fv.domain:void 0,0==n.state?n.reactions.add(r):qp((function(){_v(r,n)})),r.promise})),Fp=function(){var e=new Cp,t=av(e);this.promise=e,this.resolve=kv(Ev,t),this.reject=kv(Sv,t)},nv.f=pv=function(e){return e===lv||undefined===e?new Fp(e):vv(e)}),Ip({global:!0,constructor:!0,wrap:!0,forced:iv},{Promise:lv}),Up(lv,rv,!1,!0),Bp(rv);var Mv=vt("iterator"),Dv=!1;try{var zv=0,Av={next:function(){return{done:!!zv++}},return:function(){Dv=!0}};Av[Mv]=function(){return this},Array.from(Av,(function(){throw 2}))}catch(KTe){}var Pv=function(e,t){if(!t&&!Dv)return!1;var n=!1;try{var r={};r[Mv]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(KTe){}return n},xv=fp,Cv=Dp.CONSTRUCTOR||!Pv((function(e){xv.all(e).then(void 0,(function(){}))})),Fv=F,Iv=Ce,Hv=zp,Ov=hp,Lv=Rh;Pn({target:"Promise",stat:!0,forced:Cv},{all:function(e){var t=this,n=Hv.f(t),r=n.resolve,i=n.reject,o=Ov((function(){var n=Iv(t.resolve),o=[],a=0,s=1;Lv(e,(function(e){var c=a++,l=!1;s++,Fv(n,t,e).then((function(e){l||(l=!0,o[c]=e,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise}});var Xv=Pn,Uv=Dp.CONSTRUCTOR;fp&&fp.prototype,Xv({target:"Promise",proto:!0,forced:Uv,real:!0},{catch:function(e){return this.then(void 0,e)}});var Bv=F,Nv=Ce,Vv=zp,jv=hp,Kv=Rh;Pn({target:"Promise",stat:!0,forced:Cv},{race:function(e){var t=this,n=Vv.f(t),r=n.reject,i=jv((function(){var i=Nv(t.resolve);Kv(e,(function(e){Bv(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var Wv=F,Qv=zp;Pn({target:"Promise",stat:!0,forced:Dp.CONSTRUCTOR},{reject:function(e){var t=Qv.f(this);return Wv(t.reject,void 0,e),t.promise}});var qv=an,Zv=re,Yv=zp,$v=function(e,t){if(qv(e),Zv(t)&&t.constructor===e)return t;var n=Yv.f(e);return(0,n.resolve)(t),n.promise},Jv=Pn,eg=fp,tg=Dp.CONSTRUCTOR,ng=$v,rg=le("Promise"),ig=!tg;Jv({target:"Promise",stat:!0,forced:true},{resolve:function(e){return ng(ig&&this===rg?eg:this,e)}});var og=F,ag=Ce,sg=zp,cg=hp,lg=Rh;Pn({target:"Promise",stat:!0,forced:Cv},{allSettled:function(e){var t=this,n=sg.f(t),r=n.resolve,i=n.reject,o=cg((function(){var n=ag(t.resolve),i=[],o=0,a=1;lg(e,(function(e){var s=o++,c=!1;a++,og(n,t,e).then((function(e){c||(c=!0,i[s]={status:"fulfilled",value:e},--a||r(i))}),(function(e){c||(c=!0,i[s]={status:"rejected",reason:e},--a||r(i))}))})),--a||r(i)}));return o.error&&i(o.value),n.promise}});var ug=F,dg=Ce,hg=le,fg=zp,pg=hp,vg=Rh,gg="No one promise resolved";Pn({target:"Promise",stat:!0,forced:Cv},{any:function(e){var t=this,n=hg("AggregateError"),r=fg.f(t),i=r.resolve,o=r.reject,a=pg((function(){var r=dg(t.resolve),a=[],s=0,c=1,l=!1;vg(e,(function(e){var u=s++,d=!1;c++,ug(r,t,e).then((function(e){d||l||(l=!0,i(e))}),(function(e){d||l||(d=!0,a[u]=e,--c||o(new n(a,gg)))}))})),--c||o(new n(a,gg))}));return a.error&&o(a.value),r.promise}});var yg=Pn,mg=fp,_g=c,bg=le,Rg=z,wg=cf,Gg=$v,Tg=mg&&mg.prototype;yg({target:"Promise",proto:!0,real:!0,forced:!!mg&&_g((function(){Tg.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=wg(this,bg("Promise")),n=Rg(e);return this.then(n?function(n){return Gg(t,e()).then((function(){return n}))}:e,n?function(n){return Gg(t,e()).then((function(){throw n}))}:e)}});var kg=ie.Promise,Sg=zp,Eg=hp;Pn({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=Sg.f(this),n=Eg(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}});var Mg=kg,Dg=o(Mg),zg=Pn,Ag=Cn,Pg=_([].reverse),xg=[1,2];zg({target:"Array",proto:!0,forced:String(xg)===String(xg.reverse())},{reverse:function(){return Ag(this)&&(this.length=this.length),Pg(this)}});var Cg=Wu("Array").reverse,Fg=ue,Ig=Cg,Hg=Array.prototype,Og=function(e){var t=e.reverse;return e===Hg||Fg(Hg,e)&&t===Hg.reverse?Ig:t},Lg=o(Og),Xg=Pn,Ug=Cn,Bg=Gr,Ng=re,Vg=ni,jg=Vn,Kg=ee,Wg=Zn,Qg=vt,qg=Ms,Zg=Cr("slice"),Yg=Qg("species"),$g=Array,Jg=Math.max;Xg({target:"Array",proto:!0,forced:!Zg},{slice:function(e,t){var n,r,i,o=Kg(this),a=jg(o),s=Vg(e,a),c=Vg(void 0===t?a:t,a);if(Ug(o)&&(n=o.constructor,(Bg(n)&&(n===$g||Ug(n.prototype))||Ng(n)&&null===(n=n[Yg]))&&(n=void 0),n===$g||void 0===n))return qg(o,s,c);for(r=new(void 0===n?$g:n)(Jg(c-s,0)),i=0;s<c;s++,i++)s in o&&Wg(r,i,o[s]);return r.length=i,r}});var ey=Wu("Array").slice,ty=ue,ny=ey,ry=Array.prototype,iy=function(e){var t=e.slice;return e===ry||ty(ry,e)&&t===ry.slice?ny:t},oy=o(iy);function ay(){ay=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Cu||function(e,t,n){e[t]=n.value},i="function"==typeof au?au:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,n){return Cu(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(E){c=function(e,t,n){return e[t]=n}}function l(e,t,n,i){var o=t&&t.prototype instanceof h?t:h,a=Iu(o.prototype),s=new T(i||[]);return r(a,"_invoke",{value:b(e,n,s)}),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(E){return{type:"throw",arg:E}}}e.wrap=l;var d={};function h(){}function f(){}function p(){}var v={};c(v,o,(function(){return this}));var g=Uu&&Uu(Uu(k([])));g&&g!==t&&n.call(g,o)&&(v=g);var y=p.prototype=h.prototype=Iu(v);function m(e){var t;td(t=["next","throw","return"]).call(t,(function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(r,o,a,s){var c=u(e[r],e,o);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==Su(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(d).then((function(e){l.value=e,a(l)}),(function(e){return i("throw",e,a,s)}))}s(c.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function b(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=R(a,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function R(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,R(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=u(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,d;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t,n={tryLoc:e[0]};1 in e&&(n.catchLoc=e[1]),2 in e&&(n.finallyLoc=e[2],n.afterLoc=e[3]),vd(t=this.tryEntries).call(t,n)}function G(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],td(e).call(e,w,this),this.reset(!0)}function k(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 r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=p,r(y,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:f,configurable:!0}),f.displayName=c(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 yd?yd(e,p):(e.__proto__=p,c(e,s,"GeneratorFunction")),e.prototype=Iu(y),e},e.awrap=function(e){return{__await:e}},m(_.prototype),c(_.prototype,a,(function(){return this})),e.AsyncIterator=_,e.async=function(t,n,r,i,o){void 0===o&&(o=Dg);var a=new _(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},m(y),c(y,s,"Generator"),c(y,o,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)vd(n).call(n,r);return Lg(n).call(n),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=k,T.prototype={constructor:T,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,td(t=this.tryEntries).call(t,G),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+oy(r).call(r,1))&&(this[r]=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 r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):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),d},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),G(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;G(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function sy(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(KTe){return void n(KTe)}s.done?t(c):Dg.resolve(c).then(r,i)}function cy(e){return function(){var t=this,n=arguments;return new Dg((function(r,i){var o=e.apply(t,n);function a(e){sy(o,r,i,a,s,"next",e)}function s(e){sy(o,r,i,a,s,"throw",e)}a(void 0)}))}}Pn({target:"Array",stat:!0},{isArray:Cn});var ly=o(ie.Array.isArray);function uy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var dy=Zd,hy=o(dy),fy=an,py=sh,vy=Jt,gy=F,yy=$e,my=function(e,t,n,r){try{return r?t(fy(n)[0],n[1]):t(n)}catch(KTe){py(e,"throw",KTe)}},_y=Vd,by=Gr,Ry=Vn,wy=Zn,Gy=rh,Ty=Zd,ky=Array,Sy=function(e){var t=yy(e),n=by(this),r=arguments.length,i=r>1?arguments[1]:void 0,o=void 0!==i;o&&(i=vy(i,r>2?arguments[2]:void 0));var a,s,c,l,u,d,h=Ty(t),f=0;if(!h||this===ky&&_y(h))for(a=Ry(t),s=n?new this(a):ky(a);a>f;f++)d=o?i(t[f],f):t[f],wy(s,f,d);else for(u=(l=Gy(t,h)).next,s=n?new this:[];!(c=gy(u,l)).done;f++)d=o?my(l,i,[c.value,f],!0):c.value,wy(s,f,d);return s.length=f,s},Ey=Sy;Pn({target:"Array",stat:!0,forced:!Pv((function(e){Array.from(e)}))},{from:Ey});var My=ie.Array.from,Dy=o(My);function zy(e,t){var n;if(e){if("string"==typeof e)return uy(e,t);var r=oy(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Dy(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?uy(e,t):void 0}}function Ay(e){return function(e){if(ly(e))return uy(e)}(e)||function(e){if(void 0!==au&&null!=hy(e)||null!=e["@@iterator"])return Dy(e)}(e)||zy(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 Py(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var xy=uo.f("toPrimitive"),Cy=o(xy);function Fy(e){var t=function(e,t){if("object"!==Su(e)||null===e)return e;var n=e[Cy];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Su(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Su(t)?t:String(t)}function Iy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Cu(e,Fy(r.key),r)}}function Hy(e,t,n){return t&&Iy(e.prototype,t),n&&Iy(e,n),Cu(e,"prototype",{writable:!1}),e}function Oy(e,t,n){return(t=Fy(t))in e?Cu(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ly=ie.Object.getOwnPropertySymbols,Xy=o(Ly),Uy=Pn,By=si.indexOf,Ny=Nu,Vy=S([].indexOf),jy=!!Vy&&1/Vy([1],1,-0)<0;Uy({target:"Array",proto:!0,forced:jy||!Ny("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return jy?Vy(this,e,t)||0:By(this,e,t)}});var Ky=Wu("Array").indexOf,Wy=ue,Qy=Ky,qy=Array.prototype,Zy=function(e){var t=e.indexOf;return e===qy||Wy(qy,e)&&t===qy.indexOf?Qy:t},Yy=o(Zy),$y=$e,Jy=mi;Pn({target:"Object",stat:!0,forced:c((function(){Jy(1)}))},{keys:function(e){return Jy($y(e))}});var em=ie.Object.keys,tm=o(em);function nm(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=tm(e);for(r=0;r<o.length;r++)n=o[r],Yy(t).call(t,n)>=0||(i[n]=e[n]);return i}(e,t);if(Xy){var o=Xy(e);for(r=0;r<o.length;r++)n=o[r],Yy(t).call(t,n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var rm=ia.filter;Pn({target:"Array",proto:!0,forced:!Cr("filter")},{filter:function(e){return rm(this,e,arguments.length>1?arguments[1]:void 0)}});var im=Wu("Array").filter,om=ue,am=im,sm=Array.prototype,cm=function(e){var t=e.filter;return e===sm||om(sm,e)&&t===sm.filter?am:t},lm=o(cm),um={exports:{}},dm=Pn,hm=c,fm=ee,pm=A.f,vm=P;dm({target:"Object",stat:!0,forced:!vm||hm((function(){pm(1)})),sham:!vm},{getOwnPropertyDescriptor:function(e,t){return pm(fm(e),t)}});var gm=ie.Object,ym=um.exports=function(e,t){return gm.getOwnPropertyDescriptor(e,t)};gm.getOwnPropertyDescriptor.sham&&(ym.sham=!0);var mm=um.exports,_m=o(mm),bm=Gd,Rm=ee,wm=A,Gm=Zn;Pn({target:"Object",stat:!0,sham:!P},{getOwnPropertyDescriptors:function(e){for(var t,n,r=Rm(e),i=wm.f,o=bm(r),a={},s=0;o.length>s;)void 0!==(n=i(r,t=o[s++]))&&Gm(a,t,n);return a}});var Tm=ie.Object.getOwnPropertyDescriptors,km=o(Tm),Sm={exports:{}},Em=Pn,Mm=P,Dm=$r.f;Em({target:"Object",stat:!0,forced:Object.defineProperties!==Dm,sham:!Mm},{defineProperties:Dm});var zm=ie.Object,Am=Sm.exports=function(e,t){return zm.defineProperties(e,t)};zm.defineProperties.sham&&(Am.sham=!0);var Pm=Sm.exports,xm=o(Pm);function Cm(e,t){var n=tm(e);if(Xy){var r=Xy(e);t&&(r=lm(r).call(r,(function(t){return _m(e,t).enumerable}))),vd(n).apply(n,r)}return n}function Fm(e){for(var t=1;t<arguments.length;t++){var n,r,i=null!=arguments[t]?arguments[t]:{};t%2?td(n=Cm(Object(i),!0)).call(n,(function(t){Oy(e,t,i[t])})):km?xm(e,km(i)):td(r=Cm(Object(i))).call(r,(function(t){Cu(e,t,_m(i,t))}))}return e}var Im=Wu("Array").concat,Hm=ue,Om=Im,Lm=Array.prototype,Xm=o((function(e){var t=e.concat;return e===Lm||Hm(Lm,e)&&t===Lm.concat?Om:t})),Um=Pn,Bm=ia.find,Nm="find",Vm=!0;Nm in[]&&Array(1)[Nm]((function(){Vm=!1})),Um({target:"Array",proto:!0,forced:Vm},{find:function(e){return Bm(this,e,arguments.length>1?arguments[1]:void 0)}});var jm=Wu("Array").find,Km=ue,Wm=jm,Qm=Array.prototype,qm=o((function(e){var t=e.find;return e===Qm||Km(Qm,e)&&t===Qm.find?Wm:t})),Zm={exports:{}},Ym=c((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),$m=c,Jm=re,e_=G,t_=Ym,n_=Object.isExtensible,r_=$m((function(){n_(1)}))||t_?function(e){return!!Jm(e)&&((!t_||"ArrayBuffer"!=e_(e))&&(!n_||n_(e)))}:n_,i_=!c((function(){return Object.isExtensible(Object.preventExtensions({}))})),o_=Pn,a_=_,s_=ci,c_=re,l_=tt,u_=en.f,d_=Vi,h_=Wi,f_=r_,p_=i_,v_=!1,g_=at("meta"),y_=0,m_=function(e){u_(e,g_,{value:{objectID:"O"+y_++,weakData:{}}})},__=Zm.exports={enable:function(){__.enable=function(){},v_=!0;var e=d_.f,t=a_([].splice),n={};n[g_]=1,e(n).length&&(d_.f=function(n){for(var r=e(n),i=0,o=r.length;i<o;i++)if(r[i]===g_){t(r,i,1);break}return r},o_({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:h_.f}))},fastKey:function(e,t){if(!c_(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!l_(e,g_)){if(!f_(e))return"F";if(!t)return"E";m_(e)}return e[g_].objectID},getWeakData:function(e,t){if(!l_(e,g_)){if(!f_(e))return!0;if(!t)return!1;m_(e)}return e[g_].weakData},onFreeze:function(e){return p_&&v_&&f_(e)&&!l_(e,g_)&&m_(e),e}};s_[g_]=!0;var b_=Zm.exports,R_=Pn,w_=s,G_=b_,T_=c,k_=bn,S_=Rh,E_=$h,M_=z,D_=re,z_=Co,A_=en.f,P_=ia.forEach,x_=P,C_=Zo.set,F_=Zo.getterFor,I_=function(e,t,n){var r,i=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),a=i?"set":"add",s=w_[e],c=s&&s.prototype,l={};if(x_&&M_(s)&&(o||c.forEach&&!T_((function(){(new s).entries().next()})))){var u=(r=t((function(t,n){C_(E_(t,u),{type:e,collection:new s}),null!=n&&S_(n,t[a],{that:t,AS_ENTRIES:i})}))).prototype,d=F_(e);P_(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in c)||o&&"clear"==e||k_(u,e,(function(n,r){var i=d(this).collection;if(!t&&o&&!D_(n))return"get"==e&&void 0;var a=i[e](0===n?0:n,r);return t?this:a}))})),o||A_(u,"size",{configurable:!0,get:function(){return d(this).collection.size}})}else r=n.getConstructor(t,e,i,a),G_.enable();return z_(r,e,!1,!0),l[e]=r,R_({global:!0,forced:!0},l),o||n.setStrong(r,e,i),r},H_=so,O_=function(e,t,n){for(var r in t)n&&n.unsafe&&e[r]?e[r]=t[r]:H_(e,r,t[r],n);return e},L_=Ni,X_=lo,U_=O_,B_=Jt,N_=$h,V_=Q,j_=Rh,K_=ml,W_=_l,Q_=qh,q_=P,Z_=b_.fastKey,Y_=Zo.set,$_=Zo.getterFor,J_={getConstructor:function(e,t,n,r){var i=e((function(e,i){N_(e,o),Y_(e,{type:t,index:L_(null),first:void 0,last:void 0,size:0}),q_||(e.size=0),V_(i)||j_(i,e[r],{that:e,AS_ENTRIES:n})})),o=i.prototype,a=$_(t),s=function(e,t,n){var r,i,o=a(e),s=c(e,t);return s?s.value=n:(o.last=s={index:i=Z_(t,!0),key:t,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=s),r&&(r.next=s),q_?o.size++:e.size++,"F"!==i&&(o.index[i]=s)),e},c=function(e,t){var n,r=a(e),i=Z_(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return U_(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,q_?e.size=0:this.size=0},delete:function(e){var t=this,n=a(t),r=c(t,e);if(r){var i=r.next,o=r.previous;delete n.index[r.index],r.removed=!0,o&&(o.next=i),i&&(i.previous=o),n.first==r&&(n.first=i),n.last==r&&(n.last=o),q_?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=a(this),r=B_(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!c(this,e)}}),U_(o,n?{get:function(e){var t=c(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)}}),q_&&X_(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(e,t,n){var r=t+" Iterator",i=$_(t),o=$_(r);K_(e,t,(function(e,t){Y_(this,{type:r,target:e,state:i(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)?W_("keys"==t?n.key:"values"==t?n.value:[n.key,n.value],!1):(e.target=void 0,W_(void 0,!0))}),n?"entries":"values",!n,!0),Q_(t)}};I_("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),J_);var eb=ie.Map,tb=Jt,nb=F,rb=Ce,ib=nf,ob=Q,ab=Rh,sb=[].push,cb=function(e){var t,n,r,i,o=arguments.length,a=o>1?arguments[1]:void 0;return ib(this),(t=void 0!==a)&&rb(a),ob(e)?new this:(n=[],t?(r=0,i=tb(a,o>2?arguments[2]:void 0),ab(e,(function(e){nb(sb,n,i(e,r++))}))):ab(e,sb,{that:n}),new this(n))};Pn({target:"Map",stat:!0,forced:!0},{from:cb});var lb=Ms,ub=function(){return new this(lb(arguments))};Pn({target:"Map",stat:!0,forced:!0},{of:ub});var db=ze,hb=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(db(e)+" is not a map")},fb=function(e,t){return 1==t?function(t,n){return t[e](n)}:function(t,n,r){return t[e](n,r)}},pb=fb,vb=le("Map"),gb={Map:vb,set:pb("set",2),get:pb("get",1),has:pb("has",1),remove:pb("delete",1),proto:vb.prototype},yb=hb,mb=gb.remove;Pn({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=yb(this),n=!0,r=0,i=arguments.length;r<i;r++)e=mb(t,arguments[r]),n=n&&e;return!!n}});var _b=hb,bb=gb.get,Rb=gb.has,wb=gb.set;Pn({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var n,r,i=_b(this);return Rb(i,e)?(n=bb(i,e),"update"in t&&(n=t.update(n,e,i),wb(i,e,n)),n):(r=t.insert(e,i),wb(i,e,r),r)}});var Gb=F,Tb=function(e,t,n){for(var r,i,o=n||e.next;!(r=Gb(o,e)).done;)if(void 0!==(i=t(r.value)))return i},kb=Tb,Sb=function(e,t,n){return n?kb(e.entries(),(function(e){return t(e[1],e[0])})):e.forEach(t)},Eb=Jt,Mb=hb,Db=Sb;Pn({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=Mb(this),n=Eb(e,arguments.length>1?arguments[1]:void 0);return!1!==Db(t,(function(e,r){if(!n(e,r,t))return!1}),!0)}});var zb=Jt,Ab=hb,Pb=Sb,xb=gb.Map,Cb=gb.set;Pn({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=Ab(this),n=zb(e,arguments.length>1?arguments[1]:void 0),r=new xb;return Pb(t,(function(e,i){n(e,i,t)&&Cb(r,i,e)})),r}});var Fb=Jt,Ib=hb,Hb=Sb;Pn({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=Ib(this),n=Fb(e,arguments.length>1?arguments[1]:void 0),r=Hb(t,(function(e,r){if(n(e,r,t))return{value:e}}),!0);return r&&r.value}});var Ob=Jt,Lb=hb,Xb=Sb;Pn({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=Lb(this),n=Ob(e,arguments.length>1?arguments[1]:void 0),r=Xb(t,(function(e,r){if(n(e,r,t))return{key:r}}),!0);return r&&r.key}});var Ub=Pn,Bb=F,Nb=z,Vb=Ce,jb=Rh,Kb=gb.Map,Wb=_([].push);Ub({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){var n=new(Nb(this)?this:Kb);Vb(t);var r=Vb(n.has),i=Vb(n.get),o=Vb(n.set);return jb(e,(function(e){var a=t(e);Bb(r,n,a)?Wb(Bb(i,n,a),e):Bb(o,n,a,[e])})),n}});var Qb=function(e,t){return e===t||e!=e&&t!=t},qb=hb,Zb=Sb;Pn({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===Zb(qb(this),(function(t){if(Qb(t,e))return!0}),!0)}});var Yb=F,$b=Rh,Jb=z,eR=Ce,tR=gb.Map;Pn({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var n=new(Jb(this)?this:tR);eR(t);var r=eR(n.set);return $b(e,(function(e){Yb(r,n,t(e),e)})),n}});var nR=hb,rR=Sb;Pn({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=rR(nR(this),(function(t,n){if(t===e)return{key:n}}),!0);return t&&t.key}});var iR=Jt,oR=hb,aR=Sb,sR=gb.Map,cR=gb.set;Pn({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=oR(this),n=iR(e,arguments.length>1?arguments[1]:void 0),r=new sR;return aR(t,(function(e,i){cR(r,n(e,i,t),e)})),r}});var lR=Jt,uR=hb,dR=Sb,hR=gb.Map,fR=gb.set;Pn({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=uR(this),n=lR(e,arguments.length>1?arguments[1]:void 0),r=new hR;return dR(t,(function(e,i){fR(r,i,n(e,i,t))})),r}});var pR=hb,vR=Rh,gR=gb.set;Pn({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=pR(this),n=arguments.length,r=0;r<n;)vR(arguments[r++],(function(e,n){gR(t,e,n)}),{AS_ENTRIES:!0});return t}});var yR=Ce,mR=hb,_R=Sb,bR=TypeError;Pn({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=mR(this),n=arguments.length<2,r=n?void 0:arguments[1];if(yR(e),_R(t,(function(i,o){n?(n=!1,r=i):r=e(r,i,o,t)})),n)throw bR("Reduce of empty map with no initial value");return r}});var RR=Jt,wR=hb,GR=Sb;Pn({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=wR(this),n=RR(e,arguments.length>1?arguments[1]:void 0);return!0===GR(t,(function(e,r){if(n(e,r,t))return!0}),!0)}});var TR=Ce,kR=hb,SR=TypeError,ER=gb.get,MR=gb.has,DR=gb.set;Pn({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var n=kR(this),r=arguments.length;TR(t);var i=MR(n,e);if(!i&&r<3)throw SR("Updating absent value");var o=i?ER(n,e):TR(r>2?arguments[2]:void 0)(e,n);return DR(n,e,t(o,e,n)),n}});var zR=F,AR=Ce,PR=z,xR=an,CR=TypeError,FR=function(e,t){var n,r=xR(this),i=AR(r.get),o=AR(r.has),a=AR(r.set),s=arguments.length>2?arguments[2]:void 0;if(!PR(t)&&!PR(s))throw CR("At least one callback required");return zR(o,r,e)?(n=zR(i,r,e),PR(t)&&(n=t(n),zR(a,r,e,n))):PR(s)&&(n=s(),zR(a,r,e,n)),n};Pn({target:"Map",proto:!0,real:!0,forced:!0},{upsert:FR}),Pn({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:FR});var IR=eb,HR=o(IR),OR=o(IR),LR=ia.map;Pn({target:"Array",proto:!0,forced:!Cr("map")},{map:function(e){return LR(this,e,arguments.length>1?arguments[1]:void 0)}});var XR=Wu("Array").map,UR=ue,BR=XR,NR=Array.prototype,VR=o((function(e){var t=e.map;return e===NR||UR(NR,e)&&t===NR.map?BR:t})),jR=o(Mg),KR=o(Zy),WR=o(em),QR=o(iy),qR=ze,ZR=TypeError,YR=function(e,t){if(!delete e[t])throw ZR("Cannot delete property "+qR(t)+" of "+qR(e))},$R=Pn,JR=$e,ew=ni,tw=Ln,nw=Vn,rw=ad,iw=Kn,ow=zr,aw=Zn,sw=YR,cw=Cr("splice"),lw=Math.max,uw=Math.min;$R({target:"Array",proto:!0,forced:!cw},{splice:function(e,t){var n,r,i,o,a,s,c=JR(this),l=nw(c),u=ew(e,l),d=arguments.length;for(0===d?n=r=0:1===d?(n=0,r=l-u):(n=d-2,r=uw(lw(tw(t),0),l-u)),iw(l+n-r),i=ow(c,r),o=0;o<r;o++)(a=u+o)in c&&aw(i,o,c[a]);if(i.length=r,n<r){for(o=u;o<l-r;o++)s=o+n,(a=o+r)in c?c[s]=c[a]:sw(c,s);for(o=l;o>l-r+n;o--)sw(c,o-1)}else if(n>r)for(o=l-r;o>u;o--)s=o+n-1,(a=o+r-1)in c?c[s]=c[a]:sw(c,s);for(o=0;o<n;o++)c[o+u]=arguments[o+2];return rw(c,l-r+n),i}});var dw=Wu("Array").splice,hw=ue,fw=dw,pw=Array.prototype,vw=o((function(e){var t=e.splice;return e===pw||hw(pw,e)&&t===pw.splice?fw:t}));Pn({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var gw=o(ie.Number.isNaN),yw="\t\n\v\f\r                 \u2028\u2029\ufeff",mw=Y,_w=Yr,bw=yw,Rw=_("".replace),ww=RegExp("^["+bw+"]+"),Gw=RegExp("(^|[^"+bw+"])["+bw+"]+$"),Tw=function(e){return function(t){var n=_w(mw(t));return 1&e&&(n=Rw(n,ww,"")),2&e&&(n=Rw(n,Gw,"$1")),n}},kw={start:Tw(1),end:Tw(2),trim:Tw(3)},Sw=s,Ew=c,Mw=_,Dw=Yr,zw=kw.trim,Aw=yw,Pw=Sw.parseInt,xw=Sw.Symbol,Cw=xw&&xw.iterator,Fw=/^[+-]?0x/i,Iw=Mw(Fw.exec),Hw=8!==Pw(Aw+"08")||22!==Pw(Aw+"0x16")||Cw&&!Ew((function(){Pw(Object(Cw))}))?function(e,t){var n=zw(Dw(e));return Pw(n,t>>>0||(Iw(Fw,n)?16:10))}:Pw;Pn({global:!0,forced:parseInt!=Hw},{parseInt:Hw});var Ow=o(ie.parseInt),Lw=Wu("Array").keys,Xw=or,Uw=tt,Bw=ue,Nw=Lw,Vw=Array.prototype,jw={DOMTokenList:!0,NodeList:!0},Kw=o((function(e){var t=e.keys;return e===Vw||Bw(Vw,e)&&t===Vw.keys||Uw(jw,Xw(e))?Nw:t})),Ww=o(cm),Qw=P,qw=_,Zw=F,Yw=c,$w=mi,Jw=oo,eG=I,tG=$e,nG=W,rG=Object.assign,iG=Object.defineProperty,oG=qw([].concat),aG=!rG||Yw((function(){if(Qw&&1!==rG({b:1},rG(iG({},"a",{enumerable:!0,get:function(){iG(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=rG({},e)[n]||$w(rG({},t)).join("")!=r}))?function(e,t){for(var n=tG(e),r=arguments.length,i=1,o=Jw.f,a=eG.f;r>i;)for(var s,c=nG(arguments[i++]),l=o?oG($w(c),o(c)):$w(c),u=l.length,d=0;u>d;)s=l[d++],Qw&&!Zw(a,c,s)||(n[s]=c[s]);return n}:rG,sG=aG;Pn({target:"Object",stat:!0,arity:2,forced:Object.assign!==sG},{assign:sG});var cG=o(ie.Object.assign),lG=o(Ly),uG=o(mm),dG=o(Tm),hG=o(Pm),fG=o(xu),pG=o(ou),vG=o(Tu),gG=o(gd),yG=o(Xu),mG=_,_G=Ce,bG=re,RG=tt,wG=Ms,GG=l,TG=Function,kG=mG([].concat),SG=mG([].join),EG={},MG=GG?TG.bind:function(e){var t=_G(this),n=t.prototype,r=wG(arguments,1),i=function(){var n=kG(r,wG(arguments));return this instanceof i?function(e,t,n){if(!RG(EG,t)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";EG[t]=TG("C,a","return new C("+SG(r,",")+")")}return EG[t](e,n)}(t,n.length,n):t.apply(e,n)};return bG(n)&&(i.prototype=n),i},DG=Pn,zG=p,AG=MG,PG=nf,xG=an,CG=re,FG=Ni,IG=c,HG=le("Reflect","construct"),OG=Object.prototype,LG=[].push,XG=IG((function(){function e(){}return!(HG((function(){}),[],e)instanceof e)})),UG=!IG((function(){HG((function(){}))})),BG=XG||UG;DG({target:"Reflect",stat:!0,forced:BG,sham:BG},{construct:function(e,t){PG(e),xG(t);var n=arguments.length<3?e:PG(arguments[2]);if(UG&&!XG)return HG(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 r=[null];return zG(LG,r,t),new(zG(AG,e,r))}var i=n.prototype,o=FG(CG(i)?i:OG),a=zG(e,o,t);return CG(a)?a:o}});var NG=ie.Reflect.construct,VG=o(NG),jG=o(NG),KG=tt,WG=F,QG=re,qG=an,ZG=function(e){return void 0!==e&&(KG(e,"value")||KG(e,"writable"))},YG=A,$G=Dc;Pn({target:"Reflect",stat:!0},{get:function e(t,n){var r,i,o=arguments.length<3?t:arguments[2];return qG(t)===o?t[n]:(r=YG.f(t,n))?ZG(r)?r.value:void 0===r.get?void 0:WG(r.get,o):QG(i=$G(t))?e(i,n,o):void 0}});var JG=ie.Reflect.get,eT=o(JG),tT=o(JG),nT=o(dy),rT=o(My),iT=o(xy);function oT(e,t){var n=WR(e);if(lG){var r=lG(e);t&&(r=Ww(r).call(r,(function(t){return uG(e,t).enumerable}))),n.push.apply(n,r)}return n}function aT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oT(Object(n),!0).forEach((function(t){dT(e,t,n[t])})):dG?hG(e,dG(n)):oT(Object(n)).forEach((function(t){fG(e,t,uG(n,t))}))}return e}function sT(e){return(sT="function"==typeof pG&&"symbol"==typeof vG?function(e){return typeof e}:function(e){return e&&"function"==typeof pG&&e.constructor===pG&&e!==pG.prototype?"symbol":typeof e})(e)}function cT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),fG(e,RT(r.key),r)}}function uT(e,t,n){return t&&lT(e.prototype,t),n&&lT(e,n),fG(e,"prototype",{writable:!1}),e}function dT(e,t,n){return(t=RT(t))in e?fG(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hT(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}}),fG(e,"prototype",{writable:!1}),t&&pT(e,t)}function fT(e){return(fT=gG?yG.bind():function(e){return e.__proto__||yG(e)})(e)}function pT(e,t){return(pT=gG?gG.bind():function(e,t){return e.__proto__=t,e})(e,t)}function vT(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gT(e,t){if(t&&("object"===Su(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return vT(e)}function yT(e){var t=function(){if("undefined"==typeof Reflect||!jG)return!1;if(jG.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(jG(Boolean,[],(function(){}))),!0}catch(oK){return!1}}();return function(){var n,r=fT(e);if(t){var i=fT(this).constructor;n=jG(r,arguments,i)}else n=r.apply(this,arguments);return gT(this,n)}}function mT(){return mT="undefined"!=typeof Reflect&&tT?tT.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=fT(e)););return e}(e,t);if(r){var i=uG(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},mT.apply(this,arguments)}function _T(e){return function(e){if(Array.isArray(e))return bT(e)}(e)||function(e){if(void 0!==pG&&null!=nT(e)||null!=e["@@iterator"])return rT(e)}(e)||function(e,t){var n;if(!e)return;if("string"==typeof e)return bT(e,t);var r=QR(n=Object.prototype.toString.call(e)).call(n,8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return rT(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bT(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 bT(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function RT(e){var t=function(e,t){if("object"!==Su(e)||null===e)return e;var n=e[iT];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Su(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Su(t)?t:String(t)}var wT={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||e,a),c=n?n+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?QR(r).call(r,1):r);return lG?Xm(i).call(i,lG(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,i,o,a){var s=n?n+e:e;if(!this._events[s])return!1;var c,l,u=this._events[s],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){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,r),!0;case 4:return u.fn.call(u.context,t,r,i),!0;case 5:return u.fn.call(u.context,t,r,i,o),!0;case 6:return u.fn.call(u.context,t,r,i,o,a),!0}for(l=1,c=new Array(d-1);l<d;l++)c[l-1]=arguments[l];u.fn.apply(u.context,c)}else{var h,f=u.length;for(l=0;l<f;l++)switch(u[l].once&&this.removeListener(e,u[l].fn,void 0,!0),d){case 1:u[l].fn.call(u[l].context);break;case 2:u[l].fn.call(u[l].context,t);break;case 3:u[l].fn.call(u[l].context,t,r);break;case 4:u[l].fn.call(u[l].context,t,r,i);break;default:if(!c)for(h=1,c=new Array(d-1);h<d;h++)c[h-1]=arguments[h];u[l].fn.apply(u[l].context,c)}}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,r,i){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||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var c=0,l=[],u=s.length;c<u;c++)(s[c].fn!==t||i&&!s[c].once||r&&s[c].context!==r)&&l.push(s[c]);l.length?this._events[o]=1===l.length?l[0]:l: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 r,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}(wT);var GT=wT.exports,TT=o(GT),kT=Ln,ST=Yr,ET=Y,MT=RangeError,DT=function(e){var t=ST(ET(this)),n="",r=kT(e);if(r<0||r==1/0)throw MT("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n},zT=_,AT=Bn,PT=Yr,xT=Y,CT=zT(DT),FT=zT("".slice),IT=Math.ceil,HT=function(e){return function(t,n,r){var i,o,a=PT(xT(t)),s=AT(n),c=a.length,l=void 0===r?" ":PT(r);return s<=c||""==l?a:((o=CT(l,IT((i=s-c)/l.length))).length>i&&(o=FT(o,0,i)),e?a+o:o+a)}},OT={start:HT(!1),end:HT(!0)},LT=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(de),XT=OT.start;Pn({target:"String",proto:!0,forced:LT},{padStart:function(e){return XT(this,e,arguments.length>1?arguments[1]:void 0)}});var UT=Wu("String").padStart,BT=ue,NT=UT,VT=String.prototype,jT=o((function(e){var t=e.padStart;return"string"==typeof e||e===VT||BT(VT,e)&&t===VT.padStart?NT:t})),KT=s,WT=c,QT=Yr,qT=kw.trim,ZT=yw,YT=_("".charAt),$T=KT.parseFloat,JT=KT.Symbol,ek=JT&&JT.iterator,tk=1/$T(ZT+"-0")!=-1/0||ek&&!WT((function(){$T(Object(ek))}))?function(e){var t=qT(QT(e)),n=$T(t);return 0===n&&"-"==YT(t,0)?-0:n}:$T;Pn({global:!0,forced:parseFloat!=tk},{parseFloat:tk});var nk=o(ie.parseFloat),rk=bc.PROPER,ik=c,ok=yw,ak=kw.trim;Pn({target:"String",proto:!0,forced:function(e){return ik((function(){return!!ok[e]()||"​…᠎"!=="​…᠎"[e]()||rk&&ok[e].name!==e}))}("trim")},{trim:function(){return ak(this)}});var sk=Wu("String").trim,ck=ue,lk=sk,uk=String.prototype,dk=o((function(e){var t=e.trim;return"string"==typeof e||e===uk||ck(uk,e)&&t===uk.trim?lk:t})),hk=Ji,fk=Math.floor,pk=function(e,t){var n=e.length,r=fk(n/2);return n<8?vk(e,t):gk(e,pk(hk(e,0,r),t),pk(hk(e,r),t),t)},vk=function(e,t){for(var n,r,i=e.length,o=1;o<i;){for(r=o,n=e[o];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==o++&&(e[r]=n)}return e},gk=function(e,t,n,r){for(var i=t.length,o=n.length,a=0,s=0;a<i||s<o;)e[a+s]=a<i&&s<o?r(t[a],n[s])<=0?t[a++]:n[s++]:a<i?t[a++]:n[s++];return e},yk=pk,mk=de.match(/firefox\/(\d+)/i),_k=!!mk&&+mk[1],bk=/MSIE|Trident/.test(de),Rk=de.match(/AppleWebKit\/(\d+)\./),wk=!!Rk&&+Rk[1],Gk=Pn,Tk=_,kk=Ce,Sk=$e,Ek=Vn,Mk=YR,Dk=Yr,zk=c,Ak=yk,Pk=Nu,xk=_k,Ck=bk,Fk=me,Ik=wk,Hk=[],Ok=Tk(Hk.sort),Lk=Tk(Hk.push),Xk=zk((function(){Hk.sort(void 0)})),Uk=zk((function(){Hk.sort(null)})),Bk=Pk("sort"),Nk=!zk((function(){if(Fk)return Fk<70;if(!(xk&&xk>3)){if(Ck)return!0;if(Ik)return Ik<603;var e,t,n,r,i="";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(r=0;r<47;r++)Hk.push({k:t+r,v:n})}for(Hk.sort((function(e,t){return t.v-e.v})),r=0;r<Hk.length;r++)t=Hk[r].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));Gk({target:"Array",proto:!0,forced:Xk||!Uk||!Bk||!Nk},{sort:function(e){void 0!==e&&kk(e);var t=Sk(this);if(Nk)return void 0===e?Ok(t):Ok(t,e);var n,r,i=[],o=Ek(t);for(r=0;r<o;r++)r in t&&Lk(i,t[r]);for(Ak(i,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:Dk(t)>Dk(n)?1:-1}}(e)),n=Ek(i),r=0;r<n;)t[r]=i[r++];for(;r<o;)Mk(t,r++);return t}});var Vk,jk=Wu("Array").sort,Kk=ue,Wk=jk,Qk=Array.prototype,qk=o((function(e){var t=e.sort;return e===Qk||Kk(Qk,e)&&t===Qk.sort?Wk:t})),Zk="undefined"!=typeof window&&window.location&&KR(Vk=window.location.href).call(Vk,"xgplayerdebugger=1")>-1,Yk="color: #525252; background-color: #90ee90;",$k="color: #525252; background-color: red;",Jk="color: #525252; background-color: yellow; ",eS="%c[xgplayer]",tS={config:{debug:Zk?3:0},logInfo:function(e){for(var t,n,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];this.config.debug>=3&&(n=console).log.apply(n,Xm(t=[eS,Yk,e]).call(t,i))},logWarn:function(e){for(var t,n,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];this.config.debug>=1&&(n=console).warn.apply(n,Xm(t=[eS,Jk,e]).call(t,i))},logError:function(e){var t,n;if(!(this.config.debug<1)){for(var r=this.config.debug>=2?"trace":"error",i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];(n=console)[r].apply(n,Xm(t=[eS,$k,e]).call(t,o))}}};var nS=function(){function e(t){cT(this,e),this.bufferedList=t}return uT(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}(),rS={};function iS(e){var t=sT(e);return null!==e&&("object"===t||"function"===t)}function oS(e,t,n){var r,i,o,a,s,c,l=0,u=!1,d=!1,h=!0,f=!t&&0!==t&&"function"==typeof window.requestAnimationFrame;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=r,o=i;return r=i=void 0,l=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-c;return void 0===c||n>=t||n<0||d&&e-l>=o}function y(){var e=Date.now();if(g(e))return m(e);s=v(y,function(e){var n=e-l,r=t-(e-c);return d?Math.min(r,o-n):r}(e))}function m(e){return s=void 0,h&&r?p(e):(r=i=void 0,a)}function _(){for(var e=Date.now(),n=g(e),o=arguments.length,h=new Array(o),f=0;f<o;f++)h[f]=arguments[f];if(r=h,i=this,c=e,n){if(void 0===s)return function(e){return l=e,s=v(y,t),u?p(e):a}(c);if(d)return s=v(y,t),p(c)}return void 0===s&&(s=v(y,t)),a}return t=+t||0,iS(n)&&(u=!!n.leading,o=(d="maxWait"in n)?Math.max(+n.maxWait||0,t):o,h="trailing"in n?!!n.trailing:h),_.cancel=function(){void 0!==s&&function(e){if(f)return window.cancelAnimationFrame(e);clearTimeout(e)}(s),l=0,r=c=i=s=void 0},_.flush=function(){return void 0===s?a:m(Date.now())},_.pending=function(){return void 0!==s},_}function aS(){var e=(document.documentElement.getAttribute("lang")||navigator.language||"zh-cn").toLocaleLowerCase();return"zh-cn"===e&&(e="zh"),e}rS.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]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=document.createElement(e);return i.className=r,i.innerHTML=t,WR(n).forEach((function(t){var r=t,o=n[t];"video"===e||"audio"===e||"live-video"===e?o&&i.setAttribute(r,o):i.setAttribute(r,o)})),i},rS.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 r=document.createElement("div");r.innerHTML=e;var i=r.children;return r=null,i.length>0?(i=i[0],n&&rS.addClass(i,n),t&&WR(t).forEach((function(e){i.setAttribute(e,t[e])})),i):null}catch(o){return tS.logError("util.createDomFromHtml",o),null}},rS.hasClass=function(e,t){if(!e||!t)return!1;try{return Array.prototype.some.call(e.classList,(function(e){return e===t}))}catch(oK){var n=e.className&&"object"===sT(e.className)?e.getAttribute("class"):e.className;return n&&!!n.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}},rS.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(oK){rS.hasClass(e,t)||(e.className&&"object"===sT(e.className)?e.setAttribute("class",e.getAttribute("class")+" "+t):e.className+=" "+t)}},rS.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(oK){rS.hasClass(e,t)&&t.split(/\s+/g).forEach((function(t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className&&"object"===sT(e.className)?e.setAttribute("class",e.getAttribute("class").replace(n," ")):e.className=e.className.replace(n," ")}))}},rS.toggleClass=function(e,t){e&&t.split(/\s+/g).forEach((function(t){rS.hasClass(e,t)?rS.removeClass(e,t):rS.addClass(e,t)}))},rS.classNames=function(){for(var e=arguments,t=[],n=function(n){if("String"===rS.typeOf(e[n]))t.push(e[n]);else if("Object"===rS.typeOf(e[n])){var r;VR(r=WR(e[n])).call(r,(function(r){e[n][r]&&t.push(r)}))}},r=0;r<arguments.length;r++)n(r);return t.join(" ")},rS.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(oK){tS.logError("util.findDom",oK),0===KR(n).call(n,"#")&&(e=t.getElementById(QR(n).call(n,1)))}return e},rS.getCss=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,!1)[t]},rS.padStart=function(e,t,n){for(var r=String(n),i=t>>0,o=Math.ceil(i/r.length),a=[],s=String(e);o--;)a.push(r);return a.join("").substring(0,i-s.length)+s},rS.format=function(e){if(window.isNaN(e))return"";e=Math.round(e);var t=jT(rS).call(rS,Math.floor(e/3600),2,0),n=jT(rS).call(rS,Math.floor((e-3600*t)/60),2,0),r=jT(rS).call(rS,Math.floor(e-3600*t-60*n),2,0);return("00"===t?[n,r]:[t,n,r]).join(":")},rS.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},rS.typeOf=function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},rS.deepCopy=function(e,t){if("Object"===rS.typeOf(t)&&"Object"===rS.typeOf(e))return WR(t).forEach((function(n){if("Object"!==rS.typeOf(t[n])||t[n]instanceof Node)if("Array"===rS.typeOf(t[n])){var r;e[n]="Array"===rS.typeOf(e[n])?Xm(r=e[n]).call(r,t[n]):t[n]}else e[n]=t[n];else void 0===e[n]||void 0===e[n]?e[n]=t[n]:rS.deepCopy(e[n],t[n])})),e},rS.deepMerge=function(e,t){var n;return VR(n=WR(t)).call(n,(function(n){var r;"Array"===rS.typeOf(t[n])&&"Array"===rS.typeOf(e[n])?"Array"===rS.typeOf(e[n])&&(r=e[n]).push.apply(r,_T(t[n])):rS.typeOf(e[n])!==rS.typeOf(t[n])||null===e[n]||"Object"!==rS.typeOf(e[n])||t[n]instanceof window.Node?null!==t[n]&&(e[n]=t[n]):rS.deepMerge(e[n],t[n])})),e},rS.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},rS.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""},rS.setInterval=function(e,t,n,r){e._interval[t]||(e._interval[t]=window.setInterval(n.bind(e),r))},rS.clearInterval=function(e,t){clearInterval(e._interval[t]),e._interval[t]=null},rS.setTimeout=function(e,t,n){e._timers||(e._timers=[]);var r=setTimeout((function(){t(),rS.clearTimeout(e,r)}),n);return e._timers.push(r),r},rS.clearTimeout=function(e,t){var n=e._timers;if("Array"===rS.typeOf(n)){for(var r=0;r<n.length;r++)if(n[r]===t){vw(n).call(n,r,1),clearTimeout(t);break}}else clearTimeout(t)},rS.clearAllTimers=function(e){var t=e._timers;"Array"===rS.typeOf(t)&&(VR(t).call(t,(function(e){clearTimeout(e)})),e._timerIds=[])},rS.createImgBtn=function(e,t,n,r){var i,o,a,s,c,l,u,d,h,f,p,v=rS.createDom("xg-".concat(e),"",{},"xgplayer-".concat(e,"-img"));(v.style.backgroundImage='url("'.concat(t,'")'),n&&r)&&(["px","rem","em","pt","dp","vw","vh","vm","%"].every((function(e){var t,i;return!(KR(n).call(n,e)>-1&&KR(r).call(r,e)>-1)||(l=nk(dk(t=QR(n).call(n,0,KR(n).call(n,e))).call(t)),u=nk(dk(i=QR(r).call(r,0,KR(r).call(r,e))).call(i)),d=e,!1)})),v.style.width=Xm(i="".concat(l)).call(i,d),v.style.height=Xm(o="".concat(u)).call(o,d),v.style.backgroundSize=Xm(a=Xm(s=Xm(c="".concat(l)).call(c,d," ")).call(s,u)).call(a,d),v.style.margin="start"===e?Xm(h=Xm(f=Xm(p="-".concat(u/2)).call(p,d," auto auto -")).call(f,l/2)).call(h,d):"auto 5px auto 5px");return v},rS.Hex2RGBA=function(e,t){var n,r=[];if(/^\#[0-9A-F]{3}$/i.test(e)){var i="#";e.replace(/[0-9A-F]/gi,(function(e){i+=e+e})),e=i}return/^#[0-9A-F]{6}$/i.test(e)?(e.replace(/[0-9A-F]{2}/gi,(function(e){r.push(Ow(e,16))})),Xm(n="rgba(".concat(r.join(","),", ")).call(n,t,")")):"rgba(255, 255, 255, 0.1)"},rS.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},rS.checkIsFunction=function(e){return e&&"function"==typeof e},rS.checkIsObject=function(e){return null!==e&&"object"===sT(e)},rS.hide=function(e){e.style.display="none"},rS.show=function(e,t){e.style.display=t||"block"},rS.isUndefined=function(e){if(null==e)return!0},rS.isNotNull=function(e){return!(null==e)},rS.setStyleFromCsstext=function(e,t){if(t)if("String"===rS.typeOf(t)){var n=t.replace(/\s+/g,"").split(";");VR(n).call(n,(function(t){if(t){var n=t.split(":");n.length>1&&(e.style[n[0]]=n[1])}}))}else{var r;VR(r=WR(t)).call(r,(function(n){e.style[n]=t[n]}))}},rS.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"],r=e.style.cssText;if(!r)return{};var i=r.replace(/\s+/g,"").split(";"),o={},a={};return VR(i).call(i,(function(e){if(e){var t=e.split(":");t.length>1&&(!function(e,t){for(var n=0,r=t.length;n<r;n++)if(KR(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",""),VR(t=WR(a)).call(t,(function(t){e.style[t]=a[t]})),o},rS.getStyleFromCsstext=function(e){var t=e.style.cssText;if(!t)return{};var n=t.replace(/\s+/g,"").split(";"),r={};return VR(n).call(n,(function(e){if(e){var t=e.split(":");t.length>1&&(r[t[0]]=t[1])}})),r},rS.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 r=new window.Image;r.onload=function(e){r=null,t&&t(e)},r.onerror=function(e){r=null,n&&n(e)},r.src=e}},rS.stopPropagation=function(e){e&&e.stopPropagation()},rS.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},rS.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},rS.checkTouchSupport=function(){return"ontouchstart"in window},rS.getBuffered2=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=[],r=0;r<e.length;r++)n.push({start:e.start(r)<.5?0:e.start(r),end:e.end(r)});qk(n).call(n,(function(e,t){var n=e.start-t.start;return n||t.end-e.end}));var i=[];if(t)for(var o=0;o<n.length;o++){var a=i.length;if(a){var s=i[a-1].end;n[o].start-s<t?n[o].end>s&&(i[a-1].end=n[o].end):i.push(n[o])}else i.push(n[o])}else i=n;return new nS(i)},rS.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}},rS.requestAnimationFrame=function(e){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(t)return t(e)},rS.getHostFromUrl=function(e){if("String"!==rS.typeOf(e))return"";var t=e.split("/"),n="";return t.length>3&&t[2]&&(n=t[2]),n},rS.cancelAnimationFrame=function(e){var t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;t&&t(e)},rS.isMSE=function(e){return e.media&&(e=e.media),!!(e&&e instanceof HTMLMediaElement)&&(/^blob/.test(e.currentSrc)||/^blob/.test(e.src))},rS.isBlob=function(e){return"string"==typeof e&&/^blob/.test(e)},rS.generateSessionId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(new Date).getTime();try{e=Ow(e)}catch(oK){e=0}return t+=e,window.performance&&"function"==typeof window.performance.now&&(t+=Ow(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)}))},rS.createEvent=function(e){var t;return"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},rS.adjustTimeByDuration=function(e,t,n){return t&&e&&(e>t||n&&e<t)?t:e},rS.createPositionBar=function(e,t){var n=rS.createDom("xg-bar","",{"data-index":-1},e);return t.appendChild(n),n},rS.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]:"",r={scale:"".concat(t.scale||1),translate:Xm(e="".concat(t.x||0,"%, ")).call(e,t.y||0,"%"),rotate:"".concat(t.rotate||0,"deg")};return WR(r).forEach((function(e){var t,i=new RegExp("".concat(e,"\\([^\\(]+\\)"),"g"),o=Xm(t="".concat(e,"(")).call(t,r[e],")");i.test(n)?(i.lastIndex=-1,n=n.replace(i,o)):n+="".concat(o," ")})),n},rS.convertDeg=function(e){return Math.abs(e)<=1?360*e:e%360},rS.getIndexByTime=function(e,t){var n=t.length,r=-1;if(n<1)return r;if(e<=t[0].end||n<2)r=0;else if(e>t[n-1].end)r=n-1;else for(var i=1;i<n;i++)if(e>t[i-1].end&&e<=t[i].end){r=i;break}return r},rS.getOffsetCurrentTime=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=-1;if((r=n>=0&&n<t.length?n:rS.getIndexByTime(e,t))<0)return-1;var i=t.length,o=t[r],a=o.start,s=o.end,c=o.cTime,l=o.offset;return e<a?c:e>=a&&e<=s?e-l:e>s&&r>=i-1?s:-1},rS.getCurrentTimeByOffset=function(e,t){var n=-1;if(!t||t.length<0)return e;for(var r=0;r<t.length;r++)if(e<=t[r].duration){n=r;break}if(-1!==n){var i=t[n].start;return n-1<0?i+e:i+(e-t[n-1].duration)}return e};var sS=/(Android)\s([\d.]+)/,cS=/(Version)\/([\d.]+)/,lS=["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"],uS={get device(){return uS.os.isPc?"pc":"mobile"},get browser(){var e,t;if("undefined"==typeof navigator)return"";var n=navigator.userAgent.toLowerCase(),r={ie:/rv:([\d.]+)\) like gecko/,firefox:/firefox\/([\d.]+)/,chrome:/chrome\/([\d.]+)/,opera:/opera.([\d.]+)/,safari:/version\/([\d.]+).*safari/};return Xm(e=[]).call(e,Ww(t=WR(r)).call(t,(function(e){return r[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,r=/(?:Android)/.test(e),i=/(?:Firefox)/.test(e),o=/(?:iPad|PlayBook)/.test(e)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,a=o||r&&!/(?:Mobile)/.test(e)||i&&/(?:Tablet)/.test(e),s=/(?:iPhone)/.test(e)&&!a;return{isTablet:a,isPhone:s,isIpad:o,isIos:s||o,isAndroid:r,isPc:!(s||r||n||a),isSymbian:n,isWindowsPhone:t,isFireFox:i}},get osVersion(){if("undefined"==typeof navigator)return 0;var e=navigator.userAgent,t="",n=(t=/(?:iPhone)|(?:iPad|PlayBook)/.test(e)?cS:sS)?t.exec(e):[];if(n&&n.length>=3){var r=n[2].split(".");return r.length>0?Ow(r[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&&VR(lS).call(lS,(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(KTe){return this._logger.error(e,KTe),!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 jR.resolve(t);if(navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo)return navigator.mediaCapabilities.decodingInfo(e);var n=e.video||{},r=e.audio||{};try{var i=MediaSource.isTypeSupported(n.contentType),o=MediaSource.isTypeSupported(r.contentType);return jR.resolve({supported:i&&o,smooth:!1,powerEfficient:!1})}catch(oK){return jR.resolve(t)}}},dS="3.0.21-rc.21",hS={1:"media",2:"media",3:"media",4:"media",5:"media",6:"media"},fS={1:5101,2:5102,3:5103,4:5104,5:5105,6:5106},pS=uT((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{errorType:"",errorCode:0,errorMessage:"",originError:"",ext:{},mediaError:null};cT(this,e);var r=t&&t.i18n?t.i18n.ERROR_TYPES:null;if(t.media){var i,o=n.mediaError?n.mediaError:t.media.error||{},a=t.duration,s=t.currentTime,c=t.ended,l=t.src,u=t.currentSrc,d=t.media,h=d.readyState,f=d.networkState,p=n.errorCode||o.code;fS[p]&&(p=fS[p]);var v={playerVersion:dS,currentTime:s,duration:a,ended:c,readyState:h,networkState:f,src:l||u,errorType:n.errorType,errorCode:p,message:n.errorMessage||o.message,mediaError:o,originError:n.originError?n.originError.stack:"",host:rS.getHostFromUrl(l||u)};return n.ext&&VR(i=WR(n.ext)).call(i,(function(e){v[e]=n.ext[e]})),v}if(arguments.length>1){for(var g={playerVersion:dS,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=r?(r[arguments[0]]||{}).msg:"",g}})),vS="play",gS="ended",yS="pause",mS="error",_S="seeked",bS="timeupdate",RS="waiting",wS="canplay",GS="durationchange",TS="volumechange",kS="loadeddata",SS="emptied",ES="focus",MS="blur",DS="ready",zS="urlNull",AS="autoplay_started",PS="autoplay_was_prevented",xS="complete",CS="replay",FS="destroy",IS="urlchange",HS="download_speed_change",OS="leaveplayer",LS="enterplayer",XS="loading",US="fullscreen_change",BS="cssFullscreen_change",NS="mini_state_change",VS="definition_change",jS="before_definition_change",KS="after_definition_change",WS="retry",QS="video_resize",qS="pip_change",ZS="playnext",YS="shortcut",$S="user_action",JS="reset",eE="source_error",tE="source_success",nE=["play","playing","ended","pause","error","seeking","seeked","timeupdate","waiting","canplay","canplaythrough","durationchange","volumechange","loadeddata","loadedmetadata","ratechange","progress","loadstart","emptied","stalled","suspend","abort","lowdecode"],rE=Object.freeze({__proto__:null,ABORT:"abort",AFTER_DEFINITION_CHANGE:KS,AUTOPLAY_PREVENTED:PS,AUTOPLAY_STARTED:AS,BEFORE_DEFINITION_CHANGE:jS,BUFFER_CHANGE:"bufferedChange",CANPLAY:wS,CANPLAY_THROUGH:"canplaythrough",COMPLETE:xS,CSS_FULLSCREEN_CHANGE:BS,DEFINITION_CHANGE:VS,DESTROY:FS,DOWNLOAD_SPEED_CHANGE:HS,DURATION_CHANGE:GS,EMPTIED:SS,ENDED:gS,ENTER_PLAYER:LS,ERROR:mS,FPS_STUCK:"fps_stuck",FULLSCREEN_CHANGE:US,LEAVE_PLAYER:OS,LOADED_DATA:kS,LOADED_METADATA:"loadedmetadata",LOADING:XS,LOAD_START:"loadstart",MINI_STATE_CHANGE:NS,PAUSE:yS,PIP_CHANGE:qS,PLAY:vS,PLAYER_BLUR:MS,PLAYER_FOCUS:ES,PLAYING:"playing",PLAYNEXT:ZS,PROGRESS:"progress",RATE_CHANGE:"ratechange",READY:DS,REPLAY:CS,RESET:JS,RETRY:WS,ROTATE:"rotate",SCREEN_SHOT:"screenShot",SEEKED:_S,SEEKING:"seeking",SEI_PARSED:"SEI_PARSED",SHORTCUT:YS,SOURCE_ERROR:eE,SOURCE_SUCCESS:tE,STALLED:"stalled",STATS_EVENTS:{STATS_INFO:"stats_info",STATS_DOWNLOAD:"stats_download",STATS_RESET:"stats_reset"},SUSPEND:"suspend",SWITCH_SUBTITLE:"switch_subtitle",TIME_UPDATE:bS,URL_CHANGE:IS,URL_NULL:zS,USER_ACTION:$S,VIDEO_EVENTS:nE,VIDEO_RESIZE:QS,VOLUME_CHANGE:TS,WAITING:RS,XGLOG:"xglog"});function iE(e,t){this&&this.emit&&("error"===e?this.errorHandler(e,t.error):this.emit(e,t))}var oE=function(e){hT(n,e);var t=yT(n);function n(e){var r;cT(this,n),(r=t.call(this,e))._hasStart=!1,r._currentTime=0,r._duration=0,r._internalOp={},r._lastMuted=!1,r.vtype="MP4",r._rate=-1,r.mediaConfig=cG({},{controls:!1,autoplay:e.autoplay,playsinline:e.playsinline,"x5-playsinline":e.playsinline,"webkit-playsinline":e.playsinline,"x5-video-player-fullscreen":e["x5-video-player-fullscreen"]||e.x5VideoPlayerFullscreen,"x5-video-orientation":e["x5-video-orientation"]||e.x5VideoOrientation,airplay:e.airplay,"webkit-airplay":e.airplay,tabindex:0|e.tabindex,mediaType:e.mediaType||"video","data-index":-1},e.videoConfig,e.videoAttributes);var i=e["x5-video-player-type"]||e.x5VideoPlayerType;return uS.isWeixin&&uS.os.isAndroid&&i&&(r.mediaConfig["x5-video-player-type"]=i,delete r.mediaConfig.playsinline,delete r.mediaConfig["webkit-playsinline"],delete r.mediaConfig["x5-playsinline"]),e.loop&&(r.mediaConfig.loop="loop"),e.autoplayMuted&&!Object.prototype.hasOwnProperty.call(r.mediaConfig,"muted")&&(r.mediaConfig.muted=!0),r.media=e.mediaEl instanceof HTMLMediaElement?e.mediaEl:"function"==typeof e.mediaEl?e.mediaEl(r.mediaConfig):rS.createDom(r.mediaConfig.mediaType,"",r.mediaConfig,""),e.defaultPlaybackRate&&(r.media.defaultPlaybackRate=r.media.playbackRate=e.defaultPlaybackRate),"Number"===rS.typeOf(e.volume)&&(r.volume=e.volume),e.autoplayMuted&&(r.media.muted=!0,r._lastMuted=!0),e.autoplay&&(r.media.autoplay=!0),e.playsinline&&(r.media.playsinline=!0),r._interval={},r.mediaEventMiddleware={},r.attachVideoEvents(),r}return uT(n,[{key:"setEventsMiddleware",value:function(e){var t,n=this;VR(t=WR(e)).call(t,(function(t){n.mediaEventMiddleware[t]=e[t]}))}},{key:"removeEventsMiddleware",value:function(e){var t,n=this;VR(t=WR(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=VR(nE).call(nE,(function(t){var n,r=Xm(n="on".concat(t.charAt(0).toUpperCase())).call(n,QR(t).call(t,1));return"function"==typeof e[r]&&e.on(t,e[r]),dT({},t,function(e,t){return function(n,r){var i={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:rS.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&&(i.isMutedChange=t._lastMuted!==t.muted,t._lastMuted=t.muted),"error"===e&&(i.error=r||t.video.error),t.mediaEventMiddleware[e]){var a=iE.bind(t,e,i);try{t.mediaEventMiddleware[e].call(t,i,a)}catch(s){throw iE.call(t,e,i),s}}else iE.call(t,e,i)}}(t,e))}))),this._evHandlers.forEach((function(e){var n=WR(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=WR(e)[0];t.removeEventListener(n,e[n],!1)})),this._evHandlers.forEach((function(t){var n,r=WR(t)[0],i=Xm(n="on".concat(r.charAt(0).toUpperCase())).call(n,QR(r).call(r,1));"function"==typeof e[i]&&e.off(r,e[i])})),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(rS.createDom("source","",{src:"".concat(e.src),type:"".concat(e.type||""),"data-index":t+1}))}));var r=e.children;if(r){this._videoSourceCount=r.length,this._videoSourceIndex=r.length,this._vLoadeddata=function(e){n.emit(tE,{src:e.target.currentSrc,host:rS.getHostFromUrl(e.target.currentSrc)})};for(var i=null,o=0;o<this._evHandlers.length;o++)if("error"===WR(this._evHandlers[o])[0]){i=this._evHandlers[o];break}!this._sourceError&&(this._sourceError=function(e){var t=Ow(e.target.getAttribute("data-index"),10);if(n._videoSourceIndex--,0===n._videoSourceIndex||t>=n._videoSourceCount){var r={code:4,message:"sources_load_error"};i?i.error(e,r):n.errorHandler("error",r)}var o=hS[4];n.emit(eE,new pS(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<r.length;a++)r[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,r=n.code?hS[n.code]:"other";n.message;this.media.currentSrc||this.media.srcObject||(n={code:6,message:"empty_src"}),this.emit(e,new pS(this,{errorType:r,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 r=0,i=e.length;r<i&&(t[0]=e.start(r),t[1]=e.end(r),!(t[0]<=n&&n<=t[1]));r++);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?rS.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(IS,e),this.emit(RS),this._currentTime=0,this._duration=0,rS.isMSE(this.media)?this.onWaiting():(this._detachSourceEvents(this.media),"Array"===rS.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 r,i,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(i=mT(fT(n.prototype),"emit",this)).call.apply(i,Xm(r=[this,e,t]).call(r,a))}},{key:"on",value:function(e,t){for(var r,i,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(i=mT(fT(n.prototype),"on",this)).call.apply(i,Xm(r=[this,e,t]).call(r,a))}},{key:"once",value:function(e,t){for(var r,i,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(i=mT(fT(n.prototype),"once",this)).call.apply(i,Xm(r=[this,e,t]).call(r,a))}},{key:"off",value:function(e,t){for(var r,i,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=arguments[s];(i=mT(fT(n.prototype),"off",this)).call.apply(i,Xm(r=[this,e,t]).call(r,a))}},{key:"offAll",value:function(){mT(fT(n.prototype),"removeAllListeners",this).call(this)}}]),n}(TT),aE=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"}};cT(this,e),this.indexedDB=window.indexedDB||window.webkitindexedDB,this.IDBKeyRange=window.IDBKeyRange||window.webkitIDBKeyRange,this.myDB=t}return uT(e,[{key:"openDB",value:function(e){var t=this,n=this,r=this.myDB.version||1,i=n.indexedDB.open(n.myDB.name,r);i.onerror=function(e){},i.onsuccess=function(r){t.myDB.db=r.target.result,e.call(n)},i.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,r=this.myDB.db.transaction(e,"readwrite").objectStore(e),i=0;i<t.length;i++)(n=r.add(t[i])).onerror=function(){},n.onsuccess=function(){}}},{key:"putData",value:function(e,t){for(var n,r=this.myDB.db.transaction(e,"readwrite").objectStore(e),i=0;i<t.length;i++)(n=r.put(t[i])).onerror=function(){},n.onsuccess=function(){}}},{key:"getDataByKey",value:function(e,t,n){var r=this,i=this.myDB.db.transaction(e,"readwrite").objectStore(e).get(t);i.onerror=function(){n.call(r,null)},i.onsuccess=function(e){var t=e.target.result;n.call(r,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}(),sE=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],cE=["requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen"],lE=["exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen"],uE="data-xgplayerid";function dE(e,t,n){for(var r,i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];var s,c=t.call.apply(t,Xm(r=[e]).call(r,o));n&&"function"==typeof n&&(c&&c.then?c.then((function(){for(var t,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];n.call.apply(n,Xm(t=[e]).call(t,i))})):n.call.apply(n,Xm(s=[e]).call(s,o)))}function hE(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 r,i=arguments,o=this;if(n.pre)try{var a,s;(s=n.pre).call.apply(s,Xm(a=[this]).call(a,QR(Array.prototype).call(arguments)))}catch(oK){var c,l;throw oK.message=Xm(c=Xm(l="[pluginName: ".concat(this.pluginName,":")).call(l,e,":pre error] >> ")).call(c,oK.message),oK}if(this.__hooks&&this.__hooks[e])try{var u,d=bE(this,e,t);if(d)if(d.then)d.then((function(e){var r;!1!==e&&dE.apply(void 0,Xm(r=[o,t,n.next]).call(r,_T(i)))})).catch((function(e){throw e}));else dE.apply(void 0,Xm(u=[this,t,n.next]).call(u,QR(Array.prototype).call(arguments)));else if(void 0===d){var h;dE.apply(void 0,Xm(h=[this,t,n.next]).call(h,QR(Array.prototype).call(arguments)))}}catch(oK){var f,p;throw oK.message=Xm(f=Xm(p="[pluginName: ".concat(this.pluginName,":")).call(p,e,"] >> ")).call(f,oK.message),oK}else dE.apply(void 0,Xm(r=[this,t,n.next]).call(r,QR(Array.prototype).call(arguments)))}.bind(this)}function fE(e,t){var n=this.__hooks;if(!n||!Array.isArray(n[e]))return-1;for(var r=n[e],i=0;i<r.length;i++)if(r[i]===t)return i;return-1}function pE(e,t){var n=this.__hooks;if(n)return n.hasOwnProperty(e)?(Array.isArray(n[e])||(n[e]=[]),-1===fE.call(this,e,t)&&n[e].push(t),!0):(console.warn("has no supported hook which name [".concat(e,"]")),!1)}function vE(e,t){var n=this.__hooks;if(n)if(Array.isArray(n[e])){var r=n[e],i=fE.call(this,e,t);-1!==i&&vw(r).call(r,i,1)}else n[e]&&(n[e]=null)}function gE(e){if(this.plugins&&this.plugins[e.toLowerCase()]){for(var t=this.plugins[e.toLowerCase()],n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.useHooks&&t.useHooks.apply(t,r)}}function yE(e){if(this.plugins&&this.plugins[e.toLowerCase()]){var t=this.plugins[e.toLowerCase()];if(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.removeHooks&&t.removeHooks.apply(t,r)}}}function mE(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.__hooks={},t&&VR(t).call(t,(function(t){e.__hooks[t]=null})),fG(e,"hooks",{get:function(){var t;return e.__hooks&&VR(t=WR(e.__hooks)).call(t,(function(t){if(e.__hooks[t])return t}))}})}function _E(e){e.__hooks=null}function bE(e,t,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];if(e.__hooks&&Array.isArray(e.__hooks[t])){var a,s=e.__hooks[t],c=-1;return function e(t,n,r){for(var i,o,a=arguments.length,l=new Array(a>3?a-3:0),u=3;u<a;u++)l[u-3]=arguments[u];if(c++,0===s.length||c===s.length)return r.call.apply(r,Xm(o=[t,t]).call(o,l));var d,h=s[c],f=h.call.apply(h,Xm(i=[t,t]).call(i,l));return f&&f.then?f.then((function(i){var o;return!1===i?null:e.apply(void 0,Xm(o=[t,n,r]).call(o,l))})).catch((function(e){console.warn("[runHooks]".concat(n," reject"),e.message)})):!1!==f?e.apply(void 0,Xm(d=[t,n,r]).call(d,l)):void 0}.apply(void 0,Xm(a=[e,t,n]).call(a,i))}var l;return n.call.apply(n,Xm(l=[e,e]).call(l,i))}function RE(e,t){var n;tS.logError(Xm(n="[".concat(e,"] event or callback cant be undefined or null when call ")).call(n,t))}var wE=function(){function e(t){cT(this,e),rS.checkIsFunction(this.beforeCreate)&&this.beforeCreate(t),mE(this),this.__args=t,this.__events={},this.__onceEvents={},this.config=t.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(t)}return uT(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=rS.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)})):RE(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(r){n.__onceEvents[r]=t,n.player.once(e,t)})):RE(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(r){delete n.__events[e],n.player.off(r,t)})):RE(this.pluginName,"plugin.off(event, callback)")}},{key:"offAll",value:function(){var e=this;["__events","__onceEvents"].forEach((function(t){WR(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 r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];(n=this.player).emit.apply(n,Xm(t=[e]).call(t,i))}}},{key:"emitUserAction",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.player){var r=aT(aT({},n),{},{pluginName:this.pluginName});this.player.emitUserAction(e,t,r)}}},{key:"hook",value:function(e,t){var n;return hE.call.apply(hE,Xm(n=[this]).call(n,QR(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){for(var n,r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return pE.call.apply(pE,Xm(n=[this]).call(n,QR(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){for(var n,r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return vE.call.apply(vE,Xm(n=[this]).call(n,QR(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,r=this.pluginName;this.offAll(),rS.clearAllTimers(this),rS.checkIsFunction(this.destroy)&&this.destroy(),VR(e=["player","playerConfig","pluginName","logger","__args","__hooks"]).call(e,(function(e){t[e]=null})),n.unRegisterPlugin(r),_E(this)}}],[{key:"defineGetterOrSetter",value:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&fG(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]&&fG(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 GE=Element.prototype;GE.matches=GE.matchesSelector||GE.mozMatchesSelector||GE.msMatchesSelector||GE.oMatchesSelector||GE.webkitMatchesSelector}var TE=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}};function kE(e,t,n,r,i){var o=SE.apply(this,arguments);return e.addEventListener(n,o,i),{destroy:function(){e.removeEventListener(n,o,i)}}}function SE(e,t,n,r){return function(n){n.delegateTarget=TE(n.target,t),n.delegateTarget&&r.call(e,n)}}var EE=function(e,t,n,r,i){return"function"==typeof e.addEventListener?kE.apply(null,arguments):"function"==typeof n?kE.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),VR(Array.prototype).call(e,(function(e){return kE(e,t,n,r,i)})))},ME=o(EE),DE={CONTROLS:"controls",ROOT:"root"},zE={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"},AE="xg-icon-disable";function PE(e){return!!e&&(KR(e)&&/^(?:http|data:|\/)/.test(e))}function xE(e,t){var n,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",s=null;if(e instanceof window.Element)return rS.addClass(e,i),VR(r=WR(o)).call(r,(function(t){e.setAttribute(t,o[t])})),e;if(PE(e)||PE(e.url))return o.src=PE(e)?e:e.url||"",s=rS.createDom(e.tag||"img","",o,"xg-img ".concat(i));if("function"==typeof e)try{var c,l;return(s=e())instanceof window.Element?(rS.addClass(s,i),VR(c=WR(o)).call(c,(function(e){s.setAttribute(e,o[e])})),s):(tS.logWarn(Xm(l="warn>>icons.".concat(t," in config of plugin named [")).call(l,a,"] is a function mast return an Element Object")),null)}catch(oK){return tS.logError("Plugin named [".concat(a,"]:createIcon"),oK),null}return"string"==typeof e?rS.createDomFromHtml(e,o,i):(tS.logWarn(Xm(n="warn>>icons.".concat(t," in config of plugin named [")).call(n,a,"] is invalid")),null)}function CE(e,t){var n,r=t.config.icons||t.playerConfig.icons;VR(n=WR(e)).call(n,(function(n){var i=e[n],o=i&&i.class?i.class:"",a=i&&i.attr?i.attr:{},s=null;r&&r[n]&&(o=function(e,t){var n;return"object"===sT(e)&&e.class&&"string"==typeof e.class?Xm(n="".concat(t," ")).call(n,e.class):t}(r[n],o),a=function(e,t){var n;return"object"===sT(e)&&e.attr&&"object"===sT(e.attr)&&VR(n=WR(e.attr)).call(n,(function(n){t[n]=e.attr[n]})),t}(r[n],a),s=xE(r[n],n,o,a,t.pluginName)),!s&&i&&(s=xE(i.icon?i.icon:i,a,o,{},t.pluginName)),t.icons[n]=s}))}var FE=function(e){hT(n,e);var t=yT(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return cT(this,n),(e=t.call(this,r)).__delegates=[],e}return uT(n,[{key:"__init",value:function(e){if(mT(fT(n.prototype),"__init",this).call(this,e),e.root){var t=e.root,r=null;this.icons={},this.root=null,this.parent=null,CE(this.registerIcons()||{},this),this.langText={};var i,o,a,s=this.registerLanguageTexts()||{};o=this,VR(a=WR(i=s)).call(a,(function(e){fG(o.langText,e,{get:function(){var t=o.lang,n=o.i18n;return n[e]?n[e]:i[e]&&i[e][t]||""}})}));var c="";try{c=this.render()}catch(oK){var l;throw tS.logError("Plugin:".concat(this.pluginName,":render"),oK),new Error(Xm(l="Plugin:".concat(this.pluginName,":render:")).call(l,oK.message))}if(c)(r=n.insert(c,t,e.index)).setAttribute("data-index",e.index);else{if(!e.tag)return;(r=rS.createDom(e.tag,"",e.attr,e.name)).setAttribute("data-index",e.index),t.appendChild(r)}this.root=r,this.parent=t;var u=this.config.attr||{},d=this.config.style||{};this.setAttr(u),this.setStyle(d),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"===sT(n))if(WR(n).length>0)VR(t=WR(n)).call(t,(function(t){var r,i,o=t,a=n[o],s={root:e.root};"function"==typeof a?(r=e.config[o]||{},i=a):"object"===sT(a)&&"function"==typeof a.plugin&&(r=a.options?rS.deepCopy(e.config[o]||{},a.options):e.config[o]||{},i=a.plugin),s.config=r,void 0!==r.index&&(s.index=r.index),r.root&&(s.root=r.root),e.registerPlugin(i,s,o)}))}}},{key:"updateLang",value:function(e){e||(e=this.lang);var t=this.root,n=this.i18n,r=this.langText;t&&function e(t,n){for(var r=0;r<t.children.length;r++)t.children[r].children.length>0?e(t.children[r],n):n(t.children[r])}(t,(function(t){var i=t.getAttribute&&t.getAttribute("lang-key");if(i){var o=n[i.toUpperCase()]||r[i];o&&(t.innerHTML="function"==typeof o?o(e):o)}}))}},{key:"lang",get:function(){return this.player.lang}},{key:"changeLangTextKey",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.i18n||{},r=this.langText;e.setAttribute&&e.setAttribute("lang-key",t);var i=n[t]||r[t]||"";i&&(e.innerHTML=i)}},{key:"plugins",value:function(){return this._children}},{key:"disable",value:function(){this.config.disable=!0,rS.addClass(qm(this).call(this,".xgplayer-icon"),AE)}},{key:"enable",value:function(){this.config.disable=!1,rS.removeClass(qm(this).call(this,".xgplayer-icon"),AE)}},{key:"children",value:function(){return{}}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";t.root=t.root||this.root;var i=mT(fT(n.prototype),"registerPlugin",this).call(this,e,t,r);return this._children.push(i),i}},{key:"registerIcons",value:function(){return{}}},{key:"registerLanguageTexts",value:function(){return{}}},{key:"find",value:function(e){if(this.root)return this.root.querySelector(e)}},{key:"bind",value:function(e,t,r){var i=this;if(arguments.length<3&&"function"==typeof t)Array.isArray(e)?e.forEach((function(e){i.bindEL(e,t)})):this.bindEL(e,t);else{var o,a=n.delegate.call(this,this.root,e,t,r);this.__delegates=Xm(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 r,i=Xm(r="".concat(e,"_")).call(r,t),o=0;o<this.__delegates.length;o++)if(this.__delegates[o].key===i){var a;this.__delegates[o].destroy(),vw(a=this.__delegates).call(a,o,1);break}}},{key:"setStyle",value:function(e,t){var n,r=this;if(this.root)return"String"===rS.typeOf(e)?this.root.style[e]=t:void("Object"===rS.typeOf(e)&&VR(n=WR(e)).call(n,(function(t){r.root.style[t]=e[t]})))}},{key:"setAttr",value:function(e,t){var n,r=this;if(this.root)return"String"===rS.typeOf(e)?this.root.setAttribute(e,t):void("Object"===rS.typeOf(e)&&VR(n=WR(e)).call(n,(function(t){r.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?qm(this).call(this,e).appendChild(t):e.appendChild(t)}catch(n){return tS.logError("Plugin:appendChild",n),null}}},{key:"render",value:function(){return""}},{key:"destroy",value:function(){}},{key:"__destroy",value:function(){var e,t,r,i=this,o=this.player;(VR(e=this.__delegates).call(e,(function(e){e.destroy()})),this.__delegates=[],this._children instanceof Array)&&(VR(r=this._children).call(r,(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)),mT(fT(n.prototype),"__destroy",this).call(this),this.icons={},VR(t=["root","parent"]).call(t,(function(e){i[e]=null}))}}],[{key:"insert",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t.children.length,i=Number(n),o=e instanceof window.Node;if(r){for(var a=0,s=null,c="";a<r;a++){s=t.children[a];var l=Number(s.getAttribute("data-index"));if(l>=i){c="beforebegin";break}l<i&&(c="afterend")}return o?"afterend"===c?t.appendChild(e):t.insertBefore(e,s):s.insertAdjacentHTML(c,e),"afterend"===c?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,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=[];if(e instanceof window.Node&&"function"==typeof r)if(Array.isArray(n))n.forEach((function(n){var a,s=ME(e,t,n,r,i);s.key=Xm(a="".concat(t,"_")).call(a,n),o.push(s)}));else{var a,s=ME(e,t,n,r,i);s.key=Xm(a="".concat(t,"_")).call(a,n),o.push(s)}return o}},{key:"ROOT_TYPES",get:function(){return DE}},{key:"POSITIONS",get:function(){return zE}}]),n}(wE),IE=function(){function e(){var t=this;if(cT(this,e),dT(this,"__trigger",(function(e){var n=(new Date).getTime();t.timeStamp=n;for(var r=0;r<e.length;r++)t.__runHandler(e[r].target)})),this.__handlers=[],this.timeStamp=0,this.observer=null,window.ResizeObserver)try{this.observer=new window.ResizeObserver(function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return iS(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),oS(e,t,{leading:r,trailing:i,maxWait:t})}(this.__trigger,100,{trailing:!0})),this.timeStamp=(new Date).getTime()}catch(oK){console.error(oK)}}return uT(e,[{key:"addObserver",value:function(e,t){if(this.observer){this.observer.observe(e);for(var n=e.getAttribute(uE),r=this.__handlers,i=-1,o=0;o<r.length;o++)r[o]&&e===r[o].target&&(i=o);i>-1?this.__handlers[i].handler=t:this.__handlers.push({target:e,handler:t,playerId:n})}}},{key:"unObserver",value:function(e){var t,n,r=-1;VR(t=this.__handlers).call(t,(function(t,n){e===t.target&&(r=n)}));try{var i;null===(i=this.observer)||void 0===i||i.unobserve(e)}catch(oK){}r>-1&&vw(n=this.__handlers).call(n,r,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(KTe){console.error(KTe)}return!0}return!1}}]),e}(),HE=null;var OE={pluginGroup:{},init:function(e){var t,n,r=e._pluginInfoId;r||(r=(new Date).getTime(),e._pluginInfoId=r),!e.config.closeResizeObserver&&(t=e.root,n=function(){e.resize()},HE||(HE=new IE),HE.addObserver(t,n)),this.pluginGroup[r]={_originalOptions:e.config||{},_plugins:{}}},formatPluginInfo:function(e,t){var n=null,r=null;return e.plugin&&"function"==typeof e.plugin?(n=e.plugin,r=e.options):(n=e,r={}),t&&(r.config=t||{}),{PLUFGIN:n,options:r}},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=WR(t),r=null,i=0;i<n.length;i++)if(e.toLowerCase()===n[i].toLowerCase()){r=t[n[i]];break}return"Object"===rS.typeOf(r)?{root:r.root,position:r.position}:{}},lazyRegister:function(e,t){var n=this,r=t.timeout||1500;return jR.race([t.loader().then((function(t){var r;r=t&&t.__esModule?t.default:t,n.register(e,r,t.options)})),new jR((function(e,t){setTimeout((function(){t(new Error("timeout"))}),r)}))])},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 r=e._pluginInfoId;if(r&&this.pluginGroup[r]){this.pluginGroup[r]._plugins||(this.pluginGroup[r]._plugins={});var i=this.pluginGroup[r]._plugins,o=this.pluginGroup[r]._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=WR(o),c=0;c<s.length;c++)if(a.toLowerCase()===s[c].toLowerCase()){var l=o[s[c]];"Object"===rS.typeOf(l)?n.config=cG({},n.config,o[s[c]]):"Boolean"===rS.typeOf(l)&&(n.config.disable=!l);break}t.defaultConfig&&WR(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{i[a.toLowerCase()]&&(this.unRegister(r,a.toLowerCase()),console.warn("the is one plugin with same pluginName [".concat(a,"] exist, destroy the old instance")));var u=new t(n);return i[a.toLowerCase()]=u,i[a.toLowerCase()].func=t,u&&"function"==typeof u.afterCreate&&u.afterCreate(),u}catch(d){throw console.error(d),d}}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(oK){var r;console.error(Xm(r="[unRegister:".concat(t,"] cgid:[")).call(r,e,"] error"),oK)}},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 r=t.toLowerCase();return this.pluginGroup[n]._plugins[r]},beforeInit:function(e){var t=this;function n(e){return e&&e.then?e:new jR((function(e){e()}))}return new jR((function(r){if(t.pluginGroup)return(e._loadingPlugins&&e._loadingPlugins.length?jR.all(e._loadingPlugins):jR.resolve()).then((function(){var i,o=e._pluginInfoId;if(t.pluginGroup[o]){var a=t.pluginGroup[o]._plugins,s=[];WR(a).forEach((function(e){if(a[e]&&a[e].beforePlayerInit)try{var t=a[e].beforePlayerInit();s.push(n(t))}catch(oK){throw s.push(n(null)),oK}})),jR.all(Xm(i=[]).call(i,s)).then((function(){r()})).catch((function(e){console.error(e),r()}))}else r()}))}))},afterInit:function(e){var t=e._pluginInfoId;if(t&&this.pluginGroup[t]){var n=this.pluginGroup[t]._plugins;WR(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 r=this.pluginGroup[n]._plugins;WR(r).forEach((function(t){if(r[t].updateLang)r[t].updateLang(e);else try{r[t].lang=e}catch(KTe){console.warn("".concat(t," setLang"))}}))}},reRender:function(e){var t=this,n=e._pluginInfoId;if(n&&this.pluginGroup[n]){var r=[],i=this.pluginGroup[n]._plugins;WR(i).forEach((function(e){"controls"!==e&&i[e]&&(r.push({plugin:i[e].func,options:i[e].__args}),t.unRegister(n,e))})),r.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||{};WR(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,r,i;n=e.root,null===(i=HE)||void 0===i||i.unObserver(n,r);for(var o=this.pluginGroup[t]._plugins,a=0,s=WR(o);a<s.length;a++){var c=s[a];this.unRegister(t,c)}delete this.pluginGroup[t],delete e._pluginInfoId}}},LE="xgplayer",XE="xgplayer-is-enter",UE="xgplayer-pause",BE="xgplayer-playing",NE="xgplayer-ended",VE="xgplayer-isloading",jE="xgplayer-is-error",KE="xgplayer-replay",WE="xgplayer-nostart",QE="xgplayer-inactive",qE="xgplayer-is-fullscreen",ZE="xgplayer-is-cssfullscreen",YE="xgplayer-rotate-fullscreen",$E="xgplayer-rotate-parent",JE="xgplayer-fullscreen-parent",eM="xgplayer-fullscreen-inner",tM="no-controls",nM="flex-controls",rM="controls-autohide",iM="top-bar-autohide",oM="not-allow-autoplay",aM="seeking";function sM(){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:aS(),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 cM=function(e){hT(n,e);var t=yT(n);function n(){var e,r;cT(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return dT(vT(r=t.call.apply(t,Xm(e=[this]).call(e,o))),"onMouseEnter",(function(e){var t=vT(r),n=t.player;t.playerConfig.closeControlsBlur&&n.focus({autoHide:!1})})),dT(vT(r),"onMouseLeave",(function(e){vT(r).player.focus()})),r}return uT(n,[{key:"beforeCreate",value:function(e){e.config.mode||"mobile"!==uS.device||(e.config.mode="flex"),e.player.config.marginControls&&(e.config.autoHide=!1)}},{key:"afterCreate",value:function(){var e,t=this,n=this.config,r=n.disable,i=n.height,o=n.mode;if(!r){"flex"===o&&this.player.addClass(nM);var a={height:"".concat(i,"px")};VR(e=WR(a)).call(e,(function(e){t.root.style[e]=a[e]})),this.left=qm(this).call(this,"xg-left-grid"),this.center=qm(this).call(this,"xg-center-grid"),this.right=qm(this).call(this,"xg-right-grid"),this.innerRoot=qm(this).call(this,"xg-inner-controls"),this.on(NS,(function(e){e?rS.addClass(t.root,"mini-controls"):rS.removeClass(t.root,"mini-controls")}));var s=this.playerConfig.isMobileSimulateMode;"mobile"!==uS.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&&rS.addClass(this.root,rM)}},{key:"pauseAutoHide",value:function(){rS.removeClass(this.root,rM)}},{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]:{},r=arguments.length>2?arguments[2]:void 0;if(this.root){var i=e.defaultConfig||{};if(!t.root){switch(t.position?t.position:t.config&&t.config.position?t.config.position:i.position){case zE.CONTROLS_LEFT:t.root=this.left;break;case zE.CONTROLS_RIGHT:t.root=this.right;break;case zE.CONTROLS_CENTER:t.root=this.center;break;case zE.CONTROLS:t.root=this.root;break;default:t.root=this.left}return mT(fT(n.prototype),"registerPlugin",this).call(this,e,t,r)}}}},{key:"destroy",value:function(){"mobile"!==uS.device&&(this.unbind("mouseenter",this.onMouseEnter),this.unbind("mouseleave",this.onMouseLeave)),this.left=null,this.center=null,this.right=null,this.innerRoot=null}},{key:"render",value:function(){var e=this.config,t=e.mode,n=e.autoHide,r=e.initShow;if(!e.disable){var i=rS.classNames({"xgplayer-controls":!0},{"flex-controls":"flex"===t},{"bottom-controls":"bottom"===t},dT({},rM,n),{"xgplayer-controls-initshow":r||!n});return'<xg-controls class="'.concat(i,'" unselectable="on">\n <xg-inner-controls class="xg-inner-controls xg-pos">\n <xg-left-grid class="xg-left-grid">\n </xg-left-grid>\n <xg-center-grid class="xg-center-grid"></xg-center-grid>\n <xg-right-grid class="xg-right-grid">\n </xg-right-grid>\n </xg-inner-controls>\n </xg-controls>')}}}],[{key:"pluginName",get:function(){return"controls"}},{key:"defaultConfig",get:function(){return{disable:!1,autoHide:!0,mode:"",initShow:!1}}}]),n}(FE),lM={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"}},uM={lang:{},langKeys:[],textKeys:[]};function dM(e,t){return WR(t).forEach((function(n){var r,i=rS.typeOf(t[n]),o=rS.typeOf(e[n]);"Array"===i?("Array"!==o&&(e[n]=[]),(r=e[n]).push.apply(r,_T(t[n]))):"Object"===i?("Object"!==o&&(e[n]={}),dM(e[n],t[n])):e[n]=t[n]})),e}function hM(){var e;VR(e=WR(uM.lang.en)).call(e,(function(e){uM.textKeys[e]=e}))}function fM(e,t){var n=e.LANG;if(t||(t=uM),t.lang){var r=e.TEXT||{};"zh"===n&&(n="zh-cn"),t.lang[n]?dM(t.lang[n],r):(t.langKeys.push(n),t.lang[n]=r),hM()}}fM(lM);var pM={get textKeys(){return uM.textKeys},get langKeys(){return uM.langKeys},get lang(){var e,t={};return VR(e=uM.langKeys).call(e,(function(e){t[e]=uM.lang[e]})),uM.lang["zh-cn"]&&(t.zh=uM.lang["zh-cn"]||{}),t},extend:function(e,t){var n=[];if(t||(t=uM),t.lang){var r;if("Array"!==rS.typeOf(e))n=VR(r=WR(e)).call(r,(function(t){return{LANG:"zh"===t?"zh-cn":t,TEXT:e[t]}}));else n=e;var i=t.lang;VR(n).call(n,(function(e){"zh"===e.LANG&&(e.LANG="zh-cn"),i[e.LANG]?dM(i[e.LANG]||{},e.TEXT||{}):fM(e,t)})),hM()}},use:fM,init:function(e){var t,n={lang:{},langKeys:[],textKeys:{},pId:e};return dM(n.lang,uM.lang),(t=n.langKeys).push.apply(t,_T(uM.langKeys)),dM(n.textKeys,uM.textKeys),n}},vM=1,gM=2,yM=3,mM=4,_M=5,bM=6,RM=7,wM=["ERROR","INITIAL","READY","ATTACHING","ATTACHED","NOTALLOW","RUNNING","ENDED","DESTROYED"],GM={},TM=null,kM=function(e){hT(n,e);var t=yT(n);function n(){return cT(this,n),t.apply(this,arguments)}return uT(n,[{key:"add",value:function(e){e&&(GM[e.playerId]=e,1===WR(GM).length&&this.setActive(e.playerId,!0))}},{key:"remove",value:function(e){e&&(e.isUserActive,delete GM[e.playerId])}},{key:"_iterate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];for(var n in GM)if(Object.prototype.hasOwnProperty.call(GM,n)){var r=GM[n];if(t){if(e(r))break}else e(r)}}},{key:"forEach",value:function(e){this._iterate(e)}},{key:"find",value:function(e){var t=null;return this._iterate((function(n){var r=e(n);return r&&(t=n),r}),!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(GM[e])return t?this.forEach((function(t){e===t.playerId?(t.isUserActive=!0,t.isInstNext=!1):t.isUserActive=!1})):GM[e].isUserActive=t,e}},{key:"getActiveId",value:function(){for(var e=WR(GM),t=0;t<e.length;t++){var n=GM[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(GM[e])return t?this.forEach((function(t){e===t.playerId?(t.isUserActive=!1,t.isInstNext=!0):t.isInstNext=!1})):GM[e].isInstNext=t,e}}],[{key:"getInstance",value:function(){return TM||(TM=new n),TM}}]),n}(GT.EventEmitter);var SM=["play","pause","replay","retry"],EM=0,MM=0,DM=null,zM=function(e){hT(n,e);var t=yT(n);function n(e){var r;cT(this,n);var i,o=rS.deepMerge(sM(),e);dT(vT(r=t.call(this,o)),"canPlayFunc",(function(){if(r.config){var e=r.config,t=e.autoplay,n=e.defaultPlaybackRate;tS.logInfo("player","canPlayFunc, startTime",r.__startTime),r._seekToStartTime(),r.playbackRate=n,(t||r._useAutoplay)&&r.mediaPlay(),r.off(wS,r.canPlayFunc),r.removeClass(XE)}})),dT(vT(r),"onFullscreenChange",(function(e,t){var n=function(){rS.setTimeout(vT(r),(function(){r.resize()}),100)},i=rS.getFullScreenEl();r._fullActionFrom?r._fullActionFrom="":r.emit($S,{eventType:"system",action:"switch_fullscreen",pluginName:"player",currentTime:r.currentTime,duration:r.duration,props:[{prop:"fullscreen",from:!0,to:!1}]});var o=function(e,t,n){if(e){var r=e.getAttribute(n);return!(!r||r!==t||"VIDEO"!==e.tagName&&"AUDIO"!==e.tagName)}}(i,r.playerId,uE);if(t||i&&(i===r._fullscreenEl||o))n(),!r.config.closeFocusVideoFocus&&r.media.focus(),r.fullscreen=!0,r.changeFullStyle(r.root,i,qE),r.emit(US,!0,r._fullScreenOffset),r.cssfullscreen&&r.exitCssFullscreen();else if(r.fullscreen){n();var a=vT(r),s=a._fullScreenOffset;if(a.config.needFullscreenScroll?(window.scrollTo(s.left,s.top),rS.setTimeout(vT(r),(function(){r.fullscreen=!1,r._fullScreenOffset=null}),100)):(!r.config.closeFocusVideoFocus&&r.media.focus(),r.fullscreen=!1,r._fullScreenOffset=null),r.cssfullscreen)r.removeClass(qE);else{var c=r._fullscreenEl;c||!r.root.contains(e.target)&&e.target!==r.root||(c=e.target),r.recoverFullStyle(r.root,c,qE)}r._fullscreenEl=null,r.emit(US,!1)}})),dT(vT(r),"_onWebkitbeginfullscreen",(function(e){r._fullscreenEl=r.media,r.onFullscreenChange(e,!0)})),dT(vT(r),"_onWebkitendfullscreen",(function(e){r.onFullscreenChange(e,!1)})),mE(vT(r),SM),r.config=o,r._pluginInfoId=rS.generateSessionId(),(i=vT(r)).logInfo=tS.logInfo.bind(i),i.logWarn=tS.logWarn.bind(i),i.logError=tS.logError.bind(i);var a=r.constructor.defaultPreset;if(r.config.presets.length){var s,c=KR(s=r.config.presets).call(s,"default");c>=0&&a&&(r.config.presets[c]=a)}else a&&r.config.presets.push(a);if(r.userTimer=null,r.waitTimer=null,r.handleSource=!0,r._state=vM,r.isAd=!1,r.isError=!1,r._hasStart=!1,r.isSeeking=!1,r.isCanplay=!1,r._useAutoplay=!1,r.__startTime=-1,r.rotateDeg=0,r.isActive=!1,r.fullscreen=!1,r.cssfullscreen=!1,r.isRotateFullscreen=!1,r._fullscreenEl=null,r.timeSegments=[],r._cssfullscreenEl=null,r.curDefinition=null,r._orgCss="",r._fullScreenOffset=null,r._videoHeight=0,r._videoWidth=0,r.videoPos={pi:1,scale:0,rotate:-1,x:0,y:0,h:-1,w:-1,vy:0,vx:0},r.sizeInfo={width:0,height:0,left:0,top:0},r._accPlayed={t:0,acc:0,loopAcc:0},r._offsetInfo={currentTime:-1,duration:0},r.innerContainer=null,r.controls=null,r.topBar=null,r.root=null,r.__i18n=pM.init(r._pluginInfoId),uS.os.isAndroid&&uS.osVersion>0&&uS.osVersion<6&&(r.config.autoplay=!1),r.database=new aE,r.isUserActive=!1,r._onceSeekCanplay=null,r._isPauseBeforeSeek=0,r.innerStates={isActiveLocked:!1},r.instManager=DM,!r._initDOM())return console.error(new Error("can't find the dom which id is ".concat(r.config.id," or this.config.el does not exist"))),gT(r);var l=r.config,u=l.definition,d=void 0===u?{}:u;if(!l.url&&d.list&&d.list.length>0){var h,f=qm(h=d.list).call(h,(function(e){return e.definition&&e.definition===d.defaultDefinition}));f||(d.defaultDefinition=d.list[0].definition,f=d.list[0]),r.config.url=f.url,r.curDefinition=f}return r._bindEvents(),r._registerPresets(),r._registerPlugins(),OE.onPluginsReady(vT(r)),r.getInitDefinition(),r.setState(gM),rS.setTimeout(vT(r),(function(){r.emit(DS)}),0),r.onReady&&r.onReady(),(r.config.videoInit||r.config.autoplay)&&(!r.hasStart||r.state<mM)&&r.start(),r}return uT(n,[{key:"_initDOM",value:function(){var e,t,n,r,i=this;if(this.root=this.config.id?document.getElementById(this.config.id):null,!this.root){var o=this.config.el;if(!o||1!==o.nodeType)return this.emit(mS,new pS("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=WR(GM),n=0;n<t.length;n++){var r=GM[t[n]];if(r.root===e)return r}return null}(this.root);if(a&&(tS.logWarn("The is an Player instance already exists in this.root, destroy it and reinitialize"),a.destroy()),this.root.setAttribute(uE,this.playerId),this.media.setAttribute(uE,this.playerId),null===(r=DM)||void 0===r||r.add(this),OE.init(this),this._initBaseDoms(),this.config.controls){var s=this.config.controls.root||null,c=OE.register(this,cM,{root:s});this.controls=c}var l="mobile"===this.config.isMobileSimulateMode?"mobile":uS.device;if(this.addClass(Xm(e=Xm(t=Xm(n="".concat(LE," ")).call(n,QE," xgplayer-")).call(t,l," ")).call(e,this.config.controls?"":tM)),this.config.autoplay?this.addClass(XE):this.addClass(WE),this.config.fluid){var u=this.config,d=u.width,h=u.height;"number"==typeof d&&"number"==typeof h||(d=600,h=337.5);var f={width:"100%",height:"0","max-width":"100%","padding-top":"".concat(100*h/d,"%")};WR(f).forEach((function(e){i.root.style[e]=f[e]}))}else["width","height"].forEach((function(e){i.config[e]&&("number"!=typeof i.config[e]?i.root.style[e]=i.config[e]:i.root.style[e]="".concat(i.config[e],"px"))}));var p=this.root.getBoundingClientRect(),v=p.width,g=p.height,y=p.left,m=p.top;return this.sizeInfo.width=v,this.sizeInfo.height=g,this.sizeInfo.left=y,this.sizeInfo.top=m,!0}},{key:"_initBaseDoms",value:function(){this.topBar=null,this.leftBar=null,this.rightBar=null,this.config.marginControls&&(this.innerContainer=rS.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()+QR(t).call(t,1)])})),sE.forEach((function(t){document&&document.addEventListener(t,e.onFullscreenChange)})),uS.os.isIos&&(this.media.addEventListener("webkitbeginfullscreen",this._onWebkitbeginfullscreen),this.media.addEventListener("webkitendfullscreen",this._onWebkitendfullscreen)),this.once(kS,this.resize),this.playFunc=function(){e.config.closeFocusVideoFocus||e.media.focus()},this.once(vS,this.playFunc)}},{key:"_unbindEvents",value:function(){var e=this;this.root.removeEventListener("mousemove",this.mousemoveFunc),sE.forEach((function(t){document.removeEventListener(t,e.onFullscreenChange)})),this.playFunc&&this.off(vS,this.playFunc),this.off(wS,this.canPlayFunc),this.media.removeEventListener("webkitbeginfullscreen",this._onWebkitbeginfullscreen),this.media.removeEventListener("webkitendfullscreen",this._onWebkitendfullscreen)}},{key:"_clearUserTimer",value:function(){this.userTimer&&(rS.clearTimeout(this,this.userTimer),this.userTimer=null)}},{key:"_startInit",value:function(e){var t=this;if(this.media&&(e&&""!==e&&("Array"!==rS.typeOf(e)||0!==e.length)||(e="",this.emit(zS),tS.logWarn("config.url is null, please get url and run player._startInit(url)"),!this.config.nullUrlStart))){this.handleSource&&(this._detachSourceEvents(this.media),"Array"===rS.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"===rS.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 r=this.media.readyState;tS.logInfo("_startInit readyState",r),this.config.autoplay&&(!rS.isMSE(this.media)&&this.load(),(uS.os.isIpad||uS.os.isPhone)&&this.mediaPlay());var i=this.config.startTime;this.__startTime=i>0?i:-1,this.config.startTime=0,r>=2&&this.duration>0?this.canPlayFunc():this.on(wS,this.canPlayFunc),(!this.hasStart||this.state<mM)&&OE.afterInit(this),this.hasStart=!0,this.setState(mM),rS.setTimeout(this,(function(){t.emit(xS)}),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||[],r=this.config.plugins||[],i=this.config.i18n||[];t&&pM.extend(i,this.__i18n);var o=n.join("||").toLowerCase().split("||"),a=this.plugins;r.forEach((function(n){try{var r=n.plugin?n.plugin.pluginName:n.pluginName;if(r&&KR(o).call(o,r.toLowerCase())>-1)return null;if(!t&&a[r.toLowerCase()])return;if(n.lazy&&n.loader){var i=OE.lazyRegister(e,n);return void(n.forceBeforeInit&&(i.then((function(){var t,n;vw(t=e._loadingPlugins).call(t,KR(n=e._loadingPlugins).call(n,i),1)})).catch((function(t){var n,r;tS.logError("_registerPlugins:loadingPlugin",t),vw(n=e._loadingPlugins).call(n,KR(r=e._loadingPlugins).call(r,i),1)})),e._loadingPlugins.push(i)))}return e.registerPlugin(n)}catch(s){tS.logError("_registerPlugins:",s)}}))}},{key:"_registerPresets",value:function(){var e=this;this.config.presets.forEach((function(t){!function(e,t){var n,r,i,o=t.preset&&t.options?new t.preset(t.options,e.config):new t({},e.config),a=o.plugins,s=void 0===a?[]:a,c=o.ignores,l=void 0===c?[]:c,u=o.icons,d=void 0===u?{}:u,h=o.i18n,f=void 0===h?[]:h;e.config.plugins||(e.config.plugins=[]),e.config.ignores||(e.config.ignores=[]),(r=e.config.plugins).push.apply(r,_T(s)),(i=e.config.ignores).push.apply(i,_T(l)),VR(n=WR(d)).call(n,(function(t){e.config.icons[t]||(e.config.icons[t]=d[t])}));var p=e.config.i18n||[];f.push.apply(f,_T(p)),e.config.i18n=f}(e,t)}))}},{key:"_getRootByPosition",value:function(e){var t=null;switch(e){case zE.ROOT_RIGHT:this.rightBar||(this.rightBar=rS.createPositionBar("xg-right-bar",this.root)),t=this.rightBar;break;case zE.ROOT_LEFT:this.leftBar||(this.leftBar=rS.createPositionBar("xg-left-bar",this.root)),t=this.leftBar;break;case zE.ROOT_TOP:this.topBar||(this.topBar=rS.createPositionBar("xg-top-bar",this.root),this.config.topBarAutoHide&&rS.addClass(this.topBar,iM)),t=this.topBar;break;default:t=this.innerContainer||this.root}return t}},{key:"registerPlugin",value:function(e,t){var n=OE.formatPluginInfo(e,t),r=n.PLUFGIN,i=n.options,o=this.config.plugins;!OE.checkPluginIfExits(r.pluginName,o)&&o.push(r);var a=OE.getRootByConfig(r.pluginName,this.config);a.root&&(i.root=a.root),a.position&&(i.position=a.position);var s,c=i.position?i.position:i.config&&i.config.position||r.defaultConfig&&r.defaultConfig.position;return!i.root&&"string"==typeof c&&KR(c).call(c,"controls")>-1?null===(s=this.controls)||void 0===s?void 0:s.registerPlugin(r,i,r.pluginName):(i.root||(i.root=this._getRootByPosition(c)),OE.register(this,r,i))}},{key:"deregister",value:function(e){"string"==typeof e?OE.unRegister(this,e):e instanceof wE&&OE.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 wE&&(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 r;vw(r=this.config.plugins).call(r,n,1);break}}}},{key:"plugins",get:function(){return OE.getPlugins(this)}},{key:"getPlugin",value:function(e){var t=OE.findPlugin(this,e);return t&&t.pluginName?t:null}},{key:"addClass",value:function(e){this.root&&(rS.hasClass(this.root,e)||rS.addClass(this.root,e))}},{key:"removeClass",value:function(e){this.root&&rS.removeClass(this.root,e)}},{key:"hasClass",value:function(e){if(this.root)return rS.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>yM))return e||this.config.url||this.getInitDefinition(),this.hasStart=!0,this.setState(yM),this._registerPlugins(!1),OE.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",tS.logError("start:beforeInit:",e),e}))}},{key:"switchURL",value:function(e,t){var n=this,r=e;"Object"===rS.typeOf(e)&&(r=e.url),r=this.preProcessUrl(r).url;var i=this.currentTime;this.__startTime=i;var o=this.paused&&!this.isError;return this.src=r,new jR((function(e,t){var i=function(e){n.off("timeupdate",a),n.off("canplay",a),t(e)},a=function(){n._seekToStartTime(),o&&n.pause(),n.off("error",i),e(!0)};n.once("error",i),r?(uS.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<mM)return this.removeClass(WE),this.addClass(XE),this.start(),void(this._useAutoplay=!0);this.state<bM&&(this.removeClass(WE),!this.isCanplay&&this.addClass(XE));var t=mT(fT(n.prototype),"play",this).call(this);return void 0!==t&&t&&t.then?t.then((function(){e.removeClass(oM),e.addClass(BE),e.state<bM&&(tS.logInfo(">>>>playPromise.then"),e.setState(bM),e.emit(AS))})).catch((function(t){if(tS.logWarn(">>>>playPromise.catch",t.name),e.media&&e.media.error)return e.onError(),void e.removeClass(XE);"NotAllowedError"===t.name&&(e._errorTimer=rS.setTimeout(e,(function(){e._errorTimer=null,e.emit(PS),e.addClass(oM),e.removeClass(XE),e.pause(),e.setState(_M)}),0))})):(tS.logWarn("video.play not return promise"),this.state<bM&&(this.setState(bM),this.removeClass(oM),this.removeClass(WE),this.removeClass(XE),this.addClass(BE),this.emit(AS))),t}},{key:"mediaPause",value:function(){mT(fT(n.prototype),"pause",this).call(this)}},{key:"videoPause",value:function(){mT(fT(n.prototype),"pause",this).call(this)}},{key:"play",value:function(){var e=this;return this.removeClass(UE),bE(this,"play",(function(){return e.mediaPlay()}))}},{key:"pause",value:function(){var e=this;bE(this,"pause",(function(){mT(fT(n.prototype),"pause",e).call(e)}))}},{key:"seek",value:function(e,t){var n=this;if(this.media&&!gw(Number(e))&&this.hasStart){var r=this.config,i=r.isSeekedPlay,o=r.seekedStatus,a=t||(i?"play":o);e=e<0?0:e>this.duration?Ow(this.duration,10):e,!this._isPauseBeforeSeek&&(this._isPauseBeforeSeek=this.paused?2:1),this._onceSeekCanplay&&this.off(_S,this._onceSeekCanplay),this._onceSeekCanplay=function(){switch(n.removeClass(XE),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(_S,this._onceSeekCanplay),this.state<bM?(this.removeClass(WE),this.currentTime=e,this.play()):this.currentTime=e}}},{key:"getInitDefinition",value:function(){var e,t=this,n=this.config,r=n.definition;!n.url&&r&&r.list&&r.list.length>0&&r.defaultDefinition&&VR(e=r.list).call(e,(function(e){e.definition===r.defaultDefinition&&(t.config.url=e.url,t.curDefinition=e)}))}},{key:"changeDefinition",value:function(e,t){var n=this,r=this.config.definition;if(Array.isArray(null==r?void 0:r.list)&&r.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=Ow(e.bitrate,10)||0),this.emit(VS,{from:t,to:e}),this.hasStart){var i=this.switchURL(e.url,aT({seamless:!1!==r.seamless&&"undefined"!=typeof MediaSource&&"function"==typeof MediaSource.isTypeSupported},e));i&&i.then?i.then((function(){n.emit(KS,{from:t,to:e})})):this.emit(KS,{from:t,to:e})}else this.config.url=e.url}},{key:"reload",value:function(){this.load(),this.reloadFunc=function(){this.play()},this.once(kS,this.reloadFunc)}},{key:"resetState",value:function(){var e=this,t=[oM,BE,WE,UE,KE,XE,NE,jE,VE];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(WE),this.emit(JS)}},{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&&(VR(t).call(t,(function(t){e.deregister(t)})),n)){var r,i=sM();Kw(r=WR(this.config)).call(r,(function(t){"undefined"===e.config[t]||"plugins"!==t&&"presets"!==t&&"el"!==t&&"id"!==t||(e.config[t]=i[t])}))}}},{key:"destroy",value:function(){var e,t,r=this,i=this.innerContainer,o=this.root,a=this.media;if(o&&a){if(this.hasStart=!1,this._useAutoplay=!1,o.removeAttribute(uE),a.removeAttribute(uE),this.updateAcc("destroy"),this._unbindEvents(),this._detachSourceEvents(this.media),rS.clearAllTimers(this),this.emit(FS),null===(t=DM)||void 0===t||t.remove(this),OE.destroy(this),_E(this),mT(fT(n.prototype),"destroy",this).call(this),this.fullscreen&&this._fullscreenEl===this.root&&this.exitFullscreen(),i)for(var s=i.children,c=0;c<s.length;c++)i.removeChild(s[c]);!i&&a instanceof window.Node&&o.contains(a)&&!this.config.remainMediaAfterDestroy&&o.removeChild(a),VR(e=["topBar","leftBar","rightBar","innerContainer"]).call(e,(function(e){r[e]&&o.removeChild(r[e]),r[e]=null}));var l=o.className.split(" ");l.length>0?o.className=Ww(l).call(l,(function(e){return KR(e).call(e,"xgplayer")<0})).join(" "):o.className="",this.removeAttribute("data-xgfill"),["isSeeking","isCanplay","isActive","cssfullscreen","fullscreen"].forEach((function(e){r[e]=!1}))}}},{key:"replay",value:function(){var e=this;this.removeClass(NE),this.currentTime=0,this.isSeeking=!1,bE(this,"replay",(function(){e.once(_S,(function(){var t=e.mediaPlay();t&&t.catch&&t.catch((function(e){console.log(e)}))})),e.emit(CS),e.onPlay()}))}},{key:"retry",value:function(){var e=this;this.removeClass(jE),this.addClass(VE),bE(this,"retry",(function(){var t=e.currentTime,n=e.config.url,r=rS.isMSE(e.media)?{url:n}:e.preProcessUrl(n);e.src=r.url,!e.config.isLive&&(e.currentTime=t),e.once(wS,(function(){e.mediaPlay()}))}))}},{key:"changeFullStyle",value:function(e,t,n,r){e&&(r||(r=JE),this._orgCss||(this._orgCss=rS.filterStyleFromText(e)),rS.addClass(e,n),t&&t!==e&&!this._orgPCss&&(this._orgPCss=rS.filterStyleFromText(t),rS.addClass(t,r),t.setAttribute(uE,this.playerId)))}},{key:"recoverFullStyle",value:function(e,t,n,r){r||(r=JE),this._orgCss&&(rS.setStyleFromCsstext(e,this._orgCss),this._orgCss=""),rS.removeClass(e,n),t&&t!==e&&this._orgPCss&&(rS.setStyleFromCsstext(t,this._orgPCss),this._orgPCss="",rS.removeClass(t,r),t.removeAttribute(uE))}},{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:rS.scrollTop(),left:rS.scrollLeft()},this._fullscreenEl=e,this._fullActionFrom="get",rS.getFullScreenEl()===this._fullscreenEl)return this.onFullscreenChange(),jR.resolve();try{for(var r=0;r<cE.length;r++){var i=cE[r];if(e[i]){var o="webkitRequestFullscreen"===i?e.webkitRequestFullscreen(window.Element.ALLOW_KEYBOARD_INPUT):e[i]();return o&&o.then?o:jR.resolve()}}return n.fullscreenEnabled||n.webkitSupportsFullscreen?(n.webkitEnterFullscreen(),jR.resolve()):jR.reject(new Error("call getFullscreen fail"))}catch(a){return jR.reject(new Error("call getFullscreen fail"))}}},{key:"exitFullscreen",value:function(e){if(this.isRotateFullscreen&&this.exitRotateFullscreen(),this._fullscreenEl||rS.getFullScreenEl()){this.root;var t=this.media;this._fullActionFrom="exit";try{for(var n=0;n<lE.length;n++){var r=lE[n];if(document[r]){var i=document[r]();return i&&i.then?i:jR.resolve()}}return t&&t.webkitSupportsFullscreen?(t.webkitExitFullScreen(),jR.resolve()):jR.reject(new Error("call exitFullscreen fail"))}catch(o){return jR.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?Xm(e="".concat(eM," ")).call(e,ZE):ZE;this.changeFullStyle(this.root,t,n);var r=this.config.fullscreen,i=void 0===r?{}:r;(!0===i.useCssFullscreen||"function"==typeof i.useCssFullscreen&&i.useCssFullscreen())&&(this.fullscreen=!0,this.emit(US,!0)),this._cssfullscreenEl=t,this.cssfullscreen=!0,this.emit(BS,!0)}},{key:"exitCssFullscreen",value:function(){var e,t=this._cssfullscreenEl?Xm(e="".concat(eM," ")).call(e,ZE):ZE;if(this.fullscreen){var n=this.config.fullscreen,r=void 0===n?{}:n;!0===r.useCssFullscreen||"function"==typeof r.useCssFullscreen&&r.useCssFullscreen()?(this.recoverFullStyle(this.root,this._cssfullscreenEl,t),this.fullscreen=!1,this.emit(US,!1)):this.removeClass(t)}else this.recoverFullStyle(this.root,this._cssfullscreenEl,t);this._cssfullscreenEl=null,this.cssfullscreen=!1,this.emit(BS,!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?Xm(e="".concat(eM," ")).call(e,YE):YE;this._fullscreenEl=t||this.root,this.changeFullStyle(this.root,t,n,$E),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(US,!0)}},{key:"exitRotateFullscreen",value:function(e){var t,n=this._fullscreenEl!==this.root?Xm(t="".concat(eM," ")).call(t,YE):YE;this.recoverFullStyle(this.root,this._fullscreenEl,n,$E),this.isRotateFullscreen=!1,this.fullscreen=!1,this.setRotateDeg(0),this.emit(US,!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(ES,aT({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(MS,aT({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(QE),this._clearUserTimer(),void 0!==t.isLock&&(n.isActiveLocked=t.isLock),!1===t.autoHide||!0===t.isLock||n.isActiveLocked)this._clearUserTimer();else{var r=t&&t.delay?t.delay:this.config.inactive;this.userTimer=rS.setTimeout(this,(function(){e.userTimer=null,e.blur()}),r)}}},{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(QE)}}},{key:"onEmptied",value:function(){this.updateAcc("emptied")}},{key:"onCanplay",value:function(){this.removeClass(XE),this.removeClass(jE),this.removeClass(VE),this.isCanplay=!0,this.waitTimer&&rS.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(GS,(function(){e._seekToStartTime()})))}},{key:"onLoadstart",value:function(){this.removeClass(jE),this.isCanplay=!1}},{key:"onPlay",value:function(){this.state===RM&&this.setState(bM),this.removeClass(UE),this.ended&&this.removeClass(NE),!this.config.closePlayVideoFocus&&this.focus()}},{key:"onPause",value:function(){this.addClass(UE),this.updateAcc("pause"),this.config.closePauseVideoFocus||(this._clearUserTimer(),this.focus())}},{key:"onEnded",value:function(){this.updateAcc("ended"),this.addClass(NE),this.setState(RM)}},{key:"onError",value:function(){this.isError=!0,this.updateAcc("error"),this.removeClass(oM),this.removeClass(WE),this.removeClass(XE),this.removeClass(VE),this.addClass(jE)}},{key:"onSeeking",value:function(){this.isSeeking||this.updateAcc("seeking"),this.isSeeking=!0,this.addClass(aM)}},{key:"onSeeked",value:function(){this.isSeeking=!1,this.waitTimer&&rS.clearTimeout(this,this.waitTimer),this.removeClass(VE),this.removeClass(aM)}},{key:"onWaiting",value:function(){var e=this;this.waitTimer&&rS.clearTimeout(this,this.waitTimer),this.updateAcc("waiting"),this.waitTimer=rS.setTimeout(this,(function(){e.addClass(VE),e.emit(XS),rS.clearTimeout(e,e.waitTimer),e.waitTimer=null}),this.config.minWaitDelay)}},{key:"onPlaying",value:function(){var e=this;this.isError=!1,[WE,UE,NE,jE,KE,VE].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(VE))&&this.media.readyState>2&&(this.removeClass(VE),rS.clearTimeout(this,this.waitTimer),this.waitTimer=null),!this.paused&&this.state===_M&&this.duration&&(this.setState(bM),this.emit(AS)),this._accPlayed.t||this.paused||this.ended||(this._accPlayed.t=(new Date).getTime())}},{key:"onVolumechange",value:function(){"Number"===rS.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 r="String"===rS.typeOf(e)?e:e.type||"";n.props&&"Array"!==rS.typeOf(n.props)&&(n.props=[n.props]),this.emit($S,aT({eventType:r,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,r=void 0===n?0:n,i=t.endDiff,o=void 0===i?0:i,a=this.media.buffered;if(!a||0===a.length||!this.duration)return!0;for(var s=e||this.media.currentTime||.2,c=a.length,l=0;l<c;l++)if(a.start(l)+r<=s&&a.end(l)-o>s)return!0;return!1}},{key:"resizePosition",value:function(){var e,t=this,n=this.videoPos,r=n.vy,i=n.vx,o=n.h,a=n.w,s=this.videoPos.rotate;if(!(s<0&&o<0&&a<0)){var c=this.videoPos._pi;if(!c&&this.media.videoHeight&&(c=this.media.videoWidth/this.media.videoHeight*100),c){this.videoPos.pi=c;var l={rotate:s=s<0?0:s},u=0,d=0,h=1,f=Math.abs(s/90),p=this.root,v=this.innerContainer,g=p.offsetWidth,y=v?v.offsetHeight:p.offsetHeight,m={},_=y,b=g;if(f%2==0)h=o>0?100/o:a>0?100/a:1,l.scale=h,u=r>0?(100-o)/2-r:0,l.y=2===f?0-u:u,d=i>0?(100-a)/2-i:0,l.x=2===f?0-d:d,m.width="".concat(b,"px"),m.height="".concat(_,"px"),m.maxWidth="",m.maxHeight="";else if(f%2==1){_=g;var R=y-g;d=-R/2/(b=y)*100,l.x=3===f?d+r/2:d-r/2,u=R/2/_*100,l.y=3===f?u+i/2:u-i/2,l.scale=h,m.width="".concat(b,"px"),m.maxWidth="".concat(b,"px"),m.height="".concat(_,"px"),m.maxHeight="".concat(_,"px")}var w=rS.getTransformStyle(l,this.media.style.transform||this.media.style.webkitTransform);m.transform=w,m.webkitTransform=w,VR(e=WR(m)).call(e,(function(e){t.media.style[e]=m[e]}))}}}},{key:"position",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{h:0,y:0,x:0,w:0};if(this.media&&e&&e.h){var t=this.videoPos;t.h=100*e.h||0,t.w=100*e.w||0,t.vx=100*e.x||0,t.vy=100*e.y||0,this.resizePosition()}}},{key:"setConfig",value:function(e){var t,n=this;e&&VR(t=WR(e)).call(t,(function(t){if("plugins"!==t){n.config[t]=e[t];var r=n.plugins[t.toLowerCase()];r&&"Function"===rS.typeOf(r.setConfig)&&r.setConfig(e[t])}}))}},{key:"playNext",value:function(e){var t=this;this.resetState(),this.setConfig(e),this._currentTime=0,this._duration=0,bE(this,"playnext",(function(){t.start(),t.emit(ZS,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,r=n.videoWidth,i=n.videoHeight,o=this.config,a=o.fitVideoSize,s=o.videoFillMode;if("fill"!==s&&"cover"!==s&&"contain"!==s||this.setAttribute("data-xgfill",s),i&&r){this._videoHeight=i,this._videoWidth=r;var c=this.controls&&this.innerContainer?this.controls.root.getBoundingClientRect().height:0,l=t.width,u=t.height-c,d=Ow(r/i*1e3,10),h=Ow(l/u*1e3,10),f=l,p=u,v={};"auto"===a&&h>d||"fixWidth"===a?(p=l/d*1e3,this.config.fluid?v.paddingTop="".concat(100*p/f,"%"):v.height="".concat(p+c,"px")):("auto"===a&&h<d||"fixHeight"===a)&&(f=d*u/1e3,v.width="".concat(f,"px")),this.fullscreen||this.cssfullscreen||WR(v).forEach((function(t){e.root.style[t]=v[t]})),("fillHeight"===s&&h<d||"fillWidth"===s&&h>d)&&this.setAttribute("data-xgfill","cover");var g={videoScale:d,vWidth:f,vHeight:p,cWidth:f,cHeight:p+c};this.resizePosition(),this.emit(QS,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=Xm(e="".concat(100*t,"% ")).call(e,100*n,"%")}},{key:"setState",value:function(e){var t;tS.logInfo("setState",Xm(t="state from:".concat(wM[this.state]," to:")).call(t,wM[e])),this._state=e}},{key:"preProcessUrl",value:function(e,t){var n=this.config,r=n.preProcessUrl,i=n.preProcessUrlOptions,o=cG({},i,t);return rS.isBlob(e)||"function"!=typeof r?{url:e}:r(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(gM),this.emit("hasstart"))}},{key:"isPlaying",get:function(){return this._state===bM||this._state===RM},set:function(e){e?this.setState(bM):this._state>=bM&&this.setState(mM)}},{key:"definitionList",get:function(){return this.config&&this.config.definition&&this.config.definition.list||[]},set:function(e){var t=this,n=this.config.definition,r=null,i=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&&(r=e),n.defaultDefinition===e.definition&&(i=e)})),!i&&e.length>0&&(i=e[0]),r?this.changeDefinition(r):i&&this.changeDefinition(i)}},{key:"videoFrameInfo",get:function(){var e={total:0,dropped:0,corrupted:0,droppedRate:0,droppedDuration:0};if(!this.media||!this.media.getVideoPlaybackQuality)return e;var t=this.media.getVideoPlaybackQuality();return e.dropped=t.droppedVideoFrames||0,e.total=t.totalVideoFrames||0,e.corrupted=t.corruptedVideoFrames||0,e.total>0&&(e.droppedRate=e.dropped/e.total*100,e.droppedDuration=Ow(this.cumulateTime/e.total*e.dropped,0)),e}},{key:"lang",get:function(){return this.config.lang},set:function(e){var t,n;0!==Ww(t=pM.langKeys).call(t,(function(t){return t===e})).length||"zh"===e?(this.config.lang=e,OE.setLang(e,this)):console.error(Xm(n="Sorry, set lang fail, because the language [".concat(e,"] is not supported now, list of all supported languages is [")).call(n,pM.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 dS}},{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 mT(fT(n.prototype),"readyState",this)}},{key:"error",get:function(){var e=mT(fT(n.prototype),"error",this);return this.i18n[e]||e}},{key:"networkState",get:function(){return mT(fT(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=rS.convertDeg(e))%90==0&&e!==this.videoPos.rotate&&(this.videoPos.rotate=e,this.resizePosition())}},{key:"avgSpeed",get:function(){return MM},set:function(e){MM=e}},{key:"realTimeSpeed",get:function(){return EM},set:function(e){EM=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 hE.call.apply(hE,Xm(n=[this]).call(n,QR(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(e,t){var n;return pE.call.apply(pE,Xm(n=[this]).call(n,QR(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(e,t){var n;return vE.call.apply(vE,Xm(n=[this]).call(n,QR(Array.prototype).call(arguments)))}},{key:"usePluginHooks",value:function(e,t,n){for(var r,i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];return gE.call.apply(gE,Xm(r=[this]).call(r,QR(Array.prototype).call(arguments)))}},{key:"removePluginHooks",value:function(e,t,n){for(var r,i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];return yE.call.apply(yE,Xm(r=[this]).call(r,QR(Array.prototype).call(arguments)))}},{key:"setUserActive",value:function(e,t){var n;"boolean"==typeof t&&t!==this.muted&&(this.addInnerOP("volumechange"),rS.typeOf(t)===Boolean&&(this.muted=t)),null===(n=DM)||void 0===n||n.setActive(this.playerId,e)}}],[{key:"debugger",get:function(){return tS.config.debug},set:function(e){tS.config.debug=e}},{key:"instManager",get:function(){return DM},set:function(e){DM=e}},{key:"getCurrentUserActivePlayerId",value:function(){var e;return null===(e=DM)||void 0===e?void 0:e.getActiveId()}},{key:"setCurrentUserActive",value:function(e,t){var n;null===(n=DM)||void 0===n||n.setActive(e,t)}},{key:"isHevcSupported",value:function(){return uS.isHevcSupported()}},{key:"probeConfigSupported",value:function(e){return uS.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}(oE);dT(zM,"defaultPreset",null),dT(zM,"XgVideoProxy",null),zM.instManager=kM.getInstance();function AM(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var PM=MG;Pn({target:"Function",proto:!0,forced:Function.bind!==PM},{bind:PM});var xM,CM,FM=Wu("Function").bind,IM=ue,HM=FM,OM=Function.prototype,LM=o((function(e){var t=e.bind;return e===OM||IM(OM,e)&&t===OM.bind?HM:t}));function XM(e,t){var n;return(XM=yd?LM(n=yd).call(n):function(e,t){return e.__proto__=t,e})(e,t)}function UM(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Iu(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Cu(e,"prototype",{writable:!1}),t&&XM(e,t)}function BM(e){var t;return(BM=yd?LM(t=Uu).call(t):function(e){return e.__proto__||Uu(e)})(e)}function NM(){if("undefined"==typeof Reflect||!VG)return!1;if(VG.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(VG(Boolean,[],(function(){}))),!0}catch(oK){return!1}}function VM(e){var t=NM();return function(){var n,r=BM(e);if(t){var i=BM(this).constructor;n=VG(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Su(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return AM(e)}(this,n)}}function jM(e,t,n){var r;NM()?jM=LM(r=VG).call(r):jM=function(e,t,n){var r=[null];vd(r).apply(r,t);var i=new(LM(Function).apply(e,r));return n&&XM(i,n.prototype),i};return jM.apply(null,arguments)}function KM(e){var t="function"==typeof HR?new HR:void 0;return KM=function(e){if(null===e||(n=e,-1===Yy(r=Function.toString.call(n)).call(r,"[native code]")))return e;var n,r;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,i)}function i(){return jM(e,arguments,BM(this).constructor)}return i.prototype=Iu(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),XM(i,e)},KM(e)}var WM=function(e){return e.Fatal="Fatal",e.Error="Error",e.Warn="Warn",e}(WM||{}),QM=function(e){return e[e.MANIFEST_HLS_ERROR=1100]="MANIFEST_HLS_ERROR",e[e.MANIFEST_DASH_ERROR=1200]="MANIFEST_DASH_ERROR",e[e.NETWORK=2100]="NETWORK",e[e.NETWORK_TIMEOUT=2101]="NETWORK_TIMEOUT",e[e.NETWORK_FORBIDDEN=2103]="NETWORK_FORBIDDEN",e[e.NETWORK_NOTFOUND=2104]="NETWORK_NOTFOUND",e[e.NETWORK_RANGE_NOT_SATISFIABLE=2116]="NETWORK_RANGE_NOT_SATISFIABLE",e[e.DEMUX_FLV_ERROR=3100]="DEMUX_FLV_ERROR",e[e.DEMUX_HLS_ERROR=3200]="DEMUX_HLS_ERROR",e[e.DEMUX_MP4_ERROR=3300]="DEMUX_MP4_ERROR",e[e.DEMUX_FMP4_ERROR=3400]="DEMUX_FMP4_ERROR",e[e.DEMUX_SIDX_ERROR=3410]="DEMUX_SIDX_ERROR",e[e.REMUX_FMP4_ERROR=4100]="REMUX_FMP4_ERROR",e[e.REMUX_MP4_ERROR=4200]="REMUX_MP4_ERROR",e[e.MEDIA_ERR_ABORTED=5101]="MEDIA_ERR_ABORTED",e[e.MEDIA_ERR_NETWORK=5102]="MEDIA_ERR_NETWORK",e[e.MEDIA_ERR_DECODE=5103]="MEDIA_ERR_DECODE",e[e.MEDIA_ERR_SRC_NOT_SUPPORTED=5104]="MEDIA_ERR_SRC_NOT_SUPPORTED",e[e.MEDIA_ERR_CODEC_NOT_SUPPORTED=5105]="MEDIA_ERR_CODEC_NOT_SUPPORTED",e[e.MEDIA_ERR_URL_EMPTY=5106]="MEDIA_ERR_URL_EMPTY",e[e.MEDIA_MSE_ADD_SB=5200]="MEDIA_MSE_ADD_SB",e[e.MEDIA_MSE_APPEND_BUFFER=5201]="MEDIA_MSE_APPEND_BUFFER",e[e.MEDIA_MSE_OTHER=5202]="MEDIA_MSE_OTHER",e[e.MEDIA_MSE_FULL=5203]="MEDIA_MSE_FULL",e[e.MEDIA_MSE_HIJACK=5204]="MEDIA_MSE_HIJACK",e[e.MEDIA_EME_HIJACK=5301]="MEDIA_EME_HIJACK",e[e.DRM_LICENSE=7100]="DRM_LICENSE",e[e.DRM_CUSTOM_LICENSE=7200]="DRM_CUSTOM_LICENSE",e[e.OTHER=8e3]="OTHER",e[e.RUNTIME_NO_CANPLAY_ERROR=9001]="RUNTIME_NO_CANPLAY_ERROR",e[e.RUNTIME_BUFFERBREAK_ERROR=9002]="RUNTIME_BUFFERBREAK_ERROR",e[e.RUNTIME_BWAITING_TIMEOUT_ERROR=9002]="RUNTIME_BWAITING_TIMEOUT_ERROR",e[e.MODULE_LOAD_ERROR=110]="MODULE_LOAD_ERROR",e.UNKNOWN="UNKNOWN",e}(QM||{}),qM=(Oy(xM={},2100,{messageTextKey:"NETWORK",level:"Error"}),Oy(xM,2101,{messageTextKey:"NETWORK_TIMEOUT",level:"Error"}),Oy(xM,2103,{messageTextKey:"NETWORK_FORBIDDEN",level:"Error"}),Oy(xM,2104,{messageTextKey:"NETWORK_NOTFOUND",level:"Error"}),Oy(xM,5101,{messageTextKey:"MEDIA_ERR_ABORTED",level:"Error"}),Oy(xM,5102,{messageTextKey:"MEDIA_ERR_NETWORK",level:"Error"}),Oy(xM,5103,{messageTextKey:"MEDIA_ERR_DECODE",level:"Error"}),Oy(xM,5104,{messageTextKey:"MEDIA_ERR_SRC_NOT_SUPPORTED",level:"Error"}),Oy(xM,5105,{messageTextKey:"MEDIA_ERR_CODEC_NOT_SUPPORTED",level:"Error"}),Oy(xM,5106,{messageTextKey:"MEDIA_ERR_URL_EMPTY",level:"Error"}),Oy(xM,110,{messageTextKey:"MODULE_LOAD_ERROR",level:"Fatal"}),Oy(xM,7100,{messageTextKey:"DRM_LICENSE",level:"Fatal"}),xM),ZM=(Oy(CM={},"manifest",{messageTextKey:"MANIFEST",level:"Error"}),Oy(CM,"network",{messageTextKey:"NETWORK",level:"Error"}),Oy(CM,"demux",{messageTextKey:"DEMUX",level:"Error"}),Oy(CM,"remux",{messageTextKey:"REMUX",level:"Error"}),Oy(CM,"media",{messageTextKey:"MEDIA",level:"Error"}),Oy(CM,"drm",{messageTextKey:"DRM",level:"Error"}),Oy(CM,"other",{messageTextKey:"OTHER",level:"Error"}),Oy(CM,"runtime",{messageTextKey:"RUNTIME",level:"Error"}),CM),YM=function(e){UM(n,e);var t=VM(n);function n(e,r){var i,o,a,s,c,l,u;Py(this,n);var d="string"==typeof e?{message:e}:e,h=null!==(i=null!==(o=null!==(a=null==r?void 0:r.getText(null==d?void 0:d.messageTextKey))&&void 0!==a?a:null==d?void 0:d.message)&&void 0!==o?o:null==d||null===(s=d.error)||void 0===s?void 0:s.message)&&void 0!==i?i:null==r?void 0:r.getText("UNKNOWN");return Oy(AM(u=t.call(this,h)),"errorCode",void 0),Oy(AM(u),"level",void 0),Oy(AM(u),"ext",void 0),u.errorCode=null!==(c=null==d?void 0:d.errorCode)&&void 0!==c?c:"UNKNOWN",u.level=null!==(l=null==d?void 0:d.level)&&void 0!==l?l:"Error",u.ext=null==d?void 0:d.ext,u}return Hy(n)}(KM(Error));function $M(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return new YM(Fm(Fm({errorCode:e},qM[e]),t),n)}function JM(e,t){var n,r,i=qM[e.errorCode]||ZM[e.errorType],o=e.errorCode;return new YM({messageTextKey:null==i?void 0:i.messageTextKey,message:null!==(n=null==e?void 0:e.message)&&void 0!==n?n:o,errorCode:o,level:null!==(r=null==i?void 0:i.level)&&void 0!==r?r:"Error",ext:e},t)}var eD=function(e){hT(n,e);var t=yT(n);function n(){return cT(this,n),t.apply(this,arguments)}return uT(n,[{key:"isEndedShow",get:function(){return this.config.isEndedShow},set:function(e){this.config.isEndedShow=e}},{key:"hide",value:function(){rS.addClass(this.root,"hide")}},{key:"show",value:function(e){rS.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(gS,(function(){e.isEndedShow&&rS.removeClass(e.root,"hide")})),this.config.hideCanplay?(this.once(bS,(function(){e.onTimeUpdate()})),this.on(IS,(function(){rS.removeClass(e.root,"hide"),rS.addClass(e.root,"xg-showplay"),e.once(bS,(function(){e.onTimeUpdate()}))}))):this.on(vS,(function(){rS.addClass(e.root,"hide")}))}},{key:"setConfig",value:function(e){var t=this;WR(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?rS.removeClass(this.root,"xg-showplay"):this.once(bS,(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,r=n.poster,i=n.hideCanplay,o=n.fillMode,a=n.notHidden,s=this.getBgSize(o),c=r?Xm(e="background-image:url(".concat(r,");")).call(e,s):s;return Xm(t='<xg-poster class="xgplayer-poster '.concat(a?"xg-not-hidden":i?"xg-showplay":"",'" 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}(FE);function tD(){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 nD(){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 rD={};function iD(e){var t;e?window.clearTimeout(e):VR(t=WR(rD)).call(t,(function(e){window.clearTimeout(rD[e].id),delete rD[e]}))}var oD=function(e){hT(n,e);var t=yT(n);function n(e){var r;return cT(this,n),dT(vT(r=t.call(this,e)),"onPlayerReset",(function(){r.autoPlayStart=!1;var e="auto"===r.config.mode?"auto-hide":"hide";r.setAttr("data-state","play"),rS.removeClass(r.root,e),r.show()})),dT(vT(r),"onAutoplayStart",(function(){if(!r.autoPlayStart){var e="auto"===r.config.mode?"auto-hide":"hide";rS.addClass(r.root,e),r.autoPlayStart=!0,r.toggleTo("play")}})),r.autoPlayStart=!1,r}return uT(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(DS,(function(){n&&(n.lang&&"en"===n.lang?rS.addClass(t.root,"lang-is-en"):"jp"===n.lang&&rS.addClass(t.root,"lang-is-jp"))})),this.on(AS,this.onAutoplayStart),this.on(PS,(function(){var t="auto"===e.config.mode?"auto-hide":"hide";e.setAttr("data-state","play"),rS.removeClass(e.root,t),e.show()})),this.on(vS,(function(){e.toggleTo("play")})),this.on(yS,(function(){e.toggleTo("pause")})),this.on(JS,(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:tD,class:"xg-icon-play"},startPause:{icon:nD,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(){rS.addClass(this.root,"hide")}},{key:"show",value:function(e){rS.removeClass(this.root,"hide")}},{key:"focusHide",value:function(){rS.addClass(this.root,"focus-hide")}},{key:"recover",value:function(){rS.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 rD[e]&&window.clearTimeout(rD[e].id),rD[e]={},n.start&&n.start(),rD[e].id=window.setTimeout((function(){n.end&&n.end(),window.clearTimeout(rD[e].id),delete rD[e]}),t),rD[e].id}("pauseplay",400,{start:function(){rS.addClass(t.root,"interact"),t.show(),t.switchStatus(!0)},end:function(){rS.removeClass(t.root,"interact"),!e&&t.hide(),t._animateId=null}})}},{key:"endAnimate",value:function(){rS.removeClass(this.root,"interact"),iD(this._animateId),this._animateId=null}},{key:"switchPausePlay",value:function(e){var t=this.player;(e.cancelable&&e.preventDefault(),e.stopPropagation(),t.state<gM)||(this.player.paused||t.state!==bM?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<bM)&&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),iD(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}(FE),aD=function(e){hT(n,e);var t=yT(n);function n(){return cT(this,n),t.apply(this,arguments)}return uT(n,[{key:"render",value:function(){var e=this.config.innerHtml,t=rS.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="",r=1;r<=12;r++)n+='<div class="xgplayer-enter-bar'.concat(r,'"></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}(FE);function sD(e,t,n){try{var r,i;return Xm(r=Xm(i=' <div class="xg-tips '.concat(n?"hide":" ",'" lang-key="')).call(i,e.i18nKeys[t],'">\n ')).call(r,e.i18n[t],"\n </div>")}catch(oK){return'<div class="xg-tips hide"></div>'}}var cD=function(e){hT(n,e);var t=yT(n);function n(){return cT(this,n),t.apply(this,arguments)}return uT(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 Xm(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:zE.CONTROLS_RIGHT,index:10}}}]),n}(FE);function lD(e){var t=nk(e);return-1===KR(e).call(e,"%")&&!gw(t)&&t}var uD=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],dD=uD.length;function hD(e){if("string"==typeof e&&(e=document.querySelector(e)),e&&"object"===sT(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<dD;t++)e[uD[t]]=0;return e}();var n={};n.width=e.offsetWidth,n.height=e.offsetHeight;for(var r=n.isBorderBox="border-box"===t.boxSizing,i=0;i<dD;i++){var o=uD[i],a=t[o],s=nk(a);n[o]=gw(s)?0:s}var c=n.paddingLeft+n.paddingRight,l=n.paddingTop+n.paddingBottom,u=n.marginLeft+n.marginRight,d=n.marginTop+n.marginBottom,h=n.borderLeftWidth+n.borderRightWidth,f=n.borderTopWidth+n.borderBottomWidth,p=r,v=lD(t.width);!1!==v&&(n.width=v+(p?0:c+h));var g=lD(t.height);return!1!==g&&(n.height=g+(p?0:l+f)),n.innerWidth=n.width-(c+h),n.innerHeight=n.height-(l+f),n.outerWidth=n.width+u,n.outerHeight=n.height+d,n}}function fD(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.identifier===t)return r}}var pD="dragStart",vD="dragMove",gD="dragEnded",yD={mousedown:["mousemove","mouseup"],touchstart:["touchmove","touchend","touchcancel"],pointerdown:["pointermove","pointerup","pointercancel"]},mD=function(e){hT(n,e);var t=yT(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return cT(this,n),(r=t.call(this)).isEnabled=!0,r.isDragging=!1,r.isDown=!1,r.position={},r.downPoint={},r.dragPoint={x:0,y:0},r.startPos={x:0,y:0},r._root=e instanceof Element?e:document.querySelector(e),r._handlerDom=i.handle instanceof Element?i.handle:document.querySelector(i.handle),r._root&&r._handlerDom?(r._bindStartEvent(),r):gT(r)}return uT(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)]),VR(e=yD[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=yD[this._startKey];VR(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&&(VR(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=Xm(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=fD(e.changedTouches,this.touchIdentifier);t&&this.dragMove(e,t)}},{key:"ontouchend",value:function(e){var t=fD(e.changedTouches,this.touchIdentifier);t&&this.dragEnd(e,t),e.preventDefault()}},{key:"ontouchcancel",value:function(e){var t=fD(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=hD(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(pD,this.startPos)}},{key:"dragEnd",value:function(e,t){this._root&&(this._unbindPostStartEvents(),this.isDragging&&(this._root.style.transform="",this.setLeftTop(),this.emit(gD)),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,r=n.x,i=n.y,o=this._dragPointerMove(e,t),a=o.x,s=o.y;a=this.checkContain("x",a,r),s=this.checkContain("y",s,i),this.position.x=r+a,this.position.y=i+s,this.dragPoint.x=a,this.dragPoint.y=s,this.emit(vD,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=gw(t)?0:t,this.position.y=gw(n)?0:n,this._addTransformPosition(e)}},{key:"_addTransformPosition",value:function(e){var t=e.transform;if(0===KR(t).call(t,"matrix")){var n=t.split(","),r=0===KR(t).call(t,"matrix3d")?12:4,i=Ow(n[r],10),o=Ow(n[r+1],10);this.position.x+=i,this.position.y+=o}}},{key:"_getPositionCoord",value:function(e,t){if(-1!==KR(e).call(e,"%")){var n=hD(this._root.parentNode);return n?nk(e)/100*n[t]:0}return Ow(e,10)}}]),n}(TT),_D=function(e){hT(n,e);var t=yT(n);function n(e){var r;cT(this,n),dT(vT(r=t.call(this,e)),"onCancelClick",(function(e){r.exitMini(),r.isClose=!0})),dT(vT(r),"onCenterClick",(function(e){var t=vT(r).player;t.paused?t.play():t.pause()})),dT(vT(r),"onScroll",(function(e){if(!(!window.scrollY&&0!==window.scrollY||Math.abs(window.scrollY-r.pos.scrollY)<50)){var t=Ow(rS.getCss(r.player.root,"height"));t+=r.config.scrollTop,r.pos.scrollY=window.scrollY,window.scrollY>t+5?!r.isMini&&!r.isClose&&r.getMini():window.scrollY<=t&&(r.isMini&&r.exitMini(),r.isClose=!1)}})),r.isMini=!1,r.isClose=!1;var i=vT(r).config;return r.pos={left:i.left<0?window.innerWidth-i.width-20:i.left,top:i.top<0?window.innerHeight-i.height-20:i.top,height:r.config.height,width:r.config.width,scrollY:window.scrollY||0},r.lastStyle=null,r}return uT(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(yS,(function(){e.setAttr("data-state","pause")})),this.on(vS,(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(cD,n,cD.pluginName)}var r=rS.checkTouchSupport()?"touchend":"click";this.bind(".mini-cancel-btn",r,this.onCancelClick),this.bind(".play-icon",r,this.onCenterClick),this.config.disableDrag||(this._draggabilly=new mD(this.player.root,{handle:this.root})),this.config.isScrollSwitch&&window.addEventListener("scroll",this.onScroll)}}},{key:"registerIcons",value:function(){return{play:{icon:tD,class:"xg-icon-play"},pause:{icon:nD,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,r=this.playerConfig,i=this.config.target||this.player.root;this.lastStyle={},rS.addClass(n.root,"xgplayer-mini"),VR(e=["width","height","top","left"]).call(e,(function(e){t.lastStyle[e]=i.style[e],i.style[e]="".concat(t.pos[e],"px")})),r.fluid&&(i.style["padding-top"]=""),this.emit(NS,!0),n.isMini=this.isMini=!0}}},{key:"exitMini",value:function(){var e=this;if(!this.isMini)return!1;var t,n=this.player,r=this.playerConfig,i=this.config.target||this.player.root;(rS.removeClass(n.root,"xgplayer-mini"),this.lastStyle)&&VR(t=WR(this.lastStyle)).call(t,(function(t){i.style[t]=e.lastStyle[t]}));this.lastStyle=null,r.fluid&&(n.root.style.width="100%",n.root.style.height="0",n.root.style["padding-top"]="".concat(100*r.height/r.width,"%")),this.emit(NS,!1),this.isMini=n.isMini=!1}},{key:"destroy",value:function(){window.removeEventListener("scroll",this.onScroll);var e=rS.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(sD(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}(FE),bD={mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mousemove:"onMouseMove"},RD=["videoClick","videoDbClick"],wD=function(e){hT(n,e);var t=yT(n);function n(){var e,r;cT(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return dT(vT(r=t.call.apply(t,Xm(e=[this]).call(e,o))),"onMouseMove",(function(e){var t=vT(r),n=t.player,i=t.playerConfig;n.isActive||(n.focus({autoHide:!i.closeDelayBlur}),!i.closeFocusVideoFocus&&n.media.focus())})),dT(vT(r),"onMouseEnter",(function(e){var t=vT(r),n=t.playerConfig,i=t.player;!n.closeFocusVideoFocus&&i.media.focus(),n.closeDelayBlur?i.focus({autoHide:!1}):i.focus(),r.emit(LS)})),dT(vT(r),"onMouseLeave",(function(e){var t=r.playerConfig,n=t.closePlayerBlur,i=t.leavePlayerTime,o=t.closeDelayBlur;n||o||(i?r.player.focus({autoHide:!0,delay:i}):r.player.blur({ignorePaused:!0})),r.emit(OS)})),dT(vT(r),"onVideoClick",(function(e){var t=vT(r),n=t.player,i=t.playerConfig;e.target&&i.closeVideoClick||e.target!==n.root&&e.target!==n.media&&e.target!==n.innerContainer&&e.target!==n.media.__canvas||(e.preventDefault(),i.closeVideoStopPropagation||e.stopPropagation(),r._clickCount++,r.clickTimer&&(clearTimeout(r.clickTimer),r.clickTimer=null),r.clickTimer=setTimeout((function(){r._clickCount&&(r._clickCount--,bE(vT(r),RD[0],(function(e,t){r.switchPlayPause(t.e)}),{e:e,paused:n.paused}),clearTimeout(r.clickTimer),r.clickTimer=null)}),300))})),dT(vT(r),"onVideoDblClick",(function(e){var t=vT(r),n=t.player,i=t.playerConfig;i.closeVideoDblclick||!e.target||e.target!==n.media&&e.target!==n.media.__canvas||(!i.closeVideoClick&&r._clickCount<2?r._clickCount=0:(r._clickCount=0,r.clickTimer&&(clearTimeout(r.clickTimer),r.clickTimer=null),e.preventDefault(),e.stopPropagation(),bE(vT(r),RD[1],(function(e,t){r.emitUserAction(t.e,"switch_fullscreen",{props:"fullscreen",from:n.fullscreen,to:!n.fullscreen}),n.fullscreen?n.exitFullscreen():n.getFullscreen()}),{e:e,fullscreen:n.fullscreen})))})),r}return uT(n,[{key:"afterCreate",value:function(){var e=this;this._clickCount=0,VR(RD).call(RD,(function(t){e.__hooks[t]=null})),"mobile"===this.playerConfig.isMobileSimulateMode||"mobile"===uS.device&&!uS.os.isIpad||this.initEvents()}},{key:"initEvents",value:function(){var e,t=this,n=this.player,r=n.media,i=n.root,o=this.playerConfig.enableContextmenu;i&&i.addEventListener("click",this.onVideoClick,!1),i&&i.addEventListener("dblclick",this.onVideoDblClick,!1),VR(e=WR(bD)).call(e,(function(e){i.addEventListener(e,t[bD[e]],!1)})),!o&&r&&r.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,r=n.video,i=n.root;this.clickTimer&&clearTimeout(this.clickTimer),i.removeEventListener("click",this.onVideoClick,!1),i.removeEventListener("dblclick",this.onVideoDblClick,!1),r.removeEventListener("contextmenu",this.onContextmenu,!1),VR(e=WR(bD)).call(e,(function(e){i.removeEventListener(e,t[bD[e]],!1)}))}}],[{key:"pluginName",get:function(){return"pc"}},{key:"defaultConfig",get:function(){return{}}}]),n}(wE),GD="press",TD="pressend",kD="doubleclick",SD="click",ED="touchmove",MD="touchstart",DD="touchend",zD={start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},AD={start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseleave"};function PD(e){return e&&e.length>0?e[e.length-1]:null}var xD=function(){function e(t){var n,r=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{eventType:"touch"};cT(this,e),dT(this,"onTouchStart",(function(e){var t=r._pos,n=r.root,i=PD(e.touches);t.x=i?Ow(i.pageX,10):e.pageX,t.y=i?Ow(i.pageX,10):e.pageX,t.start=!0,r.__setPress(e),n.addEventListener(r.events.end,r.onTouchEnd),n.addEventListener(r.events.cancel,r.onTouchCancel),n.addEventListener(r.events.move,r.onTouchMove),r.trigger(MD,e)})),dT(this,"onTouchCancel",(function(e){r.onTouchEnd(e)})),dT(this,"onTouchEnd",(function(e){var t=r._pos,n=r.root;r.__clearPress(),n.removeEventListener(r.events.cancel,r.onTouchCancel),n.removeEventListener(r.events.end,r.onTouchEnd),n.removeEventListener(r.events.move,r.onTouchMove),e.moving=t.moving,e.press=t.press,t.press&&r.trigger(TD,e),r.trigger(DD,e),!t.press&&!t.moving&&r.__setDb(e),t.press=!1,t.start=!1,t.moving=!1})),dT(this,"onTouchMove",(function(e){var t=r._pos,n=r.config,i=PD(e.touches),o=i?Ow(i.pageX,10):e.pageX,a=i?Ow(i.pageY,10):e.pageX,s=o-t.x,c=a-t.y;Math.abs(c)<n.miniStep&&Math.abs(s)<n.miniStep||(r.__clearPress(),t.press&&r.trigger(TD,e),t.press=!1,t.moving=!0,r.trigger(ED,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},VR(n=WR(i)).call(n,(function(e){r.config[e]=i[e]})),this.root=t,this.events="mouse"===i.eventType?AD:zD,this.pressIntrvalId=null,this.dbIntrvalId=null,this.__handlers={},this._initEvent()}return uT(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(GD,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(kD,e);this.dbIntrvalId=setTimeout((function(){t.__clearDb(),t._pos.start||t._pos.press||t._pos.moving||t.trigger(SD,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,r=this.__handlers[e],i=-1,o=0;o<r.length;o++)if(r[o]===t){i=o;break}if(i>=0)vw(n=this.__handlers[e]).call(n,i,1)}}},{key:"trigger",value:function(e,t){var n;this.__handlers[e]&&VR(n=this.__handlers[e]).call(n,(function(n){try{n(t)}catch(KTe){console.error("trigger>>:".concat(e),KTe)}}))}},{key:"destroy",value:function(){var e=this,t={touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"};WR(t).forEach((function(n){e.root.removeEventListener(n,e[t[n]])}))}}]),e}();function CD(){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 FD="auto",ID="seeking",HD="playbackrate",OD=["videoClick","videoDbClick"],LD=function(e){hT(n,e);var t=yT(n);function n(e){var r;return cT(this,n),dT(vT(r=t.call(this,e)),"onTouchStart",(function(e){var t=vT(r),n=t.player,i=t.config,o=t.pos,a=t.playerConfig,s=r.getTouche(e);if(s&&!i.disableGesture&&r.duration>0&&!n.ended){o.isStart=!0,r.timer&&clearTimeout(r.timer),rS.checkIsFunction(a.disableSwipeHandler)&&a.disableSwipeHandler(),qm(r).call(r,".xg-dur").innerHTML=rS.format(r.duration);var c=r.root.getBoundingClientRect();90===n.rotateDeg?(o.top=c.left,o.left=c.top,o.width=c.height,o.height=c.width):(o.top=c.top,o.left=c.left,o.width=c.width,o.height=c.height);var l=Ow(s.pageX-o.left,10),u=Ow(s.pageY-o.top,10);o.x=90===n.rotateDeg?u:l,o.y=90===n.rotateDeg?l:u,o.scopeL=i.scopeL*o.width,o.scopeR=(1-i.scopeR)*o.width,o.scopeM1=o.width*(1-i.scopeM)/2,o.scopeM2=o.width-o.scopeM1}})),dT(vT(r),"onTouchMove",(function(e){var t=r.getTouche(e),n=vT(r),i=n.pos,o=n.config,a=n.player;if(t&&!o.disableGesture&&r.duration&&i.isStart){var s=o.miniMoveStep,c=o.hideControlsActive,l=Ow(t.pageX-i.left,10),u=Ow(t.pageY-i.top,10),d=90===a.rotateDeg?u:l,h=90===a.rotateDeg?l:u;if(Math.abs(d-i.x)>s||Math.abs(h-i.y)>s){var f=d-i.x,p=h-i.y,v=i.scope;if(-1===v&&(0===(v=r.checkScope(d,h,f,p,i))&&(c?a.blur():a.focus({autoHide:!1}),!i.time&&(i.time=Ow(1e3*a.currentTime,10)+1e3*r.timeOffset)),i.scope=v),-1===v||v>0&&!o.gestureY||0===v&&!o.gestureX)return;r.executeMove(f,p,v,i.width,i.height),i.x=d,i.y=h}}})),dT(vT(r),"onTouchEnd",(function(e){var t=vT(r),n=t.player,i=t.pos,o=t.playerConfig;if(setTimeout((function(){n.getPlugin("progress")&&n.getPlugin("progress").resetSeekState()}),10),i.isStart){i.scope>-1&&e.cancelable&&e.preventDefault();var a=r.config,s=a.disableGesture,c=a.gestureX;!s&&c?r.endLastMove(i.scope):i.time=0,i.scope=-1,r.resetPos(),rS.checkIsFunction(o.enableSwipeHandler)&&o.enableSwipeHandler(),r.changeAction(FD)}})),dT(vT(r),"onRootTouchMove",(function(e){!r.config.disableGesture&&r.config.gestureX&&r.checkIsRootTarget(e)&&(e.stopPropagation(),r.pos.isStart?r.onTouchMove(e):r.onTouchStart(e))})),dT(vT(r),"onRootTouchEnd",(function(e){r.pos.scope>-1&&r.onTouchEnd(e)})),r.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},r.timer=null,r}return uT(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:CD,class:"xg-seek-pre"}}}},{key:"afterCreate",value:function(){var e,t=this;VR(OD).call(OD,(function(e){t.__hooks[e]=null}));var n=this.playerConfig,r=this.config,i=this.player;!0===n.closeVideoDblclick&&(r.closedbClick=!0),this.resetPos(),rS.isUndefined(n.disableGesture)||(r.disableGesture=!!n.disableGesture),this.appendChild(".xg-seek-icon",this.icons.seekTipIcon),this.xgMask=rS.createDom("xg-mask","",{},"xgmask"),i.root.appendChild(this.xgMask),this.initCustomStyle(),this.registerThumbnail();var o="mouse"===this.domEventType?"mouse":"touch";this.touch=new xD(this.root,{eventType:o,needPreventDefault:!this.config.disableGesture}),this.root.addEventListener("contextmenu",(function(e){e.preventDefault()})),i.root.addEventListener("touchmove",this.onRootTouchMove,!0),i.root.addEventListener("touchend",this.onRootTouchEnd,!0),i.root.addEventListener("touchcancel",this.onRootTouchEnd,!0);var a=this.player.controls;a&&a.center&&(a.center.addEventListener("touchmove",this.onRootTouchMove,!0),a.center.addEventListener("touchend",this.onRootTouchEnd,!0),a.center.addEventListener("touchcancel",this.onRootTouchEnd,!0)),this.on(GS,(function(){var e=t.player,n=t.config;e.duration>0&&1e3*e.duration<n.moveDuration&&(n.moveDuration=1e3*e.duration)})),this.on([wS,gS],(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(VR(e=WR(s)).call(e,(function(e){t.touch.on(e,(function(n){t[s[e]](n)}))})),!r.disableActive){var c=i.plugins.progress;c&&(c.addCallBack("dragmove",(function(e){t.activeSeekNote(e.currentTime,e.forward)})),["dragend","click"].forEach((function(e){c.addCallBack(e,(function(){t.changeAction(FD)}))})))}}},{key:"registerThumbnail",value:function(){var e=this.player.plugins.thumbnail;if(e&&e.usable){this.thumbnail=e.createThumbnail(null,"mobile-thumbnail");var t=qm(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,r=e.timePreviewStyle,i=e.curTimeColor,o=e.durationColor;t&&(qm(this).call(this,".xg-curbar").style.backgroundColor=t);n&&(qm(this).call(this,".xg-bar").style.backgroundColor=n);if(r){var a=qm(this).call(this,".time-preview");WR(r).forEach((function(e){a.style[e]=r[e]}))}var s=i||t,c=o;s&&(qm(this).call(this,".xg-cur").style.color=s),c&&(qm(this).call(this,".xg-dur").style.color=c),this.config.disableTimeProgress&&rS.addClass(qm(this).call(this,".xg-timebar"),"hide")}},{key:"resetPos",value:function(){var e,t=this;this.pos?(this.pos.isStart=!1,this.pos.scope=-1,VR(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,r,i){var o=i.width,a=-1;if(e<0||e>o)return a;var s=0===r?Math.abs(n):Math.abs(n/r);return Math.abs(n)>0&&s>=1.73&&e>i.scopeM1&&e<i.scopeM2?a=0:(0===Math.abs(n)||s<=.57)&&(a=e<i.scopeL?1:e>i.scopeR?2:3),a}},{key:"executeMove",value:function(e,t,n,r,i){switch(n){case 0:this.updateTime(e/r*this.config.scopeM);break;case 1:this.updateBrightness(t/i);break;case 2:uS.os.isIos||this.updateVolume(t/i)}}},{key:"endLastMove",value:function(e){var t=this,n=this.pos,r=this.player,i=this.config,o=(n.time-this.timeOffset)/1e3;if(0===e)r.seek(Number(o).toFixed(1)),i.hideControlsEnd?r.blur():r.focus(),this.timer=setTimeout((function(){t.pos.time=0}),500);this.changeAction(FD)}},{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,r=this.playerConfig;t.state<bM?r.closeVideoClick||(this.sendUseAction(rS.createEvent("click")),t.play()):!n.closedbClick||r.closeVideoClick?t.isActive?t.blur():t.focus():r.closeVideoClick||((t.isActive||n.focusVideoClick)&&(this.sendUseAction(rS.createEvent("click")),this.switchPlayPause()),t.focus())}},{key:"dbClickHandler",value:function(e){var t=this.config,n=this.player;!t.closedbClick&&n.state>=bM&&(this.sendUseAction(rS.createEvent("dblclick")),this.switchPlayPause())}},{key:"onClick",value:function(e){var t=this,n=this.player;bE(this,OD[0],(function(e,n){t.clickHandler(n.e)}),{e:e,paused:n.paused})}},{key:"onDbClick",value:function(e){var t=this,n=this.player;bE(this,OD[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,r=this.player;n.disablePress||(t.rate=this.player.playbackRate,this.emitUserAction("press","change_rate",{prop:"playbackRate",from:r.playbackRate,to:n.pressRate}),r.playbackRate=n.pressRate,this.changeAction(HD))}},{key:"onPressEnd",value:function(e){var t=this.pos,n=this.config,r=this.player;n.disablePress||(this.emitUserAction("pressend","change_rate",{prop:"playbackRate",from:r.playbackRate,to:t.rate}),r.playbackRate=t.rate,t.rate=1,this.changeAction(FD))}},{key:"updateTime",value:function(e){var t=this.player,n=this.config,r=this.player.duration;e=Number(e.toFixed(4));var i=Ow(e*n.moveDuration,10)+this.timeOffset;i=(i+=this.pos.time)<0?0:i>1e3*r?1e3*r-200:i,t.getPlugin("time")&&t.getPlugin("time").updateTime(i/1e3),t.getPlugin("progress")&&t.getPlugin("progress").updatePercent(i/1e3/this.duration,!0),this.activeSeekNote(i/1e3,e>0),n.isTouchingSeek&&t.seek(Number((i-this.timeOffset)/1e3).toFixed(1)),this.pos.time=i}},{key:"updateVolume",value:function(e){this.player.rotateDeg&&(e=-e);var t=this.player,n=this.pos;if(e=Ow(100*e,10),n.volume+=e,!(Math.abs(n.volume)<10)){var r=Ow(10*t.volume,10)-Ow(n.volume/10,10);r=r>10?10:r<1?0:r,t.volume=r/10,n.volume=0}}},{key:"updateBrightness",value:function(e){var t=this.pos,n=this.config,r=this.xgMask;if(n.darkness){this.player.rotateDeg&&(e=-e);var i=t.light+.8*e;i=i>n.maxDarkness?n.maxDarkness:i<0?0:i,r&&(r.style.backgroundColor="rgba(0,0,0,".concat(i,")")),t.light=i}}},{key:"activeSeekNote",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.player,r=this.config,i=!(this.duration!==1/0&&this.duration>0);if(e&&"number"==typeof e&&!i&&!r.disableActive){e<0?e=0:e>n.duration&&(e=n.duration-.2),this.changeAction(ID);var o=n.plugins.start;if(o&&o.focusHide(),qm(this).call(this,".xg-dur").innerHTML=rS.format(this.duration),qm(this).call(this,".xg-cur").innerHTML=rS.format(e),qm(this).call(this,".xg-curbar").style.width="".concat(e/this.duration*100,"%"),t)rS.removeClass(qm(this).call(this,".xg-seek-show"),"xg-back");else rS.addClass(qm(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<mM)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,r="normal"!==this.config.gradient?"gradient ".concat(this.config.gradient):"gradient";return Xm(e=Xm(t=Xm(n='\n <xg-trigger class="trigger">\n <div class="'.concat(r,'"></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}(FE);Pn({target:"String",proto:!0},{repeat:DT});var XD=Wu("String").repeat,UD=ue,BD=XD,ND=String.prototype,VD=o((function(e){var t=e.repeat;return"string"==typeof e||e===ND||UD(ND,e)&&t===ND.repeat?BD:t}));function jD(e){var t=e.tagName;return!("INPUT"!==t&&"TEXTAREA"!==t&&!e.isContentEditable)}var KD=function(e){hT(n,e);var t=yT(n);function n(){var e,r;cT(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return dT(vT(r=t.call.apply(t,Xm(e=[this]).call(e,o))),"onBodyKeyDown",(function(e){if(r.player){var t=e||window.event,n=t.keyCode,i=vT(r),o=i._keyState,a=i.player,s=r.config,c=s.disable,l=s.disableBodyTrigger,u=s.isIgnoreUserActive;c||l||!a.isUserActive&&!u||jD(t.target)||!r.checkIsVisible()||t.metaKey||t.altKey||t.ctrlKey?o.isBodyKeyDown=!1:(VD(e)||o.isKeyDown||((t.target===document.body||r.config.isGlobalTrigger&&!jD(t.target))&&r.checkCode(n,!0)&&(o.isBodyKeyDown=!0),document.addEventListener("keyup",r.onBodyKeyUp)),o.isBodyKeyDown&&r.handleKeyDown(t))}})),dT(vT(r),"onBodyKeyUp",(function(e){r.player&&(document.removeEventListener("keyup",r.onBodyKeyUp),r.handleKeyUp(e))})),dT(vT(r),"onKeydown",(function(e){if(r.player){var t=e||window.event,n=vT(r)._keyState;if(!VD(t)){if(r.config.disable||r.config.disableRootTrigger||t.metaKey||t.altKey||t.ctrlKey)return;!t||37!==t.keyCode&&!r.checkCode(t.keyCode)||t.target!==r.player.root&&t.target!==r.player.video&&t.target!==r.player.controls.el||(n.isKeyDown=!0),r.player.root.addEventListener("keyup",r.onKeyup)}n.isKeyDown&&r.handleKeyDown(t)}})),dT(vT(r),"onKeyup",(function(e){r.player&&(r.player.root.removeEventListener("keyup",r.onKeyup),r.handleKeyUp(e))})),r}return uT(n,[{key:"mergekeyCodeMap",value:function(){var e,t=this,n=this.config.keyCodeMap;n&&VR(e=WR(n)).call(e,(function(e){var r;t.keyCodeMap[e]?VR(r=["keyCode","action","disable","pressAction","disablePress","isBodyTarget"]).call(r,(function(r){n[e][r]&&(t.keyCodeMap[e][r]=n[e][r])})):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;WR(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,r=e.bottom,i=window.innerHeight;return!(n<0&&n<0-.9*t||r>0&&r-i>.9*t)}},{key:"checkCode",value:function(e,t){var n,r=this,i=!1;return VR(n=WR(this.keyCodeMap)).call(n,(function(n){r.keyCodeMap[n]&&e===r.keyCodeMap[n].keyCode&&!r.keyCodeMap[n].disable&&(i=!t||t&&!r.keyCodeMap[n].noBodyTarget)})),i}},{key:"downVolume",value:function(e){var t=this.player;if(!(t.volume<=0)){var n=nk((t.volume-.1).toFixed(1)),r={volume:{from:t.volume,to:n}};this.emitUserAction(e,"change_volume",{props:r}),t.volume=n>=0?n:0}}},{key:"upVolume",value:function(e){var t=this.player;if(!(t.volume>=1)){var n=nk((t.volume+.1).toFixed(1)),r={volume:{from:t.volume,to:n}};this.emitUserAction(e,"change_volume",{props:r}),t.volume=n<=1?n:1}}},{key:"seek",value:function(e){var t=this.player,n=t.currentTime,r=t.offsetCurrentTime,i=t.duration,o=t.offsetDuration,a=t.timeSegments,s=r>-1?r:n,c=o||i,l=VD(e)&&this.seekStep>=4?Ow(this.seekStep/2,10):this.seekStep;s+l<=c?s+=l:s=c;var u=rS.getCurrentTimeByOffset(s,a),d={currentTime:{from:n,to:u}};this.emitUserAction(e,"seek",{props:d}),this.player.currentTime=u}},{key:"seekBack",value:function(e){var t=this.player,n=t.currentTime,r=t.offsetCurrentTime,i=t.timeSegments,o=(r>-1?r:n)-(VD(e)?Ow(this.seekStep/2,10):this.seekStep);o<0&&(o=0);var a={currentTime:{from:n,to:o=rS.getCurrentTimeByOffset(o,i)}};this.emitUserAction(e,"seek",{props:a}),this.player.currentTime=o}},{key:"changePlaybackRate",value:function(e){var t=this._keyState,n=this.config,r=this.player;0===t.playbackRate&&(t.playbackRate=r.playbackRate,r.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,r=t.cssfullscreen;n&&(this.emitUserAction("keyup","switch_fullscreen",{prop:"fullscreen",from:n,to:!n}),t.exitFullscreen()),r&&(this.emitUserAction("keyup","switch_css_fullscreen",{prop:"cssfullscreen",from:r,to:!r}),t.exitCssFullscreen())}},{key:"handleKeyDown",value:function(e){var t=this._keyState;if(VD(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 r,i=WR(this.keyCodeMap),o=0;o<i.length;o++){var a=this.keyCodeMap[i[o]],s=a.action,c=a.keyCode,l=a.disable,u=a.pressAction,d=a.disablePress;if(c===e){if(!(l||n&&d)){var h=n&&u||s;"function"==typeof h?s(t,this.player,n):"string"==typeof h&&"function"==typeof this[h]&&this[h](t,this.player,n),this.emit(YS,aT({key:i[o],target:t.target,isPress:n},this.keyCodeMap[i[o]]))}(r=t).preventDefault(),r.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}(wE);function WD(){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 QD=function(e){hT(n,e);var t=yT(n);function n(){return cT(this,n),t.apply(this,arguments)}return uT(n,[{key:"registerIcons",value:function(){return{loadingIcon:WD}}},{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:zE.ROOT}}}]),n}(FE),qD=Pn,ZD=ia.findIndex,YD="findIndex",$D=!0;YD in[]&&Array(1)[YD]((function(){$D=!1})),qD({target:"Array",proto:!0,forced:$D},{findIndex:function(e){return ZD(this,e,arguments.length>1?arguments[1]:void 0)}});var JD=Wu("Array").findIndex,ez=ue,tz=JD,nz=Array.prototype,rz=o((function(e){var t=e.findIndex;return e===nz||ez(nz,e)&&t===nz.findIndex?tz:t})),iz=function(e){hT(n,e);var t=yT(n);function n(){var e,r;cT(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return dT(vT(r=t.call.apply(t,Xm(e=[this]).call(e,o))),"_onMouseenter",(function(e){r.emit("icon_mouseenter",{pluginName:r.pluginName})})),dT(vT(r),"_onMouseLeave",(function(e){r.emit("icon_mouseleave",{pluginName:r.pluginName})})),r}return uT(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}(FE),oz=function(e){hT(n,e);var t=yT(n);function n(){var e,r;cT(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return dT(vT(r=t.call.apply(t,Xm(e=[this]).call(e,o))),"btnClick",(function(e){e.preventDefault(),e.stopPropagation();var t=vT(r).player;return r.emitUserAction(e,"switch_play_pause",{prop:"paused",from:t.paused,to:!t.paused}),t.ended?t.replay():t.paused?(t.play(),r.animate(!1)):(t.pause(),r.animate(!0)),!1})),r}return uT(n,[{key:"afterCreate",value:function(){mT(fT(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([vS,yS,mS,SS],(function(){e.animate(t.paused)}))}},{key:"registerIcons",value:function(){return{play:{icon:tD,class:"xg-icon-play"},pause:{icon:nD,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=qm(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(){mT(fT(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(sD(this,"PLAY_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"play"}},{key:"defaultConfig",get:function(){return{position:zE.CONTROLS_LEFT,index:0,disable:!1}}}]),n}(iz);function az(){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 sz=function(e){hT(n,e);var t=yT(n);function n(){return cT(this,n),t.apply(this,arguments)}return uT(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:az,class:"xg-fullscreen-back"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(this.root,e.screenBack)}},{key:"show",value:function(){rS.addClass(this.root,"show")}},{key:"hide",value:function(){rS.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:zE.ROOT_TOP,index:0}}}]),n}(FE);function cz(){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 lz(){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 uz=function(e){hT(n,e);var t=yT(n);function n(){var e,r;cT(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return dT(vT(r=t.call.apply(t,Xm(e=[this]).call(e,o))),"_onOrientationChange",(function(e){r.player.fullscreen&&r.config.rotateFullscreen&&(90===window.orientation||-90===window.orientation?r.player.setRotateDeg(0):r.player.setRotateDeg(90))})),r}return uT(n,[{key:"afterCreate",value:function(){var e=this;mT(fT(n.prototype),"afterCreate",this).call(this);var t=this.config,r=this.playerConfig;if(!t.disable){t.target&&(this.playerConfig.fullscreenTarget=this.config.target);var i=rS.getFullScreenEl();r.fullscreenTarget===i&&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(US,(function(t){var n=qm(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:sz,options:{config:{onClick:function(t){e.handleFullscreen(t)}}}})),"mobile"===uS.device&&window.addEventListener("orientationchange",this._onOrientationChange)}}},{key:"registerIcons",value:function(){return{fullscreen:{icon:cz,class:"xg-get-fullscreen"},exitFullscreen:{icon:lz,class:"xg-exit-fullscreen"}}}},{key:"destroy",value:function(){mT(fT(n.prototype),"destroy",this).call(this),this.unbind(".xgplayer-icon","mobile"===uS.device?"touchend":"click",this.handleFullscreen),"mobile"===uS.device&&window.removeEventListener("orientationchange",this._onOrientationChange)}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.fullscreen),this.appendChild(".xgplayer-icon",e.exitFullscreen)}},{key:"toggleFullScreen",value:function(e){e instanceof Event&&(e.preventDefault(),e.stopPropagation());var t=this.player,n=this.config;!0===n.useCssFullscreen||"function"==typeof n.useCssFullscreen&&n.useCssFullscreen()?(t.fullscreen?t.exitCssFullscreen():t.getCssFullscreen(),this.animate(t.fullscreen)):n.rotateFullscreen?(t.fullscreen?t.exitRotateFullscreen():t.getRotateFullscreen(),this.animate(t.fullscreen)):n.switchCallback&&"function"==typeof n.switchCallback?n.switchCallback(t.fullscreen):t.fullscreen?(t.exitFullscreen(),n.useScreenOrientation&&this.unlockScreen()):(t.getFullscreen().catch((function(e){})),n.useScreenOrientation&&t.aspectRatio>1&&this.lockScreen(n.lockOrientationType))}},{key:"animate",value:function(e){e?this.setAttr("data-state","full"):this.setAttr("data-state","normal"),this.topBackIcon&&(e?(this.topBackIcon.show(),this.hide()):(this.topBackIcon.hide(),this.show()))}},{key:"render",value:function(){if(!this.config.disable){return'<xg-icon class="xgplayer-fullscreen">\n <div class="xgplayer-icon">\n </div>\n '.concat(sD(this,"FULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}},{key:"lockScreen",value:function(e){try{screen.orientation.lock(e).catch((function(e){}))}catch(oK){}}},{key:"unlockScreen",value:function(){try{screen.orientation.unlock().catch((function(e){}))}catch(oK){}}}],[{key:"pluginName",get:function(){return"fullscreen"}},{key:"defaultConfig",get:function(){return{position:zE.CONTROLS_RIGHT,index:0,useCssFullscreen:!1,rotateFullscreen:!1,useScreenOrientation:!1,lockOrientationType:"landscape",switchCallback:null,target:null,disable:!1,needBackIcon:!1}}}]),n}(iz);function dz(){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 hz(){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 fz(){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 pz=function(e){hT(n,e);var t=yT(n);function n(){var e,r;cT(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return dT(vT(r=t.call.apply(t,Xm(e=[this]).call(e,o))),"onBarMousedown",(function(e){var t=vT(r).player,n=qm(r).call(r,".xgplayer-bar");rS.event(e);var i=n.getBoundingClientRect(),o=rS.getEventPos(e,t.zoom),a=i.height-(o.clientY-i.top);if(o.h=a,o.barH=i.height,r.pos=o,!(a<-2))return r.updateVolumePos(a,e),document.addEventListener("mouseup",r.onBarMouseUp),r._d.isStart=!0,!1})),dT(vT(r),"onBarMouseMove",(function(e){var t=vT(r)._d;if(t.isStart){var n=vT(r),i=n.pos,o=n.player;e.preventDefault(),e.stopPropagation(),rS.event(e);var a=rS.getEventPos(e,o.zoom);t.isMoving=!0;var s=i.h-a.clientY+i.clientY;s>i.barH||r.updateVolumePos(s,e)}})),dT(vT(r),"onBarMouseUp",(function(e){rS.event(e),document.removeEventListener("mouseup",r.onBarMouseUp);var t=vT(r)._d;t.isStart=!1,t.isMoving=!1})),dT(vT(r),"onMouseenter",(function(e){r._d.isActive=!0,r.focus(),r.emit("icon_mouseenter",{pluginName:r.pluginName})})),dT(vT(r),"onMouseleave",(function(e){r._d.isActive=!1,r.unFocus(100,!1,e),r.emit("icon_mouseleave",{pluginName:r.pluginName})})),dT(vT(r),"onVolumeChange",(function(e){if(r.player){var t=r.player,n=t.muted,i=t.volume;r._d.isMoving||(qm(r).call(r,".xgplayer-drag").style.height=n||0===i?"4px":"".concat(100*i,"%"),r.config.showValueLabel&&r.updateVolumeValue()),r.animate(n,i)}})),r}return uT(n,[{key:"registerIcons",value:function(){return{volumeSmall:{icon:hz,class:"xg-volume-small"},volumeLarge:{icon:dz,class:"xg-volume"},volumeMuted:{icon:fz,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,r=t.volume;if(n.volumeColor)qm(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"!==uS.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(TS,this.onVolumeChange),this.once(kS,this.onVolumeChange),"Number"!==rS.typeOf(r)&&(this.player.volume=this.config.default),this.onVolumeChange()}}},{key:"updateVolumePos",value:function(e,t){var n=this.player,r=qm(this).call(this,".xgplayer-drag"),i=qm(this).call(this,".xgplayer-bar");if(i&&r){var o=Ow(e/i.getBoundingClientRect().height*1e3,10);r.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,r=qm(this).call(this,".xgplayer-value-label"),i=Math.max(Math.min(t,1),0);r.innerText=n?0:Math.round(100*i)}},{key:"focus",value:function(){this.player.focus({autoHide:!1}),this._timerId&&(rS.clearTimeout(this,this._timerId),this._timerId=null),rS.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],r=arguments.length>2?arguments[2]:void 0,i=this._d,o=this.player;i.isActive||(this._timerId&&(rS.clearTimeout(this,this._timerId),this._timerId=null),this._timerId=rS.setTimeout(this,(function(){i.isActive||(n?o.blur():o.focus(),rS.removeClass(e.root,"slide-show"),i.isStart&&e.onBarMouseUp(r)),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&&(rS.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"===uS.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 Xm(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:zE.CONTROLS_RIGHT,index:1,disable:!1,showValueLabel:!1,default:.6,miniVolume:.2}}}]),n}(FE);function vz(){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 gz(){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 yz="picture-in-picture",mz="inline",_z="fullscreen",bz=function(e){hT(n,e);var t=yT(n);function n(){var e,r;cT(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return dT(vT(r=t.call.apply(t,Xm(e=[this]).call(e,o))),"switchPIP",(function(e){if(!r.isPIPAvailable())return!1;e.stopPropagation&&e.stopPropagation(),r.isPip?(r.exitPIP(),r.emitUserAction(e,"change_pip",{props:"pip",from:!0,to:!1}),r.setAttr("data-state","normal")):4===r.player.media.readyState&&(r.requestPIP(),r.emitUserAction(e,"change_pip",{props:"pip",from:!1,to:!0}),r.setAttr("data-state","pip"))})),r}return uT(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()&&(mT(fT(n.prototype),"afterCreate",this).call(this),this.pMode=mz,this.initPipEvents(),this.config.showIcon&&this.initIcons(),this.once(xS,(function(){e.config.showIcon&&(rS.removeClass(qm(e).call(e,".xgplayer-icon"),"xg-icon-disable"),e.bind("click",e.switchPIP))})))}},{key:"registerIcons",value:function(){return{pipIcon:{icon:vz,class:"xg-get-pip"},pipIconExit:{icon:gz,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;rS.setTimeout(e,(function(){!n&&t.mediaPlay()}),0),!n&&t.mediaPlay(),e.setAttr("data-state","normal"),e.pipWindow=null,t.emit(qS,!1)},this.enterPIPCallback=function(n){t.emit(qS,!0),null!=n&&n.pictureInPictureWindow&&(e.pipWindow=n.pictureInPictureWindow),e.setAttr("data-state","pip")},this.onWebkitpresentationmodechanged=function(n){var r=t.media.webkitPresentationMode;e.pMode===_z&&r!==_z&&t.onFullscreenChange(null,!1),e.pMode=r,r===yz?e.enterPIPCallback(n):r===mz&&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,r=Ww(t=VR(n=_T(document.styleSheets)).call(n,(function(t){try{var n;return VR(n=_T(t.cssRules)).call(n,(function(e){return e.cssText})).join("")}catch(oK){var r=document.createElement("link");r.rel="stylesheet",r.type=t.type,r.media=t.media,r.href=t.href,e.document.head.appendChild(r)}return""}))).call(t,Boolean).join("\n"),i=document.createElement("style");i.textContent=r,e.document.head.appendChild(i)}},{key:"requestPIP",value:function(){var e=this,t=this.player,r=this.playerConfig,i=this.config;if(this.isPIPAvailable()&&!this.isPip)try{var o=r.poster;if(o&&(t.media.poster="String"===rS.typeOf(o)?o:o.poster),i.preferDocument&&this.isDocPIPAvailable()){var a={};if(i.width&&i.height)a.width=i.width,a.height=i.height;else{var s=t.root.getBoundingClientRect();a.width=s.width,a.height=s.height}documentPictureInPicture.requestWindow(a).then((function(n){var r=i.docPiPNode,o=i.docPiPStyle;e.enterPIPCallback();var a=r||t.root,s=a.parentElement,c=a.previousSibling,l=a.nextSibling;e.copyStyleIntoPiPWindow(n);var u=document.createElement("style");if(u.append("body{padding:0; margin:0;}"),o){var d="";"string"==typeof o?d=o:"function"==typeof o&&(d=o.call(i)),d&&u.append(d)}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&&(l?s.insertBefore(a,l):c?s.insertBefore(a,c.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(c){return console.error("requestPiP",c),!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(r){return console.error("exitPIP",r),!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===yz}},{key:"isPIPAvailable",value:function(){var e=this.player.media;return"Boolean"===rS.typeOf(document.pictureInPictureEnabled)&&document.pictureInPictureEnabled&&("Boolean"===rS.typeOf(e.disablePictureInPicture)&&!e.disablePictureInPicture||e.webkitSupportsPresentationMode&&"Function"===rS.typeOf(e.webkitSetPresentationMode))||this.isDocPIPAvailable()}},{key:"isDocPIPAvailable",value:function(){return"documentPictureInPicture"in window&&/^(https|file)/.test(location.protocol)}},{key:"destroy",value:function(){mT(fT(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(sD(this,"PIP",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"pip"}},{key:"defaultConfig",get:function(){return{position:zE.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}(iz),Rz=c,wz=vt("iterator"),Gz=!Rz((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,r){t.delete("b"),n+=r+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[wz]||"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})),Tz=_,kz=2147483647,Sz=/[^\0-\u007E]/,Ez=/[.\u3002\uFF0E\uFF61]/g,Mz="Overflow: input needs wider integers to process",Dz=RangeError,zz=Tz(Ez.exec),Az=Math.floor,Pz=String.fromCharCode,xz=Tz("".charCodeAt),Cz=Tz([].join),Fz=Tz([].push),Iz=Tz("".replace),Hz=Tz("".split),Oz=Tz("".toLowerCase),Lz=function(e){return e+22+75*(e<26)},Xz=function(e,t,n){var r=0;for(e=n?Az(e/700):e>>1,e+=Az(e/t);e>455;)e=Az(e/35),r+=36;return Az(r+36*e/(e+38))},Uz=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=xz(e,n++);if(i>=55296&&i<=56319&&n<r){var o=xz(e,n++);56320==(64512&o)?Fz(t,((1023&i)<<10)+(1023&o)+65536):(Fz(t,i),n--)}else Fz(t,i)}return t}(e);var n,r,i=e.length,o=128,a=0,s=72;for(n=0;n<e.length;n++)(r=e[n])<128&&Fz(t,Pz(r));var c=t.length,l=c;for(c&&Fz(t,"-");l<i;){var u=kz;for(n=0;n<e.length;n++)(r=e[n])>=o&&r<u&&(u=r);var d=l+1;if(u-o>Az((kz-a)/d))throw Dz(Mz);for(a+=(u-o)*d,o=u,n=0;n<e.length;n++){if((r=e[n])<o&&++a>kz)throw Dz(Mz);if(r==o){for(var h=a,f=36;;){var p=f<=s?1:f>=s+26?26:f-s;if(h<p)break;var v=h-p,g=36-p;Fz(t,Pz(Lz(p+v%g))),h=Az(v/g),f+=36}Fz(t,Pz(Lz(h))),s=Xz(a,d,l==c),a=0,l++}}a++,o++}return Cz(t,"")},Bz=Pn,Nz=s,Vz=F,jz=_,Kz=P,Wz=Gz,Qz=so,qz=lo,Zz=O_,Yz=Co,$z=Kc,Jz=Zo,eA=$h,tA=z,nA=tt,rA=Jt,iA=or,oA=an,aA=re,sA=Yr,cA=Ni,lA=B,uA=rh,dA=Zd,hA=uf,fA=yk,pA=vt("iterator"),vA="URLSearchParams",gA=vA+"Iterator",yA=Jz.set,mA=Jz.getterFor(vA),_A=Jz.getterFor(gA),bA=Object.getOwnPropertyDescriptor,RA=function(e){if(!Kz)return Nz[e];var t=bA(Nz,e);return t&&t.value},wA=RA("fetch"),GA=RA("Request"),TA=RA("Headers"),kA=GA&&GA.prototype,SA=TA&&TA.prototype,EA=Nz.RegExp,MA=Nz.TypeError,DA=Nz.decodeURIComponent,zA=Nz.encodeURIComponent,AA=jz("".charAt),PA=jz([].join),xA=jz([].push),CA=jz("".replace),FA=jz([].shift),IA=jz([].splice),HA=jz("".split),OA=jz("".slice),LA=/\+/g,XA=Array(4),UA=function(e){return XA[e-1]||(XA[e-1]=EA("((?:%[\\da-f]{2}){"+e+"})","gi"))},BA=function(e){try{return DA(e)}catch(KTe){return e}},NA=function(e){var t=CA(e,LA," "),n=4;try{return DA(t)}catch(KTe){for(;n;)t=CA(t,UA(n--),BA);return t}},VA=/[!'()~]|%20/g,jA={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},KA=function(e){return jA[e]},WA=function(e){return CA(zA(e),VA,KA)},QA=$z((function(e,t){yA(this,{type:gA,iterator:uA(mA(e).entries),kind:t})}),"Iterator",(function(){var e=_A(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),!0),qA=function(e){this.entries=[],this.url=null,void 0!==e&&(aA(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===AA(e,0)?OA(e,1):e:sA(e)))};qA.prototype={type:vA,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,o,a,s,c=dA(e);if(c)for(n=(t=uA(e,c)).next;!(r=Vz(n,t)).done;){if(o=(i=uA(oA(r.value))).next,(a=Vz(o,i)).done||(s=Vz(o,i)).done||!Vz(o,i).done)throw MA("Expected sequence with length 2");xA(this.entries,{key:sA(a.value),value:sA(s.value)})}else for(var l in e)nA(e,l)&&xA(this.entries,{key:l,value:sA(e[l])})},parseQuery:function(e){if(e)for(var t,n,r=HA(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(n=HA(t,"="),xA(this.entries,{key:NA(FA(n)),value:NA(PA(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],xA(n,WA(e.key)+"="+WA(e.value));return PA(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var ZA=function(){eA(this,YA);var e=yA(this,new qA(arguments.length>0?arguments[0]:void 0));Kz||(this.length=e.entries.length)},YA=ZA.prototype;if(Zz(YA,{append:function(e,t){hA(arguments.length,2);var n=mA(this);xA(n.entries,{key:sA(e),value:sA(t)}),Kz||this.length++,n.updateURL()},delete:function(e){hA(arguments.length,1);for(var t=mA(this),n=t.entries,r=sA(e),i=0;i<n.length;)n[i].key===r?IA(n,i,1):i++;Kz||(this.length=n.length),t.updateURL()},get:function(e){hA(arguments.length,1);for(var t=mA(this).entries,n=sA(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){hA(arguments.length,1);for(var t=mA(this).entries,n=sA(e),r=[],i=0;i<t.length;i++)t[i].key===n&&xA(r,t[i].value);return r},has:function(e){hA(arguments.length,1);for(var t=mA(this).entries,n=sA(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){hA(arguments.length,1);for(var n,r=mA(this),i=r.entries,o=!1,a=sA(e),s=sA(t),c=0;c<i.length;c++)(n=i[c]).key===a&&(o?IA(i,c--,1):(o=!0,n.value=s));o||xA(i,{key:a,value:s}),Kz||(this.length=i.length),r.updateURL()},sort:function(){var e=mA(this);fA(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=mA(this).entries,r=rA(e,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new QA(this,"keys")},values:function(){return new QA(this,"values")},entries:function(){return new QA(this,"entries")}},{enumerable:!0}),Qz(YA,pA,YA.entries,{name:"entries"}),Qz(YA,"toString",(function(){return mA(this).serialize()}),{enumerable:!0}),Kz&&qz(YA,"size",{get:function(){return mA(this).entries.length},configurable:!0,enumerable:!0}),Yz(ZA,vA),Bz({global:!0,constructor:!0,forced:!Wz},{URLSearchParams:ZA}),!Wz&&tA(TA)){var $A=jz(SA.has),JA=jz(SA.set),eP=function(e){if(aA(e)){var t,n=e.body;if(iA(n)===vA)return t=e.headers?new TA(e.headers):new TA,$A(t,"content-type")||JA(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),cA(e,{body:lA(0,sA(n)),headers:lA(0,t)})}return e};if(tA(wA)&&Bz({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return wA(e,arguments.length>1?eP(arguments[1]):{})}}),tA(GA)){var tP=function(e){return eA(this,kA),new GA(e,arguments.length>1?eP(arguments[1]):{})};kA.constructor=tP,tP.prototype=kA,Bz({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:tP})}}var nP,rP=Pn,iP=P,oP=Gz,aP=s,sP=Jt,cP=_,lP=so,uP=lo,dP=$h,hP=tt,fP=aG,pP=Sy,vP=Ji,gP=vu.codeAt,yP=function(e){var t,n,r=[],i=Hz(Iz(Oz(e),Ez,"."),".");for(t=0;t<i.length;t++)n=i[t],Fz(r,zz(Sz,n)?"xn--"+Uz(n):n);return Cz(r,".")},mP=Yr,_P=Co,bP=uf,RP={URLSearchParams:ZA,getState:mA},wP=Zo,GP=wP.set,TP=wP.getterFor("URL"),kP=RP.URLSearchParams,SP=RP.getState,EP=aP.URL,MP=aP.TypeError,DP=aP.parseInt,zP=Math.floor,AP=Math.pow,PP=cP("".charAt),xP=cP(/./.exec),CP=cP([].join),FP=cP(1..toString),IP=cP([].pop),HP=cP([].push),OP=cP("".replace),LP=cP([].shift),XP=cP("".split),UP=cP("".slice),BP=cP("".toLowerCase),NP=cP([].unshift),VP="Invalid scheme",jP="Invalid host",KP="Invalid port",WP=/[a-z]/i,QP=/[\d+-.a-z]/i,qP=/\d/,ZP=/^0x/i,YP=/^[0-7]+$/,$P=/^\d+$/,JP=/^[\da-f]+$/i,ex=/[\0\t\n\r #%/:<>?@[\\\]^|]/,tx=/[\0\t\n\r #/:<>?@[\\\]^|]/,nx=/^[\u0000-\u0020]+/,rx=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,ix=/[\t\n\r]/g,ox=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)NP(t,e%256),e=zP(e/256);return CP(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,o=0;o<8;o++)0!==e[o]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(t=r,n=i),t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=FP(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},ax={},sx=fP({},ax,{" ":1,'"':1,"<":1,">":1,"`":1}),cx=fP({},sx,{"#":1,"?":1,"{":1,"}":1}),lx=fP({},cx,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ux=function(e,t){var n=gP(e,0);return n>32&&n<127&&!hP(t,e)?e:encodeURIComponent(e)},dx={ftp:21,file:null,http:80,https:443,ws:80,wss:443},hx=function(e,t){var n;return 2==e.length&&xP(WP,PP(e,0))&&(":"==(n=PP(e,1))||!t&&"|"==n)},fx=function(e){var t;return e.length>1&&hx(UP(e,0,2))&&(2==e.length||"/"===(t=PP(e,2))||"\\"===t||"?"===t||"#"===t)},px=function(e){return"."===e||"%2e"===BP(e)},vx={},gx={},yx={},mx={},_x={},bx={},Rx={},wx={},Gx={},Tx={},kx={},Sx={},Ex={},Mx={},Dx={},zx={},Ax={},Px={},xx={},Cx={},Fx={},Ix=function(e,t,n){var r,i,o,a=mP(e);if(t){if(i=this.parse(a))throw MP(i);this.searchParams=null}else{if(void 0!==n&&(r=new Ix(n,!0)),i=this.parse(a,null,r))throw MP(i);(o=SP(new kP)).bindURL(this),this.searchParams=o}};Ix.prototype={type:"URL",parse:function(e,t,n){var r,i,o,a,s,c=this,l=t||vx,u=0,d="",h=!1,f=!1,p=!1;for(e=mP(e),t||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,e=OP(e,nx,""),e=OP(e,rx,"$1")),e=OP(e,ix,""),r=pP(e);u<=r.length;){switch(i=r[u],l){case vx:if(!i||!xP(WP,i)){if(t)return VP;l=yx;continue}d+=BP(i),l=gx;break;case gx:if(i&&(xP(QP,i)||"+"==i||"-"==i||"."==i))d+=BP(i);else{if(":"!=i){if(t)return VP;d="",l=yx,u=0;continue}if(t&&(c.isSpecial()!=hP(dx,d)||"file"==d&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=d,t)return void(c.isSpecial()&&dx[c.scheme]==c.port&&(c.port=null));d="","file"==c.scheme?l=Mx:c.isSpecial()&&n&&n.scheme==c.scheme?l=mx:c.isSpecial()?l=wx:"/"==r[u+1]?(l=_x,u++):(c.cannotBeABaseURL=!0,HP(c.path,""),l=xx)}break;case yx:if(!n||n.cannotBeABaseURL&&"#"!=i)return VP;if(n.cannotBeABaseURL&&"#"==i){c.scheme=n.scheme,c.path=vP(n.path),c.query=n.query,c.fragment="",c.cannotBeABaseURL=!0,l=Fx;break}l="file"==n.scheme?Mx:bx;continue;case mx:if("/"!=i||"/"!=r[u+1]){l=bx;continue}l=Gx,u++;break;case _x:if("/"==i){l=Tx;break}l=Px;continue;case bx:if(c.scheme=n.scheme,i==nP)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=vP(n.path),c.query=n.query;else if("/"==i||"\\"==i&&c.isSpecial())l=Rx;else if("?"==i)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=vP(n.path),c.query="",l=Cx;else{if("#"!=i){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=vP(n.path),c.path.length--,l=Px;continue}c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=vP(n.path),c.query=n.query,c.fragment="",l=Fx}break;case Rx:if(!c.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,l=Px;continue}l=Tx}else l=Gx;break;case wx:if(l=Gx,"/"!=i||"/"!=PP(d,u+1))continue;u++;break;case Gx:if("/"!=i&&"\\"!=i){l=Tx;continue}break;case Tx:if("@"==i){h&&(d="%40"+d),h=!0,o=pP(d);for(var v=0;v<o.length;v++){var g=o[v];if(":"!=g||p){var y=ux(g,lx);p?c.password+=y:c.username+=y}else p=!0}d=""}else if(i==nP||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(h&&""==d)return"Invalid authority";u-=pP(d).length+1,d="",l=kx}else d+=i;break;case kx:case Sx:if(t&&"file"==c.scheme){l=zx;continue}if(":"!=i||f){if(i==nP||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(c.isSpecial()&&""==d)return jP;if(t&&""==d&&(c.includesCredentials()||null!==c.port))return;if(a=c.parseHost(d))return a;if(d="",l=Ax,t)return;continue}"["==i?f=!0:"]"==i&&(f=!1),d+=i}else{if(""==d)return jP;if(a=c.parseHost(d))return a;if(d="",l=Ex,t==Sx)return}break;case Ex:if(!xP(qP,i)){if(i==nP||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()||t){if(""!=d){var m=DP(d,10);if(m>65535)return KP;c.port=c.isSpecial()&&m===dx[c.scheme]?null:m,d=""}if(t)return;l=Ax;continue}return KP}d+=i;break;case Mx:if(c.scheme="file","/"==i||"\\"==i)l=Dx;else{if(!n||"file"!=n.scheme){l=Px;continue}if(i==nP)c.host=n.host,c.path=vP(n.path),c.query=n.query;else if("?"==i)c.host=n.host,c.path=vP(n.path),c.query="",l=Cx;else{if("#"!=i){fx(CP(vP(r,u),""))||(c.host=n.host,c.path=vP(n.path),c.shortenPath()),l=Px;continue}c.host=n.host,c.path=vP(n.path),c.query=n.query,c.fragment="",l=Fx}}break;case Dx:if("/"==i||"\\"==i){l=zx;break}n&&"file"==n.scheme&&!fx(CP(vP(r,u),""))&&(hx(n.path[0],!0)?HP(c.path,n.path[0]):c.host=n.host),l=Px;continue;case zx:if(i==nP||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&hx(d))l=Px;else if(""==d){if(c.host="",t)return;l=Ax}else{if(a=c.parseHost(d))return a;if("localhost"==c.host&&(c.host=""),t)return;d="",l=Ax}continue}d+=i;break;case Ax:if(c.isSpecial()){if(l=Px,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=nP&&(l=Px,"/"!=i))continue}else c.fragment="",l=Fx;else c.query="",l=Cx;break;case Px:if(i==nP||"/"==i||"\\"==i&&c.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=BP(s=d))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(c.shortenPath(),"/"==i||"\\"==i&&c.isSpecial()||HP(c.path,"")):px(d)?"/"==i||"\\"==i&&c.isSpecial()||HP(c.path,""):("file"==c.scheme&&!c.path.length&&hx(d)&&(c.host&&(c.host=""),d=PP(d,0)+":"),HP(c.path,d)),d="","file"==c.scheme&&(i==nP||"?"==i||"#"==i))for(;c.path.length>1&&""===c.path[0];)LP(c.path);"?"==i?(c.query="",l=Cx):"#"==i&&(c.fragment="",l=Fx)}else d+=ux(i,cx);break;case xx:"?"==i?(c.query="",l=Cx):"#"==i?(c.fragment="",l=Fx):i!=nP&&(c.path[0]+=ux(i,ax));break;case Cx:t||"#"!=i?i!=nP&&("'"==i&&c.isSpecial()?c.query+="%27":c.query+="#"==i?"%23":ux(i,ax)):(c.fragment="",l=Fx);break;case Fx:i!=nP&&(c.fragment+=ux(i,sx))}u++}},parseHost:function(e){var t,n,r;if("["==PP(e,0)){if("]"!=PP(e,e.length-1))return jP;if(t=function(e){var t,n,r,i,o,a,s,c=[0,0,0,0,0,0,0,0],l=0,u=null,d=0,h=function(){return PP(e,d)};if(":"==h()){if(":"!=PP(e,1))return;d+=2,u=++l}for(;h();){if(8==l)return;if(":"!=h()){for(t=n=0;n<4&&xP(JP,h());)t=16*t+DP(h(),16),d++,n++;if("."==h()){if(0==n)return;if(d-=n,l>6)return;for(r=0;h();){if(i=null,r>0){if(!("."==h()&&r<4))return;d++}if(!xP(qP,h()))return;for(;xP(qP,h());){if(o=DP(h(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;d++}c[l]=256*c[l]+i,2!=++r&&4!=r||l++}if(4!=r)return;break}if(":"==h()){if(d++,!h())return}else if(h())return;c[l++]=t}else{if(null!==u)return;d++,u=++l}}if(null!==u)for(a=l-u,l=7;0!=l&&a>0;)s=c[l],c[l--]=c[u+a-1],c[u+--a]=s;else if(8!=l)return;return c}(UP(e,1,-1)),!t)return jP;this.host=t}else if(this.isSpecial()){if(e=yP(e),xP(ex,e))return jP;if(t=function(e){var t,n,r,i,o,a,s,c=XP(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=c[r]))return e;if(o=10,i.length>1&&"0"==PP(i,0)&&(o=xP(ZP,i)?16:8,i=UP(i,8==o?1:2)),""===i)a=0;else{if(!xP(10==o?$P:8==o?YP:JP,i))return e;a=DP(i,o)}HP(n,a)}for(r=0;r<t;r++)if(a=n[r],r==t-1){if(a>=AP(256,5-t))return null}else if(a>255)return null;for(s=IP(n),r=0;r<n.length;r++)s+=n[r]*AP(256,3-r);return s}(e),null===t)return jP;this.host=t}else{if(xP(tx,e))return jP;for(t="",n=pP(e),r=0;r<n.length;r++)t+=ux(n[r],ax);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return hP(dx,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&hx(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,i=e.host,o=e.port,a=e.path,s=e.query,c=e.fragment,l=t+":";return null!==i?(l+="//",e.includesCredentials()&&(l+=n+(r?":"+r:"")+"@"),l+=ox(i),null!==o&&(l+=":"+o)):"file"==t&&(l+="//"),l+=e.cannotBeABaseURL?a[0]:a.length?"/"+CP(a,"/"):"",null!==s&&(l+="?"+s),null!==c&&(l+="#"+c),l},setHref:function(e){var t=this.parse(e);if(t)throw MP(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new Hx(e.path[0]).origin}catch(KTe){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+ox(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(mP(e)+":",vx)},getUsername:function(){return this.username},setUsername:function(e){var t=pP(mP(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=ux(t[n],lx)}},getPassword:function(){return this.password},setPassword:function(e){var t=pP(mP(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=ux(t[n],lx)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?ox(e):ox(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,kx)},getHostname:function(){var e=this.host;return null===e?"":ox(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Sx)},getPort:function(){var e=this.port;return null===e?"":mP(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=mP(e))?this.port=null:this.parse(e,Ex))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+CP(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Ax))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=mP(e))?this.query=null:("?"==PP(e,0)&&(e=UP(e,1)),this.query="",this.parse(e,Cx)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=mP(e))?("#"==PP(e,0)&&(e=UP(e,1)),this.fragment="",this.parse(e,Fx)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Hx=function(e){var t=dP(this,Ox),n=bP(arguments.length,1)>1?arguments[1]:void 0,r=GP(t,new Ix(e,!1,n));iP||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},Ox=Hx.prototype,Lx=function(e,t){return{get:function(){return TP(this)[e]()},set:t&&function(e){return TP(this)[t](e)},configurable:!0,enumerable:!0}};if(iP&&(uP(Ox,"href",Lx("serialize","setHref")),uP(Ox,"origin",Lx("getOrigin")),uP(Ox,"protocol",Lx("getProtocol","setProtocol")),uP(Ox,"username",Lx("getUsername","setUsername")),uP(Ox,"password",Lx("getPassword","setPassword")),uP(Ox,"host",Lx("getHost","setHost")),uP(Ox,"hostname",Lx("getHostname","setHostname")),uP(Ox,"port",Lx("getPort","setPort")),uP(Ox,"pathname",Lx("getPathname","setPathname")),uP(Ox,"search",Lx("getSearch","setSearch")),uP(Ox,"searchParams",Lx("getSearchParams")),uP(Ox,"hash",Lx("getHash","setHash"))),lP(Ox,"toJSON",(function(){return TP(this).serialize()}),{enumerable:!0}),lP(Ox,"toString",(function(){return TP(this).serialize()}),{enumerable:!0}),EP){var Xx=EP.createObjectURL,Ux=EP.revokeObjectURL;Xx&&lP(Hx,"createObjectURL",sP(Xx,EP)),Ux&&lP(Hx,"revokeObjectURL",sP(Ux,EP))}_P(Hx,"URL"),rP({global:!0,constructor:!0,forced:!oP,sham:!iP},{URL:Hx});var Bx=Pn,Nx=c,Vx=uf,jx=Yr,Kx=Gz,Wx=le("URL");Bx({target:"URL",stat:!0,forced:!(Kx&&Nx((function(){Wx.canParse()})))},{canParse:function(e){var t=Vx(arguments.length,1),n=jx(e),r=t<2||void 0===arguments[1]?void 0:jx(arguments[1]);try{return!!new Wx(n,r)}catch(KTe){return!1}}});var Qx=o(ie.URL),qx=function(){function e(t){cT(this,e),this.config=t.config,this.parent=t.root,this.root=rS.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 r="touch"===this.config.domEventType?"touchend":"click";this._delegates=FE.delegate.call(this,this.root,"li",r,this.onItemClick)}return uT(e,[{key:"renderItemList",value:function(e){var t,n=this,r=this.config,i=this.root;(e?r.data=e:e=r.data,r.style)&&VR(t=WR(r.style)).call(t,(function(e){i.style[e]=r[e]}));e.length>0&&(this.attrKeys=WR(e[0])),this.root.innerHTML="",VR(e).call(e,(function(e,t){var r=e.selected?"option-item selected":"option-item";e["data-index"]=t,n.root.appendChild(rS.createDom("li","<span>".concat(e.showText,"</span>"),e,r))}))}},{key:"onItemClick",value:function(e){e.delegateTarget||(e.delegateTarget=e.target);var t=e.delegateTarget;if(t&&rS.hasClass(t,"selected"))return!1;var n="function"==typeof this.config.onItemClick?this.config.onItemClick:null,r=this.root.querySelector(".selected");rS.addClass(t,"selected"),r&&rS.removeClass(r,"selected"),n(e,{from:r?this.getAttrObj(r,this.attrKeys):null,to:this.getAttrObj(t,this.attrKeys)})}},{key:"getAttrObj",value:function(e,t){if(!e||!t)return{};var n={};VR(t).call(t,(function(t){n[t]=e.getAttribute(t)}));var r=e.getAttribute("data-index");return r&&(n.index=Number(r)),n}},{key:"show",value:function(){rS.removeClass(this.root,"hide"),rS.addClass(this.root,"active")}},{key:"hide",value:function(){rS.removeClass(this.root,"active"),rS.addClass(this.root,"hide")}},{key:"setStyle",value:function(e){var t=this;WR(e).forEach((function(n){t.root.style[n]=e[n]}))}},{key:"destroy",value:function(){var e;this._delegates&&(VR(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}(),Zx=ie,Yx=p;Zx.JSON||(Zx.JSON={stringify:JSON.stringify});var $x=function(e,t,n){return Yx(Zx.JSON.stringify,null,arguments)},Jx=o($x),eC=o(uo.f("toStringTag")),tC=re,nC=G,rC=vt("match"),iC=function(e){var t;return tC(e)&&(void 0!==(t=e[rC])?!!t:"RegExp"==nC(e))},oC=TypeError,aC=function(e){if(iC(e))throw oC("The method doesn't accept regular expressions");return e},sC=vt("match"),cC=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[sC]=!1,"/./"[e](t)}catch(KTe){}}return!1},lC=Pn,uC=S;A.f;var dC=Bn,hC=Yr,fC=aC,pC=Y,vC=cC,gC=uC("".startsWith),yC=uC("".slice),mC=Math.min;lC({target:"String",proto:!0,forced:!vC("startsWith")},{startsWith:function(e){var t=hC(pC(this));fC(e);var n=dC(mC(arguments.length>1?arguments[1]:void 0,t.length)),r=hC(e);return gC?gC(t,r,n):yC(t,n,n+r.length)===r}});var _C=Wu("String").startsWith,bC=ue,RC=_C,wC=String.prototype,GC=o((function(e){var t=e.startsWith;return"string"==typeof e||e===wC||bC(wC,e)&&t===wC.startsWith?RC:t})),TC=si.includes;Pn({target:"Array",proto:!0,forced:c((function(){return!Array(1).includes()}))},{includes:function(e){return TC(this,e,arguments.length>1?arguments[1]:void 0)}});var kC=Wu("Array").includes,SC=Pn,EC=aC,MC=Y,DC=Yr,zC=cC,AC=_("".indexOf);SC({target:"String",proto:!0,forced:!zC("includes")},{includes:function(e){return!!~AC(DC(MC(this)),DC(EC(e)),arguments.length>1?arguments[1]:void 0)}});var PC=Wu("String").includes,xC=ue,CC=kC,FC=PC,IC=Array.prototype,HC=String.prototype,OC=o((function(e){var t=e.includes;return e===IC||xC(IC,e)&&t===IC.includes?CC:"string"==typeof e||e===HC||xC(HC,e)&&t===HC.includes?FC:t})),LC=$e,XC=ni,UC=Vn,BC=function(e){for(var t=LC(this),n=UC(t),r=arguments.length,i=XC(r>1?arguments[1]:void 0,n),o=r>2?arguments[2]:void 0,a=void 0===o?n:XC(o,n);a>i;)t[i++]=e;return t};Pn({target:"Array",proto:!0},{fill:BC});var NC,VC=Wu("Array").fill,jC=ue,KC=VC,WC=Array.prototype,QC=o((function(e){var t=e.fill;return e===WC||jC(WC,e)&&t===WC.fill?KC:t})),qC={SEI:"sei",PLAYER_CREATE_FINISH:"playerCreateFinish",FALLBACK_ERROR:"fallbackError",FALLBACK:"fallback",AUTOPLAY_STARTED:"autoplayStarted",AUTOPLAY_PREVENTED:"autoplayWasPrevented",DOWNLOAD_SPEED_CHANGE:"downloadSpeedChange",FULLSCREEN_CHANGE:"fullscreenChange",CSS_FULLSCREEN_CHANGE:"cssFullscreenChange",MINI_STATE_CHANGE:"miniStateChange",DEFINITION_CHANGE:"definitionChange",BEFORE_DEFINITION_CHANGE:"beforeDefinitionChange",AFTER_DEFINITION_CHANGE:"afterDefinitionChange",VIDEO_RESIZE:"videoResize",PIP_CHANGE:"pipChange",USER_ACTION:"userAction",AUTOPLAY_UNMUTE:"autoplayUnmute",LONG_WAITING:"longWaiting",DEFINITION_FALLBACK:"definitionFallback",AUTOPLAY_FAIL:"autoplayFail",AUTOPLAY_SUCCESS:"autoplaySuccess",ERROR_REFRESH_CLICK:"errorRefreshClick",SOURCE_CHANGE:"sourceChange",ABR_SWITCH_START:"abrSwitchStart",ABR_SWITCH_SUCCESS:"abrSwitchSuccess",ABR_SWITCH_FAILED:"abrSwitchFailed",AD_FIRST_QUARTILE:"ad_first_quartile",AD_MIDPOINT:"ad_midpoint",AD_THIRD_QUARTILE:"ad_third_quartile",AD_CLICK:"ad_click",AD_IMPRESSION:"ad_impression",AD_RESUME:"ad_resume",AD_START:"ad_start",AD_PLAY:"ad_play",AD_PAUSE:"ad_pause",AD_TIME_UPDATE:"ad_time_update",AD_SKIPPED:"ad_skipped",AD_ERROR:"ad_error",AD_COMPLETE:"ad_complete",AD_ALL_COMPLETED:"ad_all_completed",RTM_NETWORK:"rtmNetwork"},ZC=Fm(Fm({},rE),qC),YC=(Oy(NC={},qC.SEI,{event:"core_event",shouldCallback:function(e){return"core.sei"===(null==e?void 0:e.eventName)}}),Oy(NC,qC.RTM_NETWORK,{event:"core_event",shouldCallback:function(e){return"core.rtcnetwork"===(null==e?void 0:e.eventName)}}),Oy(NC,qC.AUTOPLAY_STARTED,{event:AS}),Oy(NC,qC.AUTOPLAY_PREVENTED,{event:PS}),Oy(NC,qC.FULLSCREEN_CHANGE,{event:US}),Oy(NC,qC.CSS_FULLSCREEN_CHANGE,{event:BS}),Oy(NC,qC.MINI_STATE_CHANGE,{event:NS}),Oy(NC,qC.DEFINITION_CHANGE,{event:VS}),Oy(NC,qC.BEFORE_DEFINITION_CHANGE,{event:jS}),Oy(NC,qC.AFTER_DEFINITION_CHANGE,{event:KS}),Oy(NC,qC.VIDEO_RESIZE,{event:QS}),Oy(NC,qC.PIP_CHANGE,{event:qS}),Oy(NC,qC.USER_ACTION,{event:$S}),Oy(NC,qC.DOWNLOAD_SPEED_CHANGE,{event:HS}),Oy(NC,qC.ABR_SWITCH_START,{event:"switch_definition_start"}),Oy(NC,qC.ABR_SWITCH_SUCCESS,{event:"switch_definition_success"}),Oy(NC,qC.ABR_SWITCH_FAILED,{event:"switch_definition_fail"}),NC);var $C=/["'&<>]/;function JC(e,t){return function(e){if(ly(e))return e}(e)||function(e,t){var n=null==e?null:void 0!==au&&hy(e)||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(vd(s).call(s,r.value),s.length!==t);c=!0);}catch(u){l=!0,i=u}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||zy(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 eF=P,tF=_,nF=mi,rF=ee,iF=tF(I.f),oF=tF([].push),aF=function(e){return function(t){for(var n,r=rF(t),i=nF(r),o=i.length,a=0,s=[];o>a;)n=i[a++],eF&&!iF(r,n)||oF(s,e?[n,r[n]]:r[n]);return s}},sF={entries:aF(!0),values:aF(!1)},cF=sF.entries;Pn({target:"Object",stat:!0},{entries:function(e){return cF(e)}});var lF=o(ie.Object.entries);var uF=Ce,dF=$e,hF=W,fF=Vn,pF=TypeError,vF=function(e){return function(t,n,r,i){uF(n);var o=dF(t),a=hF(o),s=fF(o),c=e?s-1:0,l=e?-1:1;if(r<2)for(;;){if(c in a){i=a[c],c+=l;break}if(c+=l,e?c<0:s<=c)throw pF("Reduce of empty array with no initial value")}for(;e?c>=0:s>c;c+=l)c in a&&(i=n(i,a[c],c,o));return i}},gF={left:vF(!1),right:vF(!0)}.left;Pn({target:"Array",proto:!0,forced:!Vh&&me>79&&me<83||!Nu("reduce")},{reduce:function(e){var t=arguments.length;return gF(this,e,t,t>1?arguments[1]:void 0)}});var yF=Wu("Array").reduce,mF=ue,_F=yF,bF=Array.prototype,RF=o((function(e){var t=e.reduce;return e===bF||mF(bF,e)&&t===bF.reduce?_F:t}));var wF=function(){function e(t){var n;Py(this,e),Oy(this,"definition",void 0),Oy(this,"source",void 0),Oy(this,"text",void 0),Oy(this,"fallbackUrl",void 0),Oy(this,"urls",void 0),Oy(this,"_currentUrlRef",void 0);var r=t.url,i=t.definition,o=t.text,a=t.source,s=t.fallbackUrls;this.definition=i,this.text=o,this.source=a,this.urls=Xm(n=[r]).call(n,Ay(null!=s?s:[])),this.fallbackUrl=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t={url:e[0],next:null},n=t,r=1;r<e.length;r++){var i=r===e.length-1?t:null,o={url:e[r],next:i};n.next=o,n=o}return t}(this.urls),this._currentUrlRef=this.fallbackUrl}return Hy(e,[{key:"url",get:function(){return this._currentUrlRef.url},set:function(e){this._currentUrlRef.url=e}},{key:"next",value:function(){var e=this._currentUrlRef.next;return e&&(this._currentUrlRef=e),this._currentUrlRef}}]),e}(),GF=function(){function e(t,n,r){var i=this;Py(this,e),Oy(this,"name",void 0),Oy(this,"text",void 0),Oy(this,"definitions",void 0),this.definitions=VR(t).call(t,(function(e){return new wF(cG({},e,{source:i}))})),this.name=n,this.text=r}return Hy(e,[{key:"defaultDefinition",get:function(){return this.definitions[0]}},{key:"add",value:function(e){this.definitions.push(e)}}],[{key:"normalize",value:function(t){if(void 0===t)throw new Error('"input" cannot be undefined');var n=void 0,r=void 0,i=void 0;if("string"==typeof t?n=t:Array.isArray(t)?i=t:(n=t.url,r=t.fallbackUrls,i=t.sources),"string"==typeof n)return e.normalizeUrl(n,r);if(Array.isArray(i)){if(0===i.length)throw new Error('"sources" cannot be an empty array');return VR(i).call(i,(function(t){var n;return new e(VR(n=t.definitions).call(n,(function(e){return"string"==typeof e?{url:e,definition:"unknown"}:e})),t.name,t.text)}))}return[]}},{key:"normalizeUrl",value:function(t,n){var r=new e([],"unknown");return r.add(new wF({definition:"unknown",url:t,source:r,fallbackUrls:n})),[r]}}]),e}(),TF=function(){function e(t){var n,r,i,o;Py(this,e),Oy(this,"defaultSource",void 0),Oy(this,"defaultDefinition",void 0),Oy(this,"maxFallbackRound",void 0),Oy(this,"_currentDefinition",void 0),Oy(this,"_sources",void 0),Oy(this,"_fallbackCount",0);var a=t.url,s=t.defaultDefinition,c=t.defaultSource,l=t.sources,u=t.maxFallbackRound;this.defaultDefinition=s,this.defaultSource=c,this.maxFallbackRound=null!=u?u:1,this._sources=l;var d=a?qm(this).call(this,a):null===(n=qm(r=this.sources).call(r,(function(e){return void 0===c||e.name===c})))||void 0===n?void 0:qm(i=n.definitions).call(i,(function(e){return void 0===s||e.definition===s}));this._currentDefinition=null!=d?d:null===(o=this._sources)||void 0===o||null===(o=o[0])||void 0===o||null===(o=o.definitions)||void 0===o?void 0:o[0]}return Hy(e,[{key:"sources",get:function(){return this._sources}},{key:"definition",get:function(){return this._currentDefinition}},{key:"source",get:function(){var e;return null===(e=this.definition)||void 0===e?void 0:e.source}},{key:"url",get:function(){var e;return null===(e=this.definition)||void 0===e?void 0:e.url},set:function(e){this.definition&&(this.definition.url=e)}},{key:"find",value:function(e,t){var n,r,i,o,a,s=this;if("string"==typeof e)return qm(o=RF(a=this.sources).call(a,(function(e,t){return Xm(e).call(e,t.definitions)}),[])).call(o,(function(t){return t.url===e}));var c=qm(n=this.sources).call(n,(function(t){var n,r;return t.name===(null!==(n=null==e?void 0:e.source)&&void 0!==n?n:null===(r=s.source)||void 0===r?void 0:r.name)})),l=null==c?void 0:qm(r=c.definitions).call(r,(function(t){var n,r;return t.definition===(null!==(n=null==e?void 0:e.definition)&&void 0!==n?n:null===(r=s.definition)||void 0===r?void 0:r.definition)}));return l||(null!=t&&t.fallbackToFirstDefinition&&null!=c&&null!==(i=c.definitions)&&void 0!==i&&i.length?null==c?void 0:c.definitions[0]:void 0)}},{key:"fallback",value:function(){var e;if(this._fallbackCount++,!(this._fallbackCount>=this.maxFallbackRound*this.definition.urls.length)){var t=null===(e=this._currentDefinition)||void 0===e?void 0:e.next();return null==t?void 0:t.url}this.resetFallback()}},{key:"switch",value:function(e){return this._currentDefinition=e,this.resetFallback(),e}},{key:"updateSources",value:function(e,t){var n,r,i,o,a;return this._sources=GF.normalize(e),this._currentDefinition=null!==(n=qm(this).call(this,null!=t?t:{source:null!==(r=this.defaultSource)&&void 0!==r?r:null===(i=this._currentDefinition)||void 0===i?void 0:i.source.name,definition:null!==(o=this.defaultDefinition)&&void 0!==o?o:null===(a=this._currentDefinition)||void 0===a?void 0:a.definition}))&&void 0!==n?n:this._sources[0].definitions[0],this.resetFallback(),this}},{key:"resetFallback",value:function(){this._fallbackCount=0}}]),e}();function kF(){var e;"undefined"!=typeof Reflect&&eT?kF=LM(e=eT).call(e):kF=function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=BM(e)););return e}(e,t);if(r){var i=_m(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}};return kF.apply(this,arguments)}function SF(){return(new DOMParser).parseFromString('<svg width="150" height="162" viewBox="0 0 150 162" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M127.718 112.831H6.13675C4.19663 112.831 2.25651 108.974 2.90322 104.475C3.54993 99.9761 8.07687 99.9761 13.8972 99.9761C11.9571 97.4052 9.37028 88.4069 15.8373 81.3369C22.3044 74.2668 25.5379 74.2668 34.5918 75.5526C33.9451 63.9837 47.526 34.4178 77.2744 35.0605C107.023 35.7032 116.077 54.3421 119.957 63.3404C129.011 62.6976 147.765 66.554 149.706 87.1214C151.258 103.575 135.694 111.117 127.718 112.831Z" fill="#F1F4F8"/>\n<path d="M44.9346 91.6022L43.6782 99.8032" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n<path d="M47.3545 125.695L48.6109 117.494" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n<path d="M31.5347 97.7378L38.7295 101.869" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n<path d="M60.7544 119.559L53.5595 115.428" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n<path d="M69.6755 44.5318L138.35 26.0209C139.115 25.8148 139.804 26.5367 139.563 27.2909L121.081 85.1146C120.982 85.4243 120.739 85.6665 120.429 85.7641L52.0645 107.28C51.2996 107.521 50.5766 106.809 50.8062 106.04L68.9776 45.2111C69.0768 44.879 69.3409 44.622 69.6755 44.5318Z" fill="#D0D6E0" stroke="#D0D6E0" stroke-width="4" stroke-linecap="round"/>\n<path d="M83.1285 52.7415C91.6454 54.3438 107.322 62.0019 101.894 79.8155" stroke="white" stroke-width="3" stroke-linecap="round"/>\n<path d="M84.138 62.3385C88.3894 63.1384 96.2148 66.9611 93.5053 75.8531" stroke="white" stroke-width="3" stroke-linecap="round"/>\n<ellipse cx="83.6417" cy="71.98" rx="3.08443" ry="3.07025" transform="rotate(12.6375 83.6417 71.98)" fill="white"/>\n<path d="M43.4699 110.358C39.5425 109.114 30.6316 108.203 26.4077 114.511C21.1278 122.397 36.5031 152.755 2.11053 160.141" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>\n</svg>\n',"image/svg+xml").firstChild}var EF=function(e){UM(n,e);var t=VM(n);function n(){var e,r;Py(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Oy(AM(r=t.call.apply(t,Xm(e=[this]).call(e,o))),"_error",void 0),r}return Hy(n,[{key:"_errorTip",get:function(){var e,t,n,r=this.player.config.i18nManager,i=null===(e=this._error)||void 0===e?void 0:e.errorCode;return this.config.errorTipsText?r.normalize(this.config.errorTipsText):Xm(t="".concat(i?"[".concat(i,"] "):"")).call(t,null===(n=this._error)||void 0===n?void 0:n.message)}},{key:"afterCreate",value:function(){this._handleRefresh=this._handleRefresh.bind(this),this._focus=this._focus.bind(this),this._initEvents(),this._initIcons(),"mobile"===uS.device&&this.bind("touchend",this._focus),this.bind(".veplayer-error-refresh","click",this._handleRefresh)}},{key:"registerIcons",value:function(){return{error:{icon:SF,class:"veplayer-error-svg"}}}},{key:"updateLang",value:function(){this.config.showRefresh&&this._renderRefresh(),this._renderExtraTips()}},{key:"showError",value:function(e){this._error=e instanceof YM?e:JM(e),this.config.showErrorTip&&this._renderText(this._errorTip),this._renderExtraTips(),kF(BM(n.prototype),"show",this).call(this)}},{key:"hideError",value:function(){kF(BM(n.prototype),"hide",this).call(this)}},{key:"destroy",value:function(){"mobile"===uS.device&&this.unbind("touchend",this._focus),this.unbind(".veplayer-error-refresh","click",this._handleRefresh),this.off(ZC.FALLBACK_ERROR,this.showError.bind(this)),this.off(wS,this.hideError.bind(this))}},{key:"render",value:function(){var e,t=this.player.config.i18nManager;return Xm(e='<veplayer-error class="veplayer-error">\n <div class="veplayer-error-cover">\n '.concat(this.config.showErrorImg?'<div class="veplayer-error-img"></div>':"",'\n <div class="veplayer-error-tips"></div>\n ')).call(e,this.config.showRefresh?'<div class="veplayer-error-refresh">'.concat(t.getText("ERROR_REFRESH"),"</div>"):"",'\n <div class="veplayer-error-extra"></div>\n </div>\n </veplayer-error>')}},{key:"_focus",value:function(){this.player.focus({autoHide:!0})}},{key:"_initIcons",value:function(){this.config.showErrorImg&&this.appendChild(".veplayer-error-img",this.icons.error)}},{key:"_initEvents",value:function(){this.on(ZC.FALLBACK_ERROR,this.showError.bind(this)),this.on(wS,this.hideError.bind(this)),this.on(vS,this.hideError.bind(this)),this.on(WS,this.hideError.bind(this))}},{key:"_renderText",value:function(e){var t=qm(this).call(this,".veplayer-error-tips");t&&(t.innerText=e)}},{key:"_renderExtraTips",value:function(){var e,t=this,n=qm(this).call(this,".veplayer-error-extra");n&&(n.innerHTML="");var r=this.player.config.i18nManager;null===(e=this.config.extraTips)||void 0===e||e.forEach((function(e){if(e){var n,i=rS.createDom("div",Xm(n="".concat(r.normalize(e.label),": ")).call(n,r.normalize(e.value)),void 0,"veplayer-error-detail-info");t.appendChild(".veplayer-error-extra",i)}}))}},{key:"_handleRefresh",value:function(){var e,t;null===(e=this.player)||void 0===e||e.emit(ZC.ERROR_REFRESH_CLICK),null===(t=this.player)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.veplayer)||void 0===t||t.retry(),this.hideError()}},{key:"_renderRefresh",value:function(){var e,t=this.player.config.i18nManager,n=qm(this).call(this,".veplayer-error-refresh");n&&(n.innerHTML=null!==(e=t.getText("ERROR_REFRESH"))&&void 0!==e?e:"")}}],[{key:"pluginName",get:function(){return"error"}},{key:"defaultConfig",get:function(){return{showErrorImg:!0,showErrorTip:!0,showRefresh:!0,errorTipsText:"",extraTips:[],position:FE.POSITIONS.ROOT}}}]),n}(FE),MF=function(e){UM(n,e);var t=VM(n);function n(){var e,r;Py(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Oy(AM(r=t.call.apply(t,Xm(e=[this]).call(e,o))),"_toastNumber",0),Oy(AM(r),"_toastMap",{}),r}return Hy(n,[{key:"toast",value:function(e,t){var n=this,r=t||{},i=r.duration,o=void 0===i?2e3:i,a=r.closable,s=void 0!==a&&a,c=this._toastNumber+1;this._toastNumber=c;var l=this._renderToast(e,s,c);return this.root.appendChild(l),this._toastMap[c]=l,setTimeout((function(){n.remove(c)}),o),c}},{key:"remove",value:function(e){var t=this._toastMap[e];t&&(this.root.contains(t)&&this.root.removeChild(t),delete this._toastMap[e])}},{key:"render",value:function(){return'<veplayer-toast class="veplayer-toast"></veplayer-toast>'}},{key:"_renderToast",value:function(e,t,n){var r=this,i=rS.createDom("div","",void 0,"veplayer-toast-container"),o=rS.checkIsObject(e)?e:rS.createDom("div",e,void 0,"veplayer-toast-txt");if(i.appendChild(o),t){var a=rS.createDom("span","×",void 0,"veplayer-toast-close");a.addEventListener("click",(function(){r.remove(n)})),i.appendChild(a)}return i}}],[{key:"pluginName",get:function(){return"toast"}},{key:"defaultConfig",get:function(){return{index:5}}}]),n}(FE);function DF(){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 zF=function(){function e(t){Py(this,e),Oy(this,"_root",void 0),Oy(this,"_config",void 0),Oy(this,"_parent",void 0),Oy(this,"_listDom",void 0),Oy(this,"_container",void 0),Oy(this,"_titleDom",void 0),Oy(this,"_player",void 0),Oy(this,"_delegates",void 0),Oy(this,"_listType",void 0);var n=t.config,r=t.root,i=t.player;this._config=n,this._parent=r,this._player=i,this._listType=n.listType,this.renderPanel(),this._initEvents(),this._bindDomEvent()}return Hy(e,[{key:"changeMode",value:function(e){this.updatePanel(e),this._listType=e}},{key:"renderItemList",value:function(e){var t,n=this,r=this._config;return e&&(r.list=e),this._listDom||(this._listDom=rS.createDom("div","",{},"item-list-panel-content")),this._listDom.innerHTML="",null===(t=r.list)||void 0===t||VR(t).call(t,(function(e,t){var r,i,o=e.selected?"panel-item select-in":"panel-item ".concat(null!==(r=e.className)&&void 0!==r?r:"");e["data-index"]=t;var a=rS.createDom("div","",e,o);e.showText&&("string"==typeof e.showText?a.innerHTML=e.showText:a.appendChild(e.showText)),null===(i=n._listDom)||void 0===i||i.appendChild(a)})),this._listDom}},{key:"renderTitle",value:function(){var e,t,n=this._player.config.i18nManager;if(null!==(e=this._config.panel)&&void 0!==e&&e.title&&this._listType!==AF.Inner)return this._titleDom||(this._titleDom=rS.createDom("div","",{},"xg-mobile-panel-title")),this._titleDom.innerHTML=n.normalize(null===(t=this._config.panel)||void 0===t?void 0:t.title),this._titleDom}},{key:"updatePanel",value:function(e){this._root&&rS.removeClass(this._root,"panel-".concat(this._listType)),this._root&&rS.addClass(this._root,"panel-".concat(e));var t="mobile"===uS.device?"touchend":"click";e===AF.Inner?this._container&&this._bind(this._container,t,this._handleHide.bind(this)):this._container&&this._unbind(this._container,t,this._handleHide.bind(this))}},{key:"renderPanel",value:function(){var e,t,n,r=Xm(e="xg-mobile-panel panel-".concat(this._config.listType," ")).call(e,null!==(t=null===(n=this._config)||void 0===n||null===(n=n.panel)||void 0===n?void 0:n.className)&&void 0!==t?t:"");this._root=rS.createDom("div","",{},r),this._parent&&this._parent.appendChild(this._root);var i=this.renderTitle(),o=this.renderItemList();this._container=rS.createDom("div","",{},"xg-mobile-panel-content"),this._root.appendChild(this._container),i&&this._container.appendChild(i),o&&this._container.appendChild(o)}},{key:"show",value:function(){this._root&&(rS.removeClass(this._root,"hide"),rS.addClass(this._root,"active"))}},{key:"hide",value:function(){this._root&&(rS.removeClass(this._root,"active"),rS.addClass(this._root,"hide"))}},{key:"destroy",value:function(){this._parent&&this._root&&this._parent.removeChild(this._root),this._unbindDomEvent(),this._unbindEvents()}},{key:"_bind",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e&&"on".concat(t)in e&&"function"==typeof n&&e.addEventListener(t,n,r)}},{key:"_unbind",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e&&"on".concat(t)in e&&"function"==typeof n&&e.removeEventListener(t,n,r)}},{key:"_initEvents",value:function(){var e;this._config.isAutoChange&&(window.addEventListener("orientationchange",this._handleOrientationChange.bind(this)),null===(e=this._player)||void 0===e||e.on(US,this._handleOrientationChange.bind(this)))}},{key:"_unbindEvents",value:function(){var e;window.removeEventListener("orientationchange",this._handleOrientationChange.bind(this)),null===(e=this._player)||void 0===e||e.off(US,this._handleOrientationChange.bind(this))}},{key:"_handleOrientationChange",value:function(){var e,t,n,r=OC(e=[90,-90,"90","-90"]).call(e,window.orientation);if(null!==(t=this._player)&&void 0!==t&&t.fullscreen&&r)this.changeMode(AF.Fullscreen);else if(this._listType!==(null===(n=this._config)||void 0===n?void 0:n.listType)){var i;this.changeMode(null===(i=this._config)||void 0===i?void 0:i.listType)}}},{key:"_bindDomEvent",value:function(){var e="mobile"===uS.device?"touchend":"click";this._listType===AF.Inner&&this._container&&this._bind(this._container,e,this._handleHide.bind(this)),this._root&&this._bind(this._root,e,this._handleHide.bind(this)),this._container&&this._bind(this._container,e,this._stopPropagation),this._listDom&&(this._delegates=FE.delegate.call(this,this._listDom,".panel-item",e,this._onItemClick.bind(this),!0))}},{key:"_unbindDomEvent",value:function(){var e,t="mobile"===uS.device?"touchend":"click";(this._root&&this._unbind(this._root,t,this._handleHide.bind(this)),this._container&&this._unbind(this._container,t,this._handleHide.bind(this)),this._container&&this._unbind(this._container,t,this._stopPropagation),this._delegates)&&(VR(e=this._delegates).call(e,(function(e){e.destroy&&e.destroy()})),this._delegates=null)}},{key:"_stopPropagation",value:function(e){e.stopPropagation(),e.preventDefault()}},{key:"_onItemClick",value:function(e){var t,n,r,i,o=e.delegateTarget,a="function"==typeof this._config.onOptionClick?this._config.onOptionClick:null,s="function"==typeof this._config.onItemClick?this._config.onItemClick:null,c=null===(t=this._root)||void 0===t?void 0:t.querySelector(".selected");rS.addClass(o,"selected"),c&&(rS.removeClass(c,"selected"),i=Number(c.getAttribute("data-index")));var l=Number(o.getAttribute("data-index")),u={from:void 0!==Su(i)?null===(n=this._config.list)||void 0===n?void 0:n[i]:void 0,to:null===(r=this._config.list)||void 0===r?void 0:r[l]};null==a||a(e,u),o&&i===l||null==s||s(e,u)}},{key:"_handleHide",value:function(e){var t,n;e.stopPropagation(),e.preventDefault(),null===(t=(n=this._config).hide)||void 0===t||t.call(n)}}]),e}(),AF=function(e){return e.Middle="middle",e.Bottom="bottom",e.Fullscreen="fullscreen",e.Inner="inner",e}(AF||{}),PF=function(e){return e.Icon="Icon",e.Text="Text",e}(PF||{}),xF="mobile"===uS.device,CF=["bottom","fullscreen","inner"],FF=["middle"],IF=["bottom","inner","fullscreen"],HF=["bottom","inner","fullscreen"],OF=function(e){UM(n,e);var t=VM(n);function n(e){var r;return Py(this,n),Oy(AM(r=t.call(this,e)),"optionsList",void 0),Oy(AM(r),"_isIcon",void 0),Oy(AM(r),"_isActive",void 0),Oy(AM(r),"_curIndex",void 0),Oy(AM(r),"activeEvent",void 0),Oy(AM(r),"onEnter",(function(e){e.preventDefault(),e.stopPropagation(),r.emit("icon_mouseenter",{pluginName:r.pluginName}),r.toggle(!0)})),Oy(AM(r),"onLeave",(function(e){e.preventDefault(),e.stopPropagation(),r.emit("icon_mouseleave",{pluginName:r.pluginName}),r._isActive&&r.toggle(!1)})),r._isIcon=!1,r._isActive=!1,r._curIndex=0,r}return Hy(n,[{key:"updateLang",value:function(){this.config.list&&this.renderItemList(this.config.list,this._curIndex)}},{key:"afterCreate",value:function(){var e=this,t=this.config;this.config.listType=this._getListType(),this.initIcons(),t.hidePortrait&&rS.addClass(this.root,"portrait"),xF&&this.on(ES,(function(){e._isActive&&(e.optionsList&&e.optionsList.hide(),e._isActive=!1)})),t.list&&this.renderItemList(t.list),this.activeEvent=xF?"touchend":"mouseenter",this.bind(this.activeEvent,this.onEnter),this.bind("mouseleave",this.onLeave)}},{key:"initIcons",value:function(){var e=this,t=this.icons,n=WR(t);if(n.length>0&&"Icon"===this.config.renderType)return n.forEach((function(n){e.appendChild(".xgplayer-icon",t[n])})),void(this._isIcon=!0);var r=this.appendChild(".xgplayer-icon",rS.createDom("span","",{},"icon-text"));r&&rS.addClass(r,"btn-text")}},{key:"show",value:function(){!this.config.list||this.config.list.length<1||this.config.hideOnSingleOption&&1===this.config.list.length||rS.addClass(this.root,"show")}},{key:"hide",value:function(){rS.removeClass(this.root,"show")}},{key:"toggle",value:function(e){if(e!==this._isActive){var t=this.player.controls,n=this.config.listType;e?(n&&OC(IF).call(IF,n)?null==t||t.blur():null==t||t.focus(),this.optionsList&&this.optionsList.show()):(n&&OC(IF).call(IF,n)?null==t||t.focus():null==t||t.focusAwhile(),this.optionsList&&this.optionsList.hide()),this._isActive=e}}},{key:"onItemClick",value:function(e,t){var n;e.preventDefault(),e.stopPropagation();var r=this.config.listType;this._curIndex=null===(n=t.to)||void 0===n?void 0:n.index,this.changeCurrentText(),(this.config.isItemClickHide||r&&OC(IF).call(IF,r))&&this.toggle(!1)}},{key:"onOptionClick",value:function(e,t){e.preventDefault(),e.stopPropagation()}},{key:"changeCurrentText",value:function(){if(!this._isIcon){var e=this.config.list,t=e&&this._curIndex<e.length?this._curIndex:0,n=null==e?void 0:e[t];if(n){var r,i=qm(this).call(this,".icon-text"),o=this.player.config.i18nManager;if(i)i.innerHTML=o.normalize(null!==(r=null==n?void 0:n.iconText)&&void 0!==r?r:null==n?void 0:n.text)}}}},{key:"renderItemList",value:function(e,t){var r,i=this,o=this.config,a=this.optionsList,s=this.player;if("number"==typeof t&&(this._curIndex=t),a)return a.renderItemList(e),this.changeCurrentText(),void(a instanceof zF&&a.renderTitle());this.config.isShowIcon&&(this.optionsList=o.listType&&OC(HF).call(HF,o.listType)?new zF({config:{list:e||[],onItemClick:function(e,t){i.onItemClick(e,t)},onOptionClick:function(e,t){i.onOptionClick(e,t)},panel:this.config.panel,listType:null!==(r=o.listType)&&void 0!==r?r:n.defaultConfig.listType,isAutoChange:o.isAutoChange,hide:function(){return i.toggle(!1)}},root:s.root,player:s}):new qx({config:{data:e||[],onItemClick:function(e,t){i.onItemClick(e,t)}},root:this.root}),this.changeCurrentText(),this.show())}},{key:"destroy",value:function(){this.activeEvent&&this.unbind(this.activeEvent,this.onEnter),this.unbind("mouseleave",this.onLeave),this.optionsList&&(this.optionsList.destroy(),this.optionsList=void 0)}},{key:"render",value:function(){return this.config.isShowIcon?'<xg-icon class="xg-options-icon '.concat(this.config.className||"",'">\n <div class="xgplayer-icon">\n </div>\n </xg-icon>'):""}},{key:"_getListType",value:function(){var e,t=this.config.listType;return null!==(e=this.player)&&void 0!==e&&null!==(e=e.config)&&void 0!==e&&e.listType&&(t=this.player.config.listType),xF||t&&OC(CF).call(CF,t)||(t="bottom"),xF||t&&OC(FF).call(FF,t)||(t="middle"),t}}],[{key:"pluginName",get:function(){return"optionsIcon"}},{key:"defaultConfig",get:function(){return{position:xF?kO.ROOT_TOP_RIGHT:kO.CONTROLS_RIGHT,listType:xF?"bottom":"middle",index:100,list:[],listStyle:{},hidePortrait:!0,isShowIcon:!1,renderType:xF?"Icon":"Text",isItemClickHide:!0,hideOnSingleOption:!0,isAutoChange:!0}}}]),n}(FE),LF=function(e){UM(n,e);var t=VM(n);function n(){return Py(this,n),t.apply(this,arguments)}return Hy(n,[{key:"updateLang",value:function(){this.renderItemList()}},{key:"beforeCreate",value:function(e){var t=e.player.config.sources.sourceManager;e.config.list=t.sources}},{key:"registerIcons",value:function(){return{source:{icon:DF}}}},{key:"renderItemList",value:function(){var e=this.config.sourceManager,t=e.sources,r=e.source,i=this.player.config.i18nManager;if(t.length<2)this.hide();else{var o=VR(t).call(t,(function(e){var t;return Fm(Fm({},e),{},{showText:null!==(t=i.normalize(e.text))&&void 0!==t?t:e.name,selected:!1})})),a=rz(o).call(o,(function(e){return e.name===(null==r?void 0:r.name)}));this.config.list=t,a>-1&&(o[a].selected=!0),kF(BM(n.prototype),"renderItemList",this).call(this,o,a)}}},{key:"onItemClick",value:function(e,t){var r,i=this;kF(BM(n.prototype),"onItemClick",this).call(this,e,t),null===(r=this.player.config)||void 0===r||r.veplayer.switch({source:t.to.name},{fallbackToFirstDefinition:!0}).catch((function(){i.renderItemList()}))}}],[{key:"pluginName",get:function(){return"sources"}},{key:"defaultConfig",get:function(){return Fm(Fm({},OF.defaultConfig),{},{index:4,panel:{title:{jp:"ライン選ぶ",en:"Line Choose","zh-cn":"线路选择","zh-hk":"線路選擇"}},list:[],className:"xgplayer-sources",hidePortrait:!1,isShowIcon:!0})}},{key:"textTips",get:function(){return{jp:"ライン",en:"Line","zh-cn":"线路","zh-hk":"線路"}}}]),n}(OF);function XF(){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 UF={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",a="[object Boolean]",s="[object Date]",c="[object Function]",l="[object GeneratorFunction]",u="[object Map]",d="[object Number]",h="[object Object]",f="[object Promise]",p="[object RegExp]",v="[object Set]",g="[object String]",y="[object Symbol]",m="[object WeakMap]",_="[object ArrayBuffer]",b="[object DataView]",R="[object Float32Array]",w="[object Float64Array]",G="[object Int8Array]",T="[object Int16Array]",k="[object Int32Array]",S="[object Uint8Array]",E="[object Uint8ClampedArray]",M="[object Uint16Array]",D="[object Uint32Array]",z=/\w*$/,A=/^\[object .+?Constructor\]$/,P=/^(?:0|[1-9]\d*)$/,x={};x[o]=x["[object Array]"]=x[_]=x[b]=x[a]=x[s]=x[R]=x[w]=x[G]=x[T]=x[k]=x[u]=x[d]=x[h]=x[p]=x[v]=x[g]=x[y]=x[S]=x[E]=x[M]=x[D]=!0,x["[object Error]"]=x[c]=x[m]=!1;var C="object"==Su(i)&&i&&i.Object===Object&&i,F="object"==("undefined"==typeof self?"undefined":Su(self))&&self&&self.Object===Object&&self,I=C||F||Function("return this")(),H=t&&!t.nodeType&&t,O=H&&e&&!e.nodeType&&e,L=O&&O.exports===H;function X(e,t){return e.set(t[0],t[1]),e}function U(e,t){return e.add(t),e}function B(e,t,n,r){var i=-1,o=e?e.length:0;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function N(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(oK){}return t}function V(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function j(e,t){return function(n){return e(t(n))}}function K(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var W,Q=Array.prototype,q=Function.prototype,Z=Object.prototype,Y=I["__core-js_shared__"],$=(W=/[^.]+$/.exec(Y&&Kw(Y)&&Kw(Y).IE_PROTO||""))?"Symbol(src)_1."+W:"",J=q.toString,ee=Z.hasOwnProperty,te=Z.toString,ne=RegExp("^"+J.call(ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),re=L?I.Buffer:void 0,ie=I.Symbol,oe=I.Uint8Array,ae=j(yG,Object),se=Object.create,ce=Z.propertyIsEnumerable,le=vw(Q),ue=lG,de=re?re.isBuffer:void 0,he=j(WR,Object),fe=Oe(I,"DataView"),pe=Oe(I,"Map"),ve=Oe(I,"Promise"),ge=Oe(I,"Set"),ye=Oe(I,"WeakMap"),me=Oe(Object,"create"),_e=Ne(fe),be=Ne(pe),Re=Ne(ve),we=Ne(ge),Ge=Ne(ye),Te=ie?ie.prototype:void 0,ke=Te?Te.valueOf:void 0;function Se(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ee(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Me(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function De(e){this.__data__=new Ee(e)}function ze(e,t){var n=je(e)||function(e){return function(e){return function(e){return!!e&&"object"==Su(e)}(e)&&Ke(e)}(e)&&ee.call(e,"callee")&&(!ce.call(e,"callee")||te.call(e)==o)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,i=!!r;for(var a in e)!t&&!ee.call(e,a)||i&&("length"==a||Ue(a,r))||n.push(a);return n}function Ae(e,t,n){var r=e[t];ee.call(e,t)&&Ve(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function Pe(e,t){for(var n=e.length;n--;)if(Ve(e[n][0],t))return n;return-1}function xe(e,t,n,r,i,f,m){var A;if(r&&(A=f?r(e,i,f,m):r(e)),void 0!==A)return A;if(!qe(e))return e;var P=je(e);if(P){if(A=function(e){var t=e.length,n=e.constructor(t);t&&"string"==typeof e[0]&&ee.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!t)return function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n<r;)t[n]=e[n];return t}(e,A)}else{var C=Xe(e),F=C==c||C==l;if(We(e))return function(e,t){if(t)return QR(e).call(e);var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(C==h||C==o||F&&!f){if(N(e))return f?e:{};if(A=function(e){return"function"!=typeof e.constructor||Be(e)?{}:(t=ae(e),qe(t)?se(t):{});var t}(F?{}:e),!t)return function(e,t){return Ie(e,Le(e),t)}(e,function(e,t){return e&&Ie(t,Ze(t),e)}(A,e))}else{if(!x[C])return f?e:{};A=function(e,t,n,r){var i=e.constructor;switch(t){case _:return Fe(e);case a:case s:return new i(+e);case b:return function(e,t){var n=t?Fe(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,r);case R:case w:case G:case T:case k:case S:case E:case M:case D:return function(e,t){var n=t?Fe(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,r);case u:return function(e,t,n){var r=t?n(V(e),!0):V(e);return B(r,X,new e.constructor)}(e,r,n);case d:case g:return new i(e);case p:return function(e){var t=new e.constructor(e.source,z.exec(e));return t.lastIndex=e.lastIndex,t}(e);case v:return function(e,t,n){var r=t?n(K(e),!0):K(e);return B(r,U,new e.constructor)}(e,r,n);case y:return o=e,ke?Object(ke.call(o)):{}}var o}(e,C,xe,t)}}m||(m=new De);var I=m.get(e);if(I)return I;if(m.set(e,A),!P)var H=n?function(e){return function(e,t,n){var r=t(e);return je(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,Ze,Le)}(e):Ze(e);return function(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););}(H||e,(function(i,o){H&&(i=e[o=i]),Ae(A,o,xe(i,t,n,r,o,e,m))})),A}function Ce(e){return!(!qe(e)||(t=e,$&&$ in t))&&(Qe(e)||N(e)?ne:A).test(Ne(e));var t}function Fe(e){var t=new e.constructor(e.byteLength);return new oe(t).set(new oe(e)),t}function Ie(e,t,n,r){n||(n={});for(var i=-1,o=t.length;++i<o;){var a=t[i],s=r?r(n[a],e[a],a,n,e):void 0;Ae(n,a,void 0===s?e[a]:s)}return n}function He(e,t){var n,r,i=e.__data__;return("string"==(r=Su(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:VR(i)}function Oe(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Ce(n)?n:void 0}Se.prototype.clear=function(){this.__data__=me?me(null):{}},Se.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Se.prototype.get=function(e){var t=this.__data__;if(me){var r=t[e];return r===n?void 0:r}return ee.call(t,e)?t[e]:void 0},Se.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:ee.call(t,e)},Se.prototype.set=function(e,t){return this.__data__[e]=me&&void 0===t?n:t,this},Ee.prototype.clear=function(){this.__data__=[]},Ee.prototype.delete=function(e){var t=this.__data__,n=Pe(t,e);return!(n<0)&&(n==t.length-1?t.pop():le.call(t,n,1),!0)},Ee.prototype.get=function(e){var t=this.__data__,n=Pe(t,e);return n<0?void 0:t[n][1]},Ee.prototype.has=function(e){return Pe(this.__data__,e)>-1},Ee.prototype.set=function(e,t){var n=this.__data__,r=Pe(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},Me.prototype.clear=function(){this.__data__={hash:new Se,map:new(pe||Ee),string:new Se}},Me.prototype.delete=function(e){return He(this,e).delete(e)},Me.prototype.get=function(e){return He(this,e).get(e)},Me.prototype.has=function(e){return He(this,e).has(e)},Me.prototype.set=function(e,t){return He(this,e).set(e,t),this},De.prototype.clear=function(){this.__data__=new Ee},De.prototype.delete=function(e){return this.__data__.delete(e)},De.prototype.get=function(e){return this.__data__.get(e)},De.prototype.has=function(e){return this.__data__.has(e)},De.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ee){var r=n.__data__;if(!pe||r.length<199)return r.push([e,t]),this;n=this.__data__=new Me(r)}return n.set(e,t),this};var Le=ue?j(ue,Object):function(){return[]},Xe=function(e){return te.call(e)};function Ue(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||P.test(e))&&e>-1&&e%1==0&&e<t}function Be(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Z)}function Ne(e){if(null!=e){try{return J.call(e)}catch(oK){}try{return e+""}catch(oK){}}return""}function Ve(e,t){return e===t||e!=e&&t!=t}(fe&&Xe(new fe(new ArrayBuffer(1)))!=b||pe&&Xe(new pe)!=u||ve&&Xe(ve.resolve())!=f||ge&&Xe(new ge)!=v||ye&&Xe(new ye)!=m)&&(Xe=function(e){var t=te.call(e),n=t==h?e.constructor:void 0,r=n?Ne(n):void 0;if(r)switch(r){case _e:return b;case be:return u;case Re:return f;case we:return v;case Ge:return m}return t});var je=Array.isArray;function Ke(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!Qe(e)}var We=de||function(){return!1};function Qe(e){var t=qe(e)?te.call(e):"";return t==c||t==l}function qe(e){var t=Su(e);return!!e&&("object"==t||"function"==t)}function Ze(e){return Ke(e)?ze(e):function(e){if(!Be(e))return he(e);var t=[];for(var n in Object(e))ee.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return xe(e,!0,!0)}}(UF,UF.exports);var BF=o(UF.exports),NF=function(e){UM(r,e);var t,n=VM(r);function r(){var e,t;Py(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Oy(AM(t=n.call.apply(n,Xm(e=[this]).call(e,o))),"_waitingStartTime",0),Oy(AM(t),"_timer",void 0),Oy(AM(t),"_toastId",void 0),t}return Hy(r,[{key:"updateLang",value:function(){this.renderItemList()}},{key:"beforeCreate",value:function(e){var t,n=e.player.config.sources.sourceManager;e.config.list=null===(t=n.source)||void 0===t?void 0:t.definitions}},{key:"afterCreate",value:function(){var e,t;kF(BM(r.prototype),"afterCreate",this).call(this),(null!==(e=null===(t=this.player.config.sourceManager.source)||void 0===t?void 0:t.definitions)&&void 0!==e?e:[]).length<2?this.hide():(this.renderItemList(),this.on(ZC.WAITING,this._waiting.bind(this)),this.on(ZC.PLAYING,this._clearTimer.bind(this)),this.on(ZC.PAUSE,this._clearTimer.bind(this)),this.on(ZC.PLAY,this._clearTimer.bind(this)),this._initTimeUpdateEvent())}},{key:"registerIcons",value:function(){return{source:{icon:XF}}}},{key:"renderItemList",value:function(){var e,t,n,i=this,o=this.player.config.sourceManager,a=null!==(e=null===(t=o.source)||void 0===t?void 0:t.definitions)&&void 0!==e?e:[];if(a.length<2)this.hide();else{var s=VR(a).call(a,(function(e){var t;return{url:e.url,definition:e.definition||"",showText:null!==(t=i.player.config.i18nManager.normalize(e.text))&&void 0!==t?t:e.definition,selected:!1}})),c=rz(a).call(a,(function(e){var t;return e.definition===(null===(t=o.definition)||void 0===t?void 0:t.definition)}));this.config.list=null===(n=o.source)||void 0===n?void 0:n.definitions,c>-1&&(s[c].selected=!0),kF(BM(r.prototype),"renderItemList",this).call(this,s,c)}}},{key:"onItemClick",value:function(e,t){var n,i=this;this._showToast(t.to),kF(BM(r.prototype),"onItemClick",this).call(this,e,t),null===(n=this.player.config)||void 0===n||n.veplayer.switch({definition:t.to.definition}).catch((function(){i.renderItemList()}))}},{key:"fallback",value:(t=cy(ay().mark((function e(){var t,n,r,i,o,a,s,c=arguments;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=c.length>0&&void 0!==c[0]?c[0]:{toast:!0},i=this.player.config.sourceManager,!((o=rz(t=this.config.demotePriority).call(t,(function(e){var t;return e===(null===(t=i.definition)||void 0===t?void 0:t.definition)})))<0)){e.next=5;break}return e.abrupt("return");case 5:if(a=BF(i.definition),s=this._getNextDefinition(o)){e.next=9;break}return e.abrupt("return");case 9:if(!r.toast){e.next=15;break}return e.next=12,this._toast(s);case 12:if(e.sent){e.next=15;break}return e.abrupt("return");case 15:this.player.emit(ZC.DEFINITION_FALLBACK,{from:a,to:s}),null===(n=this.player.config)||void 0===n||n.veplayer.switch({definition:s.definition}).catch((function(){}));case 17:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"_waiting",value:function(){var e=this;if(!this._timer){this._waitingStartTime=Date.now();var t=this.player.currentTime;this._timer=window.setTimeout((function(){e.player&&e.player.currentTime<=t+.1&&(e.player.emit(ZC.LONG_WAITING),e.config.needFallback&&e.fallback({toast:!0}),e._clearTimer())}),this.config.longWaitingTime)}}},{key:"_clearTimer",value:function(){this._timer&&(clearTimeout(this._timer),this._timer=void 0),this._waitingStartTime&&(this._waitingStartTime=0)}},{key:"_toast",value:function(e){var t=this,n=this.player.config.i18nManager;return new jR((function(r){var i,o,a=null===(i=t.player)||void 0===i?void 0:i.getPlugin("toast");if(a){var s=rS.createDom("div",n.getText("DEFINITION_FALLBACK_TOAST"),void 0,"veplayer-toast-txt"),c=null!==(o=t.player.config.i18nManager.normalize(e.text))&&void 0!==o?o:e.definition,l=rS.createDom("span",c,void 0,"veplayer-toast-txt-bt");s.appendChild(l);var u=a.toast(s,{duration:5e3,closable:!0});l.addEventListener("click",(function(){a.remove(u),r(!0)}))}else r(!1)}))}},{key:"_getNextDefinition",value:function(e){var t,n=this.player.config.sourceManager;if(null!==(t=n.source)&&void 0!==t&&t.definitions.length&&!(e+1>=this.config.demotePriority.length)){var r=e+1,i=qm(n).call(n,{definition:this.config.demotePriority[r]});return i||this._getNextDefinition(r)}}},{key:"_initTimeUpdateEvent",value:function(){var e=this,t=this.player.currentTime;this.on(ZC.TIME_UPDATE,(function(){var n=e.player.currentTime;n!==t?(t=n,e._clearTimer()):t=n}))}},{key:"_showToast",value:function(e){var t,n,r,i=this,o=null===(t=this.player)||void 0===t?void 0:t.getPlugin("toast"),a=this.player.config.i18nManager;o&&(this._toastId&&o.remove(this._toastId),this._toastId=o.toast(Xm(n="".concat(a.getText("DEFINITION_SWITCHING")," ")).call(n,null!==(r=e.showText)&&void 0!==r?r:e.definition," ..."),{duration:2e3,closable:!0}),this.player.once(ZC.AFTER_DEFINITION_CHANGE,(function(){void 0!==i._toastId&&o.remove(i._toastId)})))}}],[{key:"pluginName",get:function(){return"definition"}},{key:"defaultConfig",get:function(){return Fm(Fm({},OF.defaultConfig),{},{index:3,list:[],panel:{title:{jp:"クラリティセレクション",en:"Definition Choose","zh-cn":"清晰度选择","zh-hk":"清晰度選擇"}},className:"xgplayer-definition",hidePortrait:!1,isShowIcon:!0,longWaitingTime:5e3,needFallback:!1,demotePriority:["uhd","hd","sd","ld","ao"]})}},{key:"textTips",get:function(){return{jp:"明快さ",en:"Definition","zh-cn":"清晰度","zh-hk":"清晰度"}}}]),r}(OF),VF={"biz:vod":"veplayer.biz.vod.[env].[ext]","biz:live":"veplayer.biz.live.[env].[ext]","plugin:flv":"veplayer.plugin.flv.[env].[ext]","plugin:mp4":"veplayer.plugin.mp4.[env].[ext]","plugin:hls":"veplayer.plugin.hls.[env].[ext]","plugin:hlsjs":"veplayer.plugin.hlsjs.[env].[ext]","plugin:shaka":"veplayer.plugin.shaka.[env].[ext]","plugin:rtm":"veplayer.plugin.rtm.[env].[ext]","plugin:xgvideo":"veplayer.plugin.xgvideo.[env].[ext]","plugin:drm":"veplayer.plugin.drm.[env].[ext]","plugin:abr":"veplayer.plugin.abr.[env].[ext]","strategy:base":"veplayer.strategy.base.[env].[ext]","strategy:rtmAdaptiveBuffer":"veplayer.strategy.rtm.adaptive.buffer.[env].[ext]"},jF=function(e){return e.BizVod="biz:vod",e.BizLive="biz:live",e.PluginFlv="plugin:flv",e.PluginMp4="plugin:mp4",e.PluginHls="plugin:hls",e.PluginHlsJs="plugin:hlsjs",e.PluginShaka="plugin:shaka",e.PluginRtm="plugin:rtm",e.PluginXgvideo="plugin:xgvideo",e.PluginDrm="plugin:drm",e.PluginAbr="plugin:abr",e.StrategyBase="strategy:base",e.StrategyRtmAdaptiveBuffer="strategy:rtmAdaptiveBuffer",e}(jF||{}),KF=function(){function e(t){var n=this;Py(this,e),Oy(this,"modules",{}),Oy(this,"mountPromiseMap",{}),Oy(this,"_baseUrl",void 0),Oy(this,"_moduleSystem",void 0),Oy(this,"load",function(){var e=cy(ay().mark((function e(t,r){var i,o,a,s,c;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n._moduleSystem){e.next=2;break}throw new Error('You have to specify moduleSystem first, call "setModuleSystem(moduleSystem)" to set module system');case 2:if(VF[t]){e.next=4;break}throw new Error('Invalid module name: "'.concat(t,'"'));case 4:if("esm"!==n._moduleSystem){e.next=11;break}if(n.modules[t]){e.next=9;break}throw new Error('Dynamic module "'.concat(t,'" not found, you have to register it first under ESM'));case 9:return o=n.modules[t].exports,e.abrupt("return",null!==(i=o.default)&&void 0!==i?i:o);case 11:if(!n.modules[t]){e.next=21;break}if(1!==n.modules[t].state){e.next=16;break}return e.abrupt("return",n.modules[t].exports);case 16:if(0!==n.modules[t].state){e.next=20;break}return e.abrupt("return",n.mountPromiseMap[t].then((function(e){var t;return null!==(t=e.default)&&void 0!==t?t:e})));case 20:throw null!==(a=n.modules[t].error)&&void 0!==a?a:new Error('Dynamic module "'.concat(t,'" load failed.'));case 21:return s=[n._baseUrl,VF[t]].join("/").replace("[env]","production").replace("[ext]","js"),c={src:null!=r?r:s,name:t,state:0,exports:{__PLUGIN_NAME__:t}},n.modules[t]=c,n.mountPromiseMap[t]=n._mount(c),e.abrupt("return",n.mountPromiseMap[t]);case 26:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()),Oy(this,"registerPlugin",(function(e,t){if(!n._moduleSystem)throw new Error("You have to specify moduleSystem first, call setModuleSystem(moduleSystem) to set module system");return"esm"===n._moduleSystem?(n.modules[e]={src:"esm:".concat(e),name:e,state:1,exports:t},n.modules[e].exports):(n.modules[e]?n.modules[e].exports=t:n.modules[e]={src:"umd:".concat(e),name:e,state:1,exports:t},n.modules[e].exports)})),Oy(this,"register",(function(e){return VR(e).call(e,(function(e){return n.registerPlugin(e.__PLUGIN_NAME__,e)}))})),this._baseUrl=t.baseUrl}return Hy(e,[{key:"baseUrl",get:function(){return this._baseUrl}},{key:"moduleSystem",get:function(){return this._moduleSystem}},{key:"setModuleSystem",value:function(e){this._moduleSystem=e}},{key:"setBaseUrl",value:function(e){this._baseUrl=e}},{key:"_mount",value:function(e){var t=this.modules;return new jR((function(n,r){var i=document.createElement("script");i.src=e.src,i.onload=function(){e.state=1,n(t[e.name].exports),i.onload=null},i.onerror=function(t){e.state=2,e.error=t,r(t),i.onerror=null},document.body.appendChild(i)}))}}]),e}(),WF=o(Og),QF="Expected a function",qF="__lodash_placeholder__",ZF=1,YF=2,$F=4,JF=8,eI=16,tI=32,nI=64,rI=128,iI=512,oI=1/0,aI=9007199254740991,sI=17976931348623157e292,cI=NaN,lI=[["ary",rI],["bind",ZF],["bindKey",YF],["curry",JF],["curryRight",eI],["flip",iI],["partial",tI],["partialRight",nI],["rearg",256]],uI="[object Function]",dI="[object GeneratorFunction]",hI="[object Symbol]",fI=/^\s+|\s+$/g,pI=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,vI=/\{\n\/\* \[wrapped with (.+)\] \*/,gI=/,? & /,yI=/^[-+]0x[0-9a-f]+$/i,mI=/^0b[01]+$/i,_I=/^\[object .+?Constructor\]$/,bI=/^0o[0-7]+$/i,RI=/^(?:0|[1-9]\d*)$/,wI=Ow,GI="object"==Su(i)&&i&&i.Object===Object&&i,TI="object"==("undefined"==typeof self?"undefined":Su(self))&&self&&self.Object===Object&&self,kI=GI||TI||Function("return this")();function SI(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)}function EI(e,t){return!!(e?e.length:0)&&function(e,t,n){if(t!=t)return function(e,t,n,r){var i=e.length,o=n+(r?1:-1);for(;r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}(e,MI,n);var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,0)>-1}function MI(e){return e!=e}function DI(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&a!==qF||(e[n]=qF,o[i++]=n)}return o}var zI,AI,PI,xI=Function.prototype,CI=Object.prototype,FI=kI["__core-js_shared__"],II=(zI=/[^.]+$/.exec(FI&&Kw(FI)&&Kw(FI).IE_PROTO||""))?"Symbol(src)_1."+zI:"",HI=xI.toString,OI=CI.hasOwnProperty,LI=CI.toString,XI=RegExp("^"+HI.call(OI).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),UI=Object.create,BI=Math.max,NI=Math.min,VI=(AI=YI(Object,"defineProperty"),(PI=YI.name)&&PI.length>2?AI:void 0);function jI(e){if(!iH(e)||function(e){return!!II&&II in e}(e))return!1;var t=function(e){var t=iH(e)?LI.call(e):"";return t==uI||t==dI}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(oK){}return t}(e)?XI:_I;return t.test(function(e){if(null!=e){try{return HI.call(e)}catch(oK){}try{return e+""}catch(oK){}}return""}(e))}function KI(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n,r=iH(n=e.prototype)?UI(n):{},i=e.apply(r,t);return iH(i)?i:r}}function WI(e,t,n,r,i,o,a,s,c,l){var u=t&rI,d=t&ZF,h=t&YF,f=t&(JF|eI),p=t&iI,v=h?void 0:KI(e);return function g(){for(var y=arguments.length,m=Array(y),_=y;_--;)m[_]=arguments[_];if(f)var b=ZI(g),R=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&r++;return r}(m,b);if(r&&(m=function(e,t,n,r){for(var i=-1,o=e.length,a=n.length,s=-1,c=t.length,l=BI(o-a,0),u=Array(c+l),d=!r;++s<c;)u[s]=t[s];for(;++i<a;)(d||i<o)&&(u[n[i]]=e[i]);for(;l--;)u[s++]=e[i++];return u}(m,r,i,f)),o&&(m=function(e,t,n,r){for(var i=-1,o=e.length,a=-1,s=n.length,c=-1,l=t.length,u=BI(o-s,0),d=Array(u+l),h=!r;++i<u;)d[i]=e[i];for(var f=i;++c<l;)d[f+c]=t[c];for(;++a<s;)(h||i<o)&&(d[f+n[a]]=e[i++]);return d}(m,o,a,f)),y-=R,f&&y<l){var w=DI(m,b);return QI(e,t,WI,g.placeholder,n,m,w,s,c,l-y)}var G=d?n:this,T=h?G[e]:e;return y=m.length,s?m=function(e,t){var n=e.length,r=NI(t.length,n),i=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(e);for(;r--;){var o=t[r];e[r]=eH(o,n)?i[o]:void 0}return e}(m,s):p&&y>1&&WF(m).call(m),u&&c<y&&(m.length=c),this&&this!==kI&&this instanceof g&&(T=v||KI(T)),T.apply(G,m)}}function QI(e,t,n,r,i,o,a,s,c,l){var u=t&JF;t|=u?tI:nI,(t&=~(u?nI:tI))&$F||(t&=~(ZF|YF));var d=n(e,t,i,u?o:void 0,u?a:void 0,u?void 0:o,u?void 0:a,s,c,l);return d.placeholder=r,tH(d,e,t)}function qI(e,t,n,r,i,o,a,s){var c=t&YF;if(!c&&"function"!=typeof e)throw new TypeError(QF);var l=r?r.length:0;if(l||(t&=~(tI|nI),r=i=void 0),a=void 0===a?a:BI(sH(a),0),s=void 0===s?s:sH(s),l-=i?i.length:0,t&nI){var u=r,d=i;r=i=void 0}var h=[e,t,n,r,i,u,d,o,a,s];if(e=h[0],t=h[1],n=h[2],r=h[3],i=h[4],!(s=h[9]=null==h[9]?c?0:e.length:BI(h[9]-l,0))&&t&(JF|eI)&&(t&=~(JF|eI)),t&&t!=ZF)f=t==JF||t==eI?function(e,t,n){var r=KI(e);return function i(){for(var o=arguments.length,a=Array(o),s=o,c=ZI(i);s--;)a[s]=arguments[s];var l=o<3&&a[0]!==c&&a[o-1]!==c?[]:DI(a,c);return(o-=l.length)<n?QI(e,t,WI,i.placeholder,void 0,a,l,void 0,void 0,n-o):SI(this&&this!==kI&&this instanceof i?r:e,this,a)}}(e,t,s):t!=tI&&t!=(ZF|tI)||i.length?WI.apply(void 0,h):function(e,t,n,r){var i=t&ZF,o=KI(e);return function t(){for(var a=-1,s=arguments.length,c=-1,l=r.length,u=Array(l+s),d=this&&this!==kI&&this instanceof t?o:e;++c<l;)u[c]=r[c];for(;s--;)u[c++]=arguments[++a];return SI(d,i?n:this,u)}}(e,t,n,r);else var f=function(e,t,n){var r=t&ZF,i=KI(e);return function t(){return(this&&this!==kI&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n);return tH(f,e,t)}function ZI(e){return e.placeholder}function YI(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return jI(n)?n:void 0}function $I(e){var t=e.match(vI);return t?t[1].split(gI):[]}function JI(e,t){var n=t.length,r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(pI,"{\n/* [wrapped with "+t+"] */\n")}function eH(e,t){return!!(t=null==t?aI:t)&&("number"==typeof e||RI.test(e))&&e>-1&&e%1==0&&e<t}var tH=VI?function(e,t,n){var r,i=t+"";return VI(e,"toString",{configurable:!0,enumerable:!1,value:(r=JI(i,nH($I(i),n)),function(){return r})})}:function(e){return e};function nH(e,t){return function(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););}(lI,(function(n){var r="_."+n[0];t&n[1]&&!EI(e,r)&&e.push(r)})),qk(e).call(e)}function rH(e,t,n){var r=qI(e,JF,void 0,void 0,void 0,void 0,void 0,t=n?void 0:t);return r.placeholder=rH.placeholder,r}function iH(e){var t=Su(e);return!!e&&("object"==t||"function"==t)}function oH(e){return"symbol"==Su(e)||function(e){return!!e&&"object"==Su(e)}(e)&&LI.call(e)==hI}function aH(e){return e?(e=function(e){if("number"==typeof e)return e;if(oH(e))return cI;if(iH(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=iH(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(fI,"");var n=mI.test(e);return n||bI.test(e)?wI(QR(e).call(e,2),n?2:8):yI.test(e)?cI:+e}(e))===oI||e===-oI?(e<0?-1:1)*sI:e==e?e:0:0===e?e:0}function sH(e){var t=aH(e),n=t%1;return t==t?n?t-n:t:0}rH.placeholder={};var cH=o(rH),lH=p,uH=ee,dH=Ln,hH=Vn,fH=Nu,pH=Math.min,vH=[].lastIndexOf,gH=!!vH&&1/[1].lastIndexOf(1,-0)<0,yH=fH("lastIndexOf"),mH=gH||!yH?function(e){if(gH)return lH(vH,this,arguments)||0;var t=uH(this),n=hH(t),r=n-1;for(arguments.length>1&&(r=pH(r,dH(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}:vH;Pn({target:"Array",proto:!0,forced:mH!==[].lastIndexOf},{lastIndexOf:mH});var _H,bH,RH=Wu("Array").lastIndexOf,wH=ue,GH=RH,TH=Array.prototype,kH=o((function(e){var t=e.lastIndexOf;return e===TH||wH(TH,e)&&t===TH.lastIndexOf?GH:t})),SH=null!==(_H=null===(bH=document.currentScript)||void 0===bH?void 0:bH.src)&&void 0!==_H?_H:"https://tosv.byted.org/obj/lux/sdk/@byted/veplayer/".concat("2.8.0-rc.0","/object/umd/"),EH=new KF({baseUrl:QR(SH).call(SH,0,kH(SH).call(SH,"/"))}),MH=EH.registerPlugin,DH=EH.register;function zH(e,t){return AH.apply(this,arguments)}function AH(){return AH=cy(ay().mark((function e(t,n){var r;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,EH.load(t,n);case 3:return e.abrupt("return",e.sent);case 6:throw e.prev=6,e.t0=e.catch(0),$M(QM.MODULE_LOAD_ERROR,{ext:{name:t,cdn:null===e.t0||void 0===e.t0||null===(r=e.t0.target)||void 0===r?void 0:r.src},error:e.t0});case 9:case"end":return e.stop()}}),e,null,[[0,6]])}))),AH.apply(this,arguments)}var PH=function(e){if(e){GC(e).call(e,"//")&&(e=location.protocol+e);try{return new Qx(e)}catch(KTe){return}}};function xH(e){var t,n={},r=function(e,t){var n=void 0!==au&&hy(e)||e["@@iterator"];if(!n){if(ly(e)||(n=zy(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){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}}}}(e.attributes);try{for(r.s();!(t=r.n()).done;){var i=t.value;n[i.name]=i.value}}catch(o){r.e(o)}finally{r.f()}return n}function CH(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return WR(t).forEach((function(n){var r=n,i=t[n];i&&(null==e||e.setAttribute(r,i))})),e}function FH(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=xH(e);return WR(n).forEach((function(n){t[n]?null==e||e.setAttribute(n,t[n]):null==e||e.removeAttribute(n)})),e}var IH=Object.freeze({__proto__:null,getAttributes:xH,replaceAttributes:FH,setAttributes:CH}),HH=['video/mp4;codecs="hev1.1.6.L120.90"','video/mp4;codecs="hev1.2.4.L120.90"','video/mp4;codecs="hev1.3.E.L120.90"','video/mp4;codecs="hev1.4.10.L120.90"'],OH=cH((function(e,t){var n;return null==t?void 0:OC(n=t.split("?")[0].toLowerCase()).call(n,e)})),LH=OH(".m3u8"),XH=OH(".mp4"),UH=OH(".flv"),BH=OH(".sdp"),NH=OH(".mpd");function VH(e){return LH(e)?"hls":UH(e)?"flv":BH(e)?"rtm":XH(e)?"mp4":NH(e)?"dash":"unknown"}function jH(){return(jH=cy(ay().mark((function e(){var t,n;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,zH(jF.PluginXgvideo);case 2:return t=e.sent,n=t.XGVideoPlugin,e.abrupt("return",null==n?void 0:n.isSupported());case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var KH=Fm(Fm(Fm({},rS),IH),{},{getStreamType:VH,isMseSupported:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.H264;return e===t.H265?uS.isHevcSupported():e===t.H264?uS.isMSESupport():uS.isMSESupport(e)},isSoftDecodeSupported:function(){return jH.apply(this,arguments)},isMMSSupported:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.H264;return void 0!==window.ManagedMediaSource&&(e===t.H264?window.ManagedMediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'):e===t.H265?HH.some((function(e){return window.ManagedMediaSource.isTypeSupported(e)})):window.ManagedMediaSource.isTypeSupported(e))},appendSearchParams:function(e,t){var n,r=PH(e);if(!e||!r)return null!==(n=e)&&void 0!==n?n:"";var i,o=GC(e).call(e,"//");for(var a in t){var s,c,l=t[a];if(null!=r&&r.searchParams.has(a))null==r||null===(s=r.searchParams)||void 0===s||s.set(a,l);else null==r||null===(c=r.searchParams)||void 0===c||c.append(a,l)}return e=r.toString(),o?null===(i=e)||void 0===i?void 0:i.replace(location.protocol,""):e},getUrlObject:PH}),WH=uS.isWeixin,QH=uS.os,qH=uS.device,ZH=QH.isAndroid,YH=QH.isIos,$H="mobile"===qH,JH=0,eO=!1,tO=function(e){UM(n,e);var t=VM(n);function n(e){var r;return Py(this,n),Oy(AM(r=t.call(this,e)),"_hasSetUserAutoplay",void 0),Oy(AM(r),"_timer",void 0),Oy(AM(r),"_wxTimer",void 0),Oy(AM(r),"_state",{mode:0,showUnmuteBt:!1}),Oy(AM(r),"userClickPlay",(function(){if(!eO){var e=r.player.play();e&&e.then?e.then((function(){console.log("user action autoplay success"),eO=!0})).catch((function(e){console.warn("user action autoplay fail:",e)})):(console.warn("no play promise"),eO=!0)}})),r}return Hy(n,[{key:"afterCreate",value:function(){this.initState(),this.initEvents(),this.setWXAutoPlay()}},{key:"updateLang",value:function(){this.renderUnmuteBt()}},{key:"initState",value:function(){this._state.mode=this.player.muted?1:0}},{key:"initEvents",value:function(){this.player.on(PS,this.handleAutoplayPrevented.bind(this)),this.player.on(AS,this.handleAutoplayStart.bind(this)),this.player.on(TS,this.handleVolumechange.bind(this)),this.setUserActionAutoPlay()}},{key:"setWXAutoPlay",value:function(){WH&&this.player.config.autoplay&&this.config.enableWxJsBridgeAutoplay&&(window.WeixinJSBridge?this.wxPlay():document.addEventListener("WeixinJSBridgeReady",this.wxPlay.bind(this),!1))}},{key:"wxCanPlayFn",value:function(){var e=this;window.WeixinJSBridge&&window.WeixinJSBridge.invoke("getNetworkType",{},(function(){e._wxTimer=window.setTimeout((function(){e._wxTimer&&clearTimeout(e._wxTimer);var t=e.player.play();t&&t.then?t.then((function(){console.log("wechat autoplay success")})).catch((function(t){console.warn("wechat autoplay fail:",t),e._state.showUnmuteBt=!1,e.renderUnmuteBt()})):console.warn("wechat browser no play promise")}))}))}},{key:"wxPlay",value:function(){this.player.readyState>=2?this.wxCanPlayFn():ZH?this.player.once(wS,this.wxCanPlayFn.bind(this)):YH&&this.player.once(xS,this.wxCanPlayFn.bind(this))}},{key:"setUserActionAutoPlay",value:function(){var e=this;this.config.enableUserActionAutoplay&&this.player.once(qC.AUTOPLAY_FAIL,(function(){e._hasSetUserAutoplay=!0,(e.config.userActionDom instanceof window.Node?e.config.userActionDom:window.document.body).addEventListener("click",e.userClickPlay,!1)}))}},{key:"handleAutoplayPrevented",value:function(){return 0===this._state.mode?(console.warn("unmute autoplay fail"),this.player.emit(qC.AUTOPLAY_FAIL,{mode:"unmute"}),ZH&&WH?void(this._state.mode=2):void(this.config.enableDegradeMuteAutoplay&&this.changeMuteMode())):1===this._state.mode?(console.warn("mute autoplay fail"),this.player.emit(qC.AUTOPLAY_FAIL,{mode:"mute"}),void(this._state.mode=2)):2===this._state.mode?(this.player.emit(qC.AUTOPLAY_FAIL,{mode:"noSupport"}),void console.warn("not support autoplay")):void 0}},{key:"changeMuteMode",value:function(){var e=this;this.player.muted=!0,this._state.showUnmuteBt=!0,this._state.mode=1,this.renderUnmuteBt(),this._timer=window.setTimeout((function(){e._timer&&window.clearTimeout(e._timer);var t=e.player.play();t&&t.then?t.then((function(){console.log("degrade mute autoplay success")})).catch((function(t){console.warn("degrade mute autoplay fail:",t),e.player.muted=!1,e._state.showUnmuteBt=!1,e.renderUnmuteBt()})):console.warn("no play promise")}))}},{key:"handleAutoplayStart",value:function(){if(0!==this._state.mode)return 1===this._state.mode?(this.player.emit(qC.AUTOPLAY_SUCCESS,{mode:"mute"}),this._state.showUnmuteBt=!0,void this.renderUnmuteBt()):2===this._state.mode?(this.player.emit(qC.AUTOPLAY_SUCCESS,{mode:"click"}),this.player.muted=!1,this._state.showUnmuteBt=!1,void this.renderUnmuteBt()):void 0;this.player.emit(qC.AUTOPLAY_SUCCESS,{mode:"unmute"})}},{key:"handleVolumechange",value:function(){this._state.mode=this.player.muted?1:0,this._state.showUnmuteBt&&(this._state.showUnmuteBt=!1,this.renderUnmuteBt(),this.player.paused&&this.player.readyState>=1&&this.player.play())}},{key:"renderUnmuteBt",value:function(){var e=this.root,t=this.player.config.i18nManager;if(e&&(e.innerHTML="",this._state.showUnmuteBt)){var n=t.getText("UNMUTE"),r=rS.createDom("div",n,void 0,"veplayer-unmute-bt");e.appendChild(r),this.bind(".veplayer-unmute-bt","click",this.cancelUnmute.bind(this)),this.bind(".veplayer-unmute-bt","touchend",this.cancelUnmute.bind(this))}}},{key:"cancelUnmute",value:function(){var e=Date.now();if(e-JH>200){JH=e,this.player.muted=!1,this._state.showUnmuteBt=!1,this.renderUnmuteBt(),this.emit(qC.AUTOPLAY_UNMUTE);var t="mobile"===uS.device,n=BH(this.player.config.url);t&&n&&(this.player.volume>.5?this.player.volume=this.player.volume-.1:this.player.volume=this.player.volume+.1)}}},{key:"destroy",value:function(){if(this.player.off(PS,this.handleAutoplayPrevented.bind(this)),this.player.off(AS,this.handleAutoplayStart.bind(this)),this.player.off(TS,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=$H?"touch":"click";(this.config.userActionDom instanceof window.Node?this.config.userActionDom:window.document.body).removeEventListener(e,this.userClickPlay,!1)}}},{key:"render",value:function(){return'<div class="veplayer-unmute"></div>'}}],[{key:"pluginName",get:function(){return"autoplayPlugin"}},{key:"defaultConfig",get:function(){return{position:FE.POSITIONS.ROOT,enableDegradeMuteAutoplay:!1,enableWxJsBridgeAutoplay:!1,userActionDom:window.document.body,enableUserActionAutoplay:!1}}}]),n}(FE),nO=sF.values;Pn({target:"Object",stat:!0},{values:function(e){return nO(e)}});var rO=o(ie.Object.values);function iO(){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 oO,aO,sO=function(e){UM(n,e);var t=VM(n);function n(){return Py(this,n),t.apply(this,arguments)}return Hy(n,[{key:"onItemClick",value:function(){}},{key:"onOptionClick",value:function(){this.toggle(!1)}},{key:"updateLang",value:function(){var e,t=this,n=this.player.config.i18nManager;null===(e=this.config.plugins)||void 0===e||e.forEach((function(e){var r,i=null!==(r=n.normalize(e.textTips))&&void 0!==r?r:e.pluginName;if(t.player.root){var o=rS.findDom(t.player.root,".panel-plugin-".concat(e.pluginName," .panel-icon-bt-text"));o&&(o.innerHTML=i)}}))}},{key:"beforeCreate",value:function(e){var t,n=e.player.config.i18nManager;e.config.list=null===(t=e.config.plugins)||void 0===t?void 0:VR(t).call(t,(function(t,r){var i,o=rS.createDom("div","",{},"panel-icon-bt panel-plugin-".concat(t.pluginName)),a=rS.createDom("div","",{},"panel-icon-svg"),s=null!==(i=n.normalize(t.textTips))&&void 0!==i?i:t.pluginName;return o.appendChild(a),o.appendChild(rS.createDom("span",s,{"plugin-index":r},"panel-icon-bt-text")),{showText:o,plugin:e.player.registerPlugin({plugin:t,options:{root:a}})}}))}},{key:"hideChild",value:function(e){if(e){var t;null===(t=e.hide)||void 0===t||t.call(e);var n=document.querySelector(".panel-plugin-".concat(e.pluginName));n&&rS.addClass(n,"hide")}}},{key:"showChild",value:function(e){if(e){var t;null===(t=e.show)||void 0===t||t.call(e);var n=document.querySelector(".panel-plugin-".concat(e.pluginName));n&&rS.removeClass(n,"hide")}}},{key:"registerIcons",value:function(){return{more:{icon:iO}}}}],[{key:"pluginName",get:function(){return"more"}},{key:"defaultConfig",get:function(){return Fm(Fm({},OF.defaultConfig),{},{index:1,plugins:[],list:[],hideOnSingleOption:!1,isShowIcon:!0,hidePortrait:!1,renderType:PF.Icon,panel:{className:"more-panel-content"}})}}]),n}(OF),cO=function(e){return e.ROOT_TOP_RIGHT="rootTopRight",e.ROOT_TOP_RIGHT_COLLAPSE="rootTopRightCollapse",e}(cO||{}),lO=function(e){UM(n,e);var t=VM(n);function n(){return Py(this,n),t.apply(this,arguments)}return Hy(n,[{key:"registerIcons",value:function(){return{more:{icon:iO,class:"xgplayer-more-svg"}}}},{key:"children",value:function(){var e=this,t=this._getPlugins(),n=t.plugins,r=t.collapsePlugins,i={};return n.forEach((function(t){i[t.pluginName]={plugin:t,options:{root:e.root}}})),r.length&&(i[sO.pluginName]={plugin:sO,options:{root:this.root,plugins:r}}),i}},{key:"render",value:function(){return'<xg-right-grid class="xg-right-grid xgplayer-rightTop-iconList"></xg-right-grid>'}},{key:"_getPlugins",value:function(){var e,t=this,n=[],r=[],i=null===(e=this.player.config.ignores)||void 0===e?void 0:VR(e).call(e,(function(e){return e.toLowerCase()}));return this.config.plugins.forEach((function(e){var o,a=e.pluginName.toLowerCase();null!=i&&OC(i).call(i,a)||("rootTopRight"===(null!==(o=t.player.config[a].position)&&void 0!==o?o:e.defaultConfig.position)?n.push(e):r.push(e))})),{plugins:null!=n?n:[],collapsePlugins:null!=r?r:[]}}}],[{key:"pluginName",get:function(){return"topRightBar"}},{key:"defaultConfig",get:function(){return{position:FE.POSITIONS.ROOT_TOP,plugins:[]}}},{key:"isTopRightPlugin",value:function(e,t){var n,r,i,o,a,s=null!==(r=null===(i=t[null==e||null===(n=e.pluginName)||void 0===n?void 0:n.toLowerCase()])||void 0===i?void 0:i.position)&&void 0!==r?r:null==e||null===(o=e.defaultConfig)||void 0===o?void 0:o.position;return!!OC(a=rO(cO)).call(a,s)}}]),n}(FE),uO=[oz,uz,pz,_D,bz,eD,oD,QD,aD,EF,MF,LF,NF,tO],dO=Xm(oO=[]).call(oO,uO,[KD,wD,lO]),hO=Xm(aO=[]).call(aO,uO,[LD,lO]),fO="pc"===uS.device?dO:hO;function pO(){return(new DOMParser).parseFromString('<svg width="21" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.892 2h4.445v1.778H3.892v4.444H2.114V3.778C2.114 2.796 2.91 2 3.892 2zm4.445 16v-4.444c0-.982-.796-1.778-1.778-1.778H2.114v1.778h2.944L2.264 16.35a.9.9 0 001.272 1.273l2.988-2.987a.918.918 0 00.035-.037V18h1.778zm8-6.222v4.444h-4.445V18h4.445c.981 0 1.777-.796 1.777-1.778v-4.444h-1.777zM11.892 2v4.445c0 .981.796 1.777 1.778 1.777h4.444V6.445H15.17l2.568-2.568a.9.9 0 10-1.273-1.273L13.67 5.4V2h-1.778z" fill="#fff"/></svg>',"image/svg+xml").firstChild}function vO(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.778 2h4.444v1.778H3.778v4.444H2V3.778C2 2.796 2.796 2 3.778 2zM2 11.778v4.444C2 17.204 2.796 18 3.778 18h4.444v-1.778H4.823l2.313-2.313a.9.9 0 00-1.272-1.273l-2.086 2.086v-2.944H2zm14.222 0v4.444h-4.444V18h4.444c.982 0 1.778-.796 1.778-1.778v-4.444h-1.778zM18 8.222V3.778C18 2.796 17.204 2 16.222 2h-4.444v1.778h2.945l-2.587 2.586a.9.9 0 101.273 1.273l2.813-2.813v3.398H18z" fill="#fff"/></svg>',"image/svg+xml").firstChild}var gO={startPlay:function(){return(new DOMParser).parseFromString('<svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="60" height="60" rx="30" fill="#000" fill-opacity=".4"/><path d="M40.243 28.3a2 2 0 010 3.401L24.06 41.712c-1.332.825-3.052-.134-3.052-1.7V19.988c0-1.566 1.72-2.525 3.052-1.7l16.184 10.01z" fill="#fff"/></svg>',"image/svg+xml").firstChild},play:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.121 8.299a2 2 0 010 3.402l-7.94 4.91c-1.332.825-3.051-.133-3.051-1.7V5.09c0-1.567 1.72-2.525 3.052-1.701l7.939 4.911z" fill="#fff"/></svg>',"image/svg+xml").firstChild},pause:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="5.313" y="3.75" width="3.125" height="12.5" rx=".625" fill="#fff"/><rect x="11.563" y="3.75" width="3.125" height="12.5" rx=".625" fill="#fff"/></svg>',"image/svg+xml").firstChild},fullscreen:vO,exitFullscreen:pO,replay:function(){return(new DOMParser).parseFromString('<svg width="72" height="72" viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg"><g fill="#FFF" fill-rule="evenodd"><circle fill-opacity=".3" cx="36" cy="36" r="36"/><path d="M40.167 32.667a.833.833 0 01-.834-.834v-1.666c0-.46.373-.834.834-.834h5.409a11.653 11.653 0 00-9.576-5c-6.443 0-11.667 5.224-11.667 11.667S29.557 47.667 36 47.667c5.285 0 9.749-3.514 11.183-8.333h3.445C49.112 46.014 43.138 51 36 51c-8.284 0-15-6.716-15-15 0-8.284 6.716-15 15-15 4.713 0 8.918 2.173 11.668 5.572l-.001-4.739c0-.46.373-.833.833-.833h1.667c.46 0 .833.373.833.833V31c0 .879-.68 1.598-1.542 1.662l-.125.005h-9.166z"/></g></svg>',"image/svg+xml").firstChild},volumeLarge:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.867 2.5h.55c.44 0 .799.34.83.771l.003.062v13.334c0 .44-.34.799-.771.83l-.062.003h-.55a.833.833 0 01-.444-.128l-.064-.045-4.867-3.744a.831.831 0 01-.322-.59l-.003-.07V7.077c0-.235.099-.458.271-.615l.054-.045L9.36 2.673a.832.832 0 01.43-.17l.078-.003h.55-.55zm6.767 2.278A7.474 7.474 0 0118.75 10a7.477 7.477 0 01-2.128 5.234.4.4 0 01-.57-.004l-.587-.586a.442.442 0 01.005-.617A5.812 5.812 0 0017.083 10c0-1.557-.61-2.97-1.603-4.017a.442.442 0 01-.003-.615l.586-.586a.4.4 0 01.57-.004zM2.5 6.667c.23 0 .417.186.417.416v5.834c0 .23-.187.416-.417.416h-.833a.417.417 0 01-.417-.416V7.083c0-.23.187-.416.417-.416H2.5zm11.768.46A4.153 4.153 0 0115.417 10c0 1.12-.442 2.137-1.162 2.886a.388.388 0 01-.555-.007l-.577-.578c-.176-.176-.156-.467.009-.655A2.49 2.49 0 0013.75 10a2.49 2.49 0 00-.61-1.636c-.163-.188-.182-.477-.006-.653l.578-.578a.388.388 0 01.556-.006z" fill="#fff"/></svg>',"image/svg+xml").firstChild},volumeMuted:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.045 2.5h.55c.44 0 .8.34.831.771l.003.062v13.334c0 .44-.34.799-.771.83l-.063.003h-.55a.833.833 0 01-.443-.128l-.065-.045-4.866-3.744a.831.831 0 01-.323-.59l-.003-.07V7.077c0-.235.1-.458.272-.615l.054-.045 4.866-3.744a.832.832 0 01.43-.17l.078-.003h.55-.55zM2.68 6.667c.23 0 .416.186.416.416v5.834c0 .23-.186.416-.416.416h-.834a.417.417 0 01-.416-.416V7.083c0-.23.186-.416.416-.416h.834zm10.467.294a.417.417 0 01.59 0l1.767 1.768L17.27 6.96a.417.417 0 01.589 0l.59.59a.417.417 0 010 .589L16.68 9.908l1.768 1.767c.15.15.162.387.035.55l-.035.04-.589.589a.417.417 0 01-.59 0l-1.767-1.768-1.768 1.768a.417.417 0 01-.59 0l-.588-.59a.417.417 0 010-.589l1.767-1.768-1.767-1.767a.417.417 0 01-.035-.55l.035-.04.589-.589z" fill="#fff"/></svg>',"image/svg+xml").firstChild},volumeSmall:function(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.867 2.5h.55c.44 0 .799.34.83.771l.003.062v13.334c0 .44-.34.799-.771.83l-.062.003h-.55a.833.833 0 01-.444-.128l-.064-.045-4.867-3.744a.831.831 0 01-.322-.59l-.003-.07V7.077c0-.235.099-.458.271-.615l.054-.045L9.36 2.673a.832.832 0 01.43-.17l.078-.003h.55-.55zM2.5 6.667c.23 0 .417.186.417.416v5.834c0 .23-.187.416-.417.416h-.833a.417.417 0 01-.417-.416V7.083c0-.23.187-.416.417-.416H2.5zm11.768.46A4.153 4.153 0 0115.417 10c0 1.12-.442 2.137-1.162 2.886a.388.388 0 01-.555-.007l-.577-.578c-.176-.176-.156-.467.009-.655A2.49 2.49 0 0013.75 10a2.49 2.49 0 00-.61-1.636c-.163-.188-.182-.477-.006-.653l.578-.578a.388.388 0 01.556-.006z" fill="#fff"/></svg>',"image/svg+xml").firstChild}},yO=Fm(Fm({},gO),{},{fullscreen:vO,exitFullscreen:pO}),mO=Fm(Fm({},gO),{},{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}}),_O="pc"===uS.device?yO:mO,bO=Fm(Fm({},lM.TEXT),{},{DEFINITION_FALLBACK_TOAST:"The current network is unstable, it is recommended to switch to ",DEFINITION_SWITCHING:"Switching to",ERROR_REFRESH:"Refresh",UNMUTE:"Click to unmute",MANIFEST:"Video parsing error",NETWORK:"Network error",NETWORK_TIMEOUT:"Network timeout",NETWORK_FORBIDDEN:"Authentication error",NETWORK_NOTFOUND:"Stream does not exist",DEMUX:"Video parsing error",REMUX:"Video parsing error",MEDIA:"An error occurred, Please try again",MEDIA_ERR_CODEC_NOT_SUPPORTED:"Audio/video codec is not supported",MEDIA_ERR_URL_EMPTY:"The stream address is not specified",DRM:"Permission verification failed",DRM_LICENSE:"Commercial DRM Permission verification failed",OTHER:"Unknown error",RUNTIME:"An error occurred, Please try again",MODULE_LOAD_ERROR:"CDN fetch error",UNKNOWN:"Unknown error"}),RO=Fm(Fm({},{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:"直播"}),{},{DEFINITION_FALLBACK_TOAST:"当前网络不稳定,建议切换到",DEFINITION_SWITCHING:"正在切换至",ERROR_REFRESH:"刷新",UNMUTE:"点击取消静音",MANIFEST:"视频解析错误",NETWORK:"网络错误",NETWORK_TIMEOUT:"网络超时",NETWORK_FORBIDDEN:"鉴权异常",NETWORK_NOTFOUND:"播放地址不存在",DEMUX:"视频解析错误",REMUX:"视频解析错误",MEDIA:"播放异常,请重试",MEDIA_ERR_CODEC_NOT_SUPPORTED:"不支持的音频/视频格式",MEDIA_ERR_URL_EMPTY:"当前播放地址为空",DRM:"权限验证失败",DRM_LICENSE:"商业 DRM LICENSE 鉴权失败",OTHER:"其他报错",RUNTIME:"播放异常,请重试",MODULE_LOAD_ERROR:"插件模块加载异常",UNKNOWN:"未知报错"}),wO=function(){function e(t){var n;if(Py(this,e),Oy(this,"_lang",void 0),this._lang=(null==t?void 0:t.lang)||aS()||"en","zh"===this._lang&&(this._lang="zh-cn"),null!=t&&null!==(n=t.i18n)&&void 0!==n&&n.texts){var r,i,o=VR(r=lF(null==t||null===(i=t.i18n)||void 0===i?void 0:i.texts)).call(r,(function(e){var t=JC(e,2);return{LANG:t[0],TEXT:t[1]}}));e.extend(o)}}return Hy(e,[{key:"setLang",value:function(e){this._lang=e}},{key:"getLang",value:function(){return this._lang}},{key:"normalize",value:function(e){return e?"string"==typeof e?e:e[this._lang]:""}},{key:"getText",value:function(e){var t,n,r;if(e){var i=null==pM?void 0:pM.lang;return null!==(t=null==i||null===(n=i[this._lang])||void 0===n?void 0:n[e])&&void 0!==t?t:null==i||null===(r=i.en)||void 0===r?void 0:r[e]}}}],[{key:"langKeys",get:function(){return pM.langKeys}},{key:"isLangValid",value:function(e){var t;return OC(t=pM.langKeys).call(t,e)||"zh"===e}},{key:"extend",value:function(e,t){pM.extend(e,t)}}]),e}(),GO=function(){function e(t){Py(this,e),Oy(this,"_videoAttributes",void 0),Oy(this,"_el",void 0),this._videoAttributes=xH(t),this._el=t}return Hy(e,[{key:"options",get:function(){var e=this;return{remainMediaAfterDestroy:!0,mediaEl:function(t){return CH(e._el,t)}}}},{key:"destroy",value:function(){FH(this._el,this._videoAttributes)}}]),e}(),TO=["autoplay"],kO=Fm(Fm({},FE.POSITIONS),cO),SO={id:"veplayer",width:"100%",height:"100%",decodeType:r.Hardware,fullscreen:{useCssFullscreen:!1}},EO=function(e){var t,n,r,i=e.autoplay,o=nm(e,TO);(o.poster&&(o.poster=function(e){var t,n=""+e,r=$C.exec(n);if(!r)return n;var i,o="",a=0;for(i=r.index;i<n.length;i++){switch(n.charCodeAt(i)){case 34:t="&quot;";break;case 38:t="&amp;";break;case 39:t="&#x27;";break;case 60:t="&lt;";break;case 62:t="&gt;";break;default:continue}a!==i&&(o+=n.substring(a,i)),a=i+1,o+=t}return a!==i?o+n.substring(a,i):o}(o.poster)),o.icons=Fm(Fm({},_O),o.icons?(t=o.icons,n={},lF(null!=t?t:{}).forEach((function(e){var t=JC(e,2),r=t[0],i=t[1];"string"==typeof i?console.warn("icons.".concat(r," has been removed")):n[r]=i})),n):{}),o.autoplay=Boolean(i),i&&"boolean"!=typeof i)&&(o.autoplayMuted=null==i?void 0:i.muted,o.videoAttributes=Fm(Fm({},null!==(r=o.videoAttributes)&&void 0!==r?r:{}),{},{muted:null==i?void 0:i.muted}),o.autoplayPlugin=i);return delete o.i18n,o},MO=function(){function e(){var t,n,r,i,o,a,s,c,l,u,d,h,f,p=this,v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Py(this,e),Oy(this,"_player",void 0),Oy(this,"_sourceManager",void 0),Oy(this,"_preparePlugins",void 0),Oy(this,"_previousPrepareResult",void 0),Oy(this,"_i18nManager",void 0),Oy(this,"_events",{}),Oy(this,"_customMedia",void 0),Oy(this,"_errorCallback",void 0),Oy(this,"_beforeFallbackError",void 0),this._sourceManager=v.sourceManager,this._preparePlugins=v.preparePlugins,this._previousPrepareResult=v.prepareResult,this._beforeFallbackError=v.beforeFallbackError,this._i18nManager=null!==(t=v.i18nManager)&&void 0!==t?t:new wO({i18n:v.i18n}),v.mediaElement&&(this._customMedia=new GO(v.mediaElement));var g=EO(Fm(Fm(Fm({},v),null===(n=this._customMedia)||void 0===n?void 0:n.options),null===(r=this._previousPrepareResult)||void 0===r?void 0:r.options)),y=Xm(i=[]).call(i,Ay(null!==(o=null===(a=this._previousPrepareResult)||void 0===a?void 0:a.plugins)&&void 0!==o?o:[]),Ay(null!==(s=v.plugins)&&void 0!==s?s:fO)),m=[],_=[];y.forEach((function(e){lO.isTopRightPlugin(e,v)?m.push(e):_.push(e)})),this._player=new zM(Fm(Fm(Fm({},SO),g),{},{definition:Fm({list:null!==(c=null===(l=this._sourceManager.source)||void 0===l?void 0:l.definitions)&&void 0!==c?c:[],defaultDefinition:null===(u=this._sourceManager.definition)||void 0===u?void 0:u.definition},null!==(d=v.definition)&&void 0!==d?d:{}),url:null===(h=this._sourceManager.definition)||void 0===h?void 0:h.url,sources:Fm(Fm({},null!==(f=v.sources)&&void 0!==f?f:{}),{},{sourceManager:this._sourceManager}),topRightBar:{plugins:m},plugins:_,i18nManager:this._i18nManager,veplayer:this})),this.emit(ZC.PLAYER_CREATE_FINISH,this._player),this._errorCallback=function(e){return p._handleFallback(e)},this._player.on(mS,this._errorCallback)}var t,n,r,i,o,a,s;return Hy(e,[{key:"readyState",get:function(){return this._player.readyState}},{key:"buffered",get:function(){return this._player.buffered}},{key:"played",get:function(){return this._player.played}},{key:"cumulateTime",get:function(){return this._player.cumulateTime}},{key:"isFocused",get:function(){return this._player.isActive}},{key:"isFullscreen",get:function(){return this._player.isFullscreen}},{key:"isCssFullscreen",get:function(){return this._player.isCssfullScreen}},{key:"networkState",get:function(){return this._player.networkState}},{key:"paused",get:function(){return this._player.paused}},{key:"ended",get:function(){return this._player.ended}},{key:"state",get:function(){return this._player.state}},{key:"url",get:function(){return this._player.config.url}},{key:"source",get:function(){var e;return null===(e=this._sourceManager.source)||void 0===e?void 0:e.name}},{key:"playerVersion",get:function(){return"2.8.0-rc.0"}},{key:"definition",get:function(){var e;return null===(e=this._sourceManager.definition)||void 0===e?void 0:e.definition}},{key:"crossOrigin",get:function(){return this._player.crossOrigin},set:function(e){this._player.crossOrigin=e}},{key:"volume",get:function(){return this._player.volume},set:function(e){this._player.volume=e}},{key:"muted",get:function(){return this._player.muted},set:function(e){this._player.muted=e}},{key:"lang",get:function(){return this._i18nManager.getLang()},set:function(e){if(this._player.lang!==e)if(wO.isLangValid(e))this._i18nManager.setLang(e),this._player.lang=e;else{var t,n,r,i,o=wO.langKeys.join(","),a={en:Xm(t="Sorry, we couldn't set the language to ".concat(e," because it's not currently supported. The list of supported languages includes ")).call(t,o,"."),"zh-cn":Xm(n="不支持当前设置的语言".concat(e,", 支持的语言有")).call(n,o,", 请重新设置")};console.error((null===(r=this._i18nManager)||void 0===r||null===(i=r.normalize)||void 0===i?void 0:i.call(r,a))||a.en)}}},{key:"_src",get:function(){return this._player.currentSrc}},{key:"switch",value:(s=cy(ay().mark((function e(t,n){var r,i,o,a;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"!=typeof t||1!==this._sourceManager.sources.length||1!==(null===(r=this._sourceManager.sources)||void 0===r||null===(r=r[0].definitions)||void 0===r?void 0:r.length)){e.next=5;break}return this._sourceManager.updateSources(t),e.next=4,this._switchUrl(t,{seamless:null==n?void 0:n.seamless});case 4:return e.abrupt("return",this._sourceManager.definition);case 5:if(o=qm(i=this._sourceManager).call(i,t,n)){e.next=8;break}throw new Error("string"==typeof t?"No definition found for url: ".concat(t):Xm(a="No definition found for source: ".concat(t.source,", definition: ")).call(a,t.definition));case 8:return e.next=10,this._switch(o);case 10:return e.abrupt("return",o);case 11:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"updatePlaylist",value:function(e,t){var n=this._sourceManager.updateSources(e,t);return this._switch(n.definition)}},{key:"once",value:function(e,t){var n,r=this._transformEvent(e,t),i=r.xgCallback,o=r.xgEventName;i&&(null!==(n=this._events)&&void 0!==n&&n[e]||(this._events[e]=new OR),this._events[e].set(t,i),this._player.once(o,i))}},{key:"off",value:function(e,t){var n,r=null===(n=this._events[e])||void 0===n?void 0:n.get(t),i=this._transformEvent(e).xgEventName;r&&(this._player.off(i,r),this._events[e].delete(t))}},{key:"emit",value:function(e,t){var n=this._transformEvent(e).xgEventName;this._player.emit(n,t)}},{key:"offAll",value:function(){this._events={},this._player.offAll()}},{key:"on",value:function(e,t){var n,r=this._transformEvent(e,t),i=r.xgCallback,o=r.xgEventName;i&&(null!==(n=this._events)&&void 0!==n&&n[e]||(this._events[e]=new OR),this._events[e].set(t,i),this._player.on(o,i))}},{key:"play",value:function(){return this._player.play()}},{key:"pause",value:function(){return this._player.pause()}},{key:"requestPIP",value:function(){var e;null===(e=this._player.plugins.pip)||void 0===e||e.requestPIP()}},{key:"exitPIP",value:function(){var e;null===(e=this._player.plugins.pip)||void 0===e||e.exitPIP()}},{key:"retry",value:function(){return this._player.retry()}},{key:"focus",value:function(e){return this._player.focus(e)}},{key:"blur",value:function(e){return this._player.blur(e)}},{key:"canPlayType",value:function(e){return this._player.canPlayType(e)}},{key:"requestFullscreen",value:function(e){return this._player.getFullscreen(e)}},{key:"exitFullscreen",value:function(e){return this._player.exitFullscreen(e)}},{key:"requestCssFullscreen",value:function(e){return this._player.getCssFullscreen(e)}},{key:"exitCssFullscreen",value:function(){return this._player.exitCssFullscreen()}},{key:"registerPlugin",value:function(e,t){return this._player.registerPlugin(e,t)}},{key:"unRegisterPlugin",value:function(e){return this._player.unRegisterPlugin(e)}},{key:"showIcon",value:function(e){var t=this,n=this._player.getPlugin("more");e.forEach((function(e){var r=t._player.getPlugin(e);r&&null!=r&&r.root&&(r.config.position===kO.ROOT_TOP_RIGHT_COLLAPSE?null==n||n.showChild(r):r.show())}))}},{key:"hideIcon",value:function(e){var t=this,n=this._player.getPlugin("more");e.forEach((function(e){var r=t._player.getPlugin(e);r&&null!=r&&r.root&&(r.config.position===kO.ROOT_TOP_RIGHT_COLLAPSE?null==n||n.hideChild(r):r.hide())}))}},{key:"destroy",value:function(){var e;this._player.off(mS,this._errorCallback),this._player.destroy(),null===(e=this._customMedia)||void 0===e||e.destroy()}},{key:"prepare",value:(a=cy(ay().mark((function e(t){var n,r,i,o,a,s,c,l,u,d,h,f,p=this;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===(n=this._preparePlugins)||void 0===n?void 0:n.call(this,t);case 2:return null!=(o=e.sent)&&o.protocol&&null!==(r=this._previousPrepareResult)&&void 0!==r&&r.protocol?a=o.protocol===(null===(s=this._previousPrepareResult)||void 0===s?void 0:s.protocol):(d=null!==(c=null==o||null===(l=o.options)||void 0===l?void 0:l.url)&&void 0!==c?c:t,h=null===(u=this._player)||void 0===u||null===(u=u.config)||void 0===u?void 0:u.url,a=h&&VH(d)===VH(h)),a||null===(f=this._previousPrepareResult)||void 0===f||null===(f=f.plugins)||void 0===f||f.forEach((function(e){p._player.unRegisterPlugin(e.pluginName)})),this._previousPrepareResult=o,null!=o&&o.options&&this._player.setConfig(o.options),e.abrupt("return",{plugins:a?[]:null==o||null===(i=o.plugins)||void 0===i?void 0:VR(i).call(i,(function(e){return p._player.registerPlugin(e)})),options:null==o?void 0:o.options,isSameProtocol:a,useSrc:null==o?void 0:o.useSrc});case 8:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"_handleFallback",value:(o=cy(ay().mark((function e(t){var n,r,i,o=this;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._player.addClass(XE),n=this._sourceManager.url,r=this._sourceManager.fallback()){e.next=19;break}return i=JM(t,this._i18nManager),e.prev=5,e.next=8,this._beforeFallbackError(i);case 8:if(e.sent.canEmitError){e.next=12;break}return e.abrupt("return");case 12:e.next=16;break;case 14:e.prev=14,e.t0=e.catch(5);case 16:return this._player.removeClass(XE),this.emit(ZC.FALLBACK_ERROR,i),e.abrupt("return");case 19:this._player.once("canplay",(function(){o._sourceManager.resetFallback()})),this.emit(ZC.FALLBACK,{from:{url:n},to:{url:r}}),this._switchUrl(r);case 22:case"end":return e.stop()}}),e,this,[[5,14]])}))),function(e){return o.apply(this,arguments)})},{key:"_transformEvent",value:function(e,t){var n=this;return e===mS?{xgCallback:t?function(e){t(JM(e,n._i18nManager))}:void 0,xgEventName:e}:function(e,t){var n=YC[e];if(n)return{xgEventName:n.event,xgCallback:t?n.shouldCallback?function(){for(var e,r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];null!==(e=n.shouldCallback)&&void 0!==e&&e.call.apply(e,Xm(r=[n]).call(r,o))&&(null==t||t.apply(void 0,o))}:t:void 0};return{xgEventName:e,xgCallback:t}}(e,t)}},{key:"_switch",value:(i=cy(ay().mark((function e(t){var n,r,i,o,a,s,c,l,u,d,h,f;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=BF(this._sourceManager.definition),s=this._player.paused&&!this._player.isError,e.next=4,this.prepare(t.url);case 4:if(e.t0=e.sent,e.t0){e.next=7;break}e.t0={};case 7:if(c=e.t0,l=c.plugins,u=c.options,d=c.isSameProtocol,h=c.useSrc,null!=u&&u.url&&(t.url=null==u?void 0:u.url),this._sourceManager.switch(t),null===(n=this._player)||void 0===n||null===(n=n.plugins)||void 0===n||n.sources.renderItemList(),null===(r=this._player)||void 0===r||null===(r=r.plugins)||void 0===r||r.definition.renderItemList(),f=(null==t||null===(i=t.source)||void 0===i?void 0:i.name)!==(null==a||null===(o=a.source)||void 0===o?void 0:o.name),this._player.config.url=t.url,!d){e.next=22;break}f?(this.emit(ZC.SOURCE_CHANGE),this._player.switchURL(t.url)):this._player.changeDefinition(t,a),e.next=26;break;case 22:return this.emit(f?ZC.SOURCE_CHANGE:ZC.DEFINITION_CHANGE),e.next=25,this._switchDifferentProtocolUrl(l,t.url,s,h);case 25:!f&&this.emit(ZC.AFTER_DEFINITION_CHANGE);case 26:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"_switchDifferentProtocolUrl",value:(r=cy(ay().mark((function e(t,n,r,i){var o,a,s=this;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i&&this._player.media&&(null!==(o=this._player.config)&&void 0!==o&&o.preProcessUrl&&(n=null===(a=this._player.config)||void 0===a?void 0:a.preProcessUrl(n).url),this._player.media.src=n),null==t||!t.length){e.next=4;break}return e.next=4,this._callBeforePlayerInitForUrl(t);case 4:return e.abrupt("return",new jR((function(e){var t=s._player.currentTime,n=function(){s._player.currentTime=t,r&&s._player.once(wS,(function(){s._player.pause()})),e()};uS.os.isAndroid?s.once(bS,(function(){n()})):s.once(wS,(function(){n()})),s._player.play()})));case 5:case"end":return e.stop()}}),e,this)}))),function(e,t,n,i){return r.apply(this,arguments)})},{key:"_switchUrl",value:(n=cy(ay().mark((function e(t,n){var r,i,o,a,s,c,l,u,d;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=this._player.paused&&!this._player.isError,e.next=3,this.prepare(t);case 3:if(e.t0=e.sent,e.t0){e.next=6;break}e.t0={};case 6:if(o=e.t0,a=o.plugins,s=o.options,c=o.isSameProtocol,l=o.useSrc,u=null!==(r=null==s?void 0:s.url)&&void 0!==r?r:t,this._sourceManager.url=u,this._player.config.url=u,!c){e.next=20;break}if(!(d=this._player.switchURL(u,{seamless:null==n?void 0:n.seamless}))||!d.then){e.next=18;break}return e.abrupt("return",d);case 18:e.next=21;break;case 20:return e.abrupt("return",this._switchDifferentProtocolUrl(a,u,i,l));case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"_callBeforePlayerInitForUrl",value:function(e){var t=this;return new jR((function(n){null==e||e.forEach((function(e){e.beforePlayerInit()})),t._player.on(ZC.CANPLAY,(function(){n(void 0)}))}))}}],[{key:"create",value:(t=cy(ay().mark((function t(){var n,r,i,o,a,s,c,l,u=arguments;return ay().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=u.length>0&&void 0!==u[0]?u[0]:{},a=u.length>1?u[1]:void 0,s=new TF({sources:GF.normalize({url:o.url,fallbackUrls:o.fallbackUrls,sources:o.playlist}),url:o.url,defaultSource:o.defaultSource,defaultDefinition:o.defaultDefinition,maxFallbackRound:o.maxFallbackRound}),t.next=5,null==o||null===(n=o.preparePlugins)||void 0===n?void 0:n.call(o,null!==(r=s.url)&&void 0!==r?r:"");case 5:return null!=(c=t.sent)&&null!==(i=c.options)&&void 0!==i&&i.url&&(s.url=null==c||null===(l=c.options)||void 0===l?void 0:l.url),o.url=s.url,t.abrupt("return",new(null!=a?a:e)(Fm(Fm({},o),{},{prepareResult:c,sourceManager:s})));case 9:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)})}]),e}();function DO(e){var t=RF(e).call(e,(function(e,t){return e+t.byteLength}),0),n=new Uint8Array(t),r=0;return e.forEach((function(e){n.set(e,r),r+=e.byteLength})),n}function zO(e,t){return nk(null==e?void 0:e.toFixed(t||4))}var AO,PO,xO=fG,CO=function(e,t,n){return function(e,t,n){t in e?xO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==Su(t)?t+"":t,n),n},FO="ScriptData",IO="Sequence_Header",HO="RawData",OO=[5500,11e3,22e3,44e3],LO="aac",XO="pcma",UO="pcmu",BO="avc",NO="bytevc1",VO=function(){function e(t){var n=this;Py(this,e),CO(this,"type",0),CO(this,"tagSize",0),CO(this,"timestamp",0),CO(this,"duration",0),CO(this,"header",null),CO(this,"body",null),CO(this,"bodyView",null),CO(this,"tailsize",null),WR(t).forEach((function(e){n[e]=t[e]}))}return Hy(e,[{key:"streamType",get:function(){switch(this.type){case 18:return"scriptData";case 9:return"video";case 8:return"audio"}}},{key:"packetType",get:function(){var e;return null==(e=this.bodyView)?void 0:e.packetType}},{key:"frameType",get:function(){var e;return null==(e=this.bodyView)?void 0:e.frameType},set:function(e){this.bodyView.frameType=e}},{key:"dts",get:function(){return this.timestamp}},{key:"pts",get:function(){var e;return((null==(e=this.bodyView)?void 0:e.cts)||0)+this.timestamp}},{key:"ptsTime",get:function(){return this.pts?zO(this.pts/1e3):0}},{key:"dtsTime",get:function(){return this.dts?zO(this.dts/1e3):0}},{key:"sampleView",get:function(){var e,t,n;if("Sequence_Header"!==(null==(e=this.bodyView)?void 0:e.packetType)&&18!==this.type)return{dts:this.timestamp,pts:((null==(t=this.bodyView)?void 0:t.cts)||0)+this.timestamp,data:this._getSampleData(),units:null==(n=this.bodyView)?void 0:n.units}}},{key:"size",get:function(){var e,t;return null==(t=null==(e=this.sampleView)?void 0:e.data)?void 0:t.length}},{key:"data",get:function(){return this._getSampleData()}},{key:"nalTypes",get:function(){var e,t;return null==(t=null==(e=this.bodyView)?void 0:e.units)?void 0:VR(t).call(t,(function(e){return e.type}))}},{key:"nalSizes",get:function(){var e,t;return null==(t=null==(e=this.bodyView)?void 0:e.units)?void 0:VR(t).call(t,(function(e){return e.unit.length}))}},{key:"keyframe",get:function(){return"I"===this.frameType}},{key:"isSample",get:function(){return"scriptData"!==this.streamType&&"Sequence_Header"!==this.packetType}},{key:"isVideo",get:function(){return this.isSample&&"video"===this.streamType}},{key:"isAudio",get:function(){return this.isSample&&"audio"===this.streamType}},{key:"isSqHeader",get:function(){return"Sequence_Header"===this.packetType}},{key:"timescale",get:function(){return 1e3}},{key:"isHevc",get:function(){var e;return"bytevc1"===(null==(e=this.bodyView)?void 0:e.codecType)}},{key:"_getSampleData",value:function(){var e,t;if("audio"===this.streamType)return this.bodyView.sample;var n=(null==(t=this.bodyView)?void 0:Ww(e=t.units).call(e,(function(e){return!e.isSei})))||[],r=RF(n).call(n,(function(e,t){return e+(t.unit.byteLength+4)}),0),i=new Uint8Array(r),o=0;return n.forEach((function(e){i.set([0,0,0,1],o),o+=4,i.set(e.unit,o),o+=e.unit.byteLength})),i}}]),e}(),jO=function(){function e(){Py(this,e)}return Hy(e,null,[{key:"decode",value:function(t){for(var n=[],r=t,i=0,o=t.length;i<o;)if(r[i]<128)n.push(String.fromCharCode(r[i])),++i;else{if(r[i]<192);else if(r[i]<224){if(e._checkContinuation(r,i,1)){var a=(31&r[i])<<6|63&r[i+1];if(a>=128){n.push(String.fromCharCode(65535&a)),i+=2;continue}}}else if(r[i]<240){if(e._checkContinuation(r,i,2)){var s=(15&r[i])<<12|(63&r[i+1])<<6|63&r[i+2];if(s>=2048&&55296!=(63488&s)){n.push(String.fromCharCode(65535&s)),i+=3;continue}}}else if(r[i]<248&&e._checkContinuation(r,i,3)){var c=(7&r[i])<<18|(63&r[i+1])<<12|(63&r[i+2])<<6|63&r[i+3];if(c>65536&&c<1114112){c-=65536,n.push(String.fromCharCode(c>>>10|55296)),n.push(String.fromCharCode(1023&c|56320)),i+=4;continue}}n.push(String.fromCharCode(65533)),++i}return n.join("")}},{key:"_checkContinuation",value:function(e,t,n){var r=e;if(t+n<r.length){for(;n--;)if(128!=(192&r[++t]))return!1;return!0}return!1}}]),e}(),KO=function(){function e(){Py(this,e)}return Hy(e,null,[{key:"parse",value:function(t){if(!(t.length<3)){var n={},r=e._parseValue(new DataView(t.buffer,t.byteOffset,t.byteLength));try{var i=e._parseValue(new DataView(t.buffer,t.byteOffset+r.size,t.byteLength-r.size));n[r.data]=i.data}catch(oK){}return n}}},{key:"_parseValue",value:function(t){var n,r=t.byteLength,i=1,o=!1;switch(t.getUint8(0)){case 0:n=t.getFloat64(1),i+=8;break;case 1:n=!!t.getUint8(1),i+=1;break;case 2:var a=e._parseString(new DataView(t.buffer,t.byteOffset+i,t.byteLength-i));n=a.data,i+=a.size;break;case 3:n={};var s=0;for(9==(16777215&t.getUint32(r-4))&&(s=3);i<r-4;){var c=e._parseObject(new DataView(t.buffer,t.byteOffset+i,t.byteLength-i-s)),l=c.size,u=c.data;if(c.isEnd)break;n[u.name]=u.value,i+=l}if(i<=r-3)9===(16777215&t.getUint32(i-1))&&(i+=3);break;case 8:n={},i+=4;var d=0;for(9==(16777215&t.getUint32(r-4))&&(d=3);i<r-8;){var h=e._parseObject(new DataView(t.buffer,t.byteOffset+i,t.byteLength-i-d)),f=h.size,p=h.data;if(h.isEnd)break;n[p.name]=p.value,i+=f}if(i<=r-3)9===(16777215&t.getUint32(i-1))&&(i+=3);break;case 9:n=void 0,i=1,o=!0;break;case 10:n=[];var v=t.getUint32(1);i+=4;for(var g=0;g<v;g++){var y=e._parseValue(new DataView(t.buffer,t.byteOffset+i,t.byteLength-i)),m=y.data,_=y.size;n.push(m),i+=_}break;case 11:var b=t.getFloat64(i)+6e4*t.getInt16(i+8);n=new Date(b),i+=10;break;case 12:var R=t.getUint32(1);i+=4,n="",R>0&&(n=jO.decode(new Uint8Array(t.buffer,t.byteOffset+i,R))),i+=R;break;default:i=r}return{data:n,size:i,isEnd:o}}},{key:"_parseString",value:function(e){var t=e.getUint16(0),n="";return t>0&&(n=jO.decode(new Uint8Array(e.buffer,e.byteOffset+2,t))),{data:n,size:2+t}}},{key:"_parseObject",value:function(t){if(!(t.byteLength<3)){var n=e._parseString(t),r=e._parseValue(new DataView(t.buffer,t.byteOffset+n.size,t.byteLength-n.size));return{data:{name:n.data,value:r.data},size:n.size+r.size,isEnd:r.isEnd}}}}]),e}(),WO="undefined"!=typeof window,QO=WO&&navigator.userAgent.toLocaleLowerCase(),qO=WO&&OC(QO).call(QO,"firefox"),ZO=WO&&OC(QO).call(QO,"android"),YO=fG,$O=function(){function e(){Py(this,e)}return Hy(e,null,[{key:"parseADTS",value:function(t,n){for(var r=t.length,i=0;i+2<r&&(255!==t[i]||240!=(246&t[i+1]));)i++;if(!(i>=r)){var o=i,a=[],s=(60&t[i+2])>>>2,c=e.FREQ[s];if(!c)throw new Error("Invalid sampling index: ".concat(s));for(var l,u,d=1+((192&t[i+2])>>>6),h=(1&t[i+2])<<2|(192&t[i+3])>>>6,f=e._getConfig(s,h,d),p=f.config,v=f.codec,g=0,y=e.getFrameDuration(c);i+7<r;)if(255===t[i]&&240==(246&t[i+1])){if(r-i<(u=(3&t[i+3])<<11|t[i+4]<<3|(224&t[i+5])>>5))break;l=2*(1&~t[i+1]);var m=zO(n+g*y);a.push({pts:m,dts:m,ptsTime:zO(m/9e4),dtsTime:zO(m/9e4),data:t.subarray(i+7+l,i+u)}),g++,i+=u}else i++;return{skip:o,remaining:i>=r?void 0:t.subarray(i),frames:a,nbFrame:a.length,samplingFrequencyIndex:s,sampleRate:c,objectType:d,channelCount:h,codec:v,config:p,originCodec:"mp4a.40.".concat(d)}}}},{key:"parseAudioSpecificConfig",value:function(t){if(t.length){var n=t[0]>>>3,r=(7&t[0])<<1|t[1]>>>7,i=(120&t[1])>>>3,o=e.FREQ[r];if(!o)throw new Error("Invalid sampling index: ".concat(r));var a=e._getConfig(r,i,n);return{samplingFrequencyIndex:r,sampleRate:o,objectType:n,channelCount:i,config:a.config,codec:a.codec,originCodec:"mp4a.40.".concat(n)}}}},{key:"getFrameDuration",value:function(e){return 1024*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:9e4)/e}},{key:"_getConfig",value:function(e,t,n){var r,i,o=[];return qO?e>=6?(r=5,i=e-3):(r=2,i=e):ZO?(r=2,i=e):(r=n,i=e,e>=6?i=e-3:1===t&&(r=2,i=e)),o[0]=r<<3,o[0]|=(14&e)>>1,o[1]=(1&e)<<7,o[1]|=t<<3,5===r&&(o[1]|=(14&i)>>1,o[2]=(1&i)<<7,o[2]|=8,o[3]=0),{config:o,codec:"mp4a.40.".concat(r)}}},{key:"getSilentFrame",value:function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}}}]),e}(),JO=$O;PO=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],function(e,t,n){t in e?YO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(JO,"symbol"!==Su(AO="FREQ")?AO+"":AO,PO);var eL=fG,tL=function(e,t,n){return function(e,t,n){t in e?eL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==Su(t)?t+"":t,n),n},nL=function(){function e(t){if(Py(this,e),tL(this,"_bytesAvailable"),tL(this,"_bitsAvailable",0),tL(this,"_word",0),!t)throw new Error("ExpGolomb data params is required");this._data=t,this._bytesAvailable=t.byteLength,this._bytesAvailable&&this._loadWord()}return Hy(e,[{key:"_loadWord",value:function(){var e=this._data.byteLength-this._bytesAvailable,t=Math.min(4,this._bytesAvailable);if(0===t)throw new Error("No bytes available");var n=new Uint8Array(4);n.set(this._data.subarray(e,e+t)),this._word=new DataView(n.buffer).getUint32(0),this._bitsAvailable=8*t,this._bytesAvailable-=t}},{key:"skipBits",value:function(e){if(this._bitsAvailable>e)this._word<<=e,this._bitsAvailable-=e;else{e-=this._bitsAvailable;var t=Math.floor(e/8);e-=8*t,this._bytesAvailable-=t,this._loadWord(),this._word<<=e,this._bitsAvailable-=e}}},{key:"readBits",value:function(e){if(e>32)throw new Error("Cannot read more than 32 bits");var t=Math.min(this._bitsAvailable,e),n=this._word>>>32-t;return this._bitsAvailable-=t,this._bitsAvailable>0?this._word<<=t:this._bytesAvailable>0&&this._loadWord(),(t=e-t)>0&&this._bitsAvailable?n<<t|this.readBits(t):n}},{key:"skipLZ",value:function(){var e;for(e=0;e<this._bitsAvailable;++e)if(0!=(this._word&2147483648>>>e))return this._word<<=e,this._bitsAvailable-=e,e;return this._loadWord(),e+this.skipLZ()}},{key:"skipUEG",value:function(){this.skipBits(1+this.skipLZ())}},{key:"readUEG",value:function(){var e=this.skipLZ();return this.readBits(e+1)-1}},{key:"readEG",value:function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}},{key:"readBool",value:function(){return 1===this.readBits(1)}},{key:"readUByte",value:function(){return this.readBits(8)}},{key:"skipScalingList",value:function(e){for(var t=8,n=8,r=0;r<e;r++)0!==n&&(n=(t+this.readEG()+256)%256),t=0===n?t:n}},{key:"readSliceType",value:function(){return this.readUByte(),this.readUEG(),this.readUEG()}},{key:"firstMbInSlice",value:function(){return this.readUByte(),this.readUEG()}}]),e}();function rL(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<24>>>0)+(e[t+1]<<16)+(e[t+2]<<8)+(e[t+3]||0)}var iL=function(){function e(){Py(this,e)}return Hy(e,null,[{key:"parseAnnexB",value:function(e){for(var t=e.length,n=2,r=0;null!==e[n]&&1!==e[n];)n++;if((r=++n+2)>=t)return[];for(var i=[];r<t;)switch(e[r]){case 0:if(0!==e[r-1]){r+=2;break}if(0!==e[r-2]){r++;break}n!==r-2&&i.push(e.subarray(n,r-2));do{r++}while(1!==e[r]&&r<t);r=(n=r+1)+2;break;case 1:if(0!==e[r-1]||0!==e[r-2]){r+=3;break}n!==r-2&&i.push(e.subarray(n,r-2)),r=(n=r+1)+2;break;default:r+=3}return n<t&&i.push(e.subarray(n)),i}},{key:"parseNalu",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;if(!(e.length<4)){for(var n,r=e.length,i=[],o=0;o+t<r;)if(n=rL(e,o),3===t&&(n>>>=8),o+=t,n){if(o+n>r)break;i.push(e.subarray(o,o+n)),o+=n}return i}}},{key:"parseNaluType",value:function(e,t){return null==e?void 0:VR(e).call(e,(function(e){var n=t?e[0]>>>1&63:31&e[0],r=t&&(39===n||40===n),i={type:n,unit:e,isSei:r=r||!t&&6===n};switch(n){case 5:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:if(!t&&5!==n||t&&5===n)break;i.frameType="I"}return t||1!==n||(i.frameType=function(e){var t=new nL(e).readSliceType();return 2===t||4===t||7===t||9===t?"I":0===t||3===t||5===t||8===t?"P":1===t||6===t?"B":void 0}(e)),!t||0!==n&&1!==n||(i.frameType="P"),!t&&n<=5&&(i.firstMbInSlice=new nL(e).firstMbInSlice()),t&&n<=21&&(i.firstMbInSlice=128==(128&e[2])),i}))}},{key:"parseSEI",value:function(e){for(var t=e.length,n=1,r=0,i=0,o="";255===e[n];)r+=255,n++;for(r+=e[n++];255===e[n];)i+=255,n++;if(i+=e[n++],5===r&&t>n+16)for(var a=0;a<16;a++)o+=e[n].toString(16),n++;return{payload:e.subarray(n),type:r,size:i,uuid:o}}},{key:"removeEPB",value:function(e){for(var t=e.byteLength,n=[],r=1;r<t-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(!n.length)return e;var i=t-n.length,o=new Uint8Array(i),a=0;for(r=0;r<i;a++,r++)a===n[0]&&(a++,n.shift()),o[r]=e[a];return o}}]),e}(),oL=function(){function e(){Py(this,e)}return Hy(e,null,[{key:"parseAVCDecoderConfigurationRecord",value:function(t){if(!(t.length<7)){for(var n,r,i=1+(3&t[4]),o=[],a=[],s=6,c=31&t[5],l=0;l<c;l++)if(r=t[s]<<8|t[s+1],s+=2,r){var u=t.subarray(s,s+r);s+=r,o.push(u),n||(n=e.parseSPS(iL.removeEPB(u)))}var d,h=t[s];s++;for(var f=0;f<h;f++)d=t[s]<<8|t[s+1],s+=2,d&&(a.push(t.subarray(s,s+d)),s+=d);return{sps:n,spsArr:o,ppsArr:a,nalUnitSize:i}}}},{key:"parseSPS",value:function(e){var t=new nL(e);t.readUByte();var n=t.readUByte(),r=t.readUByte(),i=t.readUByte();t.skipUEG();var o=420;if(100===n||110===n||122===n||244===n||44===n||83===n||86===n||118===n||128===n||138===n||144===n){var a=t.readUEG();if(a<=3&&(o=[0,420,422,444][a]),3===a&&t.skipBits(1),t.skipUEG(),t.skipUEG(),t.skipBits(1),t.readBool())for(var s=3!==a?8:12,c=0;c<s;c++)t.readBool()&&(c<6?t.skipScalingList(16):t.skipScalingList(64))}t.skipUEG();var l=t.readUEG();if(0===l)t.readUEG();else if(1===l){t.skipBits(1),t.skipUEG(),t.skipUEG();for(var u=t.readUEG(),d=0;d<u;d++)t.skipUEG()}t.skipUEG(),t.skipBits(1);var h=t.readUEG(),f=t.readUEG(),p=t.readBits(1);0===p&&t.skipBits(1),t.skipBits(1);var v,g,y,m,_,b=0,R=0,w=0,G=0;if(t.readBool()&&(b=t.readUEG(),R=t.readUEG(),w=t.readUEG(),G=t.readUEG()),t.readBool()){if(t.readBool())switch(t.readUByte()){case 1:v=[1,1];break;case 2:v=[12,11];break;case 3:v=[10,11];break;case 4:v=[16,11];break;case 5:v=[40,33];break;case 6:v=[24,11];break;case 7:v=[20,11];break;case 8:v=[32,11];break;case 9:v=[80,33];break;case 10:v=[18,11];break;case 11:v=[15,11];break;case 12:v=[64,33];break;case 13:v=[160,99];break;case 14:v=[4,3];break;case 15:v=[3,2];break;case 16:v=[2,1];break;case 255:v=[t.readUByte()<<8|t.readUByte(),t.readUByte()<<8|t.readUByte()]}if(t.readBool()&&t.readBool(),t.readBool()&&(t.readBits(4),t.readBool()&&t.readBits(24)),t.readBool()&&(t.readUEG(),t.readUEG()),t.readBool()){var T=t.readBits(32),k=t.readBits(32);g=t.readBool(),_=(y=k)/(m=2*T)}}for(var S=e.subarray(1,4),E="avc1.",M=0;M<3;M++){var D=S[M].toString(16);D.length<2&&(D="0".concat(D)),E+=D}return{codec:E,profileIdc:n,profileCompatibility:r,levelIdc:i,chromaFormat:o,width:Math.ceil(16*(h+1)-2*(b+R)),height:(2-p)*(f+1)*16-(p?2:4)*(w+G),sarRatio:v,fpsNum:y,fpsDen:m,fps:_,fixedFrame:g}}}]),e}(),aL=function(){function e(){Py(this,e)}return Hy(e,null,[{key:"parseHEVCDecoderConfigurationRecord",value:function(t){if(!(t.length<23)){for(var n,r,i,o,a=1+(3&t[21]),s=[],c=[],l=[],u=23,d=t[22],h=0;h<d;h++){r=63&t[u],i=t[u+1]<<8|t[u+2],u+=3;for(var f=0;f<i;f++)if(o=t[u]<<8|t[u+1],u+=2,o){switch(r){case 32:l.push(t.subarray(u,u+o));break;case 33:var p=t.subarray(u,u+o);n||(n=e.parseSPS(iL.removeEPB(p))),s.push(p);break;case 34:c.push(t.subarray(u,u+o))}u+=o}}return{sps:n,spsArr:s,ppsArr:c,vpsArr:l,nalUnitSize:a}}}},{key:"parseSPS",value:function(e){var t=new nL(e);t.readUByte(),t.readUByte(),t.readBits(4);var n=t.readBits(3);t.readBits(1);var r=this._parseProfileTierLevel(t,n);t.readUEG();var i=t.readUEG(),o=420;i<=3&&(o=[0,420,422,444][i]);var a=0;3===i&&(a=t.readBits(1));var s,c,l,u,d=t.readUEG(),h=t.readUEG(),f=t.readBits(1);(1===f&&(s=t.readUEG(),c=t.readUEG(),l=t.readUEG(),u=t.readUEG()),1===f)&&(d-=(1!==i&&2!==i||0!==a?1:2)*(c+s),h-=(1===i&&0===a?2:1)*(u+l));return{codec:"hev1.1.6.L93.B0",width:d,height:h,chromaFormat:o,bitDepthLumaMinus8:t.readUEG(),bitDepthChromaMinus8:t.readUEG(),generalProfileSpace:r.generalProfileSpace,generalTierFlag:r.generalTierFlag,generalProfileIdc:r.generalProfileIdc,generalLevelIdc:r.generalLevelIdc}}},{key:"_parseProfileTierLevel",value:function(e,t){var n,r,i;(arguments.length>2&&void 0!==arguments[2]?arguments[2]:1)&&(n=e.readBits(2),r=e.readBits(1),i=e.readBits(5)),e.readBits(32),e.readBits(1),e.readBits(1),e.readBits(1),e.readBits(1),e.readBits(16),e.readBits(16),e.readBits(12);for(var o=e.readUByte(),a=[],s=[],c=0;c<t;c++)a[c]=e.readBits(1),s[c]=e.readBits(1);t>0&&e.readBits(2*(8-t));for(var l=0;l<t;l++)0!==a[l]&&(e.readBits(2),e.readBits(1),e.readBits(5),e.readBits(16),e.readBits(16),e.readBits(4),e.readBits(16),e.readBits(16),e.readBits(12)),0!==s[l]&&e.readBits(8);return{generalProfileSpace:n,generalTierFlag:r,generalProfileIdc:i,generalLevelIdc:o}}}]),e}();function sL(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=Ww(t=e.items).call(t,(function(e){return e.isSample&&e.isVideo}))[0],o=Ww(n=e.items).call(n,(function(e){return e.isSample&&e.isAudio}))[0],a=Math.min((null==o?void 0:o.dtsTime)||0,(null==i?void 0:i.dtsTime)||0);return a-=r,e.items.forEach((function(e){e.time=zO(e.dtsTime-a)})),e}function cL(e){var t,n=Ww(t=e.items).call(t,(function(e){return e.isVideo})),r=[],i=-1,o={},a={};return n.forEach((function(e,t){(e.keyframe||t===n.length-1)&&(i=-1===i?e.time:i,r.push({time:e.time,value:zO(e.time-i)}),i=e.time);var s=Math.ceil(e.time+1e-5);o[s]?o[s]++:o[s]=1,a[s]?a[s]+=8*e.size:a[s]=8*e.size})),{bitRates:lL(a),gops:Ww(r).call(r,(function(e){return e.value})),frameRates:lL(o)}}function lL(e){var t=WR(e);return VR(t).call(t,(function(t){return{time:Number(t),value:e[t]}}))}function uL(e){var t,n,r,i,o=RF(t=QR(n=qk(r=Ww(i=QR(e).call(e)).call(i,(function(e){return e.isSample}))).call(r,(function(e,t){return e.time>t.time?1:-1}))).call(n,0,3)).call(t,(function(e,t){return e+t.size}),0);return o>1e3?zO(o/1e3)+"KB":o+"B"}function dL(e){return RF(e).call(e,(function(e,t){return e+t.size}),0)/RF(e).call(e,(function(e,t){return e+t.duration}),0)*8e3}function hL(e){if(null==e?void 0:e.profileIdc)switch(e.profileIdc){case 66:return"66(Baseline)";case 77:return"77(Main)";case 100:return"100(High)"}}var fL=fG,pL=function(e,t,n){return function(e,t,n){t in e?fL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==Su(t)?t+"":t,n),n},vL=function(){function e(){Py(this,e),pL(this,"_nalUnitSize",0),pL(this,"_lastAudio",null),pL(this,"_lastVideo",null),pL(this,"_videoStartDts",-1),pL(this,"_audioStartDts",-1)}return Hy(e,[{key:"parse",value:function(e){for(var t=e.byteLength,n=e.subarray(0,13),r=13,i=Fm(Fm({header:n},this._parseHeader(n)),{},{items:[]});r+11<t;){var o=e.subarray(r,r+11),a=o[1]<<16|o[2]<<8|o[3],s=r+11+a;if(s>t)break;var c=e.subarray(r+11,s),l=new VO(Fm({tagSize:11+a+4,header:o,body:c,tailsize:e.subarray(s,s+4)},this._parseTag(o,c)));l.isAudio&&(this._lastAudio&&(this._lastAudio.duration=l.dts-this._lastAudio.dts),this._lastAudio=l),l.isVideo&&(this._lastVideo&&(this._lastVideo.duration=l.dts-this._lastVideo.dts),this._lastVideo=l),i.items.push(l),r=s+4}var u=sL(i);return u.rates=cL(u),this._addMetadataToFirstKeyFrame(u),u}},{key:"getSnapshoot",value:function(t,n){var r,i,o,a,s=Ww(r=t.items).call(r,(function(e){return 8===e.type}))[0],c=Ww(i=t.items).call(i,(function(e){return 9===e.type}))[0],l=s&&s.bodyView||s,u=c&&c.bodyView||c,d=Ww(o=t.items).call(o,(function(e){return e.isVideo})).length,h=this._getNbFrame(t,"I"),f=this._getNbFrame(t,"P"),p=this._getNbFrame(t,"B"),v=0;if(null==n?void 0:n.gopCacheBuffer){var g,y=(new e).parse(n.gopCacheBuffer),m=Ww(g=y.items).call(g,(function(e){return e.isVideo})),_=null==(a=m[m.length-1])?void 0:a.time;_&&(v=_-n.take/1e3)}return{rates:t.rates,audio:l?cG({},l,this._getExt(t,"audio")):null,video:u?cG({},u,this._getExt(t,"video"),{topThreeFrameSize:uL(t.items),gopCache:zO(v),profile:hL(u.sps),iFrames:h,pFrames:f,bFrames:p,iPercent:zO(h/d*100),pPercent:zO(f/d*100),bPercent:zO(p/d*100)}):null}}},{key:"_addMetadataToFirstKeyFrame",value:function(e){var t,n,r,i=Ww(t=e.items).call(t,(function(e){return 9===e.type}))[0];if(i&&(null==(r=i.bodyView)?void 0:r.sps)){var o=Ww(n=e.items).call(n,(function(e){return e.isVideo&&e.keyframe}))[0];o&&(o.bodyView.sps=i.bodyView.sps,o.bodyView.vpsArr=i.bodyView.vpsArr,o.bodyView.spsArr=i.bodyView.spsArr,o.bodyView.ppsArr=i.bodyView.ppsArr)}}},{key:"_getExt",value:function(e,t){var n,r,i,o=Ww(n=e.items).call(n,(function(e){return e.streamType===t&&e.isSample})),a=Ww(r=e.items).call(r,(function(e){var n;return e.streamType===t&&(null==(n=e.bodyView)?void 0:n.packetType)===IO}))[0];if(!o.length)return 0;var s=o[0],c=o[o.length-1],l=0;return"audio"===t&&(l=a&&1024/(null==(i=a.bodyView)?void 0:i.sampleRate)*1e3),"video"===t&&(l=s.duration),{avgBits:dL(o),startDts:o[0].dts,duration:(c.timestamp-s.timestamp)/1e3,refDuration:l,frameLength:o.length}}},{key:"_getNbFrame",value:function(e,t){var n;return Ww(n=e.items).call(n,(function(e){return e.isVideo&&e.frameType===t})).length}},{key:"_parseHeader",value:function(e){return{hasAudio:!!(e[4]>>2&1),hasVideo:!!(1&e[4])}}},{key:"_parseTag",value:function(e,t){var n,r=31&e[0],i=(e[7]<<24>>>0)+(e[4]<<16)+(e[5]<<8)+e[6];switch(r){case 18:n=cG({packetType:FO},KO.parse(t));break;case 9:n=this._parseVideo(t,i);break;case 8:n=this._parseAudio(t,i)}return{type:r,timestamp:i,bodyView:n}}},{key:"_parseAudio",value:function(e){if(e.length){var t=(240&e[0])>>>4;if(10===t||7===t||8===t){if(10!==t){var n=(12&e[0])>>2,r=(2&e[0])>>1,i=1&e[0];return Fm({format:t,sampleRate:OO[n],sampleSize:r?2:1,channelCount:i+1},this._parseG711(e))}return this._parseAac(e,t)}console.warn("Unsupported sound format: ".concat(t))}}},{key:"_parseG711",value:function(e,t){return{codecType:7===t?XO:UO,sampleRate:8e3,sample:e.subarray(1),packetType:HO}}},{key:"_parseAac",value:function(e,t){if(0===e[1]){var n=e.subarray(2);return Fm(Fm({},JO.parseAudioSpecificConfig(n)),{},{format:t,timescale:1e3,codecType:LO,packetType:IO,sequenceData:[n],frameType:"A"})}if(1===e[1])return{sample:e.subarray(2),format:t,codecType:LO,packetType:HO,frameType:"A"}}},{key:"_parseVideo",value:function(e,t){if(!(e.length<6)){var n=(240&e[0])>>>4,r=15&e[0];if(7===r||12===r){var i=12===r,o=e[1],a=(e[2]<<16|e[3]<<8|e[4])<<8>>8;if(0===o){var s=e.subarray(5),c=i?aL.parseHEVCDecoderConfigurationRecord(s):oL.parseAVCDecoderConfigurationRecord(s);return this._nalUnitSize=c.nalUnitSize,Fm({codecId:r,codecType:i?NO:BO,packetType:IO,timescale:1e3,sequenceData:[s]},c)}if(1===o){var l=iL.parseNalu(e.subarray(5),this._nalUnitSize);if(!l||!l.length)return;var u={dts:t,cts:a,units:l=iL.parseNaluType(l,i)};return 1===n&&(u.keyframe=!0),l.forEach((function(e){var t=e.type,n=e.unit,r=e.frameType;switch(t){case 5:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:if(!i&&5!==t||i&&5===t)break;u.keyframe=!0,u.frameType="I";break;case 6:case 39:case 40:if(!i&&6!==t||i&&6===t)break;u.seis?u.seis.push(iL.parseSEI(iL.removeEPB(n))):u.seis=[iL.parseSEI(iL.removeEPB(n))];break;case 32:if(!i)break;u.vpsArr?u.vpsArr.push(n):u.vpsArr=[n];break;case 7:case 33:if(!i&&7!==t||i&&7===t)break;u.spsArr?u.spsArr.push(n):u.spsArr=[n];var o=iL.removeEPB(n);u.sps=i?aL.parseSPS(o):oL.parseSPS(o);break;case 8:case 34:if(!i&&8!==t||i&&8===t)break;u.ppsArr?u.ppsArr.push(n):u.ppsArr=[n];break;case 1:case 0:u.frameType=r}})),Fm({codecId:r,codecType:i?NO:BO,packetType:HO},u)}}else console.warn("Unsupported codecId: ".concat(r))}}}]),e}(),gL="FLV",yL="MPEG-TS",mL="MP4";function _L(e,t){var n;return VR(n=[e[t],e[t+1],e[t+2],e[t+3]]).call(n,(function(e){return String.fromCharCode(e)})).join("")}var bL=fG,RL=function(e,t,n){return function(e,t,n){t in e?bL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==Su(t)?t+"":t,n),n},wL=Hy((function e(t){var n=t.startIndictor,r=t.packetType,i=t.pid,o=t.afc;Py(this,e),RL(this,"startIndictor",0),RL(this,"pid",0),RL(this,"afc",0),RL(this,"eleInfo",null),RL(this,"packetType",""),this.startIndictor=n,this.packetType=r,this.pid=i,this.afc=o})),GL=function(){function e(t){var n=t.header,r=t.headerObject,i=t.body,o=t.eleInfo,a=t.bodyView,s=t.headerView;Py(this,e),RL(this,"header",null),RL(this,"headerView",null),RL(this,"body",null),RL(this,"bodyView",null),RL(this,"eleInfo",null),RL(this,"duration",0),this.header=n,this.headerView=s||new wL(r),this.eleInfo=o,this.body=i,this.bodyView=a}return Hy(e,[{key:"type",get:function(){var e;return null==(e=this.headerView)?void 0:e.packetType}},{key:"streamType",get:function(){return this.eleInfo?this.eleInfo[this.headerView.pid]:""}},{key:"packetType",get:function(){var e;return null==(e=this.headerView)?void 0:e.packetType}},{key:"frameType",get:function(){var e;return null==(e=this.bodyView)?void 0:e.frameType}},{key:"pts",get:function(){var e;return null==(e=this.bodyView)?void 0:e.pts}},{key:"ptsTime",get:function(){return this.pts?zO(this.pts/9e4):0}},{key:"dtsTime",get:function(){return this.dts?zO(this.dts/9e4):0}},{key:"dts",get:function(){var e;return null==(e=this.bodyView)?void 0:e.dts}},{key:"keyframe",get:function(){return"I"===this.frameType}},{key:"nalTypes",get:function(){var e,t;return null==(t=null==(e=this.bodyView)?void 0:e.units)?void 0:VR(t).call(t,(function(e){return e.type}))}},{key:"nalSizes",get:function(){var e,t;return null==(t=null==(e=this.bodyView)?void 0:e.units)?void 0:VR(t).call(t,(function(e){return e.unit.length}))}},{key:"isSample",get:function(){return"PES"===this.packetType}},{key:"timescale",get:function(){return 9e4}},{key:"isHevc",get:function(){var e,t;return"bytevc1"===(null==(t=null==(e=this.eleInfo)?void 0:e.video)?void 0:t.codecType)}},{key:"sampleView",get:function(){var e;if("PES"===this.type)return{dts:this.dts,pts:this.pts,units:null==(e=this.bodyView)?void 0:e.units,data:this._getSampleData()}}},{key:"data",get:function(){return this._getSampleData()}},{key:"size",get:function(){var e,t;return null==(t=null==(e=this.sampleView)?void 0:e.data)?void 0:t.length}},{key:"isVideo",get:function(){return this.isSample&&"video"===this.streamType}},{key:"isAudio",get:function(){return this.isSample&&"audio"===this.streamType}},{key:"_getSampleData",value:function(){var e,t;if("audio"===this.streamType)return this.bodyView.data;var n=(null==(t=this.bodyView)?void 0:Ww(e=t.units).call(e,(function(e){return!e.isSei&&!e.isDivision})))||[],r=RF(n).call(n,(function(e,t){return e+(t.unit.byteLength+4)}),0),i=new Uint8Array(r),o=0;return n.forEach((function(e){i.set([0,0,0,1],o),o+=4,i.set(e.unit,o),o+=e.unit.byteLength})),i}}]),e}(),TL=function(){function e(){Py(this,e)}return Hy(e,[{key:"parse",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=function(e){for(var t=Math.min(1e3,e.byteLength-564),n=0;n<t;n++)if(71===e[n]&&71===e[n+188]&&71===e[n+376])return n;return-1}(e);if(-1===n)throw new Error("invalid ts file");var r=e.byteLength;r-=(r-n)%188;for(var i,o=[],a=[],s=[],c=0,l=n;l<r;){var u=e.subarray(l,l+188),d=u.subarray(0,4),h=this._parseTsHeader(u.subarray(0,4));l+=188;var f=void 0,p=void 0,v=4,g="";switch((null==h?void 0:h.afc)>1&&(v+=1+Math.min(u[v],183)),h.pid){case 0:v+=1+u[v],f=u.subarray(v),g="PAT",p={pmtId:c=this._parsePAT(f)};break;default:if(h.pid===c){v+=1+u[v],f=u.subarray(v),p=i=this._parsePMT(f),g="PMT";break}if(!i||!i[h.pid])continue;f=u.subarray(v),g="PES"}if(h.packetType=g,"PES"===g){var y="video"===i[h.pid]?a:s;h.startIndictor&&y.length&&(o.push(new GL(Fm(Fm({},this._concatPesChunk(y)),{},{eleInfo:i}))),y="video"===i[h.pid]?a=[]:s=[]),y.push({header:d,headerObject:h,body:f})}else o.push(new GL({header:d,headerObject:h,body:f,eleInfo:i,bodyView:p}))}a.length&&(o.push(new GL(Fm(Fm({},this._concatPesChunk(a)),{},{eleInfo:i}))),a=[]),s.length&&(o.push(new GL(Fm(Fm({},this._concatPesChunk(s)),{},{eleInfo:i}))),s=[]);var m=sL({items:this._parsePES(o)},t);return m.rates=cL(m),m}},{key:"getSnapshoot",value:function(e){var t,n,r,i=e.items,o=e.rates,a=Ww(i).call(i,(function(e){return"video"===e.streamType})),s=Ww(i).call(i,(function(e){return"audio"===e.streamType})),c=qm(i).call(i,(function(e){return"PMT"===e.type})),l=a[0],u=s[0],d=a.length,h=this._getNbFrame(a,"I"),f=this._getNbFrame(a,"P"),p=this._getNbFrame(a,"B"),v={rates:o,video:l?cG({},null==l?void 0:l.bodyView,{codecType:l.eleInfo.video.codecType,frameLength:d,topThreeFrameSize:uL(i),avgBits:dL(a),profile:hL(null==(t=null==l?void 0:l.bodyView)?void 0:t.sps),iFrames:h,pFrames:f,bFrames:p,iPercent:zO(h/d*100),pPercent:zO(f/d*100),bPercent:zO(p/d*100),timescale:9e4},this._getDuration(a,"video")):null,audio:u?cG({},null==u?void 0:u.bodyView,{codecType:u.eleInfo.audio.codecType,frameLength:s.length,timescale:9e4,avgBits:dL(s)},this._getDuration(s,"audio")):null};return c&&(null==(n=c.bodyView)?void 0:n.noSupported)&&(v.noSupported=null==(r=c.bodyView)?void 0:r.noSupported),v}},{key:"getRates",value:function(e){return cL(e)}},{key:"_getDuration",value:function(e,t){var n,r=e[0],i=e[e.length-1],o=0;return"audio"===t&&(o=1024/(null==(n=r.bodyView)?void 0:n.sampleRate)*1e3),"video"===t&&(o=r.duration),{duration:(i.pts-r.pts)/9e4,refDuration:o}}},{key:"_getNbKeyFrame",value:function(e){return Ww(e).call(e,(function(e){var t;return null==(t=e.bodyView)?void 0:t.keyframe})).length}},{key:"_getNbFrame",value:function(e,t){return Ww(e).call(e,(function(e){return e.frameType===t})).length}},{key:"_parseTsHeader",value:function(e){if(71===e[0]){var t={};return t.startIndictor=(64&e[1])>>6,t.pid=((31&e[1])<<8)+e[2],t.afc=(48&e[3])>>4,t}return null}},{key:"_parsePAT",value:function(e){return(31&e[10])<<8|e[11]}},{key:"_parsePMT",value:function(e){var t=0,n=3+((15&e[1])<<8|e[2])-4;e[3],e[4],t=t+11+((15&e[10])<<8|e[11])+1;for(var r,i={video:null,audio:null,noSupported:0};t<n;){r=e[t];var o=(31&e[t+1])<<8|e[t+2];switch(r){case 27:case 36:i.video={elePid:o,streamType:r,codecType:27===r?"avc":"bytevc1"},i[o]="video";break;case 15:i.audio={elePid:o,streamType:r,codecType:"aac"},i[o]="audio";break;default:i.noSupported=r,console.warn("unsupported streamType,",r)}t+=5+((15&e[t+3])<<8|e[t+4])}return i}},{key:"_concatPesChunk",value:function(e){var t=RF(e).call(e,(function(e,t){return e+t.body.byteLength}),0),n=new Uint8Array(t),r=0;return e.forEach((function(e){var t=e.body;n.set(t,r),r+=t.byteLength})),Fm(Fm({},e[0]),{},{body:n,packetType:"PES"})}},{key:"_parsePES",value:function(e){var t=this,n=[];return e.forEach((function(e,r){if(e.isSample){var i=e,o=t._parsePESInternal(i.body)||{},a=o.data,s=o.pts,c=o.dts;if(a){if(e.isVideo&&(i.bodyView=t._parseVideoFrame(a,s,c,"bytevc1"===i.eleInfo.video.codecType),t._lastVideo&&(t._lastVideo.duration=1e3*(e.dtsTime-t._lastVideo.dtsTime)),t._lastVideo=i),e.isAudio){var l=JO.parseADTS(a,s),u=l.frames;return delete l.frames,void(null==u||u.forEach((function(e){var r=new GL(cG({},i,{bodyView:Fm(Fm(Fm({},l),e),{},{frameType:"A"})}));n.push(r),t._lastAudio&&(t._lastAudio.duration=1e3*(r.dtsTime-t._lastAudio.dtsTime)),t._lastAudio=r})))}n.push(e)}}else n.push(e)})),n}},{key:"_parsePESInternal",value:function(e){var t=e[8];if(!(0===t||e.length<t+9)&&1===(e[0]<<16|e[1]<<8|e[2])){var n=(e[4]<<8)+e[5];if(!(n&&n>e.length-6)){var r,i,o=e[7];return 192&o&&(r=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,64&o?r-(i=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2)>54e5&&(r=i):i=r),i=i||r,{data:e.subarray(9+t),pts:r,dts:i}}}}},{key:"_parseVideoFrame",value:function(e,t,n,r){var i=iL.parseAnnexB(e);if(i.length){var o={units:i=iL.parseNaluType(i,r),pts:t,dts:n};return i.forEach((function(e){var t=e.unit,n=e.type,i=e.frameType;switch(n){case 5:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:if(!r&&5!==n||r&&5===n)break;o.keyframe=!0,o.frameType="I";break;case 6:case 39:case 40:if(!r&&6!==n||r&&6===n)break;o.seis?o.seis.push(iL.parseSEI(iL.removeEPB(t))):o.seis=[iL.parseSEI(iL.removeEPB(t))];break;case 32:if(!r)break;o.vpsArr?o.vpsArr.push(t):o.vpsArr=[t];break;case 7:case 33:if(!r&&7!==n||r&&7===n)break;o.spsArr?o.spsArr.push(t):o.spsArr=[t];var a=iL.removeEPB(t);o.sps=r?aL.parseSPS(a):oL.parseSPS(a);break;case 8:case 34:if(!r&&8!==n||r&&8===n)break;o.ppsArr?o.ppsArr.push(t):o.ppsArr=[t];break;case 9:case 35:break;case 0:case 1:o.frameType=i}})),o}}}]),e}(),kL=Wu("Array").entries,SL=or,EL=tt,ML=ue,DL=kL,zL=Array.prototype,AL={DOMTokenList:!0,NodeList:!0},PL=o((function(e){var t=e.entries;return e===zL||ML(zL,e)&&t===zL.entries||EL(AL,SL(e))?DL:t})),xL=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;Py(this,e),this._offset=n,this._buffer=t,this._length=t.byteLength}return Hy(e,[{key:"offset",get:function(){return this._offset},set:function(e){this._offset=e}},{key:"forward",value:function(e){this._offset+=e}},{key:"subarray",value:function(e){return e?this._buffer.subarray(this._offset,this._offset+e):this._buffer.subarray(this._offset,e)}},{key:"slice",value:function(e){for(var t=this._offset,n=this._buffer,r=[],i=0;i<e;i++)r.push(n[t+i]);return new Uint8Array(r)}},{key:"readU8",value:function(){return this._buffer[this._offset]}},{key:"readU16",value:function(){var e=this._offset,t=this._buffer;return t[e]<<8|t[e+1]}},{key:"readU24",value:function(){var e=this._offset,t=this._buffer;return t[e]<<16|t[e+1]<<8|t[e+12]}},{key:"readU32",value:function(){var e=this._offset,t=this._buffer;return t[e]*(1<<24)+65536*t[e+1]+256*t[e+2]+t[e+3]}},{key:"read32",value:function(){var e=this._offset,t=this._buffer;return t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]}}]),e}(),CL=fG,FL=function(e,t,n){return function(e,t,n){t in e?CL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==Su(t)?t+"":t,n),n},IL=function(){function e(t,n,r,i,o,a,s,c,l,u){Py(this,e),FL(this,"dts",0),FL(this,"pts",0),FL(this,"units",null),FL(this,"timescale",0),FL(this,"offset",0),FL(this,"duration",0),FL(this,"data",null),FL(this,"size",0),FL(this,"streamType",""),FL(this,"_frameType",""),FL(this,"isHevc",!1),this.dts=t,this.pts=n,this.units=r,this.timescale=i,this.offset=o,this.data=a,this.size=s,this.duration=c,this.streamType=l,this.isHevc=u}return Hy(e,[{key:"isSample",get:function(){return!0}},{key:"dtsTime",get:function(){return this.dts/this.timescale}},{key:"ptsTime",get:function(){return this.pts/this.timescale}},{key:"frameType",get:function(){var e,t;return"audio"===this.streamType?"A":this._frameType||(null==(t=this.units)?void 0:Ww(e=VR(t).call(t,(function(e){return e.frameType}))).call(e,Boolean)[0])},set:function(e){this._frameType=e}},{key:"nalTypes",get:function(){var e;return null==(e=this.units)?void 0:VR(e).call(e,(function(e){return e.type}))}},{key:"nalSizes",get:function(){var e;return null==(e=this.units)?void 0:VR(e).call(e,(function(e){return e.unit.length}))}},{key:"keyframe",get:function(){return"I"===this.frameType}},{key:"isVideo",get:function(){return"video"===this.streamType}},{key:"isAudio",get:function(){return"audio"===this.streamType}}]),e}(),HL={ftyp:"file type and compatibility",free:"free box",moov:"container for all metadata",mvhd:"movie header,overall declarations",trak:"container for an individual track or stream",tkhd:"track header,overall information about the track",tref:"track reference container",mdia:"container for the media information in a track",mdhd:"media header,oervall information about the media",hdlr:"declares the media type",minf:"media information container",vmhd:"video media header",smhd:"sound media header",dinf:"data information box",stbl:"sample table box",stsd:"sample descriptions(codec types, etc)",stts:"decoding time to sample",ctts:"compostion time to sample",cslg:"compostion to decode timeline mapping",stsc:"sample to chunk",stsz:"sample size",stco:"chunk offset",stss:"sync sample table",sdtp:"independent abd disposable samples",sbgp:"sample to group",mvex:"movid extends box",moof:"movie fragment",mfhd:"movie fragment header",traf:"track fragment",tfhd:"track fragment header",trun:"track fragment run",tfdt:"track fragment decode time",mdat:"media data",meta:"metadata",avc1:"h264 codec info box",hev1:"hevc codec info box"};function OL(e,t){return{isLeading:(12&e[t])>>2,dependsOn:3&e[t],isDenpendedOn:(192&e[t+1])>>6,hasRedundancy:(48&e[t+1])>>4,padding:(14&e[t+1])>>1,nonSync:1&e[t+1],degradationPriority:e[t+2]<<8|e[t+3]}}function LL(e,t){var n;return VR(n=[e[t],e[t+1],e[t+2],e[t+3]]).call(n,(function(e){return String.fromCharCode(e)})).join("")}function XL(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=0;r<e.byteLength;){var i,o=e[r]*(1<<24)+65536*e[r+1]+256*e[r+2]+e[r+3];if(1===o){var a=LL(e,r+4);if("mdat"===a){var s,c=new DataView(e.buffer),l=c.getUint32(r+8)*Math.pow(2,32)+c.getUint32(r+12);console.log(Xm(s="".concat(a,": largesize=")).call(s,l)),o=l}}if(o){var u=e.subarray(r,r+o),d=LL(u,4);n.push({size:o,length:u.byteLength,start:r+t,type:d,sizetypeRepresent:QR(i=u.subarray(0,8)).call(i),body:u.subarray(8),typeDes:HL[d]||""}),r+=o}else r+=4}return n}function UL(e,t,n){if(e)for(var r=0;r<e.length;r++){var i=e[r];if(i.type===t){if(!n)return i;if(n(i))return i}if(i.bodyView instanceof Array){var o=UL(i.bodyView,t,n);if(o){if(!n)return o;if(n(o))return o}}}}function BL(e,t){return UL(e,"trak",(function(e){var n=UL(e.bodyView,"hdlr");return n&&n.bodyView.handlerType===t}))}function NL(e,t,n){var r,i,o,a,s,c,l,u,d,h,f,p,v,g,y,m,_,b,R,w=BL(e,t);if(!w)return null;var G=UL(w.bodyView,"stbl"),T=UL(w.bodyView,"mdhd")||{},k=(null==(u=null==(l=Ww(r=G.bodyView).call(r,(function(e){return"stts"===e.type}))[0])?void 0:l.bodyView)?void 0:PL(u))||[];null==(h=null==(d=Ww(i=G.bodyView).call(i,(function(e){return"stss"===e.type}))[0])?void 0:d.bodyView)||PL(h);var S=(null==(p=null==(f=Ww(o=G.bodyView).call(o,(function(e){return"ctts"===e.type}))[0])?void 0:f.bodyView)?void 0:PL(p))||[],E=(null==(g=null==(v=Ww(a=G.bodyView).call(a,(function(e){return"stsc"===e.type}))[0])?void 0:v.bodyView)?void 0:PL(g))||[],M=(null==(m=null==(y=Ww(s=G.bodyView).call(s,(function(e){return"stsz"===e.type}))[0])?void 0:y.bodyView)?void 0:PL(m))||[],D=(null==(b=null==(_=Ww(c=G.bodyView).call(c,(function(e){return"stco"===e.type}))[0])?void 0:_.bodyView)?void 0:PL(b))||[],z=!!UL(G.bodyView,"hvcC"),A="vide"===t;if(!E.length||!D.length||!M.length)return[];for(var P,x=T.bodyView,C=x.timescale,F=void 0===C?1:C,I=x.duration,H=M.length,O=D.length,L=1,X=0,U=[],B=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=0,i=0,o=0,a=0,s=0,c=[];t=VR(t).call(t,(function(e){return Fm({},e)})),n=VR(n).call(n,(function(e){return Fm({},e)}));for(;o<e;){var l=t[r],u=n[i];l.sampleCount&&(a+=l.sampleDelta),l.sampleCount--,l.sampleCount||r++,u&&(s=u.sampleOffset,u.sampleCount--,u.sampleCount||i++),c.push({dts:a,pts:a+s}),o++}return c}(H,k,S);L<=O;){var N=E[X];(null==N?void 0:N.firstChunk)!==L?(U.push(cG({},P,{firstChunk:L,offset:D[L-1]})),L++):(U.push(Fm(Fm({},N),{},{offset:D[L-1]})),P=N,L++,X++)}var V=VR(M).call(M,(function(e,t){var r=U[0],i=r.offset;r.offset+=e,r.samplesPreChunk--,r.samplesPreChunk||U.shift();var o=B[t],a=n.subarray(i,i+e);if(A){var s=iL.parseNalu(a);return new IL(o.dts,o.pts,iL.parseNaluType(s,z),F,i,a,e,0,"video",z)}return new IL(o.dts,o.pts,null,F,i,a,e,0,"audio")}));RF(V).call(V,(function(e,t){return e?(e.duration=(t.dts-e.dts)/F*1e3,t):t}),null);var j=null==(R=UL(null==w?void 0:w.bodyView,"vide"===t?z?"hvcC":"avcC":"mp4a"))?void 0:R.bodyView;return Fm(Fm(Fm({samples:V,iFrames:Ww(V).call(V,(function(e){return"I"===e.frameType})).length,pFrames:Ww(V).call(V,(function(e){return"P"===e.frameType})).length,bFrames:Ww(V).call(V,(function(e){return"B"===e.frameType})).length},T.bodyView),{},{frameLength:H,duration:I/F,timescale:F},j),null==j?void 0:j.ests)}function VL(e,t){var n=function(e){var t,n,r,i,o=BL(e,"vide"),a=BL(e,"soun"),s=UL(null==o?void 0:o.bodyView,"tkhd"),c=UL(null==a?void 0:a.bodyView,"tkhd"),l=UL(null==o?void 0:o.bodyView,"mdhd"),u=UL(null==a?void 0:a.bodyView,"mdhd"),d=UL(null==o?void 0:o.bodyView,"avcC")||UL(null==o?void 0:o.bodyView,"hvcC"),h=UL(null==a?void 0:a.bodyView,"mp4a"),f=a?Fm(Fm(Fm({type:"audio",trackId:null==(n=c.bodyView)?void 0:n.trackId},u.bodyView),null==h?void 0:h.bodyView),null==(r=null==h?void 0:h.bodyView)?void 0:r.ests):null,p=o?Fm(Fm({type:"video",trackId:null==(i=s.bodyView)?void 0:i.trackId},null==l?void 0:l.bodyView),null==d?void 0:d.bodyView):null;return Oy(t={},(null==f?void 0:f.trackId)||0,f),Oy(t,(null==p?void 0:p.trackId)||0,p),t}(e),r=rz(e).call(e,(function(e){return"moof"===e.type}));if(-1===r)return!1;n.lastVdts=-1,n.lastAdts=-1;for(var i=r;i<e.length&&"moof"===e[i].type;i+=2){var o=e[i];e[i+1].bodyView=jL(o,t,n)}return!0}function jL(e,t,n){var r,i,o=Ww(r=e.bodyView).call(r,(function(e){return"traf"===e.type})),a=Ww(i=VR(o).call(o,(function(e){var t=UL(e.bodyView,"tfhd"),r=UL(e.bodyView,"tfdt"),i=UL(e.bodyView,"trun");if(t&&i){var o=t.bodyView.trackId;return Fm({trackId:o,baseDataOffset:t.bodyView.baseDataOffset,defaultSampleDuration:t.bodyView.defaultSampleDuration,defaultSampleSize:t.bodyView.defaultSampleSize,baseMediaDecodeTime:r.bodyView.baseMediaDecodeTime,dataOffset:i.bodyView.dataOffset,samples:i.bodyView.samples,sampleCount:i.bodyView.sampleCount},n[o])}}))).call(i,Boolean);return VR(a).call(a,(function(e){var n,r,i,o=e.baseDataOffset,a=e.defaultSampleDuration,s=void 0===a?0:a,c=e.defaultSampleSize,l=void 0===c?0:c,u=e.dataOffset,d=e.baseMediaDecodeTime,h=void 0===d?0:d,f=e.samples,p=e.sps,v=e.timescale,g=e.type,y=o+u,m=0;return e.samples=VR(f).call(f,(function(e){var n=t.subarray(y,y+e.size);m+=e.duration||s;var r=h+m;if("video"===g){var i="hev1.1.6.L93.B0"===(null==p?void 0:p.codec),o=iL.parseNalu(n);return y+=e.size,new IL(r,r+(e.ctOffset||0),iL.parseNaluType(o,i),v,y,n,e.size||l,(e.duration||s)/v*1e3,"video",i)}return y+=e.size,new IL(r,r+(e.ctOffset||0),null,v,y,n,e.size||l,(e.duration||s)/v*1e3,"audio")})),e.frameLength=e.samples.length,e.duration=m/v,e.iFrames=Ww(n=e.samples).call(n,(function(e){return"I"===e.frameType})).length,e.pFrames=Ww(r=e.samples).call(r,(function(e){return"P"===e.frameType})).length,e.bFrames=Ww(i=e.samples).call(i,(function(e){return"B"===e.frameType})).length,e}))}var KL=Math.pow(2,32);var WL=an,QL=F,qL=tt,ZL=ue,YL=function(){var e=WL(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},$L=RegExp.prototype,JL=ue,eX=function(e){var t=e.flags;return void 0!==t||"flags"in $L||qL(e,"flags")||!ZL($L,e)?t:QL(YL,e)},tX=RegExp.prototype,nX=o((function(e){return e===tX||JL(tX,e)?eX(e):e.flags})),rX=function(){var e=[];e[3]="ES_Descriptor",e[4]="DecoderConfigDescriptor",e[5]="DecoderSpecificInfo",e[6]="SLConfigDescriptor",this.getDescriptorName=function(t){return e[t]};var t=this,n={};return this.parseOneDescriptor=function(t){var r,i,o=0,a=t.readU8();for(t.forward(1),i=t.readU8(),t.forward(1);128&i;)o=(127&i)<<7,i=t.readU8(),t.forward(1);return o+=127&i,(r=e[a]?new n[e[a]](o):new n.Descriptor(o)).parse(t),r},n.Descriptor=function(e,t){this.tag=e,this.size=t,this.descs=[]},n.Descriptor.prototype.parse=function(e){this.data=QR(e).call(e,this.size),e.forward(this.size)},n.Descriptor.prototype.findDescriptor=function(e){for(var t=0;t<this.descs.length;t++)if(this.descs[t].tag===e)return this.descs[t];return null},n.Descriptor.prototype.parseRemainingDescriptors=function(e){for(var n=e.offset;e.offset<n+this.size;){var r=t.parseOneDescriptor(e);this.descs.push(r)}},n.ES_Descriptor=function(e){n.Descriptor.call(this,3,e)},n.ES_Descriptor.prototype=new n.Descriptor,n.ES_Descriptor.prototype.parse=function(e){if(this.ES_ID=e.readU16(),e.forward(2),this.flags=e.readU8(),e.forward(1),this.size-=3,128&nX(this)?(this.dependsOn_ES_ID=e.readU16(),e.forward(2),this.size-=2):this.dependsOn_ES_ID=0,64&nX(this)){var t,n=e.readU8();e.forward(1),this.URL=VR(t=rT(QR(e).call(e,n))).call(t,(function(e){return String.fromCharCode(e)})),e.forward(n),this.size-=n+1}else this.URL="";32&nX(this)?(this.OCR_ES_ID=e.readU16(),e.forward(2),this.size-=2):this.OCR_ES_ID=0,this.parseRemainingDescriptors(e)},n.ES_Descriptor.prototype.getOTI=function(e){var t=this.findDescriptor(4);return t?t.oti:0},n.ES_Descriptor.prototype.getAudioConfig=function(e){var t=this.findDescriptor(4);if(!t)return null;var n=t.findDescriptor(5);if(n&&n.data){var r=(248&n.data[0])>>3;return 31===r&&n.data.length>=2&&(r=32+((7&n.data[0])<<3)+((224&n.data[1])>>5)),r}return null},n.DecoderConfigDescriptor=function(e){n.Descriptor.call(this,4,e)},n.DecoderConfigDescriptor.prototype=new n.Descriptor,n.DecoderConfigDescriptor.prototype.parse=function(e){this.oti=e.readU8(),e.forward(1),this.streamType=e.readU8(),e.forward(1),this.bufferSize=e.readU24(),e.forward(3),this.maxBitrate=e.readU32(),e.forward(4),this.avgBitrate=e.readU32(),e.forward(4),this.size-=13,this.parseRemainingDescriptors(e)},n.DecoderSpecificInfo=function(e){n.Descriptor.call(this,5,e)},n.DecoderSpecificInfo.prototype=new n.Descriptor,n.SLConfigDescriptor=function(e){n.Descriptor.call(this,6,e)},n.SLConfigDescriptor.prototype=new n.Descriptor,this};function iX(e){var t,n,r,i=qm(t=e.descs).call(t,(function(e){return 4===e.tag}));i&&(n=qm(r=i.descs).call(r,(function(e){return 5===e.tag})));var o=cG({},i);return delete o.descs,o.config=(null==n?void 0:n.data.length)?rT(null==n?void 0:n.data):[],o}function oX(e){return VR(e).call(e,(function(e){return e.toString(16)})).join("")}function aX(e){var t=e.body,n={},r=t[0],i=new xL(t);if(i.forward(4),n.systemId=oX(QR(i).call(i,16)),i.forward(16),r>0){var o=i.readU32();n.kids=[];var a=0;for(i.forward(4);a<o;)n.kids.push(oX(QR(i).call(i,16))),i.forward(16),a++}var s,c=i.readU32();return i.forward(4),n.dataSize=c,n.data=QR(i).call(i,c),n.dataToBase64=btoa((s=n.data,VR(s).call(s,(function(e){return String.fromCharCode(e)})).join(""))),n}var sX=Math.pow(2,32);var cX=Math.pow(2,32);function lX(e){var t=e.body,n={samples:[]},r=new xL(t);n.version=r.readU8(),r.forward(1),n.flags=QR(r).call(r,3);var i,o,a,s,c=(i=nX(n),o=JC(i,3),a=o[1],{dataOffsetPresent:!!(1&(s=o[2])),firstSampleFlagsPresent:!!(4&s),sampleDurationPresent:!!(1&a),sampleSizePresent:!!((2&a)>>1),sampleFlagsPresent:!!((4&a)>>2),sampleCompositionTimeOffsetPresent:!!((8&a)>>3)}),l=c.dataOffsetPresent,u=c.firstSampleFlagsPresent,d=c.sampleDurationPresent,h=c.sampleSizePresent,f=c.sampleFlagsPresent,p=c.sampleCompositionTimeOffsetPresent;n.trFlags=c,r.forward(3),n.sampleCount=r.readU32(),r.forward(4),l&&(n.dataOffset=r.readU32(),r.forward(4)),u&&(n.firstSampleFlags=OL(t,r.offset),r.forward(4));for(var v=0;v<n.sampleCount;){var g={};d&&(g.duration=r.readU32(),r.forward(4)),h&&(g.size=r.readU32(),r.forward(4)),f&&(g.flags=OL(t,r.offset),r.forward(4)),p&&(g.ctOffset=r.readU32(),r.forward(4)),n.samples.push(g),v++}return n}function uX(e){var t=XL(e instanceof ArrayBuffer?new Uint8Array(e):e,0);if(dX(t),!VL(t,e)){var n,r=UL(t,"mdat");if(r)r.bodyView=Ww(n=[Fm({type:"video"},NL(t,"vide",e)),Fm({type:"audio"},NL(t,"soun",e))]).call(n,(function(e){return!!e.samples}))}return t}function dX(e){var t=0;e.forEach((function(e){switch(e.type){case"ftyp":case"styp":e.bodyView=function(e){var t=e.body,n=e.length,r=new xL(t),i={compatible:[]};i.major=_L(t,0),r.forward(4),i.version=r.readU32(),r.forward(4);for(var o=r.offset;o<n-8;)i.compatible.push(_L(t,o)),o+=4;return i}(e);break;case"moov":case"trak":case"mvex":case"mdia":case"minf":case"dinf":case"moof":case"traf":case"stbl":e.bodyView=XL(e.body,e.start+8),dX(e.bodyView);break;case"stsd":var n=function(e){var t=e.body,n=e.start,r=new xL(t);r.forward(4);var i=r.readU32();return r.forward(4),{entryCount:i,childData:XL(r.subarray(),n+8+8)}}(e),r=n.entryCount,i=n.childData;e.entryCount=r,e.bodyView=i,dX(e.bodyView);break;case"mvhd":e.bodyView=(d=e.body,h=new xL(d),f={},h.forward(4),f.createTime=h.readU32(),h.forward(4),f.modifyTime=h.readU32(),h.forward(4),f.timescale=h.readU32(),h.forward(4),f.duration=h.readU32(),h.forward(4),f.rate=h.readU32(),h.forward(4),h.forward(2),h.forward(70),f.nextTrackId=h.readU32(),f);break;case"tkhd":e.bodyView=function(e){var t=e.body,n=new xL(t,4),r={},i=n.readU8();r.version=i,1===i?n.forward(16):n.forward(8),r.trackId=n.readU32(),n.forward(4),1===i?(r.duration=n.readU32()*cX,n.forward(4),r.duration+=n.readU32()):r.duration=n.readU32();var o=t.byteLength;return o-=8,n.offset=o,r.width=n.readU32()>>16,n.forward(4),r.height=n.readU32()>>16,r}(e);break;case"mehd":e.bodyView=function(e){var t,n=e.body,r=new xL(n);if(r.forward(4),1===n[0]){var i=r.readU32();r.forward(4),t=i*(1<<30)*2+r.readU32()}else t=r.readU32();return{fragDuration:t}}(e);break;case"mdhd":e.bodyView=function(e){var t=e.body,n={},r=new xL(t),i=t[0];return r.forward(4),1===i?(r.forward(16),n.timescale=r.readU32(),r.forward(4),n.duration=r.readU32()*KL,r.forward(4),n.duration+=r.readU32()):(r.forward(8),n.timescale=r.readU32(),r.forward(4),n.duration=r.readU32()),n}(e);break;case"hdlr":e.bodyView=function(e){return{handlerType:_L(e.body,8)}}(e);break;case"trex":e.bodyView=function(e){var t=e.body,n={},r=new xL(t);return r.forward(4),n.trackId=r.readU32(),r.forward(4),n.defaultSdescriptionIndex=r.readU32(),r.forward(4),n.defaultSampleDuration=r.readU32(),r.forward(4),n.defaultSampleSize=r.readU32(),r.forward(4),n.defaultSampleFlags=OL(t,r.offset),n}(e);break;case"trun":e.bodyView=lX(e),t=e.bodyView.samples.length;break;case"tfdt":e.bodyView=function(e){var t=e.body,n=new xL(t),r=0;return n.forward(4),1===t[0]?(r=n.readU32()*sX,n.forward(4),r+=n.readU32()):r=n.readU32(),{baseMediaDecodeTime:r}}(e);break;case"avc1":case"hvc1":case"hev1":e.bodyView=function(e){var t=e.body,n=e.start,r=new xL(t);return r.forward(78),XL(r.subarray(),n+78+8)}(e),dX(e.bodyView);break;case"mp4a":e.bodyView=function(e){var t=e.body,n=QR(t).call(t,28),r=(new rX).parseOneDescriptor(new xL(QR(n).call(n,12),0)),i=(null==r?void 0:r.getAudioConfig)&&r.getAudioConfig();return{channelCount:t[17],samplesize:t[19],sampleRate:t[24]<<8|t[25],objectType:i,codec:"mp4a.40."+i,ests:iX(r)}}(e),e.bodyView&&(e.bodyView.codecType="aac");break;case"avcC":e.bodyView=function(e){var t=e.body,n={spsArr:[],ppsArr:[]},r=new xL(t);n.configVersion=t[0],n.avcProfile=t[1],n.profileComptibility=t[2],n.avcLevel=t[3],r.forward(4),r.forward(1);var i=31&QR(r).call(r,1);r.forward(1);for(var o=0;o<i;o++){var a=r.readU16();r.forward(2),n.spsArr.push(r.subarray(a)),r.forward(a)}var s=QR(r).call(r,1);r.forward(1);for(var c=0;c<s;c++){var l=r.readU16();r.forward(2),n.ppsArr.push(r.subarray(l)),r.forward(l)}return n}(e);var o=e.bodyView;if(o.codecType="avc",!(null==o?void 0:o.sps)){var a=o.spsArr[0],s=iL.removeEPB(a);o.sps=oL.parseSPS(s)}break;case"hvcC":e.bodyView=function(e){var t=e.body;if(!(t.length<23)){t[21];for(var n,r,i,o=[],a=[],s=[],c=23,l=t[22],u=0;u<l;u++){n=63&t[c],r=t[c+1]<<8|t[c+2],c+=3;for(var d=0;d<r;d++)if(i=t[c]<<8|t[c+1],c+=2,i){switch(n){case 32:s.push(t.subarray(c,c+i));break;case 33:o.push(t.subarray(c,c+i));break;case 34:a.push(t.subarray(c,c+i))}c+=i}}return{spsArr:o,ppsArr:a,vpsArr:s}}}(e);var c=e.bodyView;if(c.codecType="bytevc1",!(null==c?void 0:c.sps)){var l=c.spsArr[0],u=iL.removeEPB(l);c.sps=aL.parseSPS(u)}break;case"btrt":e.bodyView=function(e){var t=e.body,n=new xL(t),r=n.readU32();n.forward(4);var i=n.readU32();return n.forward(4),{bufferSizeDB:r,maxBitrate:i,avgBitrate:n.readU32()}}(e);break;case"stts":e.bodyView=function(e){var t=e.body,n=new xL(t);n.forward(4);var r=n.readU32(),i=[];n.forward(4);for(var o=0;o<r;o++){var a=n.readU32();n.forward(4);var s=n.readU32();n.forward(4),i.push({sampleCount:a,sampleDelta:s})}return{entries:i,count:i.length}}(e),PL(e.bodyView).length&&(t=PL(e.bodyView)[0].sampleCount);break;case"ctts":e.bodyView=function(e){var t=e.body,n=new xL(t);n.forward(4);var r=n.readU32(),i=[];n.forward(4);for(var o=0;o<r;o++){var a=n.readU32();n.forward(4);var s=n.readU32();n.forward(4),i.push({sampleCount:a,sampleOffset:s})}return{entries:i,count:i.length}}(e);break;case"cslg":e.bodyView=function(e){var t,n,r,i,o=e.body,a=new xL(o);return a.forward(4),t=a.read32(),a.forward(4),n=a.read32(),a.forward(4),r=a.read32(),a.forward(4),i=a.read32(),a.forward(4),{compositionToDTSShift:t,leastDecodeToDisplayDelta:n,greatestDecodeToDisplayDelta:r,compositionStartTime:i,compositionEndTime:a.read32()}}(e);break;case"stss":e.bodyView=function(e){var t=e.body,n=new xL(t);n.forward(4);var r=[],i=n.readU32();n.forward(4);for(var o=0;o<i;o++){var a=n.readU32();r.push(a),n.forward(4)}return{entries:r,count:r.length}}(e);break;case"stsz":e.bodyView=function(e){var t=e.body,n=new xL(t);n.forward(4);var r=[],i=n.readU32();n.forward(4);var o=n.readU32();if(n.forward(4),0===i)for(var a=0;a<o;a++){var s=n.readU32();r.push(s),n.forward(4)}else console.warn("parse stsz, sample size not equal 0");return{entries:r,count:r.length}}(e);break;case"stsc":e.bodyView=function(e){var t=e.body,n=new xL(t);n.forward(4);var r=[],i=n.readU32();n.forward(4);for(var o=0;o<i;o++){var a=n.readU32();n.forward(4);var s=n.readU32();n.forward(4);var c=n.readU32();n.forward(4),r.push({firstChunk:a,samplesPreChunk:s,sampleDesIndex:c})}return{entries:r,count:r.length}}(e);break;case"stco":e.bodyView=function(e){var t=e.body,n=new xL(t);n.forward(4);var r=n.readU32(),i=[];n.forward(4);for(var o=0;o<r;o++){var a=n.readU32();i.push(a),n.forward(4)}return{entries:i,count:i.length}}(e);break;case"sdtp":e.bodyView=function(e,t){var n=e.body,r=new xL(n);r.forward(4);for(var i,o,a,s,c=[],l=0;l<t;l++){var u=r.readU8();i=(192&u)>>6,o=(48&u)>>4,a=(12&u)>>2,s=3&u,c.push({isLeading:i,dependsOn:o,isDenpendedOn:a,hasRedundancy:s}),r.forward(1)}return{entries:c}}(e,t);break;case"mfhd":e.bodyView=function(e){var t=e.body,n=new xL(t);return n.forward(4),{seqNumber:n.readU32()}}(e);break;case"tfhd":e.bodyView=function(e){var t=e.body,n=new xL(t);n.forward(1);var r=QR(n).call(n,3),i=r[0]<<16|r[1]<<8|r[2],o={flags:r},a={baseDataOffsetPresent:!!(1&i),sampleDescriptionIndexPresent:!!(2&i),defaultSampleDurationPresent:!!(8&i),defaultSampleSizePresent:!!(16&i),defaultSampleFlagsPresent:!!(32&i),durationIsEmpty:!!(65536&i),defaultBaseIsMoof:!!(131072&i)};if(o.tfFlags=a,n.forward(3),o.trackId=n.readU32(),a.baseDataOffsetPresent){n.forward(4);var s=n.readU32();n.forward(4);var c=n.readU32();o.baseDataOffset=s<<32|c}else o.baseDataOffset=0,console.warn("base data offset not detected in tfhd");return a.sampleDescriptionIndexPresent&&(n.forward(4),o.sampleDescriptionIndex=n.readU32()),a.defaultSampleDurationPresent&&(n.forward(4),o.defaultSampleDuration=n.readU32()),a.defaultSampleSizePresent&&(n.forward(4),o.defaultSampleSize=n.readU32()),a.defaultSampleFlagsPresent&&(n.forward(4),o.defaultSampleFlags=n.readU32()),o}(e);break;case"pssh":e.bodyView=aX(e)}var d,h,f}))}var hX=function(){function e(){Py(this,e)}return Hy(e,[{key:"parse",value:function(e){return uX(e)}},{key:"parseV2",value:function(e,t){var n,r,i,o,a,s,c=Ww(e).call(e,(function(e){return"mdat"===e.type})),l=[],u=null==(r=null==(n=c[0])?void 0:n.bodyView)?void 0:Ww(r).call(r,(function(e){return"video"===e.type}))[0],d=null==(o=null==(i=c[0])?void 0:i.bodyView)?void 0:Ww(o).call(o,(function(e){return"audio"===e.type}))[0],h=Math.min((null==(a=null==d?void 0:d.samples[0])?void 0:a.dtsTime)||0,(null==(s=null==u?void 0:u.samples[0])?void 0:s.dtsTime)||0);c.forEach((function(e){e.bodyView.forEach((function(e){e.samples.forEach((function(e){e.time=zO(e.dtsTime-h),l.push(e)}))}))}));var f={items:qk(l).call(l,(function(e,t){return e.time>t.time?1:-1}))};return this._addMetadataToFirstKeyFrame(u),f.rates=cL(f),f}},{key:"getSnapshoot",value:function(e){return function(e){var t,n,r,i,o,a,s=Ww(e).call(e,(function(e){return"mdat"===e.type}));if(!s.length){var c=BL(e,"vide"),l=BL(e,"soun"),u=null==(n=UL(null==c?void 0:c.bodyView,"mdhd"))?void 0:n.bodyView,d=(null==(r=UL(null==c?void 0:c.bodyView,"avcC"))?void 0:r.bodyView)||(null==(i=UL(null==c?void 0:c.bodyView,"hvcC"))?void 0:i.bodyView),h=null==(o=UL(null==l?void 0:l.bodyView,"mdhd"))?void 0:o.bodyView,f=null==(a=UL(null==l?void 0:l.bodyView,"mp4a"))?void 0:a.bodyView;try{return{video:Fm(Fm({},u),{},{duration:(null==u?void 0:u.duration)/u.timescale},d),audio:Fm(Fm(Fm({},h),{},{duration:(null==h?void 0:h.duration)/h.timescale},f),f.ests)}}catch(oK){}return{}}var p=RF(t=VR(s).call(s,(function(e){return e.bodyView}))).call(t,(function(e,t){return Xm(e).call(e,t)}),[]),v=RF(p).call(p,(function(e,t){var n,r=t.type,i=t.frameLength,o=t.iFrames,a=t.pFrames,s=t.bFrames,c=t.duration;return e[r]?(e[r].frameLength+=i,e[r].iFrames+=o,e[r].pFrames+=a,e[r].bFrames+=s,e[r].duration+=c,e):(e[r]=cG({},t),e[r].refDuration||(e[r].refDuration=null==(n=t.samples[0])?void 0:n.duration),e)}),{}),g=v.video;if(g){var y=g.frameLength,m=g.iFrames,_=g.pFrames,b=g.bFrames;g.iPercent=zO(m/y*100),g.pPercent=zO(_/y*100),g.bPercent=zO(b/y*100)}return v}(e)}},{key:"_addMetadataToFirstKeyFrame",value:function(e){var t;if(e){var n=Ww(t=e.samples).call(t,(function(e){return e.keyframe}))[0];n&&(n.sps=e.sps,n.vpsArr=e.vpsArr,n.spsArr=e.spsArr,n.ppsArr=e.ppsArr)}}}]),e}(),fX=.2,pX=40,vX=.3,gX=.5,yX=.1,mX=function(){function e(){Py(this,e)}return Hy(e,[{key:"detect",value:function(e){var t=null==e?void 0:qm(e).call(e,(function(e){return e.isSample&&"video"===e.streamType})),n=null==e?void 0:qm(e).call(e,(function(e){return e.isSample&&"audio"===e.streamType}));if(t&&n){var r,i,o,a=t.pts-n.pts,s=zO(a/t.timescale);if(a/t.timescale>=fX)return[{description:Xm(r=Xm(i=Xm(o="【音视频首帧gap差距过大】视频首帧pts: ".concat(t.pts,", 音频首帧pts: ")).call(o,n.pts,", delta: ")).call(i,a,"(")).call(r,s,"s)"),tips:"".concat(s>10?"可能造成无法起播问题":"")}]}}}]),e}(),_X=function(){function e(){Py(this,e)}return Hy(e,[{key:"detect",value:function(e){var t=null==e?void 0:Ww(e).call(e,(function(e){return e.isSample&&"video"===e.streamType})),n=null==e?void 0:Ww(e).call(e,(function(e){return e.isSample&&"audio"===e.streamType})),r=!!e[0]&&e[0]instanceof VO;return[this._checkBreak(t,"video"),this._checkBreak(n,"audio"),r&&this._checkConsecutiveFrameBreak(null==e?void 0:Ww(e).call(e,(function(e){return e.isSample})))]}},{key:"_checkBreak",value:function(e,t){var n=e.length;if(n)for(var r=0;r<n-1;r++){var i,o,a,s;if(Math.abs(e[r].dtsTime-e[r+1].dtsTime)>gX)return{description:Xm(i=Xm(o=Xm(a=Xm(s="【".concat(t,"时间戳发生跳变】,当前帧dts: ")).call(s,e[r].dts,", time:")).call(a,e[r].time,", 后一帧dts: ")).call(o,e[r+1].dts,", time:")).call(i,e[r+1].time)}}}},{key:"_checkConsecutiveFrameBreak",value:function(e){var t=e.length;if(t)for(var n=0;n<t-1;n++)if(Math.abs(e[n].dtsTime-e[n+1].dtsTime)>yX){var r,i,o,a,s,c=e[n],l=e[n+1];return{description:Xm(r=Xm(i=Xm(o=Xm(a=Xm(s="【前后帧dts差距过大】,当前帧(".concat(c.streamType,")dts: ")).call(s,c.dts,", time:")).call(a,c.time,", 后一帧(")).call(o,l.streamType,")dts: ")).call(i,l.dts,", time:")).call(r,l.time),tips:"可能造成播放画面卡顿或者声音卡顿"}}}}]),e}(),bX=function(){function e(){Py(this,e)}return Hy(e,[{key:"detect",value:function(e){return[this._checkKeyFrame(e),this._checkAudioFrameDataFull(e)]}},{key:"_checkKeyFrame",value:function(e){var t=null==e?void 0:Ww(e).call(e,(function(e){return e.isSample&&"video"===e.streamType}))[0];if(t&&"I"!==t.frameType)return{description:"【视频首帧非关键帧】",tips:"可能播放花屏或者报解码错误"}}},{key:"_checkAudioFrameDataFull",value:function(e){var t=null==e?void 0:Ww(e).call(e,(function(e){return e.isSample&&"audio"===e.streamType})),n=t.length;if(n)for(var r=0;r<n;r++){var i,o=t[r].data;if((null==o?void 0:o.length)<pX)return{description:Xm(i="【音频帧数据较少】 pts=".concat(t[r].pts,", time=")).call(i,t[r].time),tips:"可能由于音频数据原因导致解码报错"}}}}]),e}(),RX=function(){function e(){Py(this,e)}return Hy(e,[{key:"detect",value:function(e,t){return[this._hasVideoMetadata(e),this._hasAudioMetadata(e),this._checkRepeatedSps(e),this._metadataOnlyInSequeceHeader(e,t)]}},{key:"_hasVideoMetadata",value:function(e){var t,n=null==(t=null==e?void 0:Ww(e).call(e,(function(e){return"video"===e.streamType}))[0])?void 0:t.bodyView;if(n&&!n.sps)return{description:"【未检测到视频metadata信息】",tips:"可能视频无法播放或者报解码错误"}}},{key:"_hasAudioMetadata",value:function(e){var t,n=null==(t=null==e?void 0:Ww(e).call(e,(function(e){return"audio"===e.streamType}))[0])?void 0:t.bodyView;if(n&&(!n.config||!n.sampleRate||!n.channelCount))return{description:"【未检测到音频metadata信息】",tips:"可能视频无法播放或者报解码错误"}}},{key:"_checkRepeatedSps",value:function(e){var t,n=null==e?void 0:Ww(e).call(e,(function(e){return"video"===e.streamType}))[0],r=(null==(t=null==n?void 0:n.bodyView)?void 0:t.spsArr)||[];if(n&&r.length>1&&r[0].join(",")!==r[1].join(","))return{description:"【关键帧前包含多个sps信息】"}}},{key:"_metadataOnlyInSequeceHeader",value:function(e,t){var n;if("FLV"===t){var r=null==e?void 0:qm(e).call(e,(function(e){return e.keyframe}));if(r){var i=r.isHevc;return-1===KR(n=r.nalTypes).call(n,i?33:7)?{description:"【sps、pps信息只存在于Sequence Header中】"}:void 0}}}}]),e}(),wX=function(){function e(){Py(this,e)}return Hy(e,[{key:"detect",value:function(e){var t=null==e?void 0:qm(e).call(e,(function(e){return e.isSample&&"video"===e.streamType}));if(t)return t.isHevc?[{id:1,description:"【H265编码格式】",tips:"对于不支持H265解码的设备无法播放"}]:void 0}}]),e}(),GX=function(){function e(){Py(this,e)}return Hy(e,[{key:"detect",value:function(e){if(null==e?void 0:qm(e).call(e,(function(e){return e.isSample&&"B"===e.frameType})))return[{description:"【存在B帧】"}]}}]),e}(),TX=function(){function e(){Py(this,e)}return Hy(e,[{key:"detect",value:function(e){var t=null==e?void 0:Ww(e).call(e,(function(e){return e.isSample&&"video"===e.streamType})),n=null==e?void 0:Ww(e).call(e,(function(e){return e.isSample&&"audio"===e.streamType}));if(t.length&&n.length){var r,i,o=t[t.length-1].ptsTime-t[0].ptsTime,a=n[n.length-1].ptsTime-n[0].ptsTime;if(Math.abs(o-a)>=vX)return[{description:Xm(r=Xm(i="【音视频时长存在差距】, video=".concat(o,"s, audio=")).call(i,a,"s, delta=")).call(r,zO(o-a),"s"),tips:"可能造成播放画面卡顿或者声音卡顿"}]}}}]),e}(),kX=function(){function e(){Py(this,e)}return Hy(e,[{key:"detect",value:function(e){var t=null==e?void 0:Ww(e).call(e,(function(e){return e.isSample&&"video"===e.streamType})),n=null==e?void 0:Ww(e).call(e,(function(e){return e.isSample&&"audio"===e.streamType}));if(t.length||n.length)return t.length&&n.length?void 0:[{description:"【流开始只包含".concat(t.length?"音频":"视频","】"),tips:"可能播放没有声音或者没有画面"}]}}]),e}();function SX(e,t){var n,r,i;return Ww(n=RF(r=VR(i=[new wX,new mX,new _X,new bX,new RX,new TX,new GX,new kX]).call(i,(function(n){return n.detect(e,t)}))).call(r,(function(e,t){return Xm(e).call(e,t)}),[])).call(n,Boolean)}var EX=fG,MX=function(e,t,n){return function(e,t,n){t in e?EX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==Su(t)?t+"":t,n),n},DX=function(){function e(t){var n=this;Py(this,e),MX(this,"_opts",null),MX(this,"_controller",null),MX(this,"_reader",null),MX(this,"_loading",!1),MX(this,"_chunks",[]),MX(this,"_readStream",(function(e,t){var r=0;n._reader=e.getReader();var i=n._chunks;return function e(){var o;return null==(o=n._reader)?void 0:o.read().then((function(n){var o=n.value,a=n.done;return i.push(o),t(r,o),a?jR.resolve(DO(Ww(i).call(i,Boolean))):(r+=o.byteLength,e())}))}()})),this._opts=t}return Hy(e,[{key:"request",value:function(){var e=this,t=this._opts,n=t.url,r=t.onProgress,i=t.contentType,o=void 0===i?"ArrayBuffer":i,a=t.loadTimeout,s=void 0===a?5e3:a,c=t.headers;return this._controller=new AbortController,jR.race([fetch(n,{signal:this._controller.signal,headers:c}),new jR((function(t,n){setTimeout((function(){var t;e._loading||(n({code:0,message:"timeout"}),null==(t=e._controller)||t.abort())}),s)}))]).then((function(t){return t.ok&&t.status>=200&&t.status<300?(e._loading=!0,t):jR.reject({code:t.status,message:t.statusText})})).then((function(t){switch(o){case"TEXT":return t.text();case"JSON":return t.json();case"ArrayBuffer":return r?e._readStream(t.clone().body,r):t.arrayBuffer()}})).catch((function(t){if(e._loading=!1,"AbortError"!==t.name)return jR.reject({code:t.code||0,message:t.message})}))}},{key:"cancel",value:function(){var e,t;try{null==(e=this._reader)||e.cancel(),null==(t=this._controller)||t.abort(),this._reader=null,this._controller=null}catch(oK){}}}]),e}(),zX=function(){function e(){Py(this,e)}var t;return Hy(e,[{key:"parse",value:(t=cy(ay().mark((function e(t,n){var r,i,o,a,s,c,l,u,d,h,f,p=this;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=[],this._loader=new DX(Fm(Fm({url:t},n),{},{onProgress:function(e,t){l.push(t),e>n.probeSize&&p._loader.cancel()}})),e.next=4,this._loader.request();case 4:return u=new vL,d=u.parse(DO(l)),h=u.getSnapshoot(d),f=null==(r=h.video)?void 0:r.sps,e.abrupt("return",{codec:null==(i=h.video)?void 0:i.codecType,codecStr:null==f?void 0:f.codec,width:null==f?void 0:f.width,height:null==f?void 0:f.height,vDration:null==(o=null==h?void 0:h.video)?void 0:o.duration,aDuration:null==(a=null==h?void 0:h.audio)?void 0:a.duration,sampleRate:null==(s=null==h?void 0:h.audio)?void 0:s.sampleRate,channelCount:null==(c=null==h?void 0:h.audio)?void 0:c.channelCount,views:d,snap:h});case 9:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})}]),e}(),AX={exports:{}};AX.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||fG(e,t,{enumerable:!0,get:r})},n.r=function(e){void 0!==pG&&eC&&fG(e,eC,{value:"Module"}),fG(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==Su(e)&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),fG(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},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=0)}([function(e,t,n){function r(e,t){var n=WR(e);if(lG){var r=lG(e);t&&(r=Ww(r).call(r,(function(t){return uG(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){return(i="function"==typeof pG&&"symbol"==Su(vG)?function(e){return Su(e)}:function(e){return e&&"function"==typeof pG&&e.constructor===pG&&e!==pG.prototype?"symbol":Su(e)})(e)}function o(e,t,n){return t in e?fG(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.r(t),n.d(t,"m3u8Parser",(function(){return d})),n.d(t,"mpdParser",(function(){return g}));var a=/EXT(?:-X-)?([^:]+):?(.*)$/,s=/([^,="]+)((="[^"]+")|(=[^,]+))*/g;function c(e){var t;return RF(t=e.split("-")).call(t,(function(e,t){return e+(e?t.charAt(0)+QR(t).call(t,1).toLowerCase():t.toLowerCase())}),"")}function l(e){if(!/^#EXT/.test(e)&&/^\s*#/.test(e))return null;var t,n,l=a.exec(e);return l?(t=c(l[1]),n=function(e,t){if(!e)return null;var n=VR(t=e.match(s)).call(t,(function(e){return function(e){var t=dk(e).call(e).replace("=","|").split("|");if(2==t.length)return o({},c(t[0]),t[1].replace(/("|')/g,""));var n=nk(t[0]);return gw(n)?t[0]:n}(e)}));return 1===n.length?n[0]:0===Ww(n).call(n,(function(e){return"object"===i(e)})).length?n:RF(n).call(n,(function(e,t){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){o(e,t,n[t])})):dG?hG(e,dG(n)):r(Object(n)).forEach((function(t){fG(e,t,uG(n,t))}))}return e}({},e,{},t)}),{})}(l[2])):(t="url",n=e),o({},t,n)}function u(e,t){if(/^https?/.test(e)||/^data:/.test(e)||/^sdk:/.test(e))return e;for(t=QR(n=t.split("/")).call(n,0,-1),e=e.split("/");e.length;){var n,r=e.shift();-1==KR(t).call(t,r)&&t.push(r)}return t.join("/")}var d=function(e,t,n){var r,i,o;if(!e||!t)return{error:1,msg:"invalid input"};var a,s=Ww(r=VR(i=Ww(o=e.split("\n")).call(o,Boolean)).call(i,(function(e){return l(dk(e).call(e))}))).call(r,Boolean);if(!s.length)return{error:1,msg:"invalid m3u8"};a=0!==Ww(s).call(s,(function(e){return!!e.streamInf})).length?{master:!0,m3u8Url:t,levels:[],medias:[]}:{master:!1,m3u8Url:t,duration:0,startSN:0,endSN:0,segments:[],live:!0};try{a=function(e,t,n){for(var r=t.master,i=e.length,o=0,a=0,s=0,c=0,l=0,d=-1,h=0;h<i;h++){var f=e[h];for(var p in f){var v=f[p];switch(v&&v.uri&&(v.url=u(v.uri,t.m3u8Url)),p){case"inf":var g={start:a,end:a+(Array.isArray(v)?v[0]:v),cc:o,sn:s+c};d>=0&&(g.keyIndex=d),c++,a=g.end,t.segments.push(g);break;case"start":a=v;break;case"discontinuity":o++;break;case"mediaSequence":s=v;break;case"streamInf":l++,v.levelId=l,t.levels.push(v);break;case"media":t.medias.push(v);break;case"endlist":t.live=!1;break;case"key":d++,t.key?t.key.push(v):t.key=[v];break;case"url":var y=r?t.levels:t.segments;if(!y.length)throw new Error("invalid m3u8");r?y[l-1].url=u(v,t.m3u8Url):y[c-1].url=u(v,t.m3u8Url);break;default:v&&(t[p]=v)}}n&&(t=n(f,t))}return r||(t.startSN=s,t.endSN=s+c-1,t.duration=a),t}(s,a,n)}catch(c){return{error:1,msg:c.message}}return a},h=/\s*(<\/?[^>]+>)/,f=/\s*(?:<\/?([^\s>]+))?\s*([^>]+)*(?:\/?>)?/,p=/\s*([^=]+)="([^"]+)"/g;function v(e,t){for(var n,r,i,o=[],a=e.length,s=0;s<a;s++)if((n=e[s]).closed)if(r=o.pop(),"pureValue"!==n.tagName){if(r&&r.tagName===n.tagName?i=o.pop():(i=r,r=n),!i){o.push(r);break}var c=r,l=c.tagName,u=c.attrs,d=i.attrs[l];t&&(u=t(l,u)),i.attrs[l]=d?Array.isArray(d)?Xm(d).call(d,u):[d,u]:u,o.push(i)}else r.attrs?r.attrs.value=n.attrs.value:r.attrs=n.attrs,o.push(r);else o.push(n);var h,f,p,v=o[0];return v?"undefined"!=v.tagName?(h={},f=v.tagName,p=v.attrs,f in h?fG(h,f,{value:p,enumerable:!0,configurable:!0,writable:!0}):h[f]=p,h):v.tagName:null}var g=function(e,t){if(!e)return{error:1,msg:"invalid input"};try{var n,r,i;return v(Ww(n=VR(r=Ww(i=e.split(h)).call(i,Boolean)).call(r,(function(e){return function(e){var t,n,r=e.match(f),i={},o=(t=r&&r[1])?RF(n=t.split("_")).call(n,(function(e,t){return e?e+=t.charAt(0).toUpperCase()+QR(t).call(t,1):e=t.charAt(0).toLowerCase()+QR(t).call(t,1)}),""):"";if(r&&r[1]&&r[2]){for(var a,s={};null!=(a=p.exec(r[2]));)s[a[1]]=a[2];return"?xml"===o?null:(i.tagName=o,i.attrs=s,i.closed=/\/$/.test(r[2]),i)}return r?/^<\//.test(r[0])?(i.tagName=o,i.closed=!0,i):/^</.test(r[0])?(i.tagName=o,i.attrs={},i):(i.tagName="pureValue",i.attrs={value:r[2]},i.closed=!0,i):null}(e)}))).call(n,Boolean),t)}catch(o){return{error:1,msg:o.message}}}}]);var PX=AX.exports;function xX(e){return CX.apply(this,arguments)}function CX(){return CX=cy(ay().mark((function e(t){var n,r,i,o=arguments;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new DX(Fm(Fm({url:t},o.length>1&&void 0!==o[1]?o[1]:{}),{},{contentType:"TEXT"})),e.next=4,n.request();case 4:return r=e.sent,i=PX.m3u8Parser(r,t,(function(e,t){var n;if(!e.url||!/^\//.test(e.url))return t;var r=e.url,i=t.segments[t.segments.length-1];return i.url=QR(n=i.url.split("/")).call(n,0,3).join("/")+r,t})),e.abrupt("return",i);case 7:case"end":return e.stop()}}),e)}))),CX.apply(this,arguments)}var FX,IX=function(){function e(){Py(this,e)}var t;return Hy(e,[{key:"parse",value:(t=cy(ay().mark((function e(t,n){var r,i,o,a,s,c,l,u,d,h,f,p,v,g,y,m;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,xX(t,n);case 2:if(!(l=e.sent).master){e.next=7;break}return e.next=6,xX(l.levels[0].url);case 6:l=e.sent;case 7:if(null==l?void 0:l.segments.length){e.next=9;break}throw new Error("invalid m3u8");case 9:u=[],d=n.nbSegment,h=0,f=ay().mark((function e(){var t;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new DX(Fm(Fm({url:l.segments[h].url},n),{},{onProgress:function(e,r){u.push(r),e>n.probeSize&&t.cancel()}})),e.next=3,t.request();case 3:d--,h++;case 5:case"end":return e.stop()}}),e)}));case 13:if(!d){e.next=17;break}return e.delegateYield(f(),"t0",15);case 15:e.next=13;break;case 17:return p=new Uint8Array(DO(Ww(u).call(u,Boolean))),v=new TL,g=v.parse(p),y=v.getSnapshoot(g),m=null==(r=y.video)?void 0:r.sps,e.abrupt("return",{codec:null==(i=y.video)?void 0:i.codecType,codecStr:null==m?void 0:m.codec,width:null==m?void 0:m.width,height:null==m?void 0:m.height,vDration:null==(o=null==y?void 0:y.video)?void 0:o.duration,aDuration:null==(a=null==y?void 0:y.audio)?void 0:a.duration,sampleRate:null==(s=null==y?void 0:y.audio)?void 0:s.sampleRate,channelCount:null==(c=null==y?void 0:y.audio)?void 0:c.channelCount,views:g,snap:y});case 23:case"end":return e.stop()}}),e)}))),function(e,n){return t.apply(this,arguments)})}]),e}(),HX=function(){function e(){Py(this,e)}var t;return Hy(e,[{key:"parse",value:(t=cy(ay().mark((function e(t,n){var r,i,o,a,s,c,l,u,d,h,f,p,v,g,y,m,_,b,R;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=new DX(Fm(Fm({url:t},n),{},{contentType:"ArrayBuffer",headers:{Range:"bytes=0-1499"}})),d=[],e.next=4,u.request();case 4:return h=e.sent,f=new Uint8Array(h),p=(new hX).parse(f),v=qm(p).call(p,(function(e){return"mdat"===e.type})),(g=qm(p).call(p,(function(e){return"moov"===e.type})))?(d.push(g.start),d.push(g.start+g.size)):v&&d.push(v.start+v.size),u=new DX(Fm(Fm({url:t},n),{},{contentType:"ArrayBuffer",headers:{Range:Xm(r="bytes=".concat(d[0],"-")).call(r,d[1]||"")}})),e.next=13,u.request();case 13:return y=e.sent,m=new hX,_=m.parse(y),b=m.getSnapshoot(_),R=null==(i=b.video)?void 0:i.sps,e.abrupt("return",{codec:null==(o=b.video)?void 0:o.codecType,codecStr:null==R?void 0:R.codec,width:null==R?void 0:R.width,height:null==R?void 0:R.height,vDration:null==(a=null==b?void 0:b.video)?void 0:a.duration,aDuration:null==(s=null==b?void 0:b.audio)?void 0:s.duration,sampleRate:null==(c=null==b?void 0:b.audio)?void 0:c.sampleRate,channelCount:null==(l=null==b?void 0:b.audio)?void 0:l.channelCount,views:m.parseV2(_,!0),snap:b});case 19:case"end":return e.stop()}}),e)}))),function(e,n){return t.apply(this,arguments)})}]),e}(),OX=function(){function e(){Py(this,e)}var t;return Hy(e,[{key:"parseUrl",value:(t=cy(ay().mark((function e(t){var n,r,i,o,a=arguments;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=cG({timeout:5e3,probeSize:8e4,nbSegment:1},r=a.length>1&&void 0!==a[1]?a[1]:{}),!/flv/.test(t)){e.next=9;break}return e.next=5,(new zX).parse(t,r);case 5:i=e.sent,o=gL,e.next=20;break;case 9:if(!/m3u8?/.test(t)){e.next=16;break}return e.next=12,(new IX).parse(t,r);case 12:i=e.sent,o=yL,e.next=20;break;case 16:return e.next=18,(new HX).parse(t,r);case 18:i=e.sent,o=mL;case 20:return i.exceps=Ww(n=SX(i.views.items,o)).call(n,(function(e){return 1!==e.id})),e.abrupt("return",i);case 22:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})}]),e}(),LX=function(e){var t,n;return{retryCount:0,disconnectRetryCount:null!==(t=null==e||null===(n=e.flv)||void 0===n?void 0:n.retryCount)&&void 0!==t?t:void 0}},XX=function(e){var t;return{options:{flv:Fm(Fm({},LX(e)),null!==(t=null==e?void 0:e.flv)&&void 0!==t?t:{})},module:jF.PluginFlv}},UX=function(e){var t;return{options:{flv:Fm(Fm({preferMMS:!0},LX(e)),null!==(t=null==e?void 0:e.flv)&&void 0!==t?t:{})},module:jF.PluginFlv}},BX=function(e,t){var n;return{options:{hls:Fm({retryCount:0,pollRetryCount:0,allowedStreamTrackChange:!1},null!==(n=null==e?void 0:e.hls)&&void 0!==n?n:{})},module:t?jF.PluginHlsJs:jF.PluginHls}},NX=function(){return{options:{mediaType:"xg-video",innerDegrade:1,codecType:t.H264},module:jF.PluginXgvideo,afterLoad:function(e){e.isSupported()&&e.setDecodeCapacity({preloadDecoder:t.H264,wasmFallbackToAsm:!1,reuseWasmDecoder:!1,disabledWhenErrorOccur:!1})}}},VX=function(){return{options:{mediaType:"xg-video",innerDegrade:1,codecType:t.H265},module:jF.PluginXgvideo,afterLoad:function(e){e.isSupported()&&e.setDecodeCapacity({preloadDecoder:t.H265,wasmFallbackToAsm:!1,reuseWasmDecoder:!1})}}};function jX(e){return KX.apply(this,arguments)}function KX(){return(KX=cy(ay().mark((function e(t){return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.codec){e.next=2;break}return e.abrupt("return",t.codec);case 2:if(t.degradation!==n.SoftFirst||!t.url){e.next=6;break}return e.next=5,WX(t.url);case 5:return e.abrupt("return",e.sent);case 6:return e.abrupt("return","unknown");case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function WX(e){return QX.apply(this,arguments)}function QX(){return(QX=cy(ay().mark((function e(n){var r,i;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(new OX).parseUrl(n);case 3:if(r=e.sent,"bytevc1"!==(i=r.codec)){e.next=9;break}return e.abrupt("return",t.H265);case 9:if("avc"!==i){e.next=11;break}return e.abrupt("return",t.H264);case 11:return e.abrupt("return","unknown");case 14:return e.prev=14,e.t0=e.catch(0),console.error("detect codec error: ",e.t0),e.abrupt("return","unknown");case 18:case"end":return e.stop()}}),e,null,[[0,14]])})))).apply(this,arguments)}function qX(e,t){return ZX.apply(this,arguments)}function ZX(){return(ZX=cy(ay().mark((function e(i,o){return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.decodeType!==r.Software){e.next=2;break}return e.abrupt("return",!0);case 2:if("unknown"!==o){e.next=4;break}return e.abrupt("return",!1);case 4:return e.next=6,jX(i);case 6:if(e.sent!==t.H265){e.next=12;break}if(!uS.isHevcSupported()){e.next=10;break}return e.abrupt("return",!1);case 10:if(i.degradation!==n.SoftFirst){e.next=12;break}return e.abrupt("return",!0);case 12:return e.abrupt("return",!1);case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function YX(e){return RF(e).call(e,(function(e,t){return cG(e,null==t?void 0:t.options)}),{})}var $X=YM,JX=function(e){return e[e.INVALID_PARAMETER=210]="INVALID_PARAMETER",e[e.EMPTY_RTM_FALLBACK_PARAMETER=211]="EMPTY_RTM_FALLBACK_PARAMETER",e[e.INVALID_LOGGER=220]="INVALID_LOGGER",e}(JX||{}),eU=Fm(Fm({},JX),QM),tU=Fm(Fm({},qM),{},(Oy(FX={},210,{messageTextKey:"INVALID_PARAMETER",level:WM.Fatal}),Oy(FX,211,{messageTextKey:"EMPTY_RTM_FALLBACK_PARAMETER",level:WM.Warn}),Oy(FX,220,{messageTextKey:"INVALID_LOGGER",level:WM.Warn}),FX));function nU(e,t){return new $X(Fm({errorCode:e},tU[e]),t)}var rU=NaN,iU="[object Symbol]",oU=/^\s+|\s+$/g,aU=/^[-+]0x[0-9a-f]+$/i,sU=/^0b[01]+$/i,cU=/^0o[0-7]+$/i,lU=Ow,uU="object"==Su(i)&&i&&i.Object===Object&&i,dU="object"==("undefined"==typeof self?"undefined":Su(self))&&self&&self.Object===Object&&self,hU=uU||dU||Function("return this")(),fU=Object.prototype.toString,pU=Math.max,vU=Math.min,gU=function(){return hU.Date.now()};function yU(e){var t=Su(e);return!!e&&("object"==t||"function"==t)}function mU(e){return"symbol"==Su(e)||function(e){return!!e&&"object"==Su(e)}(e)&&fU.call(e)==iU}function _U(e){if("number"==typeof e)return e;if(mU(e))return rU;if(yU(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=yU(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(oU,"");var n=sU.test(e);return n||cU.test(e)?lU(QR(e).call(e,2),n?2:8):aU.test(e)?rU:+e}var bU=function(e,t,n){var r,i,o,a,s,c,l=0,u=!1,d=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function f(t){var n=r,o=i;return r=i=void 0,l=t,a=e.apply(o,n)}function p(e){var n=e-c;return void 0===c||n>=t||n<0||d&&e-l>=o}function v(){var e=gU();if(p(e))return g(e);s=setTimeout(v,function(e){var n=t-(e-c);return d?vU(n,o-(e-l)):n}(e))}function g(e){return s=void 0,h&&r?f(e):(r=i=void 0,a)}function y(){var e=gU(),n=p(e);if(r=arguments,i=this,c=e,n){if(void 0===s)return function(e){return l=e,s=setTimeout(v,t),u?f(e):a}(c);if(d)return s=setTimeout(v,t),f(c)}return void 0===s&&(s=setTimeout(v,t)),a}return t=_U(t)||0,yU(n)&&(u=!!n.leading,o=(d="maxWait"in n)?pU(_U(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h),y.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=c=i=s=void 0},y.flush=function(){return void 0===s?a:g(gU())},y},RU=o(bU),wU=Fm(Fm({},ZC),{},{TIME_SHIFT_CHANGE:"timeShiftChange",REFRESH_CLICK:"refreshClick"});function GU(){return(new DOMParser).parseFromString('<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M10 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 TU=FE.POSITIONS,kU=function(e){UM(n,e);var t=VM(n);function n(){return Py(this,n),t.apply(this,arguments)}return Hy(n,[{key:"afterCreate",value:function(){this.config.disable||(this.appendChild(".xgplayer-icon",this.icons.refresh),this._initEvents())}},{key:"registerIcons",value:function(){return{refresh:{icon:GU,class:"xgplayer-refresh-svg"}}}},{key:"destroy",value:function(){this.unbind(["touchend","click"],this._handleRefresh)}},{key:"render",value:function(){var e=this.player.config.i18nManager;return'\n <xg-icon class="veplayer-refresh">\n <div class="xgplayer-icon">\n </div>\n <div class="xg-tips" lang-key="refresh">'.concat(e.getText("REFRESH"),"</div>\n </xg-icon>\n ")}},{key:"_handleRefresh",value:function(e){var t=this.player;if(t){var n,r;if(e.preventDefault(),e.stopPropagation(),t.addClass("xgplayer-is-enter"),t.pause(),t)t.emit(wU.REFRESH_CLICK),null===(n=this.player)||void 0===n||null===(n=n.config)||void 0===n||null===(n=n.veplayer)||void 0===n||n.retry(),null===(r=this.player)||void 0===r||null===(r=r.plugins)||void 0===r||null===(r=r.error)||void 0===r||r.hideError();t.once(wS,(function(){t.removeClass("xgplayer-is-enter")}))}}},{key:"_initEvents",value:function(){this._handleRefresh=RU(this._handleRefresh.bind(this),200);var e="mobile"===uS.device?"touchend":"click";this.bind(e,this._handleRefresh),this.show()}}],[{key:"pluginName",get:function(){return"refresh"}},{key:"defaultConfig",get:function(){return{position:TU.CONTROLS_LEFT,index:1,disable:!1}}}]),n}(FE),SU=o(uo.f("asyncIterator")),EU=o(ie.URLSearchParams),MU=Hw;Pn({target:"Number",stat:!0,forced:Number.parseInt!=MU},{parseInt:MU});var DU=o(ie.Number.parseInt),zU=tk;Pn({target:"Number",stat:!0,forced:Number.parseFloat!=zU},{parseFloat:zU});var AU=o(ie.Number.parseFloat);function PU(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),fG(e,r.key,r)}}function xU(e,t,n){return t&&PU(e.prototype,t),n&&PU(e,n),e}function CU(e,t,n){return t in e?fG(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FU(e,t){var n=WR(e);if(lG){var r=lG(e);t&&(r=Ww(r).call(r,(function(t){return uG(e,t).enumerable}))),n.push.apply(n,r)}return n}function IU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?FU(Object(n),!0).forEach((function(t){CU(e,t,n[t])})):dG?hG(e,dG(n)):FU(Object(n)).forEach((function(t){fG(e,t,uG(n,t))}))}return e}void 0===pG||(vG||(pG.iterator=pG("Symbol.iterator"))),void 0===pG||(SU||(pG.asyncIterator=pG("Symbol.asyncIterator")));var HU="xgplayer_device_id",OU="xgplayer_user_id",LU=function(e){if(!document.cookie)return null;for(var t=document.cookie.split(";"),n=0,r=t.length;n<r;n++){var i,o=t[n];if(KR(i=t[n]).call(i,e)>=0)return o.split("=")[1]||null}},XU=function(e){return String(Math.floor(Math.random()*Math.pow(10,e)))},UU=function(){var e=LU(HU);if(e)return e;var t=XU(11);return document.cookie=HU+"="+t+";max-age=31536000;path=/",t},BU=function(){var e=LU(OU);if(e)return e;var t=XU(12);return document.cookie=OU+"="+t+";max-age=31536000;path=/",t};var NU={get device(){return NU.os.isPc?"pc":"mobile"},get browser(){var e=function(){var e=navigator.userAgent.toLowerCase(),t={},n={IE:window.ActiveXObject||"ActiveXObject"in window,Chrome:KR(e).call(e,"chrome")>-1&&KR(e).call(e,"safari")>-1,Firefox:KR(e).call(e,"firefox")>-1,Opera:KR(e).call(e,"opera")>-1,Safari:KR(e).call(e,"safari")>-1&&-1==KR(e).call(e,"chrome"),Edge:KR(e).call(e,"edge")>-1,QQBrowser:/qqbrowser/.test(e),WeixinBrowser:/MicroMessenger/i.test(e)};for(var r in n)if(n[r]){var i="";if("IE"===r)i=e.match(/(msie\s|trident.*rv:)([\w.]+)/)[2];else if("Chrome"===r){for(var o in navigator.mimeTypes)"application/360softmgrplugin"===navigator.mimeTypes[o].type&&(r="360");var a=e.match(/chrome\/([\d.]+)/);i=a?a[1]:"-1"}else if("Firefox"===r){var s=e.match(/firefox\/([\d.]+)/);i=s?s[1]:"-1"}else if("Opera"===r){var c=e.match(/opera\/([\d.]+)/);i=c?c[1]:"-1"}else if("Safari"===r){var l=e.match(/version\/([\d.]+)/);i=l?l[1]:"-1"}else if("Edge"===r){var u=e.match(/edge\/([\d.]+)/);i=u?u[1]:"-1"}else if("QQBrowser"===r){var d=e.match(/qqbrowser\/([\d.]+)/);i=d?d[1]:"-1"}t.type=r,t.versions=Ow(i)}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,r=/(?:Android)/.test(e),i=/(?:Firefox)/.test(e),o=/(?:iPad|PlayBook)/.test(e)||r&&!/(?:Mobile)/.test(e)||i&&/(?:Tablet)/.test(e),a=/(?:iPhone)/.test(e)&&!o;return{isTablet:o,isPhone:a,isAndroid:r,isPc:!(a||r||n||o),isSymbian:n,isWindowsPhone:t,isFireFox:i}},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 r=t[n];if(r.r.test(e))return r.s}return"unknown"}};function VU(){return Date.now()}function jU(e){var t="unknown";return"string"!=typeof e?t:KR(e).call(e,".flv")>-1?"flv":KR(e).call(e,".m3u8")>-1?"m3u8":KR(e).call(e,".mp4")>-1?"mp4":KR(e).call(e,".sdp")>-1?"rts":t}function KU(e){return"undefined"!=typeof MediaSource?+MediaSource.isTypeSupported("video/mp4; codecs="+e):0}function WU(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.flvlive)return e.plugins.flvlive;if(e.plugins.hlslive)return e.plugins.hlslive;if(e.plugins.hlsvod)return e.plugins.hlsvod;if(e.plugins.hlslivemobile)return e.plugins.hlslivemobile;if(e.plugins.flvlivemobile)return e.plugins.flvlivemobile}return e.newHls||e.newFlv||e.__core__||e.flv}var QU={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"},qU=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}xU(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&&GC(t).call(t,"//")?window.location.protocol+t:t,e.live_stream_session_id=function(e,t,n){var r=new EU(e.split("?")[1]);return r.get(t)||r.get(n)}(e.cdn_play_url,"_session_id","session_id"),e.play_format=jU(e.cdn_play_url),e.timestamp=VU();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(KTe){}return e}(),r=n.cpu_core_number,i=n.memory_usage,o=n.network_downlink;e.cpu_core_number=r,e.memory_usage=i,e.network_downlink=o,e.muted=+this._player.muted,cG(e,IU({},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,IU({},e)))},e}(),ZU=function(){return void 0!==navigator.onLine?navigator.onLine?(e=navigator.connection)&&(e.effectiveType||e.type)||NU.device:"none":"unknown";var e},YU=["play","playing","pause","ended","seeking","seeked","timeupdate","waiting","canplay","canplaythrough","durationchange","ratechange","volumechange","loadeddata"],$U=function(){function e(e){this.options=e,this.logger=new JU(e),this.restart=this.restart.bind(this),this.bindUrlChange()}var t=e.prototype;return t.restart=function(e){this.destroy("string"!=typeof e&&Boolean(e)),this.logger=new JU(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=cG(this.options.ext||{},e),this.logger&&this.logger.updateExt(e)},t.sendLog=function(e){this.logger.sendLog(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}(),JU=function(){function e(e){if(!e.player)throw new Error("option player is necessary");this.options=cG({},e,function(e){return{device_id:e.device_id||UU(),user_id:e.user_id||BU(),error_report_stop:"boolean"!=typeof e.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 qU(this.options),this.init(),this.started=!1,this.destroyed=!1,this.completed=!1,this.firstFrameViewed=!1,this.cacheRtcStats={},this.cachePlaying={}}xU(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,r=void 0!==n.hlsOps;this.commonParams=IU({os:NU.operation_os},function(e){var t,n=e.player,r=n.config.mediaType;return IU({project_key:e.project_key,live_sdk_version:WU(n)||n.hlsOps?"2":"-1",player_sdk_version:n.version,logger_version:"1.1.0-alpha.18",product_line:e.product_line,user_id:e.user_id,device_id:e.device_id,logger_id:XU(12),app_name:e.app_name,cdn_ip:e.cdn_ip,is_wasm:+(!!r&&"video"!==r),review_is_live:n.config.isLive?2:1,isSupportedH265:KU("hev1.1.6.L93.B0,mp4a.40.2"),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:NU.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&&GC(t=n.config.url).call(t,"//")?window.location.protocol+n.config.url:n.config.url,play_format:jU(n.config.url),codec_support:-1},e.ext)}(t)),this.log=cG({},{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:-1,drop_percent:-1,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"},rtc_network:{event_key:"rtc_network"}});var i=this;for(var o in this.log){var a=function(t){fG(e.log[o],t,{get:function(){return null==this["_"+t]?i.commonParams[t]:this["_"+t]},set:function(e){this["_"+t]=e},enumerable:!0})};for(var s in this.commonParams)a(s);r&&fG(this.log[o],"m3u8",{get:function(){if(n.__core__){var e=n.__core__.m3u8Text;return e?QR(e).call(e,0,25e4):""}return""},enumerable:!0}),fG(this.log[o],"volume",{get:function(){if(n&&n.video)return n.volume||0},enumerable:!0}),fG(this.log[o],"access",{get:function(){return ZU()},enumerable:!0})}},t.sendLog=function(e){for(var t in this.commonParams)void 0===e[t]&&(e[t]=this["_"+t]||this.commonParams[t]);this.logmanager.push(e)},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=WU(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=VU(),this.logmanager.push(this.log.start_play,!0))},t.initWindowListener=function(){"pc"===NU.device?window.addEventListener("beforeunload",this.handleUserLeave):"mobile"===NU.device&&(window.addEventListener("beforeunload",this.handleUserLeave),window.addEventListener("pagehide",this.handleUserLeave))},t.removeWindowListener=function(){"pc"===NU.device?window.removeEventListener("beforeunload",this.handleUserLeave):"mobile"===NU.device&&(window.removeEventListener("beforeunload",this.handleUserLeave),window.removeEventListener("pagehide",this.handleUserLeave))},t.initEvt=function(){var e=this,t=this.player;YU.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,r=e.pts,i=e.type,o=e.meta,a=e.sei,s=e.decodeFps,c=e.url,l=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(r);break;case"core.metadataparsed":this.handleMetaDataLoaded(i,o);break;case"core.sei":this.handleSEIParsed(a);break;case"core.lowdecode":this.commonParams.is_wasm&&(cG(this.log.play_low_decode,e||{}),this.log.play_low_decode.decode_fps=s,this.log.play_low_decode.timestamp=VU(),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(cG({url:c,state:l},this.log.rtcstatechange));break;case"core.rtcnetwork":this.logmanager.push(cG(e,this.log.rtc_network))}},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,QR(Array.prototype).call(e,0))}catch(oK){}t.destroyed||t.handlePlayerComlete()}},t.handleTTFB=function(e){var t=e||{},n=t.end,r=t.elapsed,i=t.responseUrl,o=t.url;this.log.first_frame.ttfb=r||-1,this.log.first_frame.ttfb_end=n||0,this.log.first_frame.is_redirect=+(o!==i),this.log.play_result.is_redirect=this.log.first_frame.is_redirect},t.handleUrlChange=function(e){this.logmanager.push(cG(this.log.play_url_change,{url:e,timestamp:VU()}))},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=VU(),this.logmanager.push(this.log.source_opened)},t.handleBufferAppend=function(){this.log.source_updateend.timestamp=VU(),this.logmanager.push(this.log.source_updateend)},t.handlePlayerPause=function(){this.log.pause.timestamp=VU(),this.logmanager.push(this.log.pause,!0),this.stallEnd()},t.handlePlayerError=function(e){this.errorNumber=1;var t=e.errorType,n=e.errorCode;cG(this.log.play_error,IU({timestamp:VU(),code:e.httpCode||n||("parse"===t?31:21),info:e.message,detail:Jx(e)},this.videoSize)),this.logmanager.push(this.log.play_error,!0),this.destroyed||(0===this.log.first_frame.first_frame_view&&(cG(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=VU()),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))),this.options.error_report_stop?this.destroy(!0):this.updatePlayStopParams())},t.handlePlayerLoadStream=function(e){var t=e.url,n=e.offersdp,r=e.sessionId;if("string"==typeof t){var i=this.log.play_loadstream;i.timestamp=VU(),i.loadstream_url=t,i.offersdp=n,i.sessionId=r,this.logmanager.push(i)}},t.handlePlayerLoadedStream=function(e){var t=this.log.play_stream_loaded;t.timestamp=VU(),cG(t,e),this.logmanager.push(t)},t.handleSEIParsed=function(e){try{var t=this,n=t.log,r=n.playing,i=n.first_frame,o=function(){if(100===e.code){var n=function(e){var t,n,r,i,o,a;for(t="",r=e.length,n=0;n<r;)switch((i=e[n++])>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:t+=String.fromCharCode(i);break;case 12:case 13:o=e[n++],t+=String.fromCharCode((31&i)<<6|63&o);break;case 14:o=e[n++],a=e[n++],t+=String.fromCharCode((15&i)<<12|(63&o)<<6|(63&a)<<0)}return t}(e.content);n=QR(n).call(n,KR(n).call(n,"{"),kH(n).call(n,"}")+1);var o=function(e,t){try{var n=e()}catch(oK){return t(oK)}return n&&n.then?n.then(void 0,t):n}((function(){var e=JSON.parse(n);return jR.resolve(t.getPlayerBuffer()).then((function(n){var o=n+t.ntpTime-e.ts;r.sei_delay=o,r.sei_source=e.source,r.ntp_sync=t.options.ntp?1:0,r.ntp_delta=t.ntp_delta,i.first_sei_delay=o,i.ntp_sync=t.options.ntp?1:0,i.ntp_delta=t.ntp_delta}))}),(function(){}));if(o&&o.then)return o.then((function(){}))}}();return jR.resolve(o&&o.then?o.then((function(){})):void 0)}catch(oK){return jR.reject(oK)}},t.handleMetaDataLoaded=function(e,t){this.log.play_stop.meta=this.log.play_stop.meta||{},e&&(this.log.play_stop.meta[e]=t),this.log.play_metadata_loaded.timestamp=VU(),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=KU(t.codec))),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){cG(this.log.play_av_unsync,e||{}),this.log.play_av_unsync.timestamp=VU(),this.logmanager.push(this.log.play_av_unsync)},t.handleStreamException=function(e){this.logmanager.push(cG({},this.log.stream_exception,e))},t.handlePlayerComlete=function(){this.completed||(this.completed=!0,this.core=WU(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(){try{var e=this;return jR.resolve(e.getRtcStats({onlyJb:!0})).then((function(t){if(void 0!==t.video_jb_delay)return t.video_jb_delay;var n=e.player.video.buffered;if(n){var r=Math.max(0,n.length-1);try{var i=DU(1e3*(n.end(r)-e.player.video.currentTime));return e.log.playing.audio_buffer_time=e.log.playing.video_buffer_time=i,i}catch(oK){return 0}}}))}catch(oK){return jR.reject(oK)}},t.getTransferCost=function(e){var t;if(!(null===(t=this.core)||void 0===t?void 0:t.transferCost))return{};if(e)return this.core.transferCost;var n=this.core.transferCost,r=n.demuxCost,i=n.remuxCost,o=n.appendCost,a={demuxCost:r-this.cachePlaying.demuxCost,remuxCost:i-this.cachePlaying.remuxCost,appendCost:o-this.cachePlaying.appendCost};return cG(this.cachePlaying,this.core.transferCost),a},t.getPlayerDownloadSpeed=function(){return this.core&&this.core.core&&"function"==typeof this.core.core.speedInfo&&this.core.core.speedInfo().speed||{}},t.getPlayerQuality=function(){var e=this.player.video;if(e)if(e.getVideoPlaybackQuality){var t=e.getVideoPlaybackQuality();this.log.playing.drop_count=t.droppedVideoFrames-this.tempDroppedFrameCount,this.log.playing.drop_percent=AU((t.droppedVideoFrames-this.tempDroppedFrameCount)/(t.totalVideoFrames-this.tempTotalFrameCount)).toFixed(1),this.log.play_stop.drop_percent=AU(t.droppedVideoFrames/t.totalVideoFrames).toFixed(1),this.tempDroppedFrameCount=t.droppedVideoFrames,this.tempTotalFrameCount=t.totalVideoFrames}else if(null!=e.webkitDroppedFrameCount){var n=e.webkitDroppedFrameCount;this.log.playing.drop_count=n-this.tempDroppedFrameCount,this.tempDroppedFrameCount=n}},t.getRtcStats=function(e){var t=e.duration,n=void 0===t?1e3:t,r=e.onlyJb,i=void 0!==r&&r;try{var o=this,a=o.player.plugins.rts||o.player.plugins.rtm,s=a&&a.pc,c={};return s?jR.resolve(s.getStats()).then((function(e){return e.forEach((function(e){var t=e.type,r=e.mediaType,a=e.bytesReceived,s=e.packetsReceived,l=e.audioLevel,u=e.concealmentEvents,d=e.remoteTimestamp,h=e.timestamp,f=e.framesDropped,p=e.keyFramesDecoded,v=e.totalDecodeTime,g=e.framesDecoded,y=e.frameHeight,m=e.frameWidth,_=e.framesReceived,b=e.jitterBufferDelay,R=e.jitterBufferEmittedCount,w=e.jitter,G=e.nackCount,T=e.packetsLost,k=e.pliCount,S=e.totalSamplesReceived,E=e.concealedSamples,M=e.currentRoundTripTime,D=e.decoderImplementation,z=e.mimeType,A=e.freezeCount,P=e.totalFreezesDuration,x=e.totalPausesDuration;switch(t){case"inbound-rtp":if("audio"===r)c.audio_bytes_received=a-(o.cacheRtcStats.audioBytesReceived||0),o.cacheRtcStats.audioBytesReceived=a,c.audio_packets_lost=T-(o.cacheRtcStats.audioPacketsLost||0),c.audio_packets_received=s-(o.cacheRtcStats.audioPacketsReceived||0),o.cacheRtcStats.audioPacketsLost=T,o.cacheRtcStats.audioPacketsReceived=s,c.audio_level=l,c.concealment_event=u,c.audio_fraction_lost=c.audio_packets_lost/c.audio_packets_received,void 0!==o.cacheRtcStats.totalSamplesReceived&&(c.audio_rec_sample_rate=(S-o.cacheRtcStats.totalSamplesReceived)/n),o.cacheRtcStats.totalSamplesReceived=S,c.concealed_samples=E,c.total_samples_received=S;else{if(c.video_jb_delay=b/R*1e3,i)return c;c.frames_dropped=f,c.iframes_decoded=p,c.video_bytes_received=a-(o.cacheRtcStats.videoBytesReceived||0),o.cacheRtcStats.videoBytesReceived=a,c.video_dec_time=v,c.video_decoded_delay_ms=c.video_dec_elapse/g,c.video_frame_height=y,c.video_frame_width=m,void 0!==o.cacheRtcStats.framesDecoded&&(c.video_decode_framerate=(g-o.cacheRtcStats.framesDecoded)/n),o.cacheRtcStats.framesDecoded=g,void 0!==o.cacheRtcStats.framesReceived&&(c.video_recv_framerate=(_-o.cacheRtcStats.framesReceived)/n),void 0!==o.cacheRtcStats.freezeCount&&(c.freeze_count=A-o.cacheRtcStats.freezeCount,c.freeze_duration=P-o.cacheRtcStats.totalFreezesDuration),o.cacheRtcStats.freezeCount=A,o.cacheRtcStats.totalFreezesDuration=P,o.cacheRtcStats.framesReceived=_,c.total_pauses_duration=x,c.video_jitter=1e3*w,c.video_nack_count=G,c.video_packets_lost=T-(o.cacheRtcStats.videoPacketsLost||0),c.video_packets_received=s-(o.cacheRtcStats.videoPacketsReceived||0),c.video_fraction_lost=c.video_packets_lost/c.video_packets_received,o.cacheRtcStats.videoPacketsLost=T,o.cacheRtcStats.videoPacketsReceived=s,c.video_pli_count=k,c.decoder_name=D}break;case"remote-outbound-rtp":c.e2e_delay_ms=h-d;break;case"track":void 0!==m&&(c.video_frame_width=m,c.video_frame_height=y);break;case"candidate-pair":c.rtt=1e3*M;break;case"codec":OC(z).call(z,"video")?c.video_codec=z:c.audio_codec=r}})),cG(o.log.playing,{video_download_size:c.video_bytes_received,decode_fps:c.video_decode_framerate,width:c.video_frame_width,height:c.video_frame_height,current_speed:(c.audio_bytes_received+c.video_bytes_received)/n}),c})):jR.resolve(c)}catch(oK){return jR.reject(oK)}},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,r=t.log.playing.timestamp;t.inWaitingStart&&t.inWaitingStart<VU()&&(n=Math.min(t.options.playingInterval||t.log.playing.play_time,VU()-Math.max(t.inWaitingStart,r))),t.getPlayerQuality(),t.getPlayerBuffer();var i=t.getTransferCost(!1);if(!t.options.downloadSpeedInterval){var o=t.getPlayerDownloadSpeed(),a=o.speed,s=o.avgSpeed;t.log.playing.current_speed=a,t.log.playing.avg_speed=s}var c=VU(),l=c-r,u=(n>200?n:0)+t.log.playing.stall_time,d=(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)),cG(t.log.playing,IU(IU({timestamp:c,stop_time:c,duration:e?0:l/1e3,stall_time_per_100sec:u/l*100,stall_count_per_100sec:1e3*d/l*100,stall_count:d,stall_time:u,play_current_time:t.player.currentTime},i),t.videoSize)),jR.resolve(t.getRtcStats({duration:l,first:e,onlyJb:!1})).then((function(n){var r={};if(t.core){if(t.core.getStats){var i=t.core.getStats()||{},o=i.bitrate,a=i.avgSpeed;cG(r,{bitrate:o,avg_speed:a,rate:a/o})}if(t.core.getNetWorkInfo){var s,c=(t.core.getNetWorkInfo()||{}).lostRate,u=((null===(s=t.core.core)||void 0===s?void 0:s._opts)||{}).networkEvaluateInterval;cG(r,{lostRate:c,networkEvaluateInterval:u})}}t.logmanager.push(cG({},t.log.playing,IU(IU({play_time:e?0:l},n),r)),!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(oK){return jR.reject(oK)}},t.handlePlayerPlaying=function(){try{var e=this;if(e.player&&e.player.video.readyState<3)return jR.resolve();if(e.player.off("playing",e.handlePlayerPlaying),e.player.off("timeupdate",e.handlePlayerPlaying),!e.player.video)return e.destroyFunc(),jR.resolve();if(e.player.paused)return e.handleVideopause(),jR.resolve();if(e.core&&e.core.getStats){var t=(e.core.getStats()||{}).fps;e.commonParams.fps=t}return jR.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 jR.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 jR.resolve(n&&n.then?n.then((function(){})):void 0)}catch(oK){return jR.reject(oK)}}),1e3),e.clearStallTimer(),e.handleVideoplaying(),e.started||e.reportStartPlay(),e.saveBuffered()}))}catch(oK){return jR.reject(oK)}},t.handlePlayerReady=function(){var e=this;this.log.start_play.start_play_time=VU(),this.player.config.autoplay&&this.reportStartPlay(),this.options.playResultThreshold&&(this.log.play_result.threshold=this.options.playResultThreshold),this.clearPlayResultTimer(),this.log.play_result.start=VU(),this.playResultTimer=setTimeout((function(){e.log.play_result.timestamp>=e.log.play_result.start||e.player&&!e.player.paused&&e.player.video&&(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;if(!this.inWaitingStart&&this.log.first_frame.timestamp){this.log.stall.timestamp=this.inWaitingStart=this.log.stall.stall_start=VU(),this.log.stall_start.ready_state=this.log.stall.ready_state=this.player.video.readyState,this.log.stall_start.timestamp=VU(),this.log.stall_start.stall_start_time=VU(),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;var t=this.getPlayerDownloadSpeed(),n=t.speed,r=t.avgSpeed;this.log.stall.current_speed=n,this.log.stall.avg_speed=r,cG(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=VU();this.reportStartPlay(),this.log.first_frame.start=e},t.stallEnd=function(){this.clearStallTimer();var e=VU();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=VU(),this.log.playing.stall_count++,cG(this.log.stall,IU({},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(),cG(this.log.playing,{is_last:1}),this.reportPlaying()},t.handleVideoerror=function(){var e=this;this.errorNumber=1;var t=this.player.video.error;cG(this.log.play_error,IU(IU({timestamp:VU()},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=QU[t.code],void 0!==e.log.first_frame_failed.timestamp&&(e.log.first_frame_failed.timestamp=VU()),e.logmanager.push(e.log.first_frame_failed,!0),e.log.play_result.is_threshold||(e.log.play_result.reason=QU[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"===NU.device?window.removeEventListener("beforeunload",this.handleUserLeave):"mobile"===NU.device&&window.removeEventListener("pagehide",this.handleUserLeave),YU.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.clearPlayingInterval(),this.clearStallTimer(),this.clearPlayResultTimer(),clearTimeout(this.collectDownloadSpeedTimer),this._player=null)},t.handleUserLeave=function(){try{var e=this;return e.destroyed||!e.started?jR.resolve():(e.destroyed=!0,jR.resolve(e.updatePlayStopParams()).then((function(){e.reportPlayStop(),e.clearPlayingInterval(),e.clearStallTimer(),clearTimeout(e.collectDownloadSpeedTimer),e.removeWindowListener()})))}catch(oK){return jR.reject(oK)}},t.saveBuffered=function(){try{var e=this.getBuffered();e&&e.length&&(this.log.play_stop.buffered=e)}catch(KTe){}},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(KTe){}},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)},t.reportFirstframe=function(){if(!this.firstFrameViewed){if(this.core&&this.core.getStats){var e=(this.core.getStats()||{}).fps;this.commonParams.fps=e}var t=this.getTransferCost(!0);this.firstFrameViewed=!0;var n=VU();cG(this.log.first_frame,IU(IU({first_frame_view:n-this.log.start_play.start_play_time||n,timestamp:n},t),this.videoSize)),this.log.first_frame.ttfb_end&&(this.log.first_frame.ttdb=n-this.log.first_frame.ttfb_end),this.logmanager.push(this.log.first_frame),this.clearPlayResultTimer(),this.log.play_result.result=1,this.logmanager.push(this.log.play_result),this.log.play_stop.is_stream_received=1}},t.updatePlayStopParams=function(){try{var e,t=function(){cG(o,IU({timestamp:i,stop_time:i,duration:n.playedTime/1e3,play_time:n.playedTime/1e3},n.videoSize)),0===n.errorNumber&&(o.play_time_on_no_frame=o.stop_time-n.log.start_play.start_play_time)},n=this,r=function(e){var t,n=Ww(t=performance.getEntriesByType("resource")).call(t,(function(t){return t.name===e}));if(n.length){var r=n[0],i=n[n.length-1];return{dns_parse_time:DU(r.domainLookupEnd-r.domainLookupStart),redirect:DU(r.redirectEnd-r.redirectStart),ttfb:DU(i.responseStart-i.requestStart)}}return{dns_parse_time:-1,redirect:-1,ttfb:-1}}(n._url),i=VU();n.playedTime=i-n.log.start_play.start_play_time;var o=n.log.play_stop;if(cG(o,IU({},0===o.stall_count&&{stall_time:0})),n.inWaitingStart&&i-n.inWaitingStart>200&&(o.stall_time+=i-n.inWaitingStart),n.inWaitingStart=0,cG(o,IU({stall_time_per_100sec:o.stall_time/n.playedTime*100,stall_count_per_100sec:1e3*o.stall_count/n.playedTime*100},r)),0===n.log.play_stop.stall_count_per_100sec&&(n.log.play_stop.stall_time_per_100sec=0),n.log.play_stop.stall_time_per_100sec>100||n.log.play_stop.stall_time_per_100sec<0)return jR.resolve();if(n.log.playing.index?(cG(n.log.playing,{is_last:1}),n.reportPlaying()):(n.log.play_stop.error_code=n.log.play_error.code,n.log.play_stop.error_info=n.log.play_error.info),i=VU(),null===(e=n.core)||void 0===e?void 0:e.getStats){var a=n.core.getStats()||{},s=a.totalReceivedByte,c=a.totalReceivedCost;cG(n.log.play_stop,{totalReceivedByte:s,totalReceivedCost:c,totalAverageSpeed:8*s/(c/1e3)})}var l=function(){var e;if(null===(e=n.core)||void 0===e?void 0:e.getStatsSnapshoot)return jR.resolve(n.core.getStatsSnapshoot()).then((function(e){var t=e.video||{},n=t.packetsLost,r=t.packetsReceived;cG(o,{packetsLost:n,packetsReceived:r,totalLostRate:n/(n+r)})}))}();return jR.resolve(l&&l.then?l.then(t):t())}catch(oK){return jR.reject(oK)}},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}(),eB=function(e){UM(n,e);var t=VM(n);function n(){var e,r;Py(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Oy(AM(r=t.call.apply(t,Xm(e=[this]).call(e,o))),"_liveLogger",void 0),r}return Hy(n,[{key:"afterCreate",value:function(){this.player.config.teaTracker&&this.open()}},{key:"destroy",value:function(){this.close()}},{key:"close",value:function(){var e;null===(e=this._liveLogger)||void 0===e||e.destroy(!1),this._liveLogger=void 0}},{key:"open",value:function(){var e;this._liveLogger||(this._start(),this.config.showUserIdInErrorPanel&&this.player.plugins.error&&(this.player.plugins.error.config.extraTips=[{label:"userId",value:null===(e=this.player.config.teaTracker)||void 0===e||null===(e=e.tea)||void 0===e?void 0:e.getConfig("user_unique_id")}]))}},{key:"_start",value:function(){var e,t,n;this._liveLogger=new $U({Tea:null===(e=this.player.config)||void 0===e||null===(e=e.teaTracker)||void 0===e?void 0:e.tea,player:this.player,aid:this.config.appId||654925,project_key:this.config.appId,app_name:this.config.appName||this.config.appId,user_id:null===(t=this.player.config)||void 0===t||null===(t=t.teaTracker)||void 0===t?void 0:t.userId,device_id:null===(n=this.player.config)||void 0===n||null===(n=n.teaTracker)||void 0===n?void 0:n.deviceId,error_report_stop:!0,ext:{veplayer_version:"2.8.0-rc.0",flv_version:"3.0.21-rc.21",hls_version:"3.0.21-rc.21",rts_version:"0.2.1-alpha.29"}})}}],[{key:"pluginName",get:function(){return"logger"}},{key:"defaultConfig",get:function(){return{appId:654925,enable:!0,showUserIdInErrorPanel:!0}}}]),n}(FE);function tB(e,t){return"number"!=typeof e?"-":t?t(e):e.toString()}var nB,rB=function(e){UM(n,e);var t=VM(n);function n(){var e,r;Py(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Oy(AM(r=t.call.apply(t,Xm(e=[this]).call(e,o))),"_pollTimer",void 0),Oy(AM(r),"_visible",void 0),Oy(AM(r),"_playPlugin",void 0),r}return Hy(n,[{key:"_streamType",get:function(){return KH.getStreamType(this.player.config.url)}},{key:"afterCreate",value:function(){var e=this;this._playPlugin=this.player.plugins[this._streamType],this.player.on(wU.ERROR,(function(){return e.close()})),this.config.visible&&this.player.once(wU.LOADED_DATA,(function(){return e.open()}))}},{key:"open",value:function(){var e;this._visible||(OC(e=["flv","hls"]).call(e,this._streamType)?this.player.plugins[this._streamType]?(this.root.style.display="block",this._tick(),this._visible=!0):console.warn("不支持或未加载".concat(this._streamType,"插件")):console.warn("仅支持flv和hls格式的信息展示"))}},{key:"close",value:function(){this._visible&&(clearTimeout(this._pollTimer),this.root.innerHTML="",this.root.style.display="none",this._visible=!1)}},{key:"destroy",value:function(){var e=this;this.close(),this.player.off(wU.LOADED_DATA,(function(){return e.open()})),this.player.off(wU.ERROR,(function(){return e.close()}))}},{key:"render",value:function(){return'\n <xg-live-panel class="veplayer-live-panel">\n </xg-live-panel>\n '}},{key:"_tick",value:function(){var e=this;clearTimeout(this._pollTimer),this._renderPanel(),this._pollTimer=window.setTimeout((function(){e._tick()}),this.config.interval)}},{key:"_getStats",value:function(){var e;return null===(e=this._playPlugin)||void 0===e?void 0:e.getStats()}},{key:"_getPanelData",value:function(){var e,t,n,r,i,o=this._getStats()||{},a="".concat(this._streamType,"_live"),s=this._playPlugin.softDecode,c=[(e=Fm(Fm({},o),{},{format:a}),{rows:[{key:"format",labelTextKey:"FORMAT",value:null!==(t=null==e?void 0:e.format)&&void 0!==t?t:"-"},{key:"fps",labelTextKey:"FPS",value:tB(e.fps,(function(e){return"".concat(e," fps")}))},{key:"bitrate",labelTextKey:"BITRATE",value:tB(e.bitrate,(function(e){return"".concat((e/1e3).toFixed(2)," kbps")}))},{key:"gop",labelTextKey:"GOP",value:tB(e.gop,(function(e){return"".concat(e," frames")}))},{key:"resolution",labelTextKey:"RESOLUTION",value:Xm(n="".concat(tB(e.width)," * ")).call(n,tB(e.height))},{key:"encodeType",labelTextKey:"ENCODE_TYPE",value:null!==(r=e.encodeType)&&void 0!==r?r:"-"},{key:"bufferEnd",labelTextKey:"BUFFER_END",value:tB(Number(null===(i=e.bufferEnd)||void 0===i?void 0:i.toFixed(2)))},{key:"currentTime",labelTextKey:"CURRENT_TIME",value:tB(e.currentTime,(function(e){return e.toFixed(4)+"s"}))}]})];return s&&c.push(function(e){return{titleTextKey:"DECODE_INFO",rows:[{key:"decodeEfficiency",labelTextKey:"DECODE_EFFICIENCY",value:tB(e.decodeFps,(function(e){return e+" frames/s"}))},{key:"decodeCost",labelTextKey:"DECODE_COST",value:tB(e.decodeFps,(function(e){return(e?(1e3/e).toFixed():0)+"ms"}))}]}}(o)),c}},{key:"_renderPanel",value:function(){var e=this,t=this._getPanelData(),n=this.root;n&&(n.innerHTML="",t.forEach((function(t){e._renderGroup(n,t)})))}},{key:"_renderGroup",value:function(e,t){var n=this,r=t.title,i=t.titleTextKey,o=t.rows,a=this.player.config.i18nManager;if(r||i){var s,c=this._genTitleDom(null!==(s=a.getText(i))&&void 0!==s?s:r);e.appendChild(c)}o.forEach((function(t){var r=n._genRowDom(t);e.appendChild(r)}))}},{key:"_genTitleDom",value:function(e){var t=rS.createDom("xg-live-panel","",void 0,"veplayer-live-panel-row"),n=rS.createDom("xg-live-panel",e,void 0,"veplayer-live-panel-row-title");return t.appendChild(n),t}},{key:"_genRowDom",value:function(e){var t=this.player.config.i18nManager,n=rS.createDom("veplayer-live-panel-row","",void 0,"veplayer-live-panel-row"),r=rS.createDom("xg-live-panel",t.getText(e.labelTextKey),void 0,"veplayer-live-panel-row-label");n.appendChild(r);var i=rS.createDom("xg-live-panel",e.value);return n.appendChild(i),n}}],[{key:"pluginName",get:function(){return"infoPanel"}},{key:"defaultConfig",get:function(){return{visible:!1,interval:500}}}]),n}(FE),iB="https://www.volcengine.com/docs/6469/138655#日志上报",oB=Fm(Fm({},bO),{},{INVALID_PARAMETER:"The imported parameter is empty, please pass in necessary parameters such as the stream address",INVALID_LOGGER:"Log options not configured correctly. Please refer to this document ".concat(iB," to configure the logs."),EMPTY_RTM_FALLBACK_PARAMETER:"Fallback URL for RTM is not configured. Please set enableFallback: false to disable fallback, or configure fallbackUrl for FLV and HLS formats based on the browser environment.",FORMAT:"format",FPS:"fps",BITRATE:"bitrate",GOP:"gop",RESOLUTION:"resolution",ENCODE_TYPE:"encodeType",BUFFER_END:"bufferEnd",CURRENT_TIME:"currentTime",DECODE_EFFICIENCY:"efficiency",DECODE_COST:"cost",DECODE_INFO:"decodeInfo",REFRESH:"refresh"}),aB=Fm(Fm({},RO),{},{INVALID_PARAMETER:"入参为空,请传入流地址等必要参数",INVALID_LOGGER:"未正确配置质量日志参数, 请参考 ".concat(iB," 配置"),EMPTY_RTM_FALLBACK_PARAMETER:"未配置 RTM 降级地址 fallbackUrl,请设置 enableFallback: false 取消降级或根据浏览器环境配置 FLV、HLS 格式降级地址",FORMAT:"格式",FPS:"帧率",BITRATE:"码率",GOP:"GOP",RESOLUTION:"视频分辨率",ENCODE_TYPE:"编码方式",BUFFER_END:"Buffer 水位",CURRENT_TIME:"播放进度",DECODE_EFFICIENCY:"解码效率",DECODE_COST:"解码消耗",DECODE_INFO:"软解信息",REFRESH:"刷新"}),sB=new Uint8Array(16);function cB(){if(!nB&&!(nB="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return nB(sB)}for(var lB=[],uB=0;uB<256;++uB){var dB;lB.push(QR(dB=(uB+256).toString(16)).call(dB,1))}var hB={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function fB(e,t,n){if(hB.randomUUID&&!t&&!e)return hB.randomUUID();var r=(e=e||{}).random||(e.rng||cB)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return lB[e[t+0]]+lB[e[t+1]]+lB[e[t+2]]+lB[e[t+3]]+"-"+lB[e[t+4]]+lB[e[t+5]]+"-"+lB[e[t+6]]+lB[e[t+7]]+"-"+lB[e[t+8]]+lB[e[t+9]]+"-"+lB[e[t+10]]+lB[e[t+11]]+lB[e[t+12]]+lB[e[t+13]]+lB[e[t+14]]+lB[e[t+15]]}(r)}var pB="veplayer_live_device_id",vB="veplayer_live_user_id",gB=function(e){return Math.floor((9*Math.random()+1)*Math.pow(10,e-1)).toString()},yB=function(e){var t=KH.getUrlObject(e);return t?null!=t&&t.searchParams.get("_session_id")?e:KH.appendSearchParams(e,{_session_id:mB()}):null!=e?e:""},mB=function(){return fB().replace(/-/g,"")+"."+Date.now()+"."+function(e){for(var t=0,n=0,r=(e+="").length,i=0;i<r;i++)((t=31*t+e.charCodeAt(n++))>0x7fffffffffff||t<-0x800000000000)&&(t&=0xffffffffffff);return t<0&&(t+=0x7ffffffffffff),t}(fB().replace(/-/g,""))},_B="hls",bB="ll-hls",RB="flv",wB="rtm",GB="ll-flv",TB=KH.isMMSSupported,kB=KH.isMseSupported;function SB(){return uS.os.isIos}function EB(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.H264;return(SB()?TB:kB)(e)}var MB=function(e){return e.Error="Error",e.Stall="Stall",e}(MB||{}),DB=function(){function e(t){Py(this,e),Oy(this,"nextProtocol",void 0),Oy(this,"preProtocol",void 0),Oy(this,"protocolStrategy",void 0),Oy(this,"_fallback",void 0),this._fallback=t.fallback}return Hy(e,[{key:"_getKindFallbackStrategy",value:function(e){var t,n,r,i,o;return null!==(t=null!==(n=null===(r=this._fallback)||void 0===r||null===(r=r.fallbackStrategy)||void 0===r||null===(r=r[this.protocolType])||void 0===r?void 0:r[e])&&void 0!==n?n:null===(i=this._fallback)||void 0===i||null===(i=i.fallbackStrategy)||void 0===i||null===(i=i.all)||void 0===i?void 0:i[e])&&void 0!==t?t:null===(o=this.defaultFallbackStrategy)||void 0===o?void 0:o[e]}},{key:"errorFallbackStrategy",get:function(){return this._getKindFallbackStrategy("Error")}},{key:"stallFallbackStrategy",get:function(){return this._getKindFallbackStrategy("Stall")}},{key:"shouldFallbackWhenError",value:function(e){var t,n,r,i;return null!==(t=this.errorFallbackStrategy)&&void 0!==t&&t.shouldFallback?null===(r=this.errorFallbackStrategy)||void 0===r?void 0:r.shouldFallback(this.protocolType,e):!(null===(n=this.errorFallbackStrategy)||void 0===n||!n.excludeList)&&!OC(i=this.errorFallbackStrategy.excludeList).call(i,e.error.errorCode)}}]),e}(),zB=KH.appendSearchParams,AB=function(){var e=cy(ay().mark((function e(n){var r,i,o,a,s,c,l,u,d,h,f,p,v,g,y,m,_,b,R,w,G;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return p=null==n||null===(r=n.flv)||void 0===r?void 0:r.enableLowLatency,v=null===(i=null==n||null===(o=n.flv)||void 0===o||null===(o=o.lowLatency)||void 0===o?void 0:o.enableFrameChasing)||void 0===i||i,g=null!==(a=null==n||null===(s=n.flv)||void 0===s||null===(s=s.lowLatency)||void 0===s?void 0:s.abrPts)&&void 0!==a?a:"-800",e.next=5,jX(n);case 5:return y=e.sent,e.next=8,qX(n,y);case 8:if(e.sent&&(f=y===t.H265?VX():NX(),h=XX(n)),EB("unknown"===y?t.H264:y)&&(h=SB()?UX(n):XX(n)),h||f){e.next=13;break}return e.abrupt("return",{});case 13:return e.next=15,jR.all([(null===(c=h)||void 0===c?void 0:c.module)&&zH(h.module).catch((function(){})),(null===(l=f)||void 0===l?void 0:l.module)&&zH(f.module).catch((function(){}))]);case 15:return m=e.sent,_=JC(m,2),b=_[0],(null==(R=_[1])?void 0:R.XGVideoPlugin)&&(null===(u=f)||void 0===u||null===(d=u.afterLoad)||void 0===d||d.call(u,null==R?void 0:R.XGVideoPlugin)),w=YX([h,f]),G=[],p&&(w.url=zB(n.url,{abr_pts:g})),b&&(G.push(b.FlvPlugin),p&&v&&G.push(b.Adaptive)),e.abrupt("return",{options:w,plugins:G});case 25:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),PB=function(e){UM(o,e);var t,n,r,i=VM(o);function o(){return Py(this,o),i.apply(this,arguments)}return Hy(o,[{key:"protocolType",get:function(){return RB}},{key:"defaultFallbackStrategy",get:function(){return{}}},{key:"canPlay",value:(r=cy(ay().mark((function e(){return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{canPlay:EB()});case 1:case"end":return e.stop()}}),e)}))),function(){return r.apply(this,arguments)})},{key:"shouldFallbackWhenStall",value:function(){return!1}},{key:"getProtocolStrategy",value:(n=cy(ay().mark((function e(t,n){var r;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.enableSelector,e.abrupt("return",AB(r?Fm(Fm({},t),{},{flv:Fm(Fm({},t.flv),{},{enableLowLatency:!1})}):t));case 2:case"end":return e.stop()}}),e)}))),function(e,t){return n.apply(this,arguments)})},{key:"getAbrStrategy",value:(t=cy(ay().mark((function e(t){var n,r,i,o;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=null==t||null===(n=t.flv)||void 0===n?void 0:n.abr){e.next=3;break}return e.abrupt("return",{});case 3:return e.next=5,zH(jF.PluginAbr).catch((function(){}));case 5:return o=e.sent,e.abrupt("return",{options:{abr:Fm(Fm({},i),{},{open:null===(r=i.enable)||void 0===r||r})},plugins:[null==o?void 0:o.AbrPlugin]});case 7:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"getDrmStrategy",value:function(){}},{key:"getVeStrategy",value:function(){}}],[{key:"suffix",get:function(){return".flv"}},{key:"generateUrl",value:function(e,t){var n,r=t.generateUrlFromOtherProtocol;return null!==(n=e[RB])&&void 0!==n?n:r()}},{key:"canGenerateOtherProtocol",value:function(){return!0}}]),o}(DB),xB=function(e){UM(r,e);var t,n=VM(r);function r(){return Py(this,r),n.apply(this,arguments)}return Hy(r,[{key:"protocolType",get:function(){return GB}},{key:"getProtocolStrategy",value:(t=cy(ay().mark((function e(t){return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",AB(Fm(Fm({},t),{},{flv:Fm(Fm({},t.flv),{},{enableLowLatency:!0})})));case 1:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})}]),r}(PB),CB=function(e){return e.Fairplay="fairplay",e}(CB||{});function FB(e){if(null!=e&&e.fairplay&&("safari"===uS.browser||uS.os.isIos))return"fairplay"}function IB(e){var t=e.drm,n=e.streamType,r=FB(t);return!r||("fairplay"!==r||"hls"!==n)}var HB=KH.isMseSupported;function OB(e){var t,n;return!(null==e||null===(t=e.hls)||void 0===t||!t.enableHlsJs)||"ssai"===(null==e||null===(n=e.ad)||void 0===n?void 0:n.adType)}var LB=function(){var e=cy(ay().mark((function e(n){var r,i,o,a,s,c,l,u,d,h,f,p,v,g,y;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(IB({drm:n.drm,streamType:"hls"})){e.next=2;break}return e.abrupt("return",{options:{},plugins:[]});case 2:return e.next=4,jX(n);case 4:return u=e.sent,e.next=7,qX(n,u);case 7:if(d=e.sent,h=OB(n),d&&(l=u===t.H265?VX():NX(),c=BX(n,h)),("mobile"!==uS.device||null!=n&&null!==(r=n.hls)&&void 0!==r&&r.enableMSE)&&HB("unknown"===u?t.H264:u)&&(c=BX(n,h)),c||l){e.next=13;break}return e.abrupt("return",{});case 13:return e.next=15,jR.all([(null===(i=c)||void 0===i?void 0:i.module)&&zH(c.module).catch((function(){})),(null===(o=l)||void 0===o?void 0:o.module)&&zH(l.module).catch((function(){}))]);case 15:return f=e.sent,p=JC(f,2),v=p[0],(null==(g=p[1])?void 0:g.XGVideoPlugin)&&(null===(a=l)||void 0===a||null===(s=a.afterLoad)||void 0===s||s.call(a,null==g?void 0:g.XGVideoPlugin)),y=YX([c,l]),e.abrupt("return",{options:y,plugins:null!=v&&v.HlsPlugin?[v.HlsPlugin]:[]});case 22:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function XB(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function UB(e){return RF(e).call(e,(function(e,t){var n,r,i=RF(n=t.definitions).call(n,(function(e,t){var n=function(e){return"string"==typeof e?VH(e):e.type?e.type:VH(e.url)}(t);return XB(e,n,t),e}),{});return VR(r=WR(i)).call(r,(function(n){XB(e,n,Fm(Fm({},t),{},{definitions:i[n]}))})),e}),{})}function BB(e,t){var n=[];return null==e||e.forEach((function(e){var r=[];e.definitions.forEach((function(e){var n;"string"==typeof e?r.push(t(e)):r.push(Fm(Fm({},e),{},{url:t(e.url),fallbackUrls:null===(n=e.fallbackUrls)||void 0===n?void 0:VR(n).call(n,(function(e){return t(e)}))}))})),n.push(Fm(Fm({},e),{},{definitions:r}))})),n}var NB=["getDrmConfig"],VB=function(){var e=cy(ay().mark((function e(t,n){var r,i,o,a,s,c,l,u,d,h,f;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=FB(t.drm),!t.url||r!==CB.Fairplay){e.next=18;break}return e.prev=2,a=null!==(i=null==t||null===(o=t.drm)||void 0===o?void 0:o.fairplay)&&void 0!==i?i:{},s=a.getDrmConfig,c=nm(a,NB),e.next=6,jR.all([zH(jF.PluginDrm).then((function(e){return e.DrmPlugin})).catch((function(){})),null==s?void 0:s({url:t.url})]);case 6:return l=e.sent,u=JC(l,2),d=u[0],h=u[1],f=cG({},c,null==t?void 0:t.drm,h),h&&(null==n||n.updateDrmConfig(h)),e.abrupt("return",{options:{drm:f},plugins:d?[d]:[]});case 15:e.prev=15,e.t0=e.catch(2),console.log(e.t0);case 18:return e.abrupt("return",{});case 19:case"end":return e.stop()}}),e,null,[[2,15]])})));return function(t,n){return e.apply(this,arguments)}}(),jB=function(e){UM(o,e);var t,n,r,i=VM(o);function o(){return Py(this,o),i.apply(this,arguments)}return Hy(o,[{key:"protocolType",get:function(){return _B}},{key:"defaultFallbackStrategy",get:function(){return{}}},{key:"canPlay",value:(r=cy(ay().mark((function e(){return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{canPlay:!0});case 1:case"end":return e.stop()}}),e)}))),function(){return r.apply(this,arguments)})},{key:"shouldFallbackWhenStall",value:function(){return!1}},{key:"getProtocolStrategy",value:(n=cy(ay().mark((function e(t){return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",LB(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return n.apply(this,arguments)})},{key:"getAbrStrategy",value:(t=cy(ay().mark((function e(t){var n,r,i,o;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=null==t||null===(n=t.hls)||void 0===n?void 0:n.abr){e.next=3;break}return e.abrupt("return",{});case 3:return e.next=5,zH(jF.PluginAbr).catch((function(){}));case 5:return o=e.sent,e.abrupt("return",{options:{hlsabr:Fm(Fm({},i),{},{open:null===(r=i.enable)||void 0===r||r})},plugins:[null==o?void 0:o.HlsAbrPlugin]});case 7:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"getDrmStrategy",value:function(e,t){var n=t.player;return VB(e,n)}},{key:"getVeStrategy",value:function(){}}],[{key:"suffix",get:function(){return".m3u8"}},{key:"canGenerateOtherProtocol",value:function(){return!0}},{key:"generateUrl",value:function(e,t){var n=t.generateUrlFromOtherProtocol;return e[_B]?e[_B]:e[bB]?BB(e[bB],(function(e){return KH.appendSearchParams(e,{fpkey_normal_hls:"1"})})):n()}}]),o}(DB),KB=function(e){UM(i,e);var t,n,r=VM(i);function i(){return Py(this,i),r.apply(this,arguments)}return Hy(i,[{key:"protocolType",get:function(){return bB}},{key:"defaultFallbackStrategy",get:function(){return{}}},{key:"canPlay",value:(n=cy(ay().mark((function e(){return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{canPlay:!0});case 1:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})},{key:"shouldFallbackWhenStall",value:function(){return!1}},{key:"getProtocolStrategy",value:(t=cy(ay().mark((function e(t){return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",LB(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"getAbrStrategy",value:function(){}},{key:"getDrmStrategy",value:function(){}},{key:"getVeStrategy",value:function(){}}],[{key:"suffix",get:function(){return".m3u8"}},{key:"generateUrl",value:function(e){return e[bB]}},{key:"canGenerateOtherProtocol",value:function(){return!0}}]),i}(DB);function WB(){return QB.apply(this,arguments)}function QB(){return(QB=cy(ay().mark((function e(){var t,n;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,zH(jF.PluginRtm);case 2:return t=e.sent,n=t.RtmPlugin,e.abrupt("return",n.isSupported());case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qB(){return ZB.apply(this,arguments)}function ZB(){return ZB=cy(ay().mark((function e(){var t,n,r,i=arguments;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.length>0&&void 0!==i[0]?i[0]:ITe.H264,e.next=3,zH(jF.PluginRtm);case 3:if(n=e.sent,r=n.RtmPlugin,t!==ITe.H264){e.next=7;break}return e.abrupt("return",r.isSupportedH264());case 7:return e.abrupt("return",!1);case 8:case"end":return e.stop()}}),e)}))),ZB.apply(this,arguments)}var YB=["fallbackUrl","enableRTMAutoTranscode"],$B={options:{},module:jF.PluginRtm},JB=function(e){return"pc"===uS.device?e.replace(".sdp",".flv"):e.replace(".sdp",".m3u8")},eN=function(){var e=cy(ay().mark((function e(n,r,i){var o,a,s,c,l,u,d,h,f,p,v,g,y,m,_,b,R,w,G,T,k,S,E,M,D;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l="",u=n.url,d=n.playlist,h=n.rtm||{},f=h.fallbackUrl,p=h.enableRTMAutoTranscode,v=nm(h,YB),g=n.rtm||{},y=g.enableFallback,m=void 0===y||y,null!=d&&d.length&&(m=!1),_=p||"true"===(null===(o=PH(u))||void 0===o?void 0:o.searchParams.get("enableRTMAutoTranscode")),m&&(f?l=f:_&&u?l=JB(u):console.warn(nU(eU.EMPTY_RTM_FALLBACK_PARAMETER,i).message)),"flv"===(b=l&&KH.getStreamType(l))&&KH.isMseSupported(t.H264)?c=XX(n):"hls"===b&&("mobile"!==uS.device||null!=n&&null!==(a=n.hls)&&void 0!==a&&a.enableMSE)&&KH.isMseSupported(t.H264)&&(c=BX(n)),e.next=11,jR.all([zH($B.module).then((function(e){return e.RtmPlugin})).catch((function(){})),c&&zH(c.module).then((function(e){var t,n;return(null===(t=c)||void 0===t?void 0:t.module)===jF.PluginFlv?e.FlvPlugin:(null===(n=c)||void 0===n?void 0:n.module)===jF.PluginHls?e.HlsPlugin:void 0})).catch((function(){}))]);case 11:if(R=e.sent,w=JC(R,2),G=w[0],T=w[1],!l){e.next=25;break}return e.next=18,jR.all([WB(),qB()]);case 18:if(k=e.sent,S=JC(k,2),E=S[0],M=S[1],E&&M){e.next=25;break}return r&&r.emit("degrade",{url:l,originRtmUrl:u,code:"NOT_SUPPORT",message:"not support rtm or h264",isRTMSupported:E,isRTMSupportCodec:M}),e.abrupt("return",{options:Fm(Fm({},(null===(D=c)||void 0===D?void 0:D.options)||{}),{},{url:l,_RTMdegrade:{_originRtmUrl:u,_isRTMSupported:E,_isRTMSupportCodec:M}}),plugins:T?[T]:[]});case 25:return e.abrupt("return",{options:Fm(Fm({},(null===(s=c)||void 0===s?void 0:s.options)||{}),{},{url:p?KH.appendSearchParams(u,{enableRTMAutoTranscode:"true"}):void 0,_RTMdegrade:void 0,rts:Fm(Fm({retryCount:0},v),{},{backupURL:l,backupConstruct:T})}),plugins:G?[G]:[]});case 26:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),tN=function(e){UM(o,e);var t,n,r,i=VM(o);function o(){return Py(this,o),i.apply(this,arguments)}return Hy(o,[{key:"protocolType",get:function(){return wB}},{key:"defaultFallbackStrategy",get:function(){return Oy({},MB.Error,{shouldFallback:function(){return!0}})}},{key:"canPlay",value:(r=cy(ay().mark((function e(){var t,n,r,i;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,jR.all([WB(),qB()]);case 2:return t=e.sent,n=JC(t,2),r=n[0],i=n[1],e.abrupt("return",{canPlay:r&&i});case 7:case"end":return e.stop()}}),e)}))),function(){return r.apply(this,arguments)})},{key:"shouldFallbackWhenStall",value:function(){return!1}},{key:"getProtocolStrategy",value:(n=cy(ay().mark((function e(t,n){var r,i,o;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.player,i=n.i18n,o=n.enableSelector,e.next=3,eN(o?{options:t,rtm:Fm(Fm({},t.rtm),{},{enableFallback:!1})}:t,r,i);case 3:return this.protocolStrategy=e.sent,e.abrupt("return",this.protocolStrategy);case 5:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getAbrStrategy",value:function(){}},{key:"getDrmStrategy",value:function(){}},{key:"getVeStrategy",value:(t=cy(ay().mark((function e(t,n){var r,i,o;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.veStrategyManager,o=null==i||null===(r=i.rtmAdaptiveBuffer)||void 0===r?void 0:r.getResult()){e.next=4;break}return e.abrupt("return",{options:t,plugins:[]});case 4:return e.abrupt("return",{options:{rts:Fm({},o)},plugins:[]});case 5:case"end":return e.stop()}}),e)}))),function(e,n){return t.apply(this,arguments)})}],[{key:"suffix",get:function(){return".sdp"}},{key:"canGenerateOtherProtocol",value:function(e){var t;return null===(t=e.rtm)||void 0===t?void 0:t.enableRTMAutoTranscode}},{key:"generateUrl",value:function(e,t){var n,r=t.generateUrlFromOtherProtocol,i=t.options;return e[wB]?e[wB]:null!==(n=i.rtm)&&void 0!==n&&n.enableRTMAutoTranscode?r():void console.warn("生成 rtm 地址失败。请传入 rtm 播放地址,或开启自动转码")}}]),o}(DB),nN=function(){function e(t){var n=t.queue,r=t.streams,i=t.options;Py(this,e),Oy(this,"current",void 0),Oy(this,"_queue",void 0),Oy(this,"_streams",void 0),Oy(this,"_options",void 0),this._queue=n,this._streams=r,this._options=i,this.current=this._getStartProtocol()}var t;return Hy(e,[{key:"getProtocol",value:(t=cy(ay().mark((function e(){var t;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.current){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.current.canPlay();case 4:if(e.t1=t=e.sent,e.t0=null!==e.t1,!e.t0){e.next=8;break}e.t0=void 0!==t;case 8:if(!e.t0){e.next=12;break}e.t2=t,e.next=13;break;case 12:e.t2={};case 13:if(!e.t2.canPlay){e.next=17;break}return e.abrupt("return",this.current);case 17:return this.next(),e.abrupt("return",this.getProtocol());case 19:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"next",value:function(){var e;this.current=null===(e=this.current)||void 0===e?void 0:e.nextProtocol}},{key:"_getStartProtocol",value:function(){for(var e,t=this._queue.length-1;t>=0;t--){var n=this._queue[t],r=this._streams[n];r&&(e&&(e.preProtocol=r,r.nextProtocol=e),e=r)}return e}}]),e}(),rN=function(e){UM(n,e);var t=VM(n);function n(e){var r=e.streams,i=e.options;return Py(this,n),t.call(this,{queue:n.queue,streams:r,options:i})}return Hy(n)}(nN);Oy(rN,"queue",[wB,GB,RB,bB,_B]);var iN=function(e){UM(n,e);var t=VM(n);function n(e){var r,i=e.streams,o=e.options;return Py(this,n),t.call(this,{queue:null===(r=o.fallback)||void 0===r?void 0:r.fallbackOrder,streams:i,options:o})}return Hy(n)}(nN);Oy(iN,"queue",void 0);var oN={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",a="[object AsyncFunction]",s="[object Function]",c="[object GeneratorFunction]",l="[object Null]",u="[object Object]",d="[object Proxy]",h="[object Undefined]",f=/^\[object .+?Constructor\]$/,p=/^(?:0|[1-9]\d*)$/,v={};v["[object Float32Array]"]=v["[object Float64Array]"]=v["[object Int8Array]"]=v["[object Int16Array]"]=v["[object Int32Array]"]=v["[object Uint8Array]"]=v["[object Uint8ClampedArray]"]=v["[object Uint16Array]"]=v["[object Uint32Array]"]=!0,v[o]=v["[object Array]"]=v["[object ArrayBuffer]"]=v["[object Boolean]"]=v["[object DataView]"]=v["[object Date]"]=v["[object Error]"]=v[s]=v["[object Map]"]=v["[object Number]"]=v[u]=v["[object RegExp]"]=v["[object Set]"]=v["[object String]"]=v["[object WeakMap]"]=!1;var g="object"==Su(i)&&i&&i.Object===Object&&i,y="object"==("undefined"==typeof self?"undefined":Su(self))&&self&&self.Object===Object&&self,m=g||y||Function("return this")(),_=t&&!t.nodeType&&t,b=_&&e&&!e.nodeType&&e,R=b&&b.exports===_,w=R&&g.process,G=function(){try{var e=b&&b.require&&b.require("util").types;return e||w&&w.binding&&w.binding("util")}catch(oK){}}(),T=G&&G.isTypedArray;var k=Array.prototype,S=Function.prototype,E=Object.prototype,M=m["__core-js_shared__"],D=S.toString,z=E.hasOwnProperty,A=function(){var e=/[^.]+$/.exec(M&&Kw(M)&&Kw(M).IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),P=E.toString,x=D.call(Object),C=RegExp("^"+D.call(z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),F=R?m.Buffer:void 0,I=m.Symbol,H=m.Uint8Array,O=F?F.allocUnsafe:void 0,L=function(e,t){return function(n){return e(t(n))}}(yG,Object),X=Object.create,U=E.propertyIsEnumerable,B=vw(k),N=I?I.toStringTag:void 0,V=function(){try{var e=ge(Object,"defineProperty");return e({},"",{}),e}catch(oK){}}(),j=F?F.isBuffer:void 0,K=Math.max,W=Date.now,Q=ge(m,"Map"),q=ge(Object,"create"),Z=function(){function e(){}return function(t){if(!Me(t))return{};if(X)return X(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Y(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function J(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ee(e){var t=this.__data__=new $(e);this.size=t.size}function te(e,t){var n=Ge(e),r=!n&&we(e),i=!n&&!r&&ke(e),o=!n&&!r&&!i&&ze(e),a=n||r||i||o,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=s.length;for(var l in e)!t&&!z.call(e,l)||a&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||ye(l,c))||s.push(l);return s}function ne(e,t,n){(void 0!==n&&!Re(e[t],n)||void 0===n&&!(t in e))&&oe(e,t,n)}function re(e,t,n){var r=e[t];z.call(e,t)&&Re(r,n)&&(void 0!==n||t in e)||oe(e,t,n)}function ie(e,t){for(var n=e.length;n--;)if(Re(e[n][0],t))return n;return-1}function oe(e,t,n){"__proto__"==t&&V?V(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}Y.prototype.clear=function(){this.__data__=q?q(null):{},this.size=0},Y.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Y.prototype.get=function(e){var t=this.__data__;if(q){var r=t[e];return r===n?void 0:r}return z.call(t,e)?t[e]:void 0},Y.prototype.has=function(e){var t=this.__data__;return q?void 0!==t[e]:z.call(t,e)},Y.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=q&&void 0===t?n:t,this},$.prototype.clear=function(){this.__data__=[],this.size=0},$.prototype.delete=function(e){var t=this.__data__,n=ie(t,e);return!(n<0)&&(n==t.length-1?t.pop():B.call(t,n,1),--this.size,!0)},$.prototype.get=function(e){var t=this.__data__,n=ie(t,e);return n<0?void 0:t[n][1]},$.prototype.has=function(e){return ie(this.__data__,e)>-1},$.prototype.set=function(e,t){var n=this.__data__,r=ie(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},J.prototype.clear=function(){this.size=0,this.__data__={hash:new Y,map:new(Q||$),string:new Y}},J.prototype.delete=function(e){var t=ve(this,e).delete(e);return this.size-=t?1:0,t},J.prototype.get=function(e){return ve(this,e).get(e)},J.prototype.has=function(e){return ve(this,e).has(e)},J.prototype.set=function(e,t){var n=ve(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},ee.prototype.clear=function(){this.__data__=new $,this.size=0},ee.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},ee.prototype.get=function(e){return this.__data__.get(e)},ee.prototype.has=function(e){return this.__data__.has(e)},ee.prototype.set=function(e,t){var n=this.__data__;if(n instanceof $){var r=n.__data__;if(!Q||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new J(r)}return n.set(e,t),this.size=n.size,this};var ae,se=function(e,t,n){for(var r=-1,i=Object(e),o=n(e),a=o.length;a--;){var s=o[ae?a:++r];if(!1===t(i[s],s,i))break}return e};function ce(e){return null==e?void 0===e?h:l:N&&N in Object(e)?function(e){var t=z.call(e,N),n=e[N];try{e[N]=void 0;var r=!0}catch(oK){}var i=P.call(e);r&&(t?e[N]=n:delete e[N]);return i}(e):function(e){return P.call(e)}(e)}function le(e){return De(e)&&ce(e)==o}function ue(e){return!(!Me(e)||function(e){return!!A&&A in e}(e))&&(Se(e)?C:f).test(function(e){if(null!=e){try{return D.call(e)}catch(oK){}try{return e+""}catch(oK){}}return""}(e))}function de(e){if(!Me(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=me(e),n=[];for(var r in e)("constructor"!=r||!t&&z.call(e,r))&&n.push(r);return n}function he(e,t,n,r,i){e!==t&&se(t,(function(o,a){if(i||(i=new ee),Me(o))!function(e,t,n,r,i,o,a){var s=_e(e,n),c=_e(t,n),l=a.get(c);if(l)return void ne(e,n,l);var d=o?o(s,c,n+"",e,t,a):void 0,h=void 0===d;if(h){var f=Ge(c),p=!f&&ke(c),v=!f&&!p&&ze(c);d=c,f||p||v?Ge(s)?d=s:!function(e){return De(e)&&Te(e)}(s)?p?(h=!1,d=function(e,t){if(t)return QR(e).call(e);var n=e.length,r=O?O(n):new e.constructor(n);return e.copy(r),r}(c,!0)):v?(h=!1,g=c,y=!0?(m=g.buffer,_=new m.constructor(m.byteLength),new H(_).set(new H(m)),_):g.buffer,d=new g.constructor(y,g.byteOffset,g.length)):d=[]:d=function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n<r;)t[n]=e[n];return t}(s):function(e){if(!De(e)||ce(e)!=u)return!1;var t=L(e);if(null===t)return!0;var n=z.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&D.call(n)==x}(c)||we(c)?(d=s,we(s)?d=function(e){return function(e,t,n,r){var i=!n;n||(n={});var o=-1,a=t.length;for(;++o<a;){var s=t[o],c=r?r(n[s],e[s],s,n,e):void 0;void 0===c&&(c=e[s]),i?oe(n,s,c):re(n,s,c)}return n}(e,Ae(e))}(s):Me(s)&&!Se(s)||(d=function(e){return"function"!=typeof e.constructor||me(e)?{}:Z(L(e))}(c))):h=!1}var g,y,m,_;h&&(a.set(c,d),i(d,c,r,o,a),a.delete(c));ne(e,n,d)}(e,t,a,n,he,r,i);else{var s=r?r(_e(e,a),o,a+"",e,t,i):void 0;void 0===s&&(s=o),ne(e,a,s)}}),Ae)}function fe(e,t){return be(function(e,t,n){return t=K(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=K(r.length-t,0),a=Array(o);++i<o;)a[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];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,Fe),e+"")}var pe=V?function(e,t){return V(e,"toString",{configurable:!0,enumerable:!1,value:Ce(t),writable:!0})}:Fe;function ve(e,t){var n=e.__data__;return function(e){var t=Su(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:VR(n)}function ge(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ue(n)?n:void 0}function ye(e,t){var n=Su(e);return!!(t=null==t?r:t)&&("number"==n||"symbol"!=n&&p.test(e))&&e>-1&&e%1==0&&e<t}function me(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||E)}function _e(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var be=function(e){var t=0,n=0;return function(){var r=W(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(pe);function Re(e,t){return e===t||e!=e&&t!=t}var we=le(function(){return arguments}())?le:function(e){return De(e)&&z.call(e,"callee")&&!U.call(e,"callee")},Ge=Array.isArray;function Te(e){return null!=e&&Ee(e.length)&&!Se(e)}var ke=j||function(){return!1};function Se(e){if(!Me(e))return!1;var t=ce(e);return t==s||t==c||t==a||t==d}function Ee(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function Me(e){var t=Su(e);return null!=e&&("object"==t||"function"==t)}function De(e){return null!=e&&"object"==Su(e)}var ze=T?function(e){return function(t){return e(t)}}(T):function(e){return De(e)&&Ee(e.length)&&!!v[ce(e)]};function Ae(e){return Te(e)?te(e,!0):de(e)}var Pe,xe=(Pe=function(e,t,n){he(e,t,n)},fe((function(e,t){var n=-1,r=t.length,i=r>1?t[r-1]:void 0,o=r>2?t[2]:void 0;for(i=Pe.length>3&&"function"==typeof i?(r--,i):void 0,o&&function(e,t,n){if(!Me(n))return!1;var r=Su(t);return!!("number"==r?Te(n)&&ye(t,n.length):"string"==r&&t in n)&&Re(n[t],e)}(t[0],t[1],o)&&(i=r<3?void 0:i,r=1),e=Object(e);++n<r;){var a=t[n];a&&Pe(e,a,n,i)}return e})));function Ce(e){return function(){return e}}function Fe(e){return e}e.exports=xe}(oN,oN.exports);var aN,sN=o(oN.exports),cN=function(){function e(t){Py(this,e),Oy(this,"_options",void 0),Oy(this,"_selector",void 0),Oy(this,"_protocol",void 0),Oy(this,"_playlistMap",{}),this._options=t,this._init({url:t.url,playlist:t.playlist})}var t,n,r,i,o;return Hy(e,[{key:"enableSelector",get:function(){return!!this._selector}},{key:"protocol",get:function(){return this._protocol}},{key:"playlist",get:function(){var e;return null!==(e=this._protocol)&&void 0!==e&&e.protocolType&&this._playlistMap?this._playlistMap[this._protocol.protocolType]:void 0}},{key:"getProtocol",value:(o=cy(ay().mark((function e(){return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._selector){e.next=4;break}return e.next=3,this._selector.getProtocol();case 3:this._protocol=e.sent;case 4:return e.abrupt("return",this._protocol);case 5:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"update",value:(i=cy(ay().mark((function e(t){var n,r;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.url,r=t.playlist,this._options=Fm(Fm({},this._options),{},{url:n,playlist:r}),this._init({url:n,playlist:r}),e.next=5,this.getProtocol();case 5:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"next",value:(r=cy(ay().mark((function e(){return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._selector){e.next=2;break}return e.abrupt("return");case 2:return this._selector.next(),e.next=5,this.getProtocol();case 5:return e.abrupt("return",this._protocol);case 6:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"getStrategy",value:(n=cy(ay().mark((function e(t,n,r){var i,o,a,s,c,l,u,d,h,f,p,v,g,y,m,_,b,R,w,G,T,k,S,E;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=this._protocol,e.next=3,jR.all([null==l?void 0:l.getProtocolStrategy(this._options,{player:t,i18n:n,enableSelector:!!this._selector}),null==l||null===(i=l.getDrmStrategy)||void 0===i?void 0:i.call(l,this._options,{player:t}),null==l||null===(o=l.getAbrStrategy)||void 0===o?void 0:o.call(l,this._options),null==l||null===(a=l.getVeStrategy)||void 0===a?void 0:a.call(l,this._options,{veStrategyManager:r})]);case 3:return u=e.sent,d=JC(u,4),h=d[0],f=d[1],p=d[2],v=d[3],y=(g=null!=h?h:{}).options,m=g.plugins,b=(_=null!=f?f:{}).options,R=_.plugins,G=(w=null!=p?p:{}).options,T=w.plugins,S=(k=null!=v?v:{}).options,E=k.plugins,e.abrupt("return",{options:sN(y,b,G,S),plugins:Xm(s=[]).call(s,Ay(null!=m?m:[]),Ay(null!=R?R:[]),Ay(null!=T?T:[]),Ay(null!=E?E:[])),useSrc:!(null!=h&&null!==(c=h.plugins)&&void 0!==c&&c.length),protocol:null==l?void 0:l.protocolType});case 14:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return n.apply(this,arguments)})},{key:"_init",value:function(t){var n=t.url,r=t.playlist;if(r){var i,o,a=UB(r),s="low"===this._options.latencyMode?rN:iN,c=null!==(i=null==s?void 0:s.queue)&&void 0!==i?i:null===(o=this._options.fallback)||void 0===o?void 0:o.fallbackOrder;if(null!=c&&c.length){var l=e._generateProtocolMap(c,a,this._options),u=l.protocolMap,d=l.playlistMap;return this._playlistMap=d,void(this._selector=new s({streams:u,options:this._options}))}this._playlistMap=a,this._initSingleProtocol(WR(a)[0])}else n&&this._initSingleProtocol(VH(n))}},{key:"_initSingleProtocol",value:function(t){t&&(this._protocol=new e._protocolMap[t](this._options))}}],[{key:"create",value:(t=cy(ay().mark((function t(n){var r;return ay().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=new e(n),t.next=3,r.getProtocol();case 3:return t.abrupt("return",r);case 4:case"end":return t.stop()}}),t)}))),function(e){return t.apply(this,arguments)})},{key:"_generateProtocolMap",value:function(t,n,r){var i={},o={},a=qm(t).call(t,(function(t){return e._protocolMap[t].canGenerateOtherProtocol(r)&&n[t]}));return t.forEach((function(t){var s,c,l=null!==(s=null===(c=e._protocolMap[t])||void 0===c?void 0:c.generateUrl(n,{generateUrlFromOtherProtocol:function(){if(a)return function(e,t,n){return BB(e,(function(e){return e.replace(t,n)}))}(n[a],e._protocolMap[a].suffix,e._protocolMap[t].suffix)},options:r}))&&void 0!==s?s:n[t];l&&(o[t]=l,i[t]=new e._protocolMap[t](r))})),{protocolMap:i,playlistMap:o}}}]),e}();Oy(cN,"_protocolMap",(Oy(aN={},RB,PB),Oy(aN,GB,xB),Oy(aN,_B,jB),Oy(aN,bB,KB),Oy(aN,wB,tN),aN));var lN=function(){function e(){var t=this;Py(this,e),Oy(this,"player",void 0),Oy(this,"protocolManager",void 0),Oy(this,"beforeFallbackError",function(){var e=cy(ay().mark((function e(n){var r,i,o,a;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(r=t.protocolManager)&&void 0!==r&&null!==(r=r.protocol)&&void 0!==r&&r.shouldFallbackWhenError({error:n})&&null!==(i=t.protocolManager)&&void 0!==i&&null!==(i=i.protocol)&&void 0!==i&&i.nextProtocol){e.next=2;break}return e.abrupt("return",{canEmitError:!0});case 2:return e.next=4,null===(o=t.protocolManager)||void 0===o?void 0:o.next();case 4:if(e.sent&&null!==(a=t.protocolManager)&&void 0!==a&&a.playlist){e.next=7;break}return e.abrupt("return",{canEmitError:!0});case 7:return t.fallback(),e.abrupt("return",{canEmitError:!1});case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}var t;return Hy(e,[{key:"initErrorFallback",value:function(e,t){this.player=e,this.protocolManager=t}},{key:"fallback",value:(t=cy(ay().mark((function e(){var t,n,r,i,o,a;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(t=this.protocolManager)&&void 0!==t&&t.playlist){e.next=2;break}return e.abrupt("return");case 2:o=null===(n=this.player)||void 0===n?void 0:n.definition,a=null===(r=this.player)||void 0===r?void 0:r.source,null===(i=this.player)||void 0===i||i.updatePlaylist(this.protocolManager.playlist,{definition:o,source:a},!1);case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),uN=new lN;I_("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),J_);var dN=ie.Set,hN=ze,fN=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(hN(e)+" is not a set")},pN=fb,vN=le("Set"),gN=vN.prototype,yN={Set:vN,add:pN("add",1),has:pN("has",1),remove:pN("delete",1),proto:gN},mN=Tb,_N=function(e,t,n){return n?mN(e.keys(),t):e.forEach(t)},bN=_N,RN=yN.Set,wN=yN.add,GN=function(e){var t=new RN;return bN(e,(function(e){wN(t,e)})),t},TN=function(e){return e.size},kN=Ce,SN=an,EN=F,MN=Ln,DN=TypeError,zN=Math.max,AN=function(e,t,n,r){this.set=e,this.size=t,this.has=n,this.keys=r};AN.prototype={getIterator:function(){return SN(EN(this.keys,this.set))},includes:function(e){return EN(this.has,this.set,e)}};var PN=function(e){SN(e);var t=+e.size;if(t!=t)throw DN("Invalid size");return new AN(e,zN(MN(t),0),kN(e.has),kN(e.keys))},xN=fN,CN=GN,FN=TN,IN=PN,HN=_N,ON=Tb,LN=yN.has,XN=yN.remove,UN=function(e){var t=xN(this),n=IN(e),r=CN(t);return FN(t)<=n.size?HN(t,(function(e){n.includes(e)&&XN(r,e)})):ON(n.getIterator(),(function(e){LN(t,e)&&XN(r,e)})),r},BN=function(){return!1},NN=UN;Pn({target:"Set",proto:!0,real:!0,forced:!BN()},{difference:NN});var VN=fN,jN=TN,KN=PN,WN=_N,QN=Tb,qN=yN.Set,ZN=yN.add,YN=yN.has,$N=function(e){var t=VN(this),n=KN(e),r=new qN;return jN(t)>n.size?QN(n.getIterator(),(function(e){YN(t,e)&&ZN(r,e)})):WN(t,(function(e){n.includes(e)&&ZN(r,e)})),r},JN=$N;Pn({target:"Set",proto:!0,real:!0,forced:!BN()},{intersection:JN});var eV=fN,tV=yN.has,nV=TN,rV=PN,iV=_N,oV=Tb,aV=sh,sV=function(e){var t=eV(this),n=rV(e);if(nV(t)<=n.size)return!1!==iV(t,(function(e){if(n.includes(e))return!1}),!0);var r=n.getIterator();return!1!==oV(r,(function(e){if(tV(t,e))return aV(r,"normal",!1)}))},cV=sV;Pn({target:"Set",proto:!0,real:!0,forced:!BN()},{isDisjointFrom:cV});var lV=fN,uV=TN,dV=_N,hV=PN,fV=function(e){var t=lV(this),n=hV(e);return!(uV(t)>n.size)&&!1!==dV(t,(function(e){if(!n.includes(e))return!1}),!0)},pV=fV;Pn({target:"Set",proto:!0,real:!0,forced:!BN()},{isSubsetOf:pV});var vV=fN,gV=yN.has,yV=TN,mV=PN,_V=Tb,bV=sh,RV=function(e){var t=vV(this),n=mV(e);if(yV(t)<n.size)return!1;var r=n.getIterator();return!1!==_V(r,(function(e){if(!gV(t,e))return bV(r,"normal",!1)}))},wV=RV;Pn({target:"Set",proto:!0,real:!0,forced:!BN()},{isSupersetOf:wV});var GV=fN,TV=GN,kV=PN,SV=Tb,EV=yN.add,MV=yN.has,DV=yN.remove,zV=function(e){var t=GV(this),n=kV(e).getIterator(),r=TV(t);return SV(n,(function(e){MV(t,e)?DV(r,e):EV(r,e)})),r},AV=zV;Pn({target:"Set",proto:!0,real:!0,forced:!BN()},{symmetricDifference:AV});var PV=fN,xV=yN.add,CV=GN,FV=PN,IV=Tb,HV=function(e){var t=PV(this),n=FV(e).getIterator(),r=CV(t);return IV(n,(function(e){xV(r,e)})),r},OV=HV;Pn({target:"Set",proto:!0,real:!0,forced:!BN()},{union:OV});var LV=dN;Pn({target:"Set",stat:!0,forced:!0},{from:cb}),Pn({target:"Set",stat:!0,forced:!0},{of:ub});var XV=fN,UV=yN.add;Pn({target:"Set",proto:!0,real:!0,forced:!0},{addAll:function(){for(var e=XV(this),t=0,n=arguments.length;t<n;t++)UV(e,arguments[t]);return e}});var BV=fN,NV=yN.remove;Pn({target:"Set",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=BV(this),n=!0,r=0,i=arguments.length;r<i;r++)e=NV(t,arguments[r]),n=n&&e;return!!n}});var VV=Jt,jV=fN,KV=_N;Pn({target:"Set",proto:!0,real:!0,forced:!0},{every:function(e){var t=jV(this),n=VV(e,arguments.length>1?arguments[1]:void 0);return!1!==KV(t,(function(e){if(!n(e,e,t))return!1}),!0)}});var WV=or,QV=tt,qV=Q,ZV=pc,YV=vt("iterator"),$V=Object,JV=z,ej=function(e){if(qV(e))return!1;var t=$V(e);return void 0!==t[YV]||"@@iterator"in t||QV(ZV,WV(t))},tj=re,nj=le("Set"),rj=function(e){return function(e){return tj(e)&&"number"==typeof e.size&&JV(e.has)&&JV(e.keys)}(e)?e:ej(e)?new nj(e):e},ij=F,oj=rj,aj=UN;Pn({target:"Set",proto:!0,real:!0,forced:!0},{difference:function(e){return ij(aj,this,oj(e))}});var sj=Jt,cj=fN,lj=_N,uj=yN.Set,dj=yN.add;Pn({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(e){var t=cj(this),n=sj(e,arguments.length>1?arguments[1]:void 0),r=new uj;return lj(t,(function(e){n(e,e,t)&&dj(r,e)})),r}});var hj=Jt,fj=fN,pj=_N;Pn({target:"Set",proto:!0,real:!0,forced:!0},{find:function(e){var t=fj(this),n=hj(e,arguments.length>1?arguments[1]:void 0),r=pj(t,(function(e){if(n(e,e,t))return{value:e}}),!0);return r&&r.value}});var vj=F,gj=rj,yj=$N;Pn({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(e){return vj(yj,this,gj(e))}});var mj=F,_j=rj,bj=sV;Pn({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(e){return mj(bj,this,_j(e))}});var Rj=F,wj=rj,Gj=fV;Pn({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(e){return Rj(Gj,this,wj(e))}});var Tj=F,kj=rj,Sj=RV;Pn({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(e){return Tj(Sj,this,kj(e))}});var Ej=Pn,Mj=_,Dj=fN,zj=_N,Aj=Yr,Pj=Mj([].join),xj=Mj([].push);Ej({target:"Set",proto:!0,real:!0,forced:!0},{join:function(e){var t=Dj(this),n=void 0===e?",":Aj(e),r=[];return zj(t,(function(e){xj(r,e)})),Pj(r,n)}});var Cj=Jt,Fj=fN,Ij=_N,Hj=yN.Set,Oj=yN.add;Pn({target:"Set",proto:!0,real:!0,forced:!0},{map:function(e){var t=Fj(this),n=Cj(e,arguments.length>1?arguments[1]:void 0),r=new Hj;return Ij(t,(function(e){Oj(r,n(e,e,t))})),r}});var Lj=Ce,Xj=fN,Uj=_N,Bj=TypeError;Pn({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=Xj(this),n=arguments.length<2,r=n?void 0:arguments[1];if(Lj(e),Uj(t,(function(i){n?(n=!1,r=i):r=e(r,i,i,t)})),n)throw Bj("Reduce of empty set with no initial value");return r}});var Nj=Jt,Vj=fN,jj=_N;Pn({target:"Set",proto:!0,real:!0,forced:!0},{some:function(e){var t=Vj(this),n=Nj(e,arguments.length>1?arguments[1]:void 0);return!0===jj(t,(function(e){if(n(e,e,t))return!0}),!0)}});var Kj=F,Wj=rj,Qj=zV;Pn({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(e){return Kj(Qj,this,Wj(e))}});var qj=F,Zj=rj,Yj=HV;Pn({target:"Set",proto:!0,real:!0,forced:!0},{union:function(e){return qj(Yj,this,Zj(e))}});var $j,Jj=o(LV),eK=function(){return(eK=cG||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function tK(e,t){var n="function"==typeof pG&&nT(e);if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function nK(){for(var e=[],t=0;t<arguments.length;t++)e=Xm(e).call(e,tK(arguments[t]));return e}var rK,iK,oK,aK,sK,cK,lK=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 r(i){t(i),n.off(e,r)}))},e.prototype.off=function(e,t){if(e&&this._hooks[e]&&this._hooks[e].length)if(t){var n,r,i=KR(n=this._hooks[e]).call(n,t);-1!==i&&vw(r=this._hooks[e]).call(r,i,1)}else this._hooks[e]=[]},e.prototype.emit=function(e,t,n){if(n){var r;if(!e)return;-1!==KR(r=this._cache).call(r,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&&nK(this._hooks[e]).forEach((function(e){try{e(t)}catch(n){}}))},e.prototype.set=function(e){var t;e&&-1===KR(t=this._cache).call(t,e)&&this._cache.push(e)},e}(),uK=function(e){return null!=e&&"[object Object]"==Object.prototype.toString.call(e)},dK=(rK=+Date.now()+Number(QR($j=""+Math.random()).call($j,2,8)),function(){return rK+=1}),hK=function(e){return function(e,t,n){if("string"==typeof e&&"number"==typeof n){var r,i=[];n=n<=25?n:n%25;var o=String.fromCharCode(n+97);r=e.split(o);for(var a=0;a<r.length;a++){var s=Ow(r[a],n);s=1*s^64;var c=String.fromCharCode(s);i.push(c)}return i.join("")}}(e,0,25)},fK=function(){return!!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)},pK=function(e){var t=document.createElement("a");return t.href=e,t},vK=function(e){var t={};try{var n=pK(e).search;if(!n)return t;(n=QR(n).call(n,1)).split("&").forEach((function(e){var n,r,i=e.split("=");i.length&&(n=i[0],r=i[1]);try{t[n]=decodeURIComponent(void 0===r?"":r)}catch(o){t[n]=r}}))}catch(r){}return t},gK=function(e){for(var t=0,n=0,r=(e+="").length,i=0;i<r;i++)((t=31*t+e.charCodeAt(n++))>0x7fffffffffff||t<-0x800000000000)&&(t&=0xffffffffffff);return t<0&&(t+=0x7ffffffffffff),t},yK=(oK=iK={exports:{}},aK=function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function i(){}function o(t,n,o){if("undefined"!=typeof document){"number"==typeof(o=e({path:"/"},i.defaults,o)).expires&&(o.expires=new Date(1*new Date+864e5*o.expires)),o.expires=o.expires?o.expires.toUTCString():"";try{var a=Jx(n);/^[\{\[]/.test(a)&&(n=a)}catch(l){}n=r.write?r.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 c in o)o[c]&&(s+="; "+c,!0!==o[c]&&(s+="="+o[c].split(";")[0]));return document.cookie=t+"="+n+s}}function a(e,n){if("undefined"!=typeof document){for(var i={},o=document.cookie?document.cookie.split("; "):[],a=0;a<o.length;a++){var s=o[a].split("="),c=QR(s).call(s,1).join("=");n||'"'!==c.charAt(0)||(c=QR(c).call(c,1,-1));try{var l=t(s[0]);if(c=(r.read||r)(c,l)||t(c),n)try{c=JSON.parse(c)}catch(u){}if(i[l]=c,e===l)break}catch(u){}}return e?i[e]:i}}return i.set=o,i.get=function(e){return a(e,!1)},i.getJSON=function(e){return a(e,!0)},i.remove=function(t,n){o(t,"",e(n,{expires:-1}))},i.defaults={},i.withConverter=n,i}((function(){}))},oK.exports=aK(),iK.exports),mK=function(e,t){try{return e?yK.get(e):yK.get()}catch(n){return""}},_K=function(e,t,n,r){try{var i=r||document.domain,o=+new Date+(n||6048e5);yK.set(e,t,{expires:new Date(o),path:"/",domain:i})}catch(a){}},bK=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 mK(e)},e.prototype.setCookie=function(e,t,n,r){_K(e,t,n,r)},e}(),RK={getItem:function(e){try{var t=localStorage.getItem(e),n=t;try{t&&"string"==typeof t&&(n=JSON.parse(t))}catch(r){}return n||{}}catch(r){}return{}},setItem:function(e,t){try{var n="string"==typeof t?t:Jx(t);localStorage.setItem(e,n)}catch(r){}},removeItem:function(e){try{localStorage.removeItem(e)}catch(t){}},getCookie:function(e,t){return mK(e)},setCookie:function(e,t,n,r){_K(e,t,n,r)},isSupportLS:function(){try{return localStorage.setItem("_ranger-test-key","hi"),localStorage.getItem("_ranger-test-key"),localStorage.removeItem("_ranger-test-key"),!0}catch(oK){return!1}}()},wK={getItem:function(e){try{var t=sessionStorage.getItem(e),n=t;try{t&&"string"==typeof t&&(n=JSON.parse(t))}catch(r){}return n||{}}catch(r){}return{}},setItem:function(e,t){try{var n="string"==typeof t?t:Jx(t);sessionStorage.setItem(e,n)}catch(r){}},removeItem:function(e){try{sessionStorage.removeItem(e)}catch(t){}},getCookie:function(e,t){return mK(e)},setCookie:function(e,t,n,r){_K(e,t,n,r)},isSupportSession:function(){try{return sessionStorage.setItem("_ranger-test-key","hi"),sessionStorage.getItem("_ranger-test-key"),sessionStorage.removeItem("_ranger-test-key"),!0}catch(oK){return!1}}()},GK=function(){function e(e,t){this._storage=t&&"session"===t?wK:!e&&RK.isSupportLS?RK:new bK}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,r){this._storage.setCookie(e,t,n,r)},e.prototype.removeItem=function(e){this._storage.removeItem(e)},e}(),TK=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,r=document.referrer,i=r?pK(r).hostname:"",o=vK(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,r){var i=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",c={},l=["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 d=!1;for(var h in u)u[h]&&(-1!==KR(l).call(l,h)?(c.hasOwnProperty("tracer_data")||(c.tracer_data={}),c.tracer_data[h]=u[h]):c[h]=u[h],d=!0);if(d)o.setItem(s,"1"),i.setCookie(a,Jx(c),r,n);else{var f=i.getCookie(a,n);f&&(c=JSON.parse(f))}o.getItem(s)&&(c.hasOwnProperty("tracer_data")||(c.tracer_data={}),c.tracer_data.$utm_from_url=1)}catch(p){return u}return c}(this.appid,o,this.domain,this.cookie_expire);var c=this.browser(),l=this.os();return{browser:c.browser,browser_version:c.browser_version,platform:a,os_name:l.os_name,os_version:l.os_version,userAgent:t,screen_width:window.screen&&window.screen.width,screen_height:window.screen&&window.screen.height,device_model:this.getDeviceModel(l.os_name),language:n,referrer:r,referrer_host:i,network_type:s,utm:this.utm,latest_data:this.last(r,i)}},e.prototype.last=function(e,t){var n="",r="",i="",o=location.hostname,a=!1;if(e&&t&&o!==t){n=e,r=t,a=!0;var s=vK(e);s.keyword&&(i=s.keyword)}return{$latest_referrer:n,$latest_referrer_host:r,$latest_search_keyword:i,isLast:a}},e.prototype.browser=function(){var e,t,n="",r=""+nk(this.appVersion),i=this.userAgent;return-1!==KR(i).call(i,"Edge")||-1!==KR(i).call(i,"Edg")?(n="Microsoft Edge",-1!==KR(i).call(i,"Edge")?(e=KR(i).call(i,"Edge"),r=i.substring(e+5)):(e=KR(i).call(i,"Edg"),r=i.substring(e+4))):-1!==(e=KR(i).call(i,"MSIE"))?(n="Microsoft Internet Explorer",r=i.substring(e+5)):-1!==(e=KR(i).call(i,"MetaSr"))?(n="sougoubrowser",r=i.substring(e+7,e+10)):-1!==KR(i).call(i,"MQQBrowser")||-1!==KR(i).call(i,"QQBrowser")?(n="qqbrowser",-1!==KR(i).call(i,"MQQBrowser")?(e=KR(i).call(i,"MQQBrowser"),r=i.substring(e+11,e+15)):-1!==KR(i).call(i,"QQBrowser")&&(e=KR(i).call(i,"QQBrowser"),r=i.substring(e+10,e+25))):-1!==KR(i).call(i,"Chrome")?-1!==(e=KR(i).call(i,"MicroMessenger"))?(n="weixin",r=i.substring(e+15,e+20)):-1!==(e=KR(i).call(i,"360"))?(n="360browser",r=i.substring(KR(i).call(i,"Chrome")+7)):-1!==KR(i).call(i,"baidubrowser")||-1!==KR(i).call(i,"BIDUBrowser")?(-1!==KR(i).call(i,"baidubrowser")?(e=KR(i).call(i,"baidubrowser"),r=i.substring(e+13,e+16)):-1!==KR(i).call(i,"BIDUBrowser")&&(e=KR(i).call(i,"BIDUBrowser"),r=i.substring(e+12,e+15)),n="baidubrowser"):-1!==(e=KR(i).call(i,"xiaomi"))?-1!==KR(i).call(i,"openlanguagexiaomi")?(n="openlanguage xiaomi",r=i.substring(e+7,e+13)):(n="xiaomi",r=i.substring(e-7,e-1)):-1!==(e=KR(i).call(i,"TTWebView"))?(n="TTWebView",r=i.substring(e+10,e+23)):(-1!==(e=KR(i).call(i,"Chrome"))||-1!==(e=KR(i).call(i,"Chrome")))&&(n="Chrome",r=i.substring(e+7)):-1!==KR(i).call(i,"Safari")?-1!==(e=KR(i).call(i,"QQ"))?(n="qqbrowser",r=i.substring(e+10,e+16)):-1!==(e=KR(i).call(i,"Safari"))&&(n="Safari",r=i.substring(e+7),-1!==(e=KR(i).call(i,"Version"))&&(r=i.substring(e+8))):-1!==(e=KR(i).call(i,"Firefox"))?(n="Firefox",r=i.substring(e+8)):-1!==(e=KR(i).call(i,"MicroMessenger"))?(n="weixin",r=i.substring(e+15,e+20)):-1!==(e=KR(i).call(i,"QQ"))&&(n="qqbrowser",r=i.substring(e+3,e+8)),-1!==(t=KR(r).call(r,";"))&&(r=r.substring(0,t)),-1!==(t=KR(r).call(r," "))&&(r=r.substring(0,t)),-1!==(t=KR(r).call(r,")"))&&(r=r.substring(0,t)),{browser:n,browser_version:r}},e.prototype.os=function(){for(var e,t="",n="",r=[{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:"Windows",r:/(Windows|Windows NT)/},{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/}],i=0;i<r.length;i++){var o=r[i];if(o.r.test(this.userAgent)){"Mac OS X"===(t=o.s)&&this.isNewIpad()&&(t="iOS");break}}var a,s,c=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?QR(n).call(n,1)[0]:""};switch(/Windows/.test(t)&&(n=c(/Windows (.*)/,t),t="windows"),t){case"Mac OS X":n=l("Mac[ +]OS[ +]X(?:[ /](?:Version )?(\\d+(?:[_\\.]\\d+)+))?",this.userAgent),t="mac";break;case"Android":(s=c(/Android ([\.\_\d]+)/,a=this.userAgent))||(s=c(/Android\/([\.\_\d]+)/,a)),n=s,t="android";break;case"iOS":n=this.isNewIpad()?l("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=KR(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){KR(e).call(e,"Build/")>-1&&(t=QR(e).call(e,0,KR(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 (",""),r=KR(n).call(n,";");t=-1===r?"":QR(n).call(n,0,r)}}catch(i){return dk(t).call(t)}return dk(t).call(t)},e.prototype.isNewIpad=function(){return void 0!==this.userAgent&&"MacIntel"===navigator.platform&&"number"==typeof navigator.maxTouchPoints&&navigator.maxTouchPoints>1},e}(),kK={cn:"1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az1az22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",va:"1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az1gz22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",sg:"1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k"},SK={cn:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az28z1gz1hz1gz1cz18z1nz1gz4az1az1mz1k",sg:"1fz22z22z1nz21z4mz4bz4bz21z1ez18z1jz1gz49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k",va:"1fz22z22z1nz21z4mz4bz4bz1kz18z1jz1gz24z18z49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k",my:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z19z1bz49z1kz27z4az1jz18z20z1iz1mz1dz1dz1gz1az1cz4az1az1mz1k"},EK="5.3.1",MK=(hK("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z1az1bz1lz49z22z1mz21z4az19z27z22z1cz21z1az1kz4az1az1mz1kz4bz1mz19z1hz4bz21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz24z1gz21z23z18z1jz49z1cz1bz1gz22z1mz20z49z20z18z1lz1ez1cz20z21z4az1hz21"),hK("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z1az1bz1lz49z22z1mz21z4az19z27z22z1cz21z1az1kz4az1az1mz1kz4bz1mz19z1hz4bz21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz24z1gz21z23z18z1jz49z18z19z49z1az1mz20z1cz4az1hz21"),hK("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z1az1bz1lz49z22z1mz21z4az19z27z22z1cz21z1az1kz4az1az1mz1kz4bz1mz19z1hz4bz21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz24z1gz21z23z18z1jz49z18z19z49z1jz1mz18z1bz1cz20z4az1hz21"),hK("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z1az1bz1lz49z22z1mz21z4az19z27z22z1cz21z1az1kz4az1az1mz1kz4bz1mz19z1hz4bz21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz1fz1cz18z22z1kz18z1nz49z1az1mz20z1c"),hK("1fz22z22z1nz21z4mz4bz4bz1jz1dz4fz49z1bz18z22z18z4az24z1mz1jz1az1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz1bz18z22z18z49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz22z1cz21z22z1cz20z49z1cz24z1cz1lz22z49z1gz1lz21z1nz1cz1az22z1mz20"),function(){function e(e,t){this.collector=e,this.config=t,this.eventNameWhiteList=["__bav_page","__bav_beat","__bav_page_statistics","__bav_click","__bav_page_exposure","__bav_slide"],this.paramsNameWhiteList=["$inactive","$inline","$target_uuid_list","$source_uuid","$is_spider","$source_id","$is_first_time","_staging_flag"],this.regStr=new RegExp("^[a-zA-Z0-9][a-z0-9A-Z_.-]{1,255}$")}return e.prototype.checkVerify=function(e){var t=this;if(!e||!e.length)return!1;var n=e[0];if(!n)return!1;var r=n.events,i=n.header;if(!r||!r.length)return!1;var o=!0;return r.forEach((function(e){if(!e)return o=!1,void(e.checkEvent="事件异常");t.checkEventName(e.event)||(o=!1,e.checkEvent="事件名不能以 $ or __开头"),t.checkEventParams(e.params)||(o=!1,e.checkParams="属性名不能以 $ or __开头")})),this.checkEventParams(i)||(o=!1),o},e.prototype.checkEventName=function(e){return!!e&&this.calculate(e,"event")},e.prototype.checkEventParams=function(e){var t=e;if("string"==typeof e&&(t=JSON.parse(t)),!WR(t).length)return!0;for(var n in t)return!(!this.calculate(n,"params")||"string"==typeof t[n]&&t[n].length>1024&&(console.warn("params: "+n+" can not over 1024 byte, please check;"),1));return!0},e.prototype.calculate=function(e,t){var n;return-1!==KR(n="event"===t?this.eventNameWhiteList:this.paramsNameWhiteList).call(n,e)||!new RegExp("^\\$").test(e)&&!new RegExp("^__").test(e)||(console.warn(("event"===t?"event":"params")+" name: "+e+" can not start with $ or __, pleace check;"),!1)},e}());!function(e){e.Init="init",e.Config="config",e.Start="start",e.Ready="ready",e.UnReady="un-ready",e.TokenComplete="token-complete",e.TokenStorage="token-storage",e.TokenFetch="token-fetch",e.TokenError="token-error",e.ConfigUuid="config-uuid",e.ConfigWebId="config-webid",e.ConfigDiD="config-device-id",e.ConfigDomain="config-domain",e.CustomWebId="custom-webid",e.TokenChange="token-change",e.TokenReset="token-reset",e.ConfigTransform="config-transform",e.EnvTransform="env-transform",e.SessionReset="session-reset",e.SessionResetTime="session-reset-time",e.SetSessionId="set-session-id",e.Event="event",e.Events="events",e.EventNow="event-now",e.CleanEvents="clean-events",e.BeconEvent="becon-event",e.SubmitBefore="submit-before",e.SubmitScuess="submit-scuess",e.SubmitAfter="submit-after",e.SubmitError="submit-error",e.SubmitVerify="submit-verify",e.CustomHeader="custom-request-header",e.SDKInnerError="sdk-inner-error",e.SDKRunTimeError="sdk-run-time-error",e.LogSetting="log-setting",e.LogSettingReady="log-setting-ready",e.Stay="stay",e.ResetStay="reset-stay",e.StayReady="stay-ready",e.SetStay="set-stay",e.RouteChange="route-change",e.RouteReady="route-ready",e.Ab="ab",e.AbVar="ab-var",e.AbAllVars="ab-all-vars",e.AbConfig="ab-config",e.AbExternalVersion="ab-external-version",e.AbVersionChangeOn="ab-version-change-on",e.AbVersionChangeOff="ab-version-change-off",e.AbOpenLayer="ab-open-layer",e.AbCloseLayer="ab-close-layer",e.AbReady="ab-ready",e.AbComplete="ab-complete",e.AbTimeout="ab-timeout",e.Profile="profile",e.ProfileSet="profile-set",e.ProfileSetOnce="profile-set-once",e.ProfileUnset="profile-unset",e.ProfileIncrement="profile-increment",e.ProfileAppend="profile-append",e.ProfileClear="profile-clear",e.Autotrack="autotrack",e.AutotrackReady="autotrack-ready",e.CepReady="cep-ready",e.TracerReady="tracer-ready",e.sessionRecord="session-record",e.SessionRecordStart="session-record-start",e.SessionRecordPause="session-record-pause",e.SessionRecordEnd="session-record-end",e.SessionRecordReport="session-record-report",e.DestoryInstance="destory-instance",e.VisualCollectReady="visual-collect-ready",e.VisualApiReady="visual-api-ready",e.VisualApiUpdate="visual-api-update"}(sK||(sK={})),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"}(cK||(cK={}));var DK=sK,zK=void 0,AK=(new Date).getTimezoneOffset(),PK=Ow(""+-AK/60,10),xK=60*AK,CK=function(){function e(e,t){var n=this;this.is_first_time=!0,this.configPersist=!1,this.initConfig=t,this.collect=e;var r=new TK(t.app_id,t.cookie_domain||"",t.cookie_expire||7776e6).init();this.eventCheck=new MK(e,t);var i="__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"),t.configPersist&&(this.configPersist=!0,this.storage=1===t.configPersist?this.sessionStorage:this.localStorage);var o=this.localStorage.getItem(i);o&&1==o?this.is_first_time=!1:(this.is_first_time=!0,this.localStorage.setItem(i,"1")),this.envInfo={user:{user_unique_id:zK,user_type:zK,user_id:zK,user_is_auth:zK,user_is_login:zK,device_id:zK,web_id:zK,ip_addr_id:zK,user_unique_id_type:zK},header:{app_id:zK,app_name:zK,app_install_id:zK,install_id:zK,app_package:zK,app_channel:zK,app_version:zK,ab_version:zK,os_name:r.os_name,os_version:r.os_version,device_model:r.device_model,ab_client:zK,traffic_type:zK,client_ip:zK,device_brand:zK,os_api:zK,access:zK,language:r.language,region:zK,app_language:zK,app_region:zK,creative_id:r.utm.creative_id,ad_id:r.utm.ad_id,campaign_id:r.utm.campaign_id,log_type:zK,rnd:zK,platform:r.platform,sdk_version:EK,sdk_lib:"js",province:zK,city:zK,timezone:PK,tz_offset:xK,tz_name:zK,sim_region:zK,carrier:zK,resolution:r.screen_width+"x"+r.screen_height,browser:r.browser,browser_version:r.browser_version,referrer:r.referrer,referrer_host:r.referrer_host,width:r.screen_width,height:r.screen_height,screen_width:r.screen_width,screen_height:r.screen_height,utm_term:r.utm.utm_term,utm_content:r.utm.utm_content,utm_source:r.utm.utm_source,utm_medium:r.utm.utm_medium,utm_campaign:r.utm.utm_campaign,tracer_data:Jx(r.utm.tracer_data),custom:r.network_type?{network_type:r.network_type}:{},wechat_unionid:zK,wechat_openid:zK}},this.ab_version="",this.evtParams={},this.reportErrorCallback=function(){},this.isLast=!1,this.setCustom(r),this.initDomain(),this.initABData(),this.collect.on("route-change",(function(e){n.changeReferInfo(e.config)}))}return e.prototype.initDomain=function(){var e=this.initConfig.channel_domain;if(e)this.domain=e;else{var t=this.initConfig.channel;this.domain=hK(SK[t])}},e.prototype.setDomain=function(e){this.domain=e},e.prototype.getDomain=function(){return this.domain},e.prototype.initABData=function(){var e="__tea_sdk_ab_version_"+this.initConfig.app_id,t=null;if(this.initConfig.ab_cross){var n=this.localStorage.getCookie(e,this.initConfig.ab_cookie_domain);t=n?JSON.parse(n):null}else t=this.localStorage.getItem(e);this.setAbCache(t)},e.prototype.setAbCache=function(e){this.ab_cache=e},e.prototype.getAbCache=function(){return this.ab_cache},e.prototype.setAbVersion=function(e){this.ab_version=e},e.prototype.getAbVersion=function(){return this.ab_version},e.prototype.clearAbCache=function(){this.ab_version="",this.ab_cache={}},e.prototype.getUrl=function(e){var t="";switch(e){case"event":t="/list";break;case"webid":t="/webid";break;case"tobid":t="/tobid"}var n="";return this.initConfig.caller&&(n="?sdk_version=5.3.1&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.changeReferInfo=function(e){var t=e;this.envInfo.header.referrer=t.referrer;var n="";try{n=new Qx(t.referrer).host}catch(r){}this.envInfo.header.referrer_host=n||this.envInfo.header.referrer_host},e.prototype.set=function(e){var t=this;WR(e).forEach((function(n){void 0!==e[n]&&null!==e[n]||t.delete(n);try{t.eventCheck.calculate(n,"config")}catch(oK){}if("traffic_type"===n&&t.isLast&&(t.envInfo.header.custom.$latest_traffic_source_type=e[n]),"evtParams"===n)t.evtParams=eK(eK({},t.evtParams||{}),e.evtParams||{});else if("_staging_flag"===n)t.evtParams=eK(eK({},t.evtParams||{}),{_staging_flag:e._staging_flag});else if("reportErrorCallback"===n&&"function"==typeof e[n])t.reportErrorCallback=e[n];else{var r,i,o,a="",s="";if(KR(n).call(n,".")>-1){var c=n.split(".");a=c[0],s=c[1]}a?"user"===a||"header"===a?t.envInfo[a][s]=e[n]:(t.envInfo.header.custom[s]=e[n],t.collect.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK 添加了Custom",level:"info",time:Date.now(),infoType:"sdk",secType:"HEADER",common:"custom"})):Object.hasOwnProperty.call(t.envInfo.user,n)?(KR(r=["user_type","ip_addr_id"]).call(r,n)>-1?t.envInfo.user[n]=e[n]?Number(e[n]):e[n]:KR(i=["user_id","web_id","user_unique_id","user_unique_id_type"]).call(i,n)>-1?t.envInfo.user[n]=e[n]?String(e[n]):e[n]:KR(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(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK 修改了公共参数",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(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK 修改了公共参数",level:"info",time:Date.now(),infoType:"sdk",secType:"HEADER",common:n})):(t.envInfo.header.custom[n]=e[n],t.collect.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK 添加了Custom",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(Jx(this.envInfo[e])):JSON.parse(Jx(this.envInfo))}catch(t){console.log("get config stringify error "),this.collect.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:t.message})}},e.prototype.setStore=function(e){try{if(!this.configPersist)return;var t=this.storage.getItem(this.configKey)||{};if(t&&WR(e).length){var n=cG(e,t);this.storage.setItem(this.configKey,n)}}catch(r){console.log("setStore error"),this.collect.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:r.message})}},e.prototype.getStore=function(){try{if(!this.configPersist)return null;var e=this.storage.getItem(this.configKey)||{};return e&&WR(e).length?e:null}catch(t){return this.collect.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:t.message}),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(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:n.message}),console.log("delete error")}},e}(),FK=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;","[AppLog WEB SDK] [instance: "+this.name+"] "+e)},e.prototype.warn=function(e){this.isLog&&console.warn("[AppLog WEB SDK] [instance: "+this.name+"] "+e)},e.prototype.error=function(e){this.isLog&&console.error("[AppLog WEB SDK] [instance: "+this.name+"] "+e)},e.prototype.throw=function(e){throw this.error(this.name),new Error(e)},e}(),IK=function(){function e(){this.spiderBot=["Baiduspider","googlebot","360Spider","haosouspider","YoudaoBot","Sogou News Spider","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!==KR(t).call(t,e)&&(n=!0)})),n},e}(),HK=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 jR((function(t,n){try{e.bridgeInject()?AppLogBridge.hasStarted((function(e){console.log("AppLogBridge is started? : "+e),e?t(!0):n(!1)})):n(!1)}catch(r){console.log("AppLogBridge, error:"+Jx(r.stack)),n(!1)}}))},t.setNativeAppId=function(e){try{AppLogBridge.setNativeAppId(Jx(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{WR(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(Jx(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埋点上报",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}(),OK=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)}))},LK=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(DK.SessionReset,(function(e){n.resetSessionId(e)})),this.collect.on(DK.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:OK(),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:OK(),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||OK(),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:OK(),timestamp:Date.now()},this.storage.setItem(this.sessionKey,e))},e}(),XK=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.eventCheck=new MK(e,t),this.cacheStorgae=new GK(!0),this.localStorage=new GK(!1),this.maxReport=t.max_report||10,this.reportTime=t.reportTime||t.report_time||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.pageId=OK(),this.collect.on(DK.Ready,(function(){n.reportAll(!1)})),this.collect.on(DK.ConfigDomain,(function(){n.reportUrl=n.configManager.getUrl("event")})),this.collect.on(DK.Event,(function(e){n.event(e)})),this.collect.on(DK.BeconEvent,(function(e){n.beconEvent(e)})),this.collect.on(DK.CleanEvents,(function(){n.reportAll(!1)}));var r=this.linster();this.collect.on(DK.DestoryInstance,(function(){r&&r()}))},e.prototype.linster=function(){var e,t=this,n=function(){t.reportAll(!0)};window.addEventListener("unload",n,!1),e=n,fK()?window.addEventListener("pagehide",e,!1):window.addEventListener("beforeunload",e,!1);var r=function(){"hidden"===document.visibilityState&&t.reportAll(!0)};return document.addEventListener("visibilitychange",r,!1),function(){window.removeEventListener("unload",n),window.removeEventListener("pagehide",n,!1),window.removeEventListener("beforeunload",n,!1),document.removeEventListener("visibilitychange",r,!1)}},e.prototype.reportAll=function(e){this.report(e),this.reportBecon()},e.prototype.event=function(e){var t=this;try{if(this.collect.destroy)return;if(this.collect.sdkStop)return;if(this.config.enable_ios_sendbeacon&&fK())return void this.beconEvent(e);var n=this.cacheStorgae.getItem(this.eventKey)||[],r=e;this.config.batch_event&&(r=this.batchEvent(e));var i=nK(r,n);if(this.cacheStorgae.setItem(this.eventKey,i),this.reportTimeout&&clearTimeout(this.reportTimeout),i.length>=this.maxReport)this.report(!1);else{var o=this.reportTime;this.reportTimeout=setTimeout((function(){t.report(!1),t.reportTimeout=null}),o)}}catch(a){this.collect.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK 发生了异常",level:"error",time:Date.now(),data:a.message,infoType:"sdk"})}},e.prototype.beconEvent=function(e){if(!this.collect.destroy&&!this.collect.sdkStop){var t=nK(e,this.cacheStorgae.getItem(this.beconKey)||[]);this.cacheStorgae.setItem(this.beconKey,t),this.collect.tokenManager.getReady()&&this.collect.sdkReady&&(this.cacheStorgae.removeItem(this.beconKey),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)||[];e&&e.length&&(this.cacheStorgae.removeItem(this.beconKey),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.config.batch_event?this.send([t],e):this.sliceEvent(t,e))}},e.prototype.batchEvent=function(e){var t=[];if(e.length>this.eventLimit)for(var n=0;n<e.length;n+=this.eventLimit){var r;r=QR(e).call(e,n,n+this.eventLimit);var i=this.merge(r);t.push(i)}else t=i=this.merge(e);return t},e.prototype.sliceEvent=function(e,t){if(e.length>this.eventLimit)for(var n=0;n<e.length;n+=this.eventLimit){var r;r=QR(e).call(e,n,n+this.eventLimit);var i=this.split(this.merge(r));this.send(i,t)}else i=this.split(this.merge(e)),this.send(i,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,r=this.configManager.get(),i=r.header,o=r.user;this.config.enable_pageid&&(i.custom.page_id=this.pageId),i.custom=Jx(i.custom);var a=this.configManager.get("evtParams"),s=this.configManager.get("user_unique_id_type"),c=[];try{var l=Ww(e).call(e,(function(e){try{WR(a).length&&!t&&(e.params=eK(eK({},a),e.params)),s&&(e.params.$user_unique_id_type=s);var r=n.configManager.getAbCache(),i=o[n.config.ab_user_mode]||o.user_unique_id;return r&&r.uuid&&r.uuid===i&&n.configManager.getAbVersion()&&(e.ab_sdk_version=n.configManager.getAbVersion()),e.session_id=n.collect.sessionManager.getSessionId(),e.params=Jx(e.params),e}catch(oK){return console.warn("filter merge event: "+(e&&e.event)+" error, pls check",oK&&oK.message),n.collect.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK 处理Event数据异常",level:"error",time:Date.now(),data:oK.message,infoType:"sdk"}),!1}})),u=JSON.parse(Jx({events:l,user:o,header:i}));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,c.push(u)}catch(oK){console.warn("event merge error, pls check",oK&&oK.message)}return c},e.prototype.split=function(e){return VR(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,r=this.logSetting.getSettingData("blocklist_events").block_event;t=Xm(n).call(n,Ww(r).call(r,(function(e){return-1===KR(n).call(n,e)})))}return!(t&&t.length&&OC(t).call(t,e))}catch(i){return!0}},e.prototype.whiteEvent=function(e){var t;try{var n;return null===(t=this.whiteList)||void 0===t||!t.length||!!OC(n=this.whiteList).call(n,e)}catch(r){return!0}},e.prototype.customAllowFilter=function(e,t){try{if(t)return Jx(e);if(!this.config.enable_logsetting||!this.config.enable_logsetting_header_custom)return Jx(e);var n=this.logSetting.getSettingData().header_custom_allow,r={};if(n&&n.length&&WR(e).length){var i=new Jj(n);for(var o in e)i.has(o)&&(r[o]=e[o])}return Jx(r)}catch(a){return this.collect.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK 执行customAllowFilter发生了异常",level:"error",time:Date.now(),data:a.message,infoType:"sdk"}),Jx(e)}},e.prototype.paramsAllowFilter=function(e,t){try{if(t)return Jx(e.params);if(!this.config.enable_logsetting||!this.config.enable_logsetting_params)return Jx(e.params);var n=this.logSetting.getSettingData().params_block,r=e.event,i=e.params,o={};if(n&&n[r]&&n[r].length){var a=new Jj(n[r]);for(var s in i)!this.logSetting.getPredefineParamsList().has(s)&&a.has(s)||(o[s]=i[s]);return Jx(o)}return Jx(e.params)}catch(c){return this.collect.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK 执行paramsAllowFilter发生了异常",level:"error",time:Date.now(),data:c.message,infoType:"sdk"}),Jx(e.params)}},e.prototype.send=function(e,t){var n=this;e.length&&(this.config.disable_track_event||e.forEach((function(e){try{var r,i=JSON.parse(Jx(e));Ww(n.config)&&((i=Ww(r=n.config).call(r,i))||console.warn("filter must return data !!")),n.collect.eventFilter&&i&&((i=n.collect.eventFilter(i))||console.warn("filterEvent api must return data !!"));var o=i||e,a=JSON.parse(Jx(o));if(n.eventCheck.checkVerify(a),!o.length)return;var s=!0;if(o.forEach((function(e){e.events.length||(s=!1)})),!s)return;n.collect.emit(DK.SubmitBefore,o),n.collect.requestManager.useRequest({url:n.reportUrl,data:o,success:function(e,t){e&&0!==e.e?(n.collect.emit(DK.SubmitError,{type:"f_data",eventData:t,errorCode:e.e,response:e}),n.collect.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_EVENT,info:"埋点上报失败",time:Date.now(),data:a,code:e.e,msg:e.m||"",failType:"数据异常失败",status:"fail"})):(n.collect.emit(DK.SubmitScuess,{eventData:t,res:e}),n.collect.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_EVENT,info:"埋点上报成功",time:Date.now(),data:a,code:200,status:"success"}))},fail:function(e,t){n.configManager.get("reportErrorCallback")(e,t),n.collect.emit(DK.SubmitError,{type:"f_net",eventData:e,errorCode:t}),n.collect.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_EVENT,info:"埋点上报网络异常",time:Date.now(),data:a,code:t,failType:"网络异常失败",status:"fail"})},timeout:n.timeout,useBeacon:t,withCredentials:n.enable_ttwebid,zip:!0}),n.collect.emit(DK.SubmitAfter,o)}catch(c){console.warn("something error, "+Jx(c.stack)),n.collect.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK发送埋点发生了异常",level:"error",time:Date.now(),data:c.message,infoType:"sdk"})}})))},e}(),UK=function(){var e;return QR(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)},BK=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(DK.ConfigUuid,(function(e){n.setUuid(e)})),this.collect.on(DK.ConfigWebId,(function(e){n.setWebId(e)})),this.collect.on(DK.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;if(this.enableCookie){var t=this.storage.getCookie(this.tokenKey,this.cookieDomain);this.cacheToken=t&&"string"==typeof t?JSON.parse(t):{}}else 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(DK.CustomWebId,(function(){e.tokenReady=!0,e.collect.emit(DK.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:UK(),user_unique_id:this.configManager.get("user_unique_id")||UK()}):this.remoteWebid()},e.prototype.checkEnv=function(){var e=window.navigator.userAgent;if(-1!==KR(e).call(e,"miniProgram")||-1!==KR(e).call(e,"MiniProgram")){var t=vK(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(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK 发起WebID请求",logType:"fetch",level:"info",time:Date.now(),data:n,infoType:"sdk"}),this.collect.requestManager.useRequest({url:t,data:n,success:function(t){var n;if(t&&0===t.e)n=t.web_id,e.collect.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"WebID请求成功",logType:"fetch",level:"info",time:Date.now(),data:t,infoType:"sdk"});else{var r=UK();n=r,e.collect.configManager.set({localWebId:r}),e.collect.emit(DK.TokenError),e.collect.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"WebID请求返回值异常,采用本地生成",logType:"fetch",level:"warn",time:Date.now(),data:t,infoType:"sdk"}),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(){var t=UK();e.complete({web_id:e.configManager.get("web_id")||t,user_unique_id:e.configManager.get("user_unique_id")||t}),e.collect.configManager.set({localWebId:t}),e.collect.emit(DK.TokenError),e.collect.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"WebID请求网络异常,采用本地生成",logType:"fetch",level:"error",time:Date.now(),data:{localWebId:t},infoType:"sdk"}),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,r=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 i=this.configManager.get("device_id")||r||t;this.collect.configManager.set({device_id:i}),e=eK(eK({},e),{device_id:i})}else(null==e?void 0:e.device_id)&&delete e.device_id;this.setStorage(e),this.tokenReady=!0,this.collect.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK 完成用户信息设置",logType:"info",level:"info",time:Date.now(),data:{web_id:t,user_unique_id:n},infoType:"sdk"}),this.collect.emit(DK.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(DK.TokenComplete)},e.prototype.setUuid=function(e){var t;if(e&&-1===KR(t=["null","undefined","Null","None"]).call(t,e)){var n=String(e),r=this.configManager.get("user_unique_id"),i=this.cacheToken&&this.cacheToken.user_unique_id;if(n===r&&n===i)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(DK.TokenChange,"uuid"),this.collect.emit(DK.SessionReset)}else this.clearUuid()},e.prototype.clearUuid=function(){this.config.enable_ttwebid||this.configManager.get("web_id")&&this.configManager.get("user_unique_id")!==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(DK.TokenReset,"uuid"))},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(DK.TokenChange,"uuid")),t!==e&&(this.configManager.set({web_id:e}),this.collect.emit(DK.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[WF(t="diss".split("")).call(t).join("")],this.enableCookie||this.enable_ttwebid?(this.storage.setCookie(this.tokenKey,e,this.expiresTime,this.cookieDomain),this.enable_ttwebid&&(delete e.web_id,this.storage.setItem(this.tokenKey,e))):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 jR((function(t){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(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK 发起GetToken请求",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(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"GetToken请求成功",logType:"fetch",level:"info",time:Date.now(),data:n,infoType:"sdk"})):(t(""),e.collect.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"GetToken请求失败",logType:"fetch",level:"error",time:Date.now(),data:n,infoType:"sdk"}))},fail:function(){t(""),e.collect.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"GetToken请求失败",logType:"fetch",level:"error",time:Date.now(),infoType:"sdk"})},time:3e4,withCredentials:e.enable_ttwebid})}))},e}();function NK(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]),jK=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]),KK=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),WK=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);NK(QK);var qK=new Array(60);NK(qK);var ZK=new Array(512);NK(ZK);var YK=new Array(256);NK(YK);var $K=new Array(29);NK($K);var JK,eW,tW,nW=new Array(30);function rW(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function iW(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}NK(nW);var oW=function(e){return e<256?ZK[e]:ZK[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)},cW=function(e,t,n){sW(e,n[2*t],n[2*t+1])},lW=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 r,i,o=new Array(16),a=0;for(r=1;r<=15;r++)a=a+n[r-1]<<1,o[r]=a;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=lW(o[s]++,s))}},dW=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},hW=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,r){var i=2*t,o=2*n;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]},pW=function(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&fW(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!fW(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},vW=function(e,t,n){var r,i,o,a,s=0;if(0!==e.sym_next)do{r=255&e.pending_buf[e.sym_buf+s++],r+=(255&e.pending_buf[e.sym_buf+s++])<<8,i=e.pending_buf[e.sym_buf+s++],0===r?cW(e,i,t):(o=YK[i],cW(e,o+256+1,t),0!==(a=VK[o])&&(i-=$K[o],sW(e,i,a)),o=oW(--r),cW(e,o,n),0!==(a=jK[o])&&(r-=nW[o],sW(e,r,a)))}while(s<e.sym_next);cW(e,256,t)},gW=function(e,t){var n,r,i,o=t.dyn_tree,a=t.stat_desc.static_tree,s=t.stat_desc.has_stree,c=t.stat_desc.elems,l=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<c;n++)0!==o[2*n]?(e.heap[++e.heap_len]=l=n,e.depth[n]=0):o[2*n+1]=0;for(;e.heap_len<2;)o[2*(i=e.heap[++e.heap_len]=l<2?++l:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=a[2*i+1]);for(t.max_code=l,n=e.heap_len>>1;n>=1;n--)pW(e,o,n);i=c;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],pW(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*i]=o[2*n]+o[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=i,e.heap[1]=i++,pW(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,o,a,s,c=t.dyn_tree,l=t.max_code,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,h=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(c[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(o=c[2*c[2*(r=e.heap[n])+1]+1]+1)>p&&(o=p,v++),c[2*r+1]=o,r>l||(e.bl_count[o]++,a=0,r>=f&&(a=h[r-f]),s=c[2*r],e.opt_len+=s*(o+a),d&&(e.static_len+=s*(u[2*r+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(r=e.bl_count[o];0!==r;)(i=e.heap[--n])>l||(c[2*i+1]!==o&&(e.opt_len+=(o-c[2*i+1])*c[2*i],c[2*i+1]=o),r--)}}(e,t),uW(o,l,e.bl_count)},yW=function(e,t,n){var r,i,o=-1,a=t[1],s=0,c=7,l=4;for(0===a&&(c=138,l=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=t[2*(r+1)+1],++s<c&&i===a||(s<l?e.bl_tree[2*i]+=s:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,o=i,0===a?(c=138,l=3):i===a?(c=6,l=3):(c=7,l=4))},mW=function(e,t,n){var r,i,o=-1,a=t[1],s=0,c=7,l=4;for(0===a&&(c=138,l=3),r=0;r<=n;r++)if(i=a,a=t[2*(r+1)+1],!(++s<c&&i===a)){if(s<l)do{cW(e,i,e.bl_tree)}while(0!=--s);else 0!==i?(i!==o&&(cW(e,i,e.bl_tree),s--),cW(e,16,e.bl_tree),sW(e,s-3,2)):s<=10?(cW(e,17,e.bl_tree),sW(e,s-3,3)):(cW(e,18,e.bl_tree),sW(e,s-11,7));s=0,o=i,0===a?(c=138,l=3):i===a?(c=6,l=3):(c=7,l=4)}},_W=!1,bW=function(e,t,n,r){sW(e,0+(r?1:0),3),hW(e),aW(e,n),aW(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},RW=function(e){_W||(function(){var e,t,n,r,i,o=new Array(16);for(n=0,r=0;r<28;r++)for($K[r]=n,e=0;e<1<<VK[r];e++)YK[n++]=r;for(YK[n-1]=r,i=0,r=0;r<16;r++)for(nW[r]=i,e=0;e<1<<jK[r];e++)ZK[i++]=r;for(i>>=7;r<30;r++)for(nW[r]=i<<7,e=0;e<1<<jK[r]-7;e++)ZK[256+i++]=r;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++)qK[2*e+1]=5,qK[2*e]=lW(e,5);JK=new rW(QK,VK,257,286,15),eW=new rW(qK,jK,0,30,15),tW=new rW(new Array(0),KK,0,19,7)}(),_W=!0),e.l_desc=new iW(e.dyn_ltree,JK),e.d_desc=new iW(e.dyn_dtree,eW),e.bl_desc=new iW(e.bl_tree,tW),e.bi_buf=0,e.bi_valid=0,dW(e)},wW=bW,GW=function(e,t,n,r){var i,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*WK[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(o=e.static_len+3+7>>>3)<=i&&(i=o)):i=o=n+5,n+4<=i&&-1!==t?bW(e,t,n,r):4===e.strategy||o===i?(sW(e,2+(r?1:0),3),vW(e,QK,qK)):(sW(e,4+(r?1:0),3),function(e,t,n,r){var i;for(sW(e,t-257,5),sW(e,n-1,5),sW(e,r-4,4),i=0;i<r;i++)sW(e,e.bl_tree[2*WK[i]+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)),dW(e),r&&hW(e)},TW=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*(YK[n]+256+1)]++,e.dyn_dtree[2*oW(t)]++),e.sym_next===e.sym_end},kW=function(e){var t;sW(e,2,3),cW(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)},SW=function(e,t,n,r){for(var i=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{o=o+(i=i+t[r++]|0)|0}while(--a);i%=65521,o%=65521}return i|o<<16|0},EW=new Uint32Array(function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}()),MW=function(e,t,n,r){var i=EW,o=r+n;e^=-1;for(var a=r;a<o;a++)e=e>>>8^i[255&(e^t[a])];return-1^e},DW={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"},zW={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},AW=RW,PW=wW,xW=GW,CW=TW,FW=kW,IW=zW.Z_NO_FLUSH,HW=zW.Z_PARTIAL_FLUSH,OW=zW.Z_FULL_FLUSH,LW=zW.Z_FINISH,XW=zW.Z_BLOCK,UW=zW.Z_OK,BW=zW.Z_STREAM_END,NW=zW.Z_STREAM_ERROR,VW=zW.Z_DATA_ERROR,jW=zW.Z_BUF_ERROR,KW=zW.Z_DEFAULT_COMPRESSION,WW=zW.Z_FILTERED,QW=zW.Z_HUFFMAN_ONLY,qW=zW.Z_RLE,ZW=zW.Z_FIXED,YW=zW.Z_DEFAULT_STRATEGY,$W=zW.Z_UNKNOWN,JW=zW.Z_DEFLATED,eQ=function(e,t){return e.msg=DW[t],t},tQ=function(e){return 2*e-(e>4?9:0)},nQ=function(e){for(var t=e.length;--t>=0;)e[t]=0},rQ=function(e){var t,n,r,i=e.w_size;r=t=e.hash_size;do{n=e.head[--r],e.head[r]=n>=i?n-i:0}while(--t);r=t=i;do{n=e.prev[--r],e.prev[r]=n>=i?n-i:0}while(--t)},iQ=function(e,t,n){return(t<<e.hash_shift^n)&e.hash_mask},oQ=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))},aQ=function(e,t){xW(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,oQ(e.strm)},sQ=function(e,t){e.pending_buf[e.pending++]=t},cQ=function(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},lQ=function(e,t,n,r){var i=e.avail_in;return i>r&&(i=r),0===i?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),1===e.state.wrap?e.adler=SW(e.adler,t,i,n):2===e.state.wrap&&(e.adler=MW(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},uQ=function(e,t){var n,r,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,l=e.window,u=e.w_mask,d=e.prev,h=e.strstart+258,f=l[o+a-1],p=l[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(l[(n=t)+a]===p&&l[n+a-1]===f&&l[n]===l[o]&&l[++n]===l[o+1]){o+=2,n++;do{}while(l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&o<h);if(r=258-(h-o),o=h-258,r>a){if(e.match_start=t,a=r,r>=s)break;f=l[o+a-1],p=l[o+a]}}}while((t=d[t&u])>c&&0!=--i);return a<=e.lookahead?a:e.lookahead},dQ=function(e){var t,n,r,i=e.w_size;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=i+(i-262)&&(e.window.set(e.window.subarray(i,i+i-n),0),e.match_start-=i,e.strstart-=i,e.block_start-=i,e.insert>e.strstart&&(e.insert=e.strstart),rQ(e),n+=i),0===e.strm.avail_in)break;if(t=lQ(e.strm,e.window,e.strstart+e.lookahead,n),e.lookahead+=t,e.lookahead+e.insert>=3)for(r=e.strstart-e.insert,e.ins_h=e.window[r],e.ins_h=iQ(e,e.ins_h,e.window[r+1]);e.insert&&(e.ins_h=iQ(e,e.ins_h,e.window[r+3-1]),e.prev[r&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=r,r++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&0!==e.strm.avail_in)},hQ=function(e,t){var n,r,i,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,i=e.bi_valid+42>>3,e.strm.avail_out<i)break;if(i=e.strm.avail_out-i,n>(r=e.strstart-e.block_start)+e.strm.avail_in&&(n=r+e.strm.avail_in),n>i&&(n=i),n<o&&(0===n&&t!==LW||t===IW||n!==r+e.strm.avail_in))break;a=t===LW&&n===r+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,oQ(e.strm),r&&(r>n&&(r=n),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+r),e.strm.next_out),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r,e.block_start+=r,n-=r),n&&(lQ(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!==IW&&t!==LW&&0===e.strm.avail_in&&e.strstart===e.block_start?2:(i=e.window_size-e.strstart,e.strm.avail_in>i&&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++,i+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),i>e.strm.avail_in&&(i=e.strm.avail_in),i&&(lQ(e.strm,e.window,e.strstart,i),e.strstart+=i,e.insert+=i>e.w_size-e.insert?e.w_size-e.insert:i),e.high_water<e.strstart&&(e.high_water=e.strstart),i=e.bi_valid+42>>3,o=(i=e.pending_buf_size-i>65535?65535:e.pending_buf_size-i)>e.w_size?e.w_size:i,((r=e.strstart-e.block_start)>=o||(r||t===LW)&&t!==IW&&0===e.strm.avail_in&&r<=i)&&(n=r>i?i:r,a=t===LW&&0===e.strm.avail_in&&n===r?1:0,PW(e,e.block_start,n,a),e.block_start+=n,oQ(e.strm)),a?3:1)},fQ=function(e,t){for(var n,r;;){if(e.lookahead<262){if(dQ(e),e.lookahead<262&&t===IW)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=iQ(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=uQ(e,n)),e.match_length>=3)if(r=CW(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=iQ(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=iQ(e,e.ins_h,e.window[e.strstart+1]);else r=CW(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(aQ(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===LW?(aQ(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(aQ(e,!1),0===e.strm.avail_out)?1:2},pQ=function(e,t){for(var n,r,i;;){if(e.lookahead<262){if(dQ(e),e.lookahead<262&&t===IW)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=iQ(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=uQ(e,n),e.match_length<=5&&(e.strategy===WW||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,r=CW(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=iQ(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++,r&&(aQ(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=CW(e,0,e.window[e.strstart-1]))&&aQ(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&&(r=CW(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===LW?(aQ(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(aQ(e,!1),0===e.strm.avail_out)?1:2};function vQ(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}var gQ=[new vQ(0,0,0,0,hQ),new vQ(4,4,8,4,fQ),new vQ(4,5,16,8,fQ),new vQ(4,6,32,32,fQ),new vQ(4,4,16,16,pQ),new vQ(8,16,32,32,pQ),new vQ(8,16,128,128,pQ),new vQ(8,32,128,256,pQ),new vQ(32,128,258,1024,pQ),new vQ(32,258,258,4096,pQ)];function yQ(){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),nQ(this.dyn_ltree),nQ(this.dyn_dtree),nQ(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),nQ(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),nQ(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 mQ=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},_Q=function(e){if(mQ(e))return eQ(e,NW);e.total_in=e.total_out=0,e.data_type=$W;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,AW(t),UW},bQ=function(e){var t,n=_Q(e);return n===UW&&((t=e.state).window_size=2*t.w_size,nQ(t.head),t.max_lazy_match=gQ[t.level].max_lazy,t.good_match=gQ[t.level].good_length,t.nice_match=gQ[t.level].nice_length,t.max_chain_length=gQ[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},RQ=function(e,t,n,r,i,o){if(!e)return NW;var a=1;if(t===KW&&(t=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),i<1||i>9||n!==JW||r<8||r>15||t<0||t>9||o<0||o>ZW||8===r&&1!==a)return eQ(e,NW);8===r&&(r=9);var s=new yQ;return e.state=s,s.strm=e,s.status=42,s.wrap=a,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+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<<i+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,bQ(e)},wQ={deflateInit:function(e,t){return RQ(e,t,JW,15,8,YW)},deflateInit2:RQ,deflateReset:bQ,deflateResetKeep:_Q,deflateSetHeader:function(e,t){return mQ(e)||2!==e.state.wrap?NW:(e.state.gzhead=t,UW)},deflate:function(e,t){if(mQ(e)||t>XW||t<0)return e?eQ(e,NW):NW;var n=e.state;if(!e.output||0!==e.avail_in&&!e.input||666===n.status&&t!==LW)return eQ(e,0===e.avail_out?jW:NW);var r=n.last_flush;if(n.last_flush=t,0!==n.pending){if(oQ(e),0===e.avail_out)return n.last_flush=-1,UW}else if(0===e.avail_in&&tQ(t)<=tQ(r)&&t!==LW)return eQ(e,jW);if(666===n.status&&0!==e.avail_in)return eQ(e,jW);if(42===n.status&&0===n.wrap&&(n.status=113),42===n.status){var i=JW+(n.w_bits-8<<4)<<8;if(i|=(n.strategy>=QW||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(i|=32),cQ(n,i+=31-i%31),0!==n.strstart&&(cQ(n,e.adler>>>16),cQ(n,65535&e.adler)),e.adler=1,n.status=113,oQ(e),0!==n.pending)return n.last_flush=-1,UW}if(57===n.status)if(e.adler=0,sQ(n,31),sQ(n,139),sQ(n,8),n.gzhead)sQ(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)),sQ(n,255&n.gzhead.time),sQ(n,n.gzhead.time>>8&255),sQ(n,n.gzhead.time>>16&255),sQ(n,n.gzhead.time>>24&255),sQ(n,9===n.level?2:n.strategy>=QW||n.level<2?4:0),sQ(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(sQ(n,255&n.gzhead.extra.length),sQ(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=MW(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69;else if(sQ(n,0),sQ(n,0),sQ(n,0),sQ(n,0),sQ(n,0),sQ(n,9===n.level?2:n.strategy>=QW||n.level<2?4:0),sQ(n,3),n.status=113,oQ(e),0!==n.pending)return n.last_flush=-1,UW;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=MW(e.adler,n.pending_buf,n.pending-o,o)),n.gzindex+=s,oQ(e),0!==n.pending)return n.last_flush=-1,UW;o=0,a-=s}var c=new Uint8Array(n.gzhead.extra);n.pending_buf.set(c.subarray(n.gzindex,n.gzindex+a),n.pending),n.pending+=a,n.gzhead.hcrc&&n.pending>o&&(e.adler=MW(e.adler,n.pending_buf,n.pending-o,o)),n.gzindex=0}n.status=73}if(73===n.status){if(n.gzhead.name){var l,u=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>u&&(e.adler=MW(e.adler,n.pending_buf,n.pending-u,u)),oQ(e),0!==n.pending)return n.last_flush=-1,UW;u=0}l=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,sQ(n,l)}while(0!==l);n.gzhead.hcrc&&n.pending>u&&(e.adler=MW(e.adler,n.pending_buf,n.pending-u,u)),n.gzindex=0}n.status=91}if(91===n.status){if(n.gzhead.comment){var d,h=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>h&&(e.adler=MW(e.adler,n.pending_buf,n.pending-h,h)),oQ(e),0!==n.pending)return n.last_flush=-1,UW;h=0}d=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,sQ(n,d)}while(0!==d);n.gzhead.hcrc&&n.pending>h&&(e.adler=MW(e.adler,n.pending_buf,n.pending-h,h))}n.status=103}if(103===n.status){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(oQ(e),0!==n.pending))return n.last_flush=-1,UW;sQ(n,255&e.adler),sQ(n,e.adler>>8&255),e.adler=0}if(n.status=113,oQ(e),0!==n.pending)return n.last_flush=-1,UW}if(0!==e.avail_in||0!==n.lookahead||t!==IW&&666!==n.status){var f=0===n.level?hQ(n,t):n.strategy===QW?function(e,t){for(var n;;){if(0===e.lookahead&&(dQ(e),0===e.lookahead)){if(t===IW)return 1;break}if(e.match_length=0,n=CW(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(aQ(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===LW?(aQ(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(aQ(e,!1),0===e.strm.avail_out)?1:2}(n,t):n.strategy===qW?function(e,t){for(var n,r,i,o,a=e.window;;){if(e.lookahead<=258){if(dQ(e),e.lookahead<=258&&t===IW)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=a[i=e.strstart-1])===a[++i]&&r===a[++i]&&r===a[++i]){o=e.strstart+258;do{}while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&i<o);e.match_length=258-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=CW(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=CW(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(aQ(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===LW?(aQ(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(aQ(e,!1),0===e.strm.avail_out)?1:2}(n,t):gQ[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),UW;if(2===f&&(t===HW?FW(n):t!==XW&&(PW(n,0,0,!1),t===OW&&(nQ(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),oQ(e),0===e.avail_out))return n.last_flush=-1,UW}return t!==LW?UW:n.wrap<=0?BW:(2===n.wrap?(sQ(n,255&e.adler),sQ(n,e.adler>>8&255),sQ(n,e.adler>>16&255),sQ(n,e.adler>>24&255),sQ(n,255&e.total_in),sQ(n,e.total_in>>8&255),sQ(n,e.total_in>>16&255),sQ(n,e.total_in>>24&255)):(cQ(n,e.adler>>>16),cQ(n,65535&e.adler)),oQ(e),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?UW:BW)},deflateEnd:function(e){if(mQ(e))return NW;var t=e.state.status;return e.state=null,113===t?eQ(e,VW):UW},deflateSetDictionary:function(e,t){var n=t.length;if(mQ(e))return NW;var r=e.state,i=r.wrap;if(2===i||1===i&&42!==r.status||r.lookahead)return NW;if(1===i&&(e.adler=SW(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){0===i&&(nQ(r.head),r.strstart=0,r.block_start=0,r.insert=0);var o=new Uint8Array(r.w_size);o.set(t.subarray(n-r.w_size,n),0),t=o,n=r.w_size}var a=e.avail_in,s=e.next_in,c=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,dQ(r);r.lookahead>=3;){var l=r.strstart,u=r.lookahead-2;do{r.ins_h=iQ(r,r.ins_h,r.window[l+3-1]),r.prev[l&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=l,l++}while(--u);r.strstart=l,r.lookahead=2,dQ(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=s,e.input=c,e.avail_in=a,r.wrap=i,UW},deflateInfo:"pako deflate (from Nodeca project)"},GQ=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},TQ={assign:function(e){for(var t=QR(Array.prototype).call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=Su(n))throw new TypeError(n+"must be non-object");for(var r in n)GQ(n,r)&&(e[r]=n[r])}}return e},flattenChunks:function(e){for(var t=0,n=0,r=e.length;n<r;n++)t+=e[n].length;for(var i=new Uint8Array(t),o=0,a=0,s=e.length;o<s;o++){var c=e[o];i.set(c,a),a+=c.length}return i}},kQ=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(oK){kQ=!1}for(var SQ=new Uint8Array(256),EQ=0;EQ<256;EQ++)SQ[EQ]=EQ>=252?6:EQ>=248?5:EQ>=240?4:EQ>=224?3:EQ>=192?2:1;SQ[254]=SQ[254]=1;var MQ={string2buf:function(e){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);var t,n,r,i,o,a=e.length,s=0;for(i=0;i<a;i++)55296==(64512&(n=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(r=e.charCodeAt(i+1)))&&(n=65536+(n-55296<<10)+(r-56320),i++),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),o=0,i=0;o<s;i++)55296==(64512&(n=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(r=e.charCodeAt(i+1)))&&(n=65536+(n-55296<<10)+(r-56320),i++),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},buf2string:function(e,t){var n,r,i=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));var o=new Array(2*i);for(r=0,n=0;n<i;){var a=e[n++];if(a<128)o[r++]=a;else{var s=SQ[a];if(s>4)o[r++]=65533,n+=s-1;else{for(a&=2===s?31:3===s?15:7;s>1&&n<i;)a=a<<6|63&e[n++],s--;s>1?o[r++]=65533:a<65536?o[r++]=a:(a-=65536,o[r++]=55296|a>>10&1023,o[r++]=56320|1023&a)}}}return function(e,t){if(t<65534&&e.subarray&&kQ)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));for(var n="",r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n}(o,r)},utf8border: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+SQ[e[n]]>t?n:t}},DQ=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},zQ=Object.prototype.toString,AQ=zW.Z_NO_FLUSH,PQ=zW.Z_SYNC_FLUSH,xQ=zW.Z_FULL_FLUSH,CQ=zW.Z_FINISH,FQ=zW.Z_OK,IQ=zW.Z_STREAM_END,HQ=zW.Z_DEFAULT_COMPRESSION,OQ=zW.Z_DEFAULT_STRATEGY,LQ=zW.Z_DEFLATED;function XQ(e){this.options=TQ.assign({level:HQ,method:LQ,chunkSize:16384,windowBits:15,memLevel:8,strategy:OQ},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 DQ,this.strm.avail_out=0;var n=wQ.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==FQ)throw new Error(DW[n]);if(t.header&&wQ.deflateSetHeader(this.strm,t.header),t.dictionary){var r;if(r="string"==typeof t.dictionary?MQ.string2buf(t.dictionary):"[object ArrayBuffer]"===zQ.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(n=wQ.deflateSetDictionary(this.strm,r))!==FQ)throw new Error(DW[n]);this._dict_set=!0}}function UQ(e,t){var n=new XQ(t);if(n.push(e,!0),n.err)throw n.msg||DW[n.err];return n.result}XQ.prototype.push=function(e,t){var n,r,i=this.strm,o=this.options.chunkSize;if(this.ended)return!1;for(r=t===~~t?t:!0===t?CQ:AQ,"string"==typeof e?i.input=MQ.string2buf(e):"[object ArrayBuffer]"===zQ.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;)if(0===i.avail_out&&(i.output=new Uint8Array(o),i.next_out=0,i.avail_out=o),(r===PQ||r===xQ)&&i.avail_out<=6)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else{if((n=wQ.deflate(i,r))===IQ)return i.next_out>0&&this.onData(i.output.subarray(0,i.next_out)),n=wQ.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===FQ;if(0!==i.avail_out){if(r>0&&i.next_out>0)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else if(0===i.avail_in)break}else this.onData(i.output)}return!0},XQ.prototype.onData=function(e){this.chunks.push(e)},XQ.prototype.onEnd=function(e){e===FQ&&(this.result=TQ.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var BQ={Deflate:XQ,deflate:UQ,deflateRaw:function(e,t){return(t=t||{}).raw=!0,UQ(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,UQ(e,t)},constants:zW},NQ=function(e,t){var n,r,i,o,a,s,c,l,u,d,h,f,p,v,g,y,m,_,b,R,w,G,T,k,S=e.state;n=e.next_in,T=e.input,r=n+(e.avail_in-5),i=e.next_out,k=e.output,o=i-(t-e.avail_out),a=i+(e.avail_out-257),s=S.dmax,c=S.wsize,l=S.whave,u=S.wnext,d=S.window,h=S.hold,f=S.bits,p=S.lencode,v=S.distcode,g=(1<<S.lenbits)-1,y=(1<<S.distbits)-1;e:do{f<15&&(h+=T[n++]<<f,f+=8,h+=T[n++]<<f,f+=8),m=p[h&g];t:for(;;){if(h>>>=_=m>>>24,f-=_,0==(_=m>>>16&255))k[i++]=65535&m;else{if(!(16&_)){if(0==(64&_)){m=p[(65535&m)+(h&(1<<_)-1)];continue t}if(32&_){S.mode=16191;break e}e.msg="invalid literal/length code",S.mode=16209;break e}b=65535&m,(_&=15)&&(f<_&&(h+=T[n++]<<f,f+=8),b+=h&(1<<_)-1,h>>>=_,f-=_),f<15&&(h+=T[n++]<<f,f+=8,h+=T[n++]<<f,f+=8),m=v[h&y];n:for(;;){if(h>>>=_=m>>>24,f-=_,!(16&(_=m>>>16&255))){if(0==(64&_)){m=v[(65535&m)+(h&(1<<_)-1)];continue n}e.msg="invalid distance code",S.mode=16209;break e}if(R=65535&m,f<(_&=15)&&(h+=T[n++]<<f,(f+=8)<_&&(h+=T[n++]<<f,f+=8)),(R+=h&(1<<_)-1)>s){e.msg="invalid distance too far back",S.mode=16209;break e}if(h>>>=_,f-=_,R>(_=i-o)){if((_=R-_)>l&&S.sane){e.msg="invalid distance too far back",S.mode=16209;break e}if(w=0,G=d,0===u){if(w+=c-_,_<b){b-=_;do{k[i++]=d[w++]}while(--_);w=i-R,G=k}}else if(u<_){if(w+=c+u-_,(_-=u)<b){b-=_;do{k[i++]=d[w++]}while(--_);if(w=0,u<b){b-=_=u;do{k[i++]=d[w++]}while(--_);w=i-R,G=k}}}else if(w+=u-_,_<b){b-=_;do{k[i++]=d[w++]}while(--_);w=i-R,G=k}for(;b>2;)k[i++]=G[w++],k[i++]=G[w++],k[i++]=G[w++],b-=3;b&&(k[i++]=G[w++],b>1&&(k[i++]=G[w++]))}else{w=i-R;do{k[i++]=k[w++],k[i++]=k[w++],k[i++]=k[w++],b-=3}while(b>2);b&&(k[i++]=k[w++],b>1&&(k[i++]=k[w++]))}break}}break}}while(n<r&&i<a);n-=b=f>>3,h&=(1<<(f-=b<<3))-1,e.next_in=n,e.next_out=i,e.avail_in=n<r?r-n+5:5-(n-r),e.avail_out=i<a?a-i+257:257-(i-a),S.hold=h,S.bits=f},VQ=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]),jQ=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]),KQ=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]),WQ=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]),QQ=function(e,t,n,r,i,o,a,s){var c,l,u,d,h,f,p,v,g,y=s.bits,m=0,_=0,b=0,R=0,w=0,G=0,T=0,k=0,S=0,E=0,M=null,D=new Uint16Array(16),z=new Uint16Array(16),A=null;for(m=0;m<=15;m++)D[m]=0;for(_=0;_<r;_++)D[t[n+_]]++;for(w=y,R=15;R>=1&&0===D[R];R--);if(w>R&&(w=R),0===R)return i[o++]=20971520,i[o++]=20971520,s.bits=1,0;for(b=1;b<R&&0===D[b];b++);for(w<b&&(w=b),k=1,m=1;m<=15;m++)if(k<<=1,(k-=D[m])<0)return-1;if(k>0&&(0===e||1!==R))return-1;for(z[1]=0,m=1;m<15;m++)z[m+1]=z[m]+D[m];for(_=0;_<r;_++)0!==t[n+_]&&(a[z[t[n+_]]++]=_);if(0===e?(M=A=a,f=20):1===e?(M=VQ,A=jQ,f=257):(M=KQ,A=WQ,f=0),E=0,_=0,m=b,h=o,G=w,T=0,u=-1,d=(S=1<<w)-1,1===e&&S>852||2===e&&S>592)return 1;for(;;){p=m-T,a[_]+1<f?(v=0,g=a[_]):a[_]>=f?(v=A[a[_]-f],g=M[a[_]-f]):(v=96,g=0),c=1<<m-T,b=l=1<<G;do{i[h+(E>>T)+(l-=c)]=p<<24|v<<16|g|0}while(0!==l);for(c=1<<m-1;E&c;)c>>=1;if(0!==c?(E&=c-1,E+=c):E=0,_++,0==--D[m]){if(m===R)break;m=t[n+a[_]]}if(m>w&&(E&d)!==u){for(0===T&&(T=w),h+=b,k=1<<(G=m-T);G+T<R&&!((k-=D[G+T])<=0);)G++,k<<=1;if(S+=1<<G,1===e&&S>852||2===e&&S>592)return 1;i[u=E&d]=w<<24|G<<16|h-o|0}}return 0!==E&&(i[h+E]=m-T<<24|64<<16|0),s.bits=w,0},qQ=zW.Z_FINISH,ZQ=zW.Z_BLOCK,YQ=zW.Z_TREES,$Q=zW.Z_OK,JQ=zW.Z_STREAM_END,eq=zW.Z_NEED_DICT,tq=zW.Z_STREAM_ERROR,nq=zW.Z_DATA_ERROR,rq=zW.Z_MEM_ERROR,iq=zW.Z_BUF_ERROR,oq=zW.Z_DEFLATED,aq=function(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)};function sq(){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 cq,lq,uq=function(e){if(!e)return 1;var t=e.state;return!t||t.strm!==e||t.mode<16180||t.mode>16211?1:0},dq=function(e){if(uq(e))return tq;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,$Q},hq=function(e){if(uq(e))return tq;var t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,dq(e)},fq=function(e,t){var n;if(uq(e))return tq;var r=e.state;return t<0?(n=0,t=-t):(n=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?tq:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,hq(e))},pq=function(e,t){if(!e)return tq;var n=new sq;e.state=n,n.strm=e,n.window=null,n.mode=16180;var r=fq(e,t);return r!==$Q&&(e.state=null),r},vq=!0,gq=function(e){if(vq){cq=new Int32Array(512),lq=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(QQ(1,e.lens,0,288,cq,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;QQ(2,e.lens,0,32,lq,0,e.work,{bits:5}),vq=!1}e.lencode=cq,e.lenbits=9,e.distcode=lq,e.distbits=5},yq=function(e,t,n,r){var i,o=e.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Uint8Array(o.wsize)),r>=o.wsize?(o.window.set(t.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):((i=o.wsize-o.wnext)>r&&(i=r),o.window.set(t.subarray(n-r,n-r+i),o.wnext),(r-=i)?(o.window.set(t.subarray(n-r,n),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0},mq={inflateReset:hq,inflateReset2:fq,inflateResetKeep:dq,inflateInit:function(e){return pq(e,15)},inflateInit2:pq,inflate:function(e,t){var n,r,i,o,a,s,c,l,u,d,h,f,p,v,g,y,m,_,b,R,w,G,T,k,S=0,E=new Uint8Array(4),M=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(uq(e)||!e.output||!e.input&&0!==e.avail_in)return tq;16191===(n=e.state).mode&&(n.mode=16192),a=e.next_out,i=e.output,c=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,d=s,h=c,G=$Q;e:for(;;)switch(n.mode){case 16180:if(0===n.wrap){n.mode=16192;break}for(;u<16;){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}if(2&n.wrap&&35615===l){0===n.wbits&&(n.wbits=15),n.check=0,E[0]=255&l,E[1]=l>>>8&255,n.check=MW(n.check,E,2,0),l=0,u=0,n.mode=16181;break}if(n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&l)<<8)+(l>>8))%31){e.msg="incorrect header check",n.mode=16209;break}if((15&l)!==oq){e.msg="unknown compression method",n.mode=16209;break}if(u-=4,w=8+(15&(l>>>=4)),0===n.wbits&&(n.wbits=w),w>15||w>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&l?16189:16191,l=0,u=0;break;case 16181:for(;u<16;){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}if(n.flags=l,(255&nX(n))!==oq){e.msg="unknown compression method",n.mode=16209;break}if(57344&nX(n)){e.msg="unknown header flags set",n.mode=16209;break}n.head&&(n.head.text=l>>8&1),512&nX(n)&&4&n.wrap&&(E[0]=255&l,E[1]=l>>>8&255,n.check=MW(n.check,E,2,0)),l=0,u=0,n.mode=16182;case 16182:for(;u<32;){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}n.head&&(n.head.time=l),512&nX(n)&&4&n.wrap&&(E[0]=255&l,E[1]=l>>>8&255,E[2]=l>>>16&255,E[3]=l>>>24&255,n.check=MW(n.check,E,4,0)),l=0,u=0,n.mode=16183;case 16183:for(;u<16;){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}n.head&&(n.head.xflags=255&l,n.head.os=l>>8),512&nX(n)&&4&n.wrap&&(E[0]=255&l,E[1]=l>>>8&255,n.check=MW(n.check,E,2,0)),l=0,u=0,n.mode=16184;case 16184:if(1024&nX(n)){for(;u<16;){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}n.length=l,n.head&&(n.head.extra_len=l),512&nX(n)&&4&n.wrap&&(E[0]=255&l,E[1]=l>>>8&255,n.check=MW(n.check,E,2,0)),l=0,u=0}else n.head&&(n.head.extra=null);n.mode=16185;case 16185:if(1024&nX(n)&&((f=n.length)>s&&(f=s),f&&(n.head&&(w=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+f),w)),512&nX(n)&&4&n.wrap&&(n.check=MW(n.check,r,f,o)),s-=f,o+=f,n.length-=f),n.length))break e;n.length=0,n.mode=16186;case 16186:if(2048&nX(n)){if(0===s)break e;f=0;do{w=r[o+f++],n.head&&w&&n.length<65536&&(n.head.name+=String.fromCharCode(w))}while(w&&f<s);if(512&nX(n)&&4&n.wrap&&(n.check=MW(n.check,r,f,o)),s-=f,o+=f,w)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=16187;case 16187:if(4096&nX(n)){if(0===s)break e;f=0;do{w=r[o+f++],n.head&&w&&n.length<65536&&(n.head.comment+=String.fromCharCode(w))}while(w&&f<s);if(512&nX(n)&&4&n.wrap&&(n.check=MW(n.check,r,f,o)),s-=f,o+=f,w)break e}else n.head&&(n.head.comment=null);n.mode=16188;case 16188:if(512&nX(n)){for(;u<16;){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}if(4&n.wrap&&l!==(65535&n.check)){e.msg="header crc mismatch",n.mode=16209;break}l=0,u=0}n.head&&(n.head.hcrc=nX(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--,l+=r[o++]<<u,u+=8}e.adler=n.check=aq(l),l=0,u=0,n.mode=16190;case 16190:if(0===n.havedict)return e.next_out=a,e.avail_out=c,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=u,eq;e.adler=n.check=1,n.mode=16191;case 16191:if(t===ZQ||t===YQ)break e;case 16192:if(n.last){l>>>=7&u,u-=7&u,n.mode=16206;break}for(;u<3;){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}switch(n.last=1&l,u-=1,3&(l>>>=1)){case 0:n.mode=16193;break;case 1:if(gq(n),n.mode=16199,t===YQ){l>>>=2,u-=2;break e}break;case 2:n.mode=16196;break;case 3:e.msg="invalid block type",n.mode=16209}l>>>=2,u-=2;break;case 16193:for(l>>>=7&u,u-=7&u;u<32;){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}if((65535&l)!=(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=16209;break}if(n.length=65535&l,l=0,u=0,n.mode=16194,t===YQ)break e;case 16194:n.mode=16195;case 16195:if(f=n.length){if(f>s&&(f=s),f>c&&(f=c),0===f)break e;i.set(r.subarray(o,o+f),a),s-=f,o+=f,c-=f,a+=f,n.length-=f;break}n.mode=16191;break;case 16196:for(;u<14;){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}if(n.nlen=257+(31&l),l>>>=5,u-=5,n.ndist=1+(31&l),l>>>=5,u-=5,n.ncode=4+(15&l),l>>>=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--,l+=r[o++]<<u,u+=8}n.lens[M[n.have++]]=7&l,l>>>=3,u-=3}for(;n.have<19;)n.lens[M[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,T={bits:n.lenbits},G=QQ(0,n.lens,0,19,n.lencode,0,n.work,T),n.lenbits=T.bits,G){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=(S=n.lencode[l&(1<<n.lenbits)-1])>>>16&255,m=65535&S,!((g=S>>>24)<=u);){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}if(m<16)l>>>=g,u-=g,n.lens[n.have++]=m;else{if(16===m){for(k=g+2;u<k;){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}if(l>>>=g,u-=g,0===n.have){e.msg="invalid bit length repeat",n.mode=16209;break}w=n.lens[n.have-1],f=3+(3&l),l>>>=2,u-=2}else if(17===m){for(k=g+3;u<k;){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}u-=g,w=0,f=3+(7&(l>>>=g)),l>>>=3,u-=3}else{for(k=g+7;u<k;){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}u-=g,w=0,f=11+(127&(l>>>=g)),l>>>=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++]=w}}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,T={bits:n.lenbits},G=QQ(1,n.lens,0,n.nlen,n.lencode,0,n.work,T),n.lenbits=T.bits,G){e.msg="invalid literal/lengths set",n.mode=16209;break}if(n.distbits=6,n.distcode=n.distdyn,T={bits:n.distbits},G=QQ(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,T),n.distbits=T.bits,G){e.msg="invalid distances set",n.mode=16209;break}if(n.mode=16199,t===YQ)break e;case 16199:n.mode=16200;case 16200:if(s>=6&&c>=258){e.next_out=a,e.avail_out=c,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=u,NQ(e,h),a=e.next_out,i=e.output,c=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,16191===n.mode&&(n.back=-1);break}for(n.back=0;y=(S=n.lencode[l&(1<<n.lenbits)-1])>>>16&255,m=65535&S,!((g=S>>>24)<=u);){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}if(y&&0==(240&y)){for(_=g,b=y,R=m;y=(S=n.lencode[R+((l&(1<<_+b)-1)>>_)])>>>16&255,m=65535&S,!(_+(g=S>>>24)<=u);){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}l>>>=_,u-=_,n.back+=_}if(l>>>=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(k=n.extra;u<k;){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=16202;case 16202:for(;y=(S=n.distcode[l&(1<<n.distbits)-1])>>>16&255,m=65535&S,!((g=S>>>24)<=u);){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}if(0==(240&y)){for(_=g,b=y,R=m;y=(S=n.distcode[R+((l&(1<<_+b)-1)>>_)])>>>16&255,m=65535&S,!(_+(g=S>>>24)<=u);){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}l>>>=_,u-=_,n.back+=_}if(l>>>=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(k=n.extra;u<k;){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}n.offset+=l&(1<<n.extra)-1,l>>>=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===c)break e;if(f=h-c,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=i,p=a-n.offset,f=n.length;f>c&&(f=c),c-=f,n.length-=f;do{i[a++]=v[p++]}while(--f);0===n.length&&(n.mode=16200);break;case 16205:if(0===c)break e;i[a++]=n.length,c--,n.mode=16200;break;case 16206:if(n.wrap){for(;u<32;){if(0===s)break e;s--,l|=r[o++]<<u,u+=8}if(h-=c,e.total_out+=h,n.total+=h,4&n.wrap&&h&&(e.adler=n.check=nX(n)?MW(n.check,i,h,a-h):SW(n.check,i,h,a-h)),h=c,4&n.wrap&&(nX(n)?l:aq(l))!==n.check){e.msg="incorrect data check",n.mode=16209;break}l=0,u=0}n.mode=16207;case 16207:if(n.wrap&&nX(n)){for(;u<32;){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}if(4&n.wrap&&l!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=16209;break}l=0,u=0}n.mode=16208;case 16208:G=JQ;break e;case 16209:G=nq;break e;case 16210:return rq;default:return tq}return e.next_out=a,e.avail_out=c,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=u,(n.wsize||h!==e.avail_out&&n.mode<16209&&(n.mode<16206||t!==qQ))&&yq(e,e.output,e.next_out,h-e.avail_out),d-=e.avail_in,h-=e.avail_out,e.total_in+=d,e.total_out+=h,n.total+=h,4&n.wrap&&h&&(e.adler=n.check=nX(n)?MW(n.check,i,h,e.next_out-h):SW(n.check,i,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(16191===n.mode?128:0)+(16199===n.mode||16194===n.mode?256:0),(0===d&&0===h||t===qQ)&&G===$Q&&(G=iq),G},inflateEnd:function(e){if(uq(e))return tq;var t=e.state;return t.window&&(t.window=null),e.state=null,$Q},inflateGetHeader:function(e,t){if(uq(e))return tq;var n=e.state;return 0==(2&n.wrap)?tq:(n.head=t,t.done=!1,$Q)},inflateSetDictionary:function(e,t){var n,r=t.length;return uq(e)||0!==(n=e.state).wrap&&16190!==n.mode?tq:16190===n.mode&&SW(1,t,r,0)!==n.check?nq:yq(e,t,r,r)?(n.mode=16210,rq):(n.havedict=1,$Q)},inflateInfo:"pako inflate (from Nodeca project)"},_q=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},bq=Object.prototype.toString,Rq=zW.Z_NO_FLUSH,wq=zW.Z_FINISH,Gq=zW.Z_OK,Tq=zW.Z_STREAM_END,kq=zW.Z_NEED_DICT,Sq=zW.Z_STREAM_ERROR,Eq=zW.Z_DATA_ERROR,Mq=zW.Z_MEM_ERROR;function Dq(e){this.options=TQ.assign({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 DQ,this.strm.avail_out=0;var n=mq.inflateInit2(this.strm,t.windowBits);if(n!==Gq)throw new Error(DW[n]);if(this.header=new _q,mq.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=MQ.string2buf(t.dictionary):"[object ArrayBuffer]"===bq.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=mq.inflateSetDictionary(this.strm,t.dictionary))!==Gq))throw new Error(DW[n])}function zq(e,t){var n=new Dq(t);if(n.push(e),n.err)throw n.msg||DW[n.err];return n.result}Dq.prototype.push=function(e,t){var n,r,i,o=this.strm,a=this.options.chunkSize,s=this.options.dictionary;if(this.ended)return!1;for(r=t===~~t?t:!0===t?wq:Rq,"[object ArrayBuffer]"===bq.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=mq.inflate(o,r))===kq&&s&&((n=mq.inflateSetDictionary(o,s))===Gq?n=mq.inflate(o,r):n===Eq&&(n=kq));o.avail_in>0&&n===Tq&&o.state.wrap>0&&0!==e[o.next_in];)mq.inflateReset(o),n=mq.inflate(o,r);switch(n){case Sq:case Eq:case kq:case Mq:return this.onEnd(n),this.ended=!0,!1}if(i=o.avail_out,o.next_out&&(0===o.avail_out||n===Tq))if("string"===this.options.to){var c=MQ.utf8border(o.output,o.next_out),l=o.next_out-c,u=MQ.buf2string(o.output,c);o.next_out=l,o.avail_out=a-l,l&&o.output.set(o.output.subarray(c,c+l),0),this.onData(u)}else this.onData(o.output.length===o.next_out?o.output:o.output.subarray(0,o.next_out));if(n!==Gq||0!==i){if(n===Tq)return n=mq.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,!0;if(0===o.avail_in)break}}return!0},Dq.prototype.onData=function(e){this.chunks.push(e)},Dq.prototype.onEnd=function(e){e===Gq&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=TQ.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var Aq={Inflate:Dq,inflate:zq,inflateRaw:function(e,t){return(t=t||{}).raw=!0,zq(e,t)},ungzip:zq,constants:zW},Pq={Deflate:BQ.Deflate,deflate:BQ.deflate,deflateRaw:BQ.deflateRaw,gzip:BQ.gzip,Inflate:Aq.Inflate,inflate:Aq.inflate,inflateRaw:Aq.inflateRaw,ungzip:Aq.ungzip,constants:zW},xq=function(){function e(e,t){var n=this;this.collector=e,this.config=t,this.requestType=t.request_type||"xhr",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||{},this.collector.on("custom-request-header",(function(e){n.setRequestHeader(e)}))}return e.prototype.setRequestHeader=function(e){this.customHeader=cG(this.customHeader,e)},e.prototype.useFetch=function(e){var t=e.url,n=e.data,r=e.method,i=e.success,o=e.fail,a={"Content-Type":"application/json; charset=utf-8"};if(WR(this.customHeader).length)for(var s in this.customHeader)a[s]=this.customHeader[s];window.fetch?fetch(t,{method:r||"POST",headers:a,body:Jx(n)}).then((function(e){return e.json()})).then((function(e){i&&i(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:r,success:i,fail:o}))},e.prototype.useBeacon=function(e){var t=e.url,n=e.data,r=e.success,i=e.fail;window.navigator.sendBeacon(t,Jx(n))?r&&r():i&&i(n,this.errorCode.BEACON_FALSE)},e.prototype.useRequest=function(e){var t=this,n=e.url,r=e.data,i=e.method,o=e.success,a=e.fail,s=e.timeout,c=e.useBeacon,l=e.withCredentials,u=e.app_key,d=e.forceXhr,h=e.zip;if(c&&this.supportBeacon)this.useBeacon({url:n,data:r,method:i,success:o,fail:a});else if("fetch"!==this.requestType||d)try{var f=new XMLHttpRequest,p=i||"POST";if(f.open(p,""+n,!0),f.setRequestHeader("Content-Type","application/json; charset=utf-8"),u&&f.setRequestHeader("X-MCS-AppKey",""+u),WR(this.customHeader).length)for(var v in this.customHeader)f.setRequestHeader(v,this.customHeader[v]);l&&(f.withCredentials=!0),s&&(f.timeout=s,f.ontimeout=function(){a&&a(r,t.errorCode.TIMEOUT)}),f.onload=function(){if(o){var e=null;if(f.responseText){try{e=JSON.parse(f.responseText)}catch(t){e={}}o(e,r)}}},f.onerror=function(){f.abort(),a&&a(r,t.errorCode.XHR_ON)};try{var g=Jx(r);if(this.config.need_zip&&h){var y=(new TextEncoder).encode(g),m=Pq.gzip(y);f.setRequestHeader("Content-Encoding","gzip"),f.send(m)}else f.send(g)}catch(_){this.collector.emit("sdk-inner-error",{type:"sdk_error_send",eventData:r,errorCode:1e3,msg:_.message||_.stack||"sdk_error_send"})}}catch(_){this.collector.emit("sdk-inner-error",{type:"sdk_error_request",eventData:r,errorCode:1001,msg:_.message||_.stack||"sdk_error_request"})}else this.useFetch({url:n,data:r,method:i,success:o,fail:a})},e}(),Cq=function(){function e(e,t){if(this.devToolReady=!1,this.devToolOrigin="*",this.sendAlready=!1,!t.disable_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.loadUrl=t.devtool_url||"https://lf-static.applogcdn.com/obj/applog-sdk-static/log-sdk/collect/devtool/debug-web.v2.0.0.js",this.filterEvent=new Jj(["__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(Ow(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&&Ow(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:"基本信息",key:"base",type:1,content:[{name:"app_id",desc:"APP_ID",value:this.config.app_id},{name:"channel",desc:"CHANNEL",value:this.config.channel},{name:"domain",desc:"上报域名",value:this.collect.configManager.getDomain()},{name:"sdk_version",desc:"SDK版本",value:EK},{name:"sdk_type",desc:"SDK引入方式",value:"npm"}]},{title:"用户信息",key:"user",type:2,content:[{name:"uuid",desc:"UUID",value:this.collect.configManager.get("user").user_unique_id||""},{name:"web_id",desc:"WEB_ID",value:this.collect.configManager.get("user").web_id||""}]},{title:"公共参数信息",type:2,key:"common",content:[{name:"browser",desc:"浏览器",value:this.collect.configManager.get("browser")},{name:"browser_version",desc:"浏览器版本",value:this.collect.configManager.get("browser_version")},{name:"platform",desc:"平台",value:this.collect.configManager.get("platform")},{name:"device_model",desc:"设备型号",value:this.collect.configManager.get("device_model")},{name:"os_name",desc:"操作系统",value:this.collect.configManager.get("os_name")},{name:"os_version",desc:"操作系统版本",value:this.collect.configManager.get("os_version")},{name:"resolution",desc:"屏幕分辨率",value:this.collect.configManager.get("resolution")},{name:"referrer",desc:"来源",value:this.collect.configManager.get("referrer")},{name:"custom",desc:"自定义信息",value:Jx(this.collect.configManager.get("custom"))}]},{title:"配置信息",key:"config",type:3,content:[{name:"autotrack",desc:"全埋点",value:!!this.config.autotrack},{name:"stay",desc:"停留时长",value:!!this.config.enable_stay_duration}]},{title:"A/B配置信息",key:"ab",type:4,content:[{name:"ab",desc:"A/B实验",value:!!this.config.enable_ab_test}]}],this.config.enable_ab_test){var e=this.getInfo("ab"),t=[{name:"ab",desc:"A/B实验",value:!!this.config.enable_ab_test},{name:"vid",desc:"已曝光VID",value:this.collect.configManager.getAbVersion()},{name:"ab_domain",desc:"A/B域名",value:this.config.ab_channel_domain||hK(kK[this.config.channel])},{name:"all_values",desc:"全部配置",value:this.collect.configManager.getAbCache()}];e.content=t,this.setInfo("ab",e)}if(this.config.enable_native||this.config.Native){var n={title:"客户端信息",type:3,content:[{name:"native",desc:"是否打通",value:!!this.collect.bridgeReport}]};this.setInfo("native",n)}if(OC(EK).call(EK,"tob")){var r,i=this.getInfo("user");i.content.push({name:"sid",desc:WF(r="DISS".split("")).call(r).join(""),value:"点击获取"}),this.setInfo("user",i)}},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(r){r.key===e&&(n=!0,r=t)})),n||this.info.push(t)},e.prototype.getSecondInfo=function(e,t){var n=this.getInfo(e),r=null;return n.content.forEach((function(e){e.name===t&&(r=e)})),r},e.prototype.setSecondInfo=function(e,t,n){var r=this.getInfo(e),i=!1;if(r.content.forEach((function(e){e.name===t&&(e.value=n,i=!0)})),!i){var o={name:t,value:n,desc:t.toLocaleUpperCase()};r.content.push(o)}this.setInfo(e,r)},e.prototype.loadHook=function(){var e=this;this.collect.on(cK.DEBUGGER_MESSAGE,(function(t){switch(t.type){case cK.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:Jx(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 r=e.collect.configManager.get(t.common);e.setSecondInfo("common",t.common,"custom"===t.common?Jx(r):r)}return void e.updateInfo();case cK.DEBUGGER_MESSAGE_EVENT:if(t.data&&t.data.length){var i=t.data[0],o=i.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(i)}return}}))},e.prototype.addLintener=function(){var e=this;window.addEventListener("message",(function(t){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:OC(EK).call(EK,"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(r){}},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("+hK("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 r=document.createElement("div");r.innerHTML='<div id="debugger-applog-web" class="debugger-applog-web"></div>';var i=document.createElement("div");i.innerHTML='<div id="debugger-container" class="debugger-container"></div>',document.getElementsByTagName("body")[0].appendChild(r),document.getElementsByTagName("body")[0].appendChild(i);var o=document.getElementById("debugger-applog-web");o&&o.addEventListener("click",(function(){window&&window.postMessage({type:"devtool:web:open-draw"},location.origin)}))},e}(),Fq={autotrack:{src:{cn:hK("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz18z23z22z1mz22z20z18z1az1iz4az1hz21"),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:{cn:hK("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz18z19z4az1hz21"),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:{cn:hK("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz21z22z18z27z4az1hz21"),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:{cn:hK("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz20z1mz23z22z1cz4az1hz21"),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:{cn:hK("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz22z20z18z1az1cz20z4az1hz21"),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:{cn:hK("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz20z1cz22z20z27z4az1hz21"),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:{cn:hK("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz24z1gz21z23z18z1jz4az1hz21"),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"}},Iq=["et","profile","heartbeat","monitor"],Hq=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 lK,this.remotePlugin=new OR,this.Types=DK,this.adapters.storage=GK}return e.usePlugin=function(t,n,r){if(n){for(var i=!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=r||{},i=!0;break}i||e.plugins.push({name:n,plugin:t,options:r})}else e.plugins.push({plugin:t})},e.prototype.usePlugin=function(e,t,n){e&&("full"===this.loadType&&OC(Iq).call(Iq,e)?console.info("your sdk version has "+e+" plugin 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,r,i=this;this.logger=new FK(this.name,t.log),this.inited?this.logger.warn("[instance: "+this.name+"], every instance's api: init, can be call only one time!"):t&&uK(t)?t.app_id&&"number"==typeof(r=t.app_id)&&!isNaN(r)?t.app_key&&"string"!=typeof t.app_key?this.logger.warn("app_key param is error, must be string, please check!"):(t.channel_domain||-1!==KR(n=["cn","sg","va","my"]).call(n,t.channel)||(this.logger.warn("channel must be `cn`, `sg`,`va`, `my` !"),t.channel="cn"),this.spider=new IK,this.spider.checkSpider(t)?this.logger.warn("your env may be a spider, can not report!"):(this.appBridge=new HK(this,t.enable_native),this.requestManager=new xq(this,t),this.bridgeReport=this.appBridge.bridgeInject(),this.configManager=new CK(this,t),this.debugger=new Cq(this,t),this.initConfig=t,this.emit(DK.Init),this.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK 执行Init",data:t,level:"info",time:Date.now(),infoType:"cus"}),this.destroy=!1,t.disable_auto_pv&&(this.disableAutoPageView=!0),this.bridgeReport||(this.configManager.set({app_id:t.app_id}),this.eventManager=new XK,this.tokenManager=new BK,this.sessionManager=new LK,jR.all([new jR((function(e){i.once(DK.TokenComplete,(function(){e(!0)}))})),new jR((function(e){i.once(DK.Start,(function(){e(!0)}))}))]).then((function(){try{var n;RF(n=e.plugins).call(n,(function(e,t){var n=t.plugin,r=t.options,o=cG(i.initConfig,r),a=new n;return a.apply(i,o),e.push(a),i.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK加载"+t.name+"插件",level:"info",time:Date.now(),infoType:"sdk"}),e}),i.pluginInstances)}catch(r){console.warn("load plugin error, "+r.message),i.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK加载插件发生了异常",level:"error",time:Date.now(),data:r.message,infoType:"sdk"})}i.sdkReady=!0,i.emit(DK.Ready),i.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK 用户信息初始化完成",time:Date.now(),secType:"USER",level:"info",data:i.configManager.get("user"),infoType:"sdk"}),i.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK 初始化完成",time:Date.now(),level:"info",data:i.configManager.get("user"),infoType:"sdk"}),i.logger.info("appid: "+t.app_id+", userInfo:"+Jx(i.configManager.get("user"))),i.logger.info("appid: "+t.app_id+", sdk is ready, version type is "+i.loadType+", version is "+EK+", you can report now !!!"),t.disable_auto_pv&&(i.disableAutoPageView=!0);try{"full"===i.loadType&&(t.enable_ab_test||t.autotrack)&&(window.opener||window.parent).postMessage("[tea-sdk]ready","*")}catch(r){i.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK发生了异常",level:"error",time:Date.now(),data:r.message,infoType:"sdk"})}i.pageView(),i.on(DK.TokenChange,(function(e){"webid"===e&&i.pageView(),i.logger.info("appid: "+t.app_id+" token change, new userInfo:"+Jx(i.configManager.get("user"))),i.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK 设置了用户信息",time:Date.now(),secType:"USER",level:"info",data:i.configManager.get("user"),infoType:"sdk"})})),i.on(DK.TokenReset,(function(){i.logger.info("appid: "+t.app_id+" token reset, new userInfo:"+Jx(i.configManager.get("user"))),i.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK 重置了用户信息",time:Date.now(),secType:"USER",level:"info",data:i.configManager.get("user"),infoType:"sdk"})})),i.on(DK.RouteChange,(function(e){e.init||t.disable_route_report||i.pageView()}))})),this.tokenManager.apply(this,t),this.eventManager.apply(this,t),this.sessionManager.apply(this,t)),this.inited=!0)):this.logger.warn("app_id param is error, must be number, please check!"):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(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK执行Config发生了异常",level:"error",time:Date.now(),data:"config must be use after function init",infoType:"sdk"});if(!e||!uK(e))return console.warn("config params is error, please check"),void this.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK执行Config发生了异常",level:"error",time:Date.now(),data:"config params is error, please check",infoType:"sdk"});if(this.bridgeReport)this.appBridge.setConfig(e);else{e._staging_flag&&1===e._staging_flag&&(this.staging=!0),e.disable_auto_pv&&(this.disableAutoPageView=!0,delete e.disable_auto_pv);var t=eK({},e),n=this.initConfig.configPersist||this.initConfig.config_persist||!1;if(this.initConfig&&n){var r=this.configManager.getStore();r&&(t=cG(r,e)),this.configManager.setStore(e)}t.web_id,t.user_unique_id;var i=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&KR(t).call(t,r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof lG){var i=0;for(r=lG(e);i<r.length;i++)KR(t).call(t,r[i])<0&&(n[r[i]]=e[r[i]])}return n}(t,["web_id","user_unique_id"]);this.configManager.set(i),t.hasOwnProperty("web_id")&&this.emit(DK.ConfigWebId,t.web_id),t.hasOwnProperty("user_unique_id")&&this.emit(DK.ConfigUuid,t.user_unique_id),this.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK 执行Config",level:"info",time:Date.now(),data:t,infoType:"cus"})}},e.prototype.setUserUniqueID=function(e){this.config({user_unique_id:e})},e.prototype.setHeaderInfo=function(e,t){var n={};n[e]=t,this.config(n)},e.prototype.removeHeaderInfo=function(e){var t={};t[e]=void 0,this.config(t)},e.prototype.setDomain=function(e){this.configManager&&this.configManager.setDomain(e),this.emit(DK.ConfigDomain)},e.prototype.getConfig=function(e){var t;return null===(t=this.configManager)||void 0===t?void 0:t.get(e)},e.prototype.send=function(){this.start()},e.prototype.start=function(){this.inited&&!this.sended&&(this.sended=!0,this.started=!0,this.emit(DK.Start),this.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK 执行Start",level:"info",time:Date.now(),infoType:"cus"}),this.bridgeReport&&(this.pageView(),this.emit(DK.Ready)))},e.prototype.event=function(e,t){var n=this;try{var r=[];if(Array.isArray(e))e.forEach((function(e){var t=n.processEvent(e[0],e[1]||{});t&&r.push(t)}));else{var i=this.processEvent(e,t);if(!i)return;r.push(i)}this.bridgeReport?r.forEach((function(e){var t=e.event,r=e.params;n.appBridge.onEventV3(t,Jx(r))})):r.length&&(this.emit(DK.Event,r),this.emit(DK.SessionResetTime)),this.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK 执行Event",level:"info",time:Date.now(),data:e,infoType:"cus"})}catch(o){this.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK 执行Event发生了异常",level:"error",time:Date.now(),data:o.message,infoType:"sdk"})}},e.prototype.beconEvent=function(e,t){if(Array.isArray(e))console.warn("beconEvent not support batch report, please check");else{var n=[],r=this.processEvent(e,t||{});r&&(n.push(r),n.length&&(this.emit(DK.BeconEvent,n),this.emit(DK.SessionResetTime)),this.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK 执行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=QR(e).call(e,6));var r=t;"object"!=Su(r)&&(r={}),r.profile?delete r.profile:r.event_index=dK();var i=void 0;return r.local_ms?(i=r.local_ms,delete r.local_ms):i=+new Date,{event:n,params:r,local_time_ms:i,is_bav:this.initConfig&&this.initConfig.autotrack?1:0}}catch(o){return this.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK发生了异常",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:this.handlePath(),time:Date.now(),referrer:window.document.referrer,$is_first_time:""+(this.configManager&&this.configManager.is_first_time||!1)},n=eK(eK({},t),e);this.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK 上报PV",level:"info",time:Date.now(),infoType:"sdk"}),this.event("predefine_pageview",n)}else console.warn("predefinePageView must be use after function init")},e.prototype.handlePath=function(){var e=location.pathname;try{if(this.initConfig.allow_hash){var t=new Qx(location.href).hash.match(/#\/([^?#]+)/i);return t&&t.length?t[1]:location.pathname}}catch(n){e=location.pathname}return e},e.prototype.clearEventCache=function(){this.emit(DK.CleanEvents)},e.prototype.setWebIDviaUnionID=function(e){if(e){var t=gK(e);this.config({web_id:""+t,wechat_unionid:e}),this.emit(DK.CustomWebId)}},e.prototype.setWebId=function(e){this.config({web_id:""+e})},e.prototype.setWebIDviaOpenID=function(e){if(e){var t=gK(e);this.config({web_id:""+t,wechat_openid:e}),this.emit(DK.CustomWebId)}},e.prototype.setNativeAppId=function(e){this.bridgeReport&&this.appBridge.setNativeAppId(e)},e.prototype.setRequestHeaders=function(e){this.emit(DK.CustomHeader,e)},e.prototype.getSessionId=function(){return OK()},e.prototype.setSessionId=function(e){this.emit(DK.SessionReset,e)},e.prototype.resetStayDuration=function(e,t,n){this.emit(DK.ResetStay,{url_path:e,title:t,url:n},DK.Stay)},e.prototype.resetStayParams=function(e,t,n){void 0===e&&(e=""),void 0===t&&(t=""),void 0===n&&(n=""),this.emit(DK.SetStay,{url_path:e,title:t,url:n},DK.Stay)},e.prototype.getToken=function(e,t){var n=this;if(this.inited){var r=!1,i=function(t){if(!r){var i;r=!0;var o=n.configManager.get().user;return t&&(o.tobid=t,o[WF(i="diss".split("")).call(i).join("")]=t),e(eK({},o))}},o=function(){n.tokenManager.getTobId().then((function(e){i(e)}))};this.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK 执行GetToken",level:"info",time:Date.now(),infoType:"cus"}),this.sdkReady?o():(t&&setTimeout((function(){i()}),t),this.on(DK.Ready,(function(){o()})))}else console.warn("getToken must be use after function init")},e.prototype.profileSet=function(e){this.bridgeReport?this.appBridge.profileSet(Jx(e)):this.emit(DK.ProfileSet,e,DK.Profile),this.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK 执行profileSet",level:"info",time:Date.now(),data:e,infoType:"cus"})},e.prototype.profileSetOnce=function(e){this.bridgeReport?this.appBridge.profileSetOnce(Jx(e)):this.emit(DK.ProfileSetOnce,e,DK.Profile),this.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK 执行profileSetOnce",level:"info",time:Date.now(),data:e,infoType:"cus"})},e.prototype.profileIncrement=function(e){this.bridgeReport?this.appBridge.profileIncrement(Jx(e)):this.emit(DK.ProfileIncrement,e,DK.Profile),this.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK 执行profileIncrement",level:"info",time:Date.now(),data:e,infoType:"cus"})},e.prototype.profileUnset=function(e){this.bridgeReport?this.appBridge.profileUnset(e):this.emit(DK.ProfileUnset,e,DK.Profile),this.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK 执行profileUnset",level:"info",time:Date.now(),data:e,infoType:"cus"})},e.prototype.profileAppend=function(e){this.bridgeReport?this.appBridge.profileAppend(Jx(e)):this.emit(DK.ProfileAppend,e,DK.Profile),this.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"SDK 执行profileAppend",level:"info",time:Date.now(),data:e,infoType:"cus"})},e.prototype.setExternalAbVersion=function(e){var t;this.emit(DK.AbExternalVersion,"string"==typeof e&&e?dk(t=""+e).call(t):null,DK.Ab)},e.prototype.getVar=function(e,t,n){this.emit(DK.AbVar,{name:e,defaultValue:t,callback:n},DK.Ab)},e.prototype.getABconfig=function(e,t){this.emit(DK.AbConfig,{params:e,callback:t},DK.Ab)},e.prototype.getAbSdkVersion=function(){return this.configManager.getAbVersion()},e.prototype.onAbSdkVersionChange=function(e){var t=this;return this.emit(DK.AbVersionChangeOn,e,DK.Ab),function(){t.emit(DK.AbVersionChangeOff,e,DK.Ab)}},e.prototype.offAbSdkVersionChange=function(e){this.emit(DK.AbVersionChangeOff,e,DK.Ab)},e.prototype.openOverlayer=function(){this.emit(DK.AbOpenLayer,"",DK.Ab)},e.prototype.closeOverlayer=function(){this.emit(DK.AbCloseLayer,"",DK.Ab)},e.prototype.getAllVars=function(e){this.emit(DK.AbAllVars,e,DK.Ab)},e.prototype.destoryInstace=function(){this.destroy||(this.destroy=!0,this.off(DK.TokenComplete),this.emit(DK.DestoryInstance))},e.prototype.destroyInstance=function(){this.destroy||(this.destroy=!0,this.off(DK.TokenComplete),this.emit(DK.DestoryInstance))},e.plugins=[],e}(),Oq=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;t.event_verify_url&&("string"==typeof t.event_verify_url?(this.url=t.event_verify_url+"/v1/list_test",e.on(e.Types.SubmitBefore,(function(t){e.requestManager.useBeacon({url:n.url,data:t}),e.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_EVENT,info:"SDK Report ByteIo Verify Request",time:Date.now(),data:t,code:200,status:"success",verifyType:!0})}))):console.log("please use correct et_test url"))},e}(),Lq=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.config=t,this.duration=6e4,this.reportUrl=e.configManager.getDomain()+"/profile/list";var r=e.Types;this.eventCheck=new MK(e,t),this.cache={},this.collect.on(r.ProfileSet,(function(e){n.setProfile(e)})),this.collect.on(r.ProfileSetOnce,(function(e){n.setOnceProfile(e)})),this.collect.on(r.ProfileUnset,(function(e){n.unsetProfile(e)})),this.collect.on(r.ProfileIncrement,(function(e){n.incrementProfile(e)})),this.collect.on(r.ProfileAppend,(function(e){n.appendProfile(e)})),this.collect.on(r.ProfileClear,(function(){n.cache={}})),this.ready(r.Profile)},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(!WR(n).length)return;var r=function(e){n[e].length&&n[e].forEach((function(n){t.collect.hook.emit(e,n)}))};for(var i in n)r(i)}},e.prototype.report=function(e,t){void 0===t&&(t={});try{if(this.config.disable_track_event)return;var n=[];n.push(this.collect.processEvent(e,t));var r=this.collect.eventManager.merge(n);this.collect.requestManager.useRequest({url:this.reportUrl,data:r}),this.collect.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_EVENT,info:"埋点上报成功",time:Date.now(),data:r,code:200,status:"success"})}catch(i){this.collect.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:i.message})}},e.prototype.setProfile=function(e){var t=this.formatParams(e);t&&WR(t).length&&(this.pushCache(t),this.report("__profile_set",eK(eK({},t),{profile:!0})))},e.prototype.setOnceProfile=function(e){var t=this.formatParams(e,!0);t&&WR(t).length&&(this.pushCache(t),this.report("__profile_set_once",eK(eK({},t),{profile:!0})))},e.prototype.incrementProfile=function(e){e?this.report("__profile_increment",eK(eK({},e),{profile:!0})):console.warn("please check the params, must be object!!!")},e.prototype.unsetProfile=function(e){if(e){var t={};t[e]="1",this.report("__profile_unset",eK(eK({},t),{profile:!0}))}else console.warn("please check the key, must be string!!!")},e.prototype.appendProfile=function(e){if(e){var t={};for(var n in e){var r;"string"==typeof e[n]||"Array"===QR(r=Object.prototype.toString.call(e[n])).call(r,8,-1)?t[n]=e[n]:console.warn("please check the value of param: "+n+", must be string or array !!!")}WR(t).length&&this.report("__profile_append",eK(eK({},t),{profile:!0}))}else console.warn("please check the params, must be object!!!")},e.prototype.pushCache=function(e){var t=this;WR(e).forEach((function(n){t.cache[n]={val:t.clone(e[n]),timestamp:Date.now()}}))},e.prototype.formatParams=function(e,t){var n=this;void 0===t&&(t=!1);try{var r;if(!e||"[object Object]"!==Object.prototype.toString.call(e))return void console.warn("please check the params type, must be object !!!");var i={};for(var o in e){var a;"string"==typeof e[o]||"number"==typeof e[o]||"Array"===QR(a=Object.prototype.toString.call(e[o])).call(a,8,-1)?i[o]=e[o]:console.warn("please check the value of params:"+o+", must be string,number,Array !!!")}var s=WR(i);if(!s.length)return;if(!this.eventCheck.checkEventParams(i))return;var c=Date.now();return RF(r=Ww(s).call(s,(function(r){var i=n.cache[r];return t?!i:!(i&&n.compare(i.val,e[r])&&c-i.timestamp<n.duration)}))).call(r,(function(e,t){return e[t]=i[t],e}),{})}catch(l){this.collect.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:l.message}),console.log("error")}},e.prototype.compare=function(e,t){try{return Jx(e)===Jx(t)}catch(n){return this.collect.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:n.message}),!1}},e.prototype.clone=function(e){try{return JSON.parse(Jx(e))}catch(t){return this.collect.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:t.message}),e}},e.prototype.unReady=function(){console.warn("sdk is not ready, please use this api after start")},e}(),Xq=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,r=Date.now()+t;return n=window.setTimeout((function i(){var o=Date.now()-r;e(),r+=t,n=window.setTimeout(i,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 r=this.collect.Types;this.collect.on(r.SessionResetTime,(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}(),Uq=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;t.channel_domain||t.disable_track_event||t.disable_sdk_monitor||(this.collect=e,this.config=t,this.url=e.configManager.getUrl("event"),this.collect.on(e.Types.Ready,(function(){n.sdkOnload()})),this.collect.on(e.Types.SubmitError,(function(e){var t=e.type,r=e.eventData,i=e.errorCode,o=e.response;"f_data"===t&&n.sdkError(r,i,o)})),this.collect.on(e.Types.SDKInnerError,(function(e){var t=e.type,r=e.eventData,i=e.errorCode,o=e.msg;n.sdkInnerError(t,r,i,o)})))},e.prototype.sdkOnload=function(){var e=this;try{var t=this.collect.configManager.get(),n=t.header,r=t.user,i=n.app_id,o=n.app_name,a=n.sdk_version,s=r.web_id,c={events:[{event:"onload",params:Jx({app_id:i,app_name:o||"",sdk_version:a,sdk_type:"npm",sdk_config:this.config,sdk_desc:"TOC",url:location.href}),local_time_ms:Date.now()}],user:{user_unique_id:s},header:{}};setTimeout((function(){e.collect.requestManager.useRequest({url:e.url,data:[c],timeout:3e4,app_key:"566f58151b0ed37e",forceXhr:!0})}),16)}catch(l){}},e.prototype.sdkError=function(e,t,n){var r=this;try{var i=e[0],o=i.user,a=i.header,s=[];e.forEach((function(e){e.events.forEach((function(e){s.push(e)}))}));var c={events:VR(s).call(s,(function(e){return{event:"on_error",params:Jx({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:{}};setTimeout((function(){r.collect.requestManager.useRequest({url:r.url,data:[c],timeout:3e4,app_key:"566f58151b0ed37e",forceXhr:!0})}),16)}catch(l){}},e.prototype.sdkInnerError=function(e,t,n,r){var i=this;try{var o=t[0],a=o.user,s=o.header,c=[];t.forEach((function(e){e.events.forEach((function(e){c.push(e)}))}));var l={events:VR(c).call(c,(function(t){return{event:"on_error",params:Jx({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:r}),local_time_ms:Date.now()}})),user:a,header:{}};setTimeout((function(){i.collect.requestManager.useRequest({url:i.url,data:[l],timeout:3e4,app_key:"566f58151b0ed37e",forceXhr:!0})}),16)}catch(u){}},e}(),Bq="undefined"!=typeof window?(window.LogPluginObject||(window.LogPluginObject={}),window.LogPluginObject):null,Nq=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(Fq.hasOwnProperty(n)){var r=Fq[n].object,i=Fq[n].src[e.channel]+"?query="+Date.now();e.exist(n,r,i)}else console.warn("your "+n+" is not exist,please check plugin name");else"object"==Su(t)&&(t.src?e.exist(n,t.call,t.src):e.process(n,t.instance,"INSTANCE"))}))}catch(t){this.collect.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:t.message}),console.log("load extend error")}},e.prototype.exist=function(e,t,n){var r=this;Bq[t]?(this.process(e,Bq[t]),console.log("已有"+e+"插件,避免重复加载~")):this.loadPlugin(e,n,(function(){r.process(e,Bq[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 r=new t;r.apply&&r.apply(this.collect,this.config),console.log("excude "+e+" success")}else t&&t(this.collect,this.config)}catch(i){this.collect.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:i.message}),console.log("excude "+e+" error, message:"+i.message)}},e.prototype.loadPlugin=function(e,t,n,r){var i=this;try{var o=document.createElement("script");o.src=t,this._plugin[e]||(this._plugin[e]=[]),this._plugin[e].push(n),o.onerror=function(){r(t)},o.onload=function(){i._plugin[e].forEach((function(e){e()}))},document.getElementsByTagName("head")[0].appendChild(o)}catch(a){this.collect.emit(cK.DEBUGGER_MESSAGE,{type:cK.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:a.message})}},e}();Hq.usePlugin(Nq,"extend"),Hq.usePlugin(Oq,"et"),Hq.usePlugin(Lq,"profile"),Hq.usePlugin(Xq,"heartbeat"),Hq.usePlugin(Uq,"monitor"),new Hq("default");var Vq=Hq,jq=new(function(){function e(){Py(this,e),Oy(this,"tea",void 0),Oy(this,"_userId",void 0),Oy(this,"_deviceId",void 0)}return Hy(e,[{key:"userId",get:function(){return this._userId}},{key:"deviceId",get:function(){return this._deviceId}},{key:"channel",get:function(){return"cn"}},{key:"init",value:function(e){var t,n;this._userId=(null==e?void 0:e.userId)||((t=localStorage.getItem(vB))||(t=gB(12),localStorage.setItem(vB,t),t)),this._deviceId=(null==e?void 0:e.deviceId)||((n=localStorage.getItem(pB))||(n=gB(11),localStorage.setItem(pB,n),n)),!1!==(null==e?void 0:e.enable)&&(this.tea=this._createTea())}},{key:"_createTea",value:function(){var e=new Vq("player_track");return e.init({app_id:468759,channel:"cn"}),e.start(),e.config({user_unique_id:this._userId,device_id:this._deviceId}),e}}]),e}()),Kq=s;Pn({global:!0,forced:Kq.globalThis!==Kq},{globalThis:Kq});var Wq=o(s),Qq=p,qq=Ce,Zq=an;Pn({target:"Reflect",stat:!0,forced:!c((function(){Reflect.apply((function(){}))}))},{apply:function(e,t,n){return Qq(qq(e),t,Zq(n))}});var Yq=o(ie.Reflect.apply);Pn({target:"Math",stat:!0},{trunc:Hn});var $q=o(ie.Math.trunc),Jq=Pn,eZ=c,tZ=Wi.f;Jq({target:"Object",stat:!0,forced:eZ((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:tZ});var nZ=ie.Object,rZ=o((function(e){return nZ.getOwnPropertyNames(e)})),iZ=o(ie.Symbol.for),oZ=o(ie.Symbol.keyFor),aZ=Pn,sZ=i_,cZ=c,lZ=re,uZ=b_.onFreeze,dZ=Object.freeze;aZ({target:"Object",stat:!0,forced:cZ((function(){dZ(1)})),sham:!sZ},{freeze:function(e){return dZ&&lZ(e)?dZ(uZ(e)):e}});var hZ=o(ie.Object.freeze),fZ=Math.log,pZ=Math.LOG10E;Pn({target:"Math",stat:!0},{log10:Math.log10||function(e){return fZ(e)*pZ}});var vZ=o(ie.Math.log10),gZ=r_;Pn({target:"Object",stat:!0,forced:Object.isExtensible!==gZ},{isExtensible:gZ});var yZ=o(ie.Object.isExtensible),mZ=Pn,_Z=re,bZ=b_.onFreeze,RZ=i_,wZ=c,GZ=Object.preventExtensions;mZ({target:"Object",stat:!0,forced:wZ((function(){GZ(1)})),sham:!RZ},{preventExtensions:function(e){return GZ&&_Z(e)?GZ(bZ(e)):e}});var TZ=o(ie.Object.preventExtensions),kZ=Wu("Array").values,SZ=or,EZ=tt,MZ=ue,DZ=kZ,zZ=Array.prototype,AZ={DOMTokenList:!0,NodeList:!0},PZ=o((function(e){var t=e.values;return e===zZ||MZ(zZ,e)&&t===zZ.values||EZ(AZ,SZ(e))?DZ:t})),xZ=/ANGLE\s+\((?:[^,]+,\s+)?([^,/]+)?(?:[^,]*)(?:[,\s]+)(Direct\S+|OpenGL[\d.\s]+)/,CZ=/ANGLE\s+\((?:[^,]+,\s+)?([^,]+)?(?:[,\s]+)(Direct\S+|OpenGL[\d.\s]+)/,FZ=/ANGLE\s+\((?:[^,]+,\s+)?(?:[^:]+:\s+)?([^,]+)?(?:[,\s]+)(Direct\S+|OpenGL[\d.\s]+)?/,IZ="OpenGL Engine",HZ="Unknow",OZ=4318,LZ=32902,XZ=4098,UZ=function(e){return e.CpuDeriver="CpuDeriver",e.Intel="Intel",e.Nvidia="NVIDIA",e.Amd="AMD",e.Apple="Apple",e.Adreno="Adreno",e[e.Unknow=HZ]="Unknow",e}(UZ||{});function BZ(e){return"NVIDIA"===e?OZ:"AMD"===e?XZ:"Intel"===e?LZ:0}function NZ(e){var t,n,r,i,o=function(e){var t=/(SwiftShader|Intel|NVIDIA|AMD|Radeon|Apple|Adreno)/.exec(e);return t?"Radeon"===t[0]?"AMD":"SwiftShader"===t[0]?"CpuDeriver":t[0]:UZ.Unknow}(e);return o===UZ.Unknow||"CpuDeriver"===o?{vendor:o,vendorId:0,model:e,backupModel:e,api:HZ}:/^ANGLE/.test(e)?function(e,t){var n,r,i,o,a,s,c=HZ,l=HZ,u=HZ;return"Intel"!==e&&"NVIDIA"!==e||(r=xZ.exec(t)),"AMD"!==e&&"Adreno"!==e||(r=CZ.exec(t)),"Apple"===e&&(r=FZ.exec(t)),(null==r?void 0:r[1])&&(c=dk(i=r[1].replace(/(AMD|NVIDIA)/,"")).call(i)),(null==r?void 0:r[2])&&(u=dk(o=r[2]).call(o)),c=dk(n=c.split("(0x00")[0]).call(n),l="Intel"===e?c=dk(a=c.split(IZ)[0]).call(a):dk(s=c.split(IZ)[0]).call(s),{vendor:e,vendorId:BZ(e),model:c,backupModel:l,api:u}}(o,e):"Intel"===o?{vendor:o,vendorId:BZ(o),model:dk(r=e.split(IZ)[0]).call(r),backupModel:dk(i=e.split(IZ)[0]).call(i),api:HZ}:{vendor:o,vendorId:BZ(o),model:dk(t=e.replace(/(AMD|NVIDIA)/,"")).call(t),backupModel:dk(n=e.split(IZ)[0].replace(/(AMD|NVIDIA)/,"")).call(n),api:HZ}}var VZ=Pn,jZ=Math.log,KZ=Math.LN2;VZ({target:"Math",stat:!0},{log2:function(e){return jZ(e)/KZ}});var WZ=o(ie.Math.log2),QZ="g_ven";var qZ="Arc(TM) A770M Graphics|995\nArc(TM) A770 Graphics|983\nArc(TM) A770 Graphics|969\nArc(TM) A580 Graphics|944\nArc(TM) A730M Graphics|822\nArc(TM) A750 Graphics|768\nArc(TM) A750 Graphics|768\nArc(TM) A550M Graphics|660\nArc(TM) A550M Graphics|634\nXe Graphics ReleaseInternal|561\nArc(TM) A770M Graphics|498\nArc(TM) A380 Graphics|473\nArc(TM) A380 Graphics|468\nArc(TM) A370M Graphics|342\nArc(TM) A370M Graphics|341\nXe Graphics|319\nHD Graphics 630 GT2|309\nArc(TM) A350M Graphics|284\nIris(R) Xe MAX Graphics|214\nIris(R) Xe Graphics RI|205\nIris(R) Xe Graphics ReleaseInternal|181\nIris(R) Xe Graphics|180\nGen12 Desktop Graphics Controller|179\nIris(R) Xe Graphics|178\nIris(R) Xe MAX Graphics|168\nCorporation Iris Xe Graphics|167\nCorporation TigerLake-LP GT2 [Iris Xe Graphics]|162\nXe Graphics|158\nArc(TM) A350M Graphics|156\nCorporation TigerLake GT2 [Iris Xe Graphics]|149\nUHD Graphics 770|138\nUHD Graphics ReleaseInternal|137\nIris(R) Pro Graphics P580|137\nIris(R) Plus Graphics|132\nIris Plus Graphics|127\nIris(R) Pro Graphics 580|126\nUHD Graphics 770|125\nUHD Graphics 750|125\nRadeong 0.4 on AMD TONGA (DRM 3.1.0, LLVM 3.9.0)|123\nCorporation Iris Plus Graphics G7|123\nIris(R) Plus Graphics|122\nIris(R) Plus Graphics 940|121\nIris(R) Plus Graphics 650|121\nIris(R) Plus Graphics 655|121\nIris(R) Plus Graphics 655|121\nHD Graphics P4600|120\nIris(TM) Pro Graphics 6200|120\nIris(R) Plus Graphics|118\nIris(R) Plus Graphics 650|116\nIris(R) Plus Graphics 655|115\nIris(R) Pro Graphics 580|114\nCorporation Iris Pro Graphics 580|114\nIris(R) Plus Graphics 645|113\nIris(TM) Pro Graphics 6200|113\nIris(TM) Pro Graphics P580|113\nCorporation Iris Plus Graphics 655|112\nArc(TM) Graphics RI|111\nIris(R) Plus Graphics 655|111\nIris(R) Plus Graphics 655|110\nIris(R) Plus Graphics|110\nUHD Graphics|110\nIris Plus Graphics 655|108\nIris(R) Plus Graphics 650|108\nIris(R) Plus Graphics 650|108\nIris(TM) Pro Graphics 580|108\nIris(TM) Pro Graphics 6200|107\nIris Graphics 6100|107\nIris(TM) Pro Graphics 6200|107\nIris(R) Plus Graphics 645|106\nUHD Graphics 730|106\nIris(TM) Pro Graphics 6200|103\nIris Pro Graphics 580|102\nCorporation Iris Pro Graphics 6200|102\nIris(R) Plus Graphics gfx-driver-user-comp_media-21486 DC ReleaseInternal|101\nIris(R) Pro Graphics 580|101\nIris Plus Graphics 645|101\nUHD Graphics 750|100\nIris(TM) Pro Graphics 580|99\nIris(TM) Graphics 550|99\nIris(TM) Pro Graphics P6300|99\nIris(R) Plus Graphics 650|99\nIris(TM) Pro Graphics 5200|98\nIris(R) Graphics 550|97\nIris(R) Plus Graphics|97\nIris(R) Plus Graphics 650|96\nIris(R) Plus Graphics 655|96\nIris(R) Graphics 550|96\nIris(R) Plus Graphics 645|95\nIris Plus Graphics 650|95\nIris(R) Graphics 550|95\nIris Graphics 550|93\nIris(R) Plus Graphics 650|93\nIris(R) Pro Graphics 580|93\nIris(TM) Plus Graphics 650|91\nIris(TM) Graphics 550|91\nIris(R) Plus Graphics 640|89\nIris(TM) Plus Graphics 650|88\nIris(TM) Pro Graphics P6300|88\nIris(TM) Plus Graphics 650|88\nIris(TM) Graphics 550|87\nUHD Graphics 730|87\nCorporation Iris Plus Graphics 650|87\nIris(TM) Pro Graphics 5200|86\nCorporation CometLake-H GT2 [UHD Graphics]|86\nIris(R) Graphics 540|86\nUHD Graphics P630|86\nUHD Graphics 630|85\nIris(TM) Graphics 540|85\nIris(TM) Plus Graphics 640|84\nIris(TM) Graphics 540|84\nUHD Graphics 630|84\nUHD Graphics 630|83\nUHD Graphics P630|83\nIris(TM) Plus Graphics 640|83\nUHD Graphics 630|83\nUHD Graphics 630|83\nIris Plus Graphics 640|83\nIris(TM) Graphics 540|82\nUHD Graphics 630|82\nUHD Graphics 630|82\nIris(TM) Pro Graphics 5200|81\nUHD Graphics 630|81\nHD Graphics 630|81\nUHD Graphics 630|81\nUHD Graphics 630|81\nUHD Graphics 630|80\nUHD Graphics 630|80\nUHD Graphics 630|80\nIris Pro Graphics 6200|80\nUHD Graphics 630|80\nIris Graphics 540|80\nHD Graphics 630|80\nIris(TM) Graphics 540|80\nIris(TM) Pro Graphics 5200|79\nUHD Graphics 630|79\nUHD Graphics 630|79\nUHD Graphics 630|79\nIris Graphics 540|79\nUHD Graphics 630|79\nUHD Graphics|78\nCorporation Sky Lake Integrated Graphics|78\nIris(TM) Pro Graphics 6200|78\nCorporation WhiskeyLake-U GT2 [UHD Graphics 620]|78\nRadeong 0.4 on AMD BONAIRE (DRM 2.43.0, LLVM 3.8.0)|78\nUHD Graphics 710|78\nUHD Graphics 630|78\nUHD Graphics P630|77\nUHD Graphics 630|77\nUHD Graphics 630 (Desktop 9 Series)|77\nUHD Graphics 630|77\nCoffee Lake UHD Graphics|77\nIris(TM) Pro Graphics 5200|77\nUHD Graphics 630|76\nIris(R) Plus Graphics 640|76\nIris(TM) Pro Graphics 5200|76\nUHD Graphics 630|76\nUHD Graphics|76\nUHD Graphics 630|76\nIris(TM) Pro Graphics 5200|75\nUHD Graphics 630|75\nUHD Graphics P630|75\nHD Graphics P530|75\nHD Graphics 630|75\nIris(TM) Pro Graphics 5200|75\nUHD Graphics 630|75\nIris(TM) Pro Graphics 5200|75\nHD Graphics 620|74\nUHD Graphics 630|74\nHD Graphics 630|74\nHD Graphics 630|74\nCoffee Lake HD Graphics|74\nUHD Graphics 630|74\nIris(TM) Graphics 540|74\nUHD 630|74\nIris(R) Graphics 540|73\nUHD Graphics 620|73\nIris Graphics 6200|73\nCorporation CoffeeLake-H GT2 [UHD Graphics 630]|73\nUHD Graphics 630 (Desktop)|73\nHD Graphics ICL RVP|73\nUHD Graphics 630|73\nHD Graphics 630|72\nIris Pro|72\nKBL Unknown|72\nUHD Graphics 630|72\nIris(TM) Pro Graphics 5200|72\nHD Graphics 530|72\nCorporation UHD Graphics 630 (Desktop 9 Series)|72\nRadeon Pro Vega 16|72\nIris(TM) Graphics 540|72\nIris(R) Graphics 540|72\nUHD Graphics 630|71\nHD Graphics 630|71\nIris(TM) Pro Graphics 5200|71\nUHD Graphics 630|71\nIris Pro|71\nCometLake UHD Graphics 630|71\nHD Graphics 630|71\nUHD Graphics|71\nIris(TM) Plus Graphics 640|71\nUHD Graphics|71\nCorporation UHD Graphics|70\nIris Pro Graphics 6200|70\nIris(R) Graphics 540|70\nGraphics|70\nUHD Graphics 630|70\nHD Graphics ICL RVP BigSur|70\nUHD Graphics ReleaseInternal|70\nHD Graphics 530|70\nUHD Graphics 630|70\nUHD Graphics|70\nUHD Graphics gfx-driver-user-comp_core-23599|70\nUHD Graphics 630|69\nUHD Graphics|69\nIris(TM) Pro Graphics 5200|69\nCorporation Iris Plus Graphics G1 (Ice Lake)|69\nHD Graphics 630|69\nHD Graphics 630|69\nIris(R) Plus Graphics|69\nIris(TM) Pro Graphics 5200|69\nUHD Graphics 620|69\nUHD Graphics|69\nIris(R) Plus Graphics 640|69\nIris Pro Graphics 6200|69\nHD Graphics 630|69\nUHD Graphics 630 (Mobile)|68\nIris(TM) Pro Graphics 5200|68\nCorporation UHD Graphics 630 (Desktop)|68\nHD Graphics 630|68\nUHD Graphics 630|68\nUHD Graphics 620|68\nUHD Graphics 630|68\nIris(TM) Plus Graphics 640|68\nUHD Graphics|67\nIris Pro Graphics 580|67\nIris(TM) Graphics 540|67\nUHD Graphics 620|67\nIris(TM) Pro Graphics 5200|67\nUHD Graphics|66\nHD Graphics P530|66\nCorporation UHD Graphics 630 (Mobile)|66\nIris(R) Plus Graphics 640|66\nUHD Graphics 630|66\nIris(R) Plus Graphics 640|65\nHD Graphics 630|65\nHD 530|65\nUHD Graphics 620|65\nSKL Unknown|65\nHD Graphics 630|64\nIris(TM) Graphics 540|64\nMesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2)|64\nUHD Graphics 630|64\nHD Graphics 530|63\nHD Graphics 530|63\nHD Graphics 530|63\nMesa Intel(R) HD Graphics 530 (SKL GT2)|63\nUHD Graphics|63\nHD Graphics 530|63\nIris Graphics 550|63\nHD Graphics 530|63\nIris Plus Graphics 655|63\nHD Graphics 630|63\nUHD Graphics, Gen11 LP|63\nCorporation 8th Gen Core Processor Gaussian Mixture Model|63\nUHD Graphics 630|63\nIris(TM) Graphics 650|63\nIris(R) Plus Graphics 640|62\nHD Graphics 530|62\nMesa DRI Intel(R) Iris Graphics 540 (Skylake GT3e)|62\nIris(R) Plus Graphics|61\nIris(TM) Pro Graphics 5200|61\nIris Pro|61\nHD Graphics 620|61\nUHD Graphics 620|61\nUHD Graphics 630|61\nUHD Graphics|61\nHD Graphics 530|60\nIris Plus Graphics G1|60\nIris(TM) Pro Graphics 5200|60\nIris Plus Graphics 650|60\nUHD Graphics|60\nHD Graphics 620|60\nUHD Graphics 620|60\nUHD Graphics 630|60\nMesa DRI Intel(R) HD Graphics 630 (Kaby Lake GT2)|60\nUHD Graphics 620|60\nHD Graphics 630|60\nHD Graphics 630|59\nIris Graphics 540|59\nIris Plus Graphics 640|59\nCoffeeLake-H GT2 [UHD Graphics 630]|59\nHD Graphics 630|59\nUHD Graphics|59\nHD Graphics 620|59\nUHD Graphics 620|59\nHD Graphics 630|59\nCorporation UHD Graphics 620 (Whiskey Lake)|59\nIris(R) Plus Graphics 650|59\nUHD Graphics 620|59\nMesa Intel(R) HD Graphics 520 (SKL GT2)|58\nHD Graphics 630|58\nHD Graphics P530|58\nIris(TM) Plus Graphics 640|58\nCorporation HD Graphics 630|58\nUHD Graphics 620|58\nUHD Graphics 630|58\nHD Graphics P630|58\nMesa DRI Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2)|58\nCorporation CometLake-S GT2 [UHD Graphics 630]|58\nHD Graphics 530|58\nIris Graphics 540|58\nHD Graphics 530|58\nCorporation Device|58\nHD Graphics CFL CRB|57\nHD Graphics 620 macOS Edition|57\nHD Graphics 530|57\nMesa DRI Intel(R) HD Graphics 520 (SKL GT2)|57\nIris Pro Graphics|56\nIris(TM) Pro Graphics 5200|56\nIris(R) Plus Graphics 655|56\nCoffee Lake UHD Graphics|56\nIris(TM) Graphics 640|55\nIris Pro|55\nUHD Graphics 630|55\nUHD Graphics 620|55\nHD Graphics 530|55\nHD Graphics 520|54\nHD Graphics 530|54\nUHD Graphics 620|54\nHD Graphics 530|54\nCorporation UHD Graphics 620|54\nUHD Graphics|54\nIris Plus Graphics G7|54\nCorporation Skylake GT2 [HD Graphics 520]|53\nUHD Graphics 630|53\nHD Graphics 630|53\nCorporation HD Graphics 530|53\nUHD Graphics 617|53\nHD Graphics 520|52\nHD Graphics 620|52\nHD Graphics 620|52\nHD Graphics 620|52\nHD Graphics 620|52\nHD Graphics 630|52\nHD Graphics 630|52\nHD Graphics 5600|51\nHD Graphics 530|51\nHD Graphics 630|51\nUHD Graphics 615|51\nMesa DRI Intel(R) HD Graphics 520 (Skylake GT2)|51\nHD Graphics 630|50\nHD Graphics 620|50\nUHD Graphics|50\nHD Graphics P4600/P4700|50\nHD Graphics 520|50\nHD Graphics 530|50\nHD Graphics 620|50\nHD Graphics 530|50\nCorporation HD Graphics 620|50\nHD Graphics 530|50\nUHD Graphics 620|49\nUHD Graphics 620|49\nHD Graphics 530|49\nIris(TM) Graphics 6100|49\nHD Graphics 4600|49\nHD Graphics 630|49\nUHD Graphics 617|49\nUHD Graphics RI|48\nHD Graphics 520|48\nUHD Graphics 617|48\nHD Graphics 5600|48\nHD Graphics 620|48\nUHD Graphics, Gen11 LP|47\nUHD Graphics 617|47\nMesa DRI Intel(R) HD Graphics 620 (Kaby Lake GT2)|47\nHD Graphics 615|47\nUHD Graphics RI|47\nHD Graphics 630|47\nHD Graphics 4600|46\nHD Graphics 520|46\nCorporation Skylake GT2 [HD Graphics 520]|46\nHD Graphics 520|46\nCorporation Device|46\nHD Graphics 4600|46\nHD Graphics 615|45\nHD Graphics 4600|45\nIris(TM) Graphics 6100|45\nHD Graphics 615|45\nUHD Graphics 615|45\nHD Graphics 630 GT2|45\nHD Graphics 4600|45\nHD Graphics 630|45\nIris(TM) Graphics 6100|45\nHD Graphics 4600|45\nHD Graphics 620|45\nIris(TM) Graphics 6100|45\nHD Graphics 520|45\nHD Graphics 4600|45\nIris(TM) Graphics 540|44\nHD Graphics 530|44\nHD Graphics 4600|44\nIris(TM) Graphics 5100|44\nKabylake HD Graphics ULT GT2|44\nIris Graphics 6100|44\nUHD Graphics 630|44\nHD Graphics 520|44\nHD Graphics KBL CRB|44\nHD Graphics 530 (Skylake GT2)|44\nCorporation HD Graphics 620|44\nHD Graphics 515|44\nUHD Graphics|44\nUHD Graphics 620|44\nIris(TM) Pro Graphics P580|43\nUHD Graphics 615|43\nHD Graphics 4600|43\nHD Graphics 4600|43\nCorporation Skylake Integrated Graphics|43\nHD Graphics 530|43\nUHD Graphics 615|43\nUHD Graphics 630|43\nHD Graphics 615|42\nHD Graphics 620|42\nHD Graphics 4600|42\nHD Graphics 615|42\nHD Graphics 4600|42\nHD Graphics 4600|42\nMesa DRI Intel(R) Kabylake GT2|42\nHD Graphics 620|42\nCorporation HD Graphics 6000|42\nUHD Graphics 615|42\nHD Graphics 4600|41\nCorporation HD Graphics 520|41\nHD Graphics P4600/P4700|41\nCorporation, Series Chipset Iris Plus Graphics 655|41\nHD Graphics 4600|41\nMesa DRI Intel(R) HD Graphics 530 (Skylake GT2)|41\nHD Graphics 4600|41\nIris(TM) Graphics 640|41\nHD Graphics 4600|41\nHD Graphics 630|40\nIris(TM) Graphics 5100|40\nIris(TM) Graphics 6100|40\nUHD Graphics 610|40\nHD Graphics 4600|40\nHD Graphics 4600|40\nUHD Graphics 615|40\nUHD Graphics 610|40\nHD Graphics 530|40\nUHD Graphics 605|40\nHD Graphics 615|40\nHD Graphics 4600|40\nUHD Graphics 615|40\nHD Graphics 505|39\nPHDGD Ivy 4|39\nUnknown|39\nIris(TM) Graphics 5100|39\nIris|39\nCorporation Iris Graphics 6100|39\nHD Graphics 6000|39\nIris(TM) Graphics 5100|39\nHD Graphics 615|39\nHD Graphics 5500|39\nSkylake GT2 [HD Graphics 520]|39\nCorporation Broadwell-U Integrated Graphics|38\nHD Graphics 615|38\nHD Graphics 5500|38\nHD Graphics 4600|38\nMesa DRI Intel(R) HD Graphics P4000 (IVB GT2)|38\nHD Graphics 4600|38\nHD Graphics 615|38\nCorporation HD Graphics 610|38\nHD Graphics 4600|38\nHD Graphics 4600|38\nIris(TM) Graphics 5100|38\nIris Graphics 6100|38\nHD Graphics 515|38\nHD Graphics 6000|38\nUHD Graphics, Gen11 LP|38\nIris(TM) Graphics 5100|38\nHD Graphics 4600|37\nHD Graphics 610|37\nHD Graphics 4600|37\nHD Graphics 515|37\nHD Graphics 4600|37\nHD Graphics 4600|37\nIris Graphics P580|37\nIris(TM) Pro Graphics P6300|37\nHD Graphics 5500|37\nHD Graphics 4600|37\nIris Graphics 6100|37\nUHD Graphics 610|37\nHD Graphics 4600|37\nHD Graphics 4600|37\nUHD Graphics 610|37\nHD Graphics 530|37\nHD Graphics 5500|37\nHD Graphics 515|36\nHD Graphics P4600/P4700|36\nHD Graphics 515|36\nHD Graphics 4600|36\nUHD Graphics 615|36\nIris Graphics 6100|36\nHD Graphics 4600|36\nHD Graphics 4600|36\nHD Graphics 4600|36\nHD Graphics 520|36\nHD Graphics 520|36\nHD Graphics 5500|36\nCorporation HD Graphics 5500|35\nIris|35\nHD5500 Graphics PG7|35\nHD Graphics 515|35\nIris|35\nGraphics gfx-driver-user-feature_dg1_poweron-27723 DCH ReleaseInternal|35\nHD Graphics 615|35\nHD Graphics P630|35\nHD Graphics 510|35\nHD Graphics 6000|35\nHD Graphics 5000|35\nCorporation HD Graphics 5300|35\nHD Graphics 6000|35\nHD Graphics 4600|35\nHD5500 Broadwell PG7|35\nGraphics HD 4600|35\nHD Graphics 6000|35\nHD Graphics 510|34\nHD Graphics 610|34\nHD Graphics 4600|34\nHD Graphics Family (PHDGD Skylake v2.9)|34\nCorporation Device|34\nHD Graphics 610|34\nUHD Graphics 610|34\nHD Graphics 5300|34\nHD Graphics 5000|34\nHD Graphics 4600|34\nUHD Graphics 610|33\nHD Graphics 4600|33\nUHD Graphics 620|33\nCorporation UHD Graphics 615|33\nHD Graphics 5000|33\nKabylake HD Graphics ULX GT2|33\nHD Graphics 620|33\nUHD Graphics 615|33\nHD Graphics 4600|33\nHD Graphics 5500|33\nHD Graphics 515|33\nUHD Graphics|33\nHD Graphics 4600|33\nHD Graphics 520|33\nHD Graphics 6000|33\nHD Graphics 615|33\nHD Graphics KBL CRB|33\nHD Graphics 4600|33\nUHD Graphics 610|33\nIris Graphics 6100|33\nHD Graphics 515|33\nIris|32\nIris|32\nHD Graphics 5000|32\nIris|32\nHD Graphics 5000|32\nIris(TM) Graphics 5100|32\nHD Graphics 4600|32\nHD Graphics 4600|32\nCorporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|32\nHD Graphics 5500 (PHDGD Skylake v2.9)|32\nHD Graphics 610|32\nHD Graphics 6000|31\nHD Graphics 5500|31\nIris|31\nHD Graphics 6000|31\nUHD Graphics 610|31\nHD Graphics 510|31\nHD Graphics|31\nHD Graphics 6000|31\nHD Graphics 4400|31\nHD Graphics 5000|31\nHD Graphics 4600|30\nHD Graphics 515|30\nHD Graphics 5600|30\nHD Graphics 4600|30\nHD Graphics 4400|30\nHD Graphics 530|30\nGeForce GTX 960|30\nUHD Graphics 610|30\nGeForce GTX 960|30\nHD Graphics 510|30\nHD Graphics 6000|30\nCorporation HD Graphics 515|30\nHD Graphics 610|29\nHD Graphics 510|29\nHD Graphics 5000|29\nHD Graphics 4600|29\nIris(TM) Pro Graphics 6200|29\nHD Graphics 510|29\nHD Graphics 5000|29\nHD Graphics 6000|29\nIris|29\nHD Graphics 4400|29\nHD Graphics 4400|29\nHD Graphics 4000|29\nHD Graphics 510|29\nHD Graphics 5000|29\nHD Graphics 4400|28\nHD Graphics 610|28\nHD Graphics 5300|28\nHD Graphics 510|28\nHD Graphics|28\nHD Graphics 610|28\nHD Graphics 4400|28\nHD Graphics 610|28\nHD Graphics 4600|28\nHD Graphics 4600|28\nHD Graphics 5000|28\nHD Graphics 4400|28\nHD Graphics 4400|28\nCorporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|28\nHD Graphics 4400|28\nHD Graphics 5300|28\nHD Graphics 5000|28\nUHD Graphics 605|28\nHD Graphics 4400|28\nHD Graphics 5500|28\nHD Graphics 4000|28\nHD Graphics 4400|27\nHD Graphics 615|27\nHD Graphics Family(PHDGD Skylake v2.0)|27\nHD Graphics 4400|27\nHD Graphics 4400|27\nHD Graphics 610|27\nCorporation HD Graphics 510|27\nIris|27\nHD Graphics 520|27\nHD Graphics 5000|27\nHD Graphics 5300|27\nHD Graphics 6000|27\nHD Graphics 4000|27\nHD Graphics 610|27\nHD Graphics 5000|27\nHD Graphics 4600|27\nMesa DRI Intel(R) HD Graphics 505 (Broxton)|27\nHD Graphics 5500|27\nHD Graphics|27\nHD Graphics 5000|26\nUHD Graphics 600|26\nHD Graphics 4600|26\nMesa DRI Intel(R) Haswell Mobile|26\nHD Graphics 4000|26\nHD Graphics 5300|26\nIris(TM) Graphics 540|26\nHD Graphics 4000|26\nHD Graphics 4600|26\nHD Graphics|26\nHD Graphics 4400|26\nHD Graphics 4600|26\nHD Graphics 6000|26\nCorporation Celeron N3350/Pentium N4200/Atom E3900 Series Integrated Graphics Controller|26\nHD Graphics 530|26\nHD Graphics 5500|25\nBroxton-P HD Graphics|25\nCorporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|25\nHD 4000|25\nHD Graphics 4400|25\nHD Graphics 4600|25\nHD Graphics 5500|25\nHD 4000|25\nCorporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|25\nCorporation HD Graphics|25\nHD Graphics 4400|25\nMesa DRI Intel(R) HD Graphics 5500 (Broadwell GT2)|25\nHD Graphics 4400|25\nHD Graphics|25\nUHD Graphics 600|24\nArc(TM) Graphics|24\nHD Graphics 4600|24\nHD Graphics 5300|24\nHD Graphics 4400|24\nHD Graphics 4400|24\nHD Graphics 4400|24\nHD Graphics 4000|24\nUHD Graphics 605|24\nHD Graphics 5000|23\nCorporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller|23\nUHD Graphics, LKF|23\nUHD Graphics 605|23\nHD Graphics 4400|23\nHD Graphics 4400|23\nHD Graphics 4000|23\nHD Graphics 4400|23\nMesa DRI Intel(R) Ivybridge Desktop|23\n0x496e74656c2048442047726170686963000732034343|23\nHD Graphics 5300|22\nHD Graphics 615|22\nKabylake HD Graphics ULX GT2|22\nHD Graphics 5300|22\nHD Graphics|22\nHD Graphics|22\nHD Graphics 4000|22\nHD Graphics|22\nHD Graphics 515|22\nHD Graphics|22\nHD Graphics 5300|22\nCorporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|22\nHD Graphics 5300|22\nCorporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|22\nHD Graphics 4000|21\nUHD Graphics 605|21\nCorporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|21\nHD Graphics 4400|21\nHD Graphics|21\nHD Graphics 4400|21\nCorporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|21\nHD Graphics|21\nHD Graphics 5300|21\nHD Graphics 4400|21\nHD Graphics 5300|21\nHD Graphics P4600/P4700|21\nHD Graphics|21\nCorporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|21\nCorporation UHD Graphics 605|20\nUHD Graphics 600|20\nHD Graphics 4000|20\nHD Graphics|20\nUHD Graphics 600 Universal|20\nHD Graphics 4600|20\nHD Graphics 500|20\nUHD Graphics 600|20\nHD Graphics|20\nHD Graphics 5000|20\nHD Graphics 4400|20\nHD Graphics 5300|19\nHD Graphics 4000|19\nMesa DRI Intel(R) Sandybridge Mobile|19\nHD Graphics 505|19\nHD Graphics 4000|19\nHD Graphics 4400|19\nUHD Graphics 600|19\nHD Graphics 3000|19\nHD Graphics 615|19\nHD Graphics|19\nCorporation Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series Integrated Graphics Controller|19\nHD Graphics 4000|19\nHD Graphics|19\nUHD Graphics 600|19\nHD Graphics|19\nCorporation Haswell-ULT Integrated Graphics Controller|19\nHD Graphics 4400|19\nCorporation GeminiLake [UHD Graphics 600]|19\nHD Graphics 4000|18\nHD Graphics|18\nHD Graphics|18\nHD Graphics 500|18\nHD Graphics 4000|18\nCherryView HD Graphics|17\nCorporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller|17\nXeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|17\nCorporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|17\nUHD Graphics 600|17\nUHD Graphics 600|17\nCorporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller|16\nHD Graphics|16\nUHD Graphics 600|16\nHD Graphics|16\nHD Graphics 5000 (Android)|16\nHD Graphics|16\nUHD Graphics 600|16\nHD Graphics|16\nHD Graphics, Gen10|16\nHD Graphics (PHDGD IvyDrive 3.0)|16\nHD Graphics|15\nUHD Graphics 600|15\nCorporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics Controller|15\nHD Graphics 500|15\nHD Graphics 505|15\nHD Graphics|15\nCorporation 3rd Gen Core processor Graphics Controller|15\nHD Graphics 4400|15\nHD Graphics|14\nHD Graphics|14\nHD Graphics|14\nHD Graphics 505|14\nHD Graphics|14\nHD Graphics|14\nHD Graphics|14\nHD Graphics|13\nHD Graphics 530|13\nHD Graphics 500|13\nCorporation 3rd Gen Core processor Graphics Controller|13\nHD Graphics 4400|12\nHD Graphics 5500|12\nHD Graphics|12\nHD Graphics|12\nCorporation HD Graphics 500|12\nHD Graphics 500|12\n3rd Gen Core processor Graphics Controller|12\nHD Graphics|11\nCorporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Configuration Registers|11\nCorporation 2nd Gen Core Processor Family Integrated Graphics Controller|11\nHD Graphics 510|11\nHD Graphics 4600 (PHDGD Skylake v2.9)|9\nCorporation Atom Processor Z36xxx/Z37xxx Series Graphics & Display|8\nCorporation Atom Processor Z36xxx/Z37xxx Series Graphics & Display|8\nMesa DRI Intel(R) Bay Trail|8\nUHD Graphics, Gen12 LP ReleaseInternal|5\nCorporation D3D12 (Intel(R) UHD Graphics 630)|3\nHD Graphics 3000|2\n(PE64) Intel(R) 4th Generation Haswell HD Graphics Family|-1\n4 Series Internal Chipset|-1\n7 Series/C216 Chipset Family MEI Controller #1|-1\nB43 Express Chipset|-1\nCometLake-S GT2 [UHD Graphics 630]|-1\nHD Graphics 5500|-1\nHD Graphics 620|-1\nG35 Express Chipset Family|-1\nG41 Express Chipset|-1\nG45/G43 Express Chipset|-1\nGraphics Media Accelerator HD|-1\nHD Graphics (PHDGD Omega 5.0)|-1\nHD Graphics 4400|-1\nHD Graphics P3000|-1\nHD Graphics P3000 (PHDGD Omega 5.0)|-1\nIncrediblE HD Graphics 3000|-1\nIris Pro Graphics 5200|-1\nMesa DRI Intel(R) HD Graphics (CHV)|-1\nMesa DRI Intel(R) Ivybridge Mobile|-1\nMobile Intel(R) 4 Series Express Chipset Family|-1\nMobile Intel(R) 965 Express Chipset Family|-1\nMobile Intel(R) HD Graphics|-1\nPHDGD Quantic C3|-1\nQ45/Q43 Express Chipset|-1\nRadeong 0.4 on AMD CAPE VERDE (DRM 2.43.0, LLVM 3.7.0)|-1\nRadeong 0.4 on AMD CAPE VERDE (DRM 3.9.0 / 4.9.0-rc1+, LLVM 4.0.0)|-1\nRadeong 0.4 on AMD FIJI (DRM 3.2.0 / 4.7.0-rc5+, LLVM 4.0.0)|-1\nUHD Graphics, Gen12 LP ReleaseInternal|-1";var ZZ="\nGeForce RTX 4090|1950\nGeForce RTX 4090 Laptop GPU|1791\nGeForce RTX 4070 Ti|1517\nGeForce RTX 3090 Ti|1465\nGeForce RTX 4080|1426\nGeForce RTX 4060 Laptop GPU|1408\nGeForce RTX 3080 Ti Laptop GPU|1394\nGeForce RTX 3080|1325\nGeForce RTX 3080 Ti|1298\nRTX A5500 Laptop GPU|1242\nGeForce RTX 3090|1235\nGeForce RTX 3070 Ti|1229\nGeForce RTX 3070|1228\nGeForce RTX 3060 Ti|1166\nGeForce RTX 3080 Laptop GPU|1139\nRTX A4000 Laptop GPU|1126\nGeForce RTX 2080 Ti|1120\nGeForce RTX 3070 Laptop GPU|1077\nTITAN V|1070\nGeForce RTX 2080 SUPER|1063\nQuadro RTX 8000|1054\nRTX A6000|1046\nTITAN RTX|1046\nGeForce RTX 3070 Ti Laptop GPU|1033\nRTX A5000 Laptop GPU|1027\nGeForce RTX 4090 Laptop GPU|1024\nGeForce RTX 3060|1015\nTITAN X (Pascal)|1008\nTITAN Xp|995\nGeForce GTX 1080 Ti|992\nGeForce RTX 4070 Laptop GPU|989\nGeForce RTX 4090|982\nGeForce RTX 2070 SUPER|981\nGeForce RTX 4080|975\nGeForce RTX 3060|970\nGeForce RTX 2080|970\nGeForce RTX 4080 Laptop GPU|968\nGeForce RTX 3060 Laptop GPU|913\nGeForce RTX 2060 SUPER|890\nGeForce RTX 4060 Laptop GPU|882\nGeForce RTX 2070|879\nGeForce RTX 2080 Super with Max-Q Design|868\nGeForce RTX 2080 with Max-Q Design|868\nQuadro RTX 5000|867\nGeForce RTX 3080 Ti Laptop GPU|861\nQuadro RTX 5000 with Max-Q Design|843\nAsus GeForce GTX 1080|841\nGeForce GTX 1080|841\nGeForce RTX 2070 Super with Max-Q Design|837\nRTX A3000 Laptop GPU|835\nQuadro RTX 4000 with Max-Q Design|833\nGeForce RTX 3070 Ti Laptop GPU|827\nQuadro RTX 4000|817\nRTX A6000|814\nGeForce GTX 1070 Ti|785\nGeForce RTX 4070 Ti|784\nGeForce RTX 4050 Laptop GPU|784\nRTX A5500 Laptop GPU|783\nTITAN Xp COLLECTORS EDITION|771\nGeForce RTX 2070 with Max-Q Design|765\nGeForce RTX 3050|760\nGeForce RTX 2060|757\nGeForce GTX 980 Ti|755\nQuadro P6000|753\nGeForce GTX 1080|747\nQuadro RTX 6000|744\nGeForce GTX 1070|742\nRTX A4000|739\nGeForce RTX 3090|737\nGeForce RTX 3080 Ti|733\nGeForce GTX 1080 Ti|729\nQuadro P4200|711\nGeForce GTX 1080 with Max-Q Design|707\nGeForce RTX 3060 Lite Hash Rate|705\nEIZO MED-XN83|704\nGeForce RTX 3080 Ti|701\nGeForce GTX 1660 SUPER|701\nTITAN Xp|700\nEVGA GeForce GTX 1070|698\nGeForce RTX 3090 Ti|696\nQuadro GV100|695\nQuadro P4000|695\nGeForce GTX 1660 Ti|694\nGeForce RTX 3070 Ti|690\nRTX 6000 Ada Generation|687\nGeForce RTX 3070|687\nQuadro RTX 8000|685\nRTX A2000 12GB|683\nGeForce RTX 2080|679\nGeForce GTX TITAN X|679\nQuadro M6000 24GB|676\nGeForce GTX 1660 SUPER|674\nTITAN V|673\nQuadro RTX 3000|672\nGraphics Device|672\nRTX A5000|669\nGeForce RTX 3090|669\nTITAN Xp COLLECTORS EDITION|669\nGeForce GTX 1070 A17|668\nGeForce RTX 3080 Laptop GPU|667\nRTX A4500 Embedded GPU|663\nRTX A5000 Laptop GPU|663\nGeForce RTX 3080|658\nGeForce RTX 3050 Ti Laptop GPU|657\nGeForce GTX 1070 with Max-Q Design|656\nGeForce RTX 3060 Ti|656\nQuadro P4200 with Max-Q Design|651\nGeForce RTX 3080|651\nGeForce RTX 2080 SUPER|650\nGeForce GTX 1070 Ti|648\nGeForce GTX 1070 with MaxQ Design|642\nRTX A3000 Laptop GPU|641\nGeForce RTX 3070 Laptop GPU|641\nGeForce GTX 1070|640\nGA104GL [RTX A4000]|639\nGeForce GTX 980 Ti|637\nGeForce RTX 2070 Mobile / Max-Q Refresh|637\nRTX A4000 Laptop GPU|634\nGeForce RTX 3060|633\nMicrosoft Virtual Render Driver|633\nGeForce RTX 3050 Laptop GPU|631\nRTX A2000|629\nGeForce RTX 2070 Mobile / Max-Q|626\nGeForce RTX 3070|625\nQuadro P5000|625\nQuadro P4000|621\nGeForce RTX 3060 Laptop GPU|621\nGeForce RTX 2060 with Max-Q Design|618\nGV102|614\nGeForce RTX 2070 SUPER|612\nGeForce GTX 1660|606\nGeForce RTX 2070|604\nGeForce GTX 1660 Ti with Max-Q Design|601\nGeForce GTX TITAN X|598\nRTX A2000 8GB Laptop GPU|598\nGeForce GTX TITAN Xp|595\nGeForce GTX 980|593\nGeForce RTX 2080 SUPER|591\nGTX 1060 HL|589\nTesla T4|589\nGRID P4-1Q|585\nRTX A4000|581\nGeForce RTX 2080 Ti|577\nGeForce RTX 2080 Super with Max-Q Design|576\nQuadro RTX 4000 Mobile / Max-Q|576\nTU102 [TITAN RTX]|574\nGeForce GTX 1060 with Max-Q Design|571\nGeForce RTX 2070 SUPER|570\nGeForce GTX 1060 6GB|570\nGeForce RTX 2080 Mobile|568\nGeForce RTX 2060|568\nQuadro P3200|565\nP106-100|564\nGRID V100DX-1Q|564\nRTX A2000|562\nGeForce RTX 2080 Ti Rev. A|561\nGeForce RTX 2080 Rev. A|559\nGV100 [TITAN V]|557\nGeForce RTX 2080|556\nGeForce GTX 1650 SUPER|554\nP106-100 Custom|553\nGeForce RTX 2070 Super with Max-Q Design|553\nGV100|553\nGeForce RTX 2070 Mobile|550\nGP102 [TITAN X]|548\nRTX A2000 12GB|546\nGeForce GTX 1060 5GB|542\nMSI GeForce GTX 1060|542\nGeForce RTX 2060 SUPER|542\nGRID T4-1Q|539\nQuadro RTX 5000 Mobile / Max-Q|538\nGeForce RTX 3050|538\nGeForce GTX 1060 3GB|538\nQuadro RTX 5000 with Max-Q Design|537\nQuadro M6000|536\nRTX A2000 Laptop GPU|536\nGeForce GTX 1660 SUPER|533\nA10-2B|530\nTITAN X (Pascal)|530\nQuadro P5000|527\nGeForce RTX 2070|526\nGeForce GTX 1080|525\nGeForce RTX 2060 Mobile|524\nPNY GeForce GTX 980|524\nGeForce GTX 1080 Mobile|523\nGeForce RTX 2060 SUPER|520\nGeForce GTX 780 Ti|518\nRTX A4500|516\nGeForce RTX 2060 Rev. A|515\nMSI GeForce GTX 980|515\nQuadro P3200 with Max-Q Design|513\nGeForce RTX 2070 with Max-Q Design|513\nGeForce RTX 3050 Ti Laptop GPU|510\nQuadro RTX 3000 Mobile / Max-Q|509\nGeForce GTX 1660 SUPER|508\nQuadro RTX 4000|508\nGeForce GTX 1060|506\nGeForce RTX 2080 with Max-Q Design|505\nGeForce GTX 1080 Ti|505\nGeForce GTX 1660 Ti Rev. A|504\nGeForce GTX 1660 Ti Mobile|504\nGeForce RTX 3050 Laptop GPU|503\nGeForce RTX 2060|503\nQuadro RTX 4000 with Max-Q Design|500\nEIZO MED-XN83|499\nGeForce GTX 970|499\nGeForce GTX 1080|495\nGeForce GTX 1070 Ti|492\nGeForce GTX 980|491\nA100-PCIE-40GB|489\nGeForce GTX 1070|487\nGeForce GTX 1660 Ti|487\nQuadro P2200|485\nGeForce GTX TITAN Black|484\nTITAN Xp COLLECTORS EDITION|483\nTITAN RTX|482\nQuadro P5200|482\nGeForce GTX 1060 with Max-Q Design|480\nRTX A1000 Laptop GPU|479\nGeForce GTX 1060 6GB|479\nQuadro RTX 5000|475\nTITAN V|475\nGRID P100-4Q|474\nEVGA GeForce GTX 970|472\nGeForce GTX 1650 SUPER|471\nGeForce GTX 1650 Ti|470\nQuadro RTX 3000|470\nQuadro M5000|469\nQuadro RTX 3000 with Max-Q Design|468\nGeForce GTX 980 Ti|467\nGeForce GTX TITAN|467\nQuadro P4200|466\nGeForce GTX 1070 with Max-Q Design|466\nQuadro M5000|466\nGeForce GTX 1080 Ti|466\nTesla M60|462\nGeForce GTX 1660|457\nGeForce GTX 1660|455\nGeForce RTX 2050|453\nGeForce GTX 1060|453\nGeForce RTX 2060 with Max-Q Design|453\nQuadro P3200 with Max-Q Design|452\nQuadro P4000|450\nGeForce GTX 1060 3GB|449\nGeForce GTX 1070|448\nGeForce GTX 1060 6GB Rev. 2|447\nGigabyte GeForce GTX 780 Ti|447\nTITAN Xp|444\nGeForce GTX 980M|440\nA10-4Q|439\nGeForce GTX 1080 with Max-Q Design|437\nGeForce GTX 1650 SUPER|435\nQuadro P5000|435\nQuadro P3000|434\nRTX A6000|434\nGeForce GTX 1060 3GB|433\nGeForce GTX 1070 Ti|432\nGeForce GTX 780|432\nGeForce GTX 1060 Mobile|432\nGigabyte GeForce GTX 970|431\nGeForce GTX TITAN Z|431\nQuadro K6000|429\nGeForce GTX 1650|425\nGeForce GTX 970|421\nTesla K20m|420\nQuadro GV100|419\nQuadro P4000|419\nQuadro P3200|417\nGTX 1060 HL|415\nRTX A2000 Laptop GPU|415\nGeForce GTX 780 by St3Phl3|414\nP102-100|412\nT1200 Laptop GPU|412\nGeForce GTX 780 Ti|411\nGeForce GTX 1060 6GB|408\nGeForce GTX 1650 Ti with Max-Q Design|407\nQuadro T2000 with Max-Q Design|407\nQuadro P2000|406\nQuadro P2200|406\nGeForce RTX 2060 Max-Q|405\nGeForce GTX 1650 Ti Mobile|403\nGeForce GTX 1060 Mobile 6GB|403\nGeForce GTX 1060 with Max-Q Design|401\nGeForce GTX 980|398\nGeForce RTX 2070 Rev. A|397\nGeForce GTX TITAN X|397\nTesla T4|395\nQuadro P6000|394\nGeForce GTX 1060 3GB|394\nQuadro M5000|393\nGeForce GTX 1060 with Max-Q Design|392\nPNY GeForce GTX 970|392\nQuadro T2000|391\nQuadro T1000 with Max-Q Design|391\nGRID P40-8Q|390\nGeForce GTX 780 Rev. 2|389\nQuadro GP100|387\nGeForce GTX 980|387\nP104-100|387\nGeForce GTX 1650 Ti|386\nGRID P40-4Q|384\nGeForce GTX 780 Ti|383\nDevice|383\nTU117M|381\nQuadro P2000|380\nQuadro RTX 6000|379\nGeForce GTX 1070 Mobile|378\nQuadro T1000|377\nGeForce RTX 3070 Mobile / Max-Q|376\nGeForce GTX 1060|376\nGRID V100-1Q|375\nGeForce GTX 780 Rev. 2|372\nGeForce RTX 2050|370\nGeForce GTX 770|370\nGeForce GTX 970|368\nGeForce GTX 1650 Ti|368\nGRID T4-2B4|368\nAsus GeForce GTX 780|366\nP106-100|365\nQuadro RTX 8000|365\nGeForce GTX TITAN Black|365\nGRID RTX6000-2Q|365\nGeForce GTX TITAN Black|363\nQuadro M4000|363\nGeForce GTX 1060 6GB|362\nQuadro P5000|361\nGeForce GTX 1650|361\nQuadro M5500|361\nGeForce GTX 780|360\nGeForce GTX 780|360\nGeForce GTX 980M|358\nGeForce GTX 1650|358\nGeForce GTX 1050 Ti|357\nQuadro P3200 Mobile|357\nGeForce GTX 1650 with Max-Q Design|356\nTesla T4|356\nQuadro P2000|356\nGeForce GTX TITAN|355\nGeForce GTX 970|355\nGeForce GTX 980 Ti|354\nGeForce GTX 1660 Ti with Max-Q Design|354\nGeForce GTX 780 Rev. 2|352\nGRID P4-4Q|351\nGeForce GTX TITAN X|351\nT1200 Laptop GPU|350\nGRID T4-8Q|350\nGeForce GTX 1060|349\nGeForce GTX 1050 Ti with Max-Q Design|348\nGeForce GTX 970M|346\nT1000 8GB|346\nGeForce RTX 3080 Mobile / Max-Q 8GB/16GB|346\nGeForce GTX 780 Ti|346\nGeForce GTX 680|346\nGeForce GTX 1660 Ti|345\nGeForce GTX 780|345\nQuadro M6000|344\nGRID T4-16Q|344\nGeForce RTX 2080 Ti|344\nGRID T4-1B|343\nQuadro K5200|342\nQuadro P2200|341\nT1000 8GB|341\nTesla K80|341\nQuadro T2000 Mobile / Max-Q|338\nTU107|337\nGeForce GTX 780 Mac|336\nGeForce GTX TITAN|336\nGeForce GTX 980M|335\nGRID P40-2Q|335\nEVGA GeForce GTX 780|334\nGeForce GTX TITAN Z|334\nTITAN X (Pascal)|332\nGeForce GTX 960|331\nTesla P40|331\nGeForce GTX 1650 Ti with Max-Q Design|330\nTesla P40|330\nGeForce GTX 1060se 3GB|329\nGeForce GTX 1650 Mobile / Max-Q|329\nQuadro T2000 with Max-Q Design|328\nT1000|327\nRTX A5500|326\nA40-8Q|326\nGeForce RTX 3060 Mobile / Max-Q|326\nGeForce GTX 690|326\nTesla V100-SXM2-16GB|326\nQuadro M5000|325\nA16-2B|323\nGeForce GTX 1050 Ti with Max-Q Design|321\nGeForce GTX 1050 Ti Mobile|321\nGeForce GTX 980M|319\nQuadro M3000M|318\nGeForce GTX 1650 with Max-Q Design|318\nGeForce GTX 670|316\nQuadro P3000|316\nT600 Laptop GPU|315\nQuadro T1000 with Max-Q Design|313\nTesla K80|312\nTesla K20m|311\nGeForce GTX 770|311\nTesla P100-PCIE-16GB|311\nQuadro M5000M|311\nTesla K80|309\nEVGA GeForce GTX 1070|309\nQuadro T1000|309\nGeForce GTX 1050 Ti|309\nGeForce GTX TITAN Z|308\nQuadro T2000|308\nQuadro M6000 24GB|308\nGeForce GTX 760 Ti|308\nGeForce RTX 2080 SUPER Mobile / Max-Q|308\nGeForce GTX 1050 Ti|307\nQuadro P2000|304\nQuadro P6000|304\nGeForce GTX 770 Mac Edition|303\nMSi GeForce GTX 1050 Ti|303\nA40|303\nT600|303\nP106-090|302\nP106-090|301\nQuadro K5200|300\nGeForce GTX 770|299\nGeForce GTX 680|299\nGeForce GTX TITAN|299\nGeForce GTX 680|297\nGRID M60-4Q|296\nQuadro M4000|296\nGRID M60-2Q|295\nGeForce GTX 760|294\nGRID V100DX-16Q|293\nQuadro RTX 6000/8000|293\nGeForce GTX 770|293\nGP104|292\nGeForce GTX 780 Rev. 2|290\nGeForce GTX 1050 Ti|288\nGeForce GTX 950|288\nEVGA GeForce GTX 1050 Ti|288\nGeForce GTX 1650 with Max-Q Design|286\nGeForce GTX 880M|285\n%NVIDIA_DEV.13D7.0580.1028%|283\nGP104GL|283\nGigabyte GeForce GTX 960|282\nQuadro K5200|281\nGeForce GTX 660 Ti|281\nGeForce GTX 670|281\nQuadro M4000|280\nGeForce GTX 580|280\nMSi GeForce GTX 960|280\nTesla M6|278\nPNY GeForce GTX 680|278\nT500|277\nGeForce GTX 1050|276\nGeForce GTX 1050 Ti with Max-Q Design|276\nGeForce GTX 690|276\nGeForce GTX 680|276\nGeForce GTX 670|275\nGeForce GTX 760 Ti|274\nGeForce GTX 1050 3GB|272\nGeForce GTX 880M|272\nTesla M60|272\nAsus GeForce GTX 960|271\nQuadro M4000|269\nT600|268\nTesla K20m|268\nGeForce GTX 760|268\nGP102 [TITAN Xp]|267\nGeForce GTX 960|267\nGeForce GTX 670|265\nQuadro T1000 Mobile|265\nGeForce GTX 1050|264\nTesla M60|264\nEVGA GeForce GTX 1080 Ti|263\nGeForce GTX 970M|263\nGeForce GTX 780M|262\nGeForce GTX 690|262\nAsus GeForce GTX 770|261\nGeForce GTX 1070 with MaxQ Design|261\nEVGA GeForce GTX 960|261\nGeForce GTX 960|260\nGRID T4-2Q|259\nGeForce GTX 970M|259\nGeForce GTX 960|259\nQuadro M3000M|258\nGeForce GTX 1060se 3GB|257\nTesla K10|257\nQuadro M3000M|257\nQuadro M2200|256\nGeForce GTX 690|255\nGeForce GTX 760|254\nGeForce GTX 880M|254\nQuadro K4200|253\nQuadro P2000 with Max-Q Design|253\nT550 Laptop GPU|253\nQuadro K5200|252\nMSI GeForce GTX 760|250\nGeForce GTX 580|249\nGeForce GTX 780M Mac Edition|249\nGeForce GTX 570|249\nTesla V100-PCIE-16GB|248\nGeForce GTX880M|248\nGeForce GTX 760|247\nGeForce GTX 570 Rev. 2|247\nAsus GeForce GTX 670|246\nGeForce GTX 580|246\nGeForce GTX 1050|245\nTesla P4|244\nGeForce GTX 680MX|244\nGeForce GTX 480|242\nGeForce GTX 1050|242\nQuadro 7000|241\nQuadro M4000M|241\nGeForce GTX 1050 Mobile|240\nGeForce GTX 660|240\nGeForce GTX 760 (192-bit)|239\nQuadro K5000|239\nGeForce GTX 760 OEM|238\nGeForce GTX 660 Ti|238\nGeForce GTX 775M Mac Edition|238\nGeForce GTX 965M|237\nGeForce GTX 870M|236\nGeForce GTX 950|236\nGeForce GTX 560 Ti 448 Cores|236\nGeForce GTX 780M|236\nQuadro P2000 with Max-Q Design|234\nMSI GeForce GTX 980 TI|234\nGRID K2|233\nGeForce GTX 1060 6GB OpenGL Engine|233\nPNY GeForce GTX 1060|233\nEVGA GeForce GTX 980|232\nGRID RTX6000P-6Q|232\nGeForce GTX 950|232\nGeForce GTX 950|232\nGeForce GTX 590|231\nGeForce GTX 1070 OpenGL Engine|231\nTITAN X (Pascal)|229\nGeForce GTX 1050 with Max-Q Design|229\nGeForce GTX TITAN Black|228\nQuadro K4200|227\nGeForce GTX 660 OEM|227\nGeForce MX450|225\nGeForce GTX 1050 with Max-Q Design|225\nQuadro P1000|225\nGraphics Device|225\nQuadro M2000|222\nGeForce GTX 1630|222\nQuadro M4000M|221\nQuadro K5100M|221\nEVGA GeForce GTX 760|221\nGeForce GTX 1070 Ti|221\nGeForce GTX 660 Ti|220\nGeForce GTX 570|220\nGeForce GTX 660 Ti|219\nQuadro K6000|219\nGeForce GTX 570 Rev. 2|219\nGeForce GTX 1050 with Max-Q Design|219\nTesla M40|218\nGeForce GTX 680M|217\nGeForce GTX 780M by Nick[D]vB|217\nAsus GeForce GTX 980 TI|217\nGeForce GTX 1060 3GB|217\nGraphics Device|217\nGeForce GTX 570 Rev. 2|216\nGeForce GTX 1060 3GB OpenGL Engine|216\nGeForce GTX 660|215\nPoint of View GeForce GTX 660 Ti|214\nGigabyte GeForce GTX 980|214\nQuadro K5000|213\nQuadro P1000|213\nGeForce GTX 480|213\nGeForce MX450|212\nQuadro K4200|211\nGRID K280Q|211\nAsus GeForce GTX 760|210\nQuadro P1000|210\nGeForce GTX 680MX|209\nGeForce GTX 1060 6GB|209\nGeForce GTX 660|209\nGeForce GTX 750 Ti|208\nGeForce GTX 780M Mac Edition|208\nGeForce GTX 775M Mac Edition|208\nGRID K520|208\nQuadro M2200|207\nGRID M60-8Q|207\nGRID K2|207\nGeForce GTX 775M Mac Edition|206\nGeForce GTX 560 Ti 448 Cores|205\nGeForce GTX 760 (192-bit)|205\nQuadro K5000|205\nGigabyte GeForce GTX 980 TI|204\nGeForce GTX 780M Mac Edition|204\nAsus GeForce GTX 660|204\nGRID M60-1B|202\nGeForce GTX 650 Ti BOOST|202\nGeForce GTX 480|202\nGeForce GTX 960M|201\nGeForce GTX 660 OEM|201\nGeForce GTX 780 Ti|201\nQuadro K5000|201\nGeForce GTX 780M Mac Edition|201\nGeForce GTX 870M|200\nGeForce GTX 680MX|200\nGeForce GTX 680MX|199\nQuadro P1000|198\nTesla P100 PCIe 16GB|198\nQuadro K5100M|198\nGeForce GTX 470|198\nQuadro P620|197\nAsus GeForce GTX 780|197\nQuadro 6000|196\nQuadro M1200|195\nQuadro K2200|195\nGeForce GTX 590|195\nQuadro M2000M|194\nQuadro M4000 OpenGL Engine|194\nGeForce GTX 870M|194\nGeForce GTX 1070|194\nEVGA GeForce GTX 750 Ti|194\nZotac GeForce GTX 680|193\nQuadro RTX 3000 with Max-Q Design|193\nT400|193\nQuadro M2200|193\nQuadro K4100M by nikey22|192\nGRID K2|192\nGTX 865M by iMacGFX|191\nQuadro M2000|191\nGeForce GTX 980M|190\nGeForce GTX 560 Ti|190\nPalit GeForce GTX 660|190\nGRID K260Q|189\nGRID M10-2Q|189\nGeForce GTX 660|189\nGeForce GTX 965M|189\nGeForce GTX 650 Ti BOOST|188\nGeForce GTX 675MX Mac Edition|188\nQuadro K5100M by nikey22|187\nGeForce GTX 680M|187\nZotac GeForce GTX 660|186\nGeForce GTX 650 Ti BOOST|186\nGeForce GTX 760 (192-bit)|185\nGRID M60-1Q|184\nGigabyte GeForce GTX 960|184\nQuadro M2000M Special Edition|184\nGeForce GTX 560 Ti|184\nInno3D GeForce GTX660|183\nGeForce GTX 1060|183\nGeForce GTX 675MX Mac Edition|182\nQuadro P600|181\nGeForce GTX 1080|181\nGeForce GTX 675MX Mac Edition|181\nQuadro P620|180\nGK104 Board - 20530501|180\nAshley|180\nQuadro M2000|179\nGeForce GTX 860M|179\nMSi GeForce GTX 1050 Ti|179\nAsus GeForce GTX 750 Ti|178\nGeForce GTX 750 Ti|178\nGeForce GTX 750 Ti|177\nEVGA GeForce GTX 980 TI|177\nAsus GeForce GTX 770|177\nGeForce GTX 760 OEM|176\nGeForce GTX 750|176\nQuadro P2000 Mobile|176\nQuadro K4100M|175\nT400 4GB|174\nGeForce GTX 1080 Ti OpenGL Engine|174\nQuadro K5000M|173\nGeForce GTX 960A|173\nGeForce GTX 560 Ti|172\nTesla M10|172\nGeForce GTX 1080 Ti|172\nGRID RTX6000P-6|172\nGK104 Board - 2051b502|172\nGeForce GTX 770M|172\nGeForce GTX 960M|172\nGeForce GTX 970|172\nGRID M10-2Q|171\nGeForce GTX 560 Ti OEM|171\nMSi GeForce GTX 970|171\nGK104GL [GRID K2]|171\nGeForce GTX 470|170\nGeForce GTX 560 Ti|170\nTITAN Xp|170\nGeForce GTX 870M|170\nGeForce MX350|169\nMSi GeForce GTX 580|169\nGeForce GTX 960M|169\nEVGA GeForce GTX 760|169\nQuadro K4000M|169\nT400|169\nGeForce MX350|168\nGeForce GTX 470|168\nGeForce GTX 560|167\nQuadro 6000|167\nGeForce GTX 1050 Ti OpenGL Engine|167\nQuadro M1200|167\nGigabyte GeForce GTX 970|166\nGeForce GT 1030|166\nGeForce GTX780M by nikey22|166\nGeForce GTX870M by nikey22|166\nTesla V100-PCIE-32GB|165\nQuadro K2200|165\nQuadro M1000M|165\nQuadro K2200|165\nAsus GeForce GTX 970|164\nGeForce GTX 750 Ti|164\nQuadro M2000M|164\nGeForce GTX 1050|164\nGeForce GTX 1050 Ti|163\nQuadro K5000|163\nGraphics Device|162\nGeForce MX250|162\nT500|161\nEVGA GeForce GTX 570|161\nQuadro M2000M|161\nQuadro K1200|159\nGeForce GTX 860M|159\nGeForce GTX 770M|159\nQuadro M1200|158\nGeForce GTX 675MX|158\nGeForce MX330|158\nQuadro K2200M|157\nQuadro K4000|157\nGeForce GTX 690|157\nGeForce GTX 860M|157\nMSi GeForce GTX 670|156\nQuadro K2200|156\nQuadro K4100M|156\nGeForce GTX 770M by Nick[D]vB|155\nTesla V100-SXM2-32GB|155\nGeForce GTX 1080 OpenGL Engine|155\nGigabyte GeForce GTX 670|155\nEVGA GeForce GTX 960|155\nGeForce GTX 750|155\nGeForce Pre-Release TITAN X (Pascal) OpenGL Engine|154\nGeForce GTX TITAN Xp|154\nAsus GeForce GTX 950|154\nQuadro K4100M|153\nGeForce GTX 960|153\nGeForce GTX 770M|153\nGeForce MX330|153\nQuadro M2200 Mobile|153\nGeForce MX250|153\nGeForce Pre-Release TITAN Xp OpenGL Engine|153\nQuadro P600|153\nQuadro M620|152\nGeForce GTX 1070 Ti OpenGL Engine|152\nGeForce GTX 770|152\nGeForce GT 1030|152\nTesla C2070|152\nGeForce GTX 650 Ti|152\nGRID K240Q|151\nGeForce GTX 480 OpenGL Engine|151\nGeForce GTX 750|151\nGeForce GTX TITAN|151\nGeForce GTX 760 (192-bit)|151\nGeForce GTX 560|151\nGeForce GT 1030|151\nQuadro K5000M|151\nQuadro P1000 Mobile|151\nZotac GeForce GTX 660|151\nGeForce GTX 460 v2|150\nGRID GTX P40-6|150\nMSi GeForce GTX 660|149\nGeForce GTX 780M|149\nMSI GeForce GTX 760|149\nP106-090|149\nGeForce GTX 950A|149\nGeForce MX150|149\nAsus GeForce GTX 1060|149\nUnknown|149\nGeForce GTX 980 Ti|148\nGRID T4-4Q|148\nGeForce GTX 465|147\nColorful GeForce GTX 960|147\nGigabyte GeForce GTX 750|147\nQuadro M1000M|147\nGeForce GTX 780 Mac|147\nGeForce GTX 460|146\nMSi GeForce GTX 960|146\nGeForce GTX 560|146\nQuadro K4000|145\nGeForce GTX 970M|145\nQuadro M1000M|145\nUnknown|145\nGeForce GTX 980|144\nGeForce GTX 950|144\nGeForce GTX 675M|144\nZotac GeForce GTX 960|144\nGeForce Pre-Release Graphics Device|144\nGeForce GTX 670 OpenGL Engine|143\nQuadro K4000|143\nEVGA GeForce GTX 580|143\nGeForce GTX 950M|143\nGeForce GTX TITAN Black OpenGL Engine|142\nGeForce GTX 760|142\nQuadro 5000|142\nMSI GeForce GTX 570 HD|142\nGeForce Pre-Release TITAN Xp COLLECTORS EDITION OpenGL E|142\nGeForce GTX 1050 OpenGL Engine|142\nGeForce GTX TITAN X|142\nGeForce GTX 880M|141\nGV-N660OC-2GD|141\nGeForce GTX 750|141\nQuadro M5000M|140\nGeForce GTX 970 OpenGL Engine|140\nGeForce GTX 675MX|140\nAsus GeForce GTX 760|140\nQuadro P5000 OpenGL Engine|139\nGeForce GTX 580|139\nGeForce GTX 675MX|139\nZotac GeForce GTX 750|139\nQuadro K1200|139\nGeForce MX150|139\nGeForce GTX 650 Ti|139\nQuadro K1200|139\nGeForce GTX 980 Ti OpenGL Engine|139\nGeForce GTX 580M|138\nAsus GeForce GTX 580|138\nGeForce GTX 770 OpenGL Engine|138\nGeForce GT 1010|138\nGeForce GTX 780 Rev. 2|138\nQuadro P2000 OpenGL Engine|138\nGeForce MX250|138\nQuadro K4000|137\nGeForce GTX 460 v2|137\nGeForce GTX 770M|137\nGigabyte GeForce GTX 570 HD|136\nGeForce GTX 465|136\nGeForce GTX 460 v2|136\nGeForce GTX 670|136\nGeForce GTX 590 OpenGL Engine|136\nGeForce GTX 780|135\nGeForce GTX TITAN Black|135\nGeForce GTX 660 Ti|135\nZotac GeForce GTX 560 Ti|134\nGeForce GTX 880M OpenGL Engine|134\nGeForce GTX 650 Ti|134\nGeForce GTX 760 OpenGL Engine|134\nnull Graphics Device|134\nQuadro M620|133\nGeForce GTX 780M Mac Edition|133\nGeForce MX150|132\nAsus GeForce GTX 570 HD|132\nGeForce GTX 775M OpenGL Engine|132\nGeForce GTX 850M|132\nAsus GeForce GTX 570|132\nQuadro K6000 OpenGL Engine|131\nGeForce GTX 850M|131\nGeForce GTX 460|131\nGeForce GTX 950A|130\nGeForce GTX 780M OpenGL Engine|130\nPoint of View GeForce GTX 660 Ti|130\nGeForce GTX 775M Mac Edition|130\nEVGA GeForce GTX 650 Ti|130\nEVGA GeForce GTX 750 Ti|129\nGeForce GTX 460|129\nQuadro P520|129\nGainward GeForce GTX 570|129\nAsus GeForce GTX 750 Ti|129\nQuadro K3100M|128\nQuadro K2200|128\nAsus GeForce GTX 560 Ti|127\nGeForce GTX 680|127\nGeForce GTX 680 OpenGL Engine|127\nGeForce GTX 950M|127\nGRID V100-2B|127\nGigabyte GeForce GTX 660 Ti|127\nN15E-GT|126\nQuadro K1200|126\nGeForce GTX 650 Ti|126\nGigabyte GeForce GTX 770|126\nGeForce GTX 660|126\nQuadro 5000|125\nGeForce GT 1030|125\nGeForce GTX 950M|125\nGeForce GTX 765M|125\nQuadro M5000|125\nGigabyte GeForce GTX 560 Ti|125\nGeForce GTX 580M|125\nQuadro M2000|124\nGeForce GTX 850M|124\nGeForce GTX 570 OpenGL Engine|123\nGainward GeForce GTX 750 Ti|123\nQuadro K2200M|123\nGeForce GTX 780M Mac Edition|123\nGeForce GTX 680MX OpenGL Engine|123\nQuadro K4200|123\nGeForce GTX 460 OEM|122\nGeForce GTX 670MX|122\nMSi GeForce GTX 560 Ti|122\nGeForce GTX 460 SE|122\nQuadro M4000|122\nGeForce GTX880M OpenGL Engine|122\nQuadro P620|121\nGeForce GTX 560 SE|121\nGeForce GTX880M by nikey22|121\nGeForce GTX 555|121\nGeForce GTX 965M OpenGL Engine|121\nGeForce GTX 850A|121\nQuadro K5000 OpenGL Engine|120\nGeForce GTX 580 OpenGL Engine|120\nQuadro K3100M|120\nGeForce GTX 650 Ti BOOST|119\nGeForce GTX 570M|119\nGeForce GTX 675MX OpenGL Engine|119\nGeForce GTX 775M Mac Edition|119\nZotac GeForce GTX 1050 Ti|118\nGeForce GTX 965M|117\nQuadro M600M|117\nGeForce GTX 780M by Nick[D]vB|117\nGeForce GTX 460 SE|117\nGeForce GTX 555|116\nGeForce GTX 670M|116\nQuadro K3000M|116\nGeForce GTX 780 Ti OpenGL Engine|116\nQuadro K4000M|115\nGeForce GTX 860M|115\nAsus GeForce GTX 660|115\nTesla C2075|114\nGeForce GTX 675MX Mac Edition|114\nZotac GeForce GTX 770|114\nGigabyte GeForce GTX 750 Ti|114\nGeForce MX330|114\nGeForce GT 1030|113\nGeForce GTX TITAN OpenGL Engine|113\nGeForce GTX 590|113\nQuadro K620|113\nGeForce GTX 780M|112\nGeForce GTX 560 Ti|112\nQuadro 6000|112\nEVGA GeForce GTX 560 Ti|112\nAsus GeForce GTX 960|112\nQuadro K5000|112\nPoint of View GeForce GTX 470|111\nPNY GeForce GTX 580|111\nGeForce GTX 770M|111\nGeForce GT 120|111\nMSi GeForce GTX 660|111\nGigabyte GeForce GTX 560|111\nGeForce GTX 680MX|110\nGeForce 945M|110\nGeForce GTX 765M|110\nGeForce GTX 950 OpenGL Engine|110\nGeForce Pre-Release Tesla C2075 OpenGL Engine|109\nGeForce GTX 550 Ti|109\nGeForce GTX 765M|108\nPNY GeForce GTX 750|108\nGeForce GTX 560 Ti 448 Cores|108\nQuadro P500|108\nGeForce GTX 670MX|108\nGeForce GTX 680MX|107\nGeForce GTX 460 SE|107\nGeForce GTX 675MX Mac Edition|107\nGeForce GTX 770M OpenGL Engine|107\nGeForce 945M|107\nGeForce GTX 675MX|107\nPNY GeForce GTX 570 HD|106\nGeForce GTX 745|106\nGeForce MX230|106\nGeForce GTX 670MX|106\nGeForce 845M|106\nQuadro K3100M OpenGL Engine|105\nQuadro P2000|105\nGeForce MX570 A|105\nGeForce GTX 750 Ti|104\nGeForce GTX 660 OEM|104\nQuadro M600M|104\nGeForce GTX 750|104\nGeForce GTX 645|104\nGP108|104\nQuadro P520|104\nZotac GeForce GTX 460|103\nChip Model|103\nGeForce GTX 670M|103\nQuadro T1000|103\nGeForce GTX 670M|103\nGeForce GTX 650|103\nZotac GeForce GTX 750|102\nGeForce GTX 460 OpenGL Engine|102\nGeForce GTX 860M OpenGL Engine|102\nQuadro 4000|102\nAsus GeForce GTX 480|102\nZotac GeForce GTX 650 Ti|102\nGeForce GT 755M|101\nGF100 Board - 10220000|101\nGeForce GTX 470M|101\nGeForce GTX 570 Rev. 2|101\nGeForce GTX 775M by iDopt Mac|101\nGeForce GTX 765M by Nick[D]vB|101\nGeForce GTX 570|101\nGeForce GTX 645|101\nGeForce GTX 550 Ti|100\nGeForce GTX 760M|100\nGeForce GT 1030 OpenGL Engine|100\nGeForce GTX 650|100\nQuadro P400|100\nGeForce GTX 480|99\nEVGA GeForce GTX 650|99\nEVGA GeForce GTX 560|99\nGeForce MX130|99\nGeForce MX130|98\nAsus GeForce GTX 460|98\nElitegroup GeForce GTX 460|98\nTesla V100-SXM2-32GB|98\nGeForce GT 755M|98\nGeForce GTX 760 Ti OpenGL Engine|98\nQuadro P520|97\nGeForce GT 755M Mac Edition|97\nGeForce GTX 1060 5GB|97\nPalit GeForce GTX 650 Ti|97\nMSi GeForce GTX 460|96\nGeForce GTX 650|96\nGigabyte GeForce GTX 580|96\nGigabyte GeForce GTX 460|96\nGeForce GTX 745|96\nEVGA GeForce GTX 550 Ti|96\nGeForce GTX 465|96\nGeForce GTX 460 SE|96\nGeForce GTX 765M|96\nGeForce GT 755M Mac Edition|96\nQuadro M520|95\nQuadro K620|95\nT1000|95\nGeForce GTX 745|95\nQuadro K620|95\nGeForce GT 755M|94\nGeForce GTX 660 Ti OpenGL Engine|94\nQuadro K3000M|94\nQuadro K4000|94\nQuadro K4000 OpenGL Engine|94\nGeForce GTX 560|94\nGeForce GTX 650 Ti OpenGL Engine|94\nZotac GeForce GTX 560|94\nAsus GeForce GTX 560|93\nGeForce GTX 650 Ti|93\nGeForce GPU|92\nGeForce GTX 460|92\nMSi GeForce GTX 650 Ti|92\nGeForce GTX 645|92\nGigabyte GeForce GTX 760|92\nGeForce GTX 660M|92\nGeForce GTS 450|92\nGeForce GTX 765M|92\nQuadro K2000D|92\nQuadro K2000|91\nGeForce GT 740|91\nGeForce GTX 650|91\nGRID M6-0B|91\nHP Quadro K620|91\nGeForce MX130|91\nQuadro K3000M by ST3PHL3|91\nQuadro 4000|90\nGeForce MX230|90\nQuadro K620|90\nQuadro K2100M by Nick[D]vB|90\nQuadro K3000M by nikey22|89\nGeForce GT 650M OpenGL Engine|89\nQuadro 4000|89\nQuadro K3000M|88\nGeForce GTX 660M|88\nQuadro K6000|87\nGeForce GT 755M Mac Edition|87\nPalit GeForce GTX 650|87\nQuadro P500|87\nGeForce GTX 570M|86\nGainward GeForce GTX 460|86\nGeForce GTX 950M|86\nQuadro K2000D|86\nGeForce GTX 650 Ti BOOST|86\nQuadro K2100M|86\nGeForce GTX 470|85\nQuadro K2000|85\nQuadro K2000|85\nGeForce GT 750M Mac Edition|85\nGeForce GTX 745|85\nGRID K220Q|85\nGeForce GTX 750 OpenGL Engine|85\nQuadro 5000M|84\nQuadro P400|84\nGeForce GTS 450|84\nGeForce GT 640 Rev. 2|84\nGeForce GTX 660M Mac Edition|84\nQuadro P400|84\nAsus GeForce GTX 560 SE|84\nPNY GeForce GTX 460|83\nGeForce GT 640 Rev. 2|83\nGeForce GTS 450 Rev. 2|83\nGeForce GTS 450|83\nGeForce GTS 450 Rev. 2|83\nGeForce GTX 645|82\nGeForce GPU|82\nGeForce GTX 560M|82\nQuadro K3000M|82\nQuadro K2100M by nikey22|82\nGigabyte GeForce GTX 750|82\nGeForce GT 740|82\nGeForce GT 750M Mac Edition|82\nGeForce GTX 765M OpenGL Engine|82\nGeForce GTX 645 OpenGL Engine|82\nQuadro K620|81\nGeForce GTX 550 Ti OpenGL Engine|81\nQuadro 4000M|81\nPNY GeForce GTX 550 Ti|81\nGeForce MX110|80\nGeForce GTX 760M|80\nMSi GeForce GTX 745|80\nQuadro K2100M OpenGL Engine|80\nQuadro K2000|80\nQuadro 5000|80\nQuadro K620 OpenGL Engine|80\nMSi GeForce GTX 745|80\nGeForce GT 755M OpenGL Engine|80\nGeForce GTX 660M|79\nGigabyte GeForce GTX 550 Ti|79\nMSi GeForce GTX 650|79\nGeForce GTX 560M|79\nQuadro P400|78\nQuadro K2100M|78\nQuadro K2100M|78\nZotac GeForce GTX 1050 Ti|78\nQuadro 3000M|77\nGeForce 940A|77\nGeForce GTX 460M|77\nGeForce GTX 550 Ti|77\nGeForce GT 545|77\nGeForce GT 650M Mac Edition|77\nGeForce 940MX|76\nGeForce GTX 650 OEM|76\nGeForce GTX 550 Ti|76\nGeForce GT 755M Mac Edition|76\nGeForce GT 740 OpenGL Engine|75\nGainward GeForce GTX 550 Ti|75\nQuadro K1200|75\nGeForce GT 650M Mac Edition|75\nEVGA GeForce GTX 650|75\nGeForce GT 750M Mac Edition|74\nGeForce GTX 745|73\nGeForce GTX 555|73\nGeForce GTX 650|73\nGainward GeForce GTS 450|73\nGeForce GT 650M|73\nGeForce GT 755M Mac Edition|73\nGeForce GTX 460M|72\nGeForce 930A|72\nGeForce 930MX|72\nGeForce 940MX|72\nGeForce MX110|72\nGeForce GT 750M Mac Edition|72\nQuadro 2000|72\nGeForce 845M|71\nQuadro 2000D|71\nGeForce GT 640 Rev. 2|71\nGeForce MX110|71\nGeForce GT 1010|71\nGeForce GT 545|71\nQuadro K1200 OpenGL Engine|71\nGeForce 940MX|71\nGeForce GTX 650 OpenGL Engine|71\nEVGA GeForce GTX 650 Ti BOOST|71\nQuadro K2100M|70\nGeForce GT 1010|70\nQuadro M500M|70\nGeForce GT 650M Mac Edition|70\nGeForce GT 640 OEM|70\nQuadro K2000D|70\nQuadro K2000 OpenGL Engine|70\nGeForce GT 750M Mac Edition|70\nGeForce GT 650M|69\nQuadro K1100M by Nick[D]vB|69\nGeForce GT 650M|69\nGeForce 940M|69\nGeForce GT 650M|69\nQuadro 4000|69\nGeForce GT 650M Mac Edition|69\nGeForce GT 745M|69\nGainward GeForce GTX 560 Ti|68\nGeForce 920MX|68\nQuadro M520|68\nGeForce GT 640|68\nGeForce 840M|68\nGeForce 9800 GTX / 9800 GTX+|68\nGeForce GTX 770M by Nick[D]vB|67\nZotac GeForce GTX 650|67\nAsus GeForce GTX 550 Ti|67\nGeForce GT 750M|67\nQuadro K3100M by nikey22|67\nGeForce GT 750M|67\nGeForce GTX 760 (192-bit) OpenGL Engine|67\nHP Quadro 4000|67\nQuadro K2000|67\nGeForce GTS 450 Rev. 2|67\nGeForce 930MX|67\nGeForce GTX 660M Mac Edition|66\nGeForce GTX 570|66\nGeForce GT 750M|66\nGeForce GT 650M Mac Edition|66\nGeForce GT 650M OpenGL Engine|65\nGeForce GTX 660M OpenGL Engine|65\nGeForce 930M|65\nPalit GeForce GTX 650|65\nGeForce GTX 760M|65\nGeForce GT 650M Mac Edition|65\nGeForce 940M|65\nGeForce GT 750M Mac Edition|64\nGeForce 940M|64\nGeForce GT 740|63\nGeForce 930MX|63\nQuadro 3000M|63\nGeForce GT 730|63\nQuadro K1100M|63\nGeForce GT 750M|63\nGeForce 840M|63\nGeForce GT 640 OEM|63\nGeForce 840M|63\nGeForce GT 640 Rev. 2|62\nGeForce GTS 450|62\nQuadro 2000|62\nGeForce GT 745M|62\nGeForce GT 740|62\nGeForce GT 640|62\nQuadro 2000|62\nGeForce GTX 660M Mac Edition|62\nQuadro K1100M OpenGL Engine|62\nQuadro K2000M|62\nGeForce GTX 680MX OpenGL Engine|61\nEVGA GeForce GT 730|61\nQuadro 2000D|61\nGeForce 840A|61\nMSi GeForce GTX 660 Ti|61\nQuadro K1100M|61\nGeForce GT 645M|61\nGeForce GTX 780M OpenGL Engine|61\nHP GeForce GT 730|61\nQuadro K5000M OpenGL Engine|61\nEVGA GeForce GT 640|61\nGeForce 920MX|60\nQuadro M500M|60\nQuadro K620M|60\nGeForce 930M|60\nGeForce 930A|60\nGeForce GT 640 OEM|60\nGeForce GT 640|60\nQuadro 2000M|60\nGeForce GT 640|60\nGeForce GT 640M Mac Edition|60\nGeForce GT 640M Mac Edition|60\nGeForce GT 640M Mac Edition|59\nGeForce GT 645M|59\nGeForce 930M|59\nGigabyte GeForce GTX 650 Ti|59\nGeForce GT 640 OEM|59\nGeForce 830M|59\nAsus GeForce GT 640|58\nMSI GeForce GTX 1070|58\nGeForce GT 555M|58\nQuadro K2000M|58\nQuadro K1100M|57\nGeForce GT 650M Mac Edition|57\nQuadro K2000M by Nick[D]vB|57\nEVGA GeForce GTX 650 Ti|57\nGeForce GT 640M|56\nGeForce GT 650M Mac Edition|56\nGeForce GT 445M|56\nGeForce 830A|56\nGeForce 9800 GT|56\nAsus GeForce GTS 450|55\nGeForce 830M|55\nGeForce 920MX|55\nQuadro 2000|55\nEVGA GeForce GT 545|54\nQuadro K2000M|54\nGeForce GT 650M Mac Edition|54\nGeForce GTX 280|54\nGeForce GT 640|53\nQuadro FX 2800M|53\nQuadro 3000M OpenGL Engine|53\nGeForce GT 740|53\nnull GeForce 920A|53\nGeForce GT 640M Mac Edition|52\nGeForce GT 635|52\nGraphics Device|52\nGeForce GT 640M|52\nGeForce GTX 660M Mac Edition|52\nQuadro 2000M|52\nQuadro 5010M|52\nGeForce GTS 250|52\nGeForce GT 445M|51\nGeForce GT 640M OpenGL Engine|51\nGeForce GT 640M|50\nEVGA GeForce GT 740|50\nGeForce GT 640M Mac Edition|50\nGeForce 730A|50\nGeForce 920M|49\nHP Quadro 2000|49\nGeForce GT 730M|49\nnull GeForce 920A|49\nGeForce GT 555M|49\nGeForce GT 640M LE|49\nGeForce GT 730M|49\nGeForce GT 730M|48\nGeForce GT 640M Mac Edition|48\nQuadro K2000M OpenGL Engine|48\nGeForce GT 640M LE|48\nGeForce GT 740M|47\nGeForce GTX 460M|47\nGeForce GT 440|47\nGeForce GT 440|46\nGeForce GT 640M Mac Edition|46\nQuadro P400|46\nGeForce GT 730|46\nDell Quadro 2000M|45\nGeForce GT 740M|45\nGeForce GT 740M|45\nGeForce GTS 450 Rev. 2|45\nGeForce 920M|45\nGeForce 920M|45\nGeForce 910M|44\nGeForce GTX 680M|44\nGeForce GT 730|44\nQuadro 2000M|44\nGeForce GT 635|43\nGeForce GT 720 OpenGL Engine|43\nGeForce GT 635|43\nQuadro K5200 OpenGL Engine|43\nZotac GeForce GTX 650|43\nGeForce GT 440|43\nGeForce GT 435M|42\nGeForce GT 735M|42\nGainward GeForce GT 630|42\nQuadro 1000M|42\nGeForce 820M|41\nGeForce GTX 680M OpenGL Engine|41\nMSI GeForce GT 635|41\nGeForce 820A|41\nTesla M10|41\nAsus GeForce GT 440|40\nAsus GeForce GT 630|40\nGeForce GT 820M|40\nGeForce 910M|40\nGeForce GT 820M|40\nGeForce GT 730|40\nGeForce GT 550M|40\nGeForce GT 430|40\nGeForce GT 540M|39\nAsus GeForce GT 720|39\nGeForce GT 630|39\nGeForce GT 530|39\nGeForce GT 635M|39\nGeForce GT 620M/630M/635M/640M LE|39\nNVS 5400M|39\nQuadro K600|39\nQuadro K610M|39\nAsus GeForce GT 730|39\nGeForce GT 630|39\nGeForce GT 440|39\nGeForce GT 630M|38\nGeForce 820M|38\nQuadro K420|38\nQuadro K610M|38\nGeForce GT 625M|38\nQuadro K1000M|38\nNVS 5200M|38\nGRID K1|38\nQuadro K600|38\nQuadro K420|38\nGeForce GT 630|38\nQuadro K600|37\nQuadro 600|37\nHP Quadro 600|37\nQuadro K1000M|37\nQuadro K610M|37\nGRID K180Q|37\nGRID K160Q|37\nGeForce GT 635M|37\nGigabyte GeForce GT 440|37\nGeForce 820M|37\nGeForce GT 530|37\nGeForce GT 540M|37\nGeForce GT 630 OEM|37\nQuadro K610M by Nick[D]vB|37\nNVS 510|37\nGeForce GT 630M|37\nQuadro 1000M|37\nGeForce GT 540M|37\nGeForce GT 530|37\nQuadro K1100M|37\nQuadro K620M|37\nQuadro 1000M|36\nGeForce GT 730|36\nGeForce 820M|36\nGeForce GT 430|36\nGRID K1|36\nGeForce GT 525M|36\nNVS 5200M|36\nNVS 510|36\nZotac GeForce GT 430|36\nQuadro K600|36\nAsus GeForce GT 730|36\nHP Quadro K4000|35\nGeForce GT 755M Mac Edition|35\nGeForce GT 630|35\nNVS 5400M|35\nNVS 5400M|35\nGeForce GT 640 OpenGL Engine|35\nGeForce GT 625M|35\nGeForce GT 630|35\nGeForce GT 430|35\nQuadro K600 OpenGL Engine|35\nQuadro K1000M|35\nZotac GeForce GT 630|35\nGigabyte GeForce GT 630|35\nGRID K140Q vGPU|35\nGeForce GT 710M|35\nGeForce GT 620M|35\nGeForce GT 720M|34\nGeForce 710M|34\nQuadro 1000M,|34\nQuadro K510M|34\nGeForce 9400 GT|34\nQuadro K1000M|34\nGeForce GT 635M|34\nQuadro K420|34\nGRID K180Q|34\nAsus GeForce GT 430|34\nQuadro K4100M|34\nGigabyte GeForce GT 730|34\nGeForce GT 620M|34\nGeForce GT 525M|34\nQuadro K420|34\nDell NVS 5200M|34\nGeForce 710A|34\nGeForce GT 425M|33\nGeForce GT 710B|33\nGeForce GT 525M|33\nQuadro 600|33\nGeForce GT 620M|33\nQuadro K600|33\nQuadro 600|33\nGeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M|33\nMSI GeForce GT 730|33\nGeForce GT 710|33\nGeForce GT 435M|33\nNVS 510|33\nAsus GeForce GT 710|33\nNVS 510|32\nGeForce 710M|32\nGeForce GT 720M|32\nGeForce GT 730A|32\nGeForce GT 710M|32\nGIGABYTE GeForce GTX 660|31\nEVGA GeForce GT 710|31\nGeForce GT 710|31\nGeForce GT 710|31\nGeForce GT 425M|31\nGeForce GT 720|31\nEVGA GeForce GT 710|31\nQuadro K1000M by Nick[D]vB|31\nAsus GeForce GT 710|31\nGeForce GT 720|31\nGeForce GT 420M|30\nGeForce GT 710|30\nnull Graphics Device|30\nGeForce GT 240|30\nGeForce 810M|29\nGeForce GT 720M|29\nGeForce GT 710|29\nQuadro 600|29\nGeForce 810M|29\nGeForce GT 420M|28\nQuadro 410|28\nGeForce GTX 660M|28\nMSI GeForce GT 710|28\nGeForce GT 720|28\nGeForce GT 735M|27\nGeForce GT 720|27\nGeForce GT 720|27\nGeForce GT 630 OpenGL Engine|27\nQuadro 410|27\nGeForce GT 330M|26\nGeForce GT 420M|26\nGeForce GT 430|26\nGeForce 615|25\nGeForce GTX 760A|25\nToshiba GeForce GT 525M|25\nGeForce GT 520MX|25\nGeForce GT 620|25\nGeForce GT 625|25\nGeForce GT 710|24\nQuadro NVS 4200M|24\nGeForce 840A|24\nGeForce 610M|24\nGeForce 800M|24\nGeForce GT 420|24\nGeForce 705M|23\nGeForce GT 705|23\nGeForce 800M|23\nGeForce 610M|23\nGeForce GT 620 OEM|23\nGeForce GT 625|23\nGeForce GT 420|23\nQuadro NVS 4200M|23\nGeForce GT 520M|22\nNVS 4200M|22\nGeForce GT 620 OEM|22\nNVS 5200M|22\nGeForce GT 620 OEM|22\nGeForce GT 620|22\nGeForce GT 705|21\nGeForce GT 620|21\nGeForce GT 630 Rev. 2|21\nQuadro NVS 4200M|21\nGeForce GT 520M|20\nGTX 980M SLI|20\nGeForce GT 620|20\nGeForce GT 520M|20\nGeForce GT 520|19\nGeForce 410M|19\nGeForce 730A|19\nGeForce GT 520|19\nGeForce GT 610|19\nAsus GeForce GT 610|19\nNVS 310|18\nGeForce 410M|18\nNVS 315|18\nGeForce 605|18\nGeForce GT 610|18\nGeForce GT 520|17\nGeForce MX550|17\nNVS 4200M|17\nNVS 315|17\nNVS 310|17\nGeForce 410M|17\nPalit GeForce GTX 660|17\nGeForce 605|17\nNVS 310|17\nGeForce GT 415M|17\nZotac GeForce GT 610|17\nGeForce GTX 675M|17\nGeForce GT 610|16\nQuadro 4000M|16\nPNY GeForce GT 610|16\nGeForce GT 610|16\nGeForce 510|15\nMSi GeForce GT 610|15\nGeForce GT 735M|15\nGeForce GT 520|15\nGeForce 510|15\nGeForce GT 320M|14\nGeForce 9600M GT|14\nGeForce GTX 570M|14\nCorporation D3D12 (NVIDIA GeForce RTX 3080 Ti)|13\nGeForce 510|13\nQuadro FX 1800M|12\nAsus GeForce GT 520|12\nGeForce GT 705|12\nMSi GeForce GT 630|11\nQuadro 3000M|10\nGigabyte GeForce GT 610|10\nPegatron GeForce GT 420|9\nGeForce 210|8\nGeForce 9300 / nForce 730i|7\nNVS 3100M|7\nGeForce 8600 GT|5\nGeForce 8400 GS Rev. 3|4\nGeForce 8400 GS|3\nGeForce 9600 GT|2\nGeForce GT 550M|-1\nGeForce 8600 GTS|-1\nGeForce GT 520MX|-1\nEVGA GeForce GTX 460|-1\nEVGA GeForce GTX 970|-1\nGP106|-1\nGRID P4-2B|-1\nGainward GeForce GTX 650|-1\nGeForce 210|-1\nGeForce 310|-1\nGeForce 310M|-1\nGeForce 315|-1\nGeForce 315M|-1\nGeForce 320M|-1\nGeForce 405|-1\nGeForce 610M|-1\nGeForce 820A|-1\nGeForce 8300 GS|-1\nGeForce 8400 GS|-1\nGeForce 8400 GS Rev. 2|-1\nGeForce 8400 GS Rev. 3|-1\nGeForce 8400M GS|-1\nGeForce 8400M GT|-1\nGeForce 8500 GT|-1\nGeForce 8600 GT|-1\nGeForce 8600M GS|-1\nGeForce 8600M GT|-1\nGeForce 8700M GT|-1\nGeForce 8800 GT|-1\nGeForce 8800 GTS|-1\nGeForce 8800 GTS 512|-1\nGeForce 8800 GTX|-1\nGeForce 8800M GTX|-1\nGeForce 9200M GE|-1\nGeForce 9200M GS|-1\nGeForce 9300 / nForce 730i|-1\nGeForce 9300 GE|-1\nGeForce 9300 GS|-1\nGeForce 9300M GS|-1\nGeForce 9400|-1\nGeForce 9400M|-1\nGeForce 9500 GT|-1\nGeForce 9500M GS|-1\nGeForce 9600 GS|-1\nGeForce 9600 GSO|-1\nGeForce 9600 GSO 512|-1\nGeForce 9600 GT|-1\nGeForce 9600M GS|-1\nGeForce 9600M GT|-1\nGeForce 9600M GT / GeForce GT 220M|-1\nGeForce 9800 GT|-1\nGeForce 9800 GTX+|-1\nGeForce 9800 GTX/9800 GTX+|-1\nGeForce 9800M GTS|-1\nGeForce G 103M|-1\nGeForce G 105M|-1\nGeForce G105M|-1\nGeForce G205M|-1\nGeForce G210|-1\nGeForce G210M|-1\nGeForce GT 120|-1\nGeForce GT 120M|-1\nGeForce GT 130|-1\nGeForce GT 130M|-1\nGeForce GT 220|-1\nGeForce GT 220M|-1\nGeForce GT 230|-1\nGeForce GT 230M|-1\nGeForce GT 240|-1\nGeForce GT 240M|-1\nGeForce GT 240M|-1\nGeForce GT 320|-1\nGeForce GT 320M|-1\nGeForce GT 325M|-1\nGeForce GT 330|-1\nGeForce GT 330M|-1\nGeForce GT 335M|-1\nGeForce GT 435M|-1\nGeForce GT 520M|-1\nGeForce GT 525M|-1\nGeForce GT 555M/635M|-1\nGeForce GTS 240|-1\nGeForce GTS 250|-1\nGeForce GTS 360M|-1\nGeForce GTX 1180|-1\nGeForce GTX 260|-1\nGeForce GTX 260M|-1\nGeForce GTX 275|-1\nGeForce GTX 280|-1\nGeForce GTX 285|-1\nGeForce GTX 295|-1\nGeForce GTX 560 SE|-1\nGeForce GTX 750 v2|-1\nGeForce RTX T10-16|-1\nGeForce RTX T10-8|-1\nGigabyte GeForce GTX 1050 Ti|-1\nION|-1\nMSI GeForce GT 710|-1\nNVS 300|-1\nNVS 3100M|-1\nNVS 4200M|-1\nNVS 5100M|-1\nPalit GTX 680 JetStream|-1\nQuadro FX 1700|-1\nQuadro FX 1700M|-1\nQuadro FX 1800|-1\nQuadro FX 1800M|-1\nQuadro FX 2700M|-1\nQuadro FX 2800M|-1\nQuadro FX 3600M|-1\nQuadro FX 360M|-1\nQuadro FX 370|-1\nQuadro FX 3700|-1\nQuadro FX 3700M|-1\nQuadro FX 380 LP|-1\nQuadro FX 3800|-1\nQuadro FX 3800M|-1\nQuadro FX 4600|-1\nQuadro FX 4800|-1\nQuadro FX 4800|-1\nQuadro FX 5600|-1\nQuadro FX 570M|-1\nQuadro FX 580|-1\nQuadro FX 770M|-1\nQuadro FX 880M|-1\nQuadro K1100M by Nick[D]vB|-1\nQuadro K2000D|-1\nQuadro K2000M|-1\nQuadro K2100M by Nick[D]vB|-1\nQuadro NVS 135M|-1\nQuadro NVS 140M|-1\nQuadro NVS 160M|-1\nQuadro NVS 290|-1\nQuadro NVS 295|-1\nQuadro NVS 4200M|-1\nQuadro P4000 OpenGL Engine|-1\nSony GeForce 410M|-1\nZotac GeForce GTX 780|-1\n";var YZ="\nRadeon RX 7900 XT|2202\nRadeon RX 7900 XT|1968\nRX 6800 XT|1957\nRadeon RX 6900 XT (XTXH)|1930\nRadeon RX 6900XT|1925\nRadeon PRO W6900X|1889\nRX 6900 XT|1852\nRadeon RX 6900|1814\nRadeon RX 7900 XTX|1773\nRX6800|1695\nFreddyVGA|1603\nRadeon PRO W6800|1564\nRadeon RX 7900 XTX|1437\nRadeon RX 6950 XT|1376\nRadeon RX 6800 XT|1358\nRadeon RX 6750 XT|1310\nRadeon(TM) RX 6850M XT|1294\nRadeon RX 6700|1285\nRadeon RX 6900 XT|1269\nSapphire Nitro+ RX 6800|1262\nRadeon PRO W6800X|1255\nRadeon PRO W6800X Duo|1218\nRadeon RX 6700|1214\nRadeon RX 6800 XT|1183\nSapphire Nitro Radeon RX6650XT|1180\nRadeon(TM) RX 6750 XT|1166\nRadeon RX 6800|1163\nRadeon RX 6900 XT|1162\nASRock RX 6650 XT Phantom Gaming|1161\nRadeon Navi23|1139\nRadeon RX 6650 XT|1132\nRadeon RX 6950 XT|1130\nRadeon 6800|1121\nRadeon RX 6700 XT|1110\nRadeon Pro W6600X|1101\nRadeon RX 6700M|1081\nRadeon RX 6800M|1078\nRadeon RX 5700 XT PJM|1060\nRadeon RX 6800|1054\nRadeon RX 6600 XT|1037\nRadeon RX 6600 XT|1031\nASUS RX 6600XT macOS Edition|1021\nRadeon RX 6800M|1016\nRadeon Pro Vega II Duo|1015\nRadeon RX 5700 Series|961\nRadeon RX 6800/6800 XT / 6900 XT|961\nRadeon RX 6600 XT|958\nRadeon Pro Vega II|956\nRadeon RX 6650 XT|951\nNavi 10 5700 XT|947\nRadeon Pro Vega II|947\nRadeon RX 5700 Series|946\nRadeon Pro W5700X|934\nRadeon RX 6600|929\nASUS Radeon RX 5700 XT|926\nRadeon Pro W5700X|917\nRadeon Pro 5700 XT|917\nRadeon RX 6900 XT|915\nRadeon RX 5700 XT|911\nRadeon Pro W5700|895\nRadeon RX 6600/6600 XT/6600M|889\nRadeon RX 6750 XT|883\nRadeon RX 6600|874\nRadeon RX 5700|855\nRadeon RX 5700 XT 50th Anniversary|854\nRadeon VII|851\nRadeon RX 5700 XT 50th Anniversary|845\nRadeon PRO W6800|837\nRadeon Pro Vega 64|824\nRadeon Navi10|822\nRadeon RX 5600 XT|816\nRadeon RX 6600M|803\nRadeon RX 6800S|791\nRadeon Pro 5700 XT|781\nRadeon RX Vega 64 8GB|775\nRadeon Pro 5700|768\nRadeon Vega Frontier Edition|767\nRadeon RX Vega|766\nRadeon RX Vega 56/64|765\nRadeon(TM) RX Vega|756\nRadeon Pro Vega 64X|745\nRadeon RX 5600 XT|744\nRadeon PRO W6600|744\nRadeon Vega 64 LC|735\nRadeon RX Vega 64.1|732\nRadeon RX 6600M|728\nRadeon Pro 5700|714\nRadeon Vega Frontier Edition|707\nRadeon Vega Frontier|704\nRadeon Vega FE|701\nRadeon RX 5700 XT|691\nRadeon Pro Vega 64|673\nRadeon Vega 64|667\nRadeon VII|663\nRadeon Pro WX9100|656\nSapphire Radeon RX Vega 64 8GB|654\nRadeon(TM) PRO W6600M|654\nRadeon RX 5700 XT 50th Anniversary|652\nRadeon RX 5700|640\nRadeon Pro W5700|640\nRadeon(TM) Pro WX 9100|635\nRadeon RX Vega 56|628\nRadeon RX Vega 56|623\nRadeon Pro 5500 XT|622\nRadeon RX 5600 OEM/5600 XT / 5700/5700 XT|621\nRadeon RX 5500|618\nRadeon RX 5500 XT|617\nRadeon Vega Frontier Edition|617\nRadeon RX 5500M Series|613\nRX xxx|613\nRadeon Pro Vega 64X|611\nRadeon RX Vega 64|610\nRadeon RX 5600 XT|610\nRadeon Pro Vega 64|605\nRadeon RX 6500 XT|603\nRadeon Vega|602\nRadeon Pro W5500|601\nRadeon RX 5600M|600\nRadeon Pro Vega 56|598\nRadeon Pro Vega 64|594\nRadeon Pro 5600M|593\nRadeon Pro Vega 48|592\nRadeon Pro Vega II Duo|590\nRadeon RX 590 Series|589\nRadeon RX Vega 56 8GB|589\nRadeon Pro 5600M|589\nRadeon Pro WX 9100|588\nRadeon Pro 5300|584\nRadeon(TM) R9 Fury Series|579\nRadeon RX 6800 XT 16GB|567\nRadeon Pro 5600M|567\nRadeon Pro W5500X|564\nRadeon(TM) RX 5500M|559\nRadeon HD 7870|556\nRadeon Pro W5500|554\nRadeon RX 5500M|550\nRadeon R9 290X Series|549\n66AF:F0|548\nRadeon Pro 5500 XT|547\nRadeon RX 580 Series|547\nRadeon RX 5500XT|547\nRadeon(TM) RX 580X|546\nRadeon Pro 5500 XT|545\nRadeon(TM) Pro W5500M|544\nRadeon Pro W5500X|544\nRadeon Pro W5500|541\nRadeonT RX 5300|537\nRadeon(TM) RX 570 Graphics|524\nRadeon Pro 5300|522\nRadeon(TM) RX 6500M|521\nRadeon RX Vega M GL|520\nASUS Radeon RX 570 Series|519\nASUS Radeon RX 580 Series|518\nRadeon(TM) RX 580|518\nRadeon(TM) Pro V7350x2|518\nRadeon(TM) RX 480 Graphics|516\nRadeon(TM) RX 570 Graphics|515\nRadeon RX 6400|513\nRadeon Pro 580X|513\nRadeon(TM) R9 390 Series|503\nRadeon Pro 5300|500\nRadeon RX 580 2048SP|500\nRadeon PRO W6400|500\nRadeon RX 570 Series|499\nRadeon PRO W6800X Duo|497\nRadeon Pro 580|494\nRadeon RX 5500 XT|493\nRadeon RX 6400|487\nRadeon Pro 580|485\nRadeon(TM) Pro WX 7100 Graphics|485\nRadeon(TM) R9 290X|478\nSapphire Radeon RX 580 Pulse|477\nRadeon RX 6700/6700 XT / 6800M|476\nRadeon(TM) RX 580|475\nRadeon RX 6700S|475\nRadeon R9 290X|470\nRadeon(TM) RX 470 Graphics|469\nRadeon R9 FURY / NANO Series|468\nRadeon Embedded E9560|467\nKamen Rider Black RX|466\nRadeon(TM) E9550|464\nRadeon(TM) RX 580 Graphics|463\nRadeon RX Vega 56/64|463\nRadeon(TM) RX 480|462\nRadeon RX 6800 XT|462\nRadeon RX 470 Series|461\nRadeon RX480|456\n66AF:F1|455\nRadeon Pro 480/575|455\nRadeon Embedded E9560|450\nRadeon FURY|450\nRadeon RX 5600 OEM/5600 XT / 5700/5700 XT|447\nRadeon RX 6600 XT|446\nRadeon HD 6800 Series|445\nRadeon Pro 570X|444\nRadeon(TM) RX 470 Graphics|443\nRadeon Pro 575X|443\nRadeon RX 470/480/570/570X/580/580X/590|443\nRadeon RX 6600|443\nRadeon RX Vega M GH Graphics|441\nRX 580|440\nRadeon RX 570|440\nRadeon Pro 570|440\nRadeon RX 590|437\nRadeon(TM) RX 470 Series|435\nRadeon RX 6900 XT|435\nRadeon FURY X|434\nRX 590|431\nRadeon Pro 5500M|430\n???|430\nRadeon(TM) RX 570|430\nRadeon RX 580|429\nRadeon HD 8xxx|426\nRadeon R9 290|425\nRadeon Pro 5500M|420\nRadeon Pro 580X|420\nRadeon RX 6700 XT|420\nRadeon RX 480|419\nRadeon R9 290/390|418\nRadeon Pro 580X|416\nRadeon(TM) Pro Duo|414\nEllesmere Radeon RX 570|411\nRadeon R9-290X|411\nRadeon Pro 580|411\nRadeon R9 200 Series|406\nRadeon RX 570|406\nRadeon Pro 470/570|404\nRadeon RX 6800M|404\nRadeon RX 5300M|400\nRadeon RX 580 Series (POLARIS10, DRM 3.40.0, 5.11.9-141-tkg-pds, LLVM 11.1.0)|399\nRadeon Pro 5300M|399\nRadeon R9 285|398\nRadeon RX 470|393\nRadeon Pro 575|392\nRadeon Pro 575X|391\nRadeon Pro WX 7100|387\nRadeon RX 6700M|386\nRadeon RX 470/480/570/570X/580/580X/590|382\nRadeon PRO W6600|376\nRadeon Polaris|374\nRadeon RX 6500 XT|374\nRadeon Pro Vega 20|371\nRadeon HD 7970|370\nRadeon Pro Vega 16|370\nRadeon RX 6800|369\nRadeon Pro Vega 64 OpenGL Engine|369\nRadeon(TM) R9 380 Series|367\nRadeon RX 5700XT|366\nFirePro W8100|366\nRadeon Pro Vega 64|365\nRadeon Pro 570|365\nRadeon Pro 570X|363\nRadeon Pro Vega 64 OpenGL Engine|362\nRadeon R9 280x|362\nRadeon R9 380|362\nRadeon R9 280x|361\nRadeon R9 280x|360\nRadeon Pro Vega 56|360\nR9 280X Dual-X|359\nRadeon Pro Vega 56 OpenGL Engine|356\nRadeon HD 7970|355\nRadeon HD 7970X/8970/R9 280X|354\nRadeon R9 285|353\nRadeon R9 380X|352\nRadeon RX 480|352\nRadeon RX 5700 XT Series|350\nASUS Radeon RX 470 Series|350\nRadeon Pro Vega 64|349\nRadeon R9 200 / HD 7900 Series|346\nASUS Radeon RX 470 Series|346\nRadeon Vega 56|346\nRadeon RX 580 Series (AMD POLARIS10 / DRM 3.15.0 / 4.12.0-1-amd64, LLVM 4.0.1)|343\nRadeon Pro Vega 20|343\nR9 380|341\nRadeon HD 7970|338\nRadeon RX 5700 XT|336\nRadeon D700|336\nAsus Radeon R9 280|334\nRadeon R9 285|334\nRadeon R9 M395X|332\nRadeon RX 5600 XT|332\nPowerColor Radeon R9 280|330\nRadeon R9 280|329\nFirePro W7100 Graphics Adapter|328\nRadeon R9 M295X Mac Edition|327\nASUS Radeon RX 5700|327\nRadeon R9 380|326\nRadeon Pro Vega 16|325\nRadeon R9 290X|325\nRadeon RX5600|324\nASUS Radeon RX 5500 XT|323\nRadeon R9 280|323\nRadeon HD 7950/8950 / R9 280|321\nRadeon R9 M395|319\nRadeon RX 6800/6800 XT / 6900 XT|318\nFirePro D700 (FireGL V)|318\nRadeon RX 5500/5500M / Pro 5500M|318\nMSI Radeon RX 6600 XT Gaming X|318\nFirePro W8000|315\nRadeon HD 7950|315\nRadeon Pro W5700|315\nFirePro W7170M|314\nRadeon PRO W6800|314\nRadeon RX 5500|313\nRadeon RX 580 Special Edition|312\nRadeonT RX 5500M|311\nRadeon R9 M395 (Bootcamp XG edition by bootcampdrivers.com)|311\nRadeon R9 360|309\nRadeon Pro WX 7100|307\nRadeon Pro WX 7100 Mobile|307\nRadeon RX 5700 XT 50th Anniversary|307\nR9 xxx|303\nRadeon RX 5700XT|302\nRadeon PRO W6400|301\nRadeon(TM) R9 370 Series|301\nRadeon RX 470/480/570/570X/580/580X/590|300\nRadeon(TM) PRO W6600M|298\nRadeon HD 8950|298\nRadeon R9 M395X|297\nRadeon R9 M395X|296\nRX Vega 64|296\nRadeon RX Vega 11 Graphics|295\nRadeon Pro 270X|294\nRadeon RX 580 2048SP|290\nRadeon HD 7950|290\nVideo Controller (VGA Compatible)|290\nRadeon(TM) R7 370 Series Graphics|290\nRadeon HD 7950|290\nAsus Radeon R9 270X|289\nRadeon RX 580X Series|288\nRadeon(TM) RX 5500M|285\nRadeon R9 270X|285\nRX xxx|285\nASUS R7 265 Series|281\nRadeon(TM) R9 270|280\n731F:C1|280\nRadeon R9 M395X|279\nRadeon(TM) R7 370 Series|279\nRadeon Pro V520 MxGPU|278\nRadeon R9 M395|277\nFirePro D700|277\nRadeon R9 270X|277\nRadeon(TM) R9 200 Series|276\nRadeon RX 5700|275\nRadeong 0.4 on AMD POLARIS10 (DRM 3.8.0 / 4.9.11-1-ARCH, LLVM 3.9.1)|274\nRadeon HD 7870 XT|274\nRadeon R9 390X|272\nRadeon(TM) RX 570 Graphics|272\nRadeon HD 7870 GHz Edition|271\nRadeon R9 390|270\nFirePro D700|269\nRadeon R9 M395|268\nRadeon R9 270|268\nRadeon RX 5700 / 5700 XT|267\nASUS R7 370 Series|267\nFirePro W7000|266\nRadeon(TM) Pro V7350x2|266\nRadeon(TM) RX 470 Series|266\nRadeon RX Vega 64 OpenGL Engine|266\nRadeon RX 5500M|265\nRadeon HD 7950/8950 OEM / R9 280|265\nRadeon Vega Frontier Edition OpenGL Engine|265\nRadeon 7950 x2|263\nRadeon R9 270|263\nRadeon VII|263\nRadeon HD 7xxx|262\nVideo Controller (VGA Compatible)|262\nRadeon(TM) RX 570|261\nRadeon RX 5500 XT|261\nRadeon R9 M295X|261\nFirePro W7000 (FireGL V) Graphics Adapter|260\nRadeon R9 M390|260\nRadeon HD 7870 GHz Edition|260\nRadeon R9 M390 (Bootcamp edition by bootcampdrivers.com)|260\nRadeon R9 370|259\nMetal|259\nRadeon HD 7870|259\nRadeon RX 470/570|258\nRadeon(TM) R9 370|257\nRadeon(TM) RX 460|257\nRadeon RX 560 Series|256\nRadeon R9 290|255\nRadeon(TM) RX 560 Series|255\nRadeon RX 5300M|254\nFirePro W7000|254\nRadeon R9 290X|253\n67EF:E7|253\nRadeon HD 7850|253\nRadeon(TM) RX 460 Graphics|253\nMSI Radeon RX 580|251\nRadeon R9 290/390|250\nFirePro W8100 (FireGL V)|249\nRadeon Pro WX 9100 OpenGL Engine|248\nRadeon(TM) RX 560|247\nRadeon(TM) RX 560 Series|247\nRadeon Pro Vega II Duo|247\nRadeon HD 7970M|246\nRadeon R9 290|245\nRadeon RX 5600M|245\nFirePro D300|245\nRadeon(TM) RX 5600M Series|244\nRadeon RX 590 Series|244\nRadeon R7 370 Series|244\nRadeon(TM) RX 560|243\nFirePro D300|243\nRadeon R9 390|243\nRadeon RX 470/480/570/570X/580/580X|243\nFirePro D300|243\nRadeon(TM) R7 370 Series|242\nRadeon R9 M390|241\nRadeon RX 560X Series|241\nFirePro D300|241\nRadeon RX 560|240\nRadeon R9 M290X|240\nGigabyte Vega 64 macOS Edition|239\nRadeon Pro 580|238\nRadeon Pro WX 4100|236\nRadeon Pro WX 7100 OpenGL Engine|236\nRadeon HD - FirePro D300|235\nFirePro D500|234\nRadeon Pro 580 OpenGL Engine|234\nRadeon(TM) E9260|234\nRadeon Pro WX 2100|233\nFirePro D500|232\nFirePro D500|232\nRadeon(TM) RX 6500 XT|232\nRadeon Pro 580X|231\nRadeon HD 7850|231\nRadeon Pro 575|231\nRadeon Pro Vega 64X|231\nASUS R9 270 Series|230\nRadeon Pro 450|230\nRadeon(TM) RX 560 Graphics|230\nRadeon R9 M290|229\nRadeon Pro 560X|228\nRadeon Pro 480/575|228\nPitcairn PRO Radeon HD 7850|228\nASUS Radeon RX 5700 XT|227\nRadeon HD 7870|227\nRadeon(TM) Pro WX 5100 Graphics|226\nRadeon R9 370X|225\nRadeon(TM) RX 480|224\nRadeon HD7970M|224\nFirePro S9000 (FireGL V)|223\nRadeon RX 550 640SP / RX 560/560X|222\nMSI / AMD RX 560 4G|222\nRadeon RX 570 OpenGL Engine|222\nMSI RX650|222\nRX 480|221\nMSI / AMD RX 560|221\nBaffin AMD Radeon RX 560|221\nMSI Baffin RX650|220\nRadeon Pro 5700 XT|220\nRadeon Pro 570|220\nRadeon Pro 575 OpenGL Engine|219\nAsus Radeon R9 270X|219\nRadeon RX RX 560|218\nRadeon RX 560 [Baffin]|218\nRX 460|218\nRadeon R9 370X|218\nRadeon(TM) Pro WX 4100|217\nASUS R9 390 Series|217\nRadeon Pro 5600M|217\nR9 xxx|217\nRadeon HD 7870 Series|217\nRadeon Pro RX 560|216\nR9 280X Dual-X|215\nRadeon Pro 570 OpenGL Engine|214\nRX 560|213\nRadeon Pro WX 5100|213\nFirePro D700|213\nRadeon(TM) R9 390 Series|213\nRadeon RX 480|212\nRadeon RX 560|212\nRadeon RX 5500/5500M / Pro 5500M|212\nRadeon RX 550 640SP / RX 560/560X|211\nRadeon R9 FURY / NANO Series|211\nSapphire Radeon RX 560|211\nRadeon RX 460|210\nRadeon RX550/550 Series|210\ninc. Radeon RX 480|209\nRadeon(TM) RX 550|208\nRadeon R9 M290X|206\nRadeon Pro 560 (Bootcamp XG edition by bootcampdrivers.com)|206\nRadeon RX460|206\nRadeon RX 550 Series|205\nCustom GPU 0405|204\nRadeon(TM) RX 460|204\nASUS AMD Radeon R9-990X|204\nRadeon Pro 555X|203\nRadeon RX 460/560|203\nRadeon HD 7970X/8970/R9 280X|202\nASUS Radeon RX 550 Series|201\nRadeon HD 8950|201\nFirePro D500 (FireGL V)|201\nRX 5700XT|200\nRadeon 550 Series|200\nRadeon HD 8470 + 7660D Dual Graphics|200\nRadeon HD 7990|200\nRadeon RX 560X|199\nRadeon RX Vega|199\nRadeon HD 7950 Series|198\nRadeon(TM) RX 540|197\nRadeon HD 6970|197\nRadeon HD 7970/8970 / R9 280X|197\nRadeon Navi14|197\nRadeon Pro 560|197\nRadeon RX 550|197\nRadeon R9 285|196\nRadeon Pro W5500|195\nRadeon Pro Vega 56|195\nRadeon Pro 460|195\nRadeon RX 470/480|194\nRadeon PRO Graphics|194\nRadeon(TM) RX550|194\nRadeon Pro 560X|193\nRadeon Pro 570X|192\n66AF:F1|192\nRadeon RX Vega M GH|190\nRadeon R9 M280X|190\nRadeon RX 460/560D / Pro 450/455/460/555/555X/560/560X|189\nRadeon R9 280,|188\nCustom GPU 0405|188\nRadeon HD 7790|187\nRadeon(TM) RX 480 Graphics|187\nRadeon Pro 455|186\nRadeon R9 260|186\nRadeon RX 580 Series|186\nRadeon HD 7950/8950 OEM / R9 280|186\nRadeon R9 290X|185\nRadeon R9 M290X|184\nRadeon(TM) R9 370 Series|184\nRadeon Pro 555|184\nRadeon R7 260X|184\nRadeon HD 6950|183\nFirePro W5000|183\nRadeon(TM) R9 390X|182\nR9 270X Devil|182\nRadeon(TM) RX 470 Graphics (AMD POLARIS10 / DRM 3.23.0 / 4.15.0-1-MANJARO, LLVM 5.0.0)|182\nRadeon R9 380|182\nRadeon(TM) Pro WX 9100|182\nRadeon(TM) R7 360 Series|181\nRadeon RX 570 Series|181\nRadeon(TM) R9 M470X|181\nRadeon(TM) R7 360 Series|181\nRadeon RX480|180\nRadeon R7 200 Series|180\nRadeon Pro WX 4150|180\nRadeon Pro WX 4100|179\nRadeon HD 8xxx|179\nASUS R9 295X2 Series|179\nRadeon R9 390X|178\nRadeon HD 5870|176\nRadeon Pro 560|176\nRadeon RX 580 OpenGL Engine|175\nRadeon HD 8950|175\nFirePro V(FireGL V) Graphics Adapter|175\nASUS Radeon RX 580 Series|174\nRadeon Pro WX 4100|174\nRadeon Pro 460|173\nRadeon HD 2600 XT|173\nRadeon Pro WX 4100|172\nRadeon HD 8280|172\nRadeon Pro 575|171\nRadeon Pro 555X|171\nRadeon Pro WX 4130/4150|170\nRadeon RX Vega M GH Graphics|170\nFirePro W5100|170\nRadeon(TM) PRO WX 8200|169\nRadeon Vega Frontier Edition|169\nRadeon Pro 555X|168\nFirePro D700|168\nRadeon HD 6990|167\nRadeon RX 470 OpenGL Engine|167\nRadeon HD 7870 XT|167\nRadeon RX 580|167\nRadeon Polaris|167\nFirePro V8800 (FireGL V)|166\nRadeon RX 550|165\nRadeon HD 6900 Series|165\nFirePro W9100 (FireGL V)|164\nRX 580|163\nRadeon(TM) RX 580X|163\nRadeon RX 550|163\nRadeon HD 6870|163\nRadeon R9 M395X OpenGL Engine|163\nRadeon(TM) R9 360|163\nRadeon(TM) HD 8490|162\nRadeon R9 M295X|162\nRadeon HD 7970M|162\nRadeon R9 M380|161\nFirePro W5100 (FireGL V) Graphics Adapter|161\nASUS HD7850 Series|161\nFirePro M6100 FireGL V|161\nRadeon Pro 455|160\nRadeon RX 460/560D / Pro 450/455/460/555/555X/560/560X|160\nRadeon R9 M395X|159\nRadeon RX 560X|159\nRadeon Pro 555|158\nRadeonT RX 560X|158\nRadeon Pro Vega 48|158\nASUS Radeon RX Vega|158\nRadeon Pro WX 9100|158\nRadeon Pro Vega 64|157\nPowered By QiongB A9999999999|157\nRadeon(TM) Pro Duo|157\nFirePro D700|157\nRadeon Pro WX 7100|156\nRadeon RX 460|156\nRadeon HD - FirePro D700 OpenGL Engine|156\nRadeon R9 M290X|156\nRadeon R9 M395 OpenGL Engine|155\nRadeon Pro SSG|155\nFirePro D300|155\nASUS R9 380 Series|155\nRadeon(TM) R9 Series|153\nRadeon RX 470/480/570/580|153\nFirePro W8000|153\nCezanne|153\nRadeon(TM) Graphics|153\nFirePro D300|153\nRadeon(TM) R9 Fury Series|153\nRadeon R9 M395|152\nRadeon RX 570|152\nRadeon R9 270X Series|152\nRadeon Pro 5300M|152\nR9 xxx|152\nRadeon Pro 555|152\nFirePro D500|151\nRadeon HD 5850|151\nFirePro D300|150\nRadeon(TM) R9 290X|150\n66AF:F0|149\nRadeon(TM) RX 560|149\nRadeon R9 M290|148\nRadeon Instinct MI25 MxGPU|148\nFirePro V7800 (FireGL) Graphics Adapter|148\nRadeon(TM) R9 M470|147\nAdvanced Micro Devices, Inc. [AMD/ATI] Fiji [Radeon R9 FURY / NANO Series]|147\nRadeon HD 5870 Series|147\nRadeon(TM) E9550|147\nRadeon HD 7850|147\nRadeon HD 7770|147\nRadeon Pro Vega 20|146\nRadeon R9 290/390|146\nRadeon Pro 450|146\nRadeon RX 560X Series|146\nRadeon HD 6850|146\nRadeon R9 270 1024SP|145\nASUS R9 280X Series|145\nRadeon Pro 450|145\nRadeon(TM) R9 390 Series|145\nFirePro V7900 (FireGL V)|145\nRadeon R9 370X|145\nRadeon(TM) RX 560 Series|144\nASUS R7 250X|144\nRadeon RX 480 OpenGL Engine|144\nRadeon R9 290X|144\nRadeon RX 550X|144\nRadeon(TM) RX 580|144\nASUS Radeon(TM) RX 470 Series|143\nBaffin Radeon RX 560|143\nRadeon R9 M295X (Bootcamp edition by bootcampdrivers.com)|143\nRadeon R9 M295X Mac Edition|143\nRadeon R7 Series / HD 9000 Series|142\nAdvanced Micro Devices [AMD] nee ATI Device|142\nRadeon(TM) Pro WX 7100 Graphics|142\nRadeon RX 640|142\nFirePro D500|141\nRadeon HD 7900 Series|141\nRadeon R9 290|141\nRadeon R7 250X|141\nRadeon(TM) RX Vega|140\nRadeon 630 Series|140\nFirePro W8100 Graphic Adapter|140\nRadeon R9 FURY / NANO Series|140\nRadeon R9 M390|140\nRadeon Pro WX 3100|140\nRadeon R9 290|140\nRadeon(TM) R9 370|140\nFirePro V7900|139\nRadeon HD 7970|139\nRadeon HD - FirePro D500 OpenGL Engine|139\nRadeon HD - FirePro D300 OpenGL Engine|139\nRadeon Pro 580|139\nRadeon HD 7770|139\nRadeon HD - FirePro D500 OpenGL Engine|139\nRadeon 540/540X/550/550X / RX 540X/550/550X|138\nFirePro S9050|138\nRadeon(TM) RX 480 Graphics|138\nRadeon(TM) R9 M390X|137\nRadeon Vega 64|137\nRadeon(TM) Graphics|137\nTonga PRO GL [FirePro W7100]|136\nHD7950 Martin Ver.|136\nRadeon HD 7990|135\nRadeon R9 280x|135\nRadeon RX550/550 Series|135\nHD7950 MARTIN REV.|134\nRadeon RX560|134\nRadeon R7 250X Series|134\nRadeon R9 M390 OpenGL Engine|134\nASUS R7 250X|134\nRadeon HD6870|134\nRadeon R9 270X|134\nRadeon Pro 5500 XT|134\nRadeon(TM) RX 480|133\nRadeon R9 270|133\nASUS HD7970 Series|133\nRadeon RX 540|133\nRadeon 500 Series|132\nRadeon HD 5970|132\nRadeon HD 7770 GHz Edition|132\nRadeon HD 5870|132\nRadeon 540X Series|132\nRadeon HD 6870 Series|132\nRadeon(TM) RX 470 Graphics|132\nRadeon HD - FirePro D300 OpenGL Engine|132\nRadeon HD 7xxx|131\nRadeon HD 5970|131\nRadeonT 540X|131\nRadeon R7 Graphics + R7 350 Dual Graphics|131\nRadeon R9 M295X Mac Edition / R9 380X|131\nFirepro M5100|131\nRadeon(TM) R9 M375X|131\nRadeon R9 280x|130\nRadeon(TM) RX 560X|130\nRadeon HD 6990|130\nRadeon Pro 5500M|130\nRadeon Pro WX 5100 OpenGL Engine|129\nRadeon R9 M395X (Bootcamp edition by bootcampdrivers.com)|129\nRadeon R9 M380|128\nFirePro W5170M|128\nRadeon R9 280|128\nFirePro W5000 (FireGL V)|128\nRadeon(TM) RX 5600M Series|128\nRadeon RX 560D|128\nFirePro D500 (FireGL V)|128\nRadeon(TM) Pro WX 5100 Graphics|128\nRadeon(TM) RX Vega 11 Graphics|128\nRadeon HD 7970|127\nRadeon R9 370|127\nRadeon HD 7770|127\nRadeon R9 M395X|126\nRadeon HD 7660D|126\nRadeon HD 8970|126\nRadeon R9 200 Series|126\nRadeon Pro WX 3200 Series|126\nRadeon HD 7800 Series|125\nRadeon R9 285/380|125\nRadeon R9 270X|124\nFirePro W2100|124\nFirePro W7170M|124\nRadeon HD 7870 GHz Edition|123\nRadeong 0.4 on AMD TONGA (DRM 3.1.0, LLVM 3.9.0)|123\nRadeon RX 460|123\nRadeon HD 5970 Series|123\nRadeon R9 M380|122\nRadeon R9 M395|122\nAsus Radeon R9 280|122\nRadeon HD 6850 Series|122\nRadeon(TM) RX 540|122\nRadeon HD 6900 Series|122\nDevice|122\n67DF:C4|121\nRadeon HD 6950|121\nFirePro D300 (FireGL V)|121\nRadeon RX 570|121\nRadeon HD 5850 Series|121\nRadeon HD 7870 XT|121\nRadeon HD 7950|121\nFirePro V7800 (FireGL) Graphics Adapter|121\nRadeon HD 6850|121\nRadeon HD 7950|120\nRadeon HD 7870 GHz Edition|120\nRadeon R7 370 / R9 270X/370X|120\nRadeon HD 6870|120\nRadeon Pro V340|120\nASUS Radeon RX 570 Series|119\nRadeon(TM) R7 370 Series Graphics|119\nRadeon(TM) RX 580 Graphics|119\nRadeon(TM) RX 470 Graphics|119\nRadeon HD 5870|119\nRadeon HD 7950/8950 / R9 280|119\nRadeon HD 6790|119\nRadeon(TM) RX580|119\nASUS ARES2|119\nRadeon(TM) R9 380 Series|118\nRadeon HD 7750|118\nRadeon Pro 560X|118\nRadeon R7 250E|118\nRadeon 550 Series|118\nRadeon RX 560|118\nRadeon Pro WX 5100|117\nRadeon R7 370 / R9 270X/370|117\nRadeon HD 7800 Series|117\nFirePro W5000 (FireGL V) Graphics Adapter|117\nRadeon HD 7750 Series|116\nRadeon HD 5870|116\nRadeon R7 450|115\nFirePro R5000|115\nRadeon R7 370 Series|115\nFirePro W9100|114\nRadeon R7 370 / R9 270/370|114\nRadeon(TM) 540 Graphics|114\nRadeon HD 6510 Series|114\nRadeon(TM) R7 370 Series|113\nSapphire Radeon HD6870|113\nFirepro M5100|113\nRadeon(TM) RX 550|113\nRadeon(TM) Pro Duo|113\nRadeon 540/540X/550/550X / RX 540X/550/550X|113\nRadeon Pro 570|112\nRadeon R9 280|112\nFirePro D700 (FireGL V)|112\n(ATI) FirePro M6000 (FireGL V) Mobility Pro Graphics|112\nRenoir|112\nRadeon 540X Series (POLARIS12, DRM 3.40.0, 5.10.56-1-MANJARO, LLVM 12.0.1)|112\nRadeon HD 6970|112\nRadeon HD 8770|112\nRadeon Pro WX3200 Graphics|112\nRadeon(TM) R9 270|111\nRadeon R9 270X|111\nRadeon R9 285|111\nRadeon HD 7800M Series|111\nRadeon(TM) R7 370 Series|111\nRadeon HD 7870M Series|111\nRadeon Pro 450/550|110\nRadeon HD 7000 series|110\nRadeon HD 7870|110\nRadeon Pro 555X|110\nRadeon RX590 GME|109\nFirePro S10000|109\nRadeon HD 7870M|109\nRadeon HD 5800 Series|109\nRadeon HD 6970M|108\nASUS HD7770 Series|108\nRadeon(TM) R9 M360|108\nRadeon(TM) RX 550X|107\nRadeon R9 285|107\nRadeon HD 6900M Series|107\nRadeon HD 7870 GHz Edition|107\nFirePro S7000|107\nRadeon R9 M370X|106\nRadeon Pro WX 4100|106\nRadeon HD 6800 Series|106\nRadeon HD 7750|106\nRadeon Pro 455 OpenGL Engine|106\nASUS R7 370 Series|106\nRadeon Pro 560|105\nRadeon HD 6870|105\nFirePro D300 (FireGL V)|105\nRadeon HD 6970M|105\nRadeon HD 7850|105\nRadeon(TM) R9 200 Series|104\nASUS HD7750 Series|104\nRadeon HD 6970M OpenGL Engine|104\nAsus Radeon R7 250|104\nRadeon R7 370 / R9 270X/370|104\nRadeon R9 M395X (Bootcamp XG edition by bootcampdrivers.com)|103\nRadeon(TM) RX 560|103\nRadeon RX Vega|103\nRadeon(TM) Pro W5500M|103\nRadeon R9 270|103\nRadeon Pro 560X|103\nRadeon HD 5850|103\nFirePro S7150|103\nRadeon(TM) RX 580|103\nRadeon(TM) R9 370 Series|103\nASUS Radeon(TM) RX 480 Series|102\nRadeon Graphics Processor|102\nRadeon R9 M370X|102\nFirePro W7100|102\nRadeon R9 M370X|101\nRadeon Pro 460 OpenGL Engine|101\nRadeon RX 580 Series|101\nRadeon 500 Series|100\nRadeon Pro 555|100\nRadeon(TM) Pro WX 4100|100\nAsus Radeon R7 260X|100\nRadeon(TM) RX Vega 10 Graphics|100\nRadeon HD 7790|99\nRadeon Pro 450 OpenGL Engine|99\nRadeon HD 7790/8770 / R7 360 / R9 260/360|99\nFirePro M4000 Mobility Pro Graphics|99\nRadeon HD 7970M|99\nRadeon R9 M270X|99\nRadeon RX 550|98\nRadeon HD 6850|98\nRadeon(TM) RX 460|98\nRadeon(TM) RX Vega11 Graphics|98\nRadeon(TM) RX 460 Graphics|98\nRadeon Pro 460|97\nRadeon HD 7800 Series|97\nMatrox C680 PCIe x16|97\nRadeon(TM) RX 550|97\nRadeon HD 5770|96\nRadeon HD 8670D + 7700 Dual Graphics|96\nRadeon HD 7790|96\nRadeon 630 Series|96\nRadeon RX 560 Series|96\nFirepro M6100|95\nRadeon HD 6700 Series|95\n67EF:E7|95\nRadeon(TM) Vega 10 Graphics|95\nRadeon HD 6900M Series|94\nRadeon Pro 455|94\nFirePro M4000|94\nRadeon R9 260|94\nFirePro W7000|94\nRadeon Instinct MI25|93\nRadeon HD 8870M|93\nRadeon(TM) Vega 11 Graphics|93\nRadeon Pro 450|93\nFirePro W5000|92\nRadeon HD 6770|92\nRadeon(TM) RX560|92\nRadeon(TM) Graphics|91\nASUS Radeon(TM) RX 460 Series|91\nRadeon(TM) Vega 8 Graphics|91\nRadeon(TM) Graphics|91\nFirePro W5100 Graphics Adapter|90\nRadeon(TM) Pro WX Series|90\nRenoir|90\nSTRATO XT (6646)|89\nRadeon(TM) Pro WX 4150 Graphics|89\nRadeon E8870MXM|89\nRadeon HD 8970M|89\nFirePro M6100 FireGL V|89\nRadeon HD 7770|89\nFirePro W5100 (FireGL V) Graphics Adapter|89\nRadeon HD 6970M|89\nRadeon Pro 460|88\nRadeon RX Vega 8 Graphics|88\nRadeon HD 7700 Series|88\nRadeon(TM) R9 M360|88\nASUS R7 265 Series|88\nRadeon RX Vega M GL Graphics|88\nASUS Radeon RX 550 Series|88\nRadeon R7 360 / R9 360|88\nRadeon HD 6950|86\nRadeon HD 6790|86\nRadeon Pro WX 2100|86\nASUS Radeon RX 560 Series|86\nRadeon HD 5750|86\nRadeon(TM) RX 640|86\nRadeon HD 8870M|85\nRadeon R7 260X|85\nRadeon Pro WX 7100|85\nRadeon(TM) R7 360 Series|85\nRadeon Infoshock™ RX 460 Graphics|85\nFirePro W5170M|85\nRadeon R9 M295X|85\nFirePro W8100|85\nRadeon HD 6750|85\nFirePro W5170M|85\nFirePro V5800 (FireGL) Graphics Adapter|84\nASUS R7 250X|84\n67E8:00|84\nRadeon(TM) RX 550X|84\nRadeon(TM) R7 350|84\nRadeon(TM) E9260|84\nRadeon Sky 500|84\nRadeon R9 M270X|83\nRadeon(TM) R9 350|83\nRadeon(TM) RX Vega 11 Graphics|83\nFirepro M6100|83\nRadeon R9 360|82\nFirePro V7900|82\nFirePro V5800 (FireGL V)|82\nRadeon HD 8830M|82\nRadeon Pro 450|82\nRadeon HD 8950|82\n6980:00|82\nFirePro W5100 (FireGL V)|81\nRadeon E8870|81\nRadeon HD 7750 Series|81\nRadeon HD 7850 / R7 265 / R9 270 1024SP|81\nFirePro™ W4190M|80\nRadeon HD 5770|80\nRadeon(TM) R7 360 Series|80\nFirePro M5100 FireGL V|80\nRadeon RX 470/480/580|80\nRadeon(TM) RX 460 Graphics|79\nRadeon HD 6700 Series|79\nMobility Radeon HD 5870|79\nRadeon R9 255|79\nRadeon 535 Series|79\nRadeon R9 M380 OpenGL Engine|78\nRadeon(TM) RX 550|78\nRadeon R9 M380|78\nRadeon R7 250X|78\nSaphire Radeon RX 580|78\nRadeong 0.4 on AMD BONAIRE (DRM 2.43.0, LLVM 3.8.0)|78\nRadeon HD 5000|78\nRadeon HD 5770|77\nRadeon RX 460|77\nFirePro W4300|77\nRadeon 530 Series|77\nRadeon(TM) 540X|77\nRadeon R9 M370X OpenGL Engine|77\nFirePro V5900 (FireGL V)|77\nRadeon Pro WX 4100|77\nSAPPHIRE HD 5770|77\nRadeon Pro WX 3100|76\nFirePro W5100|76\nRadeon(TM) Pro Graphics|76\nRadeon Pro WX 3100|76\n67FF:C8|76\nRadeon(TM) HD8970M|76\nFirepro M5100|76\nRadeon(TM) R9 M375X|75\nRadeon 550X Series|75\nRadeon R9 M390|75\nRadeon(TM) Vega 9 Graphics|75\nFirePro V5900 (FireGL V) Graphics Adapter|74\nRadeon HD 8570|74\nRadeon(TM) RX 475M|74\nRadeon HD 6770|74\nRadeon RX 550 Series|74\nRadeon RX 550|74\nFirePro M4000|74\nRadeon RX 460/560D / Pro 450/455/460/560|74\nRadeon Pro 560|74\nRadeon Vega Series / Radeon Vega Mobile Series|74\nRadeon Pro 455|74\nRadeon HD 7870M Series|74\nRadeon(TM) R7 430|74\nRadeon 620 Series|73\nRadeon HD 7770 GHz Edition|73\nRadeon HD 7770|73\nRadeon(TM) R9 360 Series|73\nRadeon HD 7770/8760 / R7 250X|73\nRadeon(TM) 530|73\n15DD Graphics|73\nRadeon RX Vega M GL Graphics|73\nRadeon(TM) R9 380|72\nRadeon(TM) 530 series|72\nRadeon R7 200 Series|72\nEmbedded Radeon E9171|72\nRadeon Pro WX3200 Graphics|71\nRadeon HD 8800M Series|71\nRadeon R9 M375|70\nRadeon HD 5770|70\nRadeon Pro 555|70\nRadeon R7 250E|70\nRadeon HD 7750|70\nRadeon Pro 555X|70\nRadeon(TM) Vega 8 Mobile Graphics|70\nRadeon(TM) R9 M380|69\nRadeon R7 260X/360|69\nBarco MXRT 7600 (WDDM)|69\nRadeon(TM) Vega 10 Graphics|69\nRadeon HD 7750|69\nRadeon R9 M370X|69\nRadeon(TM) R2E Graphics|69\nRadeon R9™ M370X|68\nFirePro V4900 (FireGL V)|68\nRadeon(TM) RX Vega11 Graphics|68\nRadeon HD 5770|68\nRadeon(TM) Renoir Graphics D1|68\nRadeon HD 7600 Series|67\nRadeon R5 340|67\nRadeon(TM) Vega 9 Graphics|67\nFirePro W4100 (FireGL V) Graphics Adapter|67\n694E:C0|67\n694C:C0|67\nRadeon R7 250|66\nRadeon HD 6750|66\nRAVEN (DRM 3.36.0, 5.6.5-AMD, LLVM 9.0.1)|66\nFirePro W600|66\nRadeon R9 255|66\nRadeon RX 470|66\nRadeon(TM) R7 250|66\nFirePro V5900|65\nRadeon(TM) 530|65\nRadeon Pro WX Vega M GL Graphics|65\nRadeon RX 470/480|65\nRadeon HD 5750|65\nRadeon R7 260X|65\nFirePro V5900 (FireGL V) Graphics Adapter|65\nFirePro W4100 Graphics Adapter|65\nRadeon HD 6700 Green Edition|65\nRadeon R9 M370X|65\nRadeon(TM) R7 350X|64\nRadeon(TM) R7 350X|64\nRadeon HD 7670|64\nRadeon R9 M200X Series|64\nRadeon R9 M370X|64\nRadeon HD 6670|63\nRadeon(TM) HD 8350|63\nRadeon 530X Series|63\nRadeon(TM) R9 360|63\nRadeon(TM) Pro WX 4150 Graphics|63\n67EF:C5|63\nRadeon R7 Graphics + R5 340 Dual Graphics|62\nRadeon HD 5670|62\nRadeon RX 470/570|62\nRadeon 530 Series|62\nRadeon R7 250 Series|62\nRadeon R7 430|62\nRadeon HD 6750 Graphics|62\nRadeon(TM) R9 M385X|62\nRadeon(TM) Vega 10 Mobile Graphics|62\nFirePro V5900 (FireGL V)|61\nFirePro V5800 (FireGL V)|61\nRadeon(TM) Vega 8 Graphics|61\nFirePro V4800 (FireGL V)|61\nRadeon HD 7600 Series|61\nRadeon(TM) Vega 6 Graphics|61\nRadeon(TM) R9 200 Series|61\nRadeon HD 8850M|61\nRadeon RX460|61\nRadeon R7 M460|61\nRadeon RX 640 Series|60\nRadeon 530|60\nRadeon HD 5600/5700|60\nRadeon HD 5750 Series|60\nRadeon R7 Graphics + R7 200 Dual Graphics|60\nRadeon R7 450|60\nFirePro V4900|60\nFirepro W6150M|60\nASUS R7 250 Series|60\nRadeon(TM) RX 560 Graphics|60\nRadeon(TM) R7 M370|59\nFirePro M4000 Mobility Pro Graphics|59\nRadeon R5 430|59\nRadeon R9 M275X|59\nFirePro V5800 (FireGL) Graphics Adapter|59\nMobility Radeon HD 5870|59\nRadeon(TM) R9 M385X|58\nRadeon HD 7750M|58\nRadeon HD 5670|58\nRadeon HD 8850M|58\nRadeon HD 7700M Series|58\nRadeon HD 8670D + R7 200 Dual Graphics|58\nRadeon R7 Series / HD 9000 Series|57\nRadeon HD 6730M/6770M|57\nRadeon(TM) 625|57\nRadeon(TM) R9 M385|57\nRadeon HD 5870M|56\nRadeon 610 Series|56\nFirePro W4100|56\nFirePro M6000 Mobility Pro Graphics|56\nRadeon RX 540 Series|56\nRadeon R7 240|56\nRadeon HD 7560D + HD 7700 Dual Graphics|56\nRadeon R9 M370X (Bootcamp XG edition by bootcampdrivers.com)|56\nFirePro V4900 (ATI FireGL)|55\nRadeon(TM) R7 M350|55\nFirePro M6000 Mobility Pro Graphics|55\n67FF:08|55\nRadeon HD 5750|55\nRadeon HD 7570|55\nRadeon(TM) Vega 11 Graphics|55\nRadeon R7 M460|55\nRadeon HD 5750 OpenGL Engine|55\nRadeon(TM) R7 M370|55\nRadeon HD 6730M/6770M/7690M XT|55\nRadeon E8860|55\nRadeon HD 8790M|54\nRadeon HD 6770M|54\nRadeon R7 M440|54\nRadeon(TM) R7 350|54\nRadeon(TM) R7 350X|54\nRadeon HD 7870 XT|54\nRadeon HD 7800M Series|54\nRadeon 520|54\nRadeon R7 M370|53\nFirePro W4150M FireGL V|53\n(ATI) FirePro M4000 (FireGL V) Mobility Pro Graphics|53\nRadeon R9 M200X Series|53\nRadeon HD 6700M/7700M/7900M Series|53\nRadeon(TM) 620|53\nPicasso|53\nRadeon(TM) RX Vega 10 Graphics|53\n67EF:CF|53\nRadeon(TM) Vega 3 Graphics|53\nRadeon R7 250|53\nFirePro W4190M|53\nRadeon(TM) Vega 8 Graphics|53\n694C:C0|52\nRadeon HD 5670 Series|52\nRadeon(TM) RX Vega 11 Graphics|52\nRadeon HD 6770M OpenGL Engine|52\nRadeon(TM) M535DX|52\nFirePro V4800 (FireGL V)|52\nRadeon R7 350 Series|52\nBarco MXRT 5600 (WDDM)|51\nRadeon 630|51\nFirePro V4900 (FireGL V)|51\nFirePro V4900 (FireGL V) Graphics Adapter|51\nRadeon(TM) Vega 3 Mobile Graphics|51\nRadeon 535 Series|51\nRadeon R7 Graphics|51\nRadeon HD 5670|51\nFirePro W4170M|50\nRadeon HD 8700M Series|50\nRadeon HD 8670 / R7 250/350|50\nPicasso|50\nFirePro V4800 (FireGL) Graphics Adapter|50\nMobility Radeon HD 5850|49\nOPAL XT/GL (6604)|49\nRadeon R5 M335|49\nMatrox C900 PCIe x16|49\nRadeon HD 7670|49\nRadeon HD 6750M|49\nRadeon(TM) 535|49\nRadeon 540X Series|49\nRadeon R9 M275|49\nRadeon(TM) RX 640|49\nRadeon HD 5700 Series|48\nRadeon R5 M230 Series|48\nFirepro M6100|48\nRadeon(TM) R9 M375|48\nRadeon R5 430|48\nRadeon(TM) R7 250|47\nRadeon R9 M265X|47\nRadeon HD 6730M/6770M|47\nRadeon HD 8670D|47\nRadeon R5 340|47\nRadeon 520|47\nRadeon(TM) 520|47\nFirePro V (FireGL V) Graphics Adapter|47\nFirePro M5100 FireGL V|46\nRadeon HD 6670|46\nRadeon R7 M260X|46\nRadeon HD 8550|46\nFirePro M4150|46\nRadeon HD 6670|46\nRadeon HD 7700 Series|46\nFirePro M4170|46\nRadeon HD 7570|46\nRadeon HD 8670D + HD 6670 Dual Graphics|45\n699F:C1|45\nRadeon R7 Graphics|45\nRadeon(TM) R7 M340|45\nFirePro W4170M (FireGL V)|45\nRadeon(TM) HD 8500M/8700M|45\nRadeon R7 M340|44\nFirePro M5950|44\nRadeon HD 8570D + R7 240 Dual Graphics|44\nRadeon HD 6770M|44\nRadeon HD 7730M|44\nRadeon HD 8790M|44\nRadeon HD 7750|44\nRadeon HD 8690A|44\nMobility Radeon HD 5730 / 6570M|44\nRadeon R9 A375|44\nRadeon(TM) R8 M445DX|43\nFirePro V (FireGL V) Graphics Adapter|43\nRadeon HD 7750/8740 / R7 250E|43\nFirePro V3900|43\nRadeon HD 7600A Series|43\nRadeon(TM) R7 200 Series Graphics|43\nRadeon R7 Graphics|43\nRadeon HD 6770M|43\nRadeon R7 M260 Series|43\nRadeon R7 M360|43\nRadeon HD 8970M|43\nRadeon(TM) Vega 6 Graphics|43\nRadeon HD 8570|42\nRadeon R7 M440|42\nRadeon HD 8670A/8670M/8750M|42\nMobility Radeon HD 5850|42\nRadeon HD 8750M|42\nEmbedded Radeon E9173|42\nRadeon(TM) R7 M440|42\nRadeon HD 8730M|42\nRadeon R7 240 + HD 8570D Dual Graphics|42\nFirePro V3900|42\nRadeon(TM) 535DX|42\nRadeon(TM) 520|42\nRadeon(TM) Vega 8 Mobile Graphics|42\nRadeon(TM) Vega 8 Graphics|42\nRadeon(TM) Vega 2 Graphics|42\nRadeon(TM) R9 M375|42\nRadeon(TM) R8 M445DX|41\nRadeon HD 6750M|41\nRadeonT 540X|41\nRadeon(TM) 530|41\nRadeon HD 7560D + HD 6670 Dual Graphics|41\nRadeon R7 240|41\nRadeon(TM) R7 M360|41\nRadeon R9 M280X|41\nRadeon HD 7520G + HD 7600M Dual Graphics|41\nRadeon(TM) R7 M445|41\nRadeon Vega 8 Mobile|40\nRadeon(TM) R9 255|40\nRadeon R7 M260X|40\nRadeon R8 M535DX|40\nRadeon R7 240/340|40\nRadeon(TM) R9 M375|40\nRadeon(TM) R7 Graphics|40\nRadeon(TM) R5 M420|40\nRadeon HD 6750M|40\nRadeon R9 M265X|40\nRadeon R7 M340|40\nRadeon HD 6570|40\nRadeon HD 7500/7600 Series|39\nRadeon R7 430|39\nFirePro W2100|39\nRadeon HD 7730M|39\nRadeon HD 8670D|39\nRadeon R5 M255|39\nRadeon HD 7560D + HD 6570 Dual Graphics|39\nRadeon RX Vega|39\nRadeon R7 240 Series|39\nRadeon(TM) R7 M445|39\nRadeon HD 6800M Series|39\nRadeon HD 8690M|39\nRadeon HD 7660D + HD 6570 Dual Graphics|39\nRadeon R7 M370|39\nRadeon(TM) HD 6650M|38\nRadeon R5 M435|38\nRadeon HD 6500 Series|38\nRadeon R7 Graphics|38\nFirePro M7820|38\nRadeon(TM) R8 M445DX Graphics|38\nRadeon HD 5570|38\nRadeon HD 8650G + 8750M Dual Graphics|38\nRadeon HD 8670A/8670M/8750M|38\nRadeon HD 6650M|38\nRadeon R7 M260 Series|38\nRadeon HD 7660G + 7600M Dual Graphics|38\nRadeon HD 7600M Series|38\nRadeon HD 7670M|37\nRadeon. HD 7670M|37\nRadeon(TM) R7 M265|37\nMobility Radeon HD 5000|37\nRadeon HD 7500M/7600M Series|37\nRadeon R5/R6/R7 Graphics|37\nRadeon R7 M270|37\nRadeon HD 8650G + HD 7600M Dual Graphics|37\nFirepro M5100|37\nRadeon HD 7730M|37\nRadeon HD 8570D|37\nRadeon(TM) HD 7650A Graphics|37\nRadeon R7 Graphics|37\nRadeon(TM) RX Vega 10 Graphics|37\nRadeon HD 7600A Series|36\nRadeon R7 M270|36\nRadeon HD 7660D + HD 6670 Dual Graphics|36\nRadeon HD 7570M/HD 7670M Graphics|36\nRadeon 6600M and 6700M Series|36\nRadeon R7 Graphics + R7 200 Dual Graphics|36\nRadeon HD 7570 Series|36\nRadeon HD 8750M|36\nRadeon HD 6550D|36\nFirePro M5950|36\nRadeon HD 7660G + 7600M Dual Graphics|36\nRadeon HD 6550D|36\nRadeon HD 7600M/7700M Series|36\nRadeon(TM) Vega 3 Graphics|36\nRadeon(TM) 625|36\nMobility Radeon HD 5570|36\nRadeon HD8730|36\nRadeon(TM) R9 M380|36\nRadeon(TM) R5 240|36\nRadeon HD 7650M|35\nRadeon HD 7560D|35\nRadeon HD 8690M|35\nRadeon HD 8650G + 8750M Dual Graphics|35\nRadeon HD 8650G + HD 8750M Dual Graphics|35\nRadeon HD 8650G + HD 8570M Dual Graphics|35\nRadeon HD 6570|35\nRadeon HD 7650M|35\nRadeon HD 6630M/6650M/6750M/7670M/7690M|35\nRadeon HD 6500 Series|35\nRadeon(TM) 520|35\nRadeon HD 8570D|35\nRadeon HD 7600M Series|35\nRadeon R7 Graphics|35\nRadeon HD 7660G + 8670M Dual Graphics|35\nRadeon R7 200 Series|35\nRadeon HD 6630M/6650M/6750M/7670M/7690M|35\nRadeon R7 M265|35\nRadeon HD 8650G + HD 8750M Dual Graphics|35\nRadeon HD 8650G + 8670M Dual Graphics|35\nRadeon R7 Graphics|34\nRadeon HD 6630M Series|34\nRadeon(TM) 520|34\nRadeon HD 7660D|34\nASUS R7 240 Series|34\nRadeon R9 M280X|34\nRadeon(TM) R5 340|34\nRadeon HD 8550G + 8600/8700M Dual Graphics|34\nRadeon R7 Graphics|34\nRadeon(TM) HD 8500M/8700M|34\nRadeon HD 7660G + HD 7600M Dual Graphics|34\nRadeon HD 7670M|34\nRadeon(TM) R5 M430|34\nRadeon HD 8650G + 8500M Dual Graphics|34\nRadeon(TM) R5 340X|34\nRadeon(TM) R5 230 series|34\nRadeon HD 8550|34\nFirePro W2100 (FireGL V)|34\nFirepro M4100 FireGL V|34\nRadeon HD 6550D|34\nRadeon HD 6630M|34\nRadeon(TM) R9 M375|34\nRadeon HD 5670 OpenGL Engine|33\nRadeon HD 5670|33\nRadeon R7 Graphics|33\nRadeon HD 7660G|33\nRadeon HD 5570|33\nRadeon HD 7550M/7650M Graphics|33\nRadeon HD 7660D|33\nRadeon HD 7560D|33\nRadeon HD 7560D|33\nRadeon R5 M445 Series|33\nRadeon R5 M315|33\nRadeon HD 8570D|33\nRadeon R7 M265|33\nRadeon HD 7640G + HD 7500/7600 Dual Graphics|33\nRadeon R7 Graphics|33\nRadeon HD 8500M Series|33\nMobility Radeon HD 5000|33\nRadeon(TM) R7 M360|33\nFirepro M4100|33\nRadeon(TM) Vega 10 Graphics|32\nRadeon HD 7500M/7600M Series|32\nRadeon HD 8550G + HD 8600/8700M Dual Graphics|32\nRadeon HD 7660G|32\nRadeon HD 7350|32\nRadeon HD 8470D + HD 6450 Dual Graphics|32\nRadeon R7 Graphics|32\nRadeon HD 8730M|32\nRadeon HD 7640G + HD 7400M Dual Graphics|32\nRadeon HD 8690A|32\nRadeon HD 8650G + 8600/8700M Dual Graphics|32\nRadeon R7|32\nRadeon(TM) Vega 11 Graphics|32\nRadeon(TM) Vega 8 Graphics|32\nRadeon R5 M200 Series|32\nRadeon(TM) R5 M335|32\nRadeon(TM) R5 M430|32\nRadeon HD 8550G + HD 8570M Dual Graphics|32\nRadeon HD 7650M Series|32\nRadeon R7 250 Series|32\nRadeon(TM) R7 M460|32\nRadeon HD 6550D|32\nRadeon HD 7660G + HD 7600M Dual Graphics|32\nRadeon(TM) Vega 3 Graphics|32\nRadeon HD 8470D|32\nRadeon R8 M365DX|31\nMadison [Mobility Radeon HD 5650/5750 / 6530M/6550M]|31\nRadeon HD 6630M/6650M/6750M/7670M/7690M|31\nRadeon R7 Graphics|31\nRadeon E6760|31\nRadeon R7 Graphics|31\nRadeon(TM) Vega 8 Graphics|31\nRadeon(TM) R5 M330|31\nRadeon HD 8670A/8670M/8690M|31\nRadeon R7 A360|31\nRadeon HD 8650G + HD 8600M Dual Graphics|31\nRadeon R5 M200 / HD 8500M Series|31\nRadeon(TM) R8 M435DX|30\nRadeon HD 7640G + HD 7670M Dual Graphics|30\nRadeon(TM) Vega 10 Mobile Graphics|30\nRadeon R7 Graphics|30\nRadeon Pro 450/550|30\nRadeon HD 8800M Series|30\nRadeon HD 8470D|30\nRadeon HD 7660D|30\nRadeon HD 8610G + HD 8600M Dual Graphics|30\nRadeon HD 7660G + 7670M Dual Graphics|30\nRadeon(TM) Vega 8 Mobile Graphics|30\nRadeon 610 Series|30\nRadeon(TM) R5 M330|30\nRadeon HD 7660G|30\nRadeon HD 7640G|30\nRadeon R8 M365DX|30\nRadeon HD 8550G|29\nRadeon HD 7540D|29\nRadeon HD 7640G|29\nRadeon HD 8650G|29\nRadeon(TM) R7 Graphics|29\nRadeon(TM) RX Vega 11 Graphics|29\nRadeon HD 6650M|29\nRadeon HD 7660G|29\nRadeon 6600M and 6700M Series|29\nRadeon HD 7640G + HD 7400M Dual Graphics|29\nRadeon(TM) R5 340X|29\nRadeon R5 435|29\nRadeon HD 6500M/5600/5700 Series|29\nFirepro M4100 FireGL V|29\nRadeon R7 Graphics|29\nRadeon(TM) 535|29\nRadeon R7 240 Series|29\nRadeon(TM) R7|29\nRadeon HD 8550G + 8500M Dual Graphics|28\nRadeon(TM) 530|28\nRadeon HD 5650 Series|28\nRadeon HD 7570M|28\nRadeon HD 7570M|28\nASUS R7 240 Series|28\nRadeon HD 6570|28\nRadeon(TM) Vega 8 Graphics|28\nRadeon E8860|28\nRadeon(TM) 530 series|28\nRadeon(TM) R5 M315|28\nRadeon HD 5500 Series|28\nRadeon HD 8610G + HD 8670M Dual Graphics|28\nRadeon(TM) R6|28\nRadeon R9 M275X|28\nRadeon HD 8550G + R5 M230 Dual Graphics|28\nRadeon HD 8470D|28\nRadeon HD 8670D|28\nRadeon HD 7620G|28\nRadeon(TM) R8 M350DX|28\nRadeon HD 8470D|27\nRadeon(TM) R8 M445DX|27\nRadeon(TM) R7 Graphics|27\nRadeon(TM) R5 Graphics|27\nRadeon(TM) R7 M340|27\nRadeon(TM) R6 Graphics|27\nRadeon R6 Graphics|27\nRadeon R5 M230 Series|27\nRadeon HD 8650G|27\nRadeon HD 7480D|27\nRadeon(TM) R8 M445DX Graphics|27\nRadeon(TM) R6 Graphics|27\nRadeon R7 Graphics|27\nRadeon R6|27\nRadeon R5 M255|27\nRadeon(TM) Vega 3 Graphics|27\nRadeon 550X|27\nRadeon(TM) Vega 3 Graphics|27\nRadeon HD 7500/7600 Series|27\nRadeon HD 8650G|27\nRadeon HD 5500 Series|27\nRadeon HD 7610M|27\nRadeon Instinct MI25 MxGPU|27\nRadeon(TM) HD8530M|27\nRadeon R7 M260|27\nRadeon(TM) R8 M445DX|27\nRadeon R7 Graphics|26\nRadeon HD 8500M|26\nRadeon(TM) R7 M260DX|26\nRadeon HD 8410G|26\nRadeon HD 8670A/8670M/8690M|26\nRadeon(TM) R7 M360|26\nRadeon(TM) R7 M360|26\nRadeon HD 8670D|26\nRadeon R9 M275|26\nRadeon HD 7640G|26\nRadeon(TM) R7 Graphics|26\nMxGPU|26\nRadeon HD 8370D|26\nRadeon HD 6620G|25\nRadeon HD 7560D|25\nRadeon HD 8570 / R5 430 / R7 240/340 / Radeon 520|25\nRadeon R4 Graphics|25\nRadeon R6 Graphics|25\nRadeon R7 Graphics|25\nRadeon(TM) 535DX|25\nRadeon(TM) 540 Graphics|25\nRadeon(TM) R5 M330|25\nRadeon HD 6530D|25\nRadeon R6 Graphics|25\nRadeon HD 8510G|25\nRadeon HD 6620G|25\nRadeon R7 M360|24\nRadeon(TM) R6 Graphics|24\nRadeon R7 M260|24\nRadeon HD 8610G + HD 8600M Dual Graphics|24\nRadeon(TM) R6 Graphics|24\nRadeon R5 M200 / HD 8500M Series|24\nRadeon R7 Graphics|24\nRadeon HD 7600G|24\nRadeon R7 Graphics|24\nRadeon HD 6620G|24\nRadeon R5 M330|24\nRadeon(TM) R5 240|24\nRadeon(TM) HD 6620G|24\nFirePro V3800 (FireGL V)|24\nRadeon HD 6520G|24\nRadeon R7 Graphics|24\nRadeon HD 7520G|24\nRadeon(TM) R6 Graphics|24\nRadeon(TM) R7 M260|24\nRadeon RX 540 Series|24\nRadeon(TM) R5 M320|24\nRadeon HD 8500M|23\nRadeon R5 M230|23\nRadeon HD 8670M|23\nRadeon HD 8550G + HD 8750M Dual Graphics|23\nRadeon HD 8600M Series (HAINAN, DRM 3.40.0, 5.11.13-arch1-1, LLVM 11.1.0)|23\nRadeon HD 8550G|23\nRadeon R5 M240|23\nRadeon R5 M240 Series|23\nRadeon HD 7540D|23\nRadeon(TM) R5 M430|23\nRadeon R5 Graphics|23\nRadeon(TM) R5 M430|23\nRadeon R6 Graphics|23\nRadeon HD 7520G|23\nRadeon R7 Graphics|23\nRadeon HD 8610G|22\nFirePro 3800 (FireGL) Graphics Adapter|22\nRadeon HD 7570M/HD 7670M Graphics|22\nRadeon HD 7480D|22\nRadeon(TM) R7 Graphics|22\nRadeon HD 8650G + HD 8600M Dual Graphics|22\nRadeon(TM) Vega 6 Graphics|22\nRadeon R7 Graphics|22\nRadeon R5 Graphics|22\nRadeon HD 7660G + HD 8600M Dual Graphics|22\nFirePro M2000|22\nRadeon R7 Graphics|22\nRadeon HD 7870M|22\nRadeon R5 M335|22\nRadeon R5|22\nRadeon HD 8500M Series|22\nRadeon(TM) HD 8490|22\nRadeon HD 8670M|22\nRadeon HD 7660G + HD 7670M Dual Graphics|22\nRadeon 7500M/7600M Series|22\nRadeon R5 Graphics|21\nRadeon(TM) R4 Graphics|21\nRadeon HD 8490|21\nRadeon HD 8490|21\nRadeon R7 Graphics|21\nRadeon HD 8570M|21\nRadeon(TM) R5 M320|21\nRadeon R2|21\nRadeon HD 6530D|21\nRadeon(TM) HD 6470M|21\nMxGPU|21\nRadeon HD 7000 series|21\nRadeon HD 7470|21\nRadeon(TM) R8 M350DX|21\nRadeon R7 Graphics|21\nRadeon HD 7520G + HD 7400M Dual Graphics|21\nRadeon(TM) R5 M335|21\nRadeon HD 7400G|21\nRadeon HD 7640G + HD 8500M Dual Graphics|21\nRadeon HD 7000 series|21\nRadeon(TM) R5 Graphics|20\nRadeon(TM) R7 M520 (R17M-M1-30)|20\nRadeon HD 8470|20\nRadeon HD 7480D|20\nRadeon HD 6400M/7400M Series|20\nRadeon(TM) R3 Graphics|20\nRadeon R6 M255DX|20\nRadeon HD 8370D|20\nRadeon R5 Graphics|20\nRadeon R7 Graphics|20\nRadeon HD 6410D|20\nRadeon(TM) R5 Graphics|20\nRadeon R5 M330|20\nRadeon R7 M260DX|20\nRadeon(TM) R5 Graphics|20\nRadeon HD 7480D|20\nRadeon HD 6470M|20\nRadeon Hybrid (Blocked)|20\nRadeon(TM) R7 Graphics|20\nRadeon(TM) R6 M340DX|20\nRadeon R5 235|20\nRadeon HD 7520G|19\nRadeon(TM) R6 M255DX|19\nRadeon R5 M240|19\nRadeon(TM) R3 Graphics|19\nRadeon R7E Graphics|19\nRadeon R5 M200 Series|19\nRadeon HD 7470|19\nRadeon HD 7640G + 8500M Dual Graphics|19\nRadeon(TM) R5 M330|19\nRadeon HD 6470M|19\nRadeon R3 Graphics|19\nRadeon HD 8400E|19\nRadeon HD 7640G + HD 8570M Dual Graphics|19\nRadeon HD 8400|19\nRadeon HD 8400 / R3 Series|19\nRadeon R5 Graphics|19\nRadeon(TM) R7 M265|19\nRadeon R5 M230|19\nRadeon R5 Graphics|19\nRadeon HD 7620G|19\nRadeon R5 Graphics|19\nRadeon(TM) HD 6470M|19\nRadeon HD 7480D|18\nRadeon R7 Graphics|18\nRadeon(TM) R5 Graphics|18\nRadeon HD 8550G|18\nRadeon HD 8370D|18\nRadeon R5 Graphics|18\nRadeon(TM) HD 7450|18\nRadeon HD 6530D|18\nRadeon HD 8570M|18\nRadeon R6 Graphics|18\nRadeon HD 7650A|18\nRadeon HD 8450G|18\nRadeon HD 8550G + R5 M230 Dual Graphics|18\nRadeon HD 7640G + 7470M Dual Graphics|18\nRadeon HD 8370D|18\nRadeon HD 7400M Series|18\nRadeon HD 8670D + R5 200 Dual Graphics|17\nRadeon HD 7500G|17\nRadeon HD 7790|17\nRadeon HD 7450M|17\nRadeon(TM) HD 7450A Graphics|17\nRadeon(TM) R5 Graphics|17\nRadeon(TM) R6 Graphics|17\nRadeon(TM) R4 Graphics|17\nRadeon HD 8650G + HD 8500M Dual Graphics|17\nRadeon HD 7400M Series|17\nRadeon HD 8450G|17\nRadeon HD 6520G|17\nRadeon HD 8470D|17\nRadeon(TM) R5 Graphics|17\nRadeon(TM) R4E Graphics|17\nRadeon HD 8330|17\nRadeon HD 8400|17\nRadeon(TM) HD 8510G|17\nRadeon(TM) R5 Graphics|17\nRadeon HD 8650G|17\nRadeon HD 6490M|17\nRadeon R7 Graphics|16\nRadeon HD 6400 Series|16\nRadeon HD 8510G|16\nRadeon HD 7400 Series|16\nRadeon HD 7400 Series|16\nRadeon(TM) HD 8510G|16\nRadeon HD 6370D|16\nRadeon HD 7420G|16\nRadeon HD 7520G + HD 7600M Dual Graphics|16\nRadeon R9 260|16\nRadeon HD 7640G + 7600M Dual Graphics|16\nRadeon HD 7470M|16\nRadeon(TM) R2 Graphics|16\nRADEON HD 6450|16\nRadeon(TM) R1E Graphics|16\nRadeon R5 Graphics|16\nRadeon HD 7420G|16\nRadeon(TM) R4 Graphics|16\nRadeon(TM) R4 Graphics|16\nRadeon(TM) R4 Graphics|16\nRadeon HD 7480D|16\nRadeon HD 6490M|15\nRADEON HD 6450|15\nRadeon(TM) HD 8610G|15\nRadeon(TM) HD 8610G|15\nRadeon HD 8610G + 8600M Dual Graphics|15\nRadeon HD 7350|15\nRadeon(TM) HD 6480G|15\nRadeon HD 8650G + 8600M Dual Graphics|15\nRadeon HD 8570D|15\nRadeon HD 6370M|15\nMobility Radeon HD 5000 Series|15\nRadeon R2 Graphics|15\nRadeon HD 8240 / R3 Series|15\nRadeon HD 8650G + R5 M200 Dual Graphics|15\nRadeon HD 8400E|15\nRadeon(TM) R4 Graphics|15\nRadeon R5 Graphics|15\nRadeon HD 8610G|15\nRadeon HD 8650G + HD 8500M Dual Graphics|15\nRadeon(TM) R7 M260|15\nASUS EAH6450 Series|15\nRadeon R3 Graphics|15\nRadeon(TM) R6 M340DX|15\nRadeon R6E Graphics|15\nRadeon R5 Graphics|15\nRadeon R2 Series|14\nRadeon HD 6450/7450/8450/R5 230|14\nRadeon HD 8200 / R3 Series|14\nRadeon(TM) R3 Graphics|14\nRadeon R5 230|14\nRadeon(TM) HD 8510G|14\nRadeon(TM) R4 Graphics|14\nRadeon R5 M435|14\nRadeon HD 8240|14\nASUS R5 230 Series|14\nFirePro M2000|14\nRadeon HD 7500G|14\nRadeon HD 7450|14\nRADEON HD 6450|14\nRadeon HD 8400E|14\nRADEON HD 6350|14\nRadeon HD 6480G|14\nRadeon(TM) R5E Graphics|14\nCARRIZO 9874|14\nMobility Radeon HD 5000 Series|14\nRadeon HD 6630M|14\nRadeon HD 6370M|14\nRadeon HD 8400 / R3 Series|14\nRadeon(TM) R2 Graphics|14\nASUS EAH6450 Series|14\nRadeon HD 7470M|13\nMobility Radeon HD 5470|13\nMobility Radeon HD 5400 Series|13\nRadeon(TM) R5E Graphics|13\nRadeon(TM) R2 Graphics|13\nRadeon HD 6540|13\nRadeon HD 7450|13\nRadeon HD 5450|13\nRadeon HD 8600M Series|13\nRadeon HD 8400 / R3 Series|13\nKaveri|13\nRadeon(TM) HD 6480G|13\nRadeon HD 5400 Series|13\nRadeon HD 8330|13\nRADEON HD 6350|13\nRadeon R4/R5 Graphics|13\nRadeon HD 7600G +™ HD Dual Graphics|13\nRadeon R3 Graphics|13\nASUS R5 230 Series|13\nRadeon(TM) R7 Graphics|13\nRadeon HD 7620G|13\nRadeon HD 8250|13\nRadeon(TM) R7 Graphics|12\nRadeon HD 6450/7450/8450 / R5 230|12\nRadeon HD 6480G|12\nRadeon(TM) R7 Graphics|12\nRadeon HD 5450 Series|12\nRadeon HD 8400 / R3 Series|12\nRadeon(TM) HD 6400 Series|12\nRadeon(TM) R4 Graphics|12\nRADEON HD5450|12\nRadeon R5 Graphics|12\nRadeon R5 Graphics|12\nRadeon(TM) R6 Graphics|12\nRadeon(TM) R4 Graphics|12\nRadeon(TM) R2 Graphics|12\nRadeon HD 8210|12\nRadeon R5 230|12\nRadeon R3 Graphics|12\nFirePro 2270|12\nRadeon(TM) R2E Graphics|12\nRadeon HD 8400 / R3 Series|12\nRadeon HD 8350G|12\nRadeon HD 8400|12\nRadeon R2 Graphics|12\nRadeon HD 8210 Graphics|12\nRadeon E6460|12\nRadeon(TM) HD 8280E|12\nRadeon R2 Graphics|11\nRadeon HD 8450G + HD 8750M Dual Graphics|11\nRadeon HD 8330|11\nRadeon HD 5470|11\nRadeon HD 7600G + 7500M/7600M Dual Graphics|11\nRadeon R5 220|11\nRadeon HD 8200 / R3 Series|11\nRadeon HD 8240|11\nRadeon HD 8400 / R3 Series|11\nRadeon HD 8200 / R3 Series|11\nRadeon HD 5450|11\nRadeon(TM) 620|11\nRadeon(TM) Vega 8 Mobile Graphics|11\nRadeon HD 6530D|11\nRadeon(TM) HD 6520G|11\nRadeon HD 6300M Series|11\nASUS EAH5450|11\nRadeon R5 220|11\nRadeon HD 8250|11\nRadeon HD 7340|11\nRadeon HD 7340M|11\nRadeon HD 8210|11\nRadeon HD 7700 Series|10\nRadeon HD 6380G|10\nRadeon HD 5400 Series|10\nRadeon HD 8240|10\nRadeon HD 7640G + 7670M Dual Graphics|10\nRadeon(TM) R6 Graphics|10\nASUS EAH5450 Series|10\nRadeon HD 6320|10\nRadeon HD 7340G|10\nRadeon HD 6410D|10\nRadeon HD 7340|10\nRadeon HD 6320|10\nRadeon(TM) R2 Graphics|10\nRadeon HD 8180|9\nMobility Radeon HD 5430|9\nRadeon R2 Graphics|9\nRadeon R2 Series|9\nRadeon HD 8210|9\nFirePro 2270|9\nRadeon R2E Graphics|9\nRadeon HD 7340|9\nRadeon HD 6320|9\nRadeon HD 7310|9\nRadeon HD 6310|9\nRadeon R7 Graphics|9\nRadeon HD 7310|8\nRadeon HD 8250|8\nRadeon HD 8180|8\nRadeon HD 6630M|8\nRadeon HD 6230|8\nRadeon HD 6320|8\nRadeon HD 6400M Series|8\nRadeon HD 7290 Graphics|7\nRadeon HD 6290|7\nRadeon HD 6310|7\nRadeon HD 8180|7\nASUS EAH5450 Series|7\nRadeon(TM) R2 Graphics|6\nRadeon HD 6310|6\nRadeon HD 7500G|6\nRadeon HD 8240 / R3 Series|6\nRadeon HD 6250|6\nRadeon HD 6380G|6\nRadeon HD 6300M Series|5\nRadeon HD 7310|5\nRadeon R3 Graphics|5\nRadeon(TM) R6 Graphics|5\nRadeon HD 6250|5\nRadeon HD 6290|5\nRadeon HD 6250|5\nRadeon HD 7290 Graphics|4\nRadeon HD 5000/6000/7350/8350 Series|3\nRadeon RX Vega 56 OpenGL Engine|-1\nFirePro V4800 (FireGL) Graphics Adapter|-1\nRadeon HD 7670M|-1\nRadeon HD 8570D|-1\n7340:C5|-1\nRadeon HD 8550G|-1\nRadeon R5 Graphics|-1\nASUS R7 360 Series|-1\nBonaire [FirePro W5100]|-1\nRadeon HD 6380G|-1\nRadeon R7 Graphics|-1\nFireGL V8650|-1\nFirePro S7150|-1\nFirePro V3900 (FireGL V)|-1\nFirePro V7800 (FireGL V)|-1\nFirePro W4100 Graphics Adapter|-1\nFirePro W4170M (FireGL V)|-1\nGigabyte Radeon RX 580|-1\nMobility FireGL V5700|-1\nMobility Radeon 4100|-1\nMobility Radeon HD 2400|-1\nMobility Radeon HD 2400 XT|-1\nMobility Radeon HD 2600|-1\nMobility Radeon HD 2600 XT|-1\nMobility Radeon HD 3200|-1\nMobility Radeon HD 3400 Series|-1\nMobility Radeon HD 3430|-1\nMobility Radeon HD 3470|-1\nMobility Radeon HD 3650|-1\nMobility Radeon HD 4200 Series|-1\nMobility Radeon HD 4250|-1\nMobility Radeon HD 4300 Series|-1\nMobility Radeon HD 4500 Series|-1\nMobility Radeon HD 4500/5100 Series|-1\nMobility Radeon HD 4650|-1\nMobility Radeon HD 4670|-1\nMobility Radeon HD 4850|-1\nR9 270X Devil|-1\nRX 560X|-1\nRadeon|-1\nRadeon(TM) HD8530M|-1\nRadeon 3000|-1\nRadeon 3100 Graphics|-1\nRadeon HD 2400 PRO|-1\nRadeon HD 2400 XT|-1\nRadeon HD 2600 Pro|-1\nRadeon HD 2600 XT|-1\nRadeon HD 2900 GT|-1\nRadeon HD 3200 Graphics|-1\nRadeon HD 3300|-1\nRadeon HD 3450|-1\nRadeon HD 3470|-1\nRadeon HD 3600 Series|-1\nRadeon HD 3650|-1\nRadeon HD 3850|-1\nRadeon HD 3870|-1\nRadeon HD 3870 X2|-1\nRadeon HD 4200|-1\nRadeon HD 4250|-1\nRadeon HD 4290|-1\nRadeon HD 4300/4500 Series|-1\nRadeon HD 4550|-1\nRadeon HD 4600 Series|-1\nRadeon HD 4650|-1\nRadeon HD 4670|-1\nRadeon HD 4830|-1\nRadeon HD 4850|-1\nRadeon HD 4870|-1\nRadeon HD 4890|-1\nRadeon HD 5670 640SP Edition|-1\nRadeon HD 5800 Series|-1\nRadeon HD 5850|-1\nRadeon HD 6490M|-1\nRadeon HD 6730M/6770M|-1\nRadeon HD 6750|-1\nRadeon HD 6800M Series|-1\nRadeon HD 7540D + HD 6670 Dual Graphics|-1\nRadeon HD 7700M Series|-1\nRadeon HD 7800 Series|-1\nRadeon HD 8350|-1\nRadeon HD 8370D|-1\nRadeon HD 8600/8700M|-1\nRadeon Pro WX Vega M GL Graphics|-1\nRadeon R5 200 Series|-1\nRadeon R7 A370|-1\nRadeon R9 200 Series|-1\nRadeon R9 290X/390X|-1\nRadeon R9 380X|-1\nRadeon RX 480|-1\nRadeon RX 550X|-1\nRadeon RX 6650M|-1\nRadeon RX6600XT|-1\nRadeon(TM) R8 M435DX|-1\nRadeon(TM) R9 290X|-1\nRadeon(TM) RX540|-1\ninc. Radeon HD 7970|-1\nRadeong 0.4 on AMD CAPE VERDE (DRM 2.43.0, LLVM 3.7.0)|-1\nRadeong 0.4 on AMD CAPE VERDE (DRM 3.9.0 / 4.9.0-rc1+, LLVM 4.0.0)|-1\nRadeong 0.4 on AMD FIJI (DRM 3.2.0 / 4.7.0-rc5+, LLVM 4.0.0)|-1\nRadeong 0.4 on AMD TAHITI (DRM 2.43.0, LLVM 3.9.0)|-1\n";function $Z(e){return e===UZ.Intel?qZ:e===UZ.Nvidia?ZZ:e===UZ.Amd?YZ:""}var JZ=[],eY=[],tY=[];function nY(e){if(e===UZ.Intel&&JZ.length)return JZ;if(e===UZ.Nvidia&&eY.length)return eY;if(e===UZ.Amd&&tY.length)return tY;try{var t=function(e,t){var n,r;return n=t===UZ.Intel?VR(r=e.split("\n")).call(r,(function(e){return"Intel(R) ".concat(e)})):e.split("\n"),VR(n).call(n,(function(e){return e.split("|")}))}($Z(e),e);return e===UZ.Intel&&(JZ=t),e===UZ.Nvidia&&(eY=t),e===UZ.Amd&&(tY=t),t}catch(oK){}return[]}function rY(e){if(!e)return 0;var t,n=nY(e.vendor);return t=function(e,t){var n=Ww(e).call(e,(function(e){return e[0]===t.model}));n.length||(n=Ww(e).call(e,(function(e){return e[0]===t.backupModel}))),n.length||t.vendor!==UZ.Intel||/^Intel(R)/.test(t.model)||(n=Ww(e).call(e,(function(e){return e[0]==="Intel(R) "+t.model})));var r="-1";if(n.length){var i=n[0][1];r="-1"===i?"0":i}return Ow(r)}(n,e),0===t?0:-1===t?-1:nk(WZ(t).toFixed(2))}var iY,oY,aY="",sY=function(){function e(){Py(this,e)}return Hy(e,null,[{key:"getGPUVendor",value:function(){return aY||(aY=function(){try{var e=localStorage.getItem(QZ)||"";if(e)return e;var t,n=document.createElement("canvas").getContext("webgl");if(n)return(e=(t=n.getExtension("WEBGL_debug_renderer_info"))?n.getParameter(t.UNMASKED_RENDERER_WEBGL):"")&&localStorage.setItem(QZ,e),e}catch(oK){}return""}())}},{key:"parseVendor",value:function(t){try{var n=NZ(t||e.getGPUVendor());return Fm(Fm({},n),{},{score:rY(n)})}catch(oK){}return null}}]),e}(),cY=void 0!==Wq?Wq:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function lY(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var uY=function(e){return e&&e.Math==Math&&e},dY=uY("object"==(void 0===Wq?"undefined":Su(Wq))&&Wq)||uY("object"==("undefined"==typeof window?"undefined":Su(window))&&window)||uY("object"==("undefined"==typeof self?"undefined":Su(self))&&self)||uY("object"==Su(cY)&&cY)||function(){return this}()||cY||Function("return this")(),hY=function(e){try{return!!e()}catch(t){return!0}},fY=!hY((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),pY=fY,vY=Function.prototype,gY=vY.apply,yY=vY.call,mY="object"==("undefined"==typeof Reflect?"undefined":Su(Reflect))&&Yq||(pY?yY.bind(gY):function(){return yY.apply(gY,arguments)}),_Y=fY,bY=Function.prototype,RY=bY.call,wY=_Y&&bY.bind.bind(RY,RY),GY=_Y?wY:function(e){return function(){return RY.apply(e,arguments)}},TY=GY,kY=TY({}.toString),SY=TY(QR("")),EY=function(e){return SY(kY(e),8,-1)},MY=EY,DY=GY,zY=function(e){if("Function"===MY(e))return DY(e)},AY="object"==("undefined"==typeof document?"undefined":Su(document))&&document.all,PY={all:AY,IS_HTMLDDA:void 0===AY&&void 0!==AY},xY=PY.all,CY=PY.IS_HTMLDDA?function(e){return"function"==typeof e||e===xY}:function(e){return"function"==typeof e},FY={},IY=!hY((function(){return 7!=fG({},1,{get:function(){return 7}})[1]})),HY=fY,OY=Function.prototype.call,LY=HY?OY.bind(OY):function(){return OY.apply(OY,arguments)},XY={},UY={}.propertyIsEnumerable,BY=uG,NY=BY&&!UY.call({1:2},1);XY.f=NY?function(e){var t=BY(this,e);return!!t&&t.enumerable}:UY;var VY,jY,KY=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},WY=hY,QY=EY,qY=Object,ZY=GY("".split),YY=WY((function(){return!qY("z").propertyIsEnumerable(0)}))?function(e){return"String"==QY(e)?ZY(e,""):qY(e)}:qY,$Y=function(e){return null==e},JY=$Y,e$=TypeError,t$=function(e){if(JY(e))throw e$("Can't call method on "+e);return e},n$=YY,r$=t$,i$=function(e){return n$(r$(e))},o$=CY,a$=PY.all,s$=PY.IS_HTMLDDA?function(e){return"object"==Su(e)?null!==e:o$(e)||e===a$}:function(e){return"object"==Su(e)?null!==e:o$(e)},c$={},l$=c$,u$=dY,d$=CY,h$=function(e){return d$(e)?e:void 0},f$=function(e,t){return arguments.length<2?h$(l$[e])||h$(u$[e]):l$[e]&&l$[e][t]||u$[e]&&u$[e][t]},p$=GY({}.isPrototypeOf),v$="undefined"!=typeof navigator&&String(navigator.userAgent)||"",g$=dY,y$=v$,m$=g$.process,_$=g$.Deno,b$=m$&&m$.versions||_$&&_$.version,R$=b$&&b$.v8;R$&&(jY=(VY=R$.split("."))[0]>0&&VY[0]<4?1:+(VY[0]+VY[1])),!jY&&y$&&(!(VY=y$.match(/Edge\/(\d+)/))||VY[1]>=74)&&(VY=y$.match(/Chrome\/(\d+)/))&&(jY=+VY[1]);var w$=jY,G$=w$,T$=hY,k$=dY.String,S$=!!lG&&!T$((function(){var e=pG();return!k$(e)||!(Object(e)instanceof pG)||!pG.sham&&G$&&G$<41})),E$=S$&&!pG.sham&&"symbol"==Su(vG),M$=f$,D$=CY,z$=p$,A$=Object,P$=E$?function(e){return"symbol"==Su(e)}:function(e){var t=M$("Symbol");return D$(t)&&z$(t.prototype,A$(e))},x$=String,C$=function(e){try{return x$(e)}catch(t){return"Object"}},F$=CY,I$=C$,H$=TypeError,O$=function(e){if(F$(e))return e;throw H$(I$(e)+" is not a function")},L$=O$,X$=$Y,U$=function(e,t){var n=e[t];return X$(n)?void 0:L$(n)},B$=LY,N$=CY,V$=s$,j$=TypeError,K$={exports:{}},W$=dY,Q$=fG,q$=function(e,t){try{Q$(W$,e,{value:t,configurable:!0,writable:!0})}catch(n){W$[e]=t}return t},Z$="__core-js_shared__",Y$=dY[Z$]||q$(Z$,{}),$$=Y$;(K$.exports=function(e,t){return $$[e]||($$[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.31.1",mode:"pure",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 J$=K$.exports,eJ=t$,tJ=Object,nJ=function(e){return tJ(eJ(e))},rJ=nJ,iJ=GY({}.hasOwnProperty),oJ=Object.hasOwn||function(e,t){return iJ(rJ(e),t)},aJ=GY,sJ=0,cJ=Math.random(),lJ=aJ(1..toString),uJ=function(e){return"Symbol("+(void 0===e?"":e)+")_"+lJ(++sJ+cJ,36)},dJ=J$,hJ=oJ,fJ=uJ,pJ=S$,vJ=E$,gJ=dY.Symbol,yJ=dJ("wks"),mJ=vJ?gJ.for||gJ:gJ&&gJ.withoutSetter||fJ,_J=function(e){return hJ(yJ,e)||(yJ[e]=pJ&&hJ(gJ,e)?gJ[e]:mJ("Symbol."+e)),yJ[e]},bJ=LY,RJ=s$,wJ=P$,GJ=U$,TJ=function(e,t){var n,r;if("string"===t&&N$(n=e.toString)&&!V$(r=B$(n,e)))return r;if(N$(n=e.valueOf)&&!V$(r=B$(n,e)))return r;if("string"!==t&&N$(n=e.toString)&&!V$(r=B$(n,e)))return r;throw j$("Can't convert object to primitive value")},kJ=TypeError,SJ=_J("toPrimitive"),EJ=function(e,t){if(!RJ(e)||wJ(e))return e;var n,r=GJ(e,SJ);if(r){if(void 0===t&&(t="default"),n=bJ(r,e,t),!RJ(n)||wJ(n))return n;throw kJ("Can't convert object to primitive value")}return void 0===t&&(t="number"),TJ(e,t)},MJ=P$,DJ=function(e){var t=EJ(e,"string");return MJ(t)?t:t+""},zJ=s$,AJ=dY.document,PJ=zJ(AJ)&&zJ(AJ.createElement),xJ=function(e){return PJ?AJ.createElement(e):{}},CJ=xJ,FJ=!IY&&!hY((function(){return 7!=fG(CJ("div"),"a",{get:function(){return 7}}).a})),IJ=IY,HJ=LY,OJ=XY,LJ=KY,XJ=i$,UJ=DJ,BJ=oJ,NJ=FJ,VJ=uG;FY.f=IJ?VJ:function(e,t){if(e=XJ(e),t=UJ(t),NJ)try{return VJ(e,t)}catch(n){}if(BJ(e,t))return LJ(!HJ(OJ.f,e,t),e[t])};var jJ=hY,KJ=CY,WJ=/#|\.prototype\./,QJ=function(e,t){var n=ZJ[qJ(e)];return n==$J||n!=YJ&&(KJ(t)?jJ(t):!!t)},qJ=QJ.normalize=function(e){return String(e).replace(WJ,".").toLowerCase()},ZJ=QJ.data={},YJ=QJ.NATIVE="N",$J=QJ.POLYFILL="P",JJ=QJ,e0=O$,t0=fY,n0=zY(zY.bind),r0=function(e,t){return e0(e),void 0===t?e:t0?n0(e,t):function(){return e.apply(t,arguments)}},i0={},o0=IY&&hY((function(){return 42!=fG((function(){}),"prototype",{value:42,writable:!1}).prototype})),a0=s$,s0=String,c0=TypeError,l0=function(e){if(a0(e))return e;throw c0(s0(e)+" is not an object")},u0=IY,d0=FJ,h0=o0,f0=l0,p0=DJ,v0=TypeError,g0=fG,y0=uG,m0="enumerable",_0="configurable",b0="writable";i0.f=u0?h0?function(e,t,n){if(f0(e),t=p0(t),f0(n),"function"==typeof e&&"prototype"===t&&"value"in n&&b0 in n&&!n[b0]){var r=y0(e,t);r&&r[b0]&&(e[t]=n.value,n={configurable:_0 in n?n[_0]:r[_0],enumerable:m0 in n?n[m0]:r[m0],writable:!1})}return g0(e,t,n)}:g0:function(e,t,n){if(f0(e),t=p0(t),f0(n),d0)try{return g0(e,t,n)}catch(r){}if("get"in n||"set"in n)throw v0("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var R0=i0,w0=KY,G0=IY?function(e,t,n){return R0.f(e,t,w0(1,n))}:function(e,t,n){return e[t]=n,e},T0=dY,k0=mY,S0=zY,E0=CY,M0=FY.f,D0=JJ,z0=c$,A0=r0,P0=G0,x0=oJ,C0=function(e){var t=function t(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return k0(e,this,arguments)};return t.prototype=e.prototype,t},F0=function(e,t){var n,r,i,o,a,s,c,l,u,d=e.target,h=e.global,f=e.stat,p=e.proto,v=h?T0:f?T0[d]:(T0[d]||{}).prototype,g=h?z0:z0[d]||P0(z0,d,{})[d],y=g.prototype;for(o in t)r=!(n=D0(h?o:d+(f?".":"#")+o,e.forced))&&v&&x0(v,o),s=g[o],r&&(c=e.dontCallGetSet?(u=M0(v,o))&&u.value:v[o]),a=r&&c?c:t[o],r&&Su(s)==Su(a)||(l=e.bind&&r?A0(a,T0):e.wrap&&r?C0(a):p&&E0(a)?S0(a):a,(e.sham||a&&a.sham||s&&s.sham)&&P0(l,"sham",!0),P0(g,o,l),p&&(x0(z0,i=d+"Prototype")||P0(z0,i,{}),P0(z0[i],o,a),e.real&&y&&(n||!y[o])&&P0(y,o,a)))},I0=EY,H0=Array.isArray||function(e){return"Array"==I0(e)},O0=Math.ceil,L0=Math.floor,X0=$q||function(e){var t=+e;return(t>0?L0:O0)(t)},U0=X0,B0=function(e){var t=+e;return t!=t||0===t?0:U0(t)},N0=B0,V0=Math.min,j0=function(e){return e>0?V0(N0(e),9007199254740991):0},K0=function(e){return j0(e.length)},W0=TypeError,Q0=function(e){if(e>9007199254740991)throw W0("Maximum allowed index exceeded");return e},q0=DJ,Z0=i0,Y0=KY,$0=function(e,t,n){var r=q0(t);r in e?Z0.f(e,r,Y0(0,n)):e[r]=n},J0={};J0[_J("toStringTag")]="z";var e1="[object z]"===String(J0),t1=e1,n1=CY,r1=EY,i1=_J("toStringTag"),o1=Object,a1="Arguments"==r1(function(){return arguments}()),s1=t1?r1:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=o1(e),i1))?n:a1?r1(t):"Object"==(r=r1(t))&&n1(t.callee)?"Arguments":r},c1=CY,l1=Y$,u1=GY(Function.toString);c1(l1.inspectSource)||(l1.inspectSource=function(e){return u1(e)});var d1=l1.inspectSource,h1=GY,f1=hY,p1=CY,v1=s1,g1=d1,y1=function(){},m1=[],_1=f$("Reflect","construct"),b1=/^\s*(?:class|function)\b/,R1=h1(b1.exec),w1=!b1.exec(y1),G1=function(e){if(!p1(e))return!1;try{return _1(y1,m1,e),!0}catch(t){return!1}},T1=function(e){if(!p1(e))return!1;switch(v1(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return w1||!!R1(b1,g1(e))}catch(t){return!0}};T1.sham=!0;var k1=!_1||f1((function(){var e;return G1(G1.call)||!G1(Object)||!G1((function(){e=!0}))||e}))?T1:G1,S1=H0,E1=k1,M1=s$,D1=_J("species"),z1=Array,A1=function(e){var t;return S1(e)&&(t=e.constructor,(E1(t)&&(t===z1||S1(t.prototype))||M1(t)&&null===(t=t[D1]))&&(t=void 0)),void 0===t?z1:t},P1=function(e,t){return new(A1(e))(0===t?0:t)},x1=hY,C1=w$,F1=_J("species"),I1=function(e){return C1>=51||!x1((function(){var t=[];return(t.constructor={})[F1]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},H1=F0,O1=hY,L1=H0,X1=s$,U1=nJ,B1=K0,N1=Q0,V1=$0,j1=P1,K1=I1,W1=w$,Q1=_J("isConcatSpreadable"),q1=W1>=51||!O1((function(){var e=[];return e[Q1]=!1,Xm(e).call(e)[0]!==e})),Z1=function(e){if(!X1(e))return!1;var t=e[Q1];return void 0!==t?!!t:L1(e)};H1({target:"Array",proto:!0,arity:1,forced:!q1||!K1("concat")},{concat:function(e){var t,n,r,i,o,a=U1(this),s=j1(a,0),c=0;for(t=-1,r=arguments.length;t<r;t++)if(Z1(o=-1===t?a:arguments[t]))for(i=B1(o),N1(c+i),n=0;n<i;n++,c++)n in o&&V1(s,c,o[n]);else N1(c+1),V1(s,c++,o);return s.length=c,s}});var Y1=s1,$1=String,J1=function(e){if("Symbol"===Y1(e))throw TypeError("Cannot convert a Symbol value to a string");return $1(e)},e2={},t2=B0,n2=Math.max,r2=Math.min,i2=function(e,t){var n=t2(e);return n<0?n2(n+t,0):r2(n,t)},o2=i$,a2=i2,s2=K0,c2=function(e){return function(t,n,r){var i,o=o2(t),a=s2(o),s=a2(r,a);if(e&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}},l2={includes:c2(!0),indexOf:c2(!1)},u2={},d2=GY,h2=oJ,f2=i$,p2=KR(l2),v2=u2,g2=d2([].push),y2=function(e,t){var n,r=f2(e),i=0,o=[];for(n in r)!h2(v2,n)&&h2(r,n)&&g2(o,n);for(;t.length>i;)h2(r,n=t[i++])&&(~p2(o,n)||g2(o,n));return o},m2=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],_2=y2,b2=m2,R2=WR||function(e){return _2(e,b2)},w2=IY,G2=o0,T2=i0,k2=l0,S2=i$,E2=R2;e2.f=w2&&!G2?hG:function(e,t){k2(e);for(var n,r=S2(t),i=E2(t),o=i.length,a=0;o>a;)T2.f(e,n=i[a++],r[n]);return e};var M2,D2=f$("document","documentElement"),z2=uJ,A2=J$("keys"),P2=function(e){return A2[e]||(A2[e]=z2(e))},x2=l0,C2=e2,F2=m2,I2=u2,H2=D2,O2=xJ,L2="prototype",X2="script",U2=P2("IE_PROTO"),B2=function(){},N2=function(e){return"<"+X2+">"+e+"</"+X2+">"},V2=function(e){e.write(N2("")),e.close();var t=e.parentWindow.Object;return e=null,t},j2=function(){try{M2=new ActiveXObject("htmlfile")}catch(t){}j2="undefined"!=typeof document?document.domain&&M2?V2(M2):function(){var e,t=O2("iframe"),n="java"+X2+":";return t.style.display="none",H2.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(N2("document.F=Object")),e.close(),e.F}():V2(M2);for(var e=F2.length;e--;)delete j2[L2][F2[e]];return j2()};I2[U2]=!0;var K2=Object.create||function(e,t){var n;return null!==e?(B2[L2]=x2(e),n=new B2,B2[L2]=null,n[U2]=e):n=j2(),void 0===t?n:C2.f(n,t)},W2={},Q2=y2,q2=m2,Z2=Xm(q2).call(q2,"length","prototype");W2.f=rZ||function(e){return Q2(e,Z2)};var Y2={},$2=i2,J2=K0,e5=$0,t5=Array,n5=Math.max,r5=function(e,t,n){for(var r=J2(e),i=$2(t,r),o=$2(void 0===n?r:n,r),a=t5(n5(o-i,0)),s=0;i<o;i++,s++)e5(a,s,e[i]);return a.length=s,a},i5=EY,o5=i$,a5=W2.f,s5=r5,c5="object"==("undefined"==typeof window?"undefined":Su(window))&&window&&rZ?rZ(window):[];Y2.f=function(e){return c5&&"Window"==i5(e)?function(e){try{return a5(e)}catch(t){return s5(c5)}}(e):a5(o5(e))};var l5={};l5.f=lG;var u5=G0,d5=function(e,t,n,r){return r&&r.enumerable?e[t]=n:u5(e,t,n),e},h5=i0,f5=function(e,t,n){return h5.f(e,t,n)},p5={},v5=_J;p5.f=v5;var g5,y5,m5,_5=c$,b5=oJ,R5=p5,w5=i0.f,G5=function(e){var t=_5.Symbol||(_5.Symbol={});b5(t,e)||w5(t,e,{value:R5.f(e)})},T5=LY,k5=f$,S5=_J,E5=d5,M5=function(){var e=k5("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=S5("toPrimitive");t&&!t[r]&&E5(t,r,(function(e){return T5(n,this)}),{arity:1})},D5=s1,z5=e1?{}.toString:function(){return"[object "+D5(this)+"]"},A5=e1,P5=i0.f,x5=G0,C5=oJ,F5=z5,I5=_J("toStringTag"),H5=function(e,t,n,r){if(e){var i=n?e:e.prototype;C5(i,I5)||P5(i,I5,{configurable:!0,value:t}),r&&!A5&&x5(i,"toString",F5)}},O5=CY,L5=dY.WeakMap,X5=O5(L5)&&/native code/.test(String(L5)),U5=dY,B5=s$,N5=G0,V5=oJ,j5=Y$,K5=P2,W5=u2,Q5="Object already initialized",q5=U5.TypeError,Z5=U5.WeakMap;if(X5||j5.state){var Y5=j5.state||(j5.state=new Z5);Y5.get=Y5.get,Y5.has=Y5.has,Y5.set=Y5.set,g5=function(e,t){if(Y5.has(e))throw q5(Q5);return t.facade=e,Y5.set(e,t),t},y5=function(e){return Y5.get(e)||{}},m5=function(e){return Y5.has(e)}}else{var $5=K5("state");W5[$5]=!0,g5=function(e,t){if(V5(e,$5))throw q5(Q5);return t.facade=e,N5(e,$5,t),t},y5=function(e){return V5(e,$5)?e[$5]:{}},m5=function(e){return V5(e,$5)}}var J5={set:g5,get:y5,has:m5,enforce:function(e){return m5(e)?y5(e):g5(e,{})},getterFor:function(e){return function(t){var n;if(!B5(t)||(n=y5(t)).type!==e)throw q5("Incompatible receiver, "+e+" required");return n}}},e6=r0,t6=YY,n6=nJ,r6=K0,i6=P1,o6=GY([].push),a6=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(c,l,u,d){for(var h,f,p=n6(c),v=t6(p),g=e6(l,u),y=r6(v),m=0,_=d||i6,b=t?_(c,y):n||a?_(c,0):void 0;y>m;m++)if((s||m in v)&&(f=g(h=v[m],m,p),e))if(t)b[m]=f;else if(f)switch(e){case 3:return!0;case 5:return h;case 6:return m;case 2:o6(b,h)}else switch(e){case 4:return!1;case 7:o6(b,h)}return o?-1:r||i?i:b}},s6={forEach:a6(0),map:a6(1),filter:a6(2),some:a6(3),every:a6(4),find:a6(5),findIndex:a6(6),filterReject:a6(7)},c6=F0,l6=dY,u6=LY,d6=GY,h6=IY,f6=S$,p6=hY,v6=oJ,g6=p$,y6=l0,m6=i$,_6=DJ,b6=J1,R6=KY,w6=K2,G6=R2,T6=W2,k6=Y2,S6=l5,E6=FY,M6=i0,D6=e2,z6=XY,A6=d5,P6=f5,x6=J$,C6=u2,F6=uJ,I6=_J,H6=p5,O6=G5,L6=M5,X6=H5,U6=J5,B6=s6.forEach,N6=P2("hidden"),V6="Symbol",j6="prototype",K6=U6.set,W6=U6.getterFor(V6),Q6=Object[j6],q6=l6.Symbol,Z6=q6&&q6[j6],Y6=l6.TypeError,$6=l6.QObject,J6=E6.f,e4=M6.f,t4=k6.f,n4=z6.f,r4=d6([].push),i4=x6("symbols"),o4=x6("op-symbols"),a4=x6("wks"),s4=!$6||!$6[j6]||!$6[j6].findChild,c4=h6&&p6((function(){return 7!=w6(e4({},"a",{get:function(){return e4(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=J6(Q6,t);r&&delete Q6[t],e4(e,t,n),r&&e!==Q6&&e4(Q6,t,r)}:e4,l4=function(e,t){var n=i4[e]=w6(Z6);return K6(n,{type:V6,tag:e,description:t}),h6||(n.description=t),n},u4=function e(t,n,r){t===Q6&&e(o4,n,r),y6(t);var i=_6(n);return y6(r),v6(i4,i)?(r.enumerable?(v6(t,N6)&&t[N6][i]&&(t[N6][i]=!1),r=w6(r,{enumerable:R6(0,!1)})):(v6(t,N6)||e4(t,N6,R6(1,{})),t[N6][i]=!0),c4(t,i,r)):e4(t,i,r)},d4=function(e,t){var n;y6(e);var r=m6(t),i=Xm(n=G6(r)).call(n,v4(r));return B6(i,(function(t){h6&&!u6(h4,r,t)||u4(e,t,r[t])})),e},h4=function(e){var t=_6(e),n=u6(n4,this,t);return!(this===Q6&&v6(i4,t)&&!v6(o4,t))&&(!(n||!v6(this,t)||!v6(i4,t)||v6(this,N6)&&this[N6][t])||n)},f4=function(e,t){var n=m6(e),r=_6(t);if(n!==Q6||!v6(i4,r)||v6(o4,r)){var i=J6(n,r);return!i||!v6(i4,r)||v6(n,N6)&&n[N6][r]||(i.enumerable=!0),i}},p4=function(e){var t=t4(m6(e)),n=[];return B6(t,(function(e){v6(i4,e)||v6(C6,e)||r4(n,e)})),n},v4=function(e){var t=e===Q6,n=t4(t?o4:m6(e)),r=[];return B6(n,(function(e){!v6(i4,e)||t&&!v6(Q6,e)||r4(r,i4[e])})),r};f6||(A6(Z6=(q6=function(){if(g6(Z6,this))throw Y6("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?b6(arguments[0]):void 0,t=F6(e);return h6&&s4&&c4(Q6,t,{configurable:!0,set:function e(n){this===Q6&&u6(e,o4,n),v6(this,N6)&&v6(this[N6],t)&&(this[N6][t]=!1),c4(this,t,R6(1,n))}}),l4(t,e)})[j6],"toString",(function(){return W6(this).tag})),A6(q6,"withoutSetter",(function(e){return l4(F6(e),e)})),z6.f=h4,M6.f=u4,D6.f=d4,E6.f=f4,T6.f=k6.f=p4,S6.f=v4,H6.f=function(e){return l4(I6(e),e)},h6&&P6(Z6,"description",{configurable:!0,get:function(){return W6(this).description}})),c6({global:!0,constructor:!0,wrap:!0,forced:!f6,sham:!f6},{Symbol:q6}),B6(G6(a4),(function(e){O6(e)})),c6({target:V6,stat:!0,forced:!f6},{useSetter:function(){s4=!0},useSimple:function(){s4=!1}}),c6({target:"Object",stat:!0,forced:!f6,sham:!h6},{create:function(e,t){return void 0===t?w6(e):d4(w6(e),t)},defineProperty:u4,defineProperties:d4,getOwnPropertyDescriptor:f4}),c6({target:"Object",stat:!0,forced:!f6},{getOwnPropertyNames:p4}),L6(),X6(q6,V6),C6[N6]=!0;var g4=S$&&!!iZ&&!!oZ,y4=F0,m4=f$,_4=oJ,b4=J1,R4=J$,w4=g4,G4=R4("string-to-symbol-registry"),T4=R4("symbol-to-string-registry");y4({target:"Symbol",stat:!0,forced:!w4},{for:function(e){var t=b4(e);if(_4(G4,t))return G4[t];var n=m4("Symbol")(t);return G4[t]=n,T4[n]=t,n}});var k4=F0,S4=oJ,E4=P$,M4=C$,D4=g4,z4=J$("symbol-to-string-registry");k4({target:"Symbol",stat:!0,forced:!D4},{keyFor:function(e){if(!E4(e))throw TypeError(M4(e)+" is not a symbol");if(S4(z4,e))return z4[e]}});var A4=GY(QR([])),P4=H0,x4=CY,C4=EY,F4=J1,I4=GY([].push),H4=F0,O4=f$,L4=mY,X4=LY,U4=GY,B4=hY,N4=CY,V4=P$,j4=A4,K4=function(e){if(x4(e))return e;if(P4(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];"string"==typeof i?I4(n,i):"number"!=typeof i&&"Number"!=C4(i)&&"String"!=C4(i)||I4(n,F4(i))}var o=n.length,a=!0;return function(e,t){if(a)return a=!1,t;if(P4(this))return t;for(var r=0;r<o;r++)if(n[r]===e)return t}}},W4=S$,Q4=String,q4=O4("JSON","stringify"),Z4=U4(/./.exec),Y4=U4("".charAt),$4=U4("".charCodeAt),J4=U4("".replace),e3=U4(1..toString),t3=/[\uD800-\uDFFF]/g,n3=/^[\uD800-\uDBFF]$/,r3=/^[\uDC00-\uDFFF]$/,i3=!W4||B4((function(){var e=O4("Symbol")();return"[null]"!=q4([e])||"{}"!=q4({a:e})||"{}"!=q4(Object(e))})),o3=B4((function(){return'"\\udf06\\ud834"'!==q4("\udf06\ud834")||'"\\udead"'!==q4("\udead")})),a3=function(e,t){var n=j4(arguments),r=K4(t);if(N4(r)||void 0!==e&&!V4(e))return n[1]=function(e,t){if(N4(r)&&(t=X4(r,this,Q4(e),t)),!V4(t))return t},L4(q4,null,n)},s3=function(e,t,n){var r=Y4(n,t-1),i=Y4(n,t+1);return Z4(n3,e)&&!Z4(r3,i)||Z4(r3,e)&&!Z4(n3,r)?"\\u"+e3($4(e,0),16):e};q4&&H4({target:"JSON",stat:!0,arity:3,forced:i3||o3},{stringify:function(e,t,n){var r=j4(arguments),i=L4(i3?a3:q4,null,r);return o3&&"string"==typeof i?J4(i,t3,s3):i}});var c3=l5,l3=nJ;F0({target:"Object",stat:!0,forced:!S$||hY((function(){c3.f(1)}))},{getOwnPropertySymbols:function(e){var t=c3.f;return t?t(l3(e)):[]}}),G5("asyncIterator"),G5("hasInstance"),G5("isConcatSpreadable"),G5("iterator"),G5("match"),G5("matchAll"),G5("replace"),G5("search"),G5("species"),G5("split");var u3=M5;G5("toPrimitive"),u3();var d3=f$,h3=H5;G5("toStringTag"),h3(d3("Symbol"),"Symbol"),G5("unscopables"),H5(dY.JSON,"JSON",!0);var f3,p3,v3,g3=c$.Symbol,y3={},m3=IY,_3=oJ,b3=Function.prototype,R3=m3&&uG,w3=_3(b3,"name"),G3={EXISTS:w3,PROPER:w3&&"something"===function(){}.name,CONFIGURABLE:w3&&(!m3||m3&&R3(b3,"name").configurable)},T3=!hY((function(){function e(){}return e.prototype.constructor=null,yG(new e)!==e.prototype})),k3=oJ,S3=CY,E3=nJ,M3=T3,D3=P2("IE_PROTO"),z3=Object,A3=z3.prototype,P3=M3?yG:function(e){var t=E3(e);if(k3(t,D3))return t[D3];var n=t.constructor;return S3(n)&&t instanceof n?n.prototype:t instanceof z3?A3:null},x3=hY,C3=CY,F3=s$,I3=K2,H3=P3,O3=d5,L3=_J("iterator"),X3=!1;Kw([])&&("next"in(v3=Kw(iY=[]).call(iY))?(p3=H3(H3(v3)))!==Object.prototype&&(f3=p3):X3=!0);var U3=!F3(f3)||x3((function(){var e={};return f3[L3].call(e)!==e}));C3((f3=U3?{}:I3(f3))[L3])||O3(f3,L3,(function(){return this}));var B3={IteratorPrototype:f3,BUGGY_SAFARI_ITERATORS:X3},N3=B3.IteratorPrototype,V3=K2,j3=KY,K3=H5,W3=y3,Q3=function(){return this},q3=function(e,t,n,r){var i=t+" Iterator";return e.prototype=V3(N3,{next:j3(+!r,n)}),K3(e,i,!1,!0),W3[i]=Q3,e},Z3=GY,Y3=O$,$3=CY,J3=String,e7=TypeError,t7=function(e,t,n){try{return Z3(Y3(uG(e,t)[n]))}catch(r){}},n7=l0,r7=function(e){if("object"==Su(e)||$3(e))return e;throw e7("Can't set "+J3(e)+" as a prototype")},i7=gG||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=t7(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(r){}return function(n,r){return n7(n),r7(r),t?e(n,r):n.__proto__=r,n}}():void 0),o7=F0,a7=LY,s7=q3,c7=P3,l7=H5,u7=d5,d7=y3,h7=G3.PROPER,f7=B3.BUGGY_SAFARI_ITERATORS,p7=_J("iterator"),v7="keys",g7="values",y7="entries",m7=function(){return this},_7=function(e,t,n,r,i,o,a){s7(n,t,r);var s,c,l,u=function(e){if(e===i&&v)return v;if(!f7&&e in f)return f[e];switch(e){case v7:case g7:case y7:return function(){return new n(this,e)}}return function(){return new n(this)}},d=t+" Iterator",h=!1,f=e.prototype,p=f[p7]||f["@@iterator"]||i&&f[i],v=!f7&&p||u(i),g="Array"==t&&PL(f)||p;if(g&&(s=c7(g.call(new e)))!==Object.prototype&&s.next&&(l7(s,d,!0,!0),d7[d]=m7),h7&&i==g7&&p&&p.name!==g7&&(h=!0,v=function(){return a7(p,this)}),i)if(c={values:u(g7),keys:o?v:u(v7),entries:u(y7)},a)for(l in c)(f7||h||!(l in f))&&u7(f,l,c[l]);else o7({target:t,proto:!0,forced:f7||h},c);return a&&f[p7]!==v&&u7(f,p7,v,{name:i}),d7[t]=v,c},b7=function(e,t){return{value:e,done:t}},R7=i$,w7=y3,G7=J5;i0.f;var T7=_7,k7=b7,S7="Array Iterator",E7=G7.set,M7=G7.getterFor(S7);T7(Array,"Array",(function(e,t){E7(this,{type:S7,target:R7(e),index:0,kind:t})}),(function(){var e=M7(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,k7(void 0,!0)):k7("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),w7.Arguments=w7.Array;var D7={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},z7=dY,A7=s1,P7=G0,x7=y3,C7=_J("toStringTag");for(var F7 in D7){var I7=z7[F7],H7=I7&&I7.prototype;H7&&A7(H7)!==C7&&P7(H7,C7,F7),x7[F7]=x7.Array}var O7=g3,L7=_J,X7=i0.f,U7=L7("metadata"),B7=Function.prototype;void 0===B7[U7]&&X7(B7,U7,{value:null}),G5("dispose"),G5("metadata");var N7=O7;G5("asyncDispose");var V7=GY,j7=f$("Symbol"),K7=j7.keyFor,W7=V7(j7.prototype.valueOf),Q7=j7.isRegisteredSymbol||function(e){try{return void 0!==K7(W7(e))}catch(t){return!1}};F0({target:"Symbol",stat:!0},{isRegisteredSymbol:Q7});for(var q7=J$,Z7=f$,Y7=GY,$7=P$,J7=_J,e8=Z7("Symbol"),t8=e8.isWellKnownSymbol,n8=Z7("Object","getOwnPropertyNames"),r8=Y7(e8.prototype.valueOf),i8=q7("wks"),o8=0,a8=n8(e8),s8=a8.length;o8<s8;o8++)try{var c8=a8[o8];$7(e8[c8])&&J7(c8)}catch(oK){}var l8=function(e){if(t8&&t8(e))return!0;try{for(var t=r8(e),n=0,r=n8(i8),i=r.length;n<i;n++)if(i8[r[n]]==t)return!0}catch(o){}return!1};F0({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:l8}),G5("matcher"),G5("observable"),F0({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:Q7}),F0({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:l8}),G5("metadataKey"),G5("patternMatch"),G5("replaceAll");var u8=lY(N7),d8=GY,h8=B0,f8=J1,p8=t$,v8=d8("".charAt),g8=d8("".charCodeAt),y8=d8(QR("")),m8=function(e){return function(t,n){var r,i,o=f8(p8(t)),a=h8(n),s=o.length;return a<0||a>=s?e?"":void 0:(r=g8(o,a))<55296||r>56319||a+1===s||(i=g8(o,a+1))<56320||i>57343?e?v8(o,a):r:e?y8(o,a,a+2):i-56320+(r-55296<<10)+65536}},_8={codeAt:m8(!1),charAt:m8(!0)},b8=_8.charAt,R8=J1,w8=J5,G8=_7,T8=b7,k8="String Iterator",S8=w8.set,E8=w8.getterFor(k8);G8(String,"String",(function(e){S8(this,{type:k8,string:R8(e),index:0})}),(function(){var e,t=E8(this),n=t.string,r=t.index;return r>=n.length?T8(void 0,!0):(e=b8(n,r),t.index+=e.length,T8(e,!1))}));var M8=lY(p5.f("iterator"));function D8(e){return(D8="function"==typeof u8&&"symbol"==Su(M8)?function(e){return Su(e)}:function(e){return e&&"function"==typeof u8&&e.constructor===u8&&e!==u8.prototype?"symbol":Su(e)})(e)}var z8=nJ,A8=R2;F0({target:"Object",stat:!0,forced:hY((function(){A8(1)}))},{keys:function(e){return A8(z8(e))}});var P8=Kw(c$.Object),x8=lY(P8),C8=lY(c$.Object.getOwnPropertySymbols),F8=F0,I8=Ww(s6);F8({target:"Array",proto:!0,forced:!I1("filter")},{filter:function(e){return I8(this,e,arguments.length>1?arguments[1]:void 0)}});var H8=c$,O8=function(e){return H8[e+"Prototype"]},L8=Ww(O8("Array")),X8=p$,U8=L8,B8=Array.prototype,N8=function(e){var t=Ww(e);return e===B8||X8(B8,e)&&t===Ww(B8)?U8:t},V8=N8,j8=lY(V8),K8={exports:{}},W8=F0,Q8=hY,q8=i$,Z8=FY.f,Y8=IY;W8({target:"Object",stat:!0,forced:!Y8||Q8((function(){Z8(1)})),sham:!Y8},{getOwnPropertyDescriptor:function(e,t){return Z8(q8(e),t)}});var $8=c$.Object,J8=K8.exports=function(e,t){return $8.getOwnPropertyDescriptor(e,t)};$8.getOwnPropertyDescriptor.sham&&(J8.sham=!0);var e9=lY(K8.exports),t9=H0,n9=TypeError,r9=uG,i9=IY&&!function(){if(void 0!==this)return!0;try{fG([],"length",{writable:!1}).length=1}catch(oK){return oK instanceof TypeError}}(),o9=i9?function(e,t){if(t9(e)&&!r9(e,"length").writable)throw n9("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},a9=F0,s9=nJ,c9=K0,l9=o9,u9=Q0,d9=hY((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{fG([],"length",{writable:!1}).push()}catch(oK){return oK instanceof TypeError}}();a9({target:"Array",proto:!0,arity:1,forced:d9},{push:function(e){var t=s9(this),n=c9(t),r=arguments.length;u9(n+r);for(var i=0;i<r;i++)t[n]=arguments[i],n++;return l9(t,n),n}});var h9=O8("Array").push,f9=p$,p9=h9,v9=Array.prototype,g9=function(e){var t=e.push;return e===v9||f9(v9,e)&&t===v9.push?p9:t},y9=lY(g9),m9=hY,_9=function(e,t){var n=[][e];return!!n&&m9((function(){n.call(null,t||function(){return 1},1)}))},b9=s6.forEach,R9=_9("forEach")?[].forEach:function(e){return b9(this,e,arguments.length>1?arguments[1]:void 0)};F0({target:"Array",proto:!0,forced:[].forEach!=R9},{forEach:R9});var w9=O8("Array").forEach,G9=s1,T9=oJ,k9=p$,S9=w9,E9=Array.prototype,M9={DOMTokenList:!0,NodeList:!0},D9=function(e){var t=e.forEach;return e===E9||k9(E9,e)&&t===E9.forEach||T9(M9,G9(e))?S9:t},z9=D9,A9=lY(z9),P9=f$,x9=W2,C9=l5,F9=l0,I9=GY(Xm([])),H9=P9("Reflect","ownKeys")||function(e){var t=x9.f(F9(e)),n=C9.f;return n?I9(t,n(e)):t},O9=H9,L9=i$,X9=FY,U9=$0;F0({target:"Object",stat:!0,sham:!IY},{getOwnPropertyDescriptors:function(e){for(var t,n,r=L9(e),i=X9.f,o=O9(r),a={},s=0;o.length>s;)void 0!==(n=i(r,t=o[s++]))&&U9(a,t,n);return a}});var B9=lY(c$.Object.getOwnPropertyDescriptors),N9={exports:{}},V9=F0,j9=IY,K9=e2.f;V9({target:"Object",stat:!0,forced:hG!==K9,sham:!j9},{defineProperties:K9});var W9=c$.Object,Q9=N9.exports=function(e,t){return W9.defineProperties(e,t)};W9.defineProperties.sham&&(Q9.sham=!0);var q9=lY(N9.exports),Z9={exports:{}},Y9=F0,$9=IY,J9=i0.f;Y9({target:"Object",stat:!0,forced:fG!==J9,sham:!$9},{defineProperty:J9});var eee=c$.Object,tee=Z9.exports=function(e,t,n){return eee.defineProperty(e,t,n)};eee.defineProperty.sham&&(tee.sham=!0);var nee=Z9.exports,ree=lY(nee),iee=lY(p5.f("toPrimitive"));function oee(e){var t=function(e,t){if("object"!==D8(e)||null===e)return e;var n=e[iee];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==D8(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===D8(t)?t:String(t)}function aee(e,t,n){return(t=oee(t))in e?ree(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function see(e,t){var n=x8(e);if(C8){var r=C8(e);t&&(r=j8(r).call(r,(function(t){return e9(e,t).enumerable}))),y9(n).apply(n,r)}return n}function cee(e){for(var t=1;t<arguments.length;t++){var n,r,i=null!=arguments[t]?arguments[t]:{};t%2?A9(n=see(Object(i),!0)).call(n,(function(t){aee(e,t,i[t])})):B9?q9(e,B9(i)):A9(r=see(Object(i))).call(r,(function(t){ree(e,t,e9(i,t))}))}return e}F0({target:"Object",stat:!0,sham:!IY},{create:K2});var lee=c$.Object,uee=function(e,t){return lee.create(e,t)},dee=lY(uee),hee=nJ,fee=P3,pee=T3;F0({target:"Object",stat:!0,forced:hY((function(){fee(1)})),sham:!pee},{getPrototypeOf:function(e){return fee(hee(e))}});var vee=lY(c$.Object.getPrototypeOf);F0({target:"Object",stat:!0},{setPrototypeOf:i7});var gee=lY(c$.Object.setPrototypeOf),yee=oJ,mee=H9,_ee=FY,bee=i0,Ree=s$,wee=G0,Gee=Error,Tee=GY("".replace),kee=String(Gee("zxcasd").stack),See=/\n\s*at [^:]*:[^\n]*/,Eee=See.test(kee),Mee=KY,Dee=!hY((function(){var e=Error("a");return!("stack"in e)||(fG(e,"stack",Mee(1,7)),7!==e.stack)})),zee=G0,Aee=function(e,t){if(Eee&&"string"==typeof e&&!Gee.prepareStackTrace)for(;t--;)e=Tee(e,See,"");return e},Pee=Dee,xee=Error.captureStackTrace,Cee=y3,Fee=_J("iterator"),Iee=Array.prototype,Hee=function(e){return void 0!==e&&(Cee.Array===e||Iee[Fee]===e)},Oee=s1,Lee=U$,Xee=$Y,Uee=y3,Bee=_J("iterator"),Nee=function(e){if(!Xee(e))return Lee(e,Bee)||Lee(e,"@@iterator")||Uee[Oee(e)]},Vee=LY,jee=O$,Kee=l0,Wee=C$,Qee=Nee,qee=TypeError,Zee=function(e,t){var n=arguments.length<2?Qee(e):t;if(jee(n))return Kee(Vee(n,e));throw qee(Wee(e)+" is not iterable")},Yee=LY,$ee=l0,Jee=U$,ete=function(e,t,n){var r,i;$ee(e);try{if(!(r=Jee(e,"return"))){if("throw"===t)throw n;return n}r=Yee(r,e)}catch(o){i=!0,r=o}if("throw"===t)throw n;if(i)throw r;return $ee(r),n},tte=r0,nte=LY,rte=l0,ite=C$,ote=Hee,ate=K0,ste=p$,cte=Zee,lte=Nee,ute=ete,dte=TypeError,hte=function(e,t){this.stopped=e,this.result=t},fte=hte.prototype,pte=function(e,t,n){var r,i,o,a,s,c,l,u=n&&n.that,d=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),f=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),v=tte(t,u),g=function(e){return r&&ute(r,"normal",e),new hte(!0,e)},y=function(e){return d?(rte(e),p?v(e[0],e[1],g):v(e[0],e[1])):p?v(e,g):v(e)};if(h)r=e.iterator;else if(f)r=e;else{if(!(i=lte(e)))throw dte(ite(e)+" is not iterable");if(ote(i)){for(o=0,a=ate(e);a>o;o++)if((s=y(e[o]))&&ste(fte,s))return s;return new hte(!1)}r=cte(e,i)}for(c=h?e.next:r.next;!(l=nte(c,r)).done;){try{s=y(l.value)}catch(m){ute(r,"throw",m)}if("object"==Su(s)&&s&&ste(fte,s))return s}return new hte(!1)},vte=J1,gte=F0,yte=p$,mte=P3,_te=i7,bte=function(e,t,n){for(var r=mee(t),i=bee.f,o=_ee.f,a=0;a<r.length;a++){var s=r[a];yee(e,s)||n&&yee(n,s)||i(e,s,o(t,s))}},Rte=K2,wte=G0,Gte=KY,Tte=function(e,t){Ree(t)&&"cause"in t&&wee(e,"cause",t.cause)},kte=function(e,t,n,r){Pee&&(xee?xee(e,t):zee(e,"stack",Aee(n,r)))},Ste=pte,Ete=function(e,t){return void 0===e?arguments.length<2?"":t:vte(e)},Mte=_J("toStringTag"),Dte=Error,zte=[].push,Ate=function e(t,n){var r,i=yte(Pte,this);_te?r=_te(Dte(),i?mte(this):Pte):(r=i?this:Rte(Pte),wte(r,Mte,"Error")),void 0!==n&&wte(r,"message",Ete(n)),kte(r,e,r.stack,1),arguments.length>2&&Tte(r,arguments[2]);var o=[];return Ste(t,zte,{that:o}),wte(r,"errors",o),r};_te?_te(Ate,Dte):bte(Ate,Dte,{name:!0});var Pte=Ate.prototype=Rte(Dte.prototype,{constructor:Gte(1,Ate),message:Gte(1,""),name:Gte(1,"AggregateError")});gte({global:!0,constructor:!0,arity:2},{AggregateError:Ate});var xte,Cte,Fte,Ite,Hte="undefined"!=typeof process&&"process"==EY(process),Ote=f$,Lte=f5,Xte=IY,Ute=_J("species"),Bte=function(e){var t=Ote(e);Xte&&t&&!t[Ute]&&Lte(t,Ute,{configurable:!0,get:function(){return this}})},Nte=p$,Vte=TypeError,jte=function(e,t){if(Nte(t,e))return e;throw Vte("Incorrect invocation")},Kte=k1,Wte=C$,Qte=TypeError,qte=function(e){if(Kte(e))return e;throw Qte(Wte(e)+" is not a constructor")},Zte=l0,Yte=qte,$te=$Y,Jte=_J("species"),ene=function(e,t){var n,r=Zte(e).constructor;return void 0===r||$te(n=Zte(r)[Jte])?t:Yte(n)},tne=TypeError,nne=function(e,t){if(e<t)throw tne("Not enough arguments");return e},rne=/(?:ipad|iphone|ipod).*applewebkit/i.test(v$),ine=dY,one=mY,ane=r0,sne=CY,cne=oJ,lne=hY,une=D2,dne=A4,hne=xJ,fne=nne,pne=rne,vne=Hte,gne=ine.setImmediate,yne=ine.clearImmediate,mne=ine.process,_ne=ine.Dispatch,bne=ine.Function,Rne=ine.MessageChannel,wne=ine.String,Gne=0,Tne={},kne="onreadystatechange";lne((function(){xte=ine.location}));var Sne=function(e){if(cne(Tne,e)){var t=Tne[e];delete Tne[e],t()}},Ene=function(e){return function(){Sne(e)}},Mne=function(e){Sne(e.data)},Dne=function(e){ine.postMessage(wne(e),xte.protocol+"//"+xte.host)};gne&&yne||(gne=function(e){fne(arguments.length,1);var t=sne(e)?e:bne(e),n=dne(arguments,1);return Tne[++Gne]=function(){one(t,void 0,n)},Cte(Gne),Gne},yne=function(e){delete Tne[e]},vne?Cte=function(e){mne.nextTick(Ene(e))}:_ne&&_ne.now?Cte=function(e){_ne.now(Ene(e))}:Rne&&!pne?(Ite=(Fte=new Rne).port2,Fte.port1.onmessage=Mne,Cte=ane(Ite.postMessage,Ite)):ine.addEventListener&&sne(ine.postMessage)&&!ine.importScripts&&xte&&"file:"!==xte.protocol&&!lne(Dne)?(Cte=Dne,ine.addEventListener("message",Mne,!1)):Cte=kne in hne("script")?function(e){une.appendChild(hne("script"))[kne]=function(){une.removeChild(this),Sne(e)}}:function(e){setTimeout(Ene(e),0)});var zne={set:gne,clear:yne},Ane=function(){this.head=null,this.tail=null};Ane.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 Pne,xne,Cne,Fne,Ine,Hne=Ane,One=/ipad|iphone|ipod/i.test(v$)&&"undefined"!=typeof Pebble,Lne=/web0s(?!.*chrome)/i.test(v$),Xne=dY,Une=r0,Bne=FY.f,Nne=zne.set,Vne=Hne,jne=rne,Kne=One,Wne=Lne,Qne=Hte,qne=Xne.MutationObserver||Xne.WebKitMutationObserver,Zne=Xne.document,Yne=Xne.process,$ne=Xne.Promise,Jne=Bne(Xne,"queueMicrotask"),ere=Jne&&Jne.value;if(!ere){var tre=new Vne,nre=function(){var e,t;for(Qne&&(e=Yne.domain)&&e.exit();t=tre.get();)try{t()}catch(n){throw tre.head&&Pne(),n}e&&e.enter()};jne||Qne||Wne||!qne||!Zne?!Kne&&$ne&&$ne.resolve?((Fne=$ne.resolve(void 0)).constructor=$ne,Ine=Une(Fne.then,Fne),Pne=function(){Ine(nre)}):Qne?Pne=function(){Yne.nextTick(nre)}:(Nne=Une(Nne,Xne),Pne=function(){Nne(nre)}):(xne=!0,Cne=Zne.createTextNode(""),new qne(nre).observe(Cne,{characterData:!0}),Pne=function(){Cne.data=xne=!xne}),ere=function(e){tre.head||Pne(),tre.add(e)}}var rre=ere,ire=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}},ore=dY.Promise,are="object"==("undefined"==typeof Deno?"undefined":Su(Deno))&&Deno&&"object"==Su(Deno.version),sre=!are&&!Hte&&"object"==("undefined"==typeof window?"undefined":Su(window))&&"object"==("undefined"==typeof document?"undefined":Su(document)),cre=dY,lre=ore,ure=CY,dre=JJ,hre=d1,fre=_J,pre=sre,vre=are,gre=w$,yre=lre&&lre.prototype,mre=fre("species"),_re=!1,bre=ure(cre.PromiseRejectionEvent),Rre=dre("Promise",(function(){var e=hre(lre),t=e!==String(lre);if(!t&&66===gre)return!0;if(!yre.catch||!yre.finally)return!0;if(!gre||gre<51||!/native code/.test(e)){var n=new lre((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[mre]=r,!(_re=n.then((function(){}))instanceof r))return!0}return!t&&(pre||vre)&&!bre})),wre={CONSTRUCTOR:Rre,REJECTION_EVENT:bre,SUBCLASSING:_re},Gre={},Tre=O$,kre=TypeError,Sre=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw kre("Bad Promise constructor");t=e,n=r})),this.resolve=Tre(t),this.reject=Tre(n)};Gre.f=function(e){return new Sre(e)};var Ere,Mre,Dre=F0,zre=Hte,Are=dY,Pre=LY,xre=d5,Cre=H5,Fre=Bte,Ire=O$,Hre=CY,Ore=s$,Lre=jte,Xre=ene,Ure=zne.set,Bre=rre,Nre=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(n){}},Vre=ire,jre=Hne,Kre=J5,Wre=ore,Qre=Gre,qre="Promise",Zre=wre.CONSTRUCTOR,Yre=wre.REJECTION_EVENT,$re=Kre.getterFor(qre),Jre=Kre.set,eie=Wre&&Wre.prototype,tie=Wre,nie=eie,rie=Are.TypeError,iie=Are.document,oie=Are.process,aie=Qre.f,sie=aie,cie=!!(iie&&iie.createEvent&&Are.dispatchEvent),lie="unhandledrejection",uie=function(e){var t;return!(!Ore(e)||!Hre(t=e.then))&&t},die=function(e,t){var n,r,i,o=t.value,a=1==t.state,s=a?e.ok:e.fail,c=e.resolve,l=e.reject,u=e.domain;try{s?(a||(2===t.rejection&&gie(t),t.rejection=1),!0===s?n=o:(u&&u.enter(),n=s(o),u&&(u.exit(),i=!0)),n===e.promise?l(rie("Promise-chain cycle")):(r=uie(n))?Pre(r,n,c,l):c(n)):l(o)}catch(d){u&&!i&&u.exit(),l(d)}},hie=function(e,t){e.notified||(e.notified=!0,Bre((function(){for(var n,r=e.reactions;n=r.get();)die(n,e);e.notified=!1,t&&!e.rejection&&pie(e)})))},fie=function(e,t,n){var r,i;cie?((r=iie.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),Are.dispatchEvent(r)):r={promise:t,reason:n},!Yre&&(i=Are["on"+e])?i(r):e===lie&&Nre("Unhandled promise rejection",n)},pie=function(e){Pre(Ure,Are,(function(){var t,n=e.facade,r=e.value;if(vie(e)&&(t=Vre((function(){zre?oie.emit("unhandledRejection",r,n):fie(lie,n,r)})),e.rejection=zre||vie(e)?2:1,t.error))throw t.value}))},vie=function(e){return 1!==e.rejection&&!e.parent},gie=function(e){Pre(Ure,Are,(function(){var t=e.facade;zre?oie.emit("rejectionHandled",t):fie("rejectionhandled",t,e.value)}))},yie=function(e,t,n){return function(r){e(t,r,n)}},mie=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,hie(e,!0))},_ie=function e(t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===n)throw rie("Promise can't be resolved itself");var i=uie(n);i?Bre((function(){var r={done:!1};try{Pre(i,n,yie(e,r,t),yie(mie,r,t))}catch(o){mie(r,o,t)}})):(t.value=n,t.state=1,hie(t,!1))}catch(o){mie({done:!1},o,t)}}};Zre&&(nie=(tie=function(e){Lre(this,nie),Ire(e),Pre(Ere,this);var t=$re(this);try{e(yie(_ie,t),yie(mie,t))}catch(n){mie(t,n)}}).prototype,(Ere=function(e){Jre(this,{type:qre,done:!1,notified:!1,parent:!1,reactions:new jre,rejection:!1,state:0,value:void 0})}).prototype=xre(nie,"then",(function(e,t){var n=$re(this),r=aie(Xre(this,tie));return n.parent=!0,r.ok=!Hre(e)||e,r.fail=Hre(t)&&t,r.domain=zre?oie.domain:void 0,0==n.state?n.reactions.add(r):Bre((function(){die(r,n)})),r.promise})),Mre=function(){var e=new Ere,t=$re(e);this.promise=e,this.resolve=yie(_ie,t),this.reject=yie(mie,t)},Qre.f=aie=function(e){return e===tie||undefined===e?new Mre(e):sie(e)}),Dre({global:!0,constructor:!0,wrap:!0,forced:Zre},{Promise:tie}),Cre(tie,qre,!1,!0),Fre(qre);var bie=_J("iterator"),Rie=!1;try{var wie=0,Gie={next:function(){return{done:!!wie++}},return:function(){Rie=!0}};Gie[bie]=function(){return this},rT(Gie,(function(){throw 2}))}catch(oK){}var Tie=function(e,t){if(!t&&!Rie)return!1;var n=!1;try{var r={};r[bie]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(i){}return n},kie=ore,Sie=wre.CONSTRUCTOR||!Tie((function(e){kie.all(e).then(void 0,(function(){}))})),Eie=LY,Mie=O$,Die=Gre,zie=ire,Aie=pte;F0({target:"Promise",stat:!0,forced:Sie},{all:function(e){var t=this,n=Die.f(t),r=n.resolve,i=n.reject,o=zie((function(){var n=Mie(t.resolve),o=[],a=0,s=1;Aie(e,(function(e){var c=a++,l=!1;s++,Eie(n,t,e).then((function(e){l||(l=!0,o[c]=e,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise}});var Pie=F0,xie=wre.CONSTRUCTOR;ore&&ore.prototype,Pie({target:"Promise",proto:!0,forced:xie,real:!0},{catch:function(e){return this.then(void 0,e)}});var Cie=LY,Fie=O$,Iie=Gre,Hie=ire,Oie=pte;F0({target:"Promise",stat:!0,forced:Sie},{race:function(e){var t=this,n=Iie.f(t),r=n.reject,i=Hie((function(){var i=Fie(t.resolve);Oie(e,(function(e){Cie(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var Lie=LY,Xie=Gre;F0({target:"Promise",stat:!0,forced:wre.CONSTRUCTOR},{reject:function(e){var t=Xie.f(this);return Lie(t.reject,void 0,e),t.promise}});var Uie=l0,Bie=s$,Nie=Gre,Vie=function(e,t){if(Uie(e),Bie(t)&&t.constructor===e)return t;var n=Nie.f(e);return(0,n.resolve)(t),n.promise},jie=F0,Kie=ore,Wie=wre.CONSTRUCTOR,Qie=Vie,qie=f$("Promise"),Zie=!Wie;jie({target:"Promise",stat:!0,forced:true},{resolve:function(e){return Qie(Zie&&this===qie?Kie:this,e)}});var Yie=LY,$ie=O$,Jie=Gre,eoe=ire,toe=pte;F0({target:"Promise",stat:!0,forced:Sie},{allSettled:function(e){var t=this,n=Jie.f(t),r=n.resolve,i=n.reject,o=eoe((function(){var n=$ie(t.resolve),i=[],o=0,a=1;toe(e,(function(e){var s=o++,c=!1;a++,Yie(n,t,e).then((function(e){c||(c=!0,i[s]={status:"fulfilled",value:e},--a||r(i))}),(function(e){c||(c=!0,i[s]={status:"rejected",reason:e},--a||r(i))}))})),--a||r(i)}));return o.error&&i(o.value),n.promise}});var noe=LY,roe=O$,ioe=f$,ooe=Gre,aoe=ire,soe=pte,coe="No one promise resolved";F0({target:"Promise",stat:!0,forced:Sie},{any:function(e){var t=this,n=ioe("AggregateError"),r=ooe.f(t),i=r.resolve,o=r.reject,a=aoe((function(){var r=roe(t.resolve),a=[],s=0,c=1,l=!1;soe(e,(function(e){var u=s++,d=!1;c++,noe(r,t,e).then((function(e){d||l||(l=!0,i(e))}),(function(e){d||l||(d=!0,a[u]=e,--c||o(new n(a,coe)))}))})),--c||o(new n(a,coe))}));return a.error&&o(a.value),r.promise}});var loe=F0,uoe=ore,doe=hY,hoe=f$,foe=CY,poe=ene,voe=Vie,goe=uoe&&uoe.prototype;loe({target:"Promise",proto:!0,real:!0,forced:!!uoe&&doe((function(){goe.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=poe(this,hoe("Promise")),n=foe(e);return this.then(n?function(n){return voe(t,e()).then((function(){return n}))}:e,n?function(n){return voe(t,e()).then((function(){throw n}))}:e)}});var yoe=c$.Promise,moe=Gre;F0({target:"Promise",stat:!0,forced:!0},{withResolvers:function(){var e=moe.f(this);return{promise:e.promise,resolve:e.resolve,reject:e.reject}}});var _oe=Gre,boe=ire;F0({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=_oe.f(this),n=boe(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}});var Roe=yoe,woe=lY(Roe),Goe=F0,Toe=H0,koe=GY(WF([])),Soe=[1,2];Goe({target:"Array",proto:!0,forced:String(Soe)===String(WF(Soe).call(Soe))},{reverse:function(){return Toe(this)&&(this.length=this.length),koe(this)}});var Eoe=WF(O8("Array")),Moe=p$,Doe=Eoe,zoe=Array.prototype,Aoe=function(e){var t=WF(e);return e===zoe||Moe(zoe,e)&&t===WF(zoe)?Doe:t},Poe=Aoe,xoe=lY(Poe),Coe=F0,Foe=H0,Ioe=k1,Hoe=s$,Ooe=i2,Loe=K0,Xoe=i$,Uoe=$0,Boe=_J,Noe=A4,Voe=I1("slice"),joe=Boe("species"),Koe=Array,Woe=Math.max;Coe({target:"Array",proto:!0,forced:!Voe},{slice:function(e,t){var n,r,i,o=Xoe(this),a=Loe(o),s=Ooe(e,a),c=Ooe(void 0===t?a:t,a);if(Foe(o)&&(n=o.constructor,(Ioe(n)&&(n===Koe||Foe(n.prototype))||Hoe(n)&&null===(n=n[joe]))&&(n=void 0),n===Koe||void 0===n))return Noe(o,s,c);for(r=new(void 0===n?Koe:n)(Woe(c-s,0)),i=0;s<c;s++,i++)s in o&&Uoe(r,i,o[s]);return r.length=i,r}});var Qoe=QR(O8("Array")),qoe=p$,Zoe=Qoe,Yoe=Array.prototype,$oe=function(e){var t=QR(e);return e===Yoe||qoe(Yoe,e)&&t===QR(Yoe)?Zoe:t},Joe=$oe,eae=lY(Joe);function tae(){tae=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=ree||function(e,t,n){e[t]=n.value},i="function"==typeof u8?u8:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,n){return ree(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(E){c=function(e,t,n){return e[t]=n}}function l(e,t,n,i){var o=t&&t.prototype instanceof h?t:h,a=dee(o.prototype),s=new T(i||[]);return r(a,"_invoke",{value:b(e,n,s)}),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(r){return{type:"throw",arg:r}}}e.wrap=l;var d={};function h(){}function f(){}function p(){}var v={};c(v,o,(function(){return this}));var g=vee&&vee(vee(k([])));g&&g!==t&&n.call(g,o)&&(v=g);var y=p.prototype=h.prototype=dee(v);function m(e){var t;A9(t=["next","throw","return"]).call(t,(function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function i(r,o,a,s){var c=u(e[r],e,o);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==D8(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(d).then((function(e){l.value=e,a(l)}),(function(e){return i("throw",e,a,s)}))}s(c.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function b(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=R(a,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function R(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,R(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=u(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,d;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function w(e){var t,n={tryLoc:e[0]};1 in e&&(n.catchLoc=e[1]),2 in e&&(n.finallyLoc=e[2],n.afterLoc=e[3]),y9(t=this.tryEntries).call(t,n)}function G(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],A9(e).call(e,w,this),this.reset(!0)}function k(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 r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=p,r(y,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:f,configurable:!0}),f.displayName=c(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 gee?gee(e,p):(e.__proto__=p,c(e,s,"GeneratorFunction")),e.prototype=dee(y),e},e.awrap=function(e){return{__await:e}},m(_.prototype),c(_.prototype,a,(function(){return this})),e.AsyncIterator=_,e.async=function(t,n,r,i,o){void 0===o&&(o=woe);var a=new _(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},m(y),c(y,s,"Generator"),c(y,o,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)y9(n).call(n,r);return xoe(n).call(n),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=k,T.prototype={constructor:T,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,A9(t=this.tryEntries).call(t,G),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+eae(r).call(r,1))&&(this[r]=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 r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):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),d},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),G(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;G(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function nae(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void n(l)}s.done?t(c):woe.resolve(c).then(r,i)}function rae(e){return function(){var t=this,n=arguments;return new woe((function(r,i){var o=e.apply(t,n);function a(e){nae(o,r,i,a,s,"next",e)}function s(e){nae(o,r,i,a,s,"throw",e)}a(void 0)}))}}function iae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oae(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),ree(e,oee(r.key),r)}}function aae(e,t,n){return t&&oae(e.prototype,t),n&&oae(e,n),ree(e,"prototype",{writable:!1}),e}var sae=lY(Roe),cae=lY(z9),lae=lY(P8),uae=c$,dae=mY;uae.JSON||(uae.JSON={stringify:Jx});var hae=function(e,t,n){return dae(uae.JSON.stringify,null,arguments)},fae=lY(hae),pae=IY,vae=LY,gae=hY,yae=R2,mae=l5,_ae=XY,bae=nJ,Rae=YY,wae=cG,Gae=fG,Tae=GY(Xm([])),kae=!wae||gae((function(){if(pae&&1!==wae({b:1},wae(Gae({},"a",{enumerable:!0,get:function(){Gae(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=pG(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=wae({},e)[n]||yae(wae({},t)).join("")!=r}))?function(e,t){for(var n=bae(e),r=arguments.length,i=1,o=mae.f,a=_ae.f;r>i;)for(var s,c=Rae(arguments[i++]),l=o?Tae(yae(c),o(c)):yae(c),u=l.length,d=0;u>d;)s=l[d++],pae&&!vae(a,c,s)||(n[s]=c[s]);return n}:wae;F0({target:"Object",stat:!0,arity:2,forced:cG!==kae},{assign:kae});var Sae=lY(c$.Object.assign),Eae=Xm(O8("Array")),Mae=p$,Dae=Eae,zae=Array.prototype,Aae=function(e){var t=Xm(e);return e===zae||Mae(zae,e)&&t===Xm(zae)?Dae:t},Pae=lY(Aae),xae=lY(V8),Cae=F0,Fae=VR(s6);Cae({target:"Array",proto:!0,forced:!I1("map")},{map:function(e){return Fae(this,e,arguments.length>1?arguments[1]:void 0)}});var Iae=VR(O8("Array")),Hae=p$,Oae=Iae,Lae=Array.prototype,Xae=function(e){var t=VR(e);return e===Lae||Hae(Lae,e)&&t===VR(Lae)?Oae:t},Uae=lY(Xae),Bae=F0,Nae=OC(l2);Bae({target:"Array",proto:!0,forced:hY((function(){var e;return!OC(e=Array(1)).call(e)}))},{includes:function(e){return Nae(this,e,arguments.length>1?arguments[1]:void 0)}});var Vae=OC(O8("Array")),jae=s$,Kae=EY,Wae=_J("match"),Qae=function(e){var t;return jae(e)&&(void 0!==(t=e[Wae])?!!t:"RegExp"==Kae(e))},qae=TypeError,Zae=_J("match"),Yae=F0,$ae=function(e){if(Qae(e))throw qae("The method doesn't accept regular expressions");return e},Jae=t$,ese=J1,tse=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[Zae]=!1,"/./"[e](t)}catch(r){}}return!1},nse=GY(KR(""));Yae({target:"String",proto:!0,forced:!tse("includes")},{includes:function(e){return!!~nse(ese(Jae(this)),ese($ae(e)),arguments.length>1?arguments[1]:void 0)}});var rse=OC(O8("String")),ise=p$,ose=Vae,ase=rse,sse=Array.prototype,cse=String.prototype,lse=function(e){var t=OC(e);return e===sse||ise(sse,e)&&t===OC(sse)?ose:"string"==typeof e||e===cse||ise(cse,e)&&t===OC(cse)?ase:t},use=lY(lse);function dse(e){return function(t){var n;return null==t?void 0:use(n=t.split("?")[0].toLowerCase()).call(n,e)}}var hse=dse(".m3u8"),fse=dse(".mp4"),pse=dse(".flv"),vse=dse(".sdp"),gse=dse(".mpd");function yse(e,t){try{"object"===("undefined"==typeof window?"undefined":D8(window))&&window.localStorage&&window.localStorage.setItem(e,t)}catch(n){}}function mse(e){try{return"object"===("undefined"==typeof window?"undefined":D8(window))&&window.localStorage?window.localStorage.getItem(e):null}catch(t){return null}}function _se(e){return e.replace(/[A-Z]/g,(function(e){return"_".concat(e.toLowerCase())}))}function bse(e){if(!e||"[object Object]"!==Object.prototype.toString.call(e))return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[_se(n)]=e[n]);return t}hZ({__proto__:null,camelToSnake:_se,convertToSnakeCase:bse,getLocalStorage:mse,getStreamType:function(e){return hse(e)?"hls":pse(e)?"flv":vse(e)?"rtm":fse(e)?"mp4":gse(e)?"dash":"unknown"},isDash:gse,isFlv:pse,isHls:hse,isMp4:fse,isRtm:vse,removeLocalStorage:function(e){try{return"object"===("undefined"==typeof window?"undefined":D8(window))&&window.localStorage?window.localStorage.removeItem(e):null}catch(t){return null}},setLocalStorage:yse});var Rse=F0,wse=Date,Gse=GY(wse.prototype.getTime);Rse({target:"Date",stat:!0},{now:function(){return Gse(new wse)}});var Tse=lY(c$.Date.now),kse=function(e){return e.VOD="VOD",e.LIVE="LIVE",e}(kse||{}),Sse=function(e){return e.CN="cn",e.SG="sg",e.US="us",e}(Sse||{}),Ese=function(e){return e.MP4="mp4",e.DASH="dash",e}(Ese||{}),Mse=function(e){return e.h265="h265",e.adaptRange="adaptRange",e.preload="preload",e}(Mse||{}),Dse={info:3,warn:2,error:1},zse=function(){function e(t,n){var r=this;iae(this,e),aee(this,"logger",void 0),aee(this,"level",void 0),aee(this,"customLogger",void 0),this.level=null==n?void 0:n.level,this.customLogger=null==n?void 0:n.logger,this.logger=function(e,n){var i,o,a,s;try{s="1.1.0-rc.0"}catch(G){s="--"}for(var c,l,u,d,h,f,p,v,g,y,m,_=Pae(i=Pae(o="[".concat(t,"][")).call(o,s,"][")).call(i,n,"]"),b=arguments.length,R=new Array(b>2?b-2:0),w=2;w<b;w++)R[w-2]=arguments[w];if(r.customLogger)return"info"===e?r.customLogger.info?(d=r.customLogger).info.apply(d,Pae(h=[_]).call(h,R)):null===(f=(p=r.customLogger).log)||void 0===f?void 0:f.call.apply(f,Pae(v=[p,_]).call(v,R)):null===(c=(l=r.customLogger)[e])||void 0===c?void 0:c.call.apply(c,Pae(u=[l,_]).call(u,R));((null!==(a=r.level)&&void 0!==a?a:1)>=Dse[e]||"undefined"!=typeof window&&r._checkOpenLog())&&(null===(g=window.console)||void 0===g||null===(y=g[e])||void 0===y||y.call.apply(y,Pae(m=[g,_]).call(m,R)))}}return aae(e,[{key:"update",value:function(e){var t=e||{},n=t.logger,r=t.level;this.updateLevel(r),this.updateLogger(n)}},{key:"info",value:function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.logger.apply(this,Pae(t=["info",e]).call(t,r))}},{key:"warn",value:function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.logger.apply(this,Pae(t=["warn",e]).call(t,r))}},{key:"error",value:function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.logger.apply(this,Pae(t=["error",e]).call(t,r))}},{key:"updateLevel",value:function(e){void 0!==D8(e)&&(this.level=e)}},{key:"updateLogger",value:function(e){e&&(this.customLogger=e)}},{key:"_checkOpenLog",value:function(){try{return!!window.localStorage.getItem("VESTRATEGY_LOG")}catch(e){return!1}}}]),e}(),Ase="VESTRATEGY_DEVICE_INFO",Pse="VESTRATEGY_DEVICE_INFO_LIVE",xse="STRATEGY_SERVICE_CONFIG",Cse="STRATEGY_SERVICE_CONFIG_LIVE",Fse=new zse("VeStrategy"),Ise=function(){function e(t,n){iae(this,e),aee(this,"initStrategyConfig",void 0),aee(this,"serviceStrategyConfigLoader",void 0),aee(this,"serviceStrategyConfig",void 0),aee(this,"appConfig",void 0),aee(this,"videoType",void 0),this.videoType=t.type||kse.VOD,this.initStrategyConfig=t.strategies,this.appConfig=t,this.serviceStrategyConfigLoader=n,Fse.update(t.log)}var t;return aae(e,[{key:"getInitStrategyConfig",value:function(){return this.initStrategyConfig}},{key:"getServiceStrategyConfig",value:function(){if(this.serviceStrategyConfig)return this.serviceStrategyConfig;try{var e=mse(kse.LIVE===this.videoType?Cse:xse);e&&(this.serviceStrategyConfig=JSON.parse(e))}catch(t){}return this.serviceStrategyConfig}},{key:"fetchStrategyConfig",value:(t=rae(tae().mark((function e(){var t;return tae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.needFetchStrategyConfig()){e.next=3;break}return Fse.info("UseLocalStrategyConfig"),e.abrupt("return");case 3:if(e.prev=3,!this.serviceStrategyConfigLoader){e.next=8;break}return e.next=7,this.serviceStrategyConfigLoader.fetch();case 7:t=e.sent;case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(3),Fse.warn("FetchStrategyConfigError",fae({message:null===e.t0||void 0===e.t0?void 0:e.t0.message,name:null===e.t0||void 0===e.t0?void 0:e.t0.name}));case 13:yse(kse.LIVE===this.videoType?Cse:xse,fae(t)),Fse.info("ServiceStrategyConfig",t),this.serviceStrategyConfig=t||void 0;case 16:case"end":return e.stop()}}),e,this,[[3,10]])}))),function(){return t.apply(this,arguments)})},{key:"updateStrategyConfig",value:function(){}},{key:"getStrategyConfig",value:function(){}},{key:"getStrategyConfigByName",value:function(){}},{key:"getAppConfig",value:function(){return this.appConfig}},{key:"needFetchStrategyConfig",value:function(){var e;return this.getServiceStrategyConfig(),!this.serviceStrategyConfig||!this.serviceStrategyConfig.use_local_cache||!!(this.serviceStrategyConfig.local_cache_expired_at&&Tse()>this.serviceStrategyConfig.local_cache_expired_at)||this.serviceStrategyConfig.cache_key!==(null===(e=this.serviceStrategyConfigLoader)||void 0===e?void 0:e.getCacheKey())}}]),e}(),Hse=GY,Ose=O$,Lse=s$,Xse=oJ,Use=A4,Bse=fY,Nse=Function,Vse=Hse(Xm([])),jse=Hse([].join),Kse={},Wse=Bse?Nse.bind:function(e){var t=Ose(this),n=t.prototype,r=Use(arguments,1),i=function n(){var i=Vse(r,Use(arguments));return this instanceof n?function(e,t,n){if(!Xse(Kse,t)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";Kse[t]=Nse("C,a","return new C("+jse(r,",")+")")}return Kse[t](e,n)}(t,i.length,i):t.apply(e,i)};return Lse(n)&&(i.prototype=n),i},Qse=Wse;F0({target:"Function",proto:!0,forced:Function.bind!==Qse},{bind:Qse});var qse=O8("Function").bind,Zse=p$,Yse=qse,$se=Function.prototype,Jse=function(e){var t=e.bind;return e===$se||Zse($se,e)&&t===$se.bind?Yse:t},ece=lY(Jse);function tce(e,t){var n;return(tce=gee?ece(n=gee).call(n):function(e,t){return e.__proto__=t,e})(e,t)}function nce(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=dee(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),ree(e,"prototype",{writable:!1}),t&&tce(e,t)}var rce=F0,ice=mY,oce=Wse,ace=qte,sce=l0,cce=s$,lce=K2,uce=hY,dce=f$("Reflect","construct"),hce=Object.prototype,fce=[].push,pce=uce((function(){function e(){}return!(dce((function(){}),[],e)instanceof e)})),vce=!uce((function(){dce((function(){}))})),gce=pce||vce;rce({target:"Reflect",stat:!0,forced:gce,sham:gce},{construct:function(e,t){ace(e),sce(t);var n=arguments.length<3?e:ace(arguments[2]);if(vce&&!pce)return dce(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 r=[null];return ice(fce,r,t),new(ice(oce,e,r))}var i=n.prototype,o=lce(cce(i)?i:hce),a=ice(e,o,t);return cce(a)?a:o}});var yce=lY(c$.Reflect.construct);function mce(e){var t;return(mce=gee?ece(t=vee).call(t):function(e){return e.__proto__||vee(e)})(e)}function _ce(){if("undefined"==typeof Reflect||!yce)return!1;if(yce.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(yce(Boolean,[],(function(){}))),!0}catch(oK){return!1}}function bce(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rce(e){var t=_ce();return function(){var n,r=mce(e);if(t){var i=mce(this).constructor;n=yce(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===D8(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return bce(e)}(this,n)}}var wce=lY(nee),Gce=wce,Tce=function(e,t,n){return function(e,t,n){t in e?Gce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==D8(t)?t+"":t,n),n},kce=function(){function e(t){iae(this,e),Tce(this,"options"),Tce(this,"scores"),this.options=t,this.scores=[],this._init()}return aae(e,[{key:"_init",value:function(){var e,t=this;cae(e=lae(this.options.plugins)).call(e,(function(e){var n=t.options.plugins[e];n.ignore||(n.cls&&(n.instance=new n.cls(n)),n.instance&&t.scores.push(new sae((function(t){n.instance.getScore().then((function(r){t({key:e,factor:n.factor,val:r})}))}))))}))}},{key:"getScore",value:function(){var e=this;return new sae((function(t){sae.all(e.scores).then((function(e){var n={},r=0,i=0;cae(e).call(e,(function(e){var t=e.factor;e.val.score>0&&(i+=t)})),i=0===i?1:i;for(var o=0;o<e.length;o++){var a=e[o];r+=a.factor/i*a.val.score,n[a.key]=a.val}n.score=r,t(n)})).catch(console.log)}))}}]),e}(),Sce=function(e){nce(n,kce);var t=Rce(n);function n(e){return iae(this,n),t.call(this,e)}return aae(n)}(),Ece=function(e){nce(n,kce);var t=Rce(n);function n(e){return iae(this,n),t.call(this,e)}return aae(n)}(),Mce=function(e){nce(n,kce);var t=Rce(n);function n(e){return iae(this,n),t.call(this,e)}return aae(n)}(),Dce=wce,zce=function(e,t,n){return function(e,t,n){t in e?Dce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==D8(t)?t+"":t,n),n},Ace=function(e){nce(n,kce);var t=Rce(n);function n(){var e;return iae(this,n),e=t.apply(this,arguments),zce(bce(e),"_player"),e}return aae(n,[{key:"setPlayer",value:function(e,t){var n,r,i=this;e&&(this._player=e,e.on("timeupdate",(function o(){if(e.video&&e.video.getVideoPlaybackQuality){if(r){if(Tse()-n>1e3)try{e.off("timeupdate",o);var a=e.video.getVideoPlaybackQuality();localStorage.setItem("player_".concat(t,"_fps"),a.totalVideoFrames-r+"")}catch(c){}}else if(i.bufferLength>1){var s=e.video.getVideoPlaybackQuality();r=s.totalVideoFrames,n=Tse()}}else e.off("timeupdate",o)})))}},{key:"bufferLength",get:function(){var e=this._player.getBufferedRange();if(!this._player.video)return 0;var t=this._player.video.currentTime,n=e[1]-Math.max(e[0],t);return Math.max(0,n)}}]),n}(),Pce=F0,xce=Math.log,Cce=Math.LN2;Pce({target:"Math",stat:!0},{log2:function(e){return xce(e)/Cce}});var Fce=lY(c$.Math.log2),Ice=function(){function e(){iae(this,e)}return aae(e,[{key:"getScore",value:function(){return new sae((function(e){var t=navigator.hardwareConcurrency,n=0;if(t>0){var r=Fce(t);n=r<=2?3*r:r<=3?1.6*(r-2)+6:.523*(r-3)+7.6}e({score:n,origin:t})}))}}]),e}(),Hce=new Ice,Oce=Math.log,Lce=Math.LOG10E,Xce=vZ||function(e){return Oce(e)*Lce};F0({target:"Math",stat:!0},{log10:Xce});var Uce=lY(c$.Math.log10),Bce=wce,Nce=function(e,t,n){return function(e,t,n){t in e?Bce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==D8(t)?t+"":t,n),n},Vce=function(){function e(){iae(this,e),Nce(this,"_worker"),Nce(this,"_getScoreCallback",(function(){}))}return aae(e,[{key:"getScore",value:function(){return new sae((function(e){try{var t=new Image;t.src="//lf6-cdn-tos.douyinstatic.com/obj/venus/pc-theme/spring/20230411-162827.jpeg",t.onload=function(){var n=Tse();"function"==typeof t.decode?t.decode().then((function(){var t=1e3/(Tse()-n),r=0;if(t>0){var i=Uce(t);r=i<=1?6*i:i<=2?1.6*(i-1)+6:2.4*(i-2)+7.6}e({score:r,origin:t})})):e({score:0,origin:-1})}}catch(n){e({score:0,origin:-1})}}))}}]),e}(),jce=new Vce,Kce=nJ,Wce=i2,Qce=K0,qce=function(e){for(var t=Kce(this),n=Qce(t),r=arguments.length,i=Wce(r>1?arguments[1]:void 0,n),o=r>2?arguments[2]:void 0,a=void 0===o?n:Wce(o,n);a>i;)t[i++]=e;return t};F0({target:"Array",proto:!0},{fill:qce});var Zce=QC(O8("Array")),Yce=p$,$ce=Zce,Jce=Array.prototype,ele=function(e){var t=QC(e);return e===Jce||Yce(Jce,e)&&t===QC(Jce)?$ce:t},tle=lY(ele),nle=function(){function e(){iae(this,e)}return aae(e,[{key:"_getOrigin",value:function(){var e=new Uint8Array(3686400);tle(e).call(e,8);var t=performance.now();return 1e3/(performance.now()-t)}},{key:"getScore",value:function(){var e=this;return new sae((function(t){t({score:0,origin:e._getOrigin()})}))}}]),e}(),rle=new nle,ile=function(){function e(){iae(this,e)}return aae(e,[{key:"getScore",value:function(){return new sae((function(e){e({score:0,origin:navigator.deviceMemory})}))}}]),e}(),ole=new ile,ale=function(){function e(){iae(this,e)}return aae(e,[{key:"getScore",value:function(){return new sae((function(e){var t,n=null==(t=null==navigator?void 0:navigator.connection)?void 0:t.downlink,r=0;n>0&&n<1e6&&(r=n<1?60*n:n<5?.4*(n-1)+6.01:.02*(n-5)+7.61),e({score:r,origin:n})}))}}]),e}(),sle=new ale,cle=O$,lle=nJ,ule=YY,dle=K0,hle=TypeError,fle=function(e){return function(t,n,r,i){cle(n);var o=lle(t),a=ule(o),s=dle(o),c=e?s-1:0,l=e?-1:1;if(r<2)for(;;){if(c in a){i=a[c],c+=l;break}if(c+=l,e?c<0:s<=c)throw hle("Reduce of empty array with no initial value")}for(;e?c>=0:s>c;c+=l)c in a&&(i=n(i,a[c],c,o));return i}},ple={left:fle(!1),right:fle(!0)}.left;F0({target:"Array",proto:!0,forced:!Hte&&w$>79&&w$<83||!_9("reduce")},{reduce:function(e){var t=arguments.length;return ple(this,e,t,t>1?arguments[1]:void 0)}});var vle=RF(O8("Array")),gle=p$,yle=vle,mle=Array.prototype,_le=function(e){var t=RF(e);return e===mle||gle(mle,e)&&t===RF(mle)?yle:t},ble=lY(_le),Rle=function(){function e(){iae(this,e)}return aae(e,[{key:"_getBandwidth",value:function(){var e;if(!performance.getEntries)return-1;var t=xae(e=performance.getEntries()).call(e,(function(e){var t=e.initiatorType,n=e.decodedBodySize;return"img"===t&&n>0})),n=ble(t).call(t,(function(e,t){return e+1e3*t.decodedBodySize/(t.responseEnd-t.responseStart)}),0);return t.length?n/t.length/1024:0}},{key:"getScore",value:function(){var e=this;return new sae((function(t,n){try{var r=e._getBandwidth(),i=0;r>0&&r<1e6&&(i=r<1?60*performance_speed:r<5?.4*(performance_speed-1)+6.01:.02*(performance_speed-5)+7.61),t({score:i,origin:r})}catch(o){t({score:0,origin:-1})}}))}}]),e}(),wle=new Rle,Gle=function(e){return e.H264="h264",e.H265="h265",e}(Gle||{}),Tle=wce,kle=function(e,t,n){return function(e,t,n){t in e?Tle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==D8(t)?t+"":t,n),n},Sle=function(){function e(t){iae(this,e),kle(this,"_origin"),kle(this,"_codec"),this._codec=t}return aae(e,[{key:"_getOrigin",value:function(){try{var e=localStorage.getItem("player_".concat(this._codec,"_fps"))||-1;return Number(e)}catch(t){return-1}}},{key:"getScore",value:function(){var e=this;return new sae((function(t){var n=e._origin||e._getOrigin(),r=0;n>0&&n<=120&&(r=n<=30?.2*n:n<=60?.0533*(n-30)+6:.04*(n-60)+7.6),t({score:r,origin:n})}))}}]),e}(),Ele={plugins:{cpu:{cls:Sce,factor:8,plugins:{cpu_core_number:{factor:4,instance:Hce},decodeImg:{factor:3,instance:jce}}},memory:{cls:Ece,factor:0,plugins:{copy:{factor:5,instance:rle},usage:{factor:5,instance:ole}}},net:{cls:Mce,factor:9,plugins:{downlink:{factor:5,instance:sle},performance:{factor:4,instance:wle}}},render:{cls:Ace,factor:0,plugins:{avc:{factor:5,instance:new(function(e){nce(n,Sle);var t=Rce(n);function n(e){return iae(this,n),t.call(this,e)}return aae(n)}())(Gle.H264)},hevc:{factor:5,instance:new(function(e){nce(n,Sle);var t=Rce(n);function n(e){return iae(this,n),t.call(this,e)}return aae(n)}())(Gle.H265)}}}}},Mle=function(e){nce(n,kce);var t=Rce(n);function n(e){return iae(this,n),t.call(this,Sae({},Ele,e))}return aae(n,[{key:"setPlayer",value:function(e,t){var n,r;(null==(n=this.options.plugins.render)?void 0:n.instance)&&(null==(r=this.options.plugins.render)||r.instance.setPlayer(e,t))}}]),n}(),Dle="\t\n\v\f\r                 \u2028\u2029\ufeff",zle=t$,Ale=J1,Ple=Dle,xle=GY("".replace),Cle=RegExp("^["+Ple+"]+"),Fle=RegExp("(^|[^"+Ple+"])["+Ple+"]+$"),Ile=function(e){return function(t){var n=Ale(zle(t));return 1&e&&(n=xle(n,Cle,"")),2&e&&(n=xle(n,Fle,"$1")),n}},Hle={start:Ile(1),end:Ile(2),trim:Ile(3)},Ole=G3.PROPER,Lle=hY,Xle=Dle,Ule=F0,Ble=dk(Hle),Nle=function(e){return Lle((function(){return!!Xle[e]()||"​…᠎"!=="​…᠎"[e]()||Ole&&Xle[e].name!==e}))};Ule({target:"String",proto:!0,forced:Nle("trim")},{trim:function(){return Ble(this)}});var Vle=dk(O8("String")),jle=p$,Kle=Vle,Wle=String.prototype,Qle=function(e){var t=dk(e);return"string"==typeof e||e===Wle||jle(Wle,e)&&t===dk(Wle)?Kle:t},qle=lY(Qle),Zle=/ANGLE\s+\((?:[^,]+,\s+)?([^,/]+)?(?:[^,]*)(?:[,\s]+)(Direct\S+|OpenGL[\d.\s]+)/,Yle=/ANGLE\s+\((?:[^,]+,\s+)?([^,]+)?(?:[,\s]+)(Direct\S+|OpenGL[\d.\s]+)/,$le="OpenGL Engine",Jle="Unknow",eue=4318,tue=32902,nue=4098,rue=function(e){return e.CpuDeriver="CpuDeriver",e.Intel="Intel",e.Nvidia="NVIDIA",e.Amd="AMD",e.Apple="Apple",e[e.Unknow=Jle]="Unknow",e}(rue||{});function iue(e){return"NVIDIA"===e?eue:"AMD"===e?nue:"Intel"===e?tue:0}function oue(e){var t,n,r,i,o=function(e){var t=/(SwiftShader|Intel|NVIDIA|AMD|Radeon|Apple)/.exec(e);return t?"Radeon"===t[0]?"AMD":"SwiftShader"===t[0]?"CpuDeriver":t[0]:rue.Unknow}(e);return o===rue.Unknow||"CpuDeriver"===o?{vendor:o,vendorId:0,model:Jle,backupModel:Jle,api:Jle}:/^ANGLE/.test(e)?function(e,t){var n,r,i,o,a,s=Jle,c=Jle,l=Jle;return"Intel"!==e&&"NVIDIA"!==e||(n=Zle.exec(t)),"AMD"!==e&&"Apple"!==e||(n=Yle.exec(t)),(null==n?void 0:n[1])&&(null==n?void 0:n[2])&&(s=qle(r=n[1].replace(/(AMD|NVIDIA)/,"")).call(r),l=qle(i=n[2]).call(i)),c="Intel"===e?s=qle(o=s.split($le)[0]).call(o):qle(a=s.split($le)[0]).call(a),{vendor:e,vendorId:iue(e),model:s,backupModel:c,api:l}}(o,e):"Intel"===o?{vendor:o,vendorId:iue(o),model:qle(r=e.split($le)[0]).call(r),backupModel:qle(i=e.split($le)[0]).call(i),api:Jle}:{vendor:o,vendorId:iue(o),model:qle(t=e.replace(/(AMD|NVIDIA)/,"")).call(t),backupModel:qle(n=e.split($le)[0].replace(/(AMD|NVIDIA)/,"")).call(n),api:Jle}}var aue=dY,sue=hY,cue=GY,lue=J1,uue=dk(Hle),due=Dle,hue=aue.parseInt,fue=aue.Symbol,pue=fue&&fue.iterator,vue=/^[+-]?0x/i,gue=cue(vue.exec),yue=8!==hue(due+"08")||22!==hue(due+"0x16")||pue&&!sue((function(){hue(Object(pue))}))?function(e,t){var n=uue(lue(e));return hue(n,t>>>0||(gue(vue,n)?16:10))}:hue;F0({global:!0,forced:Ow!=yue},{parseInt:yue});var mue=lY(c$.parseInt),_ue=dY,bue=hY,Rue=GY,wue=J1,Gue=dk(Hle),Tue=Dle,kue=Rue("".charAt),Sue=_ue.parseFloat,Eue=_ue.Symbol,Mue=Eue&&Eue.iterator,Due=1/Sue(Tue+"-0")!=-1/0||Mue&&!bue((function(){Sue(Object(Mue))}))?function(e){var t=Gue(wue(e)),n=Sue(t);return 0===n&&"-"==kue(t,0)?-0:n}:Sue;F0({global:!0,forced:nk!=Due},{parseFloat:Due});var zue=lY(c$.parseFloat),Aue="g_ven";function Pue(e,t){var n,r;return n=t===rue.Intel?Uae(r=e.split("\n")).call(r,(function(e){return"Intel(R) ".concat(e)})):e.split("\n"),Uae(n).call(n,(function(e){return e.split("|")}))}function xue(e){return 0===e?0:-1===e?-1:zue(Fce(e).toFixed(2))}var Cue={AMD_PATH:"https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/db/_am.txt",INTEL_PATH:"https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/db/_int.txt",NVIDIA_PATH:"https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/db/_nvi.txt"},Fue=[],Iue=[],Hue=[];function Oue(){return(Oue=rae(tae().mark((function e(t){var n,r,i;return tae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==rue.Intel){e.next=4;break}if(!Fue.length){e.next=3;break}return e.abrupt("return",Fue);case 3:n=Cue.INTEL_PATH;case 4:if(t!==rue.Nvidia){e.next=8;break}if(!Iue.length){e.next=7;break}return e.abrupt("return",Iue);case 7:n=Cue.NVIDIA_PATH;case 8:if(t!==rue.Amd){e.next=12;break}if(!Hue.length){e.next=11;break}return e.abrupt("return",Hue);case 11:n=Cue.AMD_PATH;case 12:if(n){e.next=14;break}return e.abrupt("return",sae.resolve([]));case 14:return e.prev=14,e.next=17,fetch(n).then((function(e){return e.text()}));case 17:return r=e.sent,i=Pue(r,t),t===rue.Intel&&(Fue=i),t===rue.Nvidia&&(Iue=i),t===rue.Amd&&(Hue=i),e.abrupt("return",i);case 25:e.prev=25,e.t0=e.catch(14);case 27:return e.abrupt("return",[]);case 28:case"end":return e.stop()}}),e,null,[[14,25]])})))).apply(this,arguments)}function Lue(e){return e?function(e){return Oue.apply(this,arguments)}(e.vendor).then((function(t){return function(e,t){var n=xae(e).call(e,(function(e){return e[0]===t.model}));n.length||(n=xae(e).call(e,(function(e){return e[0]===t.backupModel}))),n.length||t.vendor!==rue.Intel||/^Intel(R)/.test(t.model)||(n=xae(e).call(e,(function(e){return e[0]==="Intel(R) "+t.model})));var r="-1";if(n.length){var i=n[0][1];r="-1"===i?"0":i}return mue(r)}(t,e)})).then(xue):sae.resolve(0)}var Xue="";function Uue(){return Xue||(Xue=function(){try{var e=localStorage.getItem(Aue)||"";if(e)return e;var t,n=document.createElement("canvas").getContext("webgl");if(n)return(e=(t=n.getExtension("WEBGL_debug_renderer_info"))?n.getParameter(t.UNMASKED_RENDERER_WEBGL):"")&&localStorage.setItem(Aue,e),e}catch(r){}return""}())}function Bue(e){var t;try{t=oue(e||Nue.getGPUVendor())}catch(n){return null}return t}var Nue=function(){function e(){iae(this,e)}return aae(e,null,[{key:"getGPUVendor",value:function(){return Uue()}},{key:"parseVendorAsync",value:function(e){var t=Bue(e);return t?Lue(t).then((function(e){return cee(cee({},t||{}),{},{score:e})})).catch((function(){return null})):sae.resolve(null)}}]),e}();function Vue(){var e=!1;if("undefined"==typeof MediaSource||!MediaSource.isTypeSupported)return e;if(e=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 t=Bue();e=!!t&&t.vendor!==rue.CpuDeriver}return e}var jue=lY(Poe),Kue=lY(Joe),Wue=F0,Que=qm(s6),que=!0;"find"in[]&&qm(oY=Array(1)).call(oY,(function(){que=!1})),Wue({target:"Array",proto:!0,forced:que},{find:function(e){return Que(this,e,arguments.length>1?arguments[1]:void 0)}});var Zue=qm(O8("Array")),Yue=p$,$ue=Zue,Jue=Array.prototype,ede=function(e){var t=qm(e);return e===Jue||Yue(Jue,e)&&t===qm(Jue)?$ue:t},tde=lY(ede),nde=s6.some;F0({target:"Array",proto:!0,forced:!_9("some")},{some:function(e){return nde(this,e,arguments.length>1?arguments[1]:void 0)}});var rde=O8("Array").some,ide=p$,ode=rde,ade=Array.prototype,sde=function(e){var t=e.some;return e===ade||ide(ade,e)&&t===ade.some?ode:t},cde=lY(sde),lde=F0,ude=zY,dde=KR(l2),hde=_9,fde=ude(KR([])),pde=!!fde&&1/fde([1],1,-0)<0;lde({target:"Array",proto:!0,forced:pde||!hde("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return pde?fde(this,e,t)||0:dde(this,e,t)}});var vde=KR(O8("Array")),gde=p$,yde=vde,mde=Array.prototype,_de=function(e){var t=KR(e);return e===mde||gde(mde,e)&&t===KR(mde)?yde:t},bde=lY(_de),Rde=C$,wde=TypeError,Gde=F0,Tde=nJ,kde=i2,Sde=B0,Ede=K0,Mde=o9,Dde=Q0,zde=P1,Ade=$0,Pde=function(e,t){if(!delete e[t])throw wde("Cannot delete property "+Rde(t)+" of "+Rde(e))},xde=I1("splice"),Cde=Math.max,Fde=Math.min;Gde({target:"Array",proto:!0,forced:!xde},{splice:function(e,t){var n,r,i,o,a,s,c=Tde(this),l=Ede(c),u=kde(e,l),d=arguments.length;for(0===d?n=r=0:1===d?(n=0,r=l-u):(n=d-2,r=Fde(Cde(Sde(t),0),l-u)),Dde(l+n-r),i=zde(c,r),o=0;o<r;o++)(a=u+o)in c&&Ade(i,o,c[a]);if(i.length=r,n<r){for(o=u;o<l-r;o++)s=o+n,(a=o+r)in c?c[s]=c[a]:Pde(c,s);for(o=l;o>l-r+n;o--)Pde(c,o-1)}else if(n>r)for(o=l-r;o>u;o--)s=o+n-1,(a=o+r-1)in c?c[s]=c[a]:Pde(c,s);for(o=0;o<n;o++)c[o+u]=arguments[o+2];return Mde(c,l-r+n),i}});var Ide=vw(O8("Array")),Hde=p$,Ode=Ide,Lde=Array.prototype,Xde=function(e){var t=vw(e);return e===Lde||Hde(Lde,e)&&t===vw(Lde)?Ode:t},Ude=lY(Xde),Bde={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},Nde={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},Vde={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},jde={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},Kde={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"},Wde=function(){function e(){iae(this,e)}return aae(e,null,[{key:"getFirstMatch",value:function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""}},{key:"getSecondMatch",value:function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""}},{key:"matchAndReturnConst",value:function(e,t,n){if(e.test(t))return n}},{key:"getWindowsVersionName",value:function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}},{key:"getMacOSVersionName",value:function(e){var t,n,r=Uae(t=Ude(n=e.split(".")).call(n,0,2)).call(t,(function(e){return mue(e,10)||0}));if(r.push(0),10===r[0])switch(r[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}},{key:"getAndroidVersionName",value:function(e){var t,n,r=Uae(t=Ude(n=e.split(".")).call(n,0,2)).call(t,(function(e){return mue(e,10)||0}));if(r.push(0),!(1===r[0]&&r[1]<5))return 1===r[0]&&r[1]<6?"Cupcake":1===r[0]&&r[1]>=6?"Donut":2===r[0]&&r[1]<2?"Eclair":2===r[0]&&2===r[1]?"Froyo":2===r[0]&&r[1]>2?"Gingerbread":3===r[0]?"Honeycomb":4===r[0]&&r[1]<1?"Ice Cream Sandwich":4===r[0]&&r[1]<4?"Jelly Bean":4===r[0]&&r[1]>=4?"KitKat":5===r[0]?"Lollipop":6===r[0]?"Marshmallow":7===r[0]?"Nougat":8===r[0]?"Oreo":9===r[0]?"Pie":void 0}},{key:"getVersionPrecision",value:function(e){return e.split(".").length}},{key:"compareVersions",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=e.getVersionPrecision(t),o=e.getVersionPrecision(n),a=Math.max(i,o),s=0,c=Uae(e).call(e,[t,n],(function(t){var n,r=a-e.getVersionPrecision(t),i=t+new Array(r+1).join(".0");return jue(n=Uae(e).call(e,i.split("."),(function(e){return new Array(20-e.length).join("0")+e}))).call(n)}));for(r&&(s=a-Math.min(i,o)),a-=1;a>=s;){if(c[0][a]>c[1][a])return 1;if(c[0][a]===c[1][a]){if(a===s)return 0;a-=1}else if(c[0][a]<c[1][a])return-1}}},{key:"map",value:function(e,t){var n,r=[];if(Uae(Array.prototype))return Uae(Array.prototype).call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r}},{key:"find",value:function(e,t){var n,r;if(tde(Array.prototype))return tde(Array.prototype).call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}}},{key:"assign",value:function(e){for(var t,n,r,i=e,o=arguments.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];if(Sae)return Sae.apply(Object,Pae(r=[e]).call(r,a));var c=function(){var e=a[t];if("object"===D8(e)&&null!==e){var n=lae(e);cae(n).call(n,(function(t){i[t]=e[t]}))}};for(t=0,n=a.length;t<n;t+=1)c();return e}},{key:"getBrowserAlias",value:function(e){return Bde[e]}},{key:"getBrowserTypeByAlias",value:function(e){return Nde[e]||""}}]),e}(),Qde=/version\/(\d+(\.?_?\d+)+)/i,qde=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=Wde.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||Wde.getFirstMatch(Qde,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=Wde.getFirstMatch(Qde,e)||Wde.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=Wde.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||Wde.getFirstMatch(Qde,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=Wde.getFirstMatch(Qde,e)||Wde.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=Wde.getFirstMatch(Qde,e)||Wde.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=Wde.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||Wde.getFirstMatch(Qde,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=Wde.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||Wde.getFirstMatch(Qde,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=Wde.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||Wde.getFirstMatch(Qde,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=Wde.getFirstMatch(Qde,e)||Wde.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=Wde.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||Wde.getFirstMatch(Qde,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=Wde.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||Wde.getFirstMatch(Qde,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=Wde.getFirstMatch(Qde,e)||Wde.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=Wde.getFirstMatch(Qde,e)||Wde.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=Wde.getFirstMatch(Qde,e)||Wde.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=Wde.getFirstMatch(Qde,e)||Wde.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=Wde.getFirstMatch(Qde,e)||Wde.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=Wde.getFirstMatch(Qde,e)||Wde.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=Wde.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||Wde.getFirstMatch(Qde,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=Wde.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||Wde.getFirstMatch(Qde,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=Wde.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=Wde.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=Wde.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=Wde.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=Wde.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=Wde.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=Wde.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=Wde.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=Wde.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=Wde.getFirstMatch(Qde,e)||Wde.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=Wde.getFirstMatch(Qde,e)||Wde.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=Wde.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=Wde.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||Wde.getFirstMatch(Qde,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=Wde.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||Wde.getFirstMatch(Qde,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=Wde.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=Wde.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=Wde.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=Wde.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||Wde.getFirstMatch(Qde,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=Wde.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=Wde.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=Wde.getFirstMatch(Qde,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=Wde.getFirstMatch(Qde,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=Wde.getFirstMatch(Qde,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:Wde.getFirstMatch(t,e),version:Wde.getSecondMatch(t,e)}}}],Zde=[{test:[/Roku\/DVP/],describe:function(e){var t=Wde.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:jde.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=Wde.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:jde.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=Wde.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=Wde.getWindowsVersionName(t);return{name:jde.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:jde.iOS},n=Wde.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=Wde.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=Wde.getMacOSVersionName(t),r={name:jde.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=Wde.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:jde.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=Wde.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=Wde.getAndroidVersionName(t),r={name:jde.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=Wde.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:jde.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=Wde.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||Wde.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||Wde.getFirstMatch(/\bbb(\d+)/i,e);return{name:jde.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=Wde.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:jde.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=Wde.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:jde.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:jde.Linux}}},{test:[/CrOS/],describe:function(){return{name:jde.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=Wde.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:jde.PlayStation4,version:t}}}],Yde=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=Wde.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:Vde.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:Vde.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:Vde.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:Vde.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:Vde.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:Vde.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:Vde.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=Wde.getFirstMatch(/(ipod|iphone)/i,e);return{type:Vde.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:Vde.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:Vde.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:Vde.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:Vde.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:Vde.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:Vde.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:Vde.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:Vde.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:Vde.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:Vde.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:Vde.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:Vde.tv}}}],$de=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:Kde.Blink};var t=Wde.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:Kde.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:Kde.Trident},n=Wde.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:Kde.Presto},n=Wde.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:Kde.Gecko},n=Wde.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:Kde.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:Kde.WebKit},n=Wde.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}],Jde=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(iae(this,e),null==t||""===t)throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},!0!==n&&this.parse()}return aae(e,[{key:"getUA",value:function(){return this._ua}},{key:"test",value:function(e){return e.test(this._ua)}},{key:"parseBrowser",value:function(){var e=this;this.parsedResult.browser={};var t=tde(Wde).call(Wde,qde,(function(t){if("function"==typeof t.test)return t.test(e);var n;if(t.test instanceof Array)return cde(n=t.test).call(n,(function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}},{key:"getBrowser",value:function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}},{key:"getBrowserName",value:function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}},{key:"getBrowserVersion",value:function(){return this.getBrowser().version}},{key:"getOS",value:function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}},{key:"parseOS",value:function(){var e=this;this.parsedResult.os={};var t=tde(Wde).call(Wde,Zde,(function(t){if("function"==typeof t.test)return t.test(e);var n;if(t.test instanceof Array)return cde(n=t.test).call(n,(function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}},{key:"getOSName",value:function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""}},{key:"getOSVersion",value:function(){return this.getOS().version}},{key:"getPlatform",value:function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}},{key:"getPlatformType",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""}},{key:"parsePlatform",value:function(){var e=this;this.parsedResult.platform={};var t=tde(Wde).call(Wde,Yde,(function(t){if("function"==typeof t.test)return t.test(e);var n;if(t.test instanceof Array)return cde(n=t.test).call(n,(function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}},{key:"getEngine",value:function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}},{key:"getEngineName",value:function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}},{key:"parseEngine",value:function(){var e=this;this.parsedResult.engine={};var t=tde(Wde).call(Wde,$de,(function(t){if("function"==typeof t.test)return t.test(e);var n;if(t.test instanceof Array)return cde(n=t.test).call(n,(function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}},{key:"parse",value:function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}},{key:"getResult",value:function(){return Wde.assign({},this.parsedResult)}},{key:"satisfies",value:function(e){var t=this,n={},r=0,i={},o=0,a=lae(e);if(cae(a).call(a,(function(t){var a=e[t];"string"==typeof a?(i[t]=a,o+=1):"object"===D8(a)&&(n[t]=a,r+=1)})),r>0){var s=lae(n),c=tde(Wde).call(Wde,s,(function(e){return t.isOS(e)}));if(c){var l=this.satisfies(n[c]);if(void 0!==l)return l}var u=tde(Wde).call(Wde,s,(function(e){return t.isPlatform(e)}));if(u){var d=this.satisfies(n[u]);if(void 0!==d)return d}}if(o>0){var h=lae(i),f=tde(Wde).call(Wde,h,(function(e){return t.isBrowser(e,!0)}));if(void 0!==f)return this.compareVersion(i[f])}}},{key:"isBrowser",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=Wde.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n}},{key:"compareVersion",value:function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),bde(t).call(t,Wde.compareVersions(i,n,r))>-1}},{key:"isOS",value:function(e){return this.getOSName(!0)===String(e).toLowerCase()}},{key:"isPlatform",value:function(e){return this.getPlatformType(!0)===String(e).toLowerCase()}},{key:"isEngine",value:function(e){return this.getEngineName(!0)===String(e).toLowerCase()}},{key:"is",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)}},{key:"some",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return cde(t).call(t,(function(t){return e.is(t)}))}}]),e}(),ehe=function(){function e(){iae(this,e)}return aae(e,null,[{key:"getParser",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("string"!=typeof e)throw new Error("UserAgent should be a string");return new Jde(e,t)}},{key:"parse",value:function(e){return new Jde(e).getResult()}},{key:"BROWSER_MAP",get:function(){return Nde}},{key:"ENGINE_MAP",get:function(){return Kde}},{key:"OS_MAP",get:function(){return jde}},{key:"PLATFORMS_MAP",get:function(){return Vde}}]),e}(),the=function(){function e(t){iae(this,e),aee(this,"featureList",void 0),aee(this,"videoType",void 0),this.videoType=t.type||kse.VOD,this.featureList=cee(cee(cee(cee({deviceId:null==t?void 0:t.deviceId},this.initSync()),this.getGPUInfo()),this.getLocalDeviceMarkInfo()),this.getH265FeatureList())}var t;return aae(e,[{key:"initSync",value:function(){return cee({},this.getBrowserInfo())}},{key:"updateFeatureList",value:function(e){return this.featureList=cee(cee({},this.featureList),e)}},{key:"getFeatureList",value:function(){return this.featureList}},{key:"getH265FeatureList",value:function(){return{isHevcSupported:Vue()}}},{key:"getLocalDeviceMarkInfo",value:function(){var e=mse(this.videoType===kse.LIVE?Pse:Ase),t={cpuScore:-1,netScore:-1,renderScore:-1};if(!e)return t;try{var n=JSON.parse(e);return{cpuScore:n.cpuScore,netScore:n.netScore,renderScore:n.renderScore}}catch(r){}return t}},{key:"getDeviceMarkInfoAsync",value:(t=rae(tae().mark((function e(){var t,n,r,i,o,a;return tae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new Mle({}),e.next=3,t.getScore();case 3:if(e.t0=e.sent,e.t0){e.next=6;break}e.t0={};case 6:return n=e.t0,r=n.cpu,i=n.net,o=n.render,a={cpuScore:(null==r?void 0:r.score)||-1,netScore:(null==i?void 0:i.score)||-1,renderScore:(null==o?void 0:o.score)||-1},yse(this.videoType===kse.LIVE?Pse:Ase,fae(a)),this.updateFeatureList(a),e.abrupt("return",a);case 14:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"getBrowserInfo",value:function(){var e=ehe.getParser(navigator.userAgent);return{browserVersion:e.getBrowserVersion(),browserName:e.getBrowserName(),cpuCore:navigator.hardwareConcurrency,osName:e.getOSName(),osVersion:e.getOSVersion(),platformType:e.getPlatformType(),engineName:e.getEngineName()}}},{key:"getGPUInfo",value:function(){try{var e=sY.parseVendor(),t=sY.getGPUVendor(),n=use(t).call(t,"SwiftShader");return{gpuScore:(null==e?void 0:e.score)||-1,isCloseGPU:n}}catch(r){return{gpuScore:-1,isCloseGPU:!1}}}}]),e}(),nhe={exports:{}},rhe=hY((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);yZ(e)&&fG(e,"a",{value:8})}})),ihe=s$,ohe=EY,ahe=rhe,she=yZ,che=hY((function(){she(1)}))||ahe?function(e){return!!ihe(e)&&(!ahe||"ArrayBuffer"!=ohe(e))&&(!she||she(e))}:she,lhe=!hY((function(){return yZ(TZ({}))})),uhe=F0,dhe=GY,hhe=u2,fhe=s$,phe=oJ,vhe=i0.f,ghe=W2,yhe=Y2,mhe=che,_he=lhe,bhe=!1,Rhe=uJ("meta"),whe=0,Ghe=function(e){vhe(e,Rhe,{value:{objectID:"O"+whe++,weakData:{}}})},The=nhe.exports={enable:function(){The.enable=function(){},bhe=!0;var e=ghe.f,t=dhe(vw([])),n={};n[Rhe]=1,e(n).length&&(ghe.f=function(n){for(var r=e(n),i=0,o=r.length;i<o;i++)if(r[i]===Rhe){t(r,i,1);break}return r},uhe({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:yhe.f}))},fastKey:function(e,t){if(!fhe(e))return"symbol"==Su(e)?e:("string"==typeof e?"S":"P")+e;if(!phe(e,Rhe)){if(!mhe(e))return"F";if(!t)return"E";Ghe(e)}return e[Rhe].objectID},getWeakData:function(e,t){if(!phe(e,Rhe)){if(!mhe(e))return!0;if(!t)return!1;Ghe(e)}return e[Rhe].weakData},onFreeze:function(e){return _he&&bhe&&mhe(e)&&!phe(e,Rhe)&&Ghe(e),e}};hhe[Rhe]=!0;var khe=nhe.exports,She=F0,Ehe=dY,Mhe=khe,Dhe=hY,zhe=G0,Ahe=pte,Phe=jte,xhe=CY,Che=s$,Fhe=H5,Ihe=i0.f,Hhe=s6.forEach,Ohe=IY,Lhe=J5.set,Xhe=J5.getterFor,Uhe=d5,Bhe=function(e,t,n){for(var r in t)n&&n.unsafe&&e[r]?e[r]=t[r]:Uhe(e,r,t[r],n);return e},Nhe=K2,Vhe=f5,jhe=Bhe,Khe=r0,Whe=jte,Qhe=$Y,qhe=pte,Zhe=_7,Yhe=b7,$he=Bte,Jhe=IY,efe=khe.fastKey,tfe=J5.set,nfe=J5.getterFor,rfe={getConstructor:function(e,t,n,r){var i=e((function(e,i){Whe(e,o),tfe(e,{type:t,index:Nhe(null),first:void 0,last:void 0,size:0}),Jhe||(e.size=0),Qhe(i)||qhe(i,e[r],{that:e,AS_ENTRIES:n})})),o=i.prototype,a=nfe(t),s=function(e,t,n){var r,i,o=a(e),s=c(e,t);return s?s.value=n:(o.last=s={index:i=efe(t,!0),key:t,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=s),r&&(r.next=s),Jhe?o.size++:e.size++,"F"!==i&&(o.index[i]=s)),e},c=function(e,t){var n,r=a(e),i=efe(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return jhe(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,Jhe?e.size=0:this.size=0},delete:function(e){var t=this,n=a(t),r=c(t,e);if(r){var i=r.next,o=r.previous;delete n.index[r.index],r.removed=!0,o&&(o.next=i),i&&(i.previous=o),n.first==r&&(n.first=i),n.last==r&&(n.last=o),Jhe?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=a(this),r=Khe(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!c(this,e)}}),jhe(o,n?{get:function(e){var t=c(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)}}),Jhe&&Vhe(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(e,t,n){var r=t+" Iterator",i=nfe(t),o=nfe(r);Zhe(e,t,(function(e,t){tfe(this,{type:r,target:e,state:i(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)?Yhe("keys"==t?n.key:"values"==t?n.value:[n.key,n.value],!1):(e.target=void 0,Yhe(void 0,!0))}),n?"entries":"values",!n,!0),$he(t)}},ife=function(e,t,n){var r,i=-1!==KR(e).call(e,"Map"),o=-1!==KR(e).call(e,"Weak"),a=i?"set":"add",s=Ehe[e],c=s&&s.prototype,l={};if(Ohe&&xhe(s)&&(o||c.forEach&&!Dhe((function(){var e;PL(e=new s).call(e).next()})))){var u=(r=t((function(t,n){Lhe(Phe(t,u),{type:e,collection:new s}),null!=n&&Ahe(n,t[a],{that:t,AS_ENTRIES:i})}))).prototype,d=Xhe(e);Hhe(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in c)||o&&"clear"==e||zhe(u,e,(function(n,r){var i=d(this).collection;if(!t&&o&&!Che(n))return"get"==e&&void 0;var a=i[e](0===n?0:n,r);return t?this:a}))})),o||Ihe(u,"size",{configurable:!0,get:function(){return d(this).collection.size}})}else r=n.getConstructor(t,e,i,a),Mhe.enable();return Fhe(r,e,!1,!0),l[e]=r,She({global:!0,forced:!0},l),o||n.setStrong(r,e,i),r};ife("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),rfe);var ofe=c$.Map,afe=r0,sfe=LY,cfe=O$,lfe=qte,ufe=$Y,dfe=pte,hfe=[].push,ffe=function(e){var t,n,r,i,o=arguments.length,a=o>1?arguments[1]:void 0;return lfe(this),(t=void 0!==a)&&cfe(a),ufe(e)?new this:(n=[],t?(r=0,i=afe(a,o>2?arguments[2]:void 0),dfe(e,(function(e){sfe(hfe,n,i(e,r++))}))):dfe(e,hfe,{that:n}),new this(n))};F0({target:"Map",stat:!0,forced:!0},{from:ffe});var pfe=A4,vfe=function(){return new this(pfe(arguments))};F0({target:"Map",stat:!0,forced:!0},{of:vfe});var gfe=C$,yfe=function(e){if("object"==Su(e)&&"size"in e&&"has"in e&&"get"in e&&"set"in e&&"delete"in e&&"entries"in e)return e;throw TypeError(gfe(e)+" is not a map")},mfe=function(e,t){return 1==t?function(t,n){return t[e](n)}:function(t,n,r){return t[e](n,r)}},_fe=f$("Map"),bfe={Map:_fe,set:mfe("set",2),get:mfe("get",1),has:mfe("has",1),remove:mfe("delete",1),proto:_fe.prototype},Rfe=yfe,wfe=bfe.remove;F0({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=Rfe(this),n=!0,r=0,i=arguments.length;r<i;r++)e=wfe(t,arguments[r]),n=n&&e;return!!n}});var Gfe=yfe,Tfe=bfe.get,kfe=bfe.has,Sfe=bfe.set;F0({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(e,t){var n,r,i=Gfe(this);return kfe(i,e)?(n=Tfe(i,e),"update"in t&&(n=t.update(n,e,i),Sfe(i,e,n)),n):(r=t.insert(e,i),Sfe(i,e,r),r)}});var Efe=LY,Mfe=function(e,t,n){for(var r,i,o=n||e.next;!(r=Efe(o,e)).done;)if(void 0!==(i=t(r.value)))return i},Dfe=function(e,t,n){return n?Mfe(PL(e).call(e),(function(e){return t(e[1],e[0])})):e.forEach(t)},zfe=r0,Afe=yfe,Pfe=Dfe;F0({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=Afe(this),n=zfe(e,arguments.length>1?arguments[1]:void 0);return!1!==Pfe(t,(function(e,r){if(!n(e,r,t))return!1}),!0)}});var xfe=r0,Cfe=yfe,Ffe=Dfe,Ife=bfe.Map,Hfe=bfe.set;F0({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=Cfe(this),n=xfe(e,arguments.length>1?arguments[1]:void 0),r=new Ife;return Ffe(t,(function(e,i){n(e,i,t)&&Hfe(r,i,e)})),r}});var Ofe=r0,Lfe=yfe,Xfe=Dfe;F0({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=Lfe(this),n=Ofe(e,arguments.length>1?arguments[1]:void 0),r=Xfe(t,(function(e,r){if(n(e,r,t))return{value:e}}),!0);return r&&r.value}});var Ufe=r0,Bfe=yfe,Nfe=Dfe;F0({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=Bfe(this),n=Ufe(e,arguments.length>1?arguments[1]:void 0),r=Nfe(t,(function(e,r){if(n(e,r,t))return{key:r}}),!0);return r&&r.key}});var Vfe=F0,jfe=O$,Kfe=t$,Wfe=pte,Qfe=bfe.Map,qfe=bfe.has,Zfe=bfe.get,Yfe=bfe.set,$fe=GY([].push);Vfe({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){Kfe(e),jfe(t);var n=new Qfe,r=0;return Wfe(e,(function(e){var i=t(e,r++);qfe(n,i)?$fe(Zfe(n,i),e):Yfe(n,i,[e])})),n}});var Jfe=function(e,t){return e===t||e!=e&&t!=t},epe=yfe,tpe=Dfe;F0({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===tpe(epe(this),(function(t){if(Jfe(t,e))return!0}),!0)}});var npe=LY,rpe=pte,ipe=CY,ope=O$,ape=bfe.Map;F0({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var n=new(ipe(this)?this:ape);ope(t);var r=ope(n.set);return rpe(e,(function(e){npe(r,n,t(e),e)})),n}});var spe=yfe,cpe=Dfe;F0({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=cpe(spe(this),(function(t,n){if(t===e)return{key:n}}),!0);return t&&t.key}});var lpe=r0,upe=yfe,dpe=Dfe,hpe=bfe.Map,fpe=bfe.set;F0({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=upe(this),n=lpe(e,arguments.length>1?arguments[1]:void 0),r=new hpe;return dpe(t,(function(e,i){fpe(r,n(e,i,t),e)})),r}});var ppe=r0,vpe=yfe,gpe=Dfe,ype=bfe.Map,mpe=bfe.set;F0({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=vpe(this),n=ppe(e,arguments.length>1?arguments[1]:void 0),r=new ype;return gpe(t,(function(e,i){mpe(r,i,n(e,i,t))})),r}});var _pe=yfe,bpe=pte,Rpe=bfe.set;F0({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=_pe(this),n=arguments.length,r=0;r<n;)bpe(arguments[r++],(function(e,n){Rpe(t,e,n)}),{AS_ENTRIES:!0});return t}});var wpe=O$,Gpe=yfe,Tpe=Dfe,kpe=TypeError;F0({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=Gpe(this),n=arguments.length<2,r=n?void 0:arguments[1];if(wpe(e),Tpe(t,(function(i,o){n?(n=!1,r=i):r=e(r,i,o,t)})),n)throw kpe("Reduce of empty map with no initial value");return r}});var Spe=r0,Epe=yfe,Mpe=Dfe;F0({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=Epe(this),n=Spe(e,arguments.length>1?arguments[1]:void 0);return!0===Mpe(t,(function(e,r){if(n(e,r,t))return!0}),!0)}});var Dpe=O$,zpe=yfe,Ape=TypeError,Ppe=bfe.get,xpe=bfe.has,Cpe=bfe.set;F0({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var n=zpe(this),r=arguments.length;Dpe(t);var i=xpe(n,e);if(!i&&r<3)throw Ape("Updating absent value");var o=i?Ppe(n,e):Dpe(r>2?arguments[2]:void 0)(e,n);return Cpe(n,e,t(o,e,n)),n}});var Fpe=LY,Ipe=O$,Hpe=CY,Ope=l0,Lpe=TypeError,Xpe=function(e,t){var n,r=Ope(this),i=Ipe(r.get),o=Ipe(r.has),a=Ipe(r.set),s=arguments.length>2?arguments[2]:void 0;if(!Hpe(t)&&!Hpe(s))throw Lpe("At least one callback required");return Fpe(o,r,e)?(n=Fpe(i,r,e),Hpe(t)&&(n=t(n),Fpe(a,r,e,n))):Hpe(s)&&(n=s(),Fpe(a,r,e,n)),n};F0({target:"Map",proto:!0,real:!0,forced:!0},{upsert:Xpe}),F0({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:Xpe});var Upe=lY(ofe),Bpe=l0,Npe=ete,Vpe=r0,jpe=LY,Kpe=nJ,Wpe=function(e,t,n,r){try{return r?t(Bpe(n)[0],n[1]):t(n)}catch(i){Npe(e,"throw",i)}},Qpe=Hee,qpe=k1,Zpe=K0,Ype=$0,$pe=Zee,Jpe=Nee,eve=Array,tve=function(e){var t=Kpe(e),n=qpe(this),r=arguments.length,i=r>1?arguments[1]:void 0,o=void 0!==i;o&&(i=Vpe(i,r>2?arguments[2]:void 0));var a,s,c,l,u,d,h=Jpe(t),f=0;if(!h||this===eve&&Qpe(h))for(a=Zpe(t),s=n?new this(a):eve(a);a>f;f++)d=o?i(t[f],f):t[f],Ype(s,f,d);else for(u=(l=$pe(t,h)).next,s=n?new this:[];!(c=jpe(u,l)).done;f++)d=o?Wpe(l,i,[c.value,f],!0):c.value,Ype(s,f,d);return s.length=f,s},nve=F0,rve=tve,ive=!Tie((function(e){rT(e)}));nve({target:"Array",stat:!0,forced:ive},{from:rve});var ove=lY(c$.Array.from),ave=PZ(O8("Array")),sve=s1,cve=oJ,lve=p$,uve=ave,dve=Array.prototype,hve={DOMTokenList:!0,NodeList:!0},fve=function(e){var t=PZ(e);return e===dve||lve(dve,e)&&t===PZ(dve)||cve(hve,sve(e))?uve:t},pve=lY(fve),vve=function(){function e(t){iae(this,e),aee(this,"ctx",void 0),aee(this,"strategyMap",new Upe),this.ctx=t}return aae(e,[{key:"registerStrategy",value:function(e){var t;return!(null==e||null===(t=e.Strategy)||void 0===t||!t.strategyName||(this.strategyMap.get(e.Strategy.strategyName)||this.strategyMap.set(e.Strategy.strategyName,{inst:new e.Strategy({ctx:this.ctx,config:e.config,strategyName:e.Strategy.strategyName,strategyCenter:this})}),0))}},{key:"getStrategyInstByName",value:function(e){var t;return e&&null!==(t=this.strategyMap.get(e))&&void 0!==t&&t.inst?this.strategyMap.get(e).inst:null}},{key:"getStrategyList",value:function(){var e,t;return Uae(e=ove(pve(t=this.strategyMap).call(t))).call(e,(function(e){return e.inst}))}},{key:"getStrategyByName",value:function(e){return e&&this.strategyMap.get(e)?this.strategyMap.get(e):null}},{key:"registerAlgorithm",value:function(){}},{key:"getStrategyInstByNameAsync",value:function(){}},{key:"loadStrategySrcAsync",value:function(){}}]),e}(),gve=function(){function e(t){iae(this,e),aee(this,"inst",void 0),this.inst=t.inst}return aae(e,[{key:"getInst",value:function(){return this.inst}},{key:"getPlayerConfig",value:function(){var e;return null===(e=this.inst)||void 0===e?void 0:e.playerConfig}},{key:"getStrategyConfig",value:function(){var e;return null===(e=this.inst)||void 0===e?void 0:e.strategyConfig}}]),e}(),yve=function(){function e(){iae(this,e),aee(this,"players",void 0),this.players=new Upe}return aae(e,[{key:"get",value:function(e){return this.players.get(e)}},{key:"addPlayer",value:function(e,t){return!(!e||this.players.get(e)||(this.players.set(e,new gve(t)),0))}},{key:"getPlayerList",value:function(){var e;return ove(pve(e=this.players).call(e))}},{key:"removePlayer",value:function(e){return!(!e||!this.players.get(e)||(this.players.delete(e),0))}}]),e}();!function(){function e(t){iae(this,e),aee(this,"strategyCenter",void 0),aee(this,"ctx",void 0),aee(this,"config",void 0),aee(this,"player",void 0),aee(this,"strategyName",void 0),this.ctx=t.ctx,this.config=t.config,this.strategyName=t.strategyName,this.strategyCenter=t.strategyCenter,this.player=null}aae(e,[{key:"getStrategyConfig",value:function(){return this.config}},{key:"setPlayerInst",value:function(e){this.player=e.getInst()}},{key:"beforePlayerCreate",value:function(e){}},{key:"onPlayerEvent",value:function(e,t){}},{key:"onGlobalEvent",value:function(e,t){}}])}();var mve=function(){function e(t){iae(this,e),aee(this,"tracker",void 0),aee(this,"_tea",void 0),aee(this,"ctx",void 0),aee(this,"options",void 0),this.ctx=t.cxt,this.options=t,this.initTracker(t),this.bindABVersion()}return aae(e,[{key:"bindTrackerABVersion",value:function(e){var t,n,r,i=this;!this._tea&&e&&null!==(t=this.options)&&void 0!==t&&null!==(t=t.trackInfo)&&void 0!==t&&t.enableABVersion&&(this._tea=e,null===(n=this._tea)||void 0===n||null===(r=n.filterEvent)||void 0===r||r.call(n,(function(e){var t,n;return null==e||null===(t=e[0])||void 0===t||null===(t=t.events)||void 0===t||null===(n=cae(t))||void 0===n||n.call(t,(function(e){var t,n,r,o=((null===(t=i.ctx)||void 0===t||null===(t=t.dataCenter)||void 0===t?void 0:t.getServiceStrategyConfig())||{}).libra_ab_version;!o||!e||null!==(n=e.ab_sdk_version)&&void 0!==n&&use(n).call(n,o)||(e.ab_sdk_version=e.ab_sdk_version?Pae(r="".concat(e.ab_sdk_version,",")).call(r,o):"".concat(o))})),e})))}},{key:"track",value:function(e,t){var n,r;"function"==typeof this.tracker?this.tracker(e,t):null===(n=this.tracker)||void 0===n||null===(r=n.event)||void 0===r||r.call(n,e,t)}},{key:"initTracker",value:function(e){var t,n;if(use(t=[kse.LIVE,kse.VOD]).call(t,e.type)&&null!==(n=e.trackInfo)&&void 0!==n&&n.Collector&&"undefined"!=typeof window){var r="__vestrategy_".concat(e.type,"_tracker__");if(!window[r]){this.tracker=window[r]=new e.trackInfo.Collector("".concat(e.type,"_tracker")),this.tracker.init({app_id:e.appId,channel:e.channel||Sse.CN,log:!1,disable_sdk_monitor:!0});var i=cee({play_type:e.type===kse.VOD?0:1,line_app_id:e.lineAppId,line_user_id:e.lineUserId},bse(this.ctx.featureCenter.getFeatureList()));return this.tracker.config(cee(cee({},i),{},{user_unique_id:e.lineUserId,disable_auto_pv:!0})),void this.tracker.start()}this.tracker=window[r]}}},{key:"bindABVersion",value:function(){var e,t,n=this;this.tracker&&(null===(e=this.tracker)||void 0===e||null===(t=e.filterEvent)||void 0===t||t.call(e,(function(e){var t,r;return null==e||null===(t=e[0])||void 0===t||null===(t=t.events)||void 0===t||null===(r=cae(t))||void 0===r||r.call(t,(function(e){var t,r=((null===(t=n.ctx)||void 0===t||null===(t=t.dataCenter)||void 0===t?void 0:t.getServiceStrategyConfig())||{}).libra_ab_version;r&&e&&(e.ab_sdk_version="".concat(r))})),e})))}}]),e}();F0({target:"Array",stat:!0},{isArray:H0});var _ve,bve=lY(c$.Array.isArray),Rve=function(e){return e.Equal="=",e.NotEqual="≠",e.Greater=">",e.GreaterOrEqual="≥",e.Less="<",e.LessOrEqual="≤",e}(Rve||{}),wve=(aee(_ve={},"=",{validate:function(e,t){var n;return bve(pve(e))?use(n=pve(e)).call(n,t):pve(e)===t}}),aee(_ve,"≠",{validate:function(e,t){var n;return bve(pve(e))?!use(n=pve(e)).call(n,t):pve(e)!==t}}),aee(_ve,">",{validate:function(e,t){return!bve(pve(e))&&"boolean"!=typeof pve(e)&&t>pve(e)}}),aee(_ve,"≥",{validate:function(e,t){return!bve(pve(e))&&"boolean"!=typeof pve(e)&&t>=pve(e)}}),aee(_ve,"<",{validate:function(e,t){return!bve(pve(e))&&"boolean"!=typeof pve(e)&&t<pve(e)}}),aee(_ve,"≤",{validate:function(e,t){return!bve(pve(e))&&"boolean"!=typeof pve(e)&&t<=pve(e)}}),_ve);function Gve(e,t,n){var r;return null==e||cae(e).call(e,(function(e){var i;if("conditions"in e&&e.conditions)i=Gve(e.conditions,t,e.logic);else if("key"in e){var o,a=t[null==e?void 0:e.key];i=null===(o=wve[null==e?void 0:e.op])||void 0===o?void 0:o.validate(e,a)}r=void 0===r?i:"||"===n?r||i:r&&i})),r}hZ({__proto__:null,Operator:Rve,getConfigWithRule:function(e,t){var n={};if(e)return cae(e).call(e,(function(e){Gve(e.conditions,t,e.logic)&&(n=cee(cee({},n),e.config))})),n},operators:wve,validate:Gve});var Tve=new zse("VeStrategy-BasePlugin"),kve=function(e){nce(n,wE);var t=Rce(n);function n(e){var r,i,o,a,s;iae(this,n),aee(bce(s=t.call(this,e)),"ctx",void 0),aee(bce(s),"strategyCenter",void 0),aee(bce(s),"videoType",void 0),aee(bce(s),"playerLogEventHandler",(function(e,t){var n,r;return"string"==typeof e?null===(n=s.ctx)||void 0===n||null===(n=n.tracker)||void 0===n||null===(r=n.track)||void 0===r?void 0:r.call(n,e,t):bve(e)?cae(e).call(e,(function(e){var t,n,r=e.eventName,i=e.params;null===(t=s.ctx)||void 0===t||null===(t=t.tracker)||void 0===t||null===(n=t.track)||void 0===n||n.call(t,r,i)})):void 0})),s.ctx=e.config.ctx,s.videoType=e.config.videoType,s.strategyCenter=e.config.strategyCenter,Tve.update(null===(r=s.ctx)||void 0===r||null===(r=r.dataCenter)||void 0===r||null===(r=r.getAppConfig())||void 0===r?void 0:r.log);var c={playerId:s.player.playerId,playerConfig:null,strategyConfig:null,strategyCenter:s.strategyCenter};return wce(c,"playerConfig",{get:function(){return s.playerConfig}}),wce(c,"strategyConfig",{get:function(){return e.config.strategyConfig}}),s.player.playerId&&s.ctx.playerManager.addPlayer(s.player.playerId,{inst:c}),null===(i=s.strategyCenter)||void 0===i||null===(o=i.getStrategyList)||void 0===o||cae(a=o.call(i)).call(a,(function(e){var t,n;null==e||null===(t=e.setPlayerInst)||void 0===t||t.call(e,s.ctx.playerManager.get(s.player.playerId)),null==e||null===(n=e.onBasePluginCreated)||void 0===n||n.call(e,s.ctx.playerManager.get(s.player.playerId))})),Tve.info("BasePluginInit",e.config),s}return aae(n,[{key:"afterPlayerInit",value:function(){var e,t,n;this.player.on("abLog",this.playerLogEventHandler),this.videoType===kse.VOD&&(null===(e=this.ctx)||void 0===e||null===(e=e.tracker)||void 0===e||null===(t=e.bindTrackerABVersion)||void 0===t||t.call(e,null===(n=this.player)||void 0===n||null===(n=n.vodLogger)||void 0===n?void 0:n.tracker)),this.videoType,kse.LIVE}},{key:"patchEvent",value:function(e,t){var n,r,i,o,a=this;null===(n=this.strategyCenter)||void 0===n||null===(r=n.getStrategyList)||void 0===r||cae(i=r.call(n)).call(i,(function(n){var r;null==n||null===(r=n.onPlayerEvent)||void 0===r||r.call(n,e,{playerInst:n,options:t})})),null===(o=this.ctx.playerManager.getPlayerList())||void 0===o||cae(o).call(o,(function(n){var r,i,o;(null==n||null===(r=n.getInst)||void 0===r||null===(r=r.call(n))||void 0===r?void 0:r.playerId)!==a.player.playerId&&(null==n||null===(i=n.getInst)||void 0===i||null===(i=i.call(n))||void 0===i||null===(i=i.strategyCenter)||void 0===i||null===(o=i.getStrategyList)||void 0===o||null===(o=o.call(i))||void 0===o||cae(o).call(o,(function(r){var i;null==r||null===(i=r.onGlobalEvent)||void 0===i||i.call(r,e,{playerInst:n,options:t})})))}))}},{key:"afterCreate",value:function(){var e=this;this.on(vS,(function(t){e.patchEvent(vS,t),Tve.info("Event",vS)}))}},{key:"destroy",value:function(){this.ctx.playerManager.removePlayer(this.player.playerId),this.player.off("abLog",this.playerLogEventHandler)}}],[{key:"pluginName",get:function(){return"veStrategyBasePlugin"}},{key:"defaultConfig",get:function(){return{text:"策略基础插件"}}}]),n}(),Sve=function(){function e(){iae(this,e)}return aae(e,[{key:"apply",value:function(e,t){var n,r,i=this,o=t||{},a=o.plugins,s=o.pluginConfiguration,c=o.result;return e?(null!=a&&a.length&&bve(e.presets)?e.presets.unshift(aae((function e(){iae(this,e),aee(this,"plugins",a)}))):null!=a&&a.length&&bve(e.plugins)&&(e.plugins=Pae(a).call(a,e.plugins)),null!=a&&a.length&&s&&cae(r=lae(s)).call(r,(function(t){e[t]=s[t]})),c&&cae(n=lae(c)).call(n,(function(t){t===Mse.adaptRange&&i.adaptRange(e,c[t])})),e):e}},{key:"_findConfig",value:function(e,t){var n;return tde(n=lae(e)).call(n,(function(e){return(null==e?void 0:e.toLowerCase())===t}))}},{key:"adaptRange",value:function(e,t){var n,r;if(null==t||!t.enable||!e||null==t||!t._vtype)return e;if(!use(n=[Ese.MP4,Ese.DASH]).call(n,t._vtype))return e;var i=this._findConfig(e,t._vtype===Ese.MP4?"mp4encryptplayer":"dashplugin");return i&&e[i]&&t.options?(e[i].adaptRange=cee(cee({},null!==(r=e[i].adaptRange)&&void 0!==r?r:{}),t.options),e):e}}]),e}(),Eve=hY,Mve=_J("iterator"),Dve=!Eve((function(){var e=new Qx("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n=new EU("a=1&a=2"),r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),n.delete("a",2),!e.toJSON||!n.has("a",1)||n.has("a",2)||!t.size&&true||!qk(t)||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new EU("?a=1"))||!t[Mve]||"a"!==new Qx("https://a@b").username||"b"!==new EU(new EU("a=b")).get("a")||"xn--e1aybc"!==new Qx("http://тест").host||"#%D0%B1"!==new Qx("http://a#б").hash||"a1c3"!==r||"x"!==new Qx("http://x",void 0).host})),zve=r5,Ave=Math.floor,Pve=function(e,t){for(var n,r,i=e.length,o=1;o<i;){for(r=o,n=e[o];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==o++&&(e[r]=n)}return e},xve=function(e,t,n,r){for(var i=t.length,o=n.length,a=0,s=0;a<i||s<o;)e[a+s]=a<i&&s<o?r(t[a],n[s])<=0?t[a++]:n[s++]:a<i?t[a++]:n[s++];return e},Cve=function e(t,n){var r=t.length,i=Ave(r/2);return r<8?Pve(t,n):xve(t,e(zve(t,0,i),n),e(zve(t,i),n),n)},Fve=F0,Ive=dY,Hve=LY,Ove=GY,Lve=IY,Xve=Dve,Uve=d5,Bve=f5,Nve=Bhe,Vve=H5,jve=q3,Kve=J5,Wve=jte,Qve=CY,qve=oJ,Zve=r0,Yve=s1,$ve=l0,Jve=s$,ege=J1,tge=K2,nge=KY,rge=Zee,ige=Nee,oge=nne,age=Cve,sge=_J("iterator"),cge="URLSearchParams",lge=cge+"Iterator",uge=Kve.set,dge=Kve.getterFor(cge),hge=Kve.getterFor(lge),fge=uG,pge=function(e){if(!Lve)return Ive[e];var t=fge(Ive,e);return t&&t.value},vge=pge("fetch"),gge=pge("Request"),yge=pge("Headers"),mge=gge&&gge.prototype,_ge=yge&&yge.prototype,bge=Ive.RegExp,Rge=Ive.TypeError,wge=Ive.decodeURIComponent,Gge=Ive.encodeURIComponent,Tge=Ove("".charAt),kge=Ove([].join),Sge=Ove([].push),Ege=Ove("".replace),Mge=Ove([].shift),Dge=Ove(vw([])),zge=Ove("".split),Age=Ove(QR("")),Pge=/\+/g,xge=Array(4),Cge=function(e){return xge[e-1]||(xge[e-1]=bge("((?:%[\\da-f]{2}){"+e+"})","gi"))},Fge=function(e){try{return wge(e)}catch(t){return e}},Ige=function(e){var t=Ege(e,Pge," "),n=4;try{return wge(t)}catch(r){for(;n;)t=Ege(t,Cge(n--),Fge);return t}},Hge=/[!'()~]|%20/g,Oge={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Lge=function(e){return Oge[e]},Xge=function(e){return Ege(Gge(e),Hge,Lge)},Uge=jve((function(e,t){uge(this,{type:lge,iterator:rge(PL(dge(e))),kind:t})}),"Iterator",(function(){var e=hge(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),!0),Bge=function(e){this.entries=[],this.url=null,void 0!==e&&(Jve(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Tge(e,0)?Age(e,1):e:ege(e)))};Bge.prototype={type:cge,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,o,a,s,c=ige(e);if(c)for(n=(t=rge(e,c)).next;!(r=Hve(n,t)).done;){if(o=(i=rge($ve(r.value))).next,(a=Hve(o,i)).done||(s=Hve(o,i)).done||!Hve(o,i).done)throw Rge("Expected sequence with length 2");Sge(PL(this),{key:ege(a.value),value:ege(s.value)})}else for(var l in e)qve(e,l)&&Sge(PL(this),{key:l,value:ege(e[l])})},parseQuery:function(e){if(e)for(var t,n,r=zge(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(n=zge(t,"="),Sge(PL(this),{key:Ige(Mge(n)),value:Ige(kge(n,"="))}))},serialize:function(){for(var e,t=PL(this),n=[],r=0;r<t.length;)e=t[r++],Sge(n,Xge(e.key)+"="+Xge(e.value));return kge(n,"&")},update:function(){PL(this).length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Nge=function(){Wve(this,Vge);var e=uge(this,new Bge(arguments.length>0?arguments[0]:void 0));Lve||(this.size=PL(e).length)},Vge=Nge.prototype;if(Nve(Vge,{append:function(e,t){var n=dge(this);oge(arguments.length,2),Sge(PL(n),{key:ege(e),value:ege(t)}),Lve||this.length++,n.updateURL()},delete:function(e){for(var t=dge(this),n=oge(arguments.length,1),r=PL(t),i=ege(e),o=n<2?void 0:arguments[1],a=void 0===o?o:ege(o),s=0;s<r.length;){var c=r[s];if(c.key!==i||void 0!==a&&c.value!==a)s++;else if(Dge(r,s,1),void 0!==a)break}Lve||(this.size=r.length),t.updateURL()},get:function(e){var t=PL(dge(this));oge(arguments.length,1);for(var n=ege(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){var t=PL(dge(this));oge(arguments.length,1);for(var n=ege(e),r=[],i=0;i<t.length;i++)t[i].key===n&&Sge(r,t[i].value);return r},has:function(e){for(var t=PL(dge(this)),n=oge(arguments.length,1),r=ege(e),i=n<2?void 0:arguments[1],o=void 0===i?i:ege(i),a=0;a<t.length;){var s=t[a++];if(s.key===r&&(void 0===o||s.value===o))return!0}return!1},set:function(e,t){var n=dge(this);oge(arguments.length,1);for(var r,i=PL(n),o=!1,a=ege(e),s=ege(t),c=0;c<i.length;c++)(r=i[c]).key===a&&(o?Dge(i,c--,1):(o=!0,r.value=s));o||Sge(i,{key:a,value:s}),Lve||(this.size=i.length),n.updateURL()},sort:function(){var e=dge(this);age(PL(e),(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=PL(dge(this)),r=Zve(e,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new Uge(this,"keys")},values:function(){return new Uge(this,"values")},entries:function(){return new Uge(this,"entries")}},{enumerable:!0}),Uve(Vge,sge,PL(Vge),{name:"entries"}),Uve(Vge,"toString",(function(){return dge(this).serialize()}),{enumerable:!0}),Lve&&Bve(Vge,"size",{get:function(){return PL(dge(this)).length},configurable:!0,enumerable:!0}),Vve(Nge,cge),Fve({global:!0,constructor:!0,forced:!Xve},{URLSearchParams:Nge}),!Xve&&Qve(yge)){var jge=Ove(_ge.has),Kge=Ove(_ge.set),Wge=function(e){if(Jve(e)){var t,n=e.body;if(Yve(n)===cge)return t=e.headers?new yge(e.headers):new yge,jge(t,"content-type")||Kge(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),tge(e,{body:nge(0,ege(n)),headers:nge(0,t)})}return e};if(Qve(vge)&&Fve({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return vge(e,arguments.length>1?Wge(arguments[1]):{})}}),Qve(gge)){var Qge=function(e){return Wve(this,mge),new gge(e,arguments.length>1?Wge(arguments[1]):{})};mge.constructor=Qge,Qge.prototype=mge,Fve({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Qge})}}var qge,Zge={URLSearchParams:Nge,getState:dge},Yge=GY,$ge=2147483647,Jge=/[^\0-\u007E]/,eye=/[.\u3002\uFF0E\uFF61]/g,tye="Overflow: input needs wider integers to process",nye=RangeError,rye=Yge(eye.exec),iye=Math.floor,oye=String.fromCharCode,aye=Yge("".charCodeAt),sye=Yge([].join),cye=Yge([].push),lye=Yge("".replace),uye=Yge("".split),dye=Yge("".toLowerCase),hye=function(e){return e+22+75*(e<26)},fye=function(e,t,n){var r=0;for(e=n?iye(e/700):e>>1,e+=iye(e/t);e>455;)e=iye(e/35),r+=36;return iye(r+36*e/(e+38))},pye=function(e){var t,n,r=[],i=(e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=aye(e,n++);if(i>=55296&&i<=56319&&n<r){var o=aye(e,n++);56320==(64512&o)?cye(t,((1023&i)<<10)+(1023&o)+65536):(cye(t,i),n--)}else cye(t,i)}return t}(e)).length,o=128,a=0,s=72;for(t=0;t<e.length;t++)(n=e[t])<128&&cye(r,oye(n));var c=r.length,l=c;for(c&&cye(r,"-");l<i;){var u=$ge;for(t=0;t<e.length;t++)(n=e[t])>=o&&n<u&&(u=n);var d=l+1;if(u-o>iye(($ge-a)/d))throw nye(tye);for(a+=(u-o)*d,o=u,t=0;t<e.length;t++){if((n=e[t])<o&&++a>$ge)throw nye(tye);if(n==o){for(var h=a,f=36;;){var p=f<=s?1:f>=s+26?26:f-s;if(h<p)break;var v=h-p,g=36-p;cye(r,oye(hye(p+v%g))),h=iye(v/g),f+=36}cye(r,oye(hye(h))),s=fye(a,d,l==c),a=0,l++}}a++,o++}return sye(r,"")},vye=F0,gye=IY,yye=Dve,mye=dY,_ye=r0,bye=GY,Rye=d5,wye=f5,Gye=jte,Tye=oJ,kye=kae,Sye=tve,Eye=r5,Mye=_8.codeAt,Dye=function(e){var t,n,r=[],i=uye(lye(dye(e),eye,"."),".");for(t=0;t<i.length;t++)n=i[t],cye(r,rye(Jge,n)?"xn--"+pye(n):n);return sye(r,".")},zye=J1,Aye=H5,Pye=nne,xye=Zge,Cye=J5,Fye=Cye.set,Iye=Cye.getterFor("URL"),Hye=xye.URLSearchParams,Oye=xye.getState,Lye=mye.URL,Xye=mye.TypeError,Uye=mye.parseInt,Bye=Math.floor,Nye=Math.pow,Vye=bye("".charAt),jye=bye(/./.exec),Kye=bye([].join),Wye=bye(1..toString),Qye=bye([].pop),qye=bye([].push),Zye=bye("".replace),Yye=bye([].shift),$ye=bye("".split),Jye=bye(QR("")),eme=bye("".toLowerCase),tme=bye([].unshift),nme="Invalid scheme",rme="Invalid host",ime="Invalid port",ome=/[a-z]/i,ame=/[\d+-.a-z]/i,sme=/\d/,cme=/^0x/i,lme=/^[0-7]+$/,ume=/^\d+$/,dme=/^[\da-f]+$/i,hme=/[\0\t\n\r #%/:<>?@[\\\]^|]/,fme=/[\0\t\n\r #/:<>?@[\\\]^|]/,pme=/^[\u0000-\u0020]+/,vme=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,gme=/[\t\n\r]/g,yme=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)tme(t,e%256),e=Bye(e/256);return Kye(t,".")}if("object"==Su(e)){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,o=0;o<8;o++)0!==e[o]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(t=r,n=i),t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=Wye(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},mme={},_me=kye({},mme,{" ":1,'"':1,"<":1,">":1,"`":1}),bme=kye({},_me,{"#":1,"?":1,"{":1,"}":1}),Rme=kye({},bme,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),wme=function(e,t){var n=Mye(e,0);return n>32&&n<127&&!Tye(t,e)?e:encodeURIComponent(e)},Gme={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Tme=function(e,t){var n;return 2==e.length&&jye(ome,Vye(e,0))&&(":"==(n=Vye(e,1))||!t&&"|"==n)},kme=function(e){var t;return e.length>1&&Tme(Jye(e,0,2))&&(2==e.length||"/"===(t=Vye(e,2))||"\\"===t||"?"===t||"#"===t)},Sme=function(e){return"."===e||"%2e"===eme(e)},Eme=function(e){return".."===(e=eme(e))||"%2e."===e||".%2e"===e||"%2e%2e"===e},Mme={},Dme={},zme={},Ame={},Pme={},xme={},Cme={},Fme={},Ime={},Hme={},Ome={},Lme={},Xme={},Ume={},Bme={},Nme={},Vme={},jme={},Kme={},Wme={},Qme={},qme=function e(t,n,r){var i,o,a,s=zye(t);if(n){if(o=this.parse(s))throw Xye(o);this.searchParams=null}else{if(void 0!==r&&(i=new e(r,!0)),o=this.parse(s,null,i))throw Xye(o);(a=Oye(new Hye)).bindURL(this),this.searchParams=a}};qme.prototype={type:"URL",parse:function(e,t,n){var r,i,o,a,s=this,c=t||Mme,l=0,u="",d=!1,h=!1,f=!1;for(e=zye(e),t||(s.scheme="",s.username="",s.password="",s.host=null,s.port=null,s.path=[],s.query=null,s.fragment=null,s.cannotBeABaseURL=!1,e=Zye(e,pme,""),e=Zye(e,vme,"$1")),e=Zye(e,gme,""),r=Sye(e);l<=r.length;){switch(i=r[l],c){case Mme:if(!i||!jye(ome,i)){if(t)return nme;c=zme;continue}u+=eme(i),c=Dme;break;case Dme:if(i&&(jye(ame,i)||"+"==i||"-"==i||"."==i))u+=eme(i);else{if(":"!=i){if(t)return nme;u="",c=zme,l=0;continue}if(t&&(s.isSpecial()!=Tye(Gme,u)||"file"==u&&(s.includesCredentials()||null!==s.port)||"file"==s.scheme&&!s.host))return;if(s.scheme=u,t)return void(s.isSpecial()&&Gme[s.scheme]==s.port&&(s.port=null));u="","file"==s.scheme?c=Ume:s.isSpecial()&&n&&n.scheme==s.scheme?c=Ame:s.isSpecial()?c=Fme:"/"==r[l+1]?(c=Pme,l++):(s.cannotBeABaseURL=!0,qye(s.path,""),c=Kme)}break;case zme:if(!n||n.cannotBeABaseURL&&"#"!=i)return nme;if(n.cannotBeABaseURL&&"#"==i){s.scheme=n.scheme,s.path=Eye(n.path),s.query=n.query,s.fragment="",s.cannotBeABaseURL=!0,c=Qme;break}c="file"==n.scheme?Ume:xme;continue;case Ame:if("/"!=i||"/"!=r[l+1]){c=xme;continue}c=Ime,l++;break;case Pme:if("/"==i){c=Hme;break}c=jme;continue;case xme:if(s.scheme=n.scheme,i==qge)s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,s.path=Eye(n.path),s.query=n.query;else if("/"==i||"\\"==i&&s.isSpecial())c=Cme;else if("?"==i)s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,s.path=Eye(n.path),s.query="",c=Wme;else{if("#"!=i){s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,s.path=Eye(n.path),s.path.length--,c=jme;continue}s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,s.path=Eye(n.path),s.query=n.query,s.fragment="",c=Qme}break;case Cme:if(!s.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,c=jme;continue}c=Hme}else c=Ime;break;case Fme:if(c=Ime,"/"!=i||"/"!=Vye(u,l+1))continue;l++;break;case Ime:if("/"!=i&&"\\"!=i){c=Hme;continue}break;case Hme:if("@"==i){d&&(u="%40"+u),d=!0,o=Sye(u);for(var p=0;p<o.length;p++){var v=o[p];if(":"!=v||f){var g=wme(v,Rme);f?s.password+=g:s.username+=g}else f=!0}u=""}else if(i==qge||"/"==i||"?"==i||"#"==i||"\\"==i&&s.isSpecial()){if(d&&""==u)return"Invalid authority";l-=Sye(u).length+1,u="",c=Ome}else u+=i;break;case Ome:case Lme:if(t&&"file"==s.scheme){c=Nme;continue}if(":"!=i||h){if(i==qge||"/"==i||"?"==i||"#"==i||"\\"==i&&s.isSpecial()){if(s.isSpecial()&&""==u)return rme;if(t&&""==u&&(s.includesCredentials()||null!==s.port))return;if(a=s.parseHost(u))return a;if(u="",c=Vme,t)return;continue}"["==i?h=!0:"]"==i&&(h=!1),u+=i}else{if(""==u)return rme;if(a=s.parseHost(u))return a;if(u="",c=Xme,t==Lme)return}break;case Xme:if(!jye(sme,i)){if(i==qge||"/"==i||"?"==i||"#"==i||"\\"==i&&s.isSpecial()||t){if(""!=u){var y=Uye(u,10);if(y>65535)return ime;s.port=s.isSpecial()&&y===Gme[s.scheme]?null:y,u=""}if(t)return;c=Vme;continue}return ime}u+=i;break;case Ume:if(s.scheme="file","/"==i||"\\"==i)c=Bme;else{if(!n||"file"!=n.scheme){c=jme;continue}if(i==qge)s.host=n.host,s.path=Eye(n.path),s.query=n.query;else if("?"==i)s.host=n.host,s.path=Eye(n.path),s.query="",c=Wme;else{if("#"!=i){kme(Kye(Eye(r,l),""))||(s.host=n.host,s.path=Eye(n.path),s.shortenPath()),c=jme;continue}s.host=n.host,s.path=Eye(n.path),s.query=n.query,s.fragment="",c=Qme}}break;case Bme:if("/"==i||"\\"==i){c=Nme;break}n&&"file"==n.scheme&&!kme(Kye(Eye(r,l),""))&&(Tme(n.path[0],!0)?qye(s.path,n.path[0]):s.host=n.host),c=jme;continue;case Nme:if(i==qge||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&Tme(u))c=jme;else if(""==u){if(s.host="",t)return;c=Vme}else{if(a=s.parseHost(u))return a;if("localhost"==s.host&&(s.host=""),t)return;u="",c=Vme}continue}u+=i;break;case Vme:if(s.isSpecial()){if(c=jme,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=qge&&(c=jme,"/"!=i))continue}else s.fragment="",c=Qme;else s.query="",c=Wme;break;case jme:if(i==qge||"/"==i||"\\"==i&&s.isSpecial()||!t&&("?"==i||"#"==i)){if(Eme(u)?(s.shortenPath(),"/"==i||"\\"==i&&s.isSpecial()||qye(s.path,"")):Sme(u)?"/"==i||"\\"==i&&s.isSpecial()||qye(s.path,""):("file"==s.scheme&&!s.path.length&&Tme(u)&&(s.host&&(s.host=""),u=Vye(u,0)+":"),qye(s.path,u)),u="","file"==s.scheme&&(i==qge||"?"==i||"#"==i))for(;s.path.length>1&&""===s.path[0];)Yye(s.path);"?"==i?(s.query="",c=Wme):"#"==i&&(s.fragment="",c=Qme)}else u+=wme(i,bme);break;case Kme:"?"==i?(s.query="",c=Wme):"#"==i?(s.fragment="",c=Qme):i!=qge&&(s.path[0]+=wme(i,mme));break;case Wme:t||"#"!=i?i!=qge&&("'"==i&&s.isSpecial()?s.query+="%27":s.query+="#"==i?"%23":wme(i,mme)):(s.fragment="",c=Qme);break;case Qme:i!=qge&&(s.fragment+=wme(i,_me))}l++}},parseHost:function(e){var t,n,r;if("["==Vye(e,0)){if("]"!=Vye(e,e.length-1))return rme;if(!(t=function(e){var t,n,r,i,o,a,s,c=[0,0,0,0,0,0,0,0],l=0,u=null,d=0,h=function(){return Vye(e,d)};if(":"==h()){if(":"!=Vye(e,1))return;d+=2,u=++l}for(;h();){if(8==l)return;if(":"!=h()){for(t=n=0;n<4&&jye(dme,h());)t=16*t+Uye(h(),16),d++,n++;if("."==h()){if(0==n)return;if(d-=n,l>6)return;for(r=0;h();){if(i=null,r>0){if(!("."==h()&&r<4))return;d++}if(!jye(sme,h()))return;for(;jye(sme,h());){if(o=Uye(h(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;d++}c[l]=256*c[l]+i,2!=++r&&4!=r||l++}if(4!=r)return;break}if(":"==h()){if(d++,!h())return}else if(h())return;c[l++]=t}else{if(null!==u)return;d++,u=++l}}if(null!==u)for(a=l-u,l=7;0!=l&&a>0;)s=c[l],c[l--]=c[u+a-1],c[u+--a]=s;else if(8!=l)return;return c}(Jye(e,1,-1))))return rme;this.host=t}else if(this.isSpecial()){if(e=Dye(e),jye(hme,e))return rme;if(null===(t=function(e){var t,n,r,i,o,a,s,c=$ye(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=c[r]))return e;if(o=10,i.length>1&&"0"==Vye(i,0)&&(o=jye(cme,i)?16:8,i=Jye(i,8==o?1:2)),""===i)a=0;else{if(!jye(10==o?ume:8==o?lme:dme,i))return e;a=Uye(i,o)}qye(n,a)}for(r=0;r<t;r++)if(a=n[r],r==t-1){if(a>=Nye(256,5-t))return null}else if(a>255)return null;for(s=Qye(n),r=0;r<n.length;r++)s+=n[r]*Nye(256,3-r);return s}(e)))return rme;this.host=t}else{if(jye(fme,e))return rme;for(t="",n=Sye(e),r=0;r<n.length;r++)t+=wme(n[r],mme);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return Tye(Gme,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&Tme(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,i=e.host,o=e.port,a=e.path,s=e.query,c=e.fragment,l=t+":";return null!==i?(l+="//",e.includesCredentials()&&(l+=n+(r?":"+r:"")+"@"),l+=yme(i),null!==o&&(l+=":"+o)):"file"==t&&(l+="//"),l+=e.cannotBeABaseURL?a[0]:a.length?"/"+Kye(a,"/"):"",null!==s&&(l+="?"+s),null!==c&&(l+="#"+c),l},setHref:function(e){var t=this.parse(e);if(t)throw Xye(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new Zme(e.path[0]).origin}catch(n){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+yme(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(zye(e)+":",Mme)},getUsername:function(){return this.username},setUsername:function(e){var t=Sye(zye(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=wme(t[n],Rme)}},getPassword:function(){return this.password},setPassword:function(e){var t=Sye(zye(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=wme(t[n],Rme)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?yme(e):yme(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Ome)},getHostname:function(){var e=this.host;return null===e?"":yme(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Lme)},getPort:function(){var e=this.port;return null===e?"":zye(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=zye(e))?this.port=null:this.parse(e,Xme))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+Kye(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Vme))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=zye(e))?this.query=null:("?"==Vye(e,0)&&(e=Jye(e,1)),this.query="",this.parse(e,Wme)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=zye(e))?("#"==Vye(e,0)&&(e=Jye(e,1)),this.fragment="",this.parse(e,Qme)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Zme=function(e){var t=Gye(this,Yme),n=Pye(arguments.length,1)>1?arguments[1]:void 0,r=Fye(t,new qme(e,!1,n));gye||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},Yme=Zme.prototype,$me=function(e,t){return{get:function(){return Iye(this)[e]()},set:t&&function(e){return Iye(this)[t](e)},configurable:!0,enumerable:!0}};if(gye&&(wye(Yme,"href",$me("serialize","setHref")),wye(Yme,"origin",$me("getOrigin")),wye(Yme,"protocol",$me("getProtocol","setProtocol")),wye(Yme,"username",$me("getUsername","setUsername")),wye(Yme,"password",$me("getPassword","setPassword")),wye(Yme,"host",$me("getHost","setHost")),wye(Yme,"hostname",$me("getHostname","setHostname")),wye(Yme,"port",$me("getPort","setPort")),wye(Yme,"pathname",$me("getPathname","setPathname")),wye(Yme,"search",$me("getSearch","setSearch")),wye(Yme,"searchParams",$me("getSearchParams")),wye(Yme,"hash",$me("getHash","setHash"))),Rye(Yme,"toJSON",(function(){return Iye(this).serialize()}),{enumerable:!0}),Rye(Yme,"toString",(function(){return Iye(this).serialize()}),{enumerable:!0}),Lye){var Jme=Lye.createObjectURL,e_e=Lye.revokeObjectURL;Jme&&Rye(Zme,"createObjectURL",_ye(Jme,Lye)),e_e&&Rye(Zme,"revokeObjectURL",_ye(e_e,Lye))}Aye(Zme,"URL"),vye({global:!0,constructor:!0,forced:!yye,sham:!gye},{URL:Zme});var t_e=F0,n_e=hY,r_e=nne,i_e=J1,o_e=Dve,a_e=f$("URL");t_e({target:"URL",stat:!0,forced:!(o_e&&n_e((function(){a_e.canParse()})))},{canParse:function(e){var t=r_e(arguments.length,1),n=i_e(e),r=t<2||void 0===arguments[1]?void 0:i_e(arguments[1]);try{return!!new a_e(n,r)}catch(i){return!1}}});var s_e=lY(c$.URL),c_e=oJ,l_e=LY,u_e=s$,d_e=l0,h_e=function(e){return void 0!==e&&(c_e(e,"value")||c_e(e,"writable"))},f_e=FY,p_e=P3;F0({target:"Reflect",stat:!0},{get:function e(t,n){var r,i,o=arguments.length<3?t:arguments[2];return d_e(t)===o?t[n]:(r=f_e.f(t,n))?h_e(r)?r.value:void 0===r.get?void 0:l_e(r.get,o):u_e(i=p_e(t))?e(i,n,o):void 0}});var v_e=lY(c$.Reflect.get);function g_e(){var e;return g_e="undefined"!=typeof Reflect&&v_e?ece(e=v_e).call(e):function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=mce(e)););return e}(e,t);if(r){var i=e9(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},g_e.apply(this,arguments)}function y_e(e,t,n){var r;return(y_e=_ce()?ece(r=yce).call(r):function(e,t,n){var r=[null];y9(r).apply(r,t);var i=new(ece(Function).apply(e,r));return n&&tce(i,n.prototype),i}).apply(null,arguments)}var m_e=dY;F0({global:!0,forced:m_e.globalThis!==m_e},{globalThis:m_e});var __e,b_e,R_e,w_e,G_e,T_e,k_e=lY(dY),S_e=(null===(__e=void 0!==k_e?k_e:void 0)||void 0===__e?void 0:__e.crypto)||(null===(b_e="undefined"!=typeof global?global:void 0)||void 0===b_e?void 0:b_e.crypto)||(null===(R_e="undefined"!=typeof window?window:void 0)||void 0===R_e?void 0:R_e.crypto)||(null===(w_e="undefined"!=typeof self?self:void 0)||void 0===w_e?void 0:w_e.crypto)||(null===(G_e="undefined"!=typeof frames?frames:void 0)||void 0===G_e||null===(G_e=G_e[0])||void 0===G_e?void 0:G_e.crypto);T_e=S_e?function(e){for(var t=[],n=0;n<e;n+=4)t.push(S_e.getRandomValues(new Uint32Array(1))[0]);return new M_e(t,e)}:function(e){for(var t,n=[],r=function(e){var t=e,n=987654321,r=4294967295;return function(){var e=((n=36969*(65535&n)+(n>>16)&r)<<16)+(t=18e3*(65535&t)+(t>>16)&r)&r;return e/=4294967296,(e+=.5)*(Math.random()>.5?1:-1)}},i=0;i<e;i+=4){var o=r(4294967296*(t||Math.random()));t=987654071*o(),n.push(4294967296*o()|0)}return new M_e(n,e)};var E_e=function(){function e(){iae(this,e)}return aae(e,[{key:"mixIn",value:function(e){return Sae(this,e)}},{key:"clone",value:function(){var e=new this.constructor;return Sae(e,this),e}}],[{key:"create",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return y_e(this,t)}}]),e}(),M_e=function(e){nce(n,E_e);var t=Rce(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4*r.length;iae(this,n),e=t.call(this);var o=r;if(o instanceof ArrayBuffer&&(o=new Uint8Array(o)),(o instanceof Int8Array||o instanceof Uint8ClampedArray||o instanceof Int16Array||o instanceof Uint16Array||o instanceof Int32Array||o instanceof Uint32Array||o instanceof Float32Array||o instanceof Float64Array)&&(o=new Uint8Array(o.buffer,o.byteOffset,o.byteLength)),o instanceof Uint8Array){for(var a=o.byteLength,s=[],c=0;c<a;c+=1)s[c>>>2]|=o[c]<<24-c%4*8;e.words=s,e.sigBytes=a}else e.words=r,e.sigBytes=i;return e}return aae(n,[{key:"toString",value:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:D_e).stringify(this)}},{key:"concat",value:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o+=1){var a=n[o>>>2]>>>24-o%4*8&255;t[r+o>>>2]|=a<<24-(r+o)%4*8}else for(var s=0;s<i;s+=4)t[r+s>>>2]=n[s>>>2];return this.sigBytes+=i,this}},{key:"clamp",value:function(){var e=this.words,t=this.sigBytes;e[t>>>2]&=4294967295<<32-t%4*8,e.length=Math.ceil(t/4)}},{key:"clone",value:function(){var e,t=g_e(mce(n.prototype),"clone",this).call(this);return t.words=Kue(e=this.words).call(e,0),t}}]),n}();aee(M_e,"random",T_e);var D_e={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i+=1){var o=t[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=mue(e.substr(r,2),16)<<24-r%8*4;return new M_e(n,t/2)}},z_e=function(e){for(var t=e.length,n=[],r=0;r<t;r+=1)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new M_e(n,t)},A_e=function(e){return z_e(unescape(encodeURIComponent(e)))},P_e=function(e){nce(n,E_e);var t=Rce(n);function n(){var e;return iae(this,n),(e=t.call(this))._minBufferSize=0,e}return aae(n,[{key:"reset",value:function(){this._data=new M_e,this._nDataBytes=0}},{key:"_append",value:function(e){var t,n=e;"string"==typeof n&&(n=A_e(n)),Pae(t=this._data).call(t,n),this._nDataBytes+=n.sigBytes}},{key:"_process",value:function(e){var t,n=this._data,r=this.blockSize,i=n.words,o=n.sigBytes,a=o/(4*r),s=(a=e?Math.ceil(a):Math.max((0|a)-this._minBufferSize,0))*r,c=Math.min(4*s,o);if(s){for(var l=0;l<s;l+=r)this._doProcessBlock(i,l);t=Ude(i).call(i,0,s),n.sigBytes-=c}return new M_e(t,c)}},{key:"clone",value:function(){var e=g_e(mce(n.prototype),"clone",this).call(this);return e._data=this._data.clone(),e}}]),n}(),x_e=function(e){nce(n,P_e);var t=Rce(n);function n(e){var r;return iae(this,n),(r=t.call(this)).blockSize=16,r.cfg=Sae(new E_e,e),r.reset(),r}return aae(n,[{key:"reset",value:function(){g_e(mce(n.prototype),"reset",this).call(this),this._doReset()}},{key:"update",value:function(e){return this._append(e),this._process(),this}},{key:"finalize",value:function(e){return e&&this._append(e),this._doFinalize()}}],[{key:"_createHelper",value:function(e){return function(t,n){return new e(n).finalize(t)}}},{key:"_createHmacHelper",value:function(e){return function(t,n){return new C_e(e,n).finalize(t)}}}]),n}(),C_e=function(e){nce(n,E_e);var t=Rce(n);function n(e,r){var i;iae(this,n),i=t.call(this);var o=new e;i._hasher=o;var a=r;"string"==typeof a&&(a=A_e(a));var s=o.blockSize,c=4*s;a.sigBytes>c&&(a=o.finalize(r)),a.clamp();var l=a.clone();i._oKey=l;var u=a.clone();i._iKey=u;for(var d=l.words,h=u.words,f=0;f<s;f+=1)d[f]^=1549556828,h[f]^=909522486;return l.sigBytes=c,u.sigBytes=c,i.reset(),i}return aae(n,[{key:"reset",value:function(){var e=this._hasher;e.reset(),e.update(this._iKey)}},{key:"update",value:function(e){return this._hasher.update(e),this}},{key:"finalize",value:function(e){var t,n=this._hasher,r=n.finalize(e);return n.reset(),n.finalize(Pae(t=this._oKey.clone()).call(t,r))}}]),n}(),F_e=[],I_e=function(e){nce(n,x_e);var t=Rce(n);function n(){return iae(this,n),t.apply(this,arguments)}return aae(n,[{key:"_doReset",value:function(){this._hash=new M_e([1732584193,4023233417,2562383102,271733878,3285377520])}},{key:"_doProcessBlock",value:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=0;c<80;c+=1){if(c<16)F_e[c]=0|e[t+c];else{var l=F_e[c-3]^F_e[c-8]^F_e[c-14]^F_e[c-16];F_e[c]=l<<1|l>>>31}var u=(r<<5|r>>>27)+s+F_e[c];u+=c<20?1518500249+(i&o|~i&a):c<40?1859775393+(i^o^a):c<60?(i&o|i&a|o&a)-1894007588:(i^o^a)-899497514,s=a,a=o,o=i<<30|i>>>2,i=r,r=u}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0}},{key:"_doFinalize",value:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash}},{key:"clone",value:function(){var e=g_e(mce(n.prototype),"clone",this).call(this);return e._hash=this._hash.clone(),e}}]),n}();x_e._createHelper(I_e);var H_e,O_e=x_e._createHmacHelper(I_e);!function(e,t,n){function r(e,t){var n=Ow(QR(e).call(e,t,t+2),16);return n>>>7==0?[1,n]:n>>>6==2?(n=(63&n)<<8,[2,n+=Ow(QR(e).call(e,t+2,t+4),16)]):(n=(63&n)<<16,[3,n+=Ow(QR(e).call(e,t+2,t+6),16)])}var i,o=0,a=[],s=[];for(i=0;i<4;++i)o+=(3&Ow(QR(e).call(e,8+2*i,10+2*i),16))<<2*i;var c=Ow(QR(e).call(e,16,24),16),l=2*Ow(QR(e).call(e,32,40),16);for(i=40;i<l+40;i+=2)a.push(Ow(QR(e).call(e,i,i+2),16));var u=l+40,d=Ow(QR(e).call(e,u,u+4),16);for(u+=4,i=0;i<d;++i){var h=r(e,u);u+=2*h[0];for(var f="",p=0;p<h[1];++p){var v=r(e,u);f+=String.fromCharCode(o^v[1]),u+=2*v[0]}s.push(f)}t.p=null,function e(t,n,r,i,o,c){var l,u,d,h,f,p=-1,v=[],g=null,y=[n];for(u=Math.min(n.length,r),d=0;d<u;++d)y.push(n[d]);y.p=i;for(var m=[];;)try{switch(a[t++]){case 59:v[++p]=null;break;case 36:l=((l=((l=a[t++])<<8)+a[t++])<<8)+a[t++],v[++p]=(l<<8)+a[t++];break;case 43:l=(a[t]<<8)+a[t+1],t+=2,v[++p]=s[l];break;case 3:v[++p]=void 0;break;case 52:l=(a[t]<<8)+a[t+1],t+=2,p=p-l+1,u=QR(v).call(v,p,p+l),v[p]=u;break;case 47:for(u=a[t++],d=a[t++],h=y;u>0;--u)h=h.p;v[++p]=h[d];break;case 17:l=(a[t]<<8)+a[t+1],t+=2,u=s[l],v[p]=v[p][u];break;case 44:for(u=a[t++],d=a[t++],h=y;u>0;--u)h=h.p;h[d]=v[p--];break;case 28:l=a[t++],u=v[p--],(d=function e(){var t=e._v;return(0,e._u)(t[0],arguments,t[1],t[2],this)})._v=[u,l,y],d._u=e,v[++p]=d;break;case 64:for(u=v[p--],d=null;h=m.pop();)if(2===h[0]||3===h[0]){d=h;break}if(d)t=d[2],d[0]=0,m.push(d);else{if(!g)return u;t=g[1],o=g[2],y=g[3],m=g[4],v[++p]=u,g=g[0]}break;case 67:p-=l=a[t++],d=QR(v).call(v,p+1,p+l+1),u=v[p--],h=v[p--],u._u===e?(u=u._v,g=[g,t,o,y,m],t=u[0],null==h&&(h=function(){return this}()),o=h,(y=Xm(c=[d]).call(c,d)).length=Math.min(u[1],l)+1,y.p=u[2],m=[]):(f=u.apply(h,d),v[++p]=f);break;case 70:u=v[p],v[++p]=u;break;default:throw new Error("ioe")}}catch(_){for(;(l=m.pop())&&!l[0];);if(!l){e:for(;g;){for(u=g[4];l=u.pop();)if(l[0])break e;g=g[0]}if(!g)throw _;t=g[1],o=g[2],y=g[3],m=g[4],g=g[0]}1===(u=l[0])?(t=l[2],l[0]=0,m.push(l),v[++p]=_):2===u?(t=l[2],l[0]=0,m.push(l)):(t=l[3],l[0]=2,m.push(l),v[++p]=_)}}(c,[],0,t,n)}("504B0101011a4e7f000000287f4f1a01000000343b2f02002f00012f00022f00032f0004340004461100002b000143012b000243024611000343004024000000001c042c0101034000040480838086808080870180cf2080d880de808380858099808b809c80848081809a80d0808880808081809380d8809b809880d8809f80d980d88083809e80de808780d1808780d080838099808d08809d808680ba809d809b80808087808e",{get 0(){return O_e},get 1(){return H_e},set 1(e){H_e=e}},void 0);var L_e=function(){function e(t,n){var r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Sse.CN;iae(this,e),aee(this,"appId",void 0),aee(this,"ctx",void 0),aee(this,"host",void 0),aee(this,"needSignature",!0),aee(this,"region",void 0),aee(this,"scene",void 0),aee(this,"ext",void 0),this.scene=(r={},aee(r,kse.LIVE,1),aee(r,kse.VOD,0),r)[n.videoType],this.ext=cee({},this.getConfigType(n.strategies)),this.appId=t,this.ctx=n,this.region=i,this.host=this.getHostByRegion()}return aae(e,[{key:"getConfigType",value:function(e){var t;if(!e)return{};var n={};return cae(t=lae(e)).call(t,(function(t){var r=e[t];r&&(n["".concat(t,"_id")]="object"===D8(r)&&r.configId?r.configId:"default")})),n}},{key:"getCacheKey",value:function(){return fae([this.appId,this.ctx.cacheKey,this.ctx.featureCenter.getH265FeatureList().isHevcSupported,this.ctx.featureCenter.getBrowserInfo(),this.ctx.featureCenter.getFeatureList().deviceId])}},{key:"fetch",value:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(rae(tae().mark((function e(){var t,n,r,i,o,a,s;return tae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(this.generateUrl(),{mode:"cors"});case 3:if((t=e.sent).ok){e.next=6;break}throw new Error("Network response was not OK");case 6:return e.next=8,t.json();case 8:return n=e.sent,r=n.data,i=r.custom_settings.web,o=r.general_settings,a=o.use_local_cache,s=o.local_cache_expire,e.abrupt("return",cee(cee({},i),{},{use_local_cache:a,local_cache_expired_at:s>0?Tse()+1e3*s:void 0,cache_key:this.getCacheKey()}));case 17:throw e.prev=17,e.t0=e.catch(0),e.t0;case 20:case"end":return e.stop()}}),e,this,[[0,17]])}))))},{key:"getHostByRegion",value:function(){var e;return(null===(e={cn:{settingsHost:"vod-settings.volcvod.com"}}[this.region])||void 0===e?void 0:e.settingsHost)||"vod-settings.volcvod.com"}},{key:"generateSearchParams",value:function(e){if(e.searchParams.set("module","web"),e.searchParams.set("aid",String(this.appId)),e.searchParams.set("region",this.region),e.searchParams.set("web_support_hardware_decode_bytevc1",String(this.ctx.featureCenter.getH265FeatureList().isHevcSupported)),e.searchParams.set("web_os",this.ctx.featureCenter.getBrowserInfo().osName),e.searchParams.set("web_os_version",this.ctx.featureCenter.getBrowserInfo().osVersion),e.searchParams.set("web_platform",this.ctx.featureCenter.getBrowserInfo().platformType),e.searchParams.set("web_browser",this.ctx.featureCenter.getBrowserInfo().browserName),e.searchParams.set("web_browser_version",this.ctx.featureCenter.getBrowserInfo().browserVersion),e.searchParams.set("web_cpu_core",String(this.ctx.featureCenter.getBrowserInfo().cpuCore)),e.searchParams.set("web_scene",String(this.scene)),e.searchParams.set("web_ext",fae(this.ext)),e.searchParams.set("device_id",this.ctx.featureCenter.getFeatureList().deviceId),this.needSignature){var t=Tse();e.searchParams.set("timestamp",String(t));var n=H_e(this.appId,this.ctx.featureCenter.getFeatureList().deviceId,this.ctx.featureCenter.getBrowserInfo().browserName,t);e.searchParams.set("signature",n)}return e}},{key:"generateUrl",value:function(){return this.generateSearchParams(new s_e("https://".concat(this.host,"/vod/settings/v1")))}}]),e}(),X_e=new zse("VeStrategy"),U_e=aee({},kse.VOD,Sve),B_e=function(){function e(t){iae(this,e),aee(this,"ctx",void 0),aee(this,"configPreparePromise",void 0),aee(this,"isStrategyStarted",!1);var n=new the(t),r=new Ise(t,new L_e(t.appId,{featureCenter:n,cacheKey:t.cacheKey,strategies:t.strategies,videoType:t.type||kse.VOD}));X_e.update(t.log),this.ctx={dataCenter:r,featureCenter:n,playerManager:new yve,tracker:new mve({trackInfo:t.tracker,type:t.type||kse.VOD,lineAppId:t.appId,lineUserId:t.deviceId,appId:t.type===kse.VOD?577780:579013,channel:t.region,cxt:{dataCenter:r,featureCenter:n}})},this.prepare(!0)}var t,n,r,i,o;return aae(e,[{key:"start",value:(o=rae(tae().mark((function e(){var t,n=this;return tae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isStrategyStarted){e.next=2;break}return e.abrupt("return");case 2:if(this.isStrategyStarted=!0,X_e.info("Start"),this.ctx.tracker.track("strategy_start",{}),this.ctx.featureCenter.getFeatureList().deviceId){e.next=13;break}return e.next=8,this.getTeaToken();case 8:if(e.t0=e.sent,e.t0){e.next=11;break}e.t0={};case 11:t=e.t0,this.ctx.featureCenter.updateFeatureList({deviceId:t.user_unique_id||t.web_id||""});case 13:return this.configPreparePromise=this.ctx.dataCenter.fetchStrategyConfig(),this.configPreparePromise.then((function(){return n.prepare(!1)})),e.abrupt("return",this.configPreparePromise);case 16:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"updateFeatures",value:(i=rae(tae().mark((function e(t){var n,r,i;return tae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&null!==(n=this.ctx)&&void 0!==n&&null!==(n=n.featureCenter)&&void 0!==n&&n.updateFeatureList){e.next=2;break}return e.abrupt("return");case 2:if(i=null===(r=this.ctx.featureCenter.getFeatureList())||void 0===r?void 0:r.deviceId,this.ctx.featureCenter.updateFeatureList(cee({},t)),!t.deviceId||t.deviceId===i){e.next=6;break}return e.abrupt("return",this.reloadConfig());case 6:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"reloadConfig",value:(r=rae(tae().mark((function e(){return tae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.configPreparePromise=this.ctx.dataCenter.fetchStrategyConfig(),e.abrupt("return",this.configPreparePromise);case 2:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"getTeaToken",value:(n=rae(tae().mark((function e(){var t=this;return tae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new sae((function(e){var n,r,i;if("function"==typeof(null===(n=t.ctx.tracker)||void 0===n||null===(n=n.tracker)||void 0===n?void 0:n.getToken))return t.ctx.tracker.tracker.getToken((function(t){return e(t)}));var o=((null===(r=t.ctx.tracker)||void 0===r||null===(r=r.tracker)||void 0===r||null===(i=r.getConfig)||void 0===i?void 0:i.call(r))||{}).user;return e(void 0===o?{}:o)})));case 1:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})},{key:"prepare",value:function(e){var t,n=this,r=this.ctx.dataCenter.getInitStrategyConfig()||{},i=this.ctx.dataCenter.getServiceStrategyConfig()||{};cae(t=lae(r)).call(t,(function(t){var o,a,s,c,l,u,d;(null===(o=r[t])||void 0===o?void 0:o.disabled)||(null==i||null===(a=i[t])||void 0===a?void 0:a.disabled)||null===(s=r[t])||void 0===s||null===(s=s.Strategy)||void 0===s||null===(c=s[e?"prepareBeforeStarted":"prepareAfterStarted"])||void 0===c||c.call(s,{ctx:n.ctx,Strategy:null===(l=r[t])||void 0===l?void 0:l.Strategy,config:cee(cee({},null===(u=r[t])||void 0===u?void 0:u.config),null==i||null===(d=i[t])||void 0===d?void 0:d.config)})}))}}],[{key:"init",value:function(t){var n;if(X_e.update(null==t?void 0:t.log),null!=t&&t.appId&&t.strategies){var r={};cae(n=lae(t.strategies)).call(n,(function(e){var n,i;null!==(n=t.strategies)&&void 0!==n&&n[e]&&"object"===D8(null===(i=t.strategies)||void 0===i?void 0:i[e])&&(r[e]=t.strategies[e])}));var i=cee(cee({},t),{},{strategies:r,type:t.type||kse.VOD});if(X_e.info("Init",i),i.type===kse.VOD||i.type===kse.LIVE)return i.type===kse.VOD?(e._vodInst=e._vodInst||new e(i),e._vodInst.ctx.tracker.track("strategy_init",{}),e._vodInst):(e._liveInst=e._liveInst||new e(i),e._liveInst.ctx.tracker.track("strategy_init",{}),e._liveInst);X_e.error("Init Invalid Strategy Type=".concat(t.type))}else X_e.error("Init without appId or strategies",t)}},{key:"bootstrap",value:function(t){var n;return null===(n=e.init(t))||void 0===n?void 0:n.start()}},{key:"inst",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:kse.VOD;return t===kse.VOD?e._vodInst:t===kse.LIVE?e._liveInst:null}},{key:"recLive",value:function(t,n){return e.rec(t,n,kse.LIVE)}},{key:"recAsync",value:(t=rae(tae().mark((function t(n,r){var i,o,a=arguments;return tae().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=a.length>2&&void 0!==a[2]?a[2]:kse.VOD,o=e.inst(i||kse.VOD),X_e.info("recAsync",o,r,i),null!=o&&o.configPreparePromise){t.next=6;break}return X_e.error("VeStrategyNotInitOrStart"),t.abrupt("return",{plugins:[],pluginConfiguration:{},result:{}});case 6:return t.next=8,o.configPreparePromise;case 8:return t.abrupt("return",e.rec(n,r,i));case 9:case"end":return t.stop()}}),t)}))),function(e,n){return t.apply(this,arguments)})},{key:"rec",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:kse.VOD;try{return e._rec(t,n,r)}catch(aK){var i;X_e.error("VeStrategyRecError");var o=e.inst(r);return null==o||null===(i=o.ctx)||void 0===i||null===(i=i.tracker)||void 0===i||i.track("strategy_js_error",{type:r,option:fae(null!=t?t:{}),common_config:fae(null!=n?n:{})}),{plugins:[],pluginConfiguration:{},result:{}}}}},{key:"reportABInfo",value:function(t){var n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:kse.VOD;kse.VOD!==i?kse.LIVE!==i||null===(n=e._liveInst)||void 0===n||null===(n=n.ctx)||void 0===n||null===(n=n.tracker)||void 0===n||n.bindTrackerABVersion(t):null===(r=e._vodInst)||void 0===r||null===(r=r.ctx)||void 0===r||null===(r=r.tracker)||void 0===r||r.bindTrackerABVersion(t)}},{key:"getServiceConfig",value:function(){var t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:kse.VOD;return kse.VOD===r?(null===(t=e._vodInst)||void 0===t||null===(t=t.ctx)||void 0===t||null===(t=t.dataCenter)||void 0===t?void 0:t.getServiceStrategyConfig())||{}:kse.LIVE===r&&(null===(n=e._liveInst)||void 0===n||null===(n=n.ctx)||void 0===n||null===(n=n.dataCenter)||void 0===n?void 0:n.getServiceStrategyConfig())||{}}},{key:"apply",value:function(t,n,r){var i;if(!t||!n)return t;if(((null==r?void 0:r.type)||kse.VOD)===kse.VOD&&null!==(i=e._vodInst)&&void 0!==i&&i.ctx){var o,a=(null==r?void 0:r.Adapter)||(null===(o=e._vodInst.ctx.dataCenter.getAppConfig())||void 0===o||null===(o=o.adapter)||void 0===o?void 0:o.Adapter)||U_e[kse.VOD];return a&&(t=(new a).apply(t,n)),t}return t}},{key:"_rec",value:function(t,n){var r,i,o,a,s,c,l,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:kse.VOD,d=e.inst(u||kse.VOD);if(X_e.info("rec",d,n,u),!d)return X_e.error("VeStrategyNotInit"),{plugins:[],pluginConfiguration:{},result:{}};var h={plugins:[kve],pluginConfiguration:aee({},kve.pluginName,{}),result:{},strategyPluginKeys:kve.pluginName},f=new vve(d.ctx),p=d.ctx.dataCenter.getServiceStrategyConfig()||{},v=d.ctx.dataCenter.getInitStrategyConfig()||{};cae(r=lae(v)).call(r,(function(e){var n,r=v[e],i=p[e],o=null==t?void 0:t[e];if(null!=r&&r.disabled||null!=i&&i.disabled||null!=o&&o.disabled)X_e.warn("StrategyDisabled",r,i,o);else{var a,s,c=cee(cee(cee({},r),o),{},{config:Sae({},null==r?void 0:r.config,null==i?void 0:i.config,null==o?void 0:o.config)});(null===(n=c.Strategy)||void 0===n?void 0:n.strategyName)===e?f.registerStrategy(c):X_e.warn("StrategyNameIllegal",Pae(a="".concat(null===(s=c.Strategy)||void 0===s?void 0:s.strategyName,"!==")).call(a,e))}})),cae(i=f.getStrategyList()).call(i,(function(e){var t,r,i;try{var o;i=(null==e||null===(o=e.getRecommendation)||void 0===o?void 0:o.call(e,n))||{plugins:[],pluginConfiguration:{},result:{}}}catch(a){return X_e.error("StrategyRecommendError",a),void d.ctx.tracker.track("strategy_exe_error",{strategy_name:null==e?void 0:e.strategyName})}h.plugins=Pae(t=h.plugins).call(t,i.plugins||[]),h.pluginConfiguration=cee(cee({},h.pluginConfiguration),i.pluginConfiguration),h.result=cee(cee({},h.result),{},aee({},e.strategyName,cee({_strategyConfig:null===(r=e.getStrategyConfig)||void 0===r?void 0:r.call(e)},i.result)))}));var g=d.ctx.dataCenter.getAppConfig();cae(o=lae(h.pluginConfiguration)).call(o,(function(e){h.pluginConfiguration[e]=cee(cee({},h.pluginConfiguration[e]),{},{ctx:d.ctx,strategyCenter:f,videoType:null==g?void 0:g.type})})),X_e.info("StrategyRecommendResult",h);var y=null!==(a=h.result)&&void 0!==a?a:{};return h.strategyKeys=xae(s=lae(y)).call(s,(function(e){var t;return"object"===D8(y[e])&&(null===(t=y[e])||void 0===t?void 0:t.enable)})).join("|"),h.strategyPluginKeys=null===(c=h.plugins)||void 0===c||null===(l=Uae(c))||void 0===l||null===(l=l.call(c,(function(e){return null==e?void 0:e.pluginName})))||void 0===l?void 0:l.join("|"),d.ctx.tracker.track("strategy_rec_info",{strategy_keys:h.strategyKeys,strategy_plugin_keys:h.strategyPluginKeys,strategy_info:fae(h.result)}),h}}]),e}();aee(B_e,"_vodInst",void 0),aee(B_e,"_liveInst",void 0);var N_e=["Strategy","disabled","config"];function V_e(e){if(!e||"boolean"==typeof e)return{config:{}};e.Strategy,e.disabled;var t=e.config,n=nm(e,N_e);return Fm(Fm({},e),{},{config:Fm(Fm({},n),null!=t?t:{})})}var j_e,K_e=function(){function e(t){var n=this;Py(this,e),Oy(this,"config",void 0),Oy(this,"tea",void 0),Oy(this,"Collector",void 0),Oy(this,"_loadPlugin",void 0),Oy(this,"webId",void 0),Oy(this,"status",0),Oy(this,"initPromise",void 0),Oy(this,"_strategyWrappers",{}),this.tea=t.tea,this.Collector=t.Collector,this._loadPlugin=t.loadPlugin,t.strategies.forEach((function(e){n._strategyWrappers[e.strategyKey]=new e(n)}))}var t,n,r,i,o,a;return Hy(e,[{key:"preload",get:function(){return this._strategyWrappers.preload}},{key:"h265",get:function(){return this._strategyWrappers.h265}},{key:"rtmAdaptiveBuffer",get:function(){return this._strategyWrappers.rtmAdaptiveBuffer}},{key:"init",value:(a=cy(ay().mark((function e(t){return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.initPromise||(this.initPromise=this.initOnce(t)),e.abrupt("return",this.initPromise);case 2:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"prepare",value:function(){return this.initPromise||jR.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,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return this.isReady()?(null===(e=this.config)||void 0===e||null===(e=e.Module)||void 0===e?void 0:e.rec(t,n,kse.LIVE))||{}:{plugins:[],pluginConfiguration:{}}}},{key:"getStrategyRecommendationsAsync",value:(o=cy(ay().mark((function e(){var t,n,r,i,o=arguments;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=o.length>0&&void 0!==o[0]?o[0]:void 0,r=o.length>1&&void 0!==o[1]?o[1]:void 0,this.isReady()){e.next=4;break}return e.abrupt("return",{plugins:[],pluginConfiguration:{}});case 4:return e.next=6,null===(t=this.config)||void 0===t||null===(t=t.Module)||void 0===t?void 0:t.recAsync(n,r);case 6:return i=e.sent,e.abrupt("return",i);case 8:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"fetchWebId",value:(i=cy(ay().mark((function e(){var t,n,r=this;return ay().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",jR.resolve(null===(n=this.config)||void 0===n?void 0:n.deviceId));case 2:return e.abrupt("return",new jR((function(e){var t;return null!==(t=r.tea)&&void 0!==t&&t.getToken?r.tea.getToken((function(t){e(null==t?void 0:t.web_id)})):e("default_web_id")})).then((function(e){return r.config&&(r.config.deviceId=e),r.webId})));case 3:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"fetchVeStrategy",value:(r=cy(ay().mark((function e(){var t,n=this;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(t=this.config)||void 0===t||!t.Module){e.next=2;break}return e.abrupt("return");case 2:return e.abrupt("return",this._loadPlugin("vestrategy").then((function(e){n.config&&e&&(n.config.Module=e)})));case 3:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"fetchStrategies",value:(n=cy(ay().mark((function e(){var t,n,r,i=this;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r={},null!==(t=this.config)&&void 0!==t&&t.strategies){e.next=3;break}return e.abrupt("return",r);case 3:return e.next=5,jR.all(VR(n=WR(this.config.strategies)).call(n,function(){var e=cy(ay().mark((function e(t){var n,o,a;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=null===(n=i.config)||void 0===n?void 0:n.strategies[t]){e.next=3;break}return e.abrupt("return");case 3:if(!0===o&&(o={}),a=o.Strategy){e.next=9;break}return e.next=8,i._loadPlugin(t);case 8:a=e.sent;case 9:r[t]=Fm(Fm({},o),{},{Strategy:a}),r[t]=V_e(r[t]);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 5:return this.config.strategies=r,e.abrupt("return",r);case 7:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"initOnce",value:(t=cy(ay().mark((function e(t){var n,r,i,o;return ay().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.status=1,this.config=t,e.prev=4,e.next=7,jR.all([this.fetchWebId(),this.fetchVeStrategy()]);case 7:return e.next=9,this.fetchStrategies();case 9:e.next=13;break;case 11:e.prev=11,e.t0=e.catch(4);case 13:if(n=this.config,r=n.appId,i=n.deviceId,o=n.Module,!(r&&i&&o)){e.next=20;break}return e.next=17,o.bootstrap(Fm(Fm({},this.config),{},{tracker:{Collector:this.Collector,enableABVersion:!1}}));case 17:this.status=2,e.next=21;break;case 20:this.status=3;case 21:return e.abrupt("return",this.isReady());case 22:case"end":return e.stop()}}),e,this,[[4,11]])}))),function(e){return t.apply(this,arguments)})}]),e}(),W_e=function(){return(W_e=cG||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function Q_e(e,t){var n="function"==typeof pG&&nT(e);if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function q_e(){for(var e=[],t=0;t<arguments.length;t++)e=Xm(e).call(e,Q_e(arguments[t]));return e}var Z_e,Y_e,$_e,J_e,ebe=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 r(i){t(i),n.off(e,r)}))},e.prototype.off=function(e,t){if(e&&this._hooks[e]&&this._hooks[e].length)if(t){var n,r,i=KR(n=this._hooks[e]).call(n,t);-1!==i&&vw(r=this._hooks[e]).call(r,i,1)}else this._hooks[e]=[]},e.prototype.emit=function(e,t,n){if(n){var r;if(!e)return;-1!==KR(r=this._cache).call(r,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&&q_e(this._hooks[e]).forEach((function(e){try{e(t)}catch(n){}}))},e.prototype.set=function(e){var t;e&&-1===KR(t=this._cache).call(t,e)&&this._cache.push(e)},e}(),tbe=function(e){return null!=e&&"[object Object]"==Object.prototype.toString.call(e)},nbe=function(e){return Array.isArray(e)},rbe=(Z_e=+Date.now()+Number(QR(j_e=""+Math.random()).call(j_e,2,8)),function(){return Z_e+=1}),ibe=function(e){return function(e,t,n){if("string"==typeof e&&"number"==typeof n){var r,i=[];n=n<=25?n:n%25;var o=String.fromCharCode(n+97);r=e.split(o);for(var a=0;a<r.length;a++){var s=Ow(r[a],n);s=1*s^64;var c=String.fromCharCode(s);i.push(c)}return i.join("")}}(e,0,25)},obe=function(){return!!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)},abe=function(e){obe()?window.addEventListener("pagehide",e,!1):window.addEventListener("beforeunload",e,!1)},sbe=function(){var e=0;return["hidden","msHidden","webkitHidden"].forEach((function(t){void 0!==document[t]&&(e=1)})),e},cbe=function(e){var t=document.createElement("a");return t.href=e,t},lbe=function(e){var t={};try{var n=cbe(e).search;if(!n)return t;(n=QR(n).call(n,1)).split("&").forEach((function(e){var n,r,i=e.split("=");i.length&&(n=i[0],r=i[1]);try{t[n]=decodeURIComponent(void 0===r?"":r)}catch(o){t[n]=r}}))}catch(r){}return t},ube=function(e){for(var t=0,n=0,r=(e+="").length,i=0;i<r;i++)((t=31*t+e.charCodeAt(n++))>0x7fffffffffff||t<-0x800000000000)&&(t&=0xffffffffffff);return t<0&&(t+=0x7ffffffffffff),t},dbe=(function(e,t){var n;n=function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function i(){}function o(t,n,o){if("undefined"!=typeof document){"number"==typeof(o=e({path:"/"},i.defaults,o)).expires&&(o.expires=new Date(1*new Date+864e5*o.expires)),o.expires=o.expires?o.expires.toUTCString():"";try{var a=Jx(n);/^[\{\[]/.test(a)&&(n=a)}catch(l){}n=r.write?r.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 c in o)o[c]&&(s+="; "+c,!0!==o[c]&&(s+="="+o[c].split(";")[0]));return document.cookie=t+"="+n+s}}function a(e,n){if("undefined"!=typeof document){for(var i={},o=document.cookie?document.cookie.split("; "):[],a=0;a<o.length;a++){var s=o[a].split("="),c=QR(s).call(s,1).join("=");n||'"'!==c.charAt(0)||(c=QR(c).call(c,1,-1));try{var l=t(s[0]);if(c=(r.read||r)(c,l)||t(c),n)try{c=JSON.parse(c)}catch(u){}if(i[l]=c,e===l)break}catch(u){}}return e?i[e]:i}}return i.set=o,i.get=function(e){return a(e,!1)},i.getJSON=function(e){return a(e,!0)},i.remove=function(t,n){o(t,"",e(n,{expires:-1}))},i.defaults={},i.withConverter=n,i}((function(){}))},e.exports=n()}(Y_e={exports:{}}),Y_e.exports),hbe=function(e,t){try{return e?dbe.get(e):dbe.get()}catch(n){return""}},fbe=function(e,t,n,r){try{var i=r||document.domain,o=+new Date+(n||6048e5);dbe.set(e,t,{expires:new Date(o),path:"/",domain:i})}catch(a){}},pbe=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 hbe(e)},e.prototype.setCookie=function(e,t,n,r){fbe(e,t,n,r)},e}(),vbe={getItem:function(e){try{var t=localStorage.getItem(e),n=t;try{t&&"string"==typeof t&&(n=JSON.parse(t))}catch(r){}return n||{}}catch(r){}return{}},setItem:function(e,t){try{var n="string"==typeof t?t:Jx(t);localStorage.setItem(e,n)}catch(r){}},removeItem:function(e){try{localStorage.removeItem(e)}catch(t){}},getCookie:function(e,t){return hbe(e)},setCookie:function(e,t,n,r){fbe(e,t,n,r)},isSupportLS:function(){try{return localStorage.setItem("_ranger-test-key","hi"),localStorage.getItem("_ranger-test-key"),localStorage.removeItem("_ranger-test-key"),!0}catch(oK){return!1}}()},gbe={getItem:function(e){try{var t=sessionStorage.getItem(e),n=t;try{t&&"string"==typeof t&&(n=JSON.parse(t))}catch(r){}return n||{}}catch(r){}return{}},setItem:function(e,t){try{var n="string"==typeof t?t:Jx(t);sessionStorage.setItem(e,n)}catch(r){}},removeItem:function(e){try{sessionStorage.removeItem(e)}catch(t){}},getCookie:function(e,t){return hbe(e)},setCookie:function(e,t,n,r){fbe(e,t,n,r)},isSupportSession:function(){try{return sessionStorage.setItem("_ranger-test-key","hi"),sessionStorage.getItem("_ranger-test-key"),sessionStorage.removeItem("_ranger-test-key"),!0}catch(oK){return!1}}()},ybe=function(){function e(e,t){this._storage=t&&"session"===t?gbe:!e&&vbe.isSupportLS?vbe:new pbe}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,r){this._storage.setCookie(e,t,n,r)},e.prototype.removeItem=function(e){this._storage.removeItem(e)},e}(),mbe=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,r=document.referrer,i=r?cbe(r).hostname:"",o=lbe(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,r){var i=new ybe(!1),o=new ybe(!1,"session"),a=e?"_tea_utm_cache_"+e:"_tea_utm_cache",s=e?"_$utm_from_url_"+e:"_$utm_from_url",c={},l=["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 d=!1;for(var h in u)u[h]&&(-1!==KR(l).call(l,h)?(c.hasOwnProperty("tracer_data")||(c.tracer_data={}),c.tracer_data[h]=u[h]):c[h]=u[h],d=!0);if(d)o.setItem(s,"1"),i.setCookie(a,Jx(c),r,n);else{var f=i.getCookie(a,n);f&&(c=JSON.parse(f))}o.getItem(s)&&(c.hasOwnProperty("tracer_data")||(c.tracer_data={}),c.tracer_data.$utm_from_url=1)}catch(p){return u}return c}(this.appid,o,this.domain,this.cookie_expire);var c=this.browser(),l=this.os();return{browser:c.browser,browser_version:c.browser_version,platform:a,os_name:l.os_name,os_version:l.os_version,userAgent:t,screen_width:window.screen&&window.screen.width,screen_height:window.screen&&window.screen.height,device_model:this.getDeviceModel(l.os_name),language:n,referrer:r,referrer_host:i,network_type:s,utm:this.utm,latest_data:this.last(r,i)}},e.prototype.last=function(e,t){var n="",r="",i="",o=location.hostname,a=!1;if(e&&t&&o!==t){n=e,r=t,a=!0;var s=lbe(e);s.keyword&&(i=s.keyword)}return{$latest_referrer:n,$latest_referrer_host:r,$latest_search_keyword:i,isLast:a}},e.prototype.browser=function(){var e,t,n="",r=""+nk(this.appVersion),i=this.userAgent;return-1!==KR(i).call(i,"Edge")||-1!==KR(i).call(i,"Edg")?(n="Microsoft Edge",-1!==KR(i).call(i,"Edge")?(e=KR(i).call(i,"Edge"),r=i.substring(e+5)):(e=KR(i).call(i,"Edg"),r=i.substring(e+4))):-1!==(e=KR(i).call(i,"MSIE"))?(n="Microsoft Internet Explorer",r=i.substring(e+5)):-1!==(e=KR(i).call(i,"MetaSr"))?(n="sougoubrowser",r=i.substring(e+7,e+10)):-1!==KR(i).call(i,"MQQBrowser")||-1!==KR(i).call(i,"QQBrowser")?(n="qqbrowser",-1!==KR(i).call(i,"MQQBrowser")?(e=KR(i).call(i,"MQQBrowser"),r=i.substring(e+11,e+15)):-1!==KR(i).call(i,"QQBrowser")&&(e=KR(i).call(i,"QQBrowser"),r=i.substring(e+10,e+25))):-1!==KR(i).call(i,"Chrome")?-1!==(e=KR(i).call(i,"MicroMessenger"))?(n="weixin",r=i.substring(e+15,e+20)):-1!==(e=KR(i).call(i,"360"))?(n="360browser",r=i.substring(KR(i).call(i,"Chrome")+7)):-1!==KR(i).call(i,"baidubrowser")||-1!==KR(i).call(i,"BIDUBrowser")?(-1!==KR(i).call(i,"baidubrowser")?(e=KR(i).call(i,"baidubrowser"),r=i.substring(e+13,e+16)):-1!==KR(i).call(i,"BIDUBrowser")&&(e=KR(i).call(i,"BIDUBrowser"),r=i.substring(e+12,e+15)),n="baidubrowser"):-1!==(e=KR(i).call(i,"xiaomi"))?-1!==KR(i).call(i,"openlanguagexiaomi")?(n="openlanguage xiaomi",r=i.substring(e+7,e+13)):(n="xiaomi",r=i.substring(e-7,e-1)):-1!==(e=KR(i).call(i,"TTWebView"))?(n="TTWebView",r=i.substring(e+10,e+23)):(-1!==(e=KR(i).call(i,"Chrome"))||-1!==(e=KR(i).call(i,"Chrome")))&&(n="Chrome",r=i.substring(e+7)):-1!==KR(i).call(i,"Safari")?-1!==(e=KR(i).call(i,"QQ"))?(n="qqbrowser",r=i.substring(e+10,e+16)):-1!==(e=KR(i).call(i,"Safari"))&&(n="Safari",r=i.substring(e+7),-1!==(e=KR(i).call(i,"Version"))&&(r=i.substring(e+8))):-1!==(e=KR(i).call(i,"Firefox"))?(n="Firefox",r=i.substring(e+8)):-1!==(e=KR(i).call(i,"MicroMessenger"))?(n="weixin",r=i.substring(e+15,e+20)):-1!==(e=KR(i).call(i,"QQ"))&&(n="qqbrowser",r=i.substring(e+3,e+8)),-1!==(t=KR(r).call(r,";"))&&(r=r.substring(0,t)),-1!==(t=KR(r).call(r," "))&&(r=r.substring(0,t)),-1!==(t=KR(r).call(r,")"))&&(r=r.substring(0,t)),{browser:n,browser_version:r}},e.prototype.os=function(){for(var e,t="",n="",r=[{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:"Windows",r:/(Windows|Windows NT)/},{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/}],i=0;i<r.length;i++){var o=r[i];if(o.r.test(this.userAgent)){"Mac OS X"===(t=o.s)&&this.isNewIpad()&&(t="iOS");break}}var a,s,c=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?QR(n).call(n,1)[0]:""};switch(/Windows/.test(t)&&(n=c(/Windows (.*)/,t),t="windows"),t){case"Mac OS X":n=l("Mac[ +]OS[ +]X(?:[ /](?:Version )?(\\d+(?:[_\\.]\\d+)+))?",this.userAgent),t="mac";break;case"Android":(s=c(/Android ([\.\_\d]+)/,a=this.userAgent))||(s=c(/Android\/([\.\_\d]+)/,a)),n=s,t="android";break;case"iOS":n=this.isNewIpad()?l("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=KR(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){KR(e).call(e,"Build/")>-1&&(t=QR(e).call(e,0,KR(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 (",""),r=KR(n).call(n,";");t=-1===r?"":QR(n).call(n,0,r)}}catch(i){return dk(t).call(t)}return dk(t).call(t)},e.prototype.isNewIpad=function(){return void 0!==this.userAgent&&"MacIntel"===navigator.platform&&"number"==typeof navigator.maxTouchPoints&&navigator.maxTouchPoints>1},e}(),_be={cn:"1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az1az22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",va:"1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az1gz22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",sg:"1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k"},bbe={cn:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az28z1gz1hz1gz1cz18z1nz1gz4az1az1mz1k",sg:"1fz22z22z1nz21z4mz4bz4bz21z1ez18z1jz1gz49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k",va:"1fz22z22z1nz21z4mz4bz4bz1kz18z1jz1gz24z18z49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k",my:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z19z1bz49z1kz27z4az1jz18z20z1iz1mz1dz1dz1gz1az1cz4az1az1mz1k"},Rbe="5.3.1",wbe=(ibe("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z1az1bz1lz49z22z1mz21z4az19z27z22z1cz21z1az1kz4az1az1mz1kz4bz1mz19z1hz4bz21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz24z1gz21z23z18z1jz49z1cz1bz1gz22z1mz20z49z20z18z1lz1ez1cz20z21z4az1hz21"),ibe("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z1az1bz1lz49z22z1mz21z4az19z27z22z1cz21z1az1kz4az1az1mz1kz4bz1mz19z1hz4bz21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz24z1gz21z23z18z1jz49z18z19z49z1az1mz20z1cz4az1hz21"),ibe("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z1az1bz1lz49z22z1mz21z4az19z27z22z1cz21z1az1kz4az1az1mz1kz4bz1mz19z1hz4bz21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz24z1gz21z23z18z1jz49z18z19z49z1jz1mz18z1bz1cz20z4az1hz21"),ibe("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z1az1bz1lz49z22z1mz21z4az19z27z22z1cz21z1az1kz4az1az1mz1kz4bz1mz19z1hz4bz21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz1fz1cz18z22z1kz18z1nz49z1az1mz20z1c")),Gbe=(ibe("1fz22z22z1nz21z4mz4bz4bz1jz1dz4fz49z1bz18z22z18z4az24z1mz1jz1az1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz1bz18z22z18z49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz22z1cz21z22z1cz20z49z1cz24z1cz1lz22z49z1gz1lz21z1nz1cz1az22z1mz20"),function(){function e(e,t){this.collector=e,this.config=t,this.eventNameWhiteList=["__bav_page","__bav_beat","__bav_page_statistics","__bav_click","__bav_page_exposure","__bav_slide"],this.paramsNameWhiteList=["$inactive","$inline","$target_uuid_list","$source_uuid","$is_spider","$source_id","$is_first_time","_staging_flag"],this.regStr=new RegExp("^[a-zA-Z0-9][a-z0-9A-Z_.-]{1,255}$")}return e.prototype.checkVerify=function(e){var t=this;if(!e||!e.length)return!1;var n=e[0];if(!n)return!1;var r=n.events,i=n.header;if(!r||!r.length)return!1;var o=!0;return r.forEach((function(e){if(!e)return o=!1,void(e.checkEvent="事件异常");t.checkEventName(e.event)||(o=!1,e.checkEvent="事件名不能以 $ or __开头"),t.checkEventParams(e.params)||(o=!1,e.checkParams="属性名不能以 $ or __开头")})),this.checkEventParams(i)||(o=!1),o},e.prototype.checkEventName=function(e){return!!e&&this.calculate(e,"event")},e.prototype.checkEventParams=function(e){var t=e;if("string"==typeof e&&(t=JSON.parse(t)),!WR(t).length)return!0;for(var n in t)return!(!this.calculate(n,"params")||"string"==typeof t[n]&&t[n].length>1024&&(console.warn("params: "+n+" can not over 1024 byte, please check;"),1));return!0},e.prototype.calculate=function(e,t){var n;return-1!==KR(n="event"===t?this.eventNameWhiteList:this.paramsNameWhiteList).call(n,e)||!new RegExp("^\\$").test(e)&&!new RegExp("^__").test(e)||(console.warn(("event"===t?"event":"params")+" name: "+e+" can not start with $ or __, pleace check;"),!1)},e}());!function(e){e.Init="init",e.Config="config",e.Start="start",e.Ready="ready",e.UnReady="un-ready",e.TokenComplete="token-complete",e.TokenStorage="token-storage",e.TokenFetch="token-fetch",e.TokenError="token-error",e.ConfigUuid="config-uuid",e.ConfigWebId="config-webid",e.ConfigDiD="config-device-id",e.ConfigDomain="config-domain",e.CustomWebId="custom-webid",e.TokenChange="token-change",e.TokenReset="token-reset",e.ConfigTransform="config-transform",e.EnvTransform="env-transform",e.SessionReset="session-reset",e.SessionResetTime="session-reset-time",e.SetSessionId="set-session-id",e.Event="event",e.Events="events",e.EventNow="event-now",e.CleanEvents="clean-events",e.BeconEvent="becon-event",e.SubmitBefore="submit-before",e.SubmitScuess="submit-scuess",e.SubmitAfter="submit-after",e.SubmitError="submit-error",e.SubmitVerify="submit-verify",e.CustomHeader="custom-request-header",e.SDKInnerError="sdk-inner-error",e.SDKRunTimeError="sdk-run-time-error",e.LogSetting="log-setting",e.LogSettingReady="log-setting-ready",e.Stay="stay",e.ResetStay="reset-stay",e.StayReady="stay-ready",e.SetStay="set-stay",e.RouteChange="route-change",e.RouteReady="route-ready",e.Ab="ab",e.AbVar="ab-var",e.AbAllVars="ab-all-vars",e.AbConfig="ab-config",e.AbExternalVersion="ab-external-version",e.AbVersionChangeOn="ab-version-change-on",e.AbVersionChangeOff="ab-version-change-off",e.AbOpenLayer="ab-open-layer",e.AbCloseLayer="ab-close-layer",e.AbReady="ab-ready",e.AbComplete="ab-complete",e.AbTimeout="ab-timeout",e.Profile="profile",e.ProfileSet="profile-set",e.ProfileSetOnce="profile-set-once",e.ProfileUnset="profile-unset",e.ProfileIncrement="profile-increment",e.ProfileAppend="profile-append",e.ProfileClear="profile-clear",e.Autotrack="autotrack",e.AutotrackReady="autotrack-ready",e.CepReady="cep-ready",e.TracerReady="tracer-ready",e.sessionRecord="session-record",e.SessionRecordStart="session-record-start",e.SessionRecordPause="session-record-pause",e.SessionRecordEnd="session-record-end",e.SessionRecordReport="session-record-report",e.DestoryInstance="destory-instance",e.VisualCollectReady="visual-collect-ready",e.VisualApiReady="visual-api-ready",e.VisualApiUpdate="visual-api-update"}($_e||($_e={})),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"}(J_e||(J_e={}));var Tbe=$_e,kbe=void 0,Sbe=(new Date).getTimezoneOffset(),Ebe=Ow(""+-Sbe/60,10),Mbe=60*Sbe,Dbe=function(){function e(e,t){var n=this;this.is_first_time=!0,this.configPersist=!1,this.initConfig=t,this.collect=e;var r=new mbe(t.app_id,t.cookie_domain||"",t.cookie_expire||7776e6).init();this.eventCheck=new Gbe(e,t);var i="__tea_cache_first_"+t.app_id;this.configKey="__tea_cache_config_"+t.app_id,this.sessionStorage=new ybe(!1,"session"),this.localStorage=new ybe(!1,"local"),t.configPersist&&(this.configPersist=!0,this.storage=1===t.configPersist?this.sessionStorage:this.localStorage);var o=this.localStorage.getItem(i);o&&1==o?this.is_first_time=!1:(this.is_first_time=!0,this.localStorage.setItem(i,"1")),this.envInfo={user:{user_unique_id:kbe,user_type:kbe,user_id:kbe,user_is_auth:kbe,user_is_login:kbe,device_id:kbe,web_id:kbe,ip_addr_id:kbe,user_unique_id_type:kbe},header:{app_id:kbe,app_name:kbe,app_install_id:kbe,install_id:kbe,app_package:kbe,app_channel:kbe,app_version:kbe,ab_version:kbe,os_name:r.os_name,os_version:r.os_version,device_model:r.device_model,ab_client:kbe,traffic_type:kbe,client_ip:kbe,device_brand:kbe,os_api:kbe,access:kbe,language:r.language,region:kbe,app_language:kbe,app_region:kbe,creative_id:r.utm.creative_id,ad_id:r.utm.ad_id,campaign_id:r.utm.campaign_id,log_type:kbe,rnd:kbe,platform:r.platform,sdk_version:Rbe,sdk_lib:"js",province:kbe,city:kbe,timezone:Ebe,tz_offset:Mbe,tz_name:kbe,sim_region:kbe,carrier:kbe,resolution:r.screen_width+"x"+r.screen_height,browser:r.browser,browser_version:r.browser_version,referrer:r.referrer,referrer_host:r.referrer_host,width:r.screen_width,height:r.screen_height,screen_width:r.screen_width,screen_height:r.screen_height,utm_term:r.utm.utm_term,utm_content:r.utm.utm_content,utm_source:r.utm.utm_source,utm_medium:r.utm.utm_medium,utm_campaign:r.utm.utm_campaign,tracer_data:Jx(r.utm.tracer_data),custom:r.network_type?{network_type:r.network_type}:{},wechat_unionid:kbe,wechat_openid:kbe}},this.ab_version="",this.evtParams={},this.reportErrorCallback=function(){},this.isLast=!1,this.setCustom(r),this.initDomain(),this.initABData(),this.collect.on("route-change",(function(e){n.changeReferInfo(e.config)}))}return e.prototype.initDomain=function(){var e=this.initConfig.channel_domain;if(e)this.domain=e;else{var t=this.initConfig.channel;this.domain=ibe(bbe[t])}},e.prototype.setDomain=function(e){this.domain=e},e.prototype.getDomain=function(){return this.domain},e.prototype.initABData=function(){var e="__tea_sdk_ab_version_"+this.initConfig.app_id,t=null;if(this.initConfig.ab_cross){var n=this.localStorage.getCookie(e,this.initConfig.ab_cookie_domain);t=n?JSON.parse(n):null}else t=this.localStorage.getItem(e);this.setAbCache(t)},e.prototype.setAbCache=function(e){this.ab_cache=e},e.prototype.getAbCache=function(){return this.ab_cache},e.prototype.setAbVersion=function(e){this.ab_version=e},e.prototype.getAbVersion=function(){return this.ab_version},e.prototype.clearAbCache=function(){this.ab_version="",this.ab_cache={}},e.prototype.getUrl=function(e){var t="";switch(e){case"event":t="/list";break;case"webid":t="/webid";break;case"tobid":t="/tobid"}var n="";return this.initConfig.caller&&(n="?sdk_version=5.3.1&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.changeReferInfo=function(e){var t=e;this.envInfo.header.referrer=t.referrer;var n="";try{n=new Qx(t.referrer).host}catch(r){}this.envInfo.header.referrer_host=n||this.envInfo.header.referrer_host},e.prototype.set=function(e){var t=this;WR(e).forEach((function(n){void 0!==e[n]&&null!==e[n]||t.delete(n);try{t.eventCheck.calculate(n,"config")}catch(oK){}if("traffic_type"===n&&t.isLast&&(t.envInfo.header.custom.$latest_traffic_source_type=e[n]),"evtParams"===n)t.evtParams=W_e(W_e({},t.evtParams||{}),e.evtParams||{});else if("_staging_flag"===n)t.evtParams=W_e(W_e({},t.evtParams||{}),{_staging_flag:e._staging_flag});else if("reportErrorCallback"===n&&"function"==typeof e[n])t.reportErrorCallback=e[n];else{var r,i,o,a="",s="";if(KR(n).call(n,".")>-1){var c=n.split(".");a=c[0],s=c[1]}a?"user"===a||"header"===a?t.envInfo[a][s]=e[n]:(t.envInfo.header.custom[s]=e[n],t.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 添加了Custom",level:"info",time:Date.now(),infoType:"sdk",secType:"HEADER",common:"custom"})):Object.hasOwnProperty.call(t.envInfo.user,n)?(KR(r=["user_type","ip_addr_id"]).call(r,n)>-1?t.envInfo.user[n]=e[n]?Number(e[n]):e[n]:KR(i=["user_id","web_id","user_unique_id","user_unique_id_type"]).call(i,n)>-1?t.envInfo.user[n]=e[n]?String(e[n]):e[n]:KR(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(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 修改了公共参数",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(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 修改了公共参数",level:"info",time:Date.now(),infoType:"sdk",secType:"HEADER",common:n})):(t.envInfo.header.custom[n]=e[n],t.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 添加了Custom",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(Jx(this.envInfo[e])):JSON.parse(Jx(this.envInfo))}catch(t){console.log("get config stringify error "),this.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:t.message})}},e.prototype.setStore=function(e){try{if(!this.configPersist)return;var t=this.storage.getItem(this.configKey)||{};if(t&&WR(e).length){var n=cG(e,t);this.storage.setItem(this.configKey,n)}}catch(r){console.log("setStore error"),this.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:r.message})}},e.prototype.getStore=function(){try{if(!this.configPersist)return null;var e=this.storage.getItem(this.configKey)||{};return e&&WR(e).length?e:null}catch(t){return this.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:t.message}),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(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:n.message}),console.log("delete error")}},e}(),zbe=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;","[AppLog WEB SDK] [instance: "+this.name+"] "+e)},e.prototype.warn=function(e){this.isLog&&console.warn("[AppLog WEB SDK] [instance: "+this.name+"] "+e)},e.prototype.error=function(e){this.isLog&&console.error("[AppLog WEB SDK] [instance: "+this.name+"] "+e)},e.prototype.throw=function(e){throw this.error(this.name),new Error(e)},e}(),Abe=function(){function e(){this.spiderBot=["Baiduspider","googlebot","360Spider","haosouspider","YoudaoBot","Sogou News Spider","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!==KR(t).call(t,e)&&(n=!0)})),n},e}(),Pbe=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 jR((function(t,n){try{e.bridgeInject()?AppLogBridge.hasStarted((function(e){console.log("AppLogBridge is started? : "+e),e?t(!0):n(!1)})):n(!1)}catch(r){console.log("AppLogBridge, error:"+Jx(r.stack)),n(!1)}}))},t.setNativeAppId=function(e){try{AppLogBridge.setNativeAppId(Jx(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{WR(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(Jx(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埋点上报",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}(),xbe=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)}))},Cbe=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.storage=new ybe(!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(Tbe.SessionReset,(function(e){n.resetSessionId(e)})),this.collect.on(Tbe.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:xbe(),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:xbe(),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||xbe(),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:xbe(),timestamp:Date.now()},this.storage.setItem(this.sessionKey,e))},e}(),Fbe=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.eventCheck=new Gbe(e,t),this.cacheStorgae=new ybe(!0),this.localStorage=new ybe(!1),this.maxReport=t.max_report||10,this.reportTime=t.reportTime||t.report_time||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.pageId=xbe(),this.collect.on(Tbe.Ready,(function(){n.reportAll(!1)})),this.collect.on(Tbe.ConfigDomain,(function(){n.reportUrl=n.configManager.getUrl("event")})),this.collect.on(Tbe.Event,(function(e){n.event(e)})),this.collect.on(Tbe.BeconEvent,(function(e){n.beconEvent(e)})),this.collect.on(Tbe.CleanEvents,(function(){n.reportAll(!1)}));var r=this.linster();this.collect.on(Tbe.DestoryInstance,(function(){r&&r()}))},e.prototype.linster=function(){var e=this,t=function(){e.reportAll(!0)};window.addEventListener("unload",t,!1),abe(t);var n=function(){"hidden"===document.visibilityState&&e.reportAll(!0)};return document.addEventListener("visibilitychange",n,!1),function(){window.removeEventListener("unload",t),window.removeEventListener("pagehide",t,!1),window.removeEventListener("beforeunload",t,!1),document.removeEventListener("visibilitychange",n,!1)}},e.prototype.reportAll=function(e){this.report(e),this.reportBecon()},e.prototype.event=function(e){var t=this;try{if(this.collect.destroy)return;if(this.collect.sdkStop)return;if(this.config.enable_ios_sendbeacon&&obe())return void this.beconEvent(e);var n=this.cacheStorgae.getItem(this.eventKey)||[],r=e;this.config.batch_event&&(r=this.batchEvent(e));var i=q_e(r,n);if(this.cacheStorgae.setItem(this.eventKey,i),this.reportTimeout&&clearTimeout(this.reportTimeout),i.length>=this.maxReport)this.report(!1);else{var o=this.reportTime;this.reportTimeout=setTimeout((function(){t.report(!1),t.reportTimeout=null}),o)}}catch(a){this.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 发生了异常",level:"error",time:Date.now(),data:a.message,infoType:"sdk"})}},e.prototype.beconEvent=function(e){if(!this.collect.destroy&&!this.collect.sdkStop){var t=q_e(e,this.cacheStorgae.getItem(this.beconKey)||[]);this.cacheStorgae.setItem(this.beconKey,t),this.collect.tokenManager.getReady()&&this.collect.sdkReady&&(this.cacheStorgae.removeItem(this.beconKey),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)||[];e&&e.length&&(this.cacheStorgae.removeItem(this.beconKey),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.config.batch_event?this.send([t],e):this.sliceEvent(t,e))}},e.prototype.batchEvent=function(e){var t=[];if(e.length>this.eventLimit)for(var n=0;n<e.length;n+=this.eventLimit){var r;r=QR(e).call(e,n,n+this.eventLimit);var i=this.merge(r);t.push(i)}else t=i=this.merge(e);return t},e.prototype.sliceEvent=function(e,t){if(e.length>this.eventLimit)for(var n=0;n<e.length;n+=this.eventLimit){var r;r=QR(e).call(e,n,n+this.eventLimit);var i=this.split(this.merge(r));this.send(i,t)}else i=this.split(this.merge(e)),this.send(i,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,r=this.configManager.get(),i=r.header,o=r.user;this.config.enable_pageid&&(i.custom.page_id=this.pageId),i.custom=Jx(i.custom);var a=this.configManager.get("evtParams"),s=this.configManager.get("user_unique_id_type"),c=[];try{var l=Ww(e).call(e,(function(e){try{WR(a).length&&!t&&(e.params=W_e(W_e({},a),e.params)),s&&(e.params.$user_unique_id_type=s);var r=n.configManager.getAbCache(),i=o[n.config.ab_user_mode]||o.user_unique_id;return r&&r.uuid&&r.uuid===i&&n.configManager.getAbVersion()&&(e.ab_sdk_version=n.configManager.getAbVersion()),e.session_id=n.collect.sessionManager.getSessionId(),e.params=Jx(e.params),e}catch(oK){return console.warn("filter merge event: "+(e&&e.event)+" error, pls check",oK&&oK.message),n.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 处理Event数据异常",level:"error",time:Date.now(),data:oK.message,infoType:"sdk"}),!1}})),u=JSON.parse(Jx({events:l,user:o,header:i}));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,c.push(u)}catch(oK){console.warn("event merge error, pls check",oK&&oK.message)}return c},e.prototype.split=function(e){return VR(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,r=this.logSetting.getSettingData("blocklist_events").block_event;t=Xm(n).call(n,Ww(r).call(r,(function(e){return-1===KR(n).call(n,e)})))}return!(t&&t.length&&OC(t).call(t,e))}catch(i){return!0}},e.prototype.whiteEvent=function(e){var t;try{var n;return null===(t=this.whiteList)||void 0===t||!t.length||!!OC(n=this.whiteList).call(n,e)}catch(r){return!0}},e.prototype.customAllowFilter=function(e,t){try{if(t)return Jx(e);if(!this.config.enable_logsetting||!this.config.enable_logsetting_header_custom)return Jx(e);var n=this.logSetting.getSettingData().header_custom_allow,r={};if(n&&n.length&&WR(e).length){var i=new Jj(n);for(var o in e)i.has(o)&&(r[o]=e[o])}return Jx(r)}catch(a){return this.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 执行customAllowFilter发生了异常",level:"error",time:Date.now(),data:a.message,infoType:"sdk"}),Jx(e)}},e.prototype.paramsAllowFilter=function(e,t){try{if(t)return Jx(e.params);if(!this.config.enable_logsetting||!this.config.enable_logsetting_params)return Jx(e.params);var n=this.logSetting.getSettingData().params_block,r=e.event,i=e.params,o={};if(n&&n[r]&&n[r].length){var a=new Jj(n[r]);for(var s in i)!this.logSetting.getPredefineParamsList().has(s)&&a.has(s)||(o[s]=i[s]);return Jx(o)}return Jx(e.params)}catch(c){return this.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 执行paramsAllowFilter发生了异常",level:"error",time:Date.now(),data:c.message,infoType:"sdk"}),Jx(e.params)}},e.prototype.send=function(e,t){var n=this;e.length&&(this.config.disable_track_event||e.forEach((function(e){try{var r,i=JSON.parse(Jx(e));Ww(n.config)&&((i=Ww(r=n.config).call(r,i))||console.warn("filter must return data !!")),n.collect.eventFilter&&i&&((i=n.collect.eventFilter(i))||console.warn("filterEvent api must return data !!"));var o=i||e,a=JSON.parse(Jx(o));if(n.eventCheck.checkVerify(a),!o.length)return;var s=!0;if(o.forEach((function(e){e.events.length||(s=!1)})),!s)return;n.collect.emit(Tbe.SubmitBefore,o),n.collect.requestManager.useRequest({url:n.reportUrl,data:o,success:function(e,t){e&&0!==e.e?(n.collect.emit(Tbe.SubmitError,{type:"f_data",eventData:t,errorCode:e.e,response:e}),n.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_EVENT,info:"埋点上报失败",time:Date.now(),data:a,code:e.e,msg:e.m||"",failType:"数据异常失败",status:"fail"})):(n.collect.emit(Tbe.SubmitScuess,{eventData:t,res:e}),n.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_EVENT,info:"埋点上报成功",time:Date.now(),data:a,code:200,status:"success"}))},fail:function(e,t){n.configManager.get("reportErrorCallback")(e,t),n.collect.emit(Tbe.SubmitError,{type:"f_net",eventData:e,errorCode:t}),n.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_EVENT,info:"埋点上报网络异常",time:Date.now(),data:a,code:t,failType:"网络异常失败",status:"fail"})},timeout:n.timeout,useBeacon:t,withCredentials:n.enable_ttwebid,zip:!0}),n.collect.emit(Tbe.SubmitAfter,o)}catch(c){console.warn("something error, "+Jx(c.stack)),n.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK发送埋点发生了异常",level:"error",time:Date.now(),data:c.message,infoType:"sdk"})}})))},e}(),Ibe=function(){var e;return QR(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)},Hbe=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 ybe(!1),this.tokenKey="__tea_cache_tokens_"+t.app_id,this.enable_ttwebid=t.enable_ttwebid,this.enableCustomWebid=t.enable_custom_webid,this.collect.on(Tbe.ConfigUuid,(function(e){n.setUuid(e)})),this.collect.on(Tbe.ConfigWebId,(function(e){n.setWebId(e)})),this.collect.on(Tbe.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;if(this.enableCookie){var t=this.storage.getCookie(this.tokenKey,this.cookieDomain);this.cacheToken=t&&"string"==typeof t?JSON.parse(t):{}}else 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(Tbe.CustomWebId,(function(){e.tokenReady=!0,e.collect.emit(Tbe.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:Ibe(),user_unique_id:this.configManager.get("user_unique_id")||Ibe()}):this.remoteWebid()},e.prototype.checkEnv=function(){var e=window.navigator.userAgent;if(-1!==KR(e).call(e,"miniProgram")||-1!==KR(e).call(e,"MiniProgram")){var t=lbe(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(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 发起WebID请求",logType:"fetch",level:"info",time:Date.now(),data:n,infoType:"sdk"}),this.collect.requestManager.useRequest({url:t,data:n,success:function(t){var n;if(t&&0===t.e)n=t.web_id,e.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"WebID请求成功",logType:"fetch",level:"info",time:Date.now(),data:t,infoType:"sdk"});else{var r=Ibe();n=r,e.collect.configManager.set({localWebId:r}),e.collect.emit(Tbe.TokenError),e.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"WebID请求返回值异常,采用本地生成",logType:"fetch",level:"warn",time:Date.now(),data:t,infoType:"sdk"}),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(){var t=Ibe();e.complete({web_id:e.configManager.get("web_id")||t,user_unique_id:e.configManager.get("user_unique_id")||t}),e.collect.configManager.set({localWebId:t}),e.collect.emit(Tbe.TokenError),e.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"WebID请求网络异常,采用本地生成",logType:"fetch",level:"error",time:Date.now(),data:{localWebId:t},infoType:"sdk"}),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,r=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 i=this.configManager.get("device_id")||r||t;this.collect.configManager.set({device_id:i}),e=W_e(W_e({},e),{device_id:i})}else(null==e?void 0:e.device_id)&&delete e.device_id;this.setStorage(e),this.tokenReady=!0,this.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 完成用户信息设置",logType:"info",level:"info",time:Date.now(),data:{web_id:t,user_unique_id:n},infoType:"sdk"}),this.collect.emit(Tbe.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(Tbe.TokenComplete)},e.prototype.setUuid=function(e){var t;if(e&&-1===KR(t=["null","undefined","Null","None"]).call(t,e)){var n=String(e),r=this.configManager.get("user_unique_id"),i=this.cacheToken&&this.cacheToken.user_unique_id;if(n===r&&n===i)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(Tbe.TokenChange,"uuid"),this.collect.emit(Tbe.SessionReset)}else this.clearUuid()},e.prototype.clearUuid=function(){this.config.enable_ttwebid||this.configManager.get("web_id")&&this.configManager.get("user_unique_id")!==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(Tbe.TokenReset,"uuid"))},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(Tbe.TokenChange,"uuid")),t!==e&&(this.configManager.set({web_id:e}),this.collect.emit(Tbe.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[WF(t="diss".split("")).call(t).join("")],this.enableCookie||this.enable_ttwebid?(this.storage.setCookie(this.tokenKey,e,this.expiresTime,this.cookieDomain),this.enable_ttwebid&&(delete e.web_id,this.storage.setItem(this.tokenKey,e))):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 jR((function(t){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(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 发起GetToken请求",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(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"GetToken请求成功",logType:"fetch",level:"info",time:Date.now(),data:n,infoType:"sdk"})):(t(""),e.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"GetToken请求失败",logType:"fetch",level:"error",time:Date.now(),data:n,infoType:"sdk"}))},fail:function(){t(""),e.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"GetToken请求失败",logType:"fetch",level:"error",time:Date.now(),infoType:"sdk"})},time:3e4,withCredentials:e.enable_ttwebid})}))},e}();function Obe(e){for(var t=e.length;--t>=0;)e[t]=0}var Lbe=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]),Xbe=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]),Ube=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Bbe=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Nbe=new Array(576);Obe(Nbe);var Vbe=new Array(60);Obe(Vbe);var jbe=new Array(512);Obe(jbe);var Kbe=new Array(256);Obe(Kbe);var Wbe=new Array(29);Obe(Wbe);var Qbe,qbe,Zbe,Ybe=new Array(30);function $be(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function Jbe(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}Obe(Ybe);var eRe=function(e){return e<256?jbe[e]:jbe[256+(e>>>7)]},tRe=function(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},nRe=function(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,tRe(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)},rRe=function(e,t,n){nRe(e,n[2*t],n[2*t+1])},iRe=function(e,t){var n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1},oRe=function(e,t,n){var r,i,o=new Array(16),a=0;for(r=1;r<=15;r++)a=a+n[r-1]<<1,o[r]=a;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=iRe(o[s]++,s))}},aRe=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},sRe=function(e){e.bi_valid>8?tRe(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},cRe=function(e,t,n,r){var i=2*t,o=2*n;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]},lRe=function(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&cRe(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!cRe(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},uRe=function(e,t,n){var r,i,o,a,s=0;if(0!==e.sym_next)do{r=255&e.pending_buf[e.sym_buf+s++],r+=(255&e.pending_buf[e.sym_buf+s++])<<8,i=e.pending_buf[e.sym_buf+s++],0===r?rRe(e,i,t):(o=Kbe[i],rRe(e,o+256+1,t),0!==(a=Lbe[o])&&(i-=Wbe[o],nRe(e,i,a)),o=eRe(--r),rRe(e,o,n),0!==(a=Xbe[o])&&(r-=Ybe[o],nRe(e,r,a)))}while(s<e.sym_next);rRe(e,256,t)},dRe=function(e,t){var n,r,i,o=t.dyn_tree,a=t.stat_desc.static_tree,s=t.stat_desc.has_stree,c=t.stat_desc.elems,l=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<c;n++)0!==o[2*n]?(e.heap[++e.heap_len]=l=n,e.depth[n]=0):o[2*n+1]=0;for(;e.heap_len<2;)o[2*(i=e.heap[++e.heap_len]=l<2?++l:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=a[2*i+1]);for(t.max_code=l,n=e.heap_len>>1;n>=1;n--)lRe(e,o,n);i=c;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],lRe(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*i]=o[2*n]+o[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=i,e.heap[1]=i++,lRe(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,o,a,s,c=t.dyn_tree,l=t.max_code,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,h=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(c[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(o=c[2*c[2*(r=e.heap[n])+1]+1]+1)>p&&(o=p,v++),c[2*r+1]=o,r>l||(e.bl_count[o]++,a=0,r>=f&&(a=h[r-f]),s=c[2*r],e.opt_len+=s*(o+a),d&&(e.static_len+=s*(u[2*r+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(r=e.bl_count[o];0!==r;)(i=e.heap[--n])>l||(c[2*i+1]!==o&&(e.opt_len+=(o-c[2*i+1])*c[2*i],c[2*i+1]=o),r--)}}(e,t),oRe(o,l,e.bl_count)},hRe=function(e,t,n){var r,i,o=-1,a=t[1],s=0,c=7,l=4;for(0===a&&(c=138,l=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=t[2*(r+1)+1],++s<c&&i===a||(s<l?e.bl_tree[2*i]+=s:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,o=i,0===a?(c=138,l=3):i===a?(c=6,l=3):(c=7,l=4))},fRe=function(e,t,n){var r,i,o=-1,a=t[1],s=0,c=7,l=4;for(0===a&&(c=138,l=3),r=0;r<=n;r++)if(i=a,a=t[2*(r+1)+1],!(++s<c&&i===a)){if(s<l)do{rRe(e,i,e.bl_tree)}while(0!=--s);else 0!==i?(i!==o&&(rRe(e,i,e.bl_tree),s--),rRe(e,16,e.bl_tree),nRe(e,s-3,2)):s<=10?(rRe(e,17,e.bl_tree),nRe(e,s-3,3)):(rRe(e,18,e.bl_tree),nRe(e,s-11,7));s=0,o=i,0===a?(c=138,l=3):i===a?(c=6,l=3):(c=7,l=4)}},pRe=!1,vRe=function(e,t,n,r){nRe(e,0+(r?1:0),3),sRe(e),tRe(e,n),tRe(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},gRe=function(e){pRe||(function(){var e,t,n,r,i,o=new Array(16);for(n=0,r=0;r<28;r++)for(Wbe[r]=n,e=0;e<1<<Lbe[r];e++)Kbe[n++]=r;for(Kbe[n-1]=r,i=0,r=0;r<16;r++)for(Ybe[r]=i,e=0;e<1<<Xbe[r];e++)jbe[i++]=r;for(i>>=7;r<30;r++)for(Ybe[r]=i<<7,e=0;e<1<<Xbe[r]-7;e++)jbe[256+i++]=r;for(t=0;t<=15;t++)o[t]=0;for(e=0;e<=143;)Nbe[2*e+1]=8,e++,o[8]++;for(;e<=255;)Nbe[2*e+1]=9,e++,o[9]++;for(;e<=279;)Nbe[2*e+1]=7,e++,o[7]++;for(;e<=287;)Nbe[2*e+1]=8,e++,o[8]++;for(oRe(Nbe,287,o),e=0;e<30;e++)Vbe[2*e+1]=5,Vbe[2*e]=iRe(e,5);Qbe=new $be(Nbe,Lbe,257,286,15),qbe=new $be(Vbe,Xbe,0,30,15),Zbe=new $be(new Array(0),Ube,0,19,7)}(),pRe=!0),e.l_desc=new Jbe(e.dyn_ltree,Qbe),e.d_desc=new Jbe(e.dyn_dtree,qbe),e.bl_desc=new Jbe(e.bl_tree,Zbe),e.bi_buf=0,e.bi_valid=0,aRe(e)},yRe=vRe,mRe=function(e,t,n,r){var i,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)),dRe(e,e.l_desc),dRe(e,e.d_desc),a=function(e){var t;for(hRe(e,e.dyn_ltree,e.l_desc.max_code),hRe(e,e.dyn_dtree,e.d_desc.max_code),dRe(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*Bbe[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(o=e.static_len+3+7>>>3)<=i&&(i=o)):i=o=n+5,n+4<=i&&-1!==t?vRe(e,t,n,r):4===e.strategy||o===i?(nRe(e,2+(r?1:0),3),uRe(e,Nbe,Vbe)):(nRe(e,4+(r?1:0),3),function(e,t,n,r){var i;for(nRe(e,t-257,5),nRe(e,n-1,5),nRe(e,r-4,4),i=0;i<r;i++)nRe(e,e.bl_tree[2*Bbe[i]+1],3);fRe(e,e.dyn_ltree,t-1),fRe(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),uRe(e,e.dyn_ltree,e.dyn_dtree)),aRe(e),r&&sRe(e)},_Re=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*(Kbe[n]+256+1)]++,e.dyn_dtree[2*eRe(t)]++),e.sym_next===e.sym_end},bRe=function(e){var t;nRe(e,2,3),rRe(e,256,Nbe),16===(t=e).bi_valid?(tRe(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)},RRe=function(e,t,n,r){for(var i=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{o=o+(i=i+t[r++]|0)|0}while(--a);i%=65521,o%=65521}return i|o<<16|0},wRe=new Uint32Array(function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}()),GRe=function(e,t,n,r){var i=wRe,o=r+n;e^=-1;for(var a=r;a<o;a++)e=e>>>8^i[255&(e^t[a])];return-1^e},TRe={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"},kRe={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},SRe=gRe,ERe=yRe,MRe=mRe,DRe=_Re,zRe=bRe,ARe=kRe.Z_NO_FLUSH,PRe=kRe.Z_PARTIAL_FLUSH,xRe=kRe.Z_FULL_FLUSH,CRe=kRe.Z_FINISH,FRe=kRe.Z_BLOCK,IRe=kRe.Z_OK,HRe=kRe.Z_STREAM_END,ORe=kRe.Z_STREAM_ERROR,LRe=kRe.Z_DATA_ERROR,XRe=kRe.Z_BUF_ERROR,URe=kRe.Z_DEFAULT_COMPRESSION,BRe=kRe.Z_FILTERED,NRe=kRe.Z_HUFFMAN_ONLY,VRe=kRe.Z_RLE,jRe=kRe.Z_FIXED,KRe=kRe.Z_DEFAULT_STRATEGY,WRe=kRe.Z_UNKNOWN,QRe=kRe.Z_DEFLATED,qRe=function(e,t){return e.msg=TRe[t],t},ZRe=function(e){return 2*e-(e>4?9:0)},YRe=function(e){for(var t=e.length;--t>=0;)e[t]=0},$Re=function(e){var t,n,r,i=e.w_size;r=t=e.hash_size;do{n=e.head[--r],e.head[r]=n>=i?n-i:0}while(--t);r=t=i;do{n=e.prev[--r],e.prev[r]=n>=i?n-i:0}while(--t)},JRe=function(e,t,n){return(t<<e.hash_shift^n)&e.hash_mask},ewe=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))},twe=function(e,t){MRe(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,ewe(e.strm)},nwe=function(e,t){e.pending_buf[e.pending++]=t},rwe=function(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},iwe=function(e,t,n,r){var i=e.avail_in;return i>r&&(i=r),0===i?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),1===e.state.wrap?e.adler=RRe(e.adler,t,i,n):2===e.state.wrap&&(e.adler=GRe(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},owe=function(e,t){var n,r,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,l=e.window,u=e.w_mask,d=e.prev,h=e.strstart+258,f=l[o+a-1],p=l[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(l[(n=t)+a]===p&&l[n+a-1]===f&&l[n]===l[o]&&l[++n]===l[o+1]){o+=2,n++;do{}while(l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&o<h);if(r=258-(h-o),o=h-258,r>a){if(e.match_start=t,a=r,r>=s)break;f=l[o+a-1],p=l[o+a]}}}while((t=d[t&u])>c&&0!=--i);return a<=e.lookahead?a:e.lookahead},awe=function(e){var t,n,r,i=e.w_size;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=i+(i-262)&&(e.window.set(e.window.subarray(i,i+i-n),0),e.match_start-=i,e.strstart-=i,e.block_start-=i,e.insert>e.strstart&&(e.insert=e.strstart),$Re(e),n+=i),0===e.strm.avail_in)break;if(t=iwe(e.strm,e.window,e.strstart+e.lookahead,n),e.lookahead+=t,e.lookahead+e.insert>=3)for(r=e.strstart-e.insert,e.ins_h=e.window[r],e.ins_h=JRe(e,e.ins_h,e.window[r+1]);e.insert&&(e.ins_h=JRe(e,e.ins_h,e.window[r+3-1]),e.prev[r&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=r,r++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&0!==e.strm.avail_in)},swe=function(e,t){var n,r,i,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,i=e.bi_valid+42>>3,e.strm.avail_out<i)break;if(i=e.strm.avail_out-i,n>(r=e.strstart-e.block_start)+e.strm.avail_in&&(n=r+e.strm.avail_in),n>i&&(n=i),n<o&&(0===n&&t!==CRe||t===ARe||n!==r+e.strm.avail_in))break;a=t===CRe&&n===r+e.strm.avail_in?1:0,ERe(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,ewe(e.strm),r&&(r>n&&(r=n),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+r),e.strm.next_out),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r,e.block_start+=r,n-=r),n&&(iwe(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!==ARe&&t!==CRe&&0===e.strm.avail_in&&e.strstart===e.block_start?2:(i=e.window_size-e.strstart,e.strm.avail_in>i&&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++,i+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),i>e.strm.avail_in&&(i=e.strm.avail_in),i&&(iwe(e.strm,e.window,e.strstart,i),e.strstart+=i,e.insert+=i>e.w_size-e.insert?e.w_size-e.insert:i),e.high_water<e.strstart&&(e.high_water=e.strstart),i=e.bi_valid+42>>3,o=(i=e.pending_buf_size-i>65535?65535:e.pending_buf_size-i)>e.w_size?e.w_size:i,((r=e.strstart-e.block_start)>=o||(r||t===CRe)&&t!==ARe&&0===e.strm.avail_in&&r<=i)&&(n=r>i?i:r,a=t===CRe&&0===e.strm.avail_in&&n===r?1:0,ERe(e,e.block_start,n,a),e.block_start+=n,ewe(e.strm)),a?3:1)},cwe=function(e,t){for(var n,r;;){if(e.lookahead<262){if(awe(e),e.lookahead<262&&t===ARe)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=JRe(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=owe(e,n)),e.match_length>=3)if(r=DRe(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=JRe(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=JRe(e,e.ins_h,e.window[e.strstart+1]);else r=DRe(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(twe(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===CRe?(twe(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(twe(e,!1),0===e.strm.avail_out)?1:2},lwe=function(e,t){for(var n,r,i;;){if(e.lookahead<262){if(awe(e),e.lookahead<262&&t===ARe)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=JRe(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=owe(e,n),e.match_length<=5&&(e.strategy===BRe||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,r=DRe(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=JRe(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++,r&&(twe(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=DRe(e,0,e.window[e.strstart-1]))&&twe(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&&(r=DRe(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===CRe?(twe(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(twe(e,!1),0===e.strm.avail_out)?1:2};function uwe(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}var dwe=[new uwe(0,0,0,0,swe),new uwe(4,4,8,4,cwe),new uwe(4,5,16,8,cwe),new uwe(4,6,32,32,cwe),new uwe(4,4,16,16,lwe),new uwe(8,16,32,32,lwe),new uwe(8,16,128,128,lwe),new uwe(8,32,128,256,lwe),new uwe(32,128,258,1024,lwe),new uwe(32,258,258,4096,lwe)];function hwe(){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=QRe,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),YRe(this.dyn_ltree),YRe(this.dyn_dtree),YRe(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),YRe(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),YRe(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 fwe=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},pwe=function(e){if(fwe(e))return qRe(e,ORe);e.total_in=e.total_out=0,e.data_type=WRe;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,SRe(t),IRe},vwe=function(e){var t,n=pwe(e);return n===IRe&&((t=e.state).window_size=2*t.w_size,YRe(t.head),t.max_lazy_match=dwe[t.level].max_lazy,t.good_match=dwe[t.level].good_length,t.nice_match=dwe[t.level].nice_length,t.max_chain_length=dwe[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},gwe=function(e,t,n,r,i,o){if(!e)return ORe;var a=1;if(t===URe&&(t=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),i<1||i>9||n!==QRe||r<8||r>15||t<0||t>9||o<0||o>jRe||8===r&&1!==a)return qRe(e,ORe);8===r&&(r=9);var s=new hwe;return e.state=s,s.strm=e,s.status=42,s.wrap=a,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+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<<i+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,vwe(e)},ywe={deflateInit:function(e,t){return gwe(e,t,QRe,15,8,KRe)},deflateInit2:gwe,deflateReset:vwe,deflateResetKeep:pwe,deflateSetHeader:function(e,t){return fwe(e)||2!==e.state.wrap?ORe:(e.state.gzhead=t,IRe)},deflate:function(e,t){if(fwe(e)||t>FRe||t<0)return e?qRe(e,ORe):ORe;var n=e.state;if(!e.output||0!==e.avail_in&&!e.input||666===n.status&&t!==CRe)return qRe(e,0===e.avail_out?XRe:ORe);var r=n.last_flush;if(n.last_flush=t,0!==n.pending){if(ewe(e),0===e.avail_out)return n.last_flush=-1,IRe}else if(0===e.avail_in&&ZRe(t)<=ZRe(r)&&t!==CRe)return qRe(e,XRe);if(666===n.status&&0!==e.avail_in)return qRe(e,XRe);if(42===n.status&&0===n.wrap&&(n.status=113),42===n.status){var i=QRe+(n.w_bits-8<<4)<<8;if(i|=(n.strategy>=NRe||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(i|=32),rwe(n,i+=31-i%31),0!==n.strstart&&(rwe(n,e.adler>>>16),rwe(n,65535&e.adler)),e.adler=1,n.status=113,ewe(e),0!==n.pending)return n.last_flush=-1,IRe}if(57===n.status)if(e.adler=0,nwe(n,31),nwe(n,139),nwe(n,8),n.gzhead)nwe(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)),nwe(n,255&n.gzhead.time),nwe(n,n.gzhead.time>>8&255),nwe(n,n.gzhead.time>>16&255),nwe(n,n.gzhead.time>>24&255),nwe(n,9===n.level?2:n.strategy>=NRe||n.level<2?4:0),nwe(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(nwe(n,255&n.gzhead.extra.length),nwe(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=GRe(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69;else if(nwe(n,0),nwe(n,0),nwe(n,0),nwe(n,0),nwe(n,0),nwe(n,9===n.level?2:n.strategy>=NRe||n.level<2?4:0),nwe(n,3),n.status=113,ewe(e),0!==n.pending)return n.last_flush=-1,IRe;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=GRe(e.adler,n.pending_buf,n.pending-o,o)),n.gzindex+=s,ewe(e),0!==n.pending)return n.last_flush=-1,IRe;o=0,a-=s}var c=new Uint8Array(n.gzhead.extra);n.pending_buf.set(c.subarray(n.gzindex,n.gzindex+a),n.pending),n.pending+=a,n.gzhead.hcrc&&n.pending>o&&(e.adler=GRe(e.adler,n.pending_buf,n.pending-o,o)),n.gzindex=0}n.status=73}if(73===n.status){if(n.gzhead.name){var l,u=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>u&&(e.adler=GRe(e.adler,n.pending_buf,n.pending-u,u)),ewe(e),0!==n.pending)return n.last_flush=-1,IRe;u=0}l=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,nwe(n,l)}while(0!==l);n.gzhead.hcrc&&n.pending>u&&(e.adler=GRe(e.adler,n.pending_buf,n.pending-u,u)),n.gzindex=0}n.status=91}if(91===n.status){if(n.gzhead.comment){var d,h=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>h&&(e.adler=GRe(e.adler,n.pending_buf,n.pending-h,h)),ewe(e),0!==n.pending)return n.last_flush=-1,IRe;h=0}d=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,nwe(n,d)}while(0!==d);n.gzhead.hcrc&&n.pending>h&&(e.adler=GRe(e.adler,n.pending_buf,n.pending-h,h))}n.status=103}if(103===n.status){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(ewe(e),0!==n.pending))return n.last_flush=-1,IRe;nwe(n,255&e.adler),nwe(n,e.adler>>8&255),e.adler=0}if(n.status=113,ewe(e),0!==n.pending)return n.last_flush=-1,IRe}if(0!==e.avail_in||0!==n.lookahead||t!==ARe&&666!==n.status){var f=0===n.level?swe(n,t):n.strategy===NRe?function(e,t){for(var n;;){if(0===e.lookahead&&(awe(e),0===e.lookahead)){if(t===ARe)return 1;break}if(e.match_length=0,n=DRe(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(twe(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===CRe?(twe(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(twe(e,!1),0===e.strm.avail_out)?1:2}(n,t):n.strategy===VRe?function(e,t){for(var n,r,i,o,a=e.window;;){if(e.lookahead<=258){if(awe(e),e.lookahead<=258&&t===ARe)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=a[i=e.strstart-1])===a[++i]&&r===a[++i]&&r===a[++i]){o=e.strstart+258;do{}while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&i<o);e.match_length=258-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=DRe(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=DRe(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(twe(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===CRe?(twe(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(twe(e,!1),0===e.strm.avail_out)?1:2}(n,t):dwe[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),IRe;if(2===f&&(t===PRe?zRe(n):t!==FRe&&(ERe(n,0,0,!1),t===xRe&&(YRe(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),ewe(e),0===e.avail_out))return n.last_flush=-1,IRe}return t!==CRe?IRe:n.wrap<=0?HRe:(2===n.wrap?(nwe(n,255&e.adler),nwe(n,e.adler>>8&255),nwe(n,e.adler>>16&255),nwe(n,e.adler>>24&255),nwe(n,255&e.total_in),nwe(n,e.total_in>>8&255),nwe(n,e.total_in>>16&255),nwe(n,e.total_in>>24&255)):(rwe(n,e.adler>>>16),rwe(n,65535&e.adler)),ewe(e),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?IRe:HRe)},deflateEnd:function(e){if(fwe(e))return ORe;var t=e.state.status;return e.state=null,113===t?qRe(e,LRe):IRe},deflateSetDictionary:function(e,t){var n=t.length;if(fwe(e))return ORe;var r=e.state,i=r.wrap;if(2===i||1===i&&42!==r.status||r.lookahead)return ORe;if(1===i&&(e.adler=RRe(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){0===i&&(YRe(r.head),r.strstart=0,r.block_start=0,r.insert=0);var o=new Uint8Array(r.w_size);o.set(t.subarray(n-r.w_size,n),0),t=o,n=r.w_size}var a=e.avail_in,s=e.next_in,c=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,awe(r);r.lookahead>=3;){var l=r.strstart,u=r.lookahead-2;do{r.ins_h=JRe(r,r.ins_h,r.window[l+3-1]),r.prev[l&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=l,l++}while(--u);r.strstart=l,r.lookahead=2,awe(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=s,e.input=c,e.avail_in=a,r.wrap=i,IRe},deflateInfo:"pako deflate (from Nodeca project)"},mwe=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},_we={assign:function(e){for(var t=QR(Array.prototype).call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=Su(n))throw new TypeError(n+"must be non-object");for(var r in n)mwe(n,r)&&(e[r]=n[r])}}return e},flattenChunks:function(e){for(var t=0,n=0,r=e.length;n<r;n++)t+=e[n].length;for(var i=new Uint8Array(t),o=0,a=0,s=e.length;o<s;o++){var c=e[o];i.set(c,a),a+=c.length}return i}},bwe=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(oK){bwe=!1}for(var Rwe=new Uint8Array(256),wwe=0;wwe<256;wwe++)Rwe[wwe]=wwe>=252?6:wwe>=248?5:wwe>=240?4:wwe>=224?3:wwe>=192?2:1;Rwe[254]=Rwe[254]=1;var Gwe={string2buf:function(e){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);var t,n,r,i,o,a=e.length,s=0;for(i=0;i<a;i++)55296==(64512&(n=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(r=e.charCodeAt(i+1)))&&(n=65536+(n-55296<<10)+(r-56320),i++),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),o=0,i=0;o<s;i++)55296==(64512&(n=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(r=e.charCodeAt(i+1)))&&(n=65536+(n-55296<<10)+(r-56320),i++),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},buf2string:function(e,t){var n,r,i=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));var o=new Array(2*i);for(r=0,n=0;n<i;){var a=e[n++];if(a<128)o[r++]=a;else{var s=Rwe[a];if(s>4)o[r++]=65533,n+=s-1;else{for(a&=2===s?31:3===s?15:7;s>1&&n<i;)a=a<<6|63&e[n++],s--;s>1?o[r++]=65533:a<65536?o[r++]=a:(a-=65536,o[r++]=55296|a>>10&1023,o[r++]=56320|1023&a)}}}return function(e,t){if(t<65534&&e.subarray&&bwe)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));for(var n="",r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n}(o,r)},utf8border: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+Rwe[e[n]]>t?n:t}},Twe=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},kwe=Object.prototype.toString,Swe=kRe.Z_NO_FLUSH,Ewe=kRe.Z_SYNC_FLUSH,Mwe=kRe.Z_FULL_FLUSH,Dwe=kRe.Z_FINISH,zwe=kRe.Z_OK,Awe=kRe.Z_STREAM_END,Pwe=kRe.Z_DEFAULT_COMPRESSION,xwe=kRe.Z_DEFAULT_STRATEGY,Cwe=kRe.Z_DEFLATED;function Fwe(e){this.options=_we.assign({level:Pwe,method:Cwe,chunkSize:16384,windowBits:15,memLevel:8,strategy:xwe},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 Twe,this.strm.avail_out=0;var n=ywe.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==zwe)throw new Error(TRe[n]);if(t.header&&ywe.deflateSetHeader(this.strm,t.header),t.dictionary){var r;if(r="string"==typeof t.dictionary?Gwe.string2buf(t.dictionary):"[object ArrayBuffer]"===kwe.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(n=ywe.deflateSetDictionary(this.strm,r))!==zwe)throw new Error(TRe[n]);this._dict_set=!0}}function Iwe(e,t){var n=new Fwe(t);if(n.push(e,!0),n.err)throw n.msg||TRe[n.err];return n.result}Fwe.prototype.push=function(e,t){var n,r,i=this.strm,o=this.options.chunkSize;if(this.ended)return!1;for(r=t===~~t?t:!0===t?Dwe:Swe,"string"==typeof e?i.input=Gwe.string2buf(e):"[object ArrayBuffer]"===kwe.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;)if(0===i.avail_out&&(i.output=new Uint8Array(o),i.next_out=0,i.avail_out=o),(r===Ewe||r===Mwe)&&i.avail_out<=6)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else{if((n=ywe.deflate(i,r))===Awe)return i.next_out>0&&this.onData(i.output.subarray(0,i.next_out)),n=ywe.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===zwe;if(0!==i.avail_out){if(r>0&&i.next_out>0)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else if(0===i.avail_in)break}else this.onData(i.output)}return!0},Fwe.prototype.onData=function(e){this.chunks.push(e)},Fwe.prototype.onEnd=function(e){e===zwe&&(this.result=_we.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var Hwe={Deflate:Fwe,deflate:Iwe,deflateRaw:function(e,t){return(t=t||{}).raw=!0,Iwe(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,Iwe(e,t)},constants:kRe},Owe=function(e,t){var n,r,i,o,a,s,c,l,u,d,h,f,p,v,g,y,m,_,b,R,w,G,T,k,S=e.state;n=e.next_in,T=e.input,r=n+(e.avail_in-5),i=e.next_out,k=e.output,o=i-(t-e.avail_out),a=i+(e.avail_out-257),s=S.dmax,c=S.wsize,l=S.whave,u=S.wnext,d=S.window,h=S.hold,f=S.bits,p=S.lencode,v=S.distcode,g=(1<<S.lenbits)-1,y=(1<<S.distbits)-1;e:do{f<15&&(h+=T[n++]<<f,f+=8,h+=T[n++]<<f,f+=8),m=p[h&g];t:for(;;){if(h>>>=_=m>>>24,f-=_,0==(_=m>>>16&255))k[i++]=65535&m;else{if(!(16&_)){if(0==(64&_)){m=p[(65535&m)+(h&(1<<_)-1)];continue t}if(32&_){S.mode=16191;break e}e.msg="invalid literal/length code",S.mode=16209;break e}b=65535&m,(_&=15)&&(f<_&&(h+=T[n++]<<f,f+=8),b+=h&(1<<_)-1,h>>>=_,f-=_),f<15&&(h+=T[n++]<<f,f+=8,h+=T[n++]<<f,f+=8),m=v[h&y];n:for(;;){if(h>>>=_=m>>>24,f-=_,!(16&(_=m>>>16&255))){if(0==(64&_)){m=v[(65535&m)+(h&(1<<_)-1)];continue n}e.msg="invalid distance code",S.mode=16209;break e}if(R=65535&m,f<(_&=15)&&(h+=T[n++]<<f,(f+=8)<_&&(h+=T[n++]<<f,f+=8)),(R+=h&(1<<_)-1)>s){e.msg="invalid distance too far back",S.mode=16209;break e}if(h>>>=_,f-=_,R>(_=i-o)){if((_=R-_)>l&&S.sane){e.msg="invalid distance too far back",S.mode=16209;break e}if(w=0,G=d,0===u){if(w+=c-_,_<b){b-=_;do{k[i++]=d[w++]}while(--_);w=i-R,G=k}}else if(u<_){if(w+=c+u-_,(_-=u)<b){b-=_;do{k[i++]=d[w++]}while(--_);if(w=0,u<b){b-=_=u;do{k[i++]=d[w++]}while(--_);w=i-R,G=k}}}else if(w+=u-_,_<b){b-=_;do{k[i++]=d[w++]}while(--_);w=i-R,G=k}for(;b>2;)k[i++]=G[w++],k[i++]=G[w++],k[i++]=G[w++],b-=3;b&&(k[i++]=G[w++],b>1&&(k[i++]=G[w++]))}else{w=i-R;do{k[i++]=k[w++],k[i++]=k[w++],k[i++]=k[w++],b-=3}while(b>2);b&&(k[i++]=k[w++],b>1&&(k[i++]=k[w++]))}break}}break}}while(n<r&&i<a);n-=b=f>>3,h&=(1<<(f-=b<<3))-1,e.next_in=n,e.next_out=i,e.avail_in=n<r?r-n+5:5-(n-r),e.avail_out=i<a?a-i+257:257-(i-a),S.hold=h,S.bits=f},Lwe=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]),Xwe=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]),Uwe=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]),Bwe=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]),Nwe=function(e,t,n,r,i,o,a,s){var c,l,u,d,h,f,p,v,g,y=s.bits,m=0,_=0,b=0,R=0,w=0,G=0,T=0,k=0,S=0,E=0,M=null,D=new Uint16Array(16),z=new Uint16Array(16),A=null;for(m=0;m<=15;m++)D[m]=0;for(_=0;_<r;_++)D[t[n+_]]++;for(w=y,R=15;R>=1&&0===D[R];R--);if(w>R&&(w=R),0===R)return i[o++]=20971520,i[o++]=20971520,s.bits=1,0;for(b=1;b<R&&0===D[b];b++);for(w<b&&(w=b),k=1,m=1;m<=15;m++)if(k<<=1,(k-=D[m])<0)return-1;if(k>0&&(0===e||1!==R))return-1;for(z[1]=0,m=1;m<15;m++)z[m+1]=z[m]+D[m];for(_=0;_<r;_++)0!==t[n+_]&&(a[z[t[n+_]]++]=_);if(0===e?(M=A=a,f=20):1===e?(M=Lwe,A=Xwe,f=257):(M=Uwe,A=Bwe,f=0),E=0,_=0,m=b,h=o,G=w,T=0,u=-1,d=(S=1<<w)-1,1===e&&S>852||2===e&&S>592)return 1;for(;;){p=m-T,a[_]+1<f?(v=0,g=a[_]):a[_]>=f?(v=A[a[_]-f],g=M[a[_]-f]):(v=96,g=0),c=1<<m-T,b=l=1<<G;do{i[h+(E>>T)+(l-=c)]=p<<24|v<<16|g|0}while(0!==l);for(c=1<<m-1;E&c;)c>>=1;if(0!==c?(E&=c-1,E+=c):E=0,_++,0==--D[m]){if(m===R)break;m=t[n+a[_]]}if(m>w&&(E&d)!==u){for(0===T&&(T=w),h+=b,k=1<<(G=m-T);G+T<R&&!((k-=D[G+T])<=0);)G++,k<<=1;if(S+=1<<G,1===e&&S>852||2===e&&S>592)return 1;i[u=E&d]=w<<24|G<<16|h-o|0}}return 0!==E&&(i[h+E]=m-T<<24|64<<16|0),s.bits=w,0},Vwe=kRe.Z_FINISH,jwe=kRe.Z_BLOCK,Kwe=kRe.Z_TREES,Wwe=kRe.Z_OK,Qwe=kRe.Z_STREAM_END,qwe=kRe.Z_NEED_DICT,Zwe=kRe.Z_STREAM_ERROR,Ywe=kRe.Z_DATA_ERROR,$we=kRe.Z_MEM_ERROR,Jwe=kRe.Z_BUF_ERROR,eGe=kRe.Z_DEFLATED,tGe=function(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)};function nGe(){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 rGe,iGe,oGe=function(e){if(!e)return 1;var t=e.state;return!t||t.strm!==e||t.mode<16180||t.mode>16211?1:0},aGe=function(e){if(oGe(e))return Zwe;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,Wwe},sGe=function(e){if(oGe(e))return Zwe;var t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,aGe(e)},cGe=function(e,t){var n;if(oGe(e))return Zwe;var r=e.state;return t<0?(n=0,t=-t):(n=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?Zwe:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,sGe(e))},lGe=function(e,t){if(!e)return Zwe;var n=new nGe;e.state=n,n.strm=e,n.window=null,n.mode=16180;var r=cGe(e,t);return r!==Wwe&&(e.state=null),r},uGe=!0,dGe=function(e){if(uGe){rGe=new Int32Array(512),iGe=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(Nwe(1,e.lens,0,288,rGe,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Nwe(2,e.lens,0,32,iGe,0,e.work,{bits:5}),uGe=!1}e.lencode=rGe,e.lenbits=9,e.distcode=iGe,e.distbits=5},hGe=function(e,t,n,r){var i,o=e.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Uint8Array(o.wsize)),r>=o.wsize?(o.window.set(t.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):((i=o.wsize-o.wnext)>r&&(i=r),o.window.set(t.subarray(n-r,n-r+i),o.wnext),(r-=i)?(o.window.set(t.subarray(n-r,n),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0},fGe={inflateReset:sGe,inflateReset2:cGe,inflateResetKeep:aGe,inflateInit:function(e){return lGe(e,15)},inflateInit2:lGe,inflate:function(e,t){var n,r,i,o,a,s,c,l,u,d,h,f,p,v,g,y,m,_,b,R,w,G,T,k,S=0,E=new Uint8Array(4),M=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(oGe(e)||!e.output||!e.input&&0!==e.avail_in)return Zwe;16191===(n=e.state).mode&&(n.mode=16192),a=e.next_out,i=e.output,c=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,d=s,h=c,G=Wwe;e:for(;;)switch(n.mode){case 16180:if(0===n.wrap){n.mode=16192;break}for(;u<16;){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}if(2&n.wrap&&35615===l){0===n.wbits&&(n.wbits=15),n.check=0,E[0]=255&l,E[1]=l>>>8&255,n.check=GRe(n.check,E,2,0),l=0,u=0,n.mode=16181;break}if(n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&l)<<8)+(l>>8))%31){e.msg="incorrect header check",n.mode=16209;break}if((15&l)!==eGe){e.msg="unknown compression method",n.mode=16209;break}if(u-=4,w=8+(15&(l>>>=4)),0===n.wbits&&(n.wbits=w),w>15||w>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&l?16189:16191,l=0,u=0;break;case 16181:for(;u<16;){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}if(n.flags=l,(255&nX(n))!==eGe){e.msg="unknown compression method",n.mode=16209;break}if(57344&nX(n)){e.msg="unknown header flags set",n.mode=16209;break}n.head&&(n.head.text=l>>8&1),512&nX(n)&&4&n.wrap&&(E[0]=255&l,E[1]=l>>>8&255,n.check=GRe(n.check,E,2,0)),l=0,u=0,n.mode=16182;case 16182:for(;u<32;){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}n.head&&(n.head.time=l),512&nX(n)&&4&n.wrap&&(E[0]=255&l,E[1]=l>>>8&255,E[2]=l>>>16&255,E[3]=l>>>24&255,n.check=GRe(n.check,E,4,0)),l=0,u=0,n.mode=16183;case 16183:for(;u<16;){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}n.head&&(n.head.xflags=255&l,n.head.os=l>>8),512&nX(n)&&4&n.wrap&&(E[0]=255&l,E[1]=l>>>8&255,n.check=GRe(n.check,E,2,0)),l=0,u=0,n.mode=16184;case 16184:if(1024&nX(n)){for(;u<16;){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}n.length=l,n.head&&(n.head.extra_len=l),512&nX(n)&&4&n.wrap&&(E[0]=255&l,E[1]=l>>>8&255,n.check=GRe(n.check,E,2,0)),l=0,u=0}else n.head&&(n.head.extra=null);n.mode=16185;case 16185:if(1024&nX(n)&&((f=n.length)>s&&(f=s),f&&(n.head&&(w=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+f),w)),512&nX(n)&&4&n.wrap&&(n.check=GRe(n.check,r,f,o)),s-=f,o+=f,n.length-=f),n.length))break e;n.length=0,n.mode=16186;case 16186:if(2048&nX(n)){if(0===s)break e;f=0;do{w=r[o+f++],n.head&&w&&n.length<65536&&(n.head.name+=String.fromCharCode(w))}while(w&&f<s);if(512&nX(n)&&4&n.wrap&&(n.check=GRe(n.check,r,f,o)),s-=f,o+=f,w)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=16187;case 16187:if(4096&nX(n)){if(0===s)break e;f=0;do{w=r[o+f++],n.head&&w&&n.length<65536&&(n.head.comment+=String.fromCharCode(w))}while(w&&f<s);if(512&nX(n)&&4&n.wrap&&(n.check=GRe(n.check,r,f,o)),s-=f,o+=f,w)break e}else n.head&&(n.head.comment=null);n.mode=16188;case 16188:if(512&nX(n)){for(;u<16;){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}if(4&n.wrap&&l!==(65535&n.check)){e.msg="header crc mismatch",n.mode=16209;break}l=0,u=0}n.head&&(n.head.hcrc=nX(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--,l+=r[o++]<<u,u+=8}e.adler=n.check=tGe(l),l=0,u=0,n.mode=16190;case 16190:if(0===n.havedict)return e.next_out=a,e.avail_out=c,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=u,qwe;e.adler=n.check=1,n.mode=16191;case 16191:if(t===jwe||t===Kwe)break e;case 16192:if(n.last){l>>>=7&u,u-=7&u,n.mode=16206;break}for(;u<3;){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}switch(n.last=1&l,u-=1,3&(l>>>=1)){case 0:n.mode=16193;break;case 1:if(dGe(n),n.mode=16199,t===Kwe){l>>>=2,u-=2;break e}break;case 2:n.mode=16196;break;case 3:e.msg="invalid block type",n.mode=16209}l>>>=2,u-=2;break;case 16193:for(l>>>=7&u,u-=7&u;u<32;){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}if((65535&l)!=(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=16209;break}if(n.length=65535&l,l=0,u=0,n.mode=16194,t===Kwe)break e;case 16194:n.mode=16195;case 16195:if(f=n.length){if(f>s&&(f=s),f>c&&(f=c),0===f)break e;i.set(r.subarray(o,o+f),a),s-=f,o+=f,c-=f,a+=f,n.length-=f;break}n.mode=16191;break;case 16196:for(;u<14;){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}if(n.nlen=257+(31&l),l>>>=5,u-=5,n.ndist=1+(31&l),l>>>=5,u-=5,n.ncode=4+(15&l),l>>>=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--,l+=r[o++]<<u,u+=8}n.lens[M[n.have++]]=7&l,l>>>=3,u-=3}for(;n.have<19;)n.lens[M[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,T={bits:n.lenbits},G=Nwe(0,n.lens,0,19,n.lencode,0,n.work,T),n.lenbits=T.bits,G){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=(S=n.lencode[l&(1<<n.lenbits)-1])>>>16&255,m=65535&S,!((g=S>>>24)<=u);){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}if(m<16)l>>>=g,u-=g,n.lens[n.have++]=m;else{if(16===m){for(k=g+2;u<k;){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}if(l>>>=g,u-=g,0===n.have){e.msg="invalid bit length repeat",n.mode=16209;break}w=n.lens[n.have-1],f=3+(3&l),l>>>=2,u-=2}else if(17===m){for(k=g+3;u<k;){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}u-=g,w=0,f=3+(7&(l>>>=g)),l>>>=3,u-=3}else{for(k=g+7;u<k;){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}u-=g,w=0,f=11+(127&(l>>>=g)),l>>>=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++]=w}}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,T={bits:n.lenbits},G=Nwe(1,n.lens,0,n.nlen,n.lencode,0,n.work,T),n.lenbits=T.bits,G){e.msg="invalid literal/lengths set",n.mode=16209;break}if(n.distbits=6,n.distcode=n.distdyn,T={bits:n.distbits},G=Nwe(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,T),n.distbits=T.bits,G){e.msg="invalid distances set",n.mode=16209;break}if(n.mode=16199,t===Kwe)break e;case 16199:n.mode=16200;case 16200:if(s>=6&&c>=258){e.next_out=a,e.avail_out=c,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=u,Owe(e,h),a=e.next_out,i=e.output,c=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,16191===n.mode&&(n.back=-1);break}for(n.back=0;y=(S=n.lencode[l&(1<<n.lenbits)-1])>>>16&255,m=65535&S,!((g=S>>>24)<=u);){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}if(y&&0==(240&y)){for(_=g,b=y,R=m;y=(S=n.lencode[R+((l&(1<<_+b)-1)>>_)])>>>16&255,m=65535&S,!(_+(g=S>>>24)<=u);){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}l>>>=_,u-=_,n.back+=_}if(l>>>=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(k=n.extra;u<k;){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=16202;case 16202:for(;y=(S=n.distcode[l&(1<<n.distbits)-1])>>>16&255,m=65535&S,!((g=S>>>24)<=u);){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}if(0==(240&y)){for(_=g,b=y,R=m;y=(S=n.distcode[R+((l&(1<<_+b)-1)>>_)])>>>16&255,m=65535&S,!(_+(g=S>>>24)<=u);){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}l>>>=_,u-=_,n.back+=_}if(l>>>=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(k=n.extra;u<k;){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}n.offset+=l&(1<<n.extra)-1,l>>>=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===c)break e;if(f=h-c,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=i,p=a-n.offset,f=n.length;f>c&&(f=c),c-=f,n.length-=f;do{i[a++]=v[p++]}while(--f);0===n.length&&(n.mode=16200);break;case 16205:if(0===c)break e;i[a++]=n.length,c--,n.mode=16200;break;case 16206:if(n.wrap){for(;u<32;){if(0===s)break e;s--,l|=r[o++]<<u,u+=8}if(h-=c,e.total_out+=h,n.total+=h,4&n.wrap&&h&&(e.adler=n.check=nX(n)?GRe(n.check,i,h,a-h):RRe(n.check,i,h,a-h)),h=c,4&n.wrap&&(nX(n)?l:tGe(l))!==n.check){e.msg="incorrect data check",n.mode=16209;break}l=0,u=0}n.mode=16207;case 16207:if(n.wrap&&nX(n)){for(;u<32;){if(0===s)break e;s--,l+=r[o++]<<u,u+=8}if(4&n.wrap&&l!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=16209;break}l=0,u=0}n.mode=16208;case 16208:G=Qwe;break e;case 16209:G=Ywe;break e;case 16210:return $we;default:return Zwe}return e.next_out=a,e.avail_out=c,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=u,(n.wsize||h!==e.avail_out&&n.mode<16209&&(n.mode<16206||t!==Vwe))&&hGe(e,e.output,e.next_out,h-e.avail_out),d-=e.avail_in,h-=e.avail_out,e.total_in+=d,e.total_out+=h,n.total+=h,4&n.wrap&&h&&(e.adler=n.check=nX(n)?GRe(n.check,i,h,e.next_out-h):RRe(n.check,i,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(16191===n.mode?128:0)+(16199===n.mode||16194===n.mode?256:0),(0===d&&0===h||t===Vwe)&&G===Wwe&&(G=Jwe),G},inflateEnd:function(e){if(oGe(e))return Zwe;var t=e.state;return t.window&&(t.window=null),e.state=null,Wwe},inflateGetHeader:function(e,t){if(oGe(e))return Zwe;var n=e.state;return 0==(2&n.wrap)?Zwe:(n.head=t,t.done=!1,Wwe)},inflateSetDictionary:function(e,t){var n,r=t.length;return oGe(e)||0!==(n=e.state).wrap&&16190!==n.mode?Zwe:16190===n.mode&&RRe(1,t,r,0)!==n.check?Ywe:hGe(e,t,r,r)?(n.mode=16210,$we):(n.havedict=1,Wwe)},inflateInfo:"pako inflate (from Nodeca project)"},pGe=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},vGe=Object.prototype.toString,gGe=kRe.Z_NO_FLUSH,yGe=kRe.Z_FINISH,mGe=kRe.Z_OK,_Ge=kRe.Z_STREAM_END,bGe=kRe.Z_NEED_DICT,RGe=kRe.Z_STREAM_ERROR,wGe=kRe.Z_DATA_ERROR,GGe=kRe.Z_MEM_ERROR;function TGe(e){this.options=_we.assign({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 Twe,this.strm.avail_out=0;var n=fGe.inflateInit2(this.strm,t.windowBits);if(n!==mGe)throw new Error(TRe[n]);if(this.header=new pGe,fGe.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=Gwe.string2buf(t.dictionary):"[object ArrayBuffer]"===vGe.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=fGe.inflateSetDictionary(this.strm,t.dictionary))!==mGe))throw new Error(TRe[n])}function kGe(e,t){var n=new TGe(t);if(n.push(e),n.err)throw n.msg||TRe[n.err];return n.result}TGe.prototype.push=function(e,t){var n,r,i,o=this.strm,a=this.options.chunkSize,s=this.options.dictionary;if(this.ended)return!1;for(r=t===~~t?t:!0===t?yGe:gGe,"[object ArrayBuffer]"===vGe.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=fGe.inflate(o,r))===bGe&&s&&((n=fGe.inflateSetDictionary(o,s))===mGe?n=fGe.inflate(o,r):n===wGe&&(n=bGe));o.avail_in>0&&n===_Ge&&o.state.wrap>0&&0!==e[o.next_in];)fGe.inflateReset(o),n=fGe.inflate(o,r);switch(n){case RGe:case wGe:case bGe:case GGe:return this.onEnd(n),this.ended=!0,!1}if(i=o.avail_out,o.next_out&&(0===o.avail_out||n===_Ge))if("string"===this.options.to){var c=Gwe.utf8border(o.output,o.next_out),l=o.next_out-c,u=Gwe.buf2string(o.output,c);o.next_out=l,o.avail_out=a-l,l&&o.output.set(o.output.subarray(c,c+l),0),this.onData(u)}else this.onData(o.output.length===o.next_out?o.output:o.output.subarray(0,o.next_out));if(n!==mGe||0!==i){if(n===_Ge)return n=fGe.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,!0;if(0===o.avail_in)break}}return!0},TGe.prototype.onData=function(e){this.chunks.push(e)},TGe.prototype.onEnd=function(e){e===mGe&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=_we.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var SGe,EGe={Inflate:TGe,inflate:kGe,inflateRaw:function(e,t){return(t=t||{}).raw=!0,kGe(e,t)},ungzip:kGe,constants:kRe},MGe={Deflate:Hwe.Deflate,deflate:Hwe.deflate,deflateRaw:Hwe.deflateRaw,gzip:Hwe.gzip,Inflate:EGe.Inflate,inflate:EGe.inflate,inflateRaw:EGe.inflateRaw,ungzip:EGe.ungzip,constants:kRe},DGe=function(){function e(e,t){var n=this;this.collector=e,this.config=t,this.requestType=t.request_type||"xhr",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||{},this.collector.on("custom-request-header",(function(e){n.setRequestHeader(e)}))}return e.prototype.setRequestHeader=function(e){this.customHeader=cG(this.customHeader,e)},e.prototype.useFetch=function(e){var t=e.url,n=e.data,r=e.method,i=e.success,o=e.fail,a={"Content-Type":"application/json; charset=utf-8"};if(WR(this.customHeader).length)for(var s in this.customHeader)a[s]=this.customHeader[s];window.fetch?fetch(t,{method:r||"POST",headers:a,body:Jx(n)}).then((function(e){return e.json()})).then((function(e){i&&i(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:r,success:i,fail:o}))},e.prototype.useBeacon=function(e){var t=e.url,n=e.data,r=e.success,i=e.fail;window.navigator.sendBeacon(t,Jx(n))?r&&r():i&&i(n,this.errorCode.BEACON_FALSE)},e.prototype.useRequest=function(e){var t=this,n=e.url,r=e.data,i=e.method,o=e.success,a=e.fail,s=e.timeout,c=e.useBeacon,l=e.withCredentials,u=e.app_key,d=e.forceXhr,h=e.zip;if(c&&this.supportBeacon)this.useBeacon({url:n,data:r,method:i,success:o,fail:a});else if("fetch"!==this.requestType||d)try{var f=new XMLHttpRequest,p=i||"POST";if(f.open(p,""+n,!0),f.setRequestHeader("Content-Type","application/json; charset=utf-8"),u&&f.setRequestHeader("X-MCS-AppKey",""+u),WR(this.customHeader).length)for(var v in this.customHeader)f.setRequestHeader(v,this.customHeader[v]);l&&(f.withCredentials=!0),s&&(f.timeout=s,f.ontimeout=function(){a&&a(r,t.errorCode.TIMEOUT)}),f.onload=function(){if(o){var e=null;if(f.responseText){try{e=JSON.parse(f.responseText)}catch(t){e={}}o(e,r)}}},f.onerror=function(){f.abort(),a&&a(r,t.errorCode.XHR_ON)};try{var g=Jx(r);if(this.config.need_zip&&h){var y=(new TextEncoder).encode(g),m=MGe.gzip(y);f.setRequestHeader("Content-Encoding","gzip"),f.send(m)}else f.send(g)}catch(_){this.collector.emit("sdk-inner-error",{type:"sdk_error_send",eventData:r,errorCode:1e3,msg:_.message||_.stack||"sdk_error_send"})}}catch(_){this.collector.emit("sdk-inner-error",{type:"sdk_error_request",eventData:r,errorCode:1001,msg:_.message||_.stack||"sdk_error_request"})}else this.useFetch({url:n,data:r,method:i,success:o,fail:a})},e}(),zGe=function(){function e(e,t){if(this.devToolReady=!1,this.devToolOrigin="*",this.sendAlready=!1,!t.disable_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.loadUrl=t.devtool_url||"https://lf-static.applogcdn.com/obj/applog-sdk-static/log-sdk/collect/devtool/debug-web.v2.0.0.js",this.filterEvent=new Jj(["__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(Ow(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&&Ow(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:"基本信息",key:"base",type:1,content:[{name:"app_id",desc:"APP_ID",value:this.config.app_id},{name:"channel",desc:"CHANNEL",value:this.config.channel},{name:"domain",desc:"上报域名",value:this.collect.configManager.getDomain()},{name:"sdk_version",desc:"SDK版本",value:Rbe},{name:"sdk_type",desc:"SDK引入方式",value:"npm"}]},{title:"用户信息",key:"user",type:2,content:[{name:"uuid",desc:"UUID",value:this.collect.configManager.get("user").user_unique_id||""},{name:"web_id",desc:"WEB_ID",value:this.collect.configManager.get("user").web_id||""}]},{title:"公共参数信息",type:2,key:"common",content:[{name:"browser",desc:"浏览器",value:this.collect.configManager.get("browser")},{name:"browser_version",desc:"浏览器版本",value:this.collect.configManager.get("browser_version")},{name:"platform",desc:"平台",value:this.collect.configManager.get("platform")},{name:"device_model",desc:"设备型号",value:this.collect.configManager.get("device_model")},{name:"os_name",desc:"操作系统",value:this.collect.configManager.get("os_name")},{name:"os_version",desc:"操作系统版本",value:this.collect.configManager.get("os_version")},{name:"resolution",desc:"屏幕分辨率",value:this.collect.configManager.get("resolution")},{name:"referrer",desc:"来源",value:this.collect.configManager.get("referrer")},{name:"custom",desc:"自定义信息",value:Jx(this.collect.configManager.get("custom"))}]},{title:"配置信息",key:"config",type:3,content:[{name:"autotrack",desc:"全埋点",value:!!this.config.autotrack},{name:"stay",desc:"停留时长",value:!!this.config.enable_stay_duration}]},{title:"A/B配置信息",key:"ab",type:4,content:[{name:"ab",desc:"A/B实验",value:!!this.config.enable_ab_test}]}],this.config.enable_ab_test){var e=this.getInfo("ab"),t=[{name:"ab",desc:"A/B实验",value:!!this.config.enable_ab_test},{name:"vid",desc:"已曝光VID",value:this.collect.configManager.getAbVersion()},{name:"ab_domain",desc:"A/B域名",value:this.config.ab_channel_domain||ibe(_be[this.config.channel])},{name:"all_values",desc:"全部配置",value:this.collect.configManager.getAbCache()}];e.content=t,this.setInfo("ab",e)}if(this.config.enable_native||this.config.Native){var n={title:"客户端信息",type:3,content:[{name:"native",desc:"是否打通",value:!!this.collect.bridgeReport}]};this.setInfo("native",n)}if(OC(Rbe).call(Rbe,"tob")){var r,i=this.getInfo("user");i.content.push({name:"sid",desc:WF(r="DISS".split("")).call(r).join(""),value:"点击获取"}),this.setInfo("user",i)}},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(r){r.key===e&&(n=!0,r=t)})),n||this.info.push(t)},e.prototype.getSecondInfo=function(e,t){var n=this.getInfo(e),r=null;return n.content.forEach((function(e){e.name===t&&(r=e)})),r},e.prototype.setSecondInfo=function(e,t,n){var r=this.getInfo(e),i=!1;if(r.content.forEach((function(e){e.name===t&&(e.value=n,i=!0)})),!i){var o={name:t,value:n,desc:t.toLocaleUpperCase()};r.content.push(o)}this.setInfo(e,r)},e.prototype.loadHook=function(){var e=this;this.collect.on(J_e.DEBUGGER_MESSAGE,(function(t){switch(t.type){case J_e.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:Jx(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 r=e.collect.configManager.get(t.common);e.setSecondInfo("common",t.common,"custom"===t.common?Jx(r):r)}return void e.updateInfo();case J_e.DEBUGGER_MESSAGE_EVENT:if(t.data&&t.data.length){var i=t.data[0],o=i.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(i)}return}}))},e.prototype.addLintener=function(){var e=this;window.addEventListener("message",(function(t){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:OC(Rbe).call(Rbe,"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(r){}},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("+ibe("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 r=document.createElement("div");r.innerHTML='<div id="debugger-applog-web" class="debugger-applog-web"></div>';var i=document.createElement("div");i.innerHTML='<div id="debugger-container" class="debugger-container"></div>',document.getElementsByTagName("body")[0].appendChild(r),document.getElementsByTagName("body")[0].appendChild(i);var o=document.getElementById("debugger-applog-web");o&&o.addEventListener("click",(function(){window&&window.postMessage({type:"devtool:web:open-draw"},location.origin)}))},e}(),AGe={autotrack:{src:{cn:ibe("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz18z23z22z1mz22z20z18z1az1iz4az1hz21"),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:{cn:ibe("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz18z19z4az1hz21"),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:{cn:ibe("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz21z22z18z27z4az1hz21"),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:{cn:ibe("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz20z1mz23z22z1cz4az1hz21"),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:{cn:ibe("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz22z20z18z1az1cz20z4az1hz21"),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:{cn:ibe("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz20z1cz22z20z27z4az1hz21"),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:{cn:ibe("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz24z1gz21z23z18z1jz4az1hz21"),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"}},PGe=["ab","autotrack","Stay","store","et","profile","cep","heartbeat","monitor","route","tracer"],xGe=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 ebe,this.remotePlugin=new OR,this.Types=Tbe,this.adapters.storage=ybe,this.loadType="full"}return e.usePlugin=function(t,n,r){if(n){for(var i=!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=r||{},i=!0;break}i||e.plugins.push({name:n,plugin:t,options:r})}else e.plugins.push({plugin:t})},e.prototype.usePlugin=function(e,t,n){e&&("full"===this.loadType&&OC(PGe).call(PGe,e)?console.info("your sdk version has "+e+" plugin 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,r,i=this;this.logger=new zbe(this.name,t.log),this.inited?this.logger.warn("[instance: "+this.name+"], every instance's api: init, can be call only one time!"):t&&tbe(t)?t.app_id&&"number"==typeof(r=t.app_id)&&!isNaN(r)?t.app_key&&"string"!=typeof t.app_key?this.logger.warn("app_key param is error, must be string, please check!"):(t.channel_domain||-1!==KR(n=["cn","sg","va","my"]).call(n,t.channel)||(this.logger.warn("channel must be `cn`, `sg`,`va`, `my` !"),t.channel="cn"),this.spider=new Abe,this.spider.checkSpider(t)?this.logger.warn("your env may be a spider, can not report!"):(this.appBridge=new Pbe(this,t.enable_native),this.requestManager=new DGe(this,t),this.bridgeReport=this.appBridge.bridgeInject(),this.configManager=new Dbe(this,t),this.debugger=new zGe(this,t),this.initConfig=t,this.emit(Tbe.Init),this.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 执行Init",data:t,level:"info",time:Date.now(),infoType:"cus"}),this.destroy=!1,t.disable_auto_pv&&(this.disableAutoPageView=!0),this.bridgeReport||(this.configManager.set({app_id:t.app_id}),this.eventManager=new Fbe,this.tokenManager=new Hbe,this.sessionManager=new Cbe,jR.all([new jR((function(e){i.once(Tbe.TokenComplete,(function(){e(!0)}))})),new jR((function(e){i.once(Tbe.Start,(function(){e(!0)}))}))]).then((function(){try{var n;RF(n=e.plugins).call(n,(function(e,t){var n=t.plugin,r=t.options,o=cG(i.initConfig,r),a=new n;return a.apply(i,o),e.push(a),i.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK加载"+t.name+"插件",level:"info",time:Date.now(),infoType:"sdk"}),e}),i.pluginInstances)}catch(r){console.warn("load plugin error, "+r.message),i.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK加载插件发生了异常",level:"error",time:Date.now(),data:r.message,infoType:"sdk"})}i.sdkReady=!0,i.emit(Tbe.Ready),i.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 用户信息初始化完成",time:Date.now(),secType:"USER",level:"info",data:i.configManager.get("user"),infoType:"sdk"}),i.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 初始化完成",time:Date.now(),level:"info",data:i.configManager.get("user"),infoType:"sdk"}),i.logger.info("appid: "+t.app_id+", userInfo:"+Jx(i.configManager.get("user"))),i.logger.info("appid: "+t.app_id+", sdk is ready, version type is "+i.loadType+", version is "+Rbe+", you can report now !!!"),t.disable_auto_pv&&(i.disableAutoPageView=!0);try{"full"===i.loadType&&(t.enable_ab_test||t.autotrack)&&(window.opener||window.parent).postMessage("[tea-sdk]ready","*")}catch(r){i.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK发生了异常",level:"error",time:Date.now(),data:r.message,infoType:"sdk"})}i.pageView(),i.on(Tbe.TokenChange,(function(e){"webid"===e&&i.pageView(),i.logger.info("appid: "+t.app_id+" token change, new userInfo:"+Jx(i.configManager.get("user"))),i.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 设置了用户信息",time:Date.now(),secType:"USER",level:"info",data:i.configManager.get("user"),infoType:"sdk"})})),i.on(Tbe.TokenReset,(function(){i.logger.info("appid: "+t.app_id+" token reset, new userInfo:"+Jx(i.configManager.get("user"))),i.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 重置了用户信息",time:Date.now(),secType:"USER",level:"info",data:i.configManager.get("user"),infoType:"sdk"})})),i.on(Tbe.RouteChange,(function(e){e.init||t.disable_route_report||i.pageView()}))})),this.tokenManager.apply(this,t),this.eventManager.apply(this,t),this.sessionManager.apply(this,t)),this.inited=!0)):this.logger.warn("app_id param is error, must be number, please check!"):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(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK执行Config发生了异常",level:"error",time:Date.now(),data:"config must be use after function init",infoType:"sdk"});if(!e||!tbe(e))return console.warn("config params is error, please check"),void this.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK执行Config发生了异常",level:"error",time:Date.now(),data:"config params is error, please check",infoType:"sdk"});if(this.bridgeReport)this.appBridge.setConfig(e);else{e._staging_flag&&1===e._staging_flag&&(this.staging=!0),e.disable_auto_pv&&(this.disableAutoPageView=!0,delete e.disable_auto_pv);var t=W_e({},e),n=this.initConfig.configPersist||this.initConfig.config_persist||!1;if(this.initConfig&&n){var r=this.configManager.getStore();r&&(t=cG(r,e)),this.configManager.setStore(e)}t.web_id,t.user_unique_id;var i=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&KR(t).call(t,r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof lG){var i=0;for(r=lG(e);i<r.length;i++)KR(t).call(t,r[i])<0&&(n[r[i]]=e[r[i]])}return n}(t,["web_id","user_unique_id"]);this.configManager.set(i),t.hasOwnProperty("web_id")&&this.emit(Tbe.ConfigWebId,t.web_id),t.hasOwnProperty("user_unique_id")&&this.emit(Tbe.ConfigUuid,t.user_unique_id),this.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 执行Config",level:"info",time:Date.now(),data:t,infoType:"cus"})}},e.prototype.setUserUniqueID=function(e){this.config({user_unique_id:e})},e.prototype.setHeaderInfo=function(e,t){var n={};n[e]=t,this.config(n)},e.prototype.removeHeaderInfo=function(e){var t={};t[e]=void 0,this.config(t)},e.prototype.setDomain=function(e){this.configManager&&this.configManager.setDomain(e),this.emit(Tbe.ConfigDomain)},e.prototype.getConfig=function(e){var t;return null===(t=this.configManager)||void 0===t?void 0:t.get(e)},e.prototype.send=function(){this.start()},e.prototype.start=function(){this.inited&&!this.sended&&(this.sended=!0,this.started=!0,this.emit(Tbe.Start),this.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 执行Start",level:"info",time:Date.now(),infoType:"cus"}),this.bridgeReport&&(this.pageView(),this.emit(Tbe.Ready)))},e.prototype.event=function(e,t){var n=this;try{var r=[];if(Array.isArray(e))e.forEach((function(e){var t=n.processEvent(e[0],e[1]||{});t&&r.push(t)}));else{var i=this.processEvent(e,t);if(!i)return;r.push(i)}this.bridgeReport?r.forEach((function(e){var t=e.event,r=e.params;n.appBridge.onEventV3(t,Jx(r))})):r.length&&(this.emit(Tbe.Event,r),this.emit(Tbe.SessionResetTime)),this.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 执行Event",level:"info",time:Date.now(),data:e,infoType:"cus"})}catch(o){this.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 执行Event发生了异常",level:"error",time:Date.now(),data:o.message,infoType:"sdk"})}},e.prototype.beconEvent=function(e,t){if(Array.isArray(e))console.warn("beconEvent not support batch report, please check");else{var n=[],r=this.processEvent(e,t||{});r&&(n.push(r),n.length&&(this.emit(Tbe.BeconEvent,n),this.emit(Tbe.SessionResetTime)),this.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 执行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=QR(e).call(e,6));var r=t;"object"!=Su(r)&&(r={}),r.profile?delete r.profile:r.event_index=rbe();var i=void 0;return r.local_ms?(i=r.local_ms,delete r.local_ms):i=+new Date,{event:n,params:r,local_time_ms:i,is_bav:this.initConfig&&this.initConfig.autotrack?1:0}}catch(o){return this.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK发生了异常",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:this.handlePath(),time:Date.now(),referrer:window.document.referrer,$is_first_time:""+(this.configManager&&this.configManager.is_first_time||!1)},n=W_e(W_e({},t),e);this.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 上报PV",level:"info",time:Date.now(),infoType:"sdk"}),this.event("predefine_pageview",n)}else console.warn("predefinePageView must be use after function init")},e.prototype.handlePath=function(){var e=location.pathname;try{if(this.initConfig.allow_hash){var t=new Qx(location.href).hash.match(/#\/([^?#]+)/i);return t&&t.length?t[1]:location.pathname}}catch(n){e=location.pathname}return e},e.prototype.clearEventCache=function(){this.emit(Tbe.CleanEvents)},e.prototype.setWebIDviaUnionID=function(e){if(e){var t=ube(e);this.config({web_id:""+t,wechat_unionid:e}),this.emit(Tbe.CustomWebId)}},e.prototype.setWebId=function(e){this.config({web_id:""+e})},e.prototype.setWebIDviaOpenID=function(e){if(e){var t=ube(e);this.config({web_id:""+t,wechat_openid:e}),this.emit(Tbe.CustomWebId)}},e.prototype.setNativeAppId=function(e){this.bridgeReport&&this.appBridge.setNativeAppId(e)},e.prototype.setRequestHeaders=function(e){this.emit(Tbe.CustomHeader,e)},e.prototype.getSessionId=function(){return xbe()},e.prototype.setSessionId=function(e){this.emit(Tbe.SessionReset,e)},e.prototype.resetStayDuration=function(e,t,n){this.emit(Tbe.ResetStay,{url_path:e,title:t,url:n},Tbe.Stay)},e.prototype.resetStayParams=function(e,t,n){void 0===e&&(e=""),void 0===t&&(t=""),void 0===n&&(n=""),this.emit(Tbe.SetStay,{url_path:e,title:t,url:n},Tbe.Stay)},e.prototype.getToken=function(e,t){var n=this;if(this.inited){var r=!1,i=function(t){if(!r){var i;r=!0;var o=n.configManager.get().user;return t&&(o.tobid=t,o[WF(i="diss".split("")).call(i).join("")]=t),e(W_e({},o))}},o=function(){n.tokenManager.getTobId().then((function(e){i(e)}))};this.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 执行GetToken",level:"info",time:Date.now(),infoType:"cus"}),this.sdkReady?o():(t&&setTimeout((function(){i()}),t),this.on(Tbe.Ready,(function(){o()})))}else console.warn("getToken must be use after function init")},e.prototype.profileSet=function(e){this.bridgeReport?this.appBridge.profileSet(Jx(e)):this.emit(Tbe.ProfileSet,e,Tbe.Profile),this.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 执行profileSet",level:"info",time:Date.now(),data:e,infoType:"cus"})},e.prototype.profileSetOnce=function(e){this.bridgeReport?this.appBridge.profileSetOnce(Jx(e)):this.emit(Tbe.ProfileSetOnce,e,Tbe.Profile),this.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 执行profileSetOnce",level:"info",time:Date.now(),data:e,infoType:"cus"})},e.prototype.profileIncrement=function(e){this.bridgeReport?this.appBridge.profileIncrement(Jx(e)):this.emit(Tbe.ProfileIncrement,e,Tbe.Profile),this.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 执行profileIncrement",level:"info",time:Date.now(),data:e,infoType:"cus"})},e.prototype.profileUnset=function(e){this.bridgeReport?this.appBridge.profileUnset(e):this.emit(Tbe.ProfileUnset,e,Tbe.Profile),this.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 执行profileUnset",level:"info",time:Date.now(),data:e,infoType:"cus"})},e.prototype.profileAppend=function(e){this.bridgeReport?this.appBridge.profileAppend(Jx(e)):this.emit(Tbe.ProfileAppend,e,Tbe.Profile),this.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 执行profileAppend",level:"info",time:Date.now(),data:e,infoType:"cus"})},e.prototype.setExternalAbVersion=function(e){var t;this.emit(Tbe.AbExternalVersion,"string"==typeof e&&e?dk(t=""+e).call(t):null,Tbe.Ab)},e.prototype.getVar=function(e,t,n){this.emit(Tbe.AbVar,{name:e,defaultValue:t,callback:n},Tbe.Ab)},e.prototype.getABconfig=function(e,t){this.emit(Tbe.AbConfig,{params:e,callback:t},Tbe.Ab)},e.prototype.getAbSdkVersion=function(){return this.configManager.getAbVersion()},e.prototype.onAbSdkVersionChange=function(e){var t=this;return this.emit(Tbe.AbVersionChangeOn,e,Tbe.Ab),function(){t.emit(Tbe.AbVersionChangeOff,e,Tbe.Ab)}},e.prototype.offAbSdkVersionChange=function(e){this.emit(Tbe.AbVersionChangeOff,e,Tbe.Ab)},e.prototype.openOverlayer=function(){this.emit(Tbe.AbOpenLayer,"",Tbe.Ab)},e.prototype.closeOverlayer=function(){this.emit(Tbe.AbCloseLayer,"",Tbe.Ab)},e.prototype.getAllVars=function(e){this.emit(Tbe.AbAllVars,e,Tbe.Ab)},e.prototype.destoryInstace=function(){this.destroy||(this.destroy=!0,this.off(Tbe.TokenComplete),this.emit(Tbe.DestoryInstance))},e.prototype.destroyInstance=function(){this.destroy||(this.destroy=!0,this.off(Tbe.TokenComplete),this.emit(Tbe.DestoryInstance))},e.plugins=[],e}(),CGe="__rangers_ab_style__";!function(e){e[e.Var=0]="Var",e[e.All=1]="All"}(SGe||(SGe={}));var FGe=function(){function e(){this.fetchStatus="no",this.refreshFetchStatus="complete",this.versions=[],this.extVersions=[],this.mulilinkVersions=[],this.enable_multilink=!1,this.enable_ab_visual=!1,this.editMode=!1,this.callbacks=[],this.data=null,this.changeListener=new OR,this.readyStatus=!1,this.exposureCache=[]}return e.prototype.apply=function(e,t){var n=this;if(t.enable_ab_test){this.collect=e,this.config=t;var r=t.enable_multilink,i=t.ab_channel_domain,o=t.enable_ab_visual,a=t.ab_cross,s=t.ab_cookie_domain,c=t.ab_timeout,l=i||ibe(_be[t.channel||"cn"]),u=e.adapters.storage,d=this.collect.Types;this.types=d,this.cacheStorgae=new u(!1),this.timeout=c||3e3,this.enable_multilink=r,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=l+"/service/2/abtest_config/",this.reportUrl=""+e.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 OR,this.collect.on(d.TokenChange,(function(e){"uuid"===e&&n.readyStatus&&(n.clearCache(),n.fetchAB())})),this.collect.on(d.TokenReset,(function(e){"uuid"===e&&n.readyStatus&&(n.clearCache(),n.fetchAB())})),this.collect.on(d.AbVar,(function(e){var t=e.name,r=e.defaultValue,i=e.callback;n.getVar(t,r,i)})),this.collect.on(d.AbAllVars,(function(e){n.getAllVars(e)})),this.collect.on(d.AbConfig,(function(e){var t=e.params,r=e.callback;n.getABconfig(t,r)})),this.collect.on(d.AbExternalVersion,(function(e){n.setExternalAbVersion(e)})),this.collect.on(d.AbOpenLayer,(function(){n.openOverlayer()})),this.collect.on(d.AbCloseLayer,(function(){n.closeOverlayer()})),this.collect.on(d.AbVersionChangeOn,(function(e){n.changeListener.set(e,e)})),this.collect.on(d.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||(this.fetchAB(),this.readyStatus=!0),this.collect.emit(d.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(!WR(n).length)return;var r=function(e){n[e].length&&n[e].forEach((function(n){t.collect.hook.emit(e,n)}))};for(var i in n)r(i)}},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,r=e.href;n?(this.editMode=!0,t=n):!r||-1===KR(r).call(r,"datatester")&&-1===KR(r).call(r,"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,r=t.ab_ext_version,i=t.ab_version_multilink,o=t.data,a=this.checkFromUrl();a?this.mulilinkVersions.push(a):this.mulilinkVersions=i||[],this.extVersions=r||[],this.versions=n||[],this.data=o;var s=Xm(e=this.versions).call(e,this.extVersions);this.enable_multilink&&(s=Xm(s).call(s,this.mulilinkVersions)),this.configVersions(s.join(","))},e.prototype.checkFromUrl=function(){var e=lbe(window.location.href);return e&&e.vid?e.vid:""},e.prototype.updateVersions=function(){var e,t=this.extVersions.length?Xm(e=this.versions).call(e,this.extVersions):this.versions;this.enable_multilink&&(t=Xm(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){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:SGe.Var};this.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK 调用GetVar",level:"info",time:Date.now(),data:e,infoType:"cus"}),"complete"===this.fetchStatus&&"complete"===this.refreshFetchStatus?this.getRealVar(r,e):(this.callbackMap.get(e),this.callbackMap.set(e,r))},e.prototype.getRealVar=function(e,t){var n=e.name,r=e.defaultValue,i=e.callback,o=this.data;if(o){var a=o[n];if(a&&tbe(a)){var s,c,l=o[n].vid;return"$ab_url"===t?OC(s=this.mulilinkVersions).call(s,l)||this.mulilinkVersions.push(l):OC(c=this.versions).call(c,l)||this.versions.push(l),this.updateVersions(),this.fechEvent(l,t||n,r,i,a.val),void this.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK执行GetVar,并曝光了实验"+n,level:"info",time:Date.now(),data:o[n],infoType:"sdk"})}this.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK执行GerVar默认回调",level:"info",time:Date.now(),data:this.data,infoType:"sdk"}),i(r)}else i(r)},e.prototype.getAllVars=function(e){if("function"!=typeof e)throw new Error("callback must be a function");var t={callback:e,type:SGe.All};this.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK 调用GetAllVars",level:"info",time:Date.now(),infoType:"cus"}),"complete"===this.fetchStatus&&"complete"===this.refreshFetchStatus?this.getRealAllVars(t):this.callbackMap.set("allVars",t)},e.prototype.getRealAllVars=function(e){(0,e.callback)(this.data?JSON.parse(Jx(this.data)):{}),this.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK 执行GetAllVars",level:"info",time:Date.now(),data:this.data,infoType:"sdk"})},e.prototype.fechEvent=function(e,t,n,r,i){try{if(this.config.disable_track_event)return;if(!e)return;var o=this.collect.configManager.get(),a=o.header,s=o.user,c=this.getABCache(),l=s[this.ab_user_mode]||s.user_unique_id;if(c&&c.uuid&&c.uuid!==l)return;var u={event:"abtest_exposure",ab_sdk_version:""+e,params:Jx({app_id:this.config.appId,ab_url:"$ab_url"===t?n:window.location.href}),local_time_ms:Date.now()};a.custom=Jx(a.custom);var d={events:[u],user:s,header:a};this.reportExposure(d,t),r&&r(i)}catch(h){this.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 发生了异常",level:"error",time:Date.now(),data:h.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(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_EVENT,info:"曝光埋点上报成功",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=WR(e);n&&n.length&&this.collect.configManager.set(e),this.fetchAB(t)},e.prototype.get=function(e){if(this.ab_cross){var t=this.cacheStorgae.getCookie(e,this.ab_cookie_domain);return t?JSON.parse(t):{}}return this.cacheStorgae.getItem(e)},e.prototype.set=function(e,t){this.ab_cross?this.cacheStorgae.setCookie(e,t,2592e6,this.ab_cookie_domain):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(CGe)){var e="body { opacity: 0 !important; }",t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.id=CGe,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(CGe))&&e.parentElement.removeChild(e)},e.prototype.fetchComplete=function(e,t){var n=this;try{if(e&&"[object Object]"==Object.prototype.toString.call(e)){var r,i=this.collect.configManager.get().user;if(t&&t!==i.user_unique_id)return;this.data=e,this.setAbCache(t);var o=[];WR(e).forEach((function(t){var n=e[t].vid;n&&o.push(n)})),this.versions=Ww(r=this.versions).call(r,(function(e){return OC(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;this.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 执行可视化实验",level:"info",logType:"fetch",time:Date.now(),infoType:"sdk",data:{$ab_modification:s}})}else if(a&&this.enable_multilink){var c;this.mulilinkVersions=Ww(c=this.mulilinkVersions).call(c,(function(e){return OC(o).call(o,e)})),this.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 执行多链接实验",level:"info",logType:"fetch",time:Date.now(),infoType:"sdk",data:{$ab_url:a}});var l=a.val,u=a.vid;l&&u&&this.getVar("$ab_url",l,(function(){n.editMode||(l!==window.location.href?setTimeout((function(){if(!n.collect.destroy){var e=""+l;e=-1===KR(e).call(e,"http")?"https://"+e:e,cbe(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(e){return n[e.type===SGe.Var?"getRealVar":"getRealAllVars"](e,"")}))}catch(d){}},e.prototype.fetchAB=function(e){var t=this,n=this.collect.configManager.get(),r={header:W_e(W_e(W_e({aid:this.config.app_id},n.user||{}),n.header||{}),{ab_sdk_version:this.collect.configManager.getAbVersion(),ab_url:window.location.href})};this.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 发起AB实验请求",level:"info",logType:"fetch",time:Date.now(),data:r,infoType:"sdk"});var i=n.user[this.ab_user_mode]||n.user.user_unique_id;this.collect.requestManager.useRequest({url:this.fetchUrl,data:r,success:function(n){t.fetchStatus="complete",t.refreshFetchStatus="complete";var r=n.data;"success"===n.message?(t.fetchComplete(r,i),e&&e(r)):(t.fetchComplete(null,i),e&&e(null)),t.collect.emit(t.types.AbComplete,r),t.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"AB实验请求成功",level:"info",logType:"fetch",time:Date.now(),data:r,infoType:"sdk"})},fail:function(){t.fetchStatus="complete",t.refreshFetchStatus="complete",t.fetchComplete(null,i),t.collect.emit(t.types.AbTimeout),e&&e(null),t.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"AB实验请求网络异常",level:"error",logType:"fetch",time:Date.now(),infoType:"sdk"})},timeout:this.timeout})},e}(),IGe=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;t.event_verify_url&&("string"==typeof t.event_verify_url?(this.url=t.event_verify_url+"/v1/list_test",e.on(e.Types.SubmitBefore,(function(t){e.requestManager.useBeacon({url:n.url,data:t}),e.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_EVENT,info:"SDK Report ByteIo Verify Request",time:Date.now(),data:t,code:200,status:"success",verifyType:!0})}))):console.log("please use correct et_test url"))},e}();function HGe(e,t,n){if(void 0===t&&(t="list"),!e)return!1;if(t&&"list"===t){var r;if(OC(r=["LI","TR","DL"]).call(r,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(OC(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;if(n&&e.hasAttribute&&e.hasAttribute(n))return!0}return!1}var OGe=function(e,t){return!!BGe(e,t)};function LGe(e,t){for(var n=e;n&&!HGe(n,"container",t.container_attr||"");){if("HTML"===n.nodeName||"BODY"===n.nodeName)return e;n=n.parentElement}return n||e}function XGe(e){for(var t=e;t&&t.parentNode;){var n;if(t.hasAttribute("data-tea-ignore"))return!0;if(t.className&&OC(n=t.className).call(n,"applog-web-devtools-con"))return!0;if("HTML"===t.nodeName||"body"===t.nodeName)return!1;t=t.parentNode}return!1}var UGe=function(e,t){return e.hasAttribute?e.hasAttribute(t):e.attributes?!(!e.attributes[t]||!e.attributes[t].specified):void 0},BGe=function(e,t){if("string"==typeof t)return UGe(e,t);if(nbe(t)){for(var n=!1,r=0;r<t.length;r++)if(UGe(e,t[r])){n=!0;break}return n}},NGe=function(e,t){var n={};if("string"==typeof t)UGe(e,t)&&(n[t]=e.getAttribute(t));else if(nbe(t))for(var r=0;r<t.length;r++)UGe(e,t[r])&&(n[t[r]]=e.getAttribute(t[r]));return n};function VGe(e){var t=[];if(!e)return{element_path:"",positions:[]};for(;null!==e.parentElement;)t.push(e),e=e.parentElement;var n=[],r=[];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 r=n.children,i=0;i<r.length&&r[i]!==e;i++)r[i].nodeName===e.nodeName&&t++;return{str:[e.nodeName.toLowerCase(),HGe(e,"list")?"[]":""].join(""),index:t}}(e),i=t.str,o=t.index;n.unshift(i),r.unshift(o)})),{element_path:"/"+n.join("/"),positions:r}}var jGe=function(){function e(e,t){this.maxDuration=432e5,this.aliveDTime=6e4,this.options={aliveName:"predefine_page_alive",params:{},container:null},this.focusState=!0,this.collect=e,this.config=t,this.pageStartTime=Date.now(),this.sessionStartTime=this.pageStartTime,this.timerHandler=null,tbe(t.enable_stay_duration)&&(this.options=cG(this.options,t.enable_stay_duration)),this.hard=this.options.mode&&"hard"===this.options.mode,this.focusState=document.hasFocus(),this.aliveDTime=this.options.aliveTime||6e4}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(),this.hard&&this.removeMode&&this.removeMode()},e.prototype.sendEvent=function(e,t){void 0===t&&(t=!1);var n=t?this.aliveDTime:Date.now()-this.sessionStartTime;if(!(n<0||n>this.aliveDTime||Date.now()-this.pageStartTime>this.maxDuration)&&(!t||"hidden"!==document.visibilityState)&&(!this.hard||this.focusState)){var r=W_e({url_path:this.getParams("url_path"),title:this.getParams("title"),url:this.getParams("url"),duration:n,is_support_visibility_change:sbe(),startTime:this.sessionStartTime,hidden:document.visibilityState,leave:e,mode:this.hard?"hard":"normal",focusState:this.focusState,aliveType:this.options.container?"dom":"page"},this.options.params);if(this.options.container){var i=VGe(this.options.container).element_path;r=cG(r,{element_path:i,aliveType:this.options.container?"dom":"page"})}this.collect.beconEvent(this.options.aliveName,r),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"===this.getDisplayStatus()?this.timerHandler&&(clearInterval(this.timerHandler),this.sendEvent(!1)):"visible"===this.getDisplayStatus()&&(this.sessionStartTime=Date.now(),this.timerHandler=this.setUpTimer())},e.prototype.getDisplayStatus=function(){if(!this.options.container)return document.visibilityState;try{var e=window.getComputedStyle(this.options.container);return"none"!==e.display&&"hidden"!==e.visibility&&"0"!==e.opacity?"visible":"hidden"}catch(t){return"visible"}},e.prototype.beforeunload=function(){document.hidden||this.sendEvent(!0)},e.prototype.muition=function(){var e=this;new MutationObserver((function(t){t.forEach((function(t){e.visibilitychange()}))})).observe(this.options.container,{attributes:!0,attributeFilter:["style"]})},e.prototype.enablePageAlive=function(){var e=this;this.timerHandler=this.setUpTimer();var t=this.visibilitychange.bind(this),n=this.beforeunload.bind(this);return this.options.container?this.muition():document.addEventListener("visibilitychange",t),window.addEventListener("pagehide",n),function(){e.beforeunload(),document.removeEventListener("visibilitychange",t),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}(),KGe=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",Jx({duration:n.totalTime,page_title:document.title||location.pathname}))}catch(e){}n.sendEventPageClose()},this.collect=e,this.config=t,this.maxDuration=t.maxDuration||t.max_duration||864e5,this.pageStartTime=Date.now(),tbe(t.enable_stay_duration)&&(this.options=cG(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(),this.hard&&this.removeMode&&this.removeMode(),this.resetData()},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,W_e({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:sbe(),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),window.addEventListener("pagehide",n),function(){e.beforeunload(),document.removeEventListener("visibilitychange",t),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}(),WGe=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 jGe(e,t),this.pageClose=new KGe(e,t);var r=this.collect.Types;this.collect.on(r.DestoryInstance,(function(){n.disable()})),this.collect.on(r.ResetStay,(function(e){var t=e.url_path,r=e.title,i=e.url;n.resetStayDuration(t,r,i)})),this.collect.on(r.RouteChange,(function(e){e.init||t.disable_route_report||n.resetStayDuration()})),this.collect.on(r.SetStay,(function(e){var t=e.url_path,r=e.title,i=e.url;n.setStayParmas(t,r,i)})),this.enable(this.url_path,this.title,this.url),this.ready(r.Stay),this.collect.emit(r.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(!WR(n).length)return;var r=function(e){n[e].length&&n[e].forEach((function(n){t.collect.hook.emit(e,n)}))};for(var i in n)r(i)}},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(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 执行 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(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"SDK 执行 resetStayDuration",level:"info",time:Date.now(),data:{url_path:e,title:t,url:n}})},e}(),QGe=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.config=t,this.duration=6e4,this.reportUrl=e.configManager.getDomain()+"/profile/list";var r=e.Types;this.eventCheck=new Gbe(e,t),this.cache={},this.collect.on(r.ProfileSet,(function(e){n.setProfile(e)})),this.collect.on(r.ProfileSetOnce,(function(e){n.setOnceProfile(e)})),this.collect.on(r.ProfileUnset,(function(e){n.unsetProfile(e)})),this.collect.on(r.ProfileIncrement,(function(e){n.incrementProfile(e)})),this.collect.on(r.ProfileAppend,(function(e){n.appendProfile(e)})),this.collect.on(r.ProfileClear,(function(){n.cache={}})),this.ready(r.Profile)},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(!WR(n).length)return;var r=function(e){n[e].length&&n[e].forEach((function(n){t.collect.hook.emit(e,n)}))};for(var i in n)r(i)}},e.prototype.report=function(e,t){void 0===t&&(t={});try{if(this.config.disable_track_event)return;var n=[];n.push(this.collect.processEvent(e,t));var r=this.collect.eventManager.merge(n);this.collect.requestManager.useRequest({url:this.reportUrl,data:r}),this.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_EVENT,info:"埋点上报成功",time:Date.now(),data:r,code:200,status:"success"})}catch(i){this.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:i.message})}},e.prototype.setProfile=function(e){var t=this.formatParams(e);t&&WR(t).length&&(this.pushCache(t),this.report("__profile_set",W_e(W_e({},t),{profile:!0})))},e.prototype.setOnceProfile=function(e){var t=this.formatParams(e,!0);t&&WR(t).length&&(this.pushCache(t),this.report("__profile_set_once",W_e(W_e({},t),{profile:!0})))},e.prototype.incrementProfile=function(e){e?this.report("__profile_increment",W_e(W_e({},e),{profile:!0})):console.warn("please check the params, must be object!!!")},e.prototype.unsetProfile=function(e){if(e){var t={};t[e]="1",this.report("__profile_unset",W_e(W_e({},t),{profile:!0}))}else console.warn("please check the key, must be string!!!")},e.prototype.appendProfile=function(e){if(e){var t={};for(var n in e){var r;"string"==typeof e[n]||"Array"===QR(r=Object.prototype.toString.call(e[n])).call(r,8,-1)?t[n]=e[n]:console.warn("please check the value of param: "+n+", must be string or array !!!")}WR(t).length&&this.report("__profile_append",W_e(W_e({},t),{profile:!0}))}else console.warn("please check the params, must be object!!!")},e.prototype.pushCache=function(e){var t=this;WR(e).forEach((function(n){t.cache[n]={val:t.clone(e[n]),timestamp:Date.now()}}))},e.prototype.formatParams=function(e,t){var n=this;void 0===t&&(t=!1);try{var r;if(!e||"[object Object]"!==Object.prototype.toString.call(e))return void console.warn("please check the params type, must be object !!!");var i={};for(var o in e){var a;"string"==typeof e[o]||"number"==typeof e[o]||"Array"===QR(a=Object.prototype.toString.call(e[o])).call(a,8,-1)?i[o]=e[o]:console.warn("please check the value of params:"+o+", must be string,number,Array !!!")}var s=WR(i);if(!s.length)return;if(!this.eventCheck.checkEventParams(i))return;var c=Date.now();return RF(r=Ww(s).call(s,(function(r){var i=n.cache[r];return t?!i:!(i&&n.compare(i.val,e[r])&&c-i.timestamp<n.duration)}))).call(r,(function(e,t){return e[t]=i[t],e}),{})}catch(l){this.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:l.message}),console.log("error")}},e.prototype.compare=function(e,t){try{return Jx(e)===Jx(t)}catch(n){return this.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:n.message}),!1}},e.prototype.clone=function(e){try{return JSON.parse(Jx(e))}catch(t){return this.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:t.message}),e}},e.prototype.unReady=function(){console.warn("sdk is not ready, please use this api after start")},e}(),qGe=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,r=Date.now()+t;return n=window.setTimeout((function i(){var o=Date.now()-r;e(),r+=t,n=window.setTimeout(i,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 r=this.collect.Types;this.collect.on(r.SessionResetTime,(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}(),ZGe=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;t.channel_domain||t.disable_track_event||t.disable_sdk_monitor||(this.collect=e,this.config=t,this.url=e.configManager.getUrl("event"),this.collect.on(e.Types.Ready,(function(){n.sdkOnload()})),this.collect.on(e.Types.SubmitError,(function(e){var t=e.type,r=e.eventData,i=e.errorCode,o=e.response;"f_data"===t&&n.sdkError(r,i,o)})),this.collect.on(e.Types.SDKInnerError,(function(e){var t=e.type,r=e.eventData,i=e.errorCode,o=e.msg;n.sdkInnerError(t,r,i,o)})))},e.prototype.sdkOnload=function(){var e=this;try{var t=this.collect.configManager.get(),n=t.header,r=t.user,i=n.app_id,o=n.app_name,a=n.sdk_version,s=r.web_id,c={events:[{event:"onload",params:Jx({app_id:i,app_name:o||"",sdk_version:a,sdk_type:"npm",sdk_config:this.config,sdk_desc:"TOC",url:location.href}),local_time_ms:Date.now()}],user:{user_unique_id:s},header:{}};setTimeout((function(){e.collect.requestManager.useRequest({url:e.url,data:[c],timeout:3e4,app_key:"566f58151b0ed37e",forceXhr:!0})}),16)}catch(l){}},e.prototype.sdkError=function(e,t,n){var r=this;try{var i=e[0],o=i.user,a=i.header,s=[];e.forEach((function(e){e.events.forEach((function(e){s.push(e)}))}));var c={events:VR(s).call(s,(function(e){return{event:"on_error",params:Jx({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:{}};setTimeout((function(){r.collect.requestManager.useRequest({url:r.url,data:[c],timeout:3e4,app_key:"566f58151b0ed37e",forceXhr:!0})}),16)}catch(l){}},e.prototype.sdkInnerError=function(e,t,n,r){var i=this;try{var o=t[0],a=o.user,s=o.header,c=[];t.forEach((function(e){e.events.forEach((function(e){c.push(e)}))}));var l={events:VR(c).call(c,(function(t){return{event:"on_error",params:Jx({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:r}),local_time_ms:Date.now()}})),user:a,header:{}};setTimeout((function(){i.collect.requestManager.useRequest({url:i.url,data:[l],timeout:3e4,app_key:"566f58151b0ed37e",forceXhr:!0})}),16)}catch(u){}},e}();function YGe(e,t){var 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(OC(n=["HTML","BODY"]).call(n,e.tagName.toUpperCase()))return!1;var r=e;return!("none"===r.style.display||!HGe(r,"container",t.container_attr||"")&&!(function(e,t){for(var n=e,r=!1;n&&!HGe(n,"container",t.container_attr||"");){if("HTML"===n.nodeName||"BODY"===n.nodeName)return r;n=n.parentElement}return!0}(r,t)||function(e){if(e.children.length){var t=e.children;return!QR([]).call(t).some((function(e){return e.children.length>0}))}return!0}(r)||t.svg))}var $Ge=function(){function e(e,t,n){var r=this;this.statistics=!1,this.pageView=!1,this.clickEvent=function(e){YGe(e.target,r.options)&&r.eventHandel({eventType:"dom",eventName:"click"},e)},this.changeEvent=function(e){r.eventHandel({eventType:"dom",eventName:"change"},e)},this.submitEvent=function(e){r.eventHandel({eventType:"dom",eventName:"submit"},e)},this.getPageViewEvent=function(e,t){t&&"pushState"===t&&r.eventHandel({eventType:"dom",eventName:"beat"},W_e({beat_type:0},e)),r.eventHandel({eventType:"dom",eventName:"page_view"},e)},this.getPageLoadEvent=function(e){r.eventHandel({eventType:"dom",eventName:"page_statistics"},{lcp:e})},this.config=n.getConfig().eventConfig,this.collect=t,this.options=e,this.beatTime=e.beat,this.domContainer=e.container||document}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&&(nbe(this.domContainer)?this.domContainer.forEach((function(e){e.addEventListener("click",t.clickEvent,!0)})):this.domContainer.addEventListener("click",this.clickEvent,!0)),this.config.pv){this.collect.on("route-change",(function(e){var n=e.config,r=e.name;t.getPageViewEvent(n,r),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 r=0,i=null;window.addEventListener("scroll",(function(){clearTimeout(i),i=setTimeout(o,500),r=document.documentElement.scrollTop||document.body.scrollTop}));var o=function(){(document.documentElement.scrollTop||document.body.scrollTop)==r&&t.eventHandel({eventType:"dom",eventName:"beat"},{beat_type:1})}}catch(c){}try{var a=window.performance&&window.performance.getEntriesByType("paint");if(a&&a.length){new PerformanceObserver((function(e){var n=e.getEntries(),r=n[n.length-1],i=r.renderTime||r.loadTime;t.statistics||(t.getPageLoadEvent(i),t.statistics=!0)})).observe({entryTypes:["largest-contentful-paint"]});var s=setTimeout((function(){t.statistics||(t.getPageLoadEvent(a[0].startTime||0),t.statistics=!0,clearTimeout(s))}),2e3)}else this.getPageLoadEvent(0)}catch(c){this.getPageLoadEvent(0)}}}},e.prototype.removeListener=function(){var e=this;nbe(this.domContainer)?this.domContainer.forEach((function(t){t.removeEventListener("click",e.clickEvent,!0)})):this.domContainer.removeEventListener("click",this.clickEvent,!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)),abe((function(){t.eventHandel({eventType:"dom",eventName:"beat",eventSend:"becon"},{beat_type:0}),t.beatTime&&clearInterval(n)}))}catch(r){}},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}(),JGe={eventConfig:{mode:"proxy-capturing",submit:!1,click:!0,change:!1,pv:!0,beat:!0,hashTag:!1,impr:!1},scoutConfig:{mode:"xpath"}},eTe=function(){function e(e,t){this.config=e,this.config.eventConfig=cG(this.config.eventConfig,t)}return e.prototype.getConfig=function(){return this.config},e.prototype.setConfig=function(e){return this.config=e},e}();function tTe(e,t,n,r){var i,o,a={},s=function(e){if(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return{left:t.left,top:t.top,element_width:n,element_height:r}}}(t=LGe(t,n)),c=function(e,t){void 0===e&&(e={}),void 0===t&&(t={});var n=e.clientX,r=e.clientY,i=t.left,o=t.top,a=n-i>=0?n-i:0,s=r-o>=0?r-o:0;return{touch_x:Math.floor(a),touch_y:Math.floor(s)}}(e,s),l=s.element_width,u=s.element_height,d=c.touch_x,h=c.touch_y,f=VGe(t),p=f.element_path,v=f.positions,g=(i=LGe(t,n),o=[],function e(t){var n,r,i,a,s=(a="",3===(n=t).nodeType?a=dk(r=n.textContent).call(r):n.dataset&&n.dataset.hasOwnProperty("teaTitle")||n.hasAttribute("ata-tea-title")?a=n.getAttribute("data-tea-title"):"INPUT"===n.nodeName&&OC(i=["button","submit"]).call(i,n.getAttribute("type"))?a=n.getAttribute("value"):"IMG"===n.nodeName&&n.getAttribute("alt")&&(a=n.getAttribute("alt")),QR(a).call(a,0,200));if(s&&-1===KR(o).call(o,s)&&o.push(s),t.childNodes.length>0)for(var c=t.childNodes,l=0;l<c.length;l++)8!==c[l].nodeType&&e(c[l])}(i),o),y=window.performance.timing.navigationStart,m=Date.now()-y,_=VR(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||_,r&&!r.text&&(a.texts=g,a.element_title=t.getAttribute("data-tea-title")||t.getAttribute("title")||function(e){if(!e)return"";var t="";try{var n,r;e.textContent?t=dk(n=e.textContent).call(n).replace(/\s+/g,","):e.innerText&&(t=dk(r=e.innerText).call(r).replace(/\s+/g,",")),"input"!==e.tagName&&"INPUT"!==e.tagName||(t=e.value||"")}finally{return t}}(t)),a.element_id=t.getAttribute("id")||"",a.element_class_name=t.getAttribute("class")||"",a.element_type=t.nodeType,a.element_width=Math.floor(l),a.element_height=Math.floor(u),a.touch_x=d,a.touch_y=h,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&&OGe(t,n.track_attr)){var R=NGe(t,n.track_attr);for(var w in R)a[w]=R[w]}if(n.custom_attr)try{if(OGe(t,n.custom_attr)){R=NGe(t,n.custom_attr),w=decodeURIComponent(R[n.custom_attr]);var G=JSON.parse(w);if(WR(G))for(var T in G)a[T]=G[T]}}catch(S){console.log("custom attr error")}var k=LGe(t,n);return"A"===k.tagName&&(a.href=k.getAttribute("href")),"IMG"===t.tagName&&(a.src=t.getAttribute("src")),a}var nTe=function(e,t,n,r,i){return W_e(W_e({event:e},tTe(t,n,r,i)),{is_html:1,page_key:window.location.href,page_title:document.title})},rTe=function(){function e(e,t){this.ignore={text:!1},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",scroll:"__bav_slide"}:{click:"bav2b_click",page:"bav2b_page",beat:"bav2b_beat",static:"bav2b_page_statistics",exposure:"bav2b_exposure",scroll:"$bav2b_slide"},t&&!1===t.text&&(this.ignore.text=!0),t&&t.exposure&&t.exposure.eventName&&(this.eventName.exposure=t.exposure.eventName)}return e.prototype.handleEvent=function(e,t){try{if(XGe(e.target))return null;var n="bav2b_click";switch(t){case"click":return n=e.target.getAttribute("data-applog-click-event")||this.eventName.click||"",nTe(n,e,e.target,this.options,this.ignore);case"exposure":return n=e.target.getAttribute("data-applog-exposure-event")||this.eventName.exposure||"",nTe(n,e,e.target||e,this.options,this.ignore);case"change":return W_e(W_e({},nTe(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 nTe(n="bav2b_submit",e,e.target,this.options)}}catch(oK){return console.error(oK),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(r){console.log("page event error "+Jx(r))}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,r=window.performance.timing,i=r.loadEventEnd-r.navigationStart;t.page_init_cost_ms=Ow(n||(i>0?i:0)),t.page_start_ms=r.navigationStart}catch(o){console.log("page_statistics event error "+Jx(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 "+Jx(t))}return e},e.prototype.handleExposureEvent=function(e,t){if(XGe(t.target))return null;var n=nTe(e.event||this.eventName.exposure,t,t.target||t,this.options,this.ignore);if(n.$exposure_type=e.exposureType,this.options.exposure.callback){var r=this.options.exposure.callback(n);return r||WR(r).length?r:(console.warn("exposure callback must return data!"),n)}return n},e.prototype.handleScrollEvent=function(e,t){var n=nTe(e.event||this.eventName.scroll,t,t.target||t,this.options,this.ignore);if(n=cG(n,e.params),!this.options.scroll.callback||(n=this.options.scroll.callback(n))||WR(n).length)return n;console.warn("scroll callback must return data!")},e}(),iTe=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=t.event;delete t.event,e&&"becon"===e.eventSend?this.collect.beconEvent(n,t):this.collect.event(n,t)},e.prototype.get=function(e,t){var n=cG({headers:{"content-type":"application/json"},method:"GET"},t);fetch(e,n)},e.prototype.post=function(e,t){var n=cG({headers:{"content-type":"application/json"},method:"POST"},t);fetch(e,n)},e}(),oTe={},aTe=[];function sTe(e,t,n,r){var i=e&&e.source||window.opener||window.parent,o=e&&e.origin||r||"*",a={type:t,payload:n};i.postMessage(Jx(a),o)}function cTe(e){if(aTe.some((function(e){return"*"===e}))||aTe.some((function(t){var n;return KR(n=e.origin).call(n,t)>-1}))){var t=e.data;if("string"==typeof e.data)try{t=JSON.parse(e.data)}catch(i){t=void 0}if(!t)return;var n=t.type,r=t.payload;oTe[n]&&oTe[n].forEach((function(t){"function"==typeof t&&t(e,r)}))}}var lTe=!1;function uTe(e,t){window.TEAVisualEditor=window.TEAVisualEditor||{},window.TEAVisualEditor.appId=t.app_id;var n,r=t.channel_domain,i="";if(function(e){e.length&&e.forEach((function(e){aTe.push(e)}))}(["*"]),r){var o,a="";try{var s=window.performance.getEntriesByType("resource");if(s&&s.length&&(s.forEach((function(e){var t;"script"===e.initiatorType&&e.name&&-1!==KR(t=e.name).call(t,"collect")&&(a=e.name)})),a&&(o=a.split("/"))&&o.length)){i="https:/";for(var c=2;c<o.length&&c!==o.length-1;c++)i=i+"/"+o[c];if(i&&KR(i).call(i,"/5.0")){var l=i.split("/5.0");i=l[0]||i}}}catch(n){}}!function(e,t){var n={};if(WR(e).length)for(var r in e){if("filter"===r||"autotrack"===r||"enable_stay_duration"===r)break;n[r]=e[r]}var i=e.domain;(window.opener||window.parent).postMessage({type:"tea:sdk:info",config:n,version:t},i),window.addEventListener("message",cTe,!1)}(t,Rbe);try{oTe[n="tea:openHeatMapCore"]=oTe[n]||[],oTe[n].push((function(n){var r=wbe,i=n.data.app_id;i&&i!==t.app_id||function(e){var t=e.event,n=e.editorUrl,r=e.autoTrackInstance;lTe||(lTe=!0,function(e,t,n){var r=document.createElement("script");r.src=e,r.onerror=function(){n(e)},r.onload=function(){t()},document.getElementsByTagName("head")[0].appendChild(r)}(n,(function(){sTe(t,"editorScriptloadSuccess"),r.destroy()}),(function(){t&&sTe(t,"editorScriptloadError"),lTe=!1})))}({event:n,editorUrl:r+".js?query="+Date.now(),autoTrackInstance:e})}))}catch(n){console.log("openHeatMapCore error")}}var dTe,hTe=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",Jx(n.message))}},e.prototype.exposureRemove=function(e){try{this._intersection&&this._intersection.exposureRemove(e)}catch(t){console.log("intersection error",Jx(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"}(dTe||(dTe={}));var fTe,pTe=function(){function e(t,n,r){var i=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=dTe.NOT_EXPOSURE,this.eventHandle=r,this.hashMap=new OR,this.backStatus=!1,this.lastState=null,this.collect.on("re-start-sdk",(function(){i.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=[],r=0;r<=1;r+=.01)n.push(r);n.push(1);try{e._observer_instance=new IntersectionObserver((function(e){e.forEach((function(e){var n=e.target.observeId,r=t.observeMap.get(n),i=(e.target,e.isIntersecting,e.intersectionRatio);if(r.intersectionRatio=i,i<=.1&&(e.target.backStatus=!1),t.observeMap.set(n,r),i<t.ratio)return r.isIntersecting=!1,r.added=!1,r.exposured=!1,r.startTime=Date.now(),void t.observeMap.set(n,r);if(!r.added){if(r.startTime=Date.now(),r.added=!0,r.isIntersecting=!0,t.timeLimit){var o=setTimeout((function(){try{if(r.isIntersecting&&!r.exposured&&t.observeMap.get(n)){var i=t.observeMap.get(n).intersectionRatio;t.exposureEvent(e,i,n,r)}}catch(o){console.log("IntersectionObserver setTimeout error,msg: "+Jx(o))}}),t.timeLimit);r.wait=o}t.observeMap.set(n,r)}Date.now()-r.startTime>=t.timeLimit&&!r.exposured&&t.exposureEvent(e,i,n,r)}))}),{threshold:n})}catch(i){console.log("IntersectionObserver error,msg: "+Jx(i))}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,r=n.observeId,i=Ibe();if(r||this.observeMap.has(r)){var o=this.observeMap.get(r);if(o&&n!==o.instance)this.unobserve(n),this.observeMap.delete(r),n.observeId=i,n.visible=!1,this.observeMap.set(i,{instance:n.cloneNode(!0),isIntersecting:!1}),this.observe(n);else{if(!0===n.visible)return;this.handleBoundingExposure(n)}}else n.observeId=i,n.visible=!1,this.observeMap.set(i,{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,r){if(t>=this.ratio){if("0"===e.target.style.opacity||"hidden"===e.target.style.visibility)return;if(!0===r.exposured)return;r.startWait&&clearTimeout(r.startWait);var i=e.target.getAttribute("data-exposure-event");this.eventHandle({eventType:"dom",eventName:"exposure",event:i,exposureType:this.getExposureType(e.target)},e),e.target.visible=!0,e.target.hasExposure=!0,r.startTime=Date.now(),r.exposured=!0}else r.startTime=Date.now(),r.exposured=!1;this.observeMap.set(n,r)},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||dTe.RESUME_FORM_BACK},e)}},e.prototype.getBoundingRatio=function(e){var t=e.getBoundingClientRect(),n=t.top,r=t.left,i=t.width,o=t.height,a=window.innerWidth||document.documentElement.clientWidth,s=window.innerHeight||document.documentElement.clientHeight;return n>=0&&r>=0&&n<=s&&r<=a?(i>a?a:i)*(s-n)/(i*o):0},e.prototype.getExposureType=function(e){return e.visible?!1!==e.backStatus&&(this.backStatus||this.customType||2===window.performance.navigation.type)?this.exposureType=dTe.RESUME_FORM_PAGE:this.exposureType=dTe.LIFECYCLE_SHOW_NEW:(e.hasExposure,!1!==e.backStatus&&(this.backStatus||this.customType||2===window.performance.navigation.type)?this.exposureType=dTe.RESUME_FORM_PAGE:this.exposureType=dTe.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,r,i=this.visibilitychange.bind(this);if(t=document,n="visibilitychange",r=i,!1,t.addEventListener?t.addEventListener(n,r,false):t.attachEven?t.attachEven("on"+n,r):t["on"+n]=r,window.addEventListener("hashchange",(function(t){var n=e.hashMap.get(t.oldURL);n&&location.href===n.prev?(e.backStatus=!0,e.exposureType=dTe.RESUME_FORM_PAGE):(e.backStatus=!1,e.hashMap.set(location.href,{current:t.newURL,prev:t.oldURL}))})),this.collect.bridgeReport){var o=window.history.pushState;history.pushState=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];"function"==typeof history.onpushstate&&history.onpushstate({state:t});var i=o.call.apply(o,q_e([history,t],n));return e.lastState=t,i};var a=history.replaceState;history.replaceState=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];"function"==typeof history.onreplacestate&&history.onreplacestate({state:t});var i=a.call.apply(a,q_e([history,t],n));return e.lastState=t,i}}else this.collect.on("STATE_CHANGE",(function(t){e.lastState=t}));return 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=dTe.RESUME_FORM_PAGE):e.backStatus=!1})),function(){!function(e,t,n,r){e.addEventListener?e.removeEventListener(t,n,!1):e.attachEven&&e.detachEven("on"+t,n)}(document,"visibilitychange",i)}},e._observer_instance=null,e._observer_map=new OR,e}(),vTe=function(){function e(e,t,n){t.autotrack&&t.autotrack.exposure&&(this._intersection=new pTe(e,t,n),this._observer=new hTe(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"}(fTe||(fTe={}));var gTe,yTe=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 r=e.scrollTop,i=e.scrollLeft,o=null,a=0,s=0,c=function(t){clearTimeout(o),o=setTimeout((function(){var o=e.scrollTop,d=e.scrollLeft,h=t.target&&t.target.getAttribute("data-scroll-event")||"";1===u||2===u?o===c&&(s=c-r,Math.abs(s)>=n.distance&&n.distance&&n.eventHandle({eventType:"dom",eventName:"scroll",event:h,params:{$direction:u,$offsetY:s,$offsetX:a}},t)):3!==u&&4!==u||d===l&&(a=l-i,Math.abs(a)>=n.distance&&n.distance&&n.eventHandle({eventType:"dom",eventName:"scroll",event:h,params:{$direction:u,$offsetY:s,$offsetX:a}},t)),r=c,i=l}),100);var c=e.scrollTop,l=e.scrollLeft,u=fTe.NOT_SCROLL;c>r?u=fTe.SCROLL_DOWN:c<r?u=fTe.SCROLL_UP:l>i?u=fTe.SCROLL_LEFT:l<i&&(u=fTe.SCROLL_RIGHT)};return"remove"===t?e.removeEventListener("scroll",c,!1):e.addEventListener("scroll",c,!1),function(){e.removeEventListener("scroll",c,!1)}}catch(l){console.warn("scroll event error",Jx(l))}},e}(),mTe={hashTag:!1,impr:!1},_Te=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"==Su(t)?t:{},t=cG(mTe,t),this.destroyed=!1,this.options=t,this.Config=new eTe(JGe,this.options),this.Exposure=new vTe(this.collect,this.config,this.handle.bind(this)),this.Scroll=new yTe(this.config,this.handle.bind(this)),this.Listener=new $Ge(t,this.collect,this.Config),this.EventHandle=new rTe(this.config,t),this.Request=new iTe(this.collect),this.autoTrackStart=!0,this.init(),uTe(this,this.config)},e.prototype.init=function(){this.Listener.init(this.handle.bind(this));try{"base"===this.collect.loadType&&(window.opener||window.parent).postMessage("[tea-sdk]ready","*")}catch(e){}},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 r;(r="page_view"===n?this.EventHandle.handleViewEvent(t):this.EventHandle.handleStatisticsEvent(t))&&this.Request.send({eventType:"custom"},r)}else if("beat"===n){var i=this.EventHandle.handleBeadtEvent(t),o=e.eventSend;i&&this.Request.send({eventType:"custom",eventSend:o},i)}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 "+Jx(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"}(gTe||(gTe={}));var bTe={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"]},RTe=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;if(t.app_id&&t.enable_tracer&&!t.disable_track_event){this.limit={pv:1,sdk:3,autotrack:3,log:3},this.errorCode={f_net:0,f_data:0},this.tracerCache=new OR,this.collect=e,this.appid=t.app_id,this.reportUrl=e.configManager.getUrl("event");var r=this.collect.Types;this.collect.on(r.Event,(function(){n.addCount("log")})),this.collect.on(r.SubmitError,(function(e){var t=e.type,r=e.eventDate,i=e.errorCode,o=e.response;n.addErrorCount(r,t,i,o)})),this.listener(),this.collect.emit(r.TracerReady)}},e.prototype.addCount=function(e,t,n){void 0===t&&(t="net"),void 0===n&&(n=1);try{this.tracerCache||(this.tracerCache=new OR);var r=void 0;if(this.tracerCache.has(e))(i=this.tracerCache.get(e)).has(t)?(r=i.get(t).params.count,r++,i.set(t,this.processTracer(r,e,t))):(r=n,i.set(t,this.processTracer(n,e,t)));else{var i=new OR;r=n,i.set(t,this.processTracer(n,e,t)),this.tracerCache.set(e,i)}"net"===t&&r>=this.limit[e]&&this.report(!1)}catch(o){console.log(o)}},e.prototype.addErrorCount=function(e,t,n,r){var i=this;try{if(e&&e.length){var o=e[0].events;o&&o.length&&("f_data"===t?(r&&r.hasOwnProperty("sc")?this.addCount("log",t,o.length-r.sc):this.addCount("log",t,o.length),this.errorCode[t]=n):o.forEach((function(e){var r="log";for(var o in bTe){var a;if(-1!==KR(a=bTe[o]).call(a,e.event)){r=o;break}}i.addCount(r,t,1),i.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(r){}},e.prototype.processTracer=function(e,t,n){var r={count:e,state:n,key:t,params_for_special:"applog_trace",aid:this.appid,platform:"web",_staging_flag:1,sdk_version:Rbe};"f_net"!==n&&"f_data"!==n||(r.errorCode=this.errorCode[n]);var i=this.collect.processEvent("applog_trace",r);if(i&&i.event)return delete i.is_bav,i},e.prototype.listener=function(){var e=this;document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e.leavePage()})),abe((function(){e.leavePage()}))},e.prototype.leavePage=function(){this.report(!0)},e}(),wTe=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 r=e.Types,i=e.adapters.storage;this.storage=new i(!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(r.SubmitError,(function(e){"f_data"!==e.type&&n.storeData(e)})),e.on(r.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 r=setInterval((function(){if(3===n)return t.storeData(t.errorCache),t.retryStatus=!1,void clearInterval(r);var i=e.eventData;t.fetchData(i,(function(){var e;t.retryStatus=!1,clearInterval(r),t.retryCacheStatus&&vw(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;WR(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||!WR(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(Jx(t)),r=function(r){e.fetchData(t[r],(function(){delete n[r],e.storage.setItem(e.eventKey,n)}),(function(){}),!1)};for(var i in t)r(i)}),(function(){console.log("network error,compensate report fail")}),!0)}catch(r){console.warn("error check storage")}},e.prototype.fetchData=function(e,t,n,r){this.collect.requestManager.useRequest({url:this.eventUrl,data:e,timeout:3e4,success:t,fail:n,app_key:r?"566f58151b0ed37e":""})},e}(),GTe="undefined"!=typeof window?(window.LogPluginObject||(window.LogPluginObject={}),window.LogPluginObject):null,TTe=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(AGe.hasOwnProperty(n)){var r=AGe[n].object,i=AGe[n].src[e.channel]+"?query="+Date.now();e.exist(n,r,i)}else console.warn("your "+n+" is not exist,please check plugin name");else"object"==Su(t)&&(t.src?e.exist(n,t.call,t.src):e.process(n,t.instance,"INSTANCE"))}))}catch(t){this.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:t.message}),console.log("load extend error")}},e.prototype.exist=function(e,t,n){var r=this;GTe[t]?(this.process(e,GTe[t]),console.log("已有"+e+"插件,避免重复加载~")):this.loadPlugin(e,n,(function(){r.process(e,GTe[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 r=new t;r.apply&&r.apply(this.collect,this.config),console.log("excude "+e+" success")}else t&&t(this.collect,this.config)}catch(i){this.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:i.message}),console.log("excude "+e+" error, message:"+i.message)}},e.prototype.loadPlugin=function(e,t,n,r){var i=this;try{var o=document.createElement("script");o.src=t,this._plugin[e]||(this._plugin[e]=[]),this._plugin[e].push(n),o.onerror=function(){r(t)},o.onload=function(){i._plugin[e].forEach((function(e){e()}))},document.getElementsByTagName("head")[0].appendChild(o)}catch(a){this.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:a.message})}},e}(),kTe=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 OR,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"==Su(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 r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];"function"==typeof history.onpushstate&&history.onpushstate({state:n});var o=t.call.apply(t,q_e([history,n],r));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 r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];"function"==typeof history.onreplacestate&&history.onreplacestate({state:t});var o=n.call.apply(n,q_e([history,t],r));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 Qx(this.lastLocation).origin+new Qx(this.lastLocation).pathname===new Qx(location.href).origin+new Qx(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(r){return this.collect.emit(J_e.DEBUGGER_MESSAGE,{type:J_e.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:r.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}();xGe.usePlugin(TTe,"extend"),xGe.usePlugin(FGe,"ab"),xGe.usePlugin(WGe,"stay"),xGe.usePlugin(_Te,"autotrack"),xGe.usePlugin(IGe,"et"),xGe.usePlugin(QGe,"profile"),xGe.usePlugin(wTe,"retry"),xGe.usePlugin(qGe,"heartbeat"),xGe.usePlugin(ZGe,"monitor"),xGe.usePlugin(kTe,"route"),xGe.usePlugin(RTe,"tracer"),new xGe("default");var STe,ETe=xGe,MTe=function(e){return e.H265="h265",e.PRELOAD="preload",e.ADAPT_RANGE="adaptRange",e.RTM_ADAPTIVE_BUFFER="rtmAdaptiveBuffer",e}(MTe||{}),DTe=function(){function e(t){Py(this,e),Oy(this,"_strategyManager",void 0),this._strategyManager=t}return Hy(e,[{key:"getResult",value:function(){var e,t,n=null===(e=this._strategyManager.getStrategyRecommendations().result)||void 0===e?void 0:e[MTe.RTM_ADAPTIVE_BUFFER];return this._strategyManager.tea.config({evtParams:Fm({},n)}),null===(t=this._strategyManager.getStrategyRecommendations().result)||void 0===t?void 0:t[MTe.RTM_ADAPTIVE_BUFFER]}}]),e}();Oy(DTe,"strategyKey",MTe.RTM_ADAPTIVE_BUFFER);var zTe,ATe=(Oy(STe={},MTe.RTM_ADAPTIVE_BUFFER,{moduleName:jF.StrategyRtmAdaptiveBuffer,getModule:function(e){return null==e?void 0:e.VeStrategyRtmAdaptiveBuffer}}),Oy(STe,"vestrategy",{moduleName:jF.StrategyBase,getModule:function(e){return null==e?void 0:e.VeStrategy}}),STe),PTe=function(){function e(){Py(this,e),Oy(this,"veStrategyManager",void 0)}return Hy(e,[{key:"create",value:function(e){var t;return this.veStrategyManager=new K_e({loadPlugin:(t=cy(ay().mark((function e(t){var n,r,i,o,a;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=null!==(n=ATe[t])&&void 0!==n?n:{},i=r.moduleName,o=r.getModule,!i){e.next=6;break}return e.next=4,zH(i).then((function(e){return null==o?void 0:o(e)})).catch((function(){}));case 4:return a=e.sent,e.abrupt("return",a);case 6:return e.abrupt("return");case 7:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)}),tea:e,Collector:ETe,strategies:[DTe]}),this.veStrategyManager}}]),e}(),xTe=new PTe;wO.extend([{LANG:"zh-cn",TEXT:aB},{LANG:"en",TEXT:oB}]);var CTe={autoplay:{muted:!0}},FTe=Xm(zTe=[]).call(zTe,Ay(fO),[kU,eB,rB]),ITe=function(e){return e.H264="h264",e}(ITe||{}),HTe=function(e){UM(i,e);var t,n,r=VM(i);function i(e){var t;return Py(this,i),Oy(AM(t=r.call(this,e)),"_protocolManager",void 0),t}return Hy(i,[{key:"playTime",get:function(){var e;if(null===(e=this._player)||void 0===e||null===(e=e.played)||void 0===e||!e.length)return 0;for(var t=this._player.played.length,n=0,r=0;r<t;r++){var i,o,a=null===(i=this._player)||void 0===i?void 0:i.played.start(r);n+=(null===(o=this._player)||void 0===o?void 0:o.played.end(r))-a}return n}},{key:"ad",get:function(){var e;return null===(e=this._player.plugins)||void 0===e||null===(e=e.ad)||void 0===e?void 0:e.adManager}},{key:"openLog",value:function(){var e;null===(e=this._player.plugins)||void 0===e||e.logger.open()}},{key:"closeLog",value:function(){var e;null===(e=this._player.plugins)||void 0===e||e.logger.close()}},{key:"openInfoPanel",value:function(){var e;null===(e=this._player.plugins)||void 0===e||e.infopanel.open()}},{key:"closeInfoPanel",value:function(){var e;null===(e=this._player.plugins)||void 0===e||e.infopanel.close()}},{key:"openAbr",value:function(){var e,t,n=this.url&&VH(this.url);"flv"!==n?"hls"===n&&(null===(e=this._player.plugins)||void 0===e||null===(e=e.hlsabr)||void 0===e||e.switchAbr(!0)):null===(t=this._player.plugins)||void 0===t||null===(t=t.abr)||void 0===t||t.switchAbr(!0)}},{key:"closeAbr",value:function(){var e,t,n=this.url&&VH(this.url);"flv"!==n?"hls"===n&&(null===(e=this._player.plugins)||void 0===e||null===(e=e.hlsabr)||void 0===e||e.switchAbr(!1)):null===(t=this._player.plugins)||void 0===t||null===(t=t.abr)||void 0===t||t.switchAbr(!1)}},{key:"updateDrmConfig",value:function(e){var t;null===(t=this._player)||void 0===t||null===(t=t.plugins)||void 0===t||null===(t=t.drm)||void 0===t||t.updateDrmConfig(e)}},{key:"switchAbr",value:function(e){var t;if(null!==(t=this._player.plugins)&&void 0!==t&&t.abr){if(void 0!==(null==e?void 0:e.bitrate)){var n=this._player.plugins.abr.config.urls[e.bitrate];if(!n)return;this.switch(n,{seamless:!0}),this._player.plugins.abr.bitrate=e.bitrate}var r;if(void 0!==(null==e?void 0:e.enable))null===(r=this._player.plugins)||void 0===r||r.abr.switchAbr(e.enable)}}},{key:"getRTMNetWorkInfo",value:function(){var e;return null===(e=this._player)||void 0===e||null===(e=e.plugins)||void 0===e||null===(e=e.rts)||void 0===e?void 0:e.getNetWorkInfo()}},{key:"getRTMStats",value:(n=cy(ay().mark((function e(){var t;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",null===(t=this._player)||void 0===t||null===(t=t.plugins)||void 0===t||null===(t=t.rts)||void 0===t?void 0:t.getStatsSnapshoot());case 1:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"getFLVStats",value:function(){var e;return null===(e=this._player)||void 0===e||null===(e=e.plugins)||void 0===e||null===(e=e.flv)||void 0===e?void 0:e.getStats()}},{key:"getHLSStats",value:function(){var e;return null===(e=this._player)||void 0===e||null===(e=e.plugins)||void 0===e||null===(e=e.hls)||void 0===e?void 0:e.getStats()}},{key:"updatePlaylist",value:(t=cy(ay().mark((function e(t,n){var r,o=arguments;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o.length>2&&void 0!==o[2]&&!o[2]){e.next=4;break}return e.next=4,null===(r=this._protocolManager)||void 0===r?void 0:r.update({playlist:t});case 4:return e.abrupt("return",kF(BM(i.prototype),"updatePlaylist",this).call(this,t,n));case 5:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})}]),i}(MO);function OTe(e){return LTe.apply(this,arguments)}function LTe(){return(LTe=cy(ay().mark((function e(t){var n,r,i,o,a,s,c,l,u,d;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=void 0,s=new wO({lang:null==t?void 0:t.lang,i18n:null==t?void 0:t.i18n}),t&&(t.url||t.playlist)){e.next=4;break}throw nU(eU.INVALID_PARAMETER,s);case 4:return null!==(n=t.logger)&&void 0!==n&&n.appId||!1===(null==t||null===(r=t.logger)||void 0===r?void 0:r.enable)||console.warn(nU(eU.INVALID_LOGGER,s).message),jq.tea||jq.init(t.logger),c=Fm(Fm({},t),{},{plugins:Xm(i=[]).call(i,Ay(FTe),Ay(null!==(o=t.plugins)&&void 0!==o?o:[]))}),e.next=9,cN.create(c);case 9:if(l=e.sent,t.url||null!=l&&l.playlist){e.next=12;break}throw nU(eU.INVALID_PARAMETER,s);case 12:return e.next=14,MO.create(Fm(Fm(Fm({},CTe),c),{},{playlist:null==l?void 0:l.playlist,beforeFallbackError:uN.beforeFallbackError,isLive:!0,i18nManager:s,teaTracker:jq,preProcessUrl:function(e){return OH(".ts",e)?{url:e}:{url:yB(e)}},preparePlugins:function(e){return cy(ay().mark((function t(){return ay().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l.enableSelector){t.next=3;break}return t.next=3,l.update({url:e});case 3:return t.abrupt("return",l.getStrategy(a,s,xTe.veStrategyManager));case 4:case"end":return t.stop()}}),t)})))()}}),HTe);case 14:return(a=e.sent)._protocolManager=l,uN.initErrorFallback(a,l),a&&(d=null===(u=a)||void 0===u||null===(u=u._player)||void 0===u||null===(u=u.config)||void 0===u?void 0:u._RTMdegrade)&&a.emit("degrade",{originRtmUrl:d._originRtmUrl,code:"NOT_SUPPORT",message:"not support rtm or h264",isRTMSupported:d._isRTMSupported,isRTMSupportCodec:d._isRTMSupportCodec}),e.abrupt("return",a);case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function XTe(){return(XTe=cy(ay().mark((function e(t){var n;return ay().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.appId){e.next=2;break}return e.abrupt("return");case 2:return jq.init({userId:t.userId,deviceId:t.deviceId}),n=xTe.create(jq.tea),e.next=6,n.init(Fm(Fm({},t),{},{type:"LIVE"}));case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var UTe,BTe=Object.freeze({__proto__:null,ErrorCode:eU,Events:wU,prepare:function(e){return XTe.apply(this,arguments)}});UTe="umd",EH.setModuleSystem(UTe);var NTe=KH.isMseSupported,VTe=KH.isSoftDecodeSupported,jTe=KH.isMMSSupported;void 0!==VePlayer.registerPlugin?VePlayer.registerPlugin(jF.BizLive,{createLivePlayer:OTe}):MH(jF.BizLive,{createLivePlayer:OTe}),e.Codec=t,e.DecodeType=r,e.Degradation=n,e.DynamicModule=jF,e.EN=bO,e.ListType=AF,e.POSITIONS=kO,e.Plugin=FE,e.RTMCodec=ITe,e.Sniffer=uS,e.ZH_CN=RO,e.createLivePlayer=OTe,e.isFLVSupported=EB,e.isMMSSupported=jTe,e.isMseSupported=NTe,e.isRTMSupportCodec=qB,e.isRTMSupported=WB,e.isSoftDecodeSupported=VTe,e.live=BTe,e.load=zH,e.register=DH,e.registerPlugin=MH,e.util=KH}));