@volcengine/veplayer-plugin 2.4.1-rc.0 → 2.5.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.
- package/esm/index.d.ts +1 -0
- package/esm/index.development.css +7 -0
- package/esm/index.development.js +31562 -23809
- package/esm/index.production.css +1 -1
- package/esm/index.production.js +13 -4
- package/esm/veplayer.plugin.abr.development.js +59 -3
- package/esm/veplayer.plugin.abr.production.js +1 -1
- package/esm/veplayer.plugin.ad.development.css +7 -0
- package/esm/veplayer.plugin.ad.development.js +9042 -0
- package/esm/veplayer.plugin.ad.production.css +1 -0
- package/esm/veplayer.plugin.ad.production.js +4 -0
- package/esm/veplayer.plugin.drm.development.js +59 -3
- package/esm/veplayer.plugin.drm.production.js +1 -1
- package/esm/veplayer.plugin.flv.development.js +63 -22
- package/esm/veplayer.plugin.flv.production.js +1 -1
- package/esm/veplayer.plugin.hls.development.js +398 -55
- package/esm/veplayer.plugin.hls.production.js +1 -1
- package/esm/veplayer.plugin.mp4.development.js +61 -5
- package/esm/veplayer.plugin.mp4.production.js +1 -1
- package/esm/veplayer.plugin.rtm.development.js +63 -13
- package/esm/veplayer.plugin.rtm.production.js +1 -1
- package/esm/veplayer.plugin.shaka.development.js +60 -4
- package/esm/veplayer.plugin.shaka.production.js +1 -1
- package/package.json +1 -1
- package/umd/index.d.ts +1 -0
- package/umd/veplayer.plugin.abr.development.js +59 -3
- package/umd/veplayer.plugin.abr.production.js +1 -1
- package/umd/veplayer.plugin.ad.development.css +7 -0
- package/umd/veplayer.plugin.ad.development.js +9045 -0
- package/umd/veplayer.plugin.ad.production.css +1 -0
- package/umd/veplayer.plugin.ad.production.js +1 -0
- package/umd/veplayer.plugin.drm.development.js +59 -3
- package/umd/veplayer.plugin.drm.production.js +1 -1
- package/umd/veplayer.plugin.flv.development.js +63 -22
- package/umd/veplayer.plugin.flv.production.js +1 -1
- package/umd/veplayer.plugin.hls.development.js +398 -55
- package/umd/veplayer.plugin.hls.production.js +1 -1
- package/umd/veplayer.plugin.mp4.development.js +61 -5
- package/umd/veplayer.plugin.mp4.production.js +1 -1
- package/umd/veplayer.plugin.rtm.development.js +63 -13
- package/umd/veplayer.plugin.rtm.production.js +1 -1
- package/umd/veplayer.plugin.shaka.development.js +60 -4
- package/umd/veplayer.plugin.shaka.production.js +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).VePlayerAd=e()}(this,(function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var r={exports:{}},i=function(t){return t&&t.Math==Math&&t},o=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof e&&e)||function(){return this}()||e||Function("return this")(),a=function(t){try{return!!t()}catch(e){return!0}},s=!a((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),u=s,l=Function.prototype,c=l.apply,f=l.call,h="object"==typeof Reflect&&Reflect.apply||(u?f.bind(c):function(){return f.apply(c,arguments)}),p=s,d=Function.prototype,g=d.call,v=p&&d.bind.bind(g,g),y=p?v:function(t){return function(){return g.apply(t,arguments)}},m=y,b=m({}.toString),w=m("".slice),_=function(t){return w(b(t),8,-1)},k=_,E=y,A=function(t){if("Function"===k(t))return E(t)},T="object"==typeof document&&document.all,C={all:T,IS_HTMLDDA:void 0===T&&void 0!==T},S=C.all,x=C.IS_HTMLDDA?function(t){return"function"==typeof t||t===S}:function(t){return"function"==typeof t},L={},M=!a((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),O=s,I=Function.prototype.call,P=O?I.bind(I):function(){return I.apply(I,arguments)},R={},U={}.propertyIsEnumerable,B=Object.getOwnPropertyDescriptor,D=B&&!U.call({1:2},1);R.f=D?function(t){var e=B(this,t);return!!e&&e.enumerable}:U;var j,N,F=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},H=a,z=_,V=Object,q=y("".split),G=H((function(){return!V("z").propertyIsEnumerable(0)}))?function(t){return"String"==z(t)?q(t,""):V(t)}:V,Y=function(t){return null==t},W=Y,K=TypeError,X=function(t){if(W(t))throw K("Can't call method on "+t);return t},$=G,J=X,Q=function(t){return $(J(t))},Z=x,tt=C.all,et=C.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:Z(t)||t===tt}:function(t){return"object"==typeof t?null!==t:Z(t)},nt={},rt=nt,it=o,ot=x,at=function(t){return ot(t)?t:void 0},st=function(t,e){return arguments.length<2?at(rt[t])||at(it[t]):rt[t]&&rt[t][e]||it[t]&&it[t][e]},ut=y({}.isPrototypeOf),lt="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ct=o,ft=lt,ht=ct.process,pt=ct.Deno,dt=ht&&ht.versions||pt&&pt.version,gt=dt&&dt.v8;gt&&(N=(j=gt.split("."))[0]>0&&j[0]<4?1:+(j[0]+j[1])),!N&&ft&&(!(j=ft.match(/Edge\/(\d+)/))||j[1]>=74)&&(j=ft.match(/Chrome\/(\d+)/))&&(N=+j[1]);var vt=N,yt=vt,mt=a,bt=o.String,wt=!!Object.getOwnPropertySymbols&&!mt((function(){var t=Symbol();return!bt(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&yt&&yt<41})),_t=wt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,kt=st,Et=x,At=ut,Tt=Object,Ct=_t?function(t){return"symbol"==typeof t}:function(t){var e=kt("Symbol");return Et(e)&&At(e.prototype,Tt(t))},St=String,xt=function(t){try{return St(t)}catch(e){return"Object"}},Lt=x,Mt=xt,Ot=TypeError,It=function(t){if(Lt(t))return t;throw Ot(Mt(t)+" is not a function")},Pt=It,Rt=Y,Ut=function(t,e){var n=t[e];return Rt(n)?void 0:Pt(n)},Bt=P,Dt=x,jt=et,Nt=TypeError,Ft={exports:{}},Ht=o,zt=Object.defineProperty,Vt=function(t,e){try{zt(Ht,t,{value:e,configurable:!0,writable:!0})}catch(n){Ht[t]=e}return e},qt="__core-js_shared__",Gt=o[qt]||Vt(qt,{}),Yt=Gt;(Ft.exports=function(t,e){return Yt[t]||(Yt[t]=void 0!==e?e:{})})("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 Wt=Ft.exports,Kt=X,Xt=Object,$t=function(t){return Xt(Kt(t))},Jt=$t,Qt=y({}.hasOwnProperty),Zt=Object.hasOwn||function(t,e){return Qt(Jt(t),e)},te=y,ee=0,ne=Math.random(),re=te(1..toString),ie=function(t){return"Symbol("+(void 0===t?"":t)+")_"+re(++ee+ne,36)},oe=Wt,ae=Zt,se=ie,ue=wt,le=_t,ce=o.Symbol,fe=oe("wks"),he=le?ce.for||ce:ce&&ce.withoutSetter||se,pe=function(t){return ae(fe,t)||(fe[t]=ue&&ae(ce,t)?ce[t]:he("Symbol."+t)),fe[t]},de=P,ge=et,ve=Ct,ye=Ut,me=function(t,e){var n,r;if("string"===e&&Dt(n=t.toString)&&!jt(r=Bt(n,t)))return r;if(Dt(n=t.valueOf)&&!jt(r=Bt(n,t)))return r;if("string"!==e&&Dt(n=t.toString)&&!jt(r=Bt(n,t)))return r;throw Nt("Can't convert object to primitive value")},be=TypeError,we=pe("toPrimitive"),_e=function(t,e){if(!ge(t)||ve(t))return t;var n,r=ye(t,we);if(r){if(void 0===e&&(e="default"),n=de(r,t,e),!ge(n)||ve(n))return n;throw be("Can't convert object to primitive value")}return void 0===e&&(e="number"),me(t,e)},ke=Ct,Ee=function(t){var e=_e(t,"string");return ke(e)?e:e+""},Ae=et,Te=o.document,Ce=Ae(Te)&&Ae(Te.createElement),Se=function(t){return Ce?Te.createElement(t):{}},xe=Se,Le=!M&&!a((function(){return 7!=Object.defineProperty(xe("div"),"a",{get:function(){return 7}}).a})),Me=M,Oe=P,Ie=R,Pe=F,Re=Q,Ue=Ee,Be=Zt,De=Le,je=Object.getOwnPropertyDescriptor;L.f=Me?je:function(t,e){if(t=Re(t),e=Ue(e),De)try{return je(t,e)}catch(n){}if(Be(t,e))return Pe(!Oe(Ie.f,t,e),t[e])};var Ne=a,Fe=x,He=/#|\.prototype\./,ze=function(t,e){var n=qe[Ve(t)];return n==Ye||n!=Ge&&(Fe(e)?Ne(e):!!e)},Ve=ze.normalize=function(t){return String(t).replace(He,".").toLowerCase()},qe=ze.data={},Ge=ze.NATIVE="N",Ye=ze.POLYFILL="P",We=ze,Ke=It,Xe=s,$e=A(A.bind),Je=function(t,e){return Ke(t),void 0===e?t:Xe?$e(t,e):function(){return t.apply(e,arguments)}},Qe={},Ze=M&&a((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),tn=et,en=String,nn=TypeError,rn=function(t){if(tn(t))return t;throw nn(en(t)+" is not an object")},on=M,an=Le,sn=Ze,un=rn,ln=Ee,cn=TypeError,fn=Object.defineProperty,hn=Object.getOwnPropertyDescriptor,pn="enumerable",dn="configurable",gn="writable";Qe.f=on?sn?function(t,e,n){if(un(t),e=ln(e),un(n),"function"==typeof t&&"prototype"===e&&"value"in n&&gn in n&&!n[gn]){var r=hn(t,e);r&&r[gn]&&(t[e]=n.value,n={configurable:dn in n?n[dn]:r[dn],enumerable:pn in n?n[pn]:r[pn],writable:!1})}return fn(t,e,n)}:fn:function(t,e,n){if(un(t),e=ln(e),un(n),an)try{return fn(t,e,n)}catch(r){}if("get"in n||"set"in n)throw cn("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var vn=Qe,yn=F,mn=M?function(t,e,n){return vn.f(t,e,yn(1,n))}:function(t,e,n){return t[e]=n,t},bn=o,wn=h,_n=A,kn=x,En=L.f,An=We,Tn=nt,Cn=Je,Sn=mn,xn=Zt,Ln=function(t){var e=function(n,r,i){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,r)}return new t(n,r,i)}return wn(t,this,arguments)};return e.prototype=t.prototype,e},Mn=function(t,e){var n,r,i,o,a,s,u,l,c,f=t.target,h=t.global,p=t.stat,d=t.proto,g=h?bn:p?bn[f]:(bn[f]||{}).prototype,v=h?Tn:Tn[f]||Sn(Tn,f,{})[f],y=v.prototype;for(o in e)r=!(n=An(h?o:f+(p?".":"#")+o,t.forced))&&g&&xn(g,o),s=v[o],r&&(u=t.dontCallGetSet?(c=En(g,o))&&c.value:g[o]),a=r&&u?u:e[o],r&&typeof s==typeof a||(l=t.bind&&r?Cn(a,bn):t.wrap&&r?Ln(a):d&&kn(a)?_n(a):a,(t.sham||a&&a.sham||s&&s.sham)&&Sn(l,"sham",!0),Sn(v,o,l),d&&(xn(Tn,i=f+"Prototype")||Sn(Tn,i,{}),Sn(Tn[i],o,a),t.real&&y&&(n||!y[o])&&Sn(y,o,a)))},On=Mn,In=M,Pn=Qe.f;On({target:"Object",stat:!0,forced:Object.defineProperty!==Pn,sham:!In},{defineProperty:Pn});var Rn=nt.Object,Un=r.exports=function(t,e,n){return Rn.defineProperty(t,e,n)};Rn.defineProperty.sham&&(Un.sham=!0);var Bn=r.exports,Dn=n(Bn),jn=_,Nn=Array.isArray||function(t){return"Array"==jn(t)},Fn=Math.ceil,Hn=Math.floor,zn=Math.trunc||function(t){var e=+t;return(e>0?Hn:Fn)(e)},Vn=function(t){var e=+t;return e!=e||0===e?0:zn(e)},qn=Vn,Gn=Math.min,Yn=function(t){return t>0?Gn(qn(t),9007199254740991):0},Wn=Yn,Kn=function(t){return Wn(t.length)},Xn=TypeError,$n=function(t){if(t>9007199254740991)throw Xn("Maximum allowed index exceeded");return t},Jn=Ee,Qn=Qe,Zn=F,tr=function(t,e,n){var r=Jn(e);r in t?Qn.f(t,r,Zn(0,n)):t[r]=n},er={};er[pe("toStringTag")]="z";var nr="[object z]"===String(er),rr=nr,ir=x,or=_,ar=pe("toStringTag"),sr=Object,ur="Arguments"==or(function(){return arguments}()),lr=rr?or:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(n){}}(e=sr(t),ar))?n:ur?or(e):"Object"==(r=or(e))&&ir(e.callee)?"Arguments":r},cr=x,fr=Gt,hr=y(Function.toString);cr(fr.inspectSource)||(fr.inspectSource=function(t){return hr(t)});var pr=fr.inspectSource,dr=y,gr=a,vr=x,yr=lr,mr=pr,br=function(){},wr=[],_r=st("Reflect","construct"),kr=/^\s*(?:class|function)\b/,Er=dr(kr.exec),Ar=!kr.exec(br),Tr=function(t){if(!vr(t))return!1;try{return _r(br,wr,t),!0}catch(e){return!1}},Cr=function(t){if(!vr(t))return!1;switch(yr(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Ar||!!Er(kr,mr(t))}catch(e){return!0}};Cr.sham=!0;var Sr=!_r||gr((function(){var t;return Tr(Tr.call)||!Tr(Object)||!Tr((function(){t=!0}))||t}))?Cr:Tr,xr=Nn,Lr=Sr,Mr=et,Or=pe("species"),Ir=Array,Pr=function(t){var e;return xr(t)&&(e=t.constructor,(Lr(e)&&(e===Ir||xr(e.prototype))||Mr(e)&&null===(e=e[Or]))&&(e=void 0)),void 0===e?Ir:e},Rr=function(t,e){return new(Pr(t))(0===e?0:e)},Ur=a,Br=vt,Dr=pe("species"),jr=function(t){return Br>=51||!Ur((function(){var e=[];return(e.constructor={})[Dr]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Nr=Mn,Fr=a,Hr=Nn,zr=et,Vr=$t,qr=Kn,Gr=$n,Yr=tr,Wr=Rr,Kr=jr,Xr=vt,$r=pe("isConcatSpreadable"),Jr=Xr>=51||!Fr((function(){var t=[];return t[$r]=!1,t.concat()[0]!==t})),Qr=function(t){if(!zr(t))return!1;var e=t[$r];return void 0!==e?!!e:Hr(t)};Nr({target:"Array",proto:!0,arity:1,forced:!Jr||!Kr("concat")},{concat:function(t){var e,n,r,i,o,a=Vr(this),s=Wr(a,0),u=0;for(e=-1,r=arguments.length;e<r;e++)if(Qr(o=-1===e?a:arguments[e]))for(i=qr(o),Gr(u+i),n=0;n<i;n++,u++)n in o&&Yr(s,u,o[n]);else Gr(u+1),Yr(s,u++,o);return s.length=u,s}});var Zr=lr,ti=String,ei=function(t){if("Symbol"===Zr(t))throw TypeError("Cannot convert a Symbol value to a string");return ti(t)},ni={},ri=Vn,ii=Math.max,oi=Math.min,ai=function(t,e){var n=ri(t);return n<0?ii(n+e,0):oi(n,e)},si=Q,ui=ai,li=Kn,ci=function(t){return function(e,n,r){var i,o=si(e),a=li(o),s=ui(r,a);if(t&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((t||s in o)&&o[s]===n)return t||s||0;return!t&&-1}},fi={includes:ci(!0),indexOf:ci(!1)},hi={},pi=Zt,di=Q,gi=fi.indexOf,vi=hi,yi=y([].push),mi=function(t,e){var n,r=di(t),i=0,o=[];for(n in r)!pi(vi,n)&&pi(r,n)&&yi(o,n);for(;e.length>i;)pi(r,n=e[i++])&&(~gi(o,n)||yi(o,n));return o},bi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],wi=mi,_i=bi,ki=Object.keys||function(t){return wi(t,_i)},Ei=M,Ai=Ze,Ti=Qe,Ci=rn,Si=Q,xi=ki;ni.f=Ei&&!Ai?Object.defineProperties:function(t,e){Ci(t);for(var n,r=Si(e),i=xi(e),o=i.length,a=0;o>a;)Ti.f(t,n=i[a++],r[n]);return t};var Li,Mi=st("document","documentElement"),Oi=ie,Ii=Wt("keys"),Pi=function(t){return Ii[t]||(Ii[t]=Oi(t))},Ri=rn,Ui=ni,Bi=bi,Di=hi,ji=Mi,Ni=Se,Fi="prototype",Hi="script",zi=Pi("IE_PROTO"),Vi=function(){},qi=function(t){return"<"+Hi+">"+t+"</"+Hi+">"},Gi=function(t){t.write(qi("")),t.close();var e=t.parentWindow.Object;return t=null,e},Yi=function(){try{Li=new ActiveXObject("htmlfile")}catch(i){}var t,e,n;Yi="undefined"!=typeof document?document.domain&&Li?Gi(Li):(e=Ni("iframe"),n="java"+Hi+":",e.style.display="none",ji.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(qi("document.F=Object")),t.close(),t.F):Gi(Li);for(var r=Bi.length;r--;)delete Yi[Fi][Bi[r]];return Yi()};Di[zi]=!0;var Wi=Object.create||function(t,e){var n;return null!==t?(Vi[Fi]=Ri(t),n=new Vi,Vi[Fi]=null,n[zi]=t):n=Yi(),void 0===e?n:Ui.f(n,e)},Ki={},Xi=mi,$i=bi.concat("length","prototype");Ki.f=Object.getOwnPropertyNames||function(t){return Xi(t,$i)};var Ji={},Qi=ai,Zi=Kn,to=tr,eo=Array,no=Math.max,ro=function(t,e,n){for(var r=Zi(t),i=Qi(e,r),o=Qi(void 0===n?r:n,r),a=eo(no(o-i,0)),s=0;i<o;i++,s++)to(a,s,t[i]);return a.length=s,a},io=_,oo=Q,ao=Ki.f,so=ro,uo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Ji.f=function(t){return uo&&"Window"==io(t)?function(t){try{return ao(t)}catch(e){return so(uo)}}(t):ao(oo(t))};var lo={};lo.f=Object.getOwnPropertySymbols;var co=mn,fo=function(t,e,n,r){return r&&r.enumerable?t[e]=n:co(t,e,n),t},ho=Qe,po=function(t,e,n){return ho.f(t,e,n)},go={},vo=pe;go.f=vo;var yo,mo,bo,wo=nt,_o=Zt,ko=go,Eo=Qe.f,Ao=function(t){var e=wo.Symbol||(wo.Symbol={});_o(e,t)||Eo(e,t,{value:ko.f(t)})},To=P,Co=st,So=pe,xo=fo,Lo=function(){var t=Co("Symbol"),e=t&&t.prototype,n=e&&e.valueOf,r=So("toPrimitive");e&&!e[r]&&xo(e,r,(function(t){return To(n,this)}),{arity:1})},Mo=lr,Oo=nr?{}.toString:function(){return"[object "+Mo(this)+"]"},Io=nr,Po=Qe.f,Ro=mn,Uo=Zt,Bo=Oo,Do=pe("toStringTag"),jo=function(t,e,n,r){if(t){var i=n?t:t.prototype;Uo(i,Do)||Po(i,Do,{configurable:!0,value:e}),r&&!Io&&Ro(i,"toString",Bo)}},No=x,Fo=o.WeakMap,Ho=No(Fo)&&/native code/.test(String(Fo)),zo=o,Vo=et,qo=mn,Go=Zt,Yo=Gt,Wo=Pi,Ko=hi,Xo="Object already initialized",$o=zo.TypeError,Jo=zo.WeakMap;if(Ho||Yo.state){var Qo=Yo.state||(Yo.state=new Jo);Qo.get=Qo.get,Qo.has=Qo.has,Qo.set=Qo.set,yo=function(t,e){if(Qo.has(t))throw $o(Xo);return e.facade=t,Qo.set(t,e),e},mo=function(t){return Qo.get(t)||{}},bo=function(t){return Qo.has(t)}}else{var Zo=Wo("state");Ko[Zo]=!0,yo=function(t,e){if(Go(t,Zo))throw $o(Xo);return e.facade=t,qo(t,Zo,e),e},mo=function(t){return Go(t,Zo)?t[Zo]:{}},bo=function(t){return Go(t,Zo)}}var ta={set:yo,get:mo,has:bo,enforce:function(t){return bo(t)?mo(t):yo(t,{})},getterFor:function(t){return function(e){var n;if(!Vo(e)||(n=mo(e)).type!==t)throw $o("Incompatible receiver, "+t+" required");return n}}},ea=Je,na=G,ra=$t,ia=Kn,oa=Rr,aa=y([].push),sa=function(t){var e=1==t,n=2==t,r=3==t,i=4==t,o=6==t,a=7==t,s=5==t||o;return function(u,l,c,f){for(var h,p,d=ra(u),g=na(d),v=ea(l,c),y=ia(g),m=0,b=f||oa,w=e?b(u,y):n||a?b(u,0):void 0;y>m;m++)if((s||m in g)&&(p=v(h=g[m],m,d),t))if(e)w[m]=p;else if(p)switch(t){case 3:return!0;case 5:return h;case 6:return m;case 2:aa(w,h)}else switch(t){case 4:return!1;case 7:aa(w,h)}return o?-1:r||i?i:w}},ua={forEach:sa(0),map:sa(1),filter:sa(2),some:sa(3),every:sa(4),find:sa(5),findIndex:sa(6),filterReject:sa(7)},la=Mn,ca=o,fa=P,ha=y,pa=M,da=wt,ga=a,va=Zt,ya=ut,ma=rn,ba=Q,wa=Ee,_a=ei,ka=F,Ea=Wi,Aa=ki,Ta=Ki,Ca=Ji,Sa=lo,xa=L,La=Qe,Ma=ni,Oa=R,Ia=fo,Pa=po,Ra=Wt,Ua=hi,Ba=ie,Da=pe,ja=go,Na=Ao,Fa=Lo,Ha=jo,za=ta,Va=ua.forEach,qa=Pi("hidden"),Ga="Symbol",Ya="prototype",Wa=za.set,Ka=za.getterFor(Ga),Xa=Object[Ya],$a=ca.Symbol,Ja=$a&&$a[Ya],Qa=ca.TypeError,Za=ca.QObject,ts=xa.f,es=La.f,ns=Ca.f,rs=Oa.f,is=ha([].push),os=Ra("symbols"),as=Ra("op-symbols"),ss=Ra("wks"),us=!Za||!Za[Ya]||!Za[Ya].findChild,ls=pa&&ga((function(){return 7!=Ea(es({},"a",{get:function(){return es(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=ts(Xa,e);r&&delete Xa[e],es(t,e,n),r&&t!==Xa&&es(Xa,e,r)}:es,cs=function(t,e){var n=os[t]=Ea(Ja);return Wa(n,{type:Ga,tag:t,description:e}),pa||(n.description=e),n},fs=function(t,e,n){t===Xa&&fs(as,e,n),ma(t);var r=wa(e);return ma(n),va(os,r)?(n.enumerable?(va(t,qa)&&t[qa][r]&&(t[qa][r]=!1),n=Ea(n,{enumerable:ka(0,!1)})):(va(t,qa)||es(t,qa,ka(1,{})),t[qa][r]=!0),ls(t,r,n)):es(t,r,n)},hs=function(t,e){ma(t);var n=ba(e),r=Aa(n).concat(vs(n));return Va(r,(function(e){pa&&!fa(ps,n,e)||fs(t,e,n[e])})),t},ps=function(t){var e=wa(t),n=fa(rs,this,e);return!(this===Xa&&va(os,e)&&!va(as,e))&&(!(n||!va(this,e)||!va(os,e)||va(this,qa)&&this[qa][e])||n)},ds=function(t,e){var n=ba(t),r=wa(e);if(n!==Xa||!va(os,r)||va(as,r)){var i=ts(n,r);return!i||!va(os,r)||va(n,qa)&&n[qa][r]||(i.enumerable=!0),i}},gs=function(t){var e=ns(ba(t)),n=[];return Va(e,(function(t){va(os,t)||va(Ua,t)||is(n,t)})),n},vs=function(t){var e=t===Xa,n=ns(e?as:ba(t)),r=[];return Va(n,(function(t){!va(os,t)||e&&!va(Xa,t)||is(r,os[t])})),r};da||($a=function(){if(ya(Ja,this))throw Qa("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?_a(arguments[0]):void 0,e=Ba(t),n=function(t){this===Xa&&fa(n,as,t),va(this,qa)&&va(this[qa],e)&&(this[qa][e]=!1),ls(this,e,ka(1,t))};return pa&&us&&ls(Xa,e,{configurable:!0,set:n}),cs(e,t)},Ia(Ja=$a[Ya],"toString",(function(){return Ka(this).tag})),Ia($a,"withoutSetter",(function(t){return cs(Ba(t),t)})),Oa.f=ps,La.f=fs,Ma.f=hs,xa.f=ds,Ta.f=Ca.f=gs,Sa.f=vs,ja.f=function(t){return cs(Da(t),t)},pa&&Pa(Ja,"description",{configurable:!0,get:function(){return Ka(this).description}})),la({global:!0,constructor:!0,wrap:!0,forced:!da,sham:!da},{Symbol:$a}),Va(Aa(ss),(function(t){Na(t)})),la({target:Ga,stat:!0,forced:!da},{useSetter:function(){us=!0},useSimple:function(){us=!1}}),la({target:"Object",stat:!0,forced:!da,sham:!pa},{create:function(t,e){return void 0===e?Ea(t):hs(Ea(t),e)},defineProperty:fs,defineProperties:hs,getOwnPropertyDescriptor:ds}),la({target:"Object",stat:!0,forced:!da},{getOwnPropertyNames:gs}),Fa(),Ha($a,Ga),Ua[qa]=!0;var ys=wt&&!!Symbol.for&&!!Symbol.keyFor,ms=Mn,bs=st,ws=Zt,_s=ei,ks=Wt,Es=ys,As=ks("string-to-symbol-registry"),Ts=ks("symbol-to-string-registry");ms({target:"Symbol",stat:!0,forced:!Es},{for:function(t){var e=_s(t);if(ws(As,e))return As[e];var n=bs("Symbol")(e);return As[e]=n,Ts[n]=e,n}});var Cs=Mn,Ss=Zt,xs=Ct,Ls=xt,Ms=ys,Os=Wt("symbol-to-string-registry");Cs({target:"Symbol",stat:!0,forced:!Ms},{keyFor:function(t){if(!xs(t))throw TypeError(Ls(t)+" is not a symbol");if(Ss(Os,t))return Os[t]}});var Is=y([].slice),Ps=Nn,Rs=x,Us=_,Bs=ei,Ds=y([].push),js=Mn,Ns=st,Fs=h,Hs=P,zs=y,Vs=a,qs=x,Gs=Ct,Ys=Is,Ws=function(t){if(Rs(t))return t;if(Ps(t)){for(var e=t.length,n=[],r=0;r<e;r++){var i=t[r];"string"==typeof i?Ds(n,i):"number"!=typeof i&&"Number"!=Us(i)&&"String"!=Us(i)||Ds(n,Bs(i))}var o=n.length,a=!0;return function(t,e){if(a)return a=!1,e;if(Ps(this))return e;for(var r=0;r<o;r++)if(n[r]===t)return e}}},Ks=wt,Xs=String,$s=Ns("JSON","stringify"),Js=zs(/./.exec),Qs=zs("".charAt),Zs=zs("".charCodeAt),tu=zs("".replace),eu=zs(1..toString),nu=/[\uD800-\uDFFF]/g,ru=/^[\uD800-\uDBFF]$/,iu=/^[\uDC00-\uDFFF]$/,ou=!Ks||Vs((function(){var t=Ns("Symbol")();return"[null]"!=$s([t])||"{}"!=$s({a:t})||"{}"!=$s(Object(t))})),au=Vs((function(){return'"\\udf06\\ud834"'!==$s("\udf06\ud834")||'"\\udead"'!==$s("\udead")})),su=function(t,e){var n=Ys(arguments),r=Ws(e);if(qs(r)||void 0!==t&&!Gs(t))return n[1]=function(t,e){if(qs(r)&&(e=Hs(r,this,Xs(t),e)),!Gs(e))return e},Fs($s,null,n)},uu=function(t,e,n){var r=Qs(n,e-1),i=Qs(n,e+1);return Js(ru,t)&&!Js(iu,i)||Js(iu,t)&&!Js(ru,r)?"\\u"+eu(Zs(t,0),16):t};$s&&js({target:"JSON",stat:!0,arity:3,forced:ou||au},{stringify:function(t,e,n){var r=Ys(arguments),i=Fs(ou?su:$s,null,r);return au&&"string"==typeof i?tu(i,nu,uu):i}});var lu=lo,cu=$t;Mn({target:"Object",stat:!0,forced:!wt||a((function(){lu.f(1)}))},{getOwnPropertySymbols:function(t){var e=lu.f;return e?e(cu(t)):[]}}),Ao("asyncIterator"),Ao("hasInstance"),Ao("isConcatSpreadable"),Ao("iterator"),Ao("match"),Ao("matchAll"),Ao("replace"),Ao("search"),Ao("species"),Ao("split");var fu=Lo;Ao("toPrimitive"),fu();var hu=st,pu=jo;Ao("toStringTag"),pu(hu("Symbol"),"Symbol"),Ao("unscopables"),jo(o.JSON,"JSON",!0);var du,gu,vu,yu=nt.Symbol,mu={},bu=M,wu=Zt,_u=Function.prototype,ku=bu&&Object.getOwnPropertyDescriptor,Eu=wu(_u,"name"),Au={EXISTS:Eu,PROPER:Eu&&"something"===function(){}.name,CONFIGURABLE:Eu&&(!bu||bu&&ku(_u,"name").configurable)},Tu=!a((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Cu=Zt,Su=x,xu=$t,Lu=Tu,Mu=Pi("IE_PROTO"),Ou=Object,Iu=Ou.prototype,Pu=Lu?Ou.getPrototypeOf:function(t){var e=xu(t);if(Cu(e,Mu))return e[Mu];var n=e.constructor;return Su(n)&&e instanceof n?n.prototype:e instanceof Ou?Iu:null},Ru=a,Uu=x,Bu=et,Du=Wi,ju=Pu,Nu=fo,Fu=pe("iterator"),Hu=!1;[].keys&&("next"in(vu=[].keys())?(gu=ju(ju(vu)))!==Object.prototype&&(du=gu):Hu=!0);var zu=!Bu(du)||Ru((function(){var t={};return du[Fu].call(t)!==t}));Uu((du=zu?{}:Du(du))[Fu])||Nu(du,Fu,(function(){return this}));var Vu={IteratorPrototype:du,BUGGY_SAFARI_ITERATORS:Hu},qu=Vu.IteratorPrototype,Gu=Wi,Yu=F,Wu=jo,Ku=mu,Xu=function(){return this},$u=function(t,e,n,r){var i=e+" Iterator";return t.prototype=Gu(qu,{next:Yu(+!r,n)}),Wu(t,i,!1,!0),Ku[i]=Xu,t},Ju=y,Qu=It,Zu=x,tl=String,el=TypeError,nl=function(t,e,n){try{return Ju(Qu(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(r){}},rl=rn,il=function(t){if("object"==typeof t||Zu(t))return t;throw el("Can't set "+tl(t)+" as a prototype")},ol=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=nl(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(r){}return function(n,r){return rl(n),il(r),e?t(n,r):n.__proto__=r,n}}():void 0),al=Mn,sl=P,ul=Au,ll=$u,cl=Pu,fl=jo,hl=fo,pl=mu,dl=Vu,gl=ul.PROPER,vl=dl.BUGGY_SAFARI_ITERATORS,yl=pe("iterator"),ml="keys",bl="values",wl="entries",_l=function(){return this},kl=function(t,e,n,r,i,o,a){ll(n,e,r);var s,u,l,c=function(t){if(t===i&&g)return g;if(!vl&&t in p)return p[t];switch(t){case ml:case bl:case wl:return function(){return new n(this,t)}}return function(){return new n(this)}},f=e+" Iterator",h=!1,p=t.prototype,d=p[yl]||p["@@iterator"]||i&&p[i],g=!vl&&d||c(i),v="Array"==e&&p.entries||d;if(v&&(s=cl(v.call(new t)))!==Object.prototype&&s.next&&(fl(s,f,!0,!0),pl[f]=_l),gl&&i==bl&&d&&d.name!==bl&&(h=!0,g=function(){return sl(d,this)}),i)if(u={values:c(bl),keys:o?g:c(ml),entries:c(wl)},a)for(l in u)(vl||h||!(l in p))&&hl(p,l,u[l]);else al({target:e,proto:!0,forced:vl||h},u);return a&&p[yl]!==g&&hl(p,yl,g,{name:i}),pl[e]=g,u},El=function(t,e){return{value:t,done:e}},Al=Q,Tl=mu,Cl=ta;Qe.f;var Sl=kl,xl=El,Ll="Array Iterator",Ml=Cl.set,Ol=Cl.getterFor(Ll);Sl(Array,"Array",(function(t,e){Ml(this,{type:Ll,target:Al(t),index:0,kind:e})}),(function(){var t=Ol(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,xl(void 0,!0)):xl("keys"==n?r:"values"==n?e[r]:[r,e[r]],!1)}),"values"),Tl.Arguments=Tl.Array;var Il={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},Pl=o,Rl=lr,Ul=mn,Bl=mu,Dl=pe("toStringTag");for(var jl in Il){var Nl=Pl[jl],Fl=Nl&&Nl.prototype;Fl&&Rl(Fl)!==Dl&&Ul(Fl,Dl,jl),Bl[jl]=Bl.Array}var Hl=yu;Ao("dispose");var zl=Hl;Ao("asyncDispose");var Vl=Mn,ql=y,Gl=st("Symbol"),Yl=Gl.keyFor,Wl=ql(Gl.prototype.valueOf);Vl({target:"Symbol",stat:!0},{isRegistered:function(t){try{return void 0!==Yl(Wl(t))}catch(e){return!1}}});for(var Kl=Mn,Xl=Wt,$l=st,Jl=y,Ql=Ct,Zl=pe,tc=$l("Symbol"),ec=tc.isWellKnown,nc=$l("Object","getOwnPropertyNames"),rc=Jl(tc.prototype.valueOf),ic=Xl("wks"),oc=0,ac=nc(tc),sc=ac.length;oc<sc;oc++)try{var uc=ac[oc];Ql(tc[uc])&&Zl(uc)}catch(XM){}Kl({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(t){if(ec&&ec(t))return!0;try{for(var e=rc(t),n=0,r=nc(ic),i=r.length;n<i;n++)if(ic[r[n]]==e)return!0}catch(XM){}return!1}}),Ao("matcher"),Ao("metadataKey"),Ao("observable"),Ao("metadata"),Ao("patternMatch"),Ao("replaceAll");var lc=zl,cc=n(lc),fc=y,hc=Vn,pc=ei,dc=X,gc=fc("".charAt),vc=fc("".charCodeAt),yc=fc("".slice),mc=function(t){return function(e,n){var r,i,o=pc(dc(e)),a=hc(n),s=o.length;return a<0||a>=s?t?"":void 0:(r=vc(o,a))<55296||r>56319||a+1===s||(i=vc(o,a+1))<56320||i>57343?t?gc(o,a):r:t?yc(o,a,a+2):i-56320+(r-55296<<10)+65536}},bc={codeAt:mc(!1),charAt:mc(!0)},wc=bc.charAt,_c=ei,kc=ta,Ec=kl,Ac=El,Tc="String Iterator",Cc=kc.set,Sc=kc.getterFor(Tc);Ec(String,"String",(function(t){Cc(this,{type:Tc,string:_c(t),index:0})}),(function(){var t,e=Sc(this),n=e.string,r=e.index;return r>=n.length?Ac(void 0,!0):(t=wc(n,r),e.index+=t.length,Ac(t,!1))}));var xc=go.f("iterator"),Lc=n(xc);function Mc(t){return(Mc="function"==typeof cc&&"symbol"==typeof Lc?function(t){return typeof t}:function(t){return t&&"function"==typeof cc&&t.constructor===cc&&t!==cc.prototype?"symbol":typeof t})(t)}var Oc=go.f("toPrimitive"),Ic=n(Oc);function Pc(t){var e=function(t,e){if("object"!==Mc(t)||null===t)return t;var n=t[Ic];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Mc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Mc(e)?e:String(e)}function Rc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Dn(t,Pc(r.key),r)}}function Uc(t,e,n){return e&&Rc(t.prototype,e),n&&Rc(t,n),Dn(t,"prototype",{writable:!1}),t}function Bc(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var Dc=Zt,jc=P,Nc=et,Fc=rn,Hc=function(t){return void 0!==t&&(Dc(t,"value")||Dc(t,"writable"))},zc=L,Vc=Pu;Mn({target:"Reflect",stat:!0},{get:function t(e,n){var r,i,o=arguments.length<3?e:arguments[2];return Fc(e)===o?e[n]:(r=zc.f(e,n))?Hc(r)?r.value:void 0===r.get?void 0:jc(r.get,o):Nc(i=Vc(e))?t(i,n,o):void 0}});var qc=nt.Reflect.get,Gc=n(qc),Yc=y,Wc=It,Kc=et,Xc=Zt,$c=Is,Jc=s,Qc=Function,Zc=Yc([].concat),tf=Yc([].join),ef={},nf=Jc?Qc.bind:function(t){var e=Wc(this),n=e.prototype,r=$c(arguments,1),i=function(){var n=Zc(r,$c(arguments));return this instanceof i?function(t,e,n){if(!Xc(ef,e)){for(var r=[],i=0;i<e;i++)r[i]="a["+i+"]";ef[e]=Qc("C,a","return new C("+tf(r,",")+")")}return ef[e](t,n)}(e,n.length,n):e.apply(t,n)};return Kc(n)&&(i.prototype=n),i},rf=nf;Mn({target:"Function",proto:!0,forced:Function.bind!==rf},{bind:rf});var of=nt,af=function(t){return of[t+"Prototype"]},sf=af("Function").bind,uf=ut,lf=sf,cf=Function.prototype,ff=function(t){var e=t.bind;return t===cf||uf(cf,t)&&e===cf.bind?lf:e},hf=n(ff),pf={exports:{}},df=Mn,gf=a,vf=Q,yf=L.f,mf=M;df({target:"Object",stat:!0,forced:!mf||gf((function(){yf(1)})),sham:!mf},{getOwnPropertyDescriptor:function(t,e){return yf(vf(t),e)}});var bf=nt.Object,wf=pf.exports=function(t,e){return bf.getOwnPropertyDescriptor(t,e)};bf.getOwnPropertyDescriptor.sham&&(wf.sham=!0);var _f=pf.exports,kf=n(_f);Mn({target:"Object",stat:!0},{setPrototypeOf:ol});var Ef=nt.Object.setPrototypeOf,Af=n(Ef),Tf=$t,Cf=Pu,Sf=Tu;Mn({target:"Object",stat:!0,forced:a((function(){Cf(1)})),sham:!Sf},{getPrototypeOf:function(t){return Cf(Tf(t))}});var xf=nt.Object.getPrototypeOf,Lf=n(xf);function Mf(t){var e;return(Mf=Af?hf(e=Lf).call(e):function(t){return t.__proto__||Lf(t)})(t)}function Of(){var t;"undefined"!=typeof Reflect&&Gc?Of=hf(t=Gc).call(t):Of=function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Mf(t)););return t}(t,e);if(r){var i=kf(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}};return Of.apply(this,arguments)}Mn({target:"Object",stat:!0,sham:!M},{create:Wi});var If=nt.Object,Pf=function(t,e){return If.create(t,e)},Rf=n(Pf);function Uf(t,e){var n;return(Uf=Af?hf(n=Af).call(n):function(t,e){return t.__proto__=e,t})(t,e)}function Bf(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Rf(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Dn(t,"prototype",{writable:!1}),e&&Uf(t,e)}var Df=Sr,jf=xt,Nf=TypeError,Ff=function(t){if(Df(t))return t;throw Nf(jf(t)+" is not a constructor")},Hf=Mn,zf=h,Vf=nf,qf=Ff,Gf=rn,Yf=et,Wf=Wi,Kf=a,Xf=st("Reflect","construct"),$f=Object.prototype,Jf=[].push,Qf=Kf((function(){function t(){}return!(Xf((function(){}),[],t)instanceof t)})),Zf=!Kf((function(){Xf((function(){}))})),th=Qf||Zf;Hf({target:"Reflect",stat:!0,forced:th,sham:th},{construct:function(t,e){qf(t),Gf(e);var n=arguments.length<3?t:qf(arguments[2]);if(Zf&&!Qf)return Xf(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return zf(Jf,r,e),new(zf(Vf,t,r))}var i=n.prototype,o=Wf(Yf(i)?i:$f),a=zf(t,o,e);return Yf(a)?a:o}});var eh=nt.Reflect.construct,nh=n(eh);function rh(t){var e=function(){if("undefined"==typeof Reflect||!nh)return!1;if(nh.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(nh(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Mf(t);if(e){var i=Mf(this).constructor;n=nh(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===Mc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Bc(t)}(this,n)}}function ih(t,e,n){return(e=Pc(e))in t?Dn(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var oh=af("Array").concat,ah=ut,sh=oh,uh=Array.prototype,lh=n((function(t){var e=t.concat;return t===uh||ah(uh,t)&&e===uh.concat?sh:e})),ch=Mn,fh=ua.findIndex,hh="findIndex",ph=!0;hh in[]&&Array(1)[hh]((function(){ph=!1})),ch({target:"Array",proto:!0,forced:ph},{findIndex:function(t){return fh(this,t,arguments.length>1?arguments[1]:void 0)}});var dh=af("Array").findIndex,gh=ut,vh=dh,yh=Array.prototype,mh=n((function(t){var e=t.findIndex;return t===yh||gh(yh,t)&&e===yh.findIndex?vh:e})),bh="ad_play",wh="ad_pause",_h="ad_time_update",kh="ima_ad_manager_ready",Eh="ima_ad_error",Ah="ima_content_pause_requested",Th="ima_content_resume_requested",Ch="ima_ready_to_play",Sh=nt,xh=h;Sh.JSON||(Sh.JSON={stringify:JSON.stringify});var Lh=function(t,e,n){return xh(Sh.JSON.stringify,null,arguments)},Mh=n(Lh),Oh=n(lc),Ih=lr,Ph=Ut,Rh=Y,Uh=mu,Bh=pe("iterator"),Dh=function(t){if(!Rh(t))return Ph(t,Bh)||Ph(t,"@@iterator")||Uh[Ih(t)]},jh=Dh,Nh=n(jh),Fh=n(jh),Hh=$t,zh=ki;Mn({target:"Object",stat:!0,forced:a((function(){zh(1)}))},{keys:function(t){return zh(Hh(t))}});var Vh=n(nt.Object.keys),qh=n(nt.Object.getOwnPropertySymbols),Gh=ua.filter;Mn({target:"Array",proto:!0,forced:!jr("filter")},{filter:function(t){return Gh(this,t,arguments.length>1?arguments[1]:void 0)}});var Yh=af("Array").filter,Wh=ut,Kh=Yh,Xh=Array.prototype,$h=n((function(t){var e=t.filter;return t===Xh||Wh(Xh,t)&&e===Xh.filter?Kh:e})),Jh=n(_f),Qh=a,Zh=function(t,e){var n=[][t];return!!n&&Qh((function(){n.call(null,e||function(){return 1},1)}))},tp=ua.forEach,ep=Zh("forEach")?[].forEach:function(t){return tp(this,t,arguments.length>1?arguments[1]:void 0)};Mn({target:"Array",proto:!0,forced:[].forEach!=ep},{forEach:ep});var np=af("Array").forEach,rp=lr,ip=Zt,op=ut,ap=np,sp=Array.prototype,up={DOMTokenList:!0,NodeList:!0},lp=n((function(t){var e=t.forEach;return t===sp||op(sp,t)&&e===sp.forEach||ip(up,rp(t))?ap:e})),cp=st,fp=Ki,hp=lo,pp=rn,dp=y([].concat),gp=cp("Reflect","ownKeys")||function(t){var e=fp.f(pp(t)),n=hp.f;return n?dp(e,n(t)):e},vp=gp,yp=Q,mp=L,bp=tr;Mn({target:"Object",stat:!0,sham:!M},{getOwnPropertyDescriptors:function(t){for(var e,n,r=yp(t),i=mp.f,o=vp(r),a={},s=0;o.length>s;)void 0!==(n=i(r,e=o[s++]))&&bp(a,e,n);return a}});var wp=n(nt.Object.getOwnPropertyDescriptors),_p={exports:{}},kp=Mn,Ep=M,Ap=ni.f;kp({target:"Object",stat:!0,forced:Object.defineProperties!==Ap,sham:!Ep},{defineProperties:Ap});var Tp=nt.Object,Cp=_p.exports=function(t,e){return Tp.defineProperties(t,e)};Tp.defineProperties.sham&&(Cp.sham=!0);var Sp=n(_p.exports),xp=n(Bn),Lp=n(Pf),Mp=n(xf),Op=n(Ef),Ip=Zt,Pp=gp,Rp=L,Up=Qe,Bp=et,Dp=mn,jp=Error,Np=y("".replace),Fp=String(jp("zxcasd").stack),Hp=/\n\s*at [^:]*:[^\n]*/,zp=Hp.test(Fp),Vp=F,qp=!a((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",Vp(1,7)),7!==t.stack)})),Gp=mn,Yp=function(t,e){if(zp&&"string"==typeof t&&!jp.prepareStackTrace)for(;e--;)t=Np(t,Hp,"");return t},Wp=qp,Kp=Error.captureStackTrace,Xp=mu,$p=pe("iterator"),Jp=Array.prototype,Qp=function(t){return void 0!==t&&(Xp.Array===t||Jp[$p]===t)},Zp=P,td=It,ed=rn,nd=xt,rd=Dh,id=TypeError,od=function(t,e){var n=arguments.length<2?rd(t):e;if(td(n))return ed(Zp(n,t));throw id(nd(t)+" is not iterable")},ad=P,sd=rn,ud=Ut,ld=function(t,e,n){var r,i;sd(t);try{if(!(r=ud(t,"return"))){if("throw"===e)throw n;return n}r=ad(r,t)}catch(XM){i=!0,r=XM}if("throw"===e)throw n;if(i)throw r;return sd(r),n},cd=Je,fd=P,hd=rn,pd=xt,dd=Qp,gd=Kn,vd=ut,yd=od,md=Dh,bd=ld,wd=TypeError,_d=function(t,e){this.stopped=t,this.result=e},kd=_d.prototype,Ed=function(t,e,n){var r,i,o,a,s,u,l,c=n&&n.that,f=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),p=!(!n||!n.IS_ITERATOR),d=!(!n||!n.INTERRUPTED),g=cd(e,c),v=function(t){return r&&bd(r,"normal",t),new _d(!0,t)},y=function(t){return f?(hd(t),d?g(t[0],t[1],v):g(t[0],t[1])):d?g(t,v):g(t)};if(h)r=t.iterator;else if(p)r=t;else{if(!(i=md(t)))throw wd(pd(t)+" is not iterable");if(dd(i)){for(o=0,a=gd(t);a>o;o++)if((s=y(t[o]))&&vd(kd,s))return s;return new _d(!1)}r=yd(t,i)}for(u=h?t.next:r.next;!(l=fd(u,r)).done;){try{s=y(l.value)}catch(XM){bd(r,"throw",XM)}if("object"==typeof s&&s&&vd(kd,s))return s}return new _d(!1)},Ad=ei,Td=Mn,Cd=ut,Sd=Pu,xd=ol,Ld=function(t,e,n){for(var r=Pp(e),i=Up.f,o=Rp.f,a=0;a<r.length;a++){var s=r[a];Ip(t,s)||n&&Ip(n,s)||i(t,s,o(e,s))}},Md=Wi,Od=mn,Id=F,Pd=function(t,e){Bp(e)&&"cause"in e&&Dp(t,"cause",e.cause)},Rd=function(t,e,n,r){Wp&&(Kp?Kp(t,e):Gp(t,"stack",Yp(n,r)))},Ud=Ed,Bd=function(t,e){return void 0===t?arguments.length<2?"":e:Ad(t)},Dd=pe("toStringTag"),jd=Error,Nd=[].push,Fd=function(t,e){var n,r=Cd(Hd,this);xd?n=xd(jd(),r?Sd(this):Hd):(n=r?this:Md(Hd),Od(n,Dd,"Error")),void 0!==e&&Od(n,"message",Bd(e)),Rd(n,Fd,n.stack,1),arguments.length>2&&Pd(n,arguments[2]);var i=[];return Ud(t,Nd,{that:i}),Od(n,"errors",i),n};xd?xd(Fd,jd):Ld(Fd,jd,{name:!0});var Hd=Fd.prototype=Md(jd.prototype,{constructor:Id(1,Fd),message:Id(1,""),name:Id(1,"AggregateError")});Td({global:!0,constructor:!0,arity:2},{AggregateError:Fd});var zd,Vd,qd,Gd,Yd="undefined"!=typeof process&&"process"==_(process),Wd=st,Kd=po,Xd=M,$d=pe("species"),Jd=ut,Qd=TypeError,Zd=function(t,e){if(Jd(e,t))return t;throw Qd("Incorrect invocation")},tg=rn,eg=Ff,ng=Y,rg=pe("species"),ig=function(t,e){var n,r=tg(t).constructor;return void 0===r||ng(n=tg(r)[rg])?e:eg(n)},og=TypeError,ag=function(t,e){if(t<e)throw og("Not enough arguments");return t},sg=/(?:ipad|iphone|ipod).*applewebkit/i.test(lt),ug=o,lg=h,cg=Je,fg=x,hg=Zt,pg=a,dg=Mi,gg=Is,vg=Se,yg=ag,mg=sg,bg=Yd,wg=ug.setImmediate,_g=ug.clearImmediate,kg=ug.process,Eg=ug.Dispatch,Ag=ug.Function,Tg=ug.MessageChannel,Cg=ug.String,Sg=0,xg={},Lg="onreadystatechange";pg((function(){zd=ug.location}));var Mg=function(t){if(hg(xg,t)){var e=xg[t];delete xg[t],e()}},Og=function(t){return function(){Mg(t)}},Ig=function(t){Mg(t.data)},Pg=function(t){ug.postMessage(Cg(t),zd.protocol+"//"+zd.host)};wg&&_g||(wg=function(t){yg(arguments.length,1);var e=fg(t)?t:Ag(t),n=gg(arguments,1);return xg[++Sg]=function(){lg(e,void 0,n)},Vd(Sg),Sg},_g=function(t){delete xg[t]},bg?Vd=function(t){kg.nextTick(Og(t))}:Eg&&Eg.now?Vd=function(t){Eg.now(Og(t))}:Tg&&!mg?(Gd=(qd=new Tg).port2,qd.port1.onmessage=Ig,Vd=cg(Gd.postMessage,Gd)):ug.addEventListener&&fg(ug.postMessage)&&!ug.importScripts&&zd&&"file:"!==zd.protocol&&!pg(Pg)?(Vd=Pg,ug.addEventListener("message",Ig,!1)):Vd=Lg in vg("script")?function(t){dg.appendChild(vg("script"))[Lg]=function(){dg.removeChild(this),Mg(t)}}:function(t){setTimeout(Og(t),0)});var Rg={set:wg,clear:_g},Ug=function(){this.head=null,this.tail=null};Ug.prototype={add:function(t){var e={item:t,next:null},n=this.tail;n?n.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var Bg,Dg,jg,Ng,Fg,Hg=Ug,zg=/ipad|iphone|ipod/i.test(lt)&&"undefined"!=typeof Pebble,Vg=/web0s(?!.*chrome)/i.test(lt),qg=o,Gg=Je,Yg=L.f,Wg=Rg.set,Kg=Hg,Xg=sg,$g=zg,Jg=Vg,Qg=Yd,Zg=qg.MutationObserver||qg.WebKitMutationObserver,tv=qg.document,ev=qg.process,nv=qg.Promise,rv=Yg(qg,"queueMicrotask"),iv=rv&&rv.value;if(!iv){var ov=new Kg,av=function(){var t,e;for(Qg&&(t=ev.domain)&&t.exit();e=ov.get();)try{e()}catch(XM){throw ov.head&&Bg(),XM}t&&t.enter()};Xg||Qg||Jg||!Zg||!tv?!$g&&nv&&nv.resolve?((Ng=nv.resolve(void 0)).constructor=nv,Fg=Gg(Ng.then,Ng),Bg=function(){Fg(av)}):Qg?Bg=function(){ev.nextTick(av)}:(Wg=Gg(Wg,qg),Bg=function(){Wg(av)}):(Dg=!0,jg=tv.createTextNode(""),new Zg(av).observe(jg,{characterData:!0}),Bg=function(){jg.data=Dg=!Dg}),iv=function(t){ov.head||Bg(),ov.add(t)}}var sv=iv,uv=function(t){try{return{error:!1,value:t()}}catch(XM){return{error:!0,value:XM}}},lv=o.Promise,cv="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,fv=!cv&&!Yd&&"object"==typeof window&&"object"==typeof document,hv=o,pv=lv,dv=x,gv=We,vv=pr,yv=pe,mv=fv,bv=cv,wv=vt,_v=pv&&pv.prototype,kv=yv("species"),Ev=!1,Av=dv(hv.PromiseRejectionEvent),Tv={CONSTRUCTOR:gv("Promise",(function(){var t=vv(pv),e=t!==String(pv);if(!e&&66===wv)return!0;if(!_v.catch||!_v.finally)return!0;if(!wv||wv<51||!/native code/.test(t)){var n=new pv((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[kv]=r,!(Ev=n.then((function(){}))instanceof r))return!0}return!e&&(mv||bv)&&!Av})),REJECTION_EVENT:Av,SUBCLASSING:Ev},Cv={},Sv=It,xv=TypeError,Lv=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw xv("Bad Promise constructor");e=t,n=r})),this.resolve=Sv(e),this.reject=Sv(n)};Cv.f=function(t){return new Lv(t)};var Mv,Ov,Iv=Mn,Pv=Yd,Rv=o,Uv=P,Bv=fo,Dv=jo,jv=function(t){var e=Wd(t);Xd&&e&&!e[$d]&&Kd(e,$d,{configurable:!0,get:function(){return this}})},Nv=It,Fv=x,Hv=et,zv=Zd,Vv=ig,qv=Rg.set,Gv=sv,Yv=function(t,e){try{1==arguments.length?console.error(t):console.error(t,e)}catch(XM){}},Wv=uv,Kv=Hg,Xv=ta,$v=lv,Jv=Tv,Qv=Cv,Zv="Promise",ty=Jv.CONSTRUCTOR,ey=Jv.REJECTION_EVENT,ny=Xv.getterFor(Zv),ry=Xv.set,iy=$v&&$v.prototype,oy=$v,ay=iy,sy=Rv.TypeError,uy=Rv.document,ly=Rv.process,cy=Qv.f,fy=cy,hy=!!(uy&&uy.createEvent&&Rv.dispatchEvent),py="unhandledrejection",dy=function(t){var e;return!(!Hv(t)||!Fv(e=t.then))&&e},gy=function(t,e){var n,r,i,o=e.value,a=1==e.state,s=a?t.ok:t.fail,u=t.resolve,l=t.reject,c=t.domain;try{s?(a||(2===e.rejection&&wy(e),e.rejection=1),!0===s?n=o:(c&&c.enter(),n=s(o),c&&(c.exit(),i=!0)),n===t.promise?l(sy("Promise-chain cycle")):(r=dy(n))?Uv(r,n,u,l):u(n)):l(o)}catch(XM){c&&!i&&c.exit(),l(XM)}},vy=function(t,e){t.notified||(t.notified=!0,Gv((function(){for(var n,r=t.reactions;n=r.get();)gy(n,t);t.notified=!1,e&&!t.rejection&&my(t)})))},yy=function(t,e,n){var r,i;hy?((r=uy.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),Rv.dispatchEvent(r)):r={promise:e,reason:n},!ey&&(i=Rv["on"+t])?i(r):t===py&&Yv("Unhandled promise rejection",n)},my=function(t){Uv(qv,Rv,(function(){var e,n=t.facade,r=t.value;if(by(t)&&(e=Wv((function(){Pv?ly.emit("unhandledRejection",r,n):yy(py,n,r)})),t.rejection=Pv||by(t)?2:1,e.error))throw e.value}))},by=function(t){return 1!==t.rejection&&!t.parent},wy=function(t){Uv(qv,Rv,(function(){var e=t.facade;Pv?ly.emit("rejectionHandled",e):yy("rejectionhandled",e,t.value)}))},_y=function(t,e,n){return function(r){t(e,r,n)}},ky=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,vy(t,!0))},Ey=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw sy("Promise can't be resolved itself");var r=dy(e);r?Gv((function(){var n={done:!1};try{Uv(r,e,_y(Ey,n,t),_y(ky,n,t))}catch(XM){ky(n,XM,t)}})):(t.value=e,t.state=1,vy(t,!1))}catch(XM){ky({done:!1},XM,t)}}};ty&&(ay=(oy=function(t){zv(this,ay),Nv(t),Uv(Mv,this);var e=ny(this);try{t(_y(Ey,e),_y(ky,e))}catch(XM){ky(e,XM)}}).prototype,(Mv=function(t){ry(this,{type:Zv,done:!1,notified:!1,parent:!1,reactions:new Kv,rejection:!1,state:0,value:void 0})}).prototype=Bv(ay,"then",(function(t,e){var n=ny(this),r=cy(Vv(this,oy));return n.parent=!0,r.ok=!Fv(t)||t,r.fail=Fv(e)&&e,r.domain=Pv?ly.domain:void 0,0==n.state?n.reactions.add(r):Gv((function(){gy(r,n)})),r.promise})),Ov=function(){var t=new Mv,e=ny(t);this.promise=t,this.resolve=_y(Ey,e),this.reject=_y(ky,e)},Qv.f=cy=function(t){return t===oy||undefined===t?new Ov(t):fy(t)}),Iv({global:!0,constructor:!0,wrap:!0,forced:ty},{Promise:oy}),Dv(oy,Zv,!1,!0),jv(Zv);var Ay=pe("iterator"),Ty=!1;try{var Cy=0,Sy={next:function(){return{done:!!Cy++}},return:function(){Ty=!0}};Sy[Ay]=function(){return this},Array.from(Sy,(function(){throw 2}))}catch(XM){}var xy=function(t,e){if(!e&&!Ty)return!1;var n=!1;try{var r={};r[Ay]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(XM){}return n},Ly=lv,My=Tv.CONSTRUCTOR||!xy((function(t){Ly.all(t).then(void 0,(function(){}))})),Oy=P,Iy=It,Py=Cv,Ry=uv,Uy=Ed;Mn({target:"Promise",stat:!0,forced:My},{all:function(t){var e=this,n=Py.f(e),r=n.resolve,i=n.reject,o=Ry((function(){var n=Iy(e.resolve),o=[],a=0,s=1;Uy(t,(function(t){var u=a++,l=!1;s++,Oy(n,e,t).then((function(t){l||(l=!0,o[u]=t,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise}});var By=Mn,Dy=Tv.CONSTRUCTOR;lv&&lv.prototype,By({target:"Promise",proto:!0,forced:Dy,real:!0},{catch:function(t){return this.then(void 0,t)}});var jy=P,Ny=It,Fy=Cv,Hy=uv,zy=Ed;Mn({target:"Promise",stat:!0,forced:My},{race:function(t){var e=this,n=Fy.f(e),r=n.reject,i=Hy((function(){var i=Ny(e.resolve);zy(t,(function(t){jy(i,e,t).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var Vy=P,qy=Cv;Mn({target:"Promise",stat:!0,forced:Tv.CONSTRUCTOR},{reject:function(t){var e=qy.f(this);return Vy(e.reject,void 0,t),e.promise}});var Gy=rn,Yy=et,Wy=Cv,Ky=function(t,e){if(Gy(t),Yy(e)&&e.constructor===t)return e;var n=Wy.f(t);return(0,n.resolve)(e),n.promise},Xy=Mn,$y=lv,Jy=Tv.CONSTRUCTOR,Qy=Ky,Zy=st("Promise"),tm=!Jy;Xy({target:"Promise",stat:!0,forced:true},{resolve:function(t){return Qy(tm&&this===Zy?$y:this,t)}});var em=P,nm=It,rm=Cv,im=uv,om=Ed;Mn({target:"Promise",stat:!0,forced:My},{allSettled:function(t){var e=this,n=rm.f(e),r=n.resolve,i=n.reject,o=im((function(){var n=nm(e.resolve),i=[],o=0,a=1;om(t,(function(t){var s=o++,u=!1;a++,em(n,e,t).then((function(t){u||(u=!0,i[s]={status:"fulfilled",value:t},--a||r(i))}),(function(t){u||(u=!0,i[s]={status:"rejected",reason:t},--a||r(i))}))})),--a||r(i)}));return o.error&&i(o.value),n.promise}});var am=P,sm=It,um=st,lm=Cv,cm=uv,fm=Ed,hm="No one promise resolved";Mn({target:"Promise",stat:!0,forced:My},{any:function(t){var e=this,n=um("AggregateError"),r=lm.f(e),i=r.resolve,o=r.reject,a=cm((function(){var r=sm(e.resolve),a=[],s=0,u=1,l=!1;fm(t,(function(t){var c=s++,f=!1;u++,am(r,e,t).then((function(t){f||l||(l=!0,i(t))}),(function(t){f||l||(f=!0,a[c]=t,--u||o(new n(a,hm)))}))})),--u||o(new n(a,hm))}));return a.error&&o(a.value),r.promise}});var pm=Mn,dm=lv,gm=a,vm=st,ym=x,mm=ig,bm=Ky,wm=dm&&dm.prototype;pm({target:"Promise",proto:!0,real:!0,forced:!!dm&&gm((function(){wm.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=mm(this,vm("Promise")),n=ym(t);return this.then(n?function(n){return bm(e,t()).then((function(){return n}))}:t,n?function(n){return bm(e,t()).then((function(){throw n}))}:t)}});var _m=nt.Promise,km=Cv,Em=uv;Mn({target:"Promise",stat:!0,forced:!0},{try:function(t){var e=km.f(this),n=Em(t);return(n.error?e.reject:e.resolve)(n.value),e.promise}});var Am=n(_m),Tm=Mn,Cm=Nn,Sm=y([].reverse),xm=[1,2];Tm({target:"Array",proto:!0,forced:String(xm)===String(xm.reverse())},{reverse:function(){return Cm(this)&&(this.length=this.length),Sm(this)}});var Lm=af("Array").reverse,Mm=ut,Om=Lm,Im=Array.prototype,Pm=n((function(t){var e=t.reverse;return t===Im||Mm(Im,t)&&e===Im.reverse?Om:e})),Rm=Mn,Um=Nn,Bm=Sr,Dm=et,jm=ai,Nm=Kn,Fm=Q,Hm=tr,zm=pe,Vm=Is,qm=jr("slice"),Gm=zm("species"),Ym=Array,Wm=Math.max;Rm({target:"Array",proto:!0,forced:!qm},{slice:function(t,e){var n,r,i,o=Fm(this),a=Nm(o),s=jm(t,a),u=jm(void 0===e?a:e,a);if(Um(o)&&(n=o.constructor,(Bm(n)&&(n===Ym||Um(n.prototype))||Dm(n)&&null===(n=n[Gm]))&&(n=void 0),n===Ym||void 0===n))return Vm(o,s,u);for(r=new(void 0===n?Ym:n)(Wm(u-s,0)),i=0;s<u;s++,i++)s in o&&Hm(r,i,o[s]);return r.length=i,r}});var Km=af("Array").slice,Xm=ut,$m=Km,Jm=Array.prototype,Qm=function(t){var e=t.slice;return t===Jm||Xm(Jm,t)&&e===Jm.slice?$m:e},Zm=n(Qm),tb=n(Qm),eb=n(xc),nb=n(ff),rb=n(eh),ib=n(qc);Mn({target:"Array",stat:!0},{isArray:Nn});var ob=nt.Array.isArray,ab=n(ob),sb=n(ob),ub=rn,lb=ld,cb=Je,fb=P,hb=$t,pb=function(t,e,n,r){try{return r?e(ub(n)[0],n[1]):e(n)}catch(XM){lb(t,"throw",XM)}},db=Qp,gb=Sr,vb=Kn,yb=tr,mb=od,bb=Dh,wb=Array,_b=function(t){var e=hb(t),n=gb(this),r=arguments.length,i=r>1?arguments[1]:void 0,o=void 0!==i;o&&(i=cb(i,r>2?arguments[2]:void 0));var a,s,u,l,c,f,h=bb(e),p=0;if(!h||this===wb&&db(h))for(a=vb(e),s=n?new this(a):wb(a);a>p;p++)f=o?i(e[p],p):e[p],yb(s,p,f);else for(c=(l=mb(e,h)).next,s=n?new this:[];!(u=fb(c,l)).done;p++)f=o?pb(l,i,[u.value,p],!0):u.value,yb(s,p,f);return s.length=p,s},kb=_b;Mn({target:"Array",stat:!0,forced:!xy((function(t){Array.from(t)}))},{from:kb});var Eb=nt.Array.from,Ab=n(Eb),Tb=n(Eb),Cb=n(Oc);function Sb(t,e){var n=Vh(t);if(qh){var r=qh(t);e&&(r=$h(r).call(r,(function(e){return Jh(t,e).enumerable}))),n.push.apply(n,r)}return n}function xb(t){for(var e=1;e<arguments.length;e++){var n,r,i=null!=arguments[e]?arguments[e]:{};e%2?lp(n=Sb(Object(i),!0)).call(n,(function(e){Bb(t,e,i[e])})):wp?Sp(t,wp(i)):lp(r=Sb(Object(i))).call(r,(function(e){xp(t,e,Jh(i,e))}))}return t}function Lb(){Lb=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=xp||function(t,e,n){t[e]=n.value},i="function"==typeof Oh?Oh:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return xp(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(S){u=function(t,e,n){return t[e]=n}}function l(t,e,n,i){var o=e&&e.prototype instanceof h?e:h,a=Lp(o.prototype),s=new A(i||[]);return r(a,"_invoke",{value:w(t,n,s)}),a}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(S){return{type:"throw",arg:S}}}t.wrap=l;var f={};function h(){}function p(){}function d(){}var g={};u(g,o,(function(){return this}));var v=Mp&&Mp(Mp(T([])));v&&v!==e&&n.call(v,o)&&(g=v);var y=d.prototype=h.prototype=Lp(g);function m(t){var e;lp(e=["next","throw","return"]).call(e,(function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(r,o,a,s){var u=c(t[r],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==Mc(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){i("next",t,a,s)}),(function(t){i("throw",t,a,s)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return i("throw",t,a,s)}))}s(u.arg)}var o;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){i(t,n,e,r)}))}return o=o?o.then(r,r):r()}})}function w(t,e,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=_(a,n);if(s){if(s===f)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 u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function _(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=c(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],lp(t).call(t,k,this),this.reset(!0)}function T(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return p.prototype=d,r(y,"constructor",{value:d,configurable:!0}),r(d,"constructor",{value:p,configurable:!0}),p.displayName=u(d,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Op?Op(t,d):(t.__proto__=d,u(t,s,"GeneratorFunction")),t.prototype=Lp(y),t},t.awrap=function(t){return{__await:t}},m(b.prototype),u(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Am);var a=new b(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(y),u(y,s,"Generator"),u(y,o,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return Pm(n).call(n),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=T,A.prototype={constructor:A,reset:function(t){var e;if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,lp(e=this.tryEntries).call(e,E),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+tb(r).call(r,1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.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"),u=n.call(o,"finallyLoc");if(s&&u){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(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){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"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:T(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function Mb(t){return(Mb="function"==typeof Oh&&"symbol"==typeof eb?function(t){return typeof t}:function(t){return t&&"function"==typeof Oh&&t.constructor===Oh&&t!==Oh.prototype?"symbol":typeof t})(t)}function Ob(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(XM){return void n(XM)}s.done?e(u):Am.resolve(u).then(r,i)}function Ib(t){return function(){var e=this,n=arguments;return new Am((function(r,i){var o=t.apply(e,n);function a(t){Ob(o,r,i,a,s,"next",t)}function s(t){Ob(o,r,i,a,s,"throw",t)}a(void 0)}))}}function Pb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rb(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),xp(t,Gb(r.key),r)}}function Ub(t,e,n){return e&&Rb(t.prototype,e),n&&Rb(t,n),xp(t,"prototype",{writable:!1}),t}function Bb(t,e,n){return(e=Gb(e))in t?xp(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Db(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Lp(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),xp(t,"prototype",{writable:!1}),e&&Nb(t,e)}function jb(t){var e;return(jb=Op?nb(e=Mp).call(e):function(t){return t.__proto__||Mp(t)})(t)}function Nb(t,e){var n;return(Nb=Op?nb(n=Op).call(n):function(t,e){return t.__proto__=e,t})(t,e)}function Fb(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Hb(t){var e=function(){if("undefined"==typeof Reflect||!rb)return!1;if(rb.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(rb(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=jb(t);if(e){var i=jb(this).constructor;n=rb(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===Mc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Fb(t)}(this,n)}}function zb(){var t;"undefined"!=typeof Reflect&&ib?zb=nb(t=ib).call(t):zb=function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=jb(t)););return t}(t,e);if(r){var i=Jh(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}};return zb.apply(this,arguments)}function Vb(t,e){return function(t){if(sb(t))return t}(t)||function(t,e){var n=null==t?null:void 0!==Oh&&Fh(t)||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(c){l=!0,i=c}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(t,e)||function(t,e){var n;if(!t)return;if("string"==typeof t)return qb(t,e);var r=tb(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Tb(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return qb(t,e)}(t,e)||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.")}()}function qb(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Gb(t){var e=function(t,e){if("object"!==Mc(t)||null===t)return t;var n=t[Cb];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Mc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Mc(e)?e:String(e)}var Yb=Mn,Wb=fi.indexOf,Kb=Zh,Xb=A([].indexOf),$b=!!Xb&&1/Xb([1],1,-0)<0;Yb({target:"Array",proto:!0,forced:$b||!Kb("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return $b?Xb(this,t,e)||0:Wb(this,t,e)}});var Jb=af("Array").indexOf,Qb=ut,Zb=Jb,tw=Array.prototype,ew=n((function(t){var e=t.indexOf;return t===tw||Qb(tw,t)&&e===tw.indexOf?Zb:e})),nw=Mn,rw=ua.find,iw="find",ow=!0;iw in[]&&Array(1)[iw]((function(){ow=!1})),nw({target:"Array",proto:!0,forced:ow},{find:function(t){return rw(this,t,arguments.length>1?arguments[1]:void 0)}});var aw=af("Array").find,sw=ut,uw=aw,lw=Array.prototype,cw=n((function(t){var e=t.find;return t===lw||sw(lw,t)&&e===lw.find?uw:e})),fw=M,hw=Nn,pw=TypeError,dw=Object.getOwnPropertyDescriptor,gw=fw&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(XM){return XM instanceof TypeError}}(),vw=xt,yw=TypeError,mw=function(t,e){if(!delete t[e])throw yw("Cannot delete property "+vw(e)+" of "+vw(t))},bw=Mn,ww=$t,_w=ai,kw=Vn,Ew=Kn,Aw=gw?function(t,e){if(hw(t)&&!dw(t,"length").writable)throw pw("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e},Tw=$n,Cw=Rr,Sw=tr,xw=mw,Lw=jr("splice"),Mw=Math.max,Ow=Math.min;bw({target:"Array",proto:!0,forced:!Lw},{splice:function(t,e){var n,r,i,o,a,s,u=ww(this),l=Ew(u),c=_w(t,l),f=arguments.length;for(0===f?n=r=0:1===f?(n=0,r=l-c):(n=f-2,r=Ow(Mw(kw(e),0),l-c)),Tw(l+n-r),i=Cw(u,r),o=0;o<r;o++)(a=c+o)in u&&Sw(i,o,u[a]);if(i.length=r,n<r){for(o=c;o<l-r;o++)s=o+n,(a=o+r)in u?u[s]=u[a]:xw(u,s);for(o=l;o>l-r+n;o--)xw(u,o-1)}else if(n>r)for(o=l-r;o>c;o--)s=o+n-1,(a=o+r-1)in u?u[s]=u[a]:xw(u,s);for(o=0;o<n;o++)u[o+c]=arguments[o+2];return Aw(u,l-r+n),i}});var Iw=af("Array").splice,Pw=ut,Rw=Iw,Uw=Array.prototype,Bw=n((function(t){var e=t.splice;return t===Uw||Pw(Uw,t)&&e===Uw.splice?Rw:e})),Dw="\t\n\v\f\r \u2028\u2029\ufeff",jw=X,Nw=ei,Fw=Dw,Hw=y("".replace),zw=RegExp("^["+Fw+"]+"),Vw=RegExp("(^|[^"+Fw+"])["+Fw+"]+$"),qw=function(t){return function(e){var n=Nw(jw(e));return 1&t&&(n=Hw(n,zw,"")),2&t&&(n=Hw(n,Vw,"$1")),n}},Gw={start:qw(1),end:qw(2),trim:qw(3)},Yw=o,Ww=a,Kw=y,Xw=ei,$w=Gw.trim,Jw=Dw,Qw=Yw.parseInt,Zw=Yw.Symbol,t_=Zw&&Zw.iterator,e_=/^[+-]?0x/i,n_=Kw(e_.exec),r_=8!==Qw(Jw+"08")||22!==Qw(Jw+"0x16")||t_&&!Ww((function(){Qw(Object(t_))}))?function(t,e){var n=$w(Xw(t));return Qw(n,e>>>0||(n_(e_,n)?16:10))}:Qw;Mn({global:!0,forced:parseInt!=r_},{parseInt:r_});var i_=n(nt.parseInt),o_=ua.map;Mn({target:"Array",proto:!0,forced:!jr("map")},{map:function(t){return o_(this,t,arguments.length>1?arguments[1]:void 0)}});var a_=af("Array").map,s_=ut,u_=a_,l_=Array.prototype,c_=n((function(t){var e=t.map;return t===l_||s_(l_,t)&&e===l_.map?u_:e})),f_=M,h_=y,p_=P,d_=a,g_=ki,v_=lo,y_=R,m_=$t,b_=G,w_=Object.assign,__=Object.defineProperty,k_=h_([].concat),E_=!w_||d_((function(){if(f_&&1!==w_({b:1},w_(__({},"a",{enumerable:!0,get:function(){__(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=w_({},t)[n]||g_(w_({},e)).join("")!=r}))?function(t,e){for(var n=m_(t),r=arguments.length,i=1,o=v_.f,a=y_.f;r>i;)for(var s,u=b_(arguments[i++]),l=o?k_(g_(u),o(u)):g_(u),c=l.length,f=0;c>f;)s=l[f++],f_&&!p_(a,u,s)||(n[s]=u[s]);return n}:w_,A_=E_;Mn({target:"Object",stat:!0,arity:2,forced:Object.assign!==A_},{assign:A_});var T_=n(nt.Object.assign);function C_(t,e){var n=Vh(t);if(qh){var r=qh(t);e&&(r=$h(r).call(r,(function(e){return Jh(t,e).enumerable}))),n.push.apply(n,r)}return n}function S_(t){for(var e=1;e<arguments.length;e++){var n,r,i=null!=arguments[e]?arguments[e]:{};e%2?lp(n=C_(Object(i),!0)).call(n,(function(e){I_(t,e,i[e])})):wp?Sp(t,wp(i)):lp(r=C_(Object(i))).call(r,(function(e){xp(t,e,Jh(i,e))}))}return t}function x_(t){return(x_="function"==typeof Oh&&"symbol"==typeof eb?function(t){return typeof t}:function(t){return t&&"function"==typeof Oh&&t.constructor===Oh&&t!==Oh.prototype?"symbol":typeof t})(t)}function L_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function M_(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),xp(t,H_(r.key),r)}}function O_(t,e,n){return e&&M_(t.prototype,e),n&&M_(t,n),xp(t,"prototype",{writable:!1}),t}function I_(t,e,n){return(e=H_(e))in t?xp(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function P_(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Lp(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),xp(t,"prototype",{writable:!1}),e&&U_(t,e)}function R_(t){var e;return(R_=Op?nb(e=Mp).call(e):function(t){return t.__proto__||Mp(t)})(t)}function U_(t,e){var n;return(U_=Op?nb(n=Op).call(n):function(t,e){return t.__proto__=e,t})(t,e)}function B_(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function D_(t){var e=function(){if("undefined"==typeof Reflect||!rb)return!1;if(rb.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(rb(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=R_(t);if(e){var i=R_(this).constructor;n=rb(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===Mc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return B_(t)}(this,n)}}function j_(){var t;"undefined"!=typeof Reflect&&ib?j_=nb(t=ib).call(t):j_=function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=R_(t)););return t}(t,e);if(r){var i=Jh(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}};return j_.apply(this,arguments)}function N_(t){return function(t){if(sb(t))return F_(t)}(t)||function(t){if(void 0!==Oh&&null!=Fh(t)||null!=t["@@iterator"])return Tb(t)}(t)||function(t,e){var n;if(!t)return;if("string"==typeof t)return F_(t,e);var r=tb(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Tb(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return F_(t,e)}(t)||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 F_(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function H_(t){var e=function(t,e){if("object"!==Mc(t)||null===t)return t;var n=t[Cb];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Mc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Mc(e)?e:String(e)}var z_={exports:{}};!function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}function i(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function o(t,e,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||t,a),u=n?n+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],s]:t._events[u].push(s):(t._events[u]=s,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function s(){this._events=new r,this._eventsCount=0}Lp&&(r.prototype=Lp(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var t,r,i=[];if(0===this._eventsCount)return i;for(r in t=this._events)e.call(t,r)&&i.push(n?tb(r).call(r,1):r);return qh?lh(i).call(i,qh(t)):i},s.prototype.listeners=function(t){var e=n?n+t:t,r=this._events[e];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(t){var e=n?n+t:t,r=this._events[e];return r?r.fn?1:r.length:0},s.prototype.emit=function(t,e,r,i,o,a){var s=n?n+t:t;if(!this._events[s])return!1;var u,l,c=this._events[s],f=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),f){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,r),!0;case 4:return c.fn.call(c.context,e,r,i),!0;case 5:return c.fn.call(c.context,e,r,i,o),!0;case 6:return c.fn.call(c.context,e,r,i,o,a),!0}for(l=1,u=new Array(f-1);l<f;l++)u[l-1]=arguments[l];c.fn.apply(c.context,u)}else{var h,p=c.length;for(l=0;l<p;l++)switch(c[l].once&&this.removeListener(t,c[l].fn,void 0,!0),f){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,e);break;case 3:c[l].fn.call(c[l].context,e,r);break;case 4:c[l].fn.call(c[l].context,e,r,i);break;default:if(!u)for(h=1,u=new Array(f-1);h<f;h++)u[h-1]=arguments[h];c[l].fn.apply(c[l].context,u)}}return!0},s.prototype.on=function(t,e,n){return o(this,t,e,n,!1)},s.prototype.once=function(t,e,n){return o(this,t,e,n,!0)},s.prototype.removeListener=function(t,e,r,i){var o=n?n+t:t;if(!this._events[o])return this;if(!e)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==e||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var u=0,l=[],c=s.length;u<c;u++)(s[u].fn!==e||i&&!s[u].once||r&&s[u].context!==r)&&l.push(s[u]);l.length?this._events[o]=1===l.length?l[0]:l:a(this,o)}return this},s.prototype.removeAllListeners=function(t){var e;return t?(e=n?n+t:t,this._events[e]&&a(this,e)):(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,t.exports=s}(z_);var V_=z_.exports,q_=ua.some;Mn({target:"Array",proto:!0,forced:!Zh("some")},{some:function(t){return q_(this,t,arguments.length>1?arguments[1]:void 0)}});var G_=af("Array").some,Y_=ut,W_=G_,K_=Array.prototype,X_=n((function(t){var e=t.some;return t===K_||Y_(K_,t)&&e===K_.some?W_:e})),$_=Vn,J_=ei,Q_=X,Z_=RangeError,tk=y,ek=Yn,nk=ei,rk=X,ik=tk((function(t){var e=J_(Q_(this)),n="",r=$_(t);if(r<0||r==1/0)throw Z_("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(e+=e))1&r&&(n+=e);return n})),ok=tk("".slice),ak=Math.ceil,sk=function(t){return function(e,n,r){var i,o,a=nk(rk(e)),s=ek(n),u=a.length,l=void 0===r?" ":nk(r);return s<=u||""==l?a:((o=ik(l,ak((i=s-u)/l.length))).length>i&&(o=ok(o,0,i)),t?a+o:o+a)}},uk={start:sk(!1),end:sk(!0)},lk=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(lt),ck=uk.start;Mn({target:"String",proto:!0,forced:lk},{padStart:function(t){return ck(this,t,arguments.length>1?arguments[1]:void 0)}});var fk,hk=af("String").padStart,pk=ut,dk=hk,gk=String.prototype,vk=n((function(t){var e=t.padStart;return"string"==typeof t||t===gk||pk(gk,t)&&e===gk.padStart?dk:e})),yk="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,mk=o,bk=h,wk=x,_k=yk,kk=lt,Ek=Is,Ak=ag,Tk=mk.Function,Ck=/MSIE .\./.test(kk)||_k&&((fk=mk.Bun.version.split(".")).length<3||0==fk[0]&&(fk[1]<3||3==fk[1]&&0==fk[2])),Sk=function(t,e){var n=e?2:1;return Ck?function(r,i){var o=Ak(arguments.length,1)>n,a=wk(r)?r:Tk(r),s=o?Ek(arguments,n):[],u=o?function(){bk(a,this,s)}:a;return e?t(u,i):t(u)}:t},xk=Mn,Lk=o,Mk=Sk(Lk.setInterval,!0);xk({global:!0,bind:!0,forced:Lk.setInterval!==Mk},{setInterval:Mk});var Ok=Mn,Ik=o,Pk=Sk(Ik.setTimeout,!0);Ok({global:!0,bind:!0,forced:Ik.setTimeout!==Pk},{setTimeout:Pk});var Rk=n(nt.setInterval),Uk=n(nt.setTimeout),Bk=ua.every;Mn({target:"Array",proto:!0,forced:!Zh("every")},{every:function(t){return Bk(this,t,arguments.length>1?arguments[1]:void 0)}});var Dk=af("Array").every,jk=ut,Nk=Dk,Fk=Array.prototype,Hk=n((function(t){var e=t.every;return t===Fk||jk(Fk,t)&&e===Fk.every?Nk:e})),zk=o,Vk=a,qk=ei,Gk=Gw.trim,Yk=Dw,Wk=y("".charAt),Kk=zk.parseFloat,Xk=zk.Symbol,$k=Xk&&Xk.iterator,Jk=1/Kk(Yk+"-0")!=-1/0||$k&&!Vk((function(){Kk(Object($k))}))?function(t){var e=Gk(qk(t)),n=Kk(e);return 0===n&&"-"==Wk(e,0)?-0:n}:Kk;Mn({global:!0,forced:parseFloat!=Jk},{parseFloat:Jk});var Qk=n(nt.parseFloat),Zk=Au.PROPER,tE=a,eE=Dw,nE=Gw.trim;Mn({target:"String",proto:!0,forced:function(t){return tE((function(){return!!eE[t]()||"
"!=="
"[t]()||Zk&&eE[t].name!==t}))}("trim")},{trim:function(){return nE(this)}});var rE=af("String").trim,iE=ut,oE=rE,aE=String.prototype,sE=n((function(t){var e=t.trim;return"string"==typeof t||t===aE||iE(aE,t)&&e===aE.trim?oE:e})),uE=ro,lE=Math.floor,cE=function(t,e){var n=t.length,r=lE(n/2);return n<8?fE(t,e):hE(t,cE(uE(t,0,r),e),cE(uE(t,r),e),e)},fE=function(t,e){for(var n,r,i=t.length,o=1;o<i;){for(r=o,n=t[o];r&&e(t[r-1],n)>0;)t[r]=t[--r];r!==o++&&(t[r]=n)}return t},hE=function(t,e,n,r){for(var i=e.length,o=n.length,a=0,s=0;a<i||s<o;)t[a+s]=a<i&&s<o?r(e[a],n[s])<=0?e[a++]:n[s++]:a<i?e[a++]:n[s++];return t},pE=cE,dE=lt.match(/firefox\/(\d+)/i),gE=!!dE&&+dE[1],vE=/MSIE|Trident/.test(lt),yE=lt.match(/AppleWebKit\/(\d+)\./),mE=!!yE&&+yE[1],bE=Mn,wE=y,_E=It,kE=$t,EE=Kn,AE=mw,TE=ei,CE=a,SE=pE,xE=Zh,LE=gE,ME=vE,OE=vt,IE=mE,PE=[],RE=wE(PE.sort),UE=wE(PE.push),BE=CE((function(){PE.sort(void 0)})),DE=CE((function(){PE.sort(null)})),jE=xE("sort"),NE=!CE((function(){if(OE)return OE<70;if(!(LE&&LE>3)){if(ME)return!0;if(IE)return IE<603;var t,e,n,r,i="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){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++)PE.push({k:e+r,v:n})}for(PE.sort((function(t,e){return e.v-t.v})),r=0;r<PE.length;r++)e=PE[r].k.charAt(0),i.charAt(i.length-1)!==e&&(i+=e);return"DGBEFHACIJK"!==i}}));bE({target:"Array",proto:!0,forced:BE||!DE||!jE||!NE},{sort:function(t){void 0!==t&&_E(t);var e=kE(this);if(NE)return void 0===t?RE(e):RE(e,t);var n,r,i=[],o=EE(e);for(r=0;r<o;r++)r in e&&UE(i,e[r]);for(SE(i,function(t){return function(e,n){return void 0===n?-1:void 0===e?1:void 0!==t?+t(e,n)||0:TE(e)>TE(n)?1:-1}}(t)),n=EE(i),r=0;r<n;)e[r]=i[r++];for(;r<o;)AE(e,r++);return e}});var FE,HE=af("Array").sort,zE=ut,VE=HE,qE=Array.prototype,GE=n((function(t){var e=t.sort;return t===qE||zE(qE,t)&&e===qE.sort?VE:e})),YE="undefined"!=typeof window&&window.location&&ew(FE=window.location.href).call(FE,"xgplayerdebugger=1")>-1,WE="color: #525252; background-color: #90ee90;",KE="color: #525252; background-color: red;",XE="color: #525252; background-color: yellow; ",$E="%c[xgplayer]",JE={config:{debug:YE?3:0},logInfo:function(t){for(var e,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,lh(e=[$E,WE,t]).call(e,i))},logWarn:function(t){for(var e,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,lh(e=[$E,XE,t]).call(e,i))},logError:function(t){var e,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,lh(e=[$E,KE,t]).call(e,o))}}},QE=function(){function t(e){L_(this,t),this.bufferedList=e}return O_(t,[{key:"start",value:function(t){return this.bufferedList[t].start}},{key:"end",value:function(t){return this.bufferedList[t].end}},{key:"length",get:function(){return this.bufferedList.length}}]),t}(),ZE={};ZE.createDom=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=document.createElement(e);return o.className=i,o.innerHTML=n,lp(t=Vh(r)).call(t,(function(t){var n=t,i=r[t];"video"===e||"audio"===e||"live-video"===e?i&&o.setAttribute(n,i):o.setAttribute(n,i)})),o},ZE.createDomFromHtml=function(t){var e=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=t;var i=r.children;if(r=null,i.length>0){var o;if(i=i[0],n&&ZE.addClass(i,n),e)lp(o=Vh(e)).call(o,(function(t){i.setAttribute(t,e[t])}));return i}return null}catch(a){return JE.logError("util.createDomFromHtml",a),null}},ZE.hasClass=function(t,e){if(!t||!e)return!1;try{return X_(Array.prototype).call(t.classList,(function(t){return t===e}))}catch(r){var n=t.className&&"object"===x_(t.className)?t.getAttribute("class"):t.className;return n&&!!n.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))}},ZE.addClass=function(t,e){if(t&&e)try{var n;lp(n=e.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(n,(function(e){e&&t.classList.add(e)}))}catch(r){ZE.hasClass(t,e)||(t.className&&"object"===x_(t.className)?t.setAttribute("class",t.getAttribute("class")+" "+e):t.className+=" "+e)}},ZE.removeClass=function(t,e){if(t&&e)try{var n;lp(n=e.replace(/(^\s+|\s+$)/g,"").split(/\s+/g)).call(n,(function(e){e&&t.classList.remove(e)}))}catch(i){var r;if(ZE.hasClass(t,e))lp(r=e.split(/\s+/g)).call(r,(function(e){var n=new RegExp("(\\s|^)"+e+"(\\s|$)");t.className&&"object"===x_(t.className)?t.setAttribute("class",t.getAttribute("class").replace(n," ")):t.className=t.className.replace(n," ")}))}},ZE.toggleClass=function(t,e){var n;t&&lp(n=e.split(/\s+/g)).call(n,(function(e){ZE.hasClass(t,e)?ZE.removeClass(t,e):ZE.addClass(t,e)}))},ZE.classNames=function(){for(var t=arguments,e=[],n=function(n){if("String"===ZE.typeOf(t[n]))e.push(t[n]);else if("Object"===ZE.typeOf(t[n])){var r;c_(r=Vh(t[n])).call(r,(function(r){t[n][r]&&e.push(r)}))}},r=0;r<arguments.length;r++)n(r);return e.join(" ")},ZE.findDom=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1?arguments[1]:void 0;try{t=e.querySelector(n)}catch(r){JE.logError("util.findDom",r),0===ew(n).call(n,"#")&&(t=e.getElementById(tb(n).call(n,1)))}return t},ZE.getCss=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,!1)[e]},ZE.padStart=function(t,e,n){for(var r=String(n),i=e>>0,o=Math.ceil(i/r.length),a=[],s=String(t);o--;)a.push(r);return a.join("").substring(0,i-s.length)+s},ZE.format=function(t){if(window.isNaN(t))return"";t=Math.round(t);var e=vk(ZE).call(ZE,Math.floor(t/3600),2,0),n=vk(ZE).call(ZE,Math.floor((t-3600*e)/60),2,0),r=vk(ZE).call(ZE,Math.floor(t-3600*e-60*n),2,0);return("00"===e?[n,r]:[e,n,r]).join(":")},ZE.event=function(t){if(t.touches){var e=t.touches[0]||t.changedTouches[0];t.clientX=e.clientX||0,t.clientY=e.clientY||0,t.offsetX=e.pageX-e.target.offsetLeft,t.offsetY=e.pageY-e.target.offsetTop}t._target=t.target||t.srcElement},ZE.typeOf=function(t){return Object.prototype.toString.call(t).match(/([^\s.*]+)(?=]$)/g)[0]},ZE.deepCopy=function(t,e){var n;if("Object"===ZE.typeOf(e)&&"Object"===ZE.typeOf(t))return lp(n=Vh(e)).call(n,(function(n){if("Object"!==ZE.typeOf(e[n])||e[n]instanceof Node)if("Array"===ZE.typeOf(e[n])){var r;t[n]="Array"===ZE.typeOf(t[n])?lh(r=t[n]).call(r,e[n]):e[n]}else t[n]=e[n];else void 0===t[n]||void 0===t[n]?t[n]=e[n]:ZE.deepCopy(t[n],e[n])})),t},ZE.deepMerge=function(t,e){var n;return c_(n=Vh(e)).call(n,(function(n){var r;"Array"===ZE.typeOf(e[n])&&"Array"===ZE.typeOf(t[n])?"Array"===ZE.typeOf(t[n])&&(r=t[n]).push.apply(r,N_(e[n])):ZE.typeOf(t[n])!==ZE.typeOf(e[n])||null===t[n]||"Object"!==ZE.typeOf(t[n])||e[n]instanceof window.Node?null!==e[n]&&(t[n]=e[n]):ZE.deepMerge(t[n],e[n])})),t},ZE.getBgImage=function(t){var e=(t.currentStyle||window.getComputedStyle(t,null)).backgroundImage;if(!e||"none"===e)return"";var n=document.createElement("a");return n.href=e.replace(/url\("|"\)/g,""),n.href},ZE.copyDom=function(t){if(t&&1===t.nodeType){var e=document.createElement(t.tagName);return lp(Array.prototype).call(t.attributes,(function(t){e.setAttribute(t.name,t.value)})),t.innerHTML&&(e.innerHTML=t.innerHTML),e}return""},ZE.setInterval=function(t,e,n,r){t._interval[e]||(t._interval[e]=Rk(nb(n).call(n,t),r))},ZE.clearInterval=function(t,e){clearInterval(t._interval[e]),t._interval[e]=null},ZE.setTimeout=function(t,e,n){t._timers||(t._timers=[]);var r=Uk((function(){e(),ZE.clearTimeout(t,r)}),n);return t._timers.push(r),r},ZE.clearTimeout=function(t,e){var n=t._timers;if("Array"===ZE.typeOf(n)){for(var r=0;r<n.length;r++)if(n[r]===e){Bw(n).call(n,r,1),clearTimeout(e);break}}else clearTimeout(e)},ZE.clearAllTimers=function(t){var e=t._timers;"Array"===ZE.typeOf(e)&&(c_(e).call(e,(function(t){clearTimeout(t)})),t._timerIds=[])},ZE.createImgBtn=function(t,e,n,r){var i,o,a,s,u,l,c,f,h,p,d,g,v=ZE.createDom("xg-".concat(t),"",{},"xgplayer-".concat(t,"-img"));(v.style.backgroundImage='url("'.concat(e,'")'),n&&r)&&(Hk(i=["px","rem","em","pt","dp","vw","vh","vm","%"]).call(i,(function(t){var e,i;return!(ew(n).call(n,t)>-1&&ew(r).call(r,t)>-1)||(c=Qk(sE(e=tb(n).call(n,0,ew(n).call(n,t))).call(e)),f=Qk(sE(i=tb(r).call(r,0,ew(r).call(r,t))).call(i)),h=t,!1)})),v.style.width=lh(o="".concat(c)).call(o,h),v.style.height=lh(a="".concat(f)).call(a,h),v.style.backgroundSize=lh(s=lh(u=lh(l="".concat(c)).call(l,h," ")).call(u,f)).call(s,h),v.style.margin="start"===t?lh(p=lh(d=lh(g="-".concat(f/2)).call(g,h," auto auto -")).call(d,c/2)).call(p,h):"auto 5px auto 5px");return v},ZE.Hex2RGBA=function(t,e){var n,r=[];if(/^\#[0-9A-F]{3}$/i.test(t)){var i="#";t.replace(/[0-9A-F]/gi,(function(t){i+=t+t})),t=i}return/^#[0-9A-F]{6}$/i.test(t)?(t.replace(/[0-9A-F]{2}/gi,(function(t){r.push(i_(t,16))})),lh(n="rgba(".concat(r.join(","),", ")).call(n,e,")")):"rgba(255, 255, 255, 0.1)"},ZE.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},ZE.checkIsFunction=function(t){return t&&"function"==typeof t},ZE.checkIsObject=function(t){return null!==t&&"object"===x_(t)},ZE.hide=function(t){t.style.display="none"},ZE.show=function(t,e){t.style.display=e||"block"},ZE.isUndefined=function(t){if(null==t)return!0},ZE.isNotNull=function(t){return!(null==t)},ZE.setStyleFromCsstext=function(t,e){if(e)if("String"===ZE.typeOf(e)){var n=e.replace(/\s+/g,"").split(";");c_(n).call(n,(function(e){if(e){var n=e.split(":");n.length>1&&(t.style[n[0]]=n[1])}}))}else{var r;c_(r=Vh(e)).call(r,(function(n){t.style[n]=e[n]}))}},ZE.filterStyleFromText=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["width","height","top","left","bottom","right","position","z-index","padding","margin","transform"],r=t.style.cssText;if(!r)return{};var i=r.replace(/\s+/g,"").split(";"),o={},a={};return c_(i).call(i,(function(t){if(t){var e=t.split(":");e.length>1&&(!function(t,e){for(var n=0,r=e.length;n<r;n++)if(ew(t).call(t,e[n])>-1)return!0;return!1}(e[0],n)?a[e[0]]=e[1]:o[e[0]]=e[1])}})),t.setAttribute("style",""),c_(e=Vh(a)).call(e,(function(e){t.style[e]=a[e]})),o},ZE.getStyleFromCsstext=function(t){var e=t.style.cssText;if(!e)return{};var n=e.replace(/\s+/g,"").split(";"),r={};return c_(n).call(n,(function(t){if(t){var e=t.split(":");e.length>1&&(r[e[0]]=e[1])}})),r},ZE.preloadImg=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(t){var r=new window.Image;r.onload=function(t){r=null,e&&e(t)},r.onerror=function(t){r=null,n&&n(t)},r.src=t}},ZE.stopPropagation=function(t){t&&t.stopPropagation()},ZE.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},ZE.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},ZE.checkTouchSupport=function(){return"ontouchstart"in window},ZE.getBuffered2=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=[],r=0;r<t.length;r++)n.push({start:t.start(r)<.5?0:t.start(r),end:t.end(r)});GE(n).call(n,(function(t,e){var n=t.start-e.start;return n||e.end-t.end}));var i=[];if(e)for(var o=0;o<n.length;o++){var a=i.length;if(a){var s=i[a-1].end;n[o].start-s<e?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 QE(i)},ZE.getEventPos=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return t.touches&&t.touches.length>0&&(t=t.touches[0]),{x:t.x/e,y:t.y/e,clientX:t.clientX/e,clientY:t.clientY/e,offsetX:t.offsetX/e,offsetY:t.offsetY/e,pageX:t.pageX/e,pageY:t.pageY/e}},ZE.requestAnimationFrame=function(t){var e=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(e)return e(t)},ZE.getHostFromUrl=function(t){if("String"!==ZE.typeOf(t))return"";var e=t.split("/"),n="";return e.length>3&&e[2]&&(n=e[2]),n},ZE.cancelAnimationFrame=function(t){var e=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;e&&e(t)},ZE.isMSE=function(t){return t.media&&(t=t.media),!!(t&&t instanceof HTMLMediaElement)&&(/^blob/.test(t.currentSrc)||/^blob/.test(t.src))},ZE.isBlob=function(t){return"string"==typeof t&&/^blob/.test(t)},ZE.generateSessionId=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=(new Date).getTime();try{t=i_(t)}catch(n){t=0}return e+=t,window.performance&&"function"==typeof window.performance.now&&(e+=i_(window.performance.now())),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:3&n|8).toString(16)}))},ZE.createEvent=function(t){var e;return"function"==typeof window.Event?e=new Event(t):(e=document.createEvent("Event")).initEvent(t,!0,!0),e},ZE.adjustTimeByDuration=function(t,e,n){return e&&t&&(t>e||n&&t<e)?e:t},ZE.createPositionBar=function(t,e){var n=ZE.createDom("xg-bar","",{"data-index":-1},t);return e.appendChild(n),n},ZE.getTransformStyle=function(){var t,e=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(e.scale||1),translate:lh(t="".concat(e.x||0,"%, ")).call(t,e.y||0,"%"),rotate:"".concat(e.rotate||0,"deg")},i=Vh(r);return lp(i).call(i,(function(t){var e,i=new RegExp("".concat(t,"\\([^\\(]+\\)"),"g"),o=lh(e="".concat(t,"(")).call(e,r[t],")");i.test(n)?(i.lastIndex=-1,n=n.replace(i,o)):n+="".concat(o," ")})),n},ZE.convertDeg=function(t){return Math.abs(t)<=1?360*t:t%360},ZE.getIndexByTime=function(t,e){var n=e.length,r=-1;if(n<1)return r;if(t<=e[0].end||n<2)r=0;else if(t>e[n-1].end)r=n-1;else for(var i=1;i<n;i++)if(t>e[i-1].end&&t<=e[i].end){r=i;break}return r},ZE.getOffsetCurrentTime=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=-1;if((r=n>=0&&n<e.length?n:ZE.getIndexByTime(t,e))<0)return-1;var i=e.length,o=e[r],a=o.start,s=o.end,u=o.cTime,l=o.offset;return t<a?u:t>=a&&t<=s?t-l:t>s&&r>=i-1?s:-1},ZE.getCurrentTimeByOffset=function(t,e){var n=-1;if(!e||e.length<0)return t;for(var r=0;r<e.length;r++)if(t<=e[r].duration){n=r;break}if(-1!==n){var i=e[n].start;return n-1<0?i+t:i+(t-e[n-1].duration)}return t};var tA=/(Android)\s([\d.]+)/,eA=/(Version)\/([\d.]+)/,nA=["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"],rA={get device(){return rA.os.isPc?"pc":"mobile"},get browser(){var t,e;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 lh(t=[]).call(t,$h(e=Vh(r)).call(e,(function(t){return r[t].test(n)})))[0]},get os(){if("undefined"==typeof navigator)return{};var t=navigator.userAgent,e=/(?:Windows Phone)/.test(t),n=/(?:SymbianOS)/.test(t)||e,r=/(?:Android)/.test(t),i=/(?:Firefox)/.test(t),o=/(?:iPad|PlayBook)/.test(t)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,a=o||r&&!/(?:Mobile)/.test(t)||i&&/(?:Tablet)/.test(t),s=/(?:iPhone)/.test(t)&&!a;return{isTablet:a,isPhone:s,isIpad:o,isIos:s||o,isAndroid:r,isPc:!(s||r||n||a),isSymbian:n,isWindowsPhone:e,isFireFox:i}},get osVersion(){if("undefined"==typeof navigator)return 0;var t=navigator.userAgent,e="",n=(e=/(?:iPhone)|(?:iPad|PlayBook)/.test(t)?eA:tA)?e.exec(t):[];if(n&&n.length>=3){var r=n[2].split(".");return r.length>0?i_(r[0]):0}return 0},get isWeixin(){if("undefined"==typeof navigator)return!1;return!!/(micromessenger)\/([\d.]+)/.exec(navigator.userAgent.toLocaleLowerCase())},isSupportMP4:function(){var t={isSupport:!1,mime:""};if("undefined"==typeof document)return t;if(this.supportResult)return this.supportResult;var e=document.createElement("video");return"function"==typeof e.canPlayType&&c_(nA).call(nA,(function(n){"probably"===e.canPlayType('video/mp4; codecs="'.concat(n,'"'))&&(t.isSupport=!0,t.mime+="||".concat(n))})),this.supportResult=t,e=null,t},isMSESupport:function(){var t=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(t)}catch(XM){return this._logger.error(t,XM),!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(t){var e={supported:!1,smooth:!1,powerEfficient:!1};if(!t||"undefined"==typeof navigator)return Am.resolve(e);if(navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo)return navigator.mediaCapabilities.decodingInfo(t);var n=t.video||{},r=t.audio||{};try{var i=MediaSource.isTypeSupported(n.contentType),o=MediaSource.isTypeSupported(r.contentType);return Am.resolve({supported:i&&o,smooth:!1,powerEfficient:!1})}catch(a){return Am.resolve(e)}}},iA="play",oA="ended",aA="pause",sA="seeked",uA="timeupdate",lA="durationchange",cA="volumechange",fA="emptied",hA="autoplay_started",pA="video_resize";function dA(t,e,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,u=e.call.apply(e,lh(r=[t]).call(r,o));n&&"function"==typeof n&&(u&&u.then?u.then((function(){for(var e,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];n.call.apply(n,lh(e=[t]).call(e,i))})):n.call.apply(n,lh(s=[t]).call(s,o)))}function gA(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{pre:null,next:null};return this.__hooks||(this.__hooks={}),!this.__hooks[t]&&(this.__hooks[t]=null),nb(n=function(){var n,i=arguments,o=this;if(r.pre)try{var a,s;(s=r.pre).call.apply(s,lh(a=[this]).call(a,tb(Array.prototype).call(arguments)))}catch(g){var u,l;throw g.message=lh(u=lh(l="[pluginName: ".concat(this.pluginName,":")).call(l,t,":pre error] >> ")).call(u,g.message),g}if(this.__hooks&&this.__hooks[t])try{var c,f=function(t,e,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(t.__hooks&&sb(t.__hooks[e])){var a,s=t.__hooks[e],u=-1,l=function t(e,n,r){for(var i,o,a=arguments.length,l=new Array(a>3?a-3:0),c=3;c<a;c++)l[c-3]=arguments[c];if(u++,0===s.length||u===s.length)return r.call.apply(r,lh(o=[e,e]).call(o,l));var f,h=s[u],p=h.call.apply(h,lh(i=[e,e]).call(i,l));return p&&p.then?p.then((function(i){var o;return!1===i?null:t.apply(void 0,lh(o=[e,n,r]).call(o,l))})).catch((function(t){console.warn("[runHooks]".concat(n," reject"),t.message)})):!1!==p?t.apply(void 0,lh(f=[e,n,r]).call(f,l)):void 0};return l.apply(void 0,lh(a=[t,e,n]).call(a,i))}var c;return n.call.apply(n,lh(c=[t,t]).call(c,i))}(this,t,e);if(f)if(f.then)f.then((function(t){var n;!1!==t&&dA.apply(void 0,lh(n=[o,e,r.next]).call(n,N_(i)))})).catch((function(t){throw t}));else dA.apply(void 0,lh(c=[this,e,r.next]).call(c,tb(Array.prototype).call(arguments)));else if(void 0===f){var h;dA.apply(void 0,lh(h=[this,e,r.next]).call(h,tb(Array.prototype).call(arguments)))}}catch(g){var p,d;throw g.message=lh(p=lh(d="[pluginName: ".concat(this.pluginName,":")).call(d,t,"] >> ")).call(p,g.message),g}else dA.apply(void 0,lh(n=[this,e,r.next]).call(n,tb(Array.prototype).call(arguments)))}).call(n,this)}function vA(t,e){var n=this.__hooks;if(!n||!sb(n[t]))return-1;for(var r=n[t],i=0;i<r.length;i++)if(r[i]===e)return i;return-1}function yA(t,e){var n=this.__hooks;if(n)return n.hasOwnProperty(t)?(sb(n[t])||(n[t]=[]),-1===vA.call(this,t,e)&&n[t].push(e),!0):(console.warn("has no supported hook which name [".concat(t,"]")),!1)}function mA(t,e){var n=this.__hooks;if(n){if(sb(n[t])){var r=n[t],i=vA.call(this,t,e);-1!==i&&Bw(r).call(r,i,1)}delete n[t]}}function bA(t,e){var n;JE.logError(lh(n="[".concat(t,"] event or callback cant be undefined or null when call ")).call(n,e))}var wA=function(){function t(e){L_(this,t),ZE.checkIsFunction(this.beforeCreate)&&this.beforeCreate(e),function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];t.__hooks={},e&&c_(e).call(e,(function(e){t.__hooks[e]=null})),xp(t,"hooks",{get:function(){var e;return t.__hooks&&c_(e=Vh(t.__hooks)).call(e,(function(e){if(t.__hooks[e])return e}))}})}(this),this.__args=e,this.__events={},this.__onceEvents={},this.config=e.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(e)}return O_(t,[{key:"beforeCreate",value:function(t){}},{key:"afterCreate",value:function(){}},{key:"beforePlayerInit",value:function(){}},{key:"onPluginsReady",value:function(){}},{key:"afterPlayerInit",value:function(){}},{key:"destroy",value:function(){}},{key:"__init",value:function(t){this.player=t.player,this.playerConfig=t.player&&t.player.config,this.pluginName=t.pluginName?t.pluginName.toLowerCase():this.constructor.pluginName.toLowerCase(),this.logger=t.player&&t.player.logger}},{key:"updateLang",value:function(t){t||(t=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 t=ZE.checkTouchSupport()?"touch":"mouse";return!this.playerConfig||"touch"!==this.playerConfig.domEventType&&"mouse"!==this.playerConfig.domEventType||(t=this.playerConfig.domEventType),t}},{key:"on",value:function(t,e){var n=this;t&&e&&this.player?"string"==typeof t?(this.__events[t]=e,this.player.on(t,e)):sb(t)&&lp(t).call(t,(function(t){n.__events[t]=e,n.player.on(t,e)})):bA(this.pluginName,"plugin.on(event, callback)")}},{key:"once",value:function(t,e){var n=this;t&&e&&this.player?"string"==typeof t?(this.__onceEvents[t]=e,this.player.once(t,e)):sb(t)&&lp(t).call(t,(function(r){n.__onceEvents[r]=e,n.player.once(t,e)})):bA(this.pluginName,"plugin.once(event, callback)")}},{key:"off",value:function(t,e){var n=this;t&&e&&this.player?"string"==typeof t?(delete this.__events[t],this.player.off(t,e)):sb(t)&&lp(t).call(t,(function(r){delete n.__events[t],n.player.off(r,e)})):bA(this.pluginName,"plugin.off(event, callback)")}},{key:"offAll",value:function(){var t,e=this;lp(t=["__events","__onceEvents"]).call(t,(function(t){var n;lp(n=Vh(e[t])).call(n,(function(n){e[t][n]&&e.off(n,e[t][n]),n&&delete e[t][n]}))})),this.__events={},this.__onceEvents={}}},{key:"emit",value:function(t){var e,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,lh(e=[t]).call(e,i))}}},{key:"emitUserAction",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.player){var r=S_(S_({},n),{},{pluginName:this.pluginName});this.player.emitUserAction(t,e,r)}}},{key:"hook",value:function(t,e){var n;return gA.call.apply(gA,lh(n=[this]).call(n,tb(Array.prototype).call(arguments)))}},{key:"useHooks",value:function(t,e){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 yA.call.apply(yA,lh(n=[this]).call(n,tb(Array.prototype).call(arguments)))}},{key:"removeHooks",value:function(t,e){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 mA.call.apply(mA,lh(n=[this]).call(n,tb(Array.prototype).call(arguments)))}},{key:"registerPlugin",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(this.player)return n&&(e.pluginName=n),this.player.registerPlugin({plugin:t,options:e})}},{key:"getPlugin",value:function(t){return this.player?this.player.getPlugin(t):null}},{key:"__destroy",value:function(){var t,e=this,n=this.player,r=this.pluginName;this.offAll(),ZE.clearAllTimers(this),ZE.checkIsFunction(this.destroy)&&this.destroy(),c_(t=["player","playerConfig","pluginName","logger","__args","__hooks"]).call(t,(function(t){e[t]=null})),n.unRegisterPlugin(r),this.__hooks=null}}],[{key:"defineGetterOrSetter",value:function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&xp(t,n,e[n])}},{key:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),t}();if("undefined"!=typeof Element&&!Element.prototype.matches){var _A=Element.prototype;_A.matches=_A.matchesSelector||_A.mozMatchesSelector||_A.msMatchesSelector||_A.oMatchesSelector||_A.webkitMatchesSelector}var kA=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}};function EA(t,e,n,r,i){var o=AA.apply(this,arguments);return t.addEventListener(n,o,i),{destroy:function(){t.removeEventListener(n,o,i)}}}function AA(t,e,n,r){return function(n){n.delegateTarget=kA(n.target,e),n.delegateTarget&&r.call(t,n)}}var TA=function(t,e,n,r,i){return"function"==typeof t.addEventListener?EA.apply(null,arguments):"function"==typeof n?nb(EA).call(EA,null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),c_(Array.prototype).call(t,(function(t){return EA(t,e,n,r,i)})))},CA=n(TA),SA={CONTROLS:"controls",ROOT:"root"},xA={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"},LA="xg-icon-disable";function MA(t){return!!t&&(ew(t)&&/^(?:http|data:|\/)/.test(t))}function OA(t,e){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(t instanceof window.Element)return ZE.addClass(t,i),c_(r=Vh(o)).call(r,(function(e){t.setAttribute(e,o[e])})),t;if(MA(t)||MA(t.url))return o.src=MA(t)?t:t.url||"",s=ZE.createDom(t.tag||"img","",o,"xg-img ".concat(i));if("function"==typeof t)try{var u,l;return(s=t())instanceof window.Element?(ZE.addClass(s,i),c_(u=Vh(o)).call(u,(function(t){s.setAttribute(t,o[t])})),s):(JE.logWarn(lh(l="warn>>icons.".concat(e," in config of plugin named [")).call(l,a,"] is a function mast return an Element Object")),null)}catch(c){return JE.logError("Plugin named [".concat(a,"]:createIcon"),c),null}return"string"==typeof t?ZE.createDomFromHtml(t,o,i):(JE.logWarn(lh(n="warn>>icons.".concat(e," in config of plugin named [")).call(n,a,"] is invalid")),null)}function IA(t,e){var n,r=e.config.icons||e.playerConfig.icons;c_(n=Vh(t)).call(n,(function(n){var i=t[n],o=i&&i.class?i.class:"",a=i&&i.attr?i.attr:{},s=null;r&&r[n]&&(o=function(t,e){var n;return"object"===x_(t)&&t.class&&"string"==typeof t.class?lh(n="".concat(e," ")).call(n,t.class):e}(r[n],o),a=function(t,e){var n;return"object"===x_(t)&&t.attr&&"object"===x_(t.attr)&&c_(n=Vh(t.attr)).call(n,(function(n){e[n]=t.attr[n]})),e}(r[n],a),s=OA(r[n],n,o,a,e.pluginName)),!s&&i&&(s=OA(i.icon?i.icon:i,a,o,{},e.pluginName)),e.icons[n]=s}))}var PA=function(t){P_(n,t);var e=D_(n);function n(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return L_(this,n),(t=e.call(this,r)).__delegates=[],t}return O_(n,[{key:"__init",value:function(t){if(j_(R_(n.prototype),"__init",this).call(this,t),t.root){var e=t.root,r=null;this.icons={},this.root=null,this.parent=null,IA(this.registerIcons()||{},this),this.langText={};var i,o,a,s=this.registerLanguageTexts()||{};o=this,c_(a=Vh(i=s)).call(a,(function(t){xp(o.langText,t,{get:function(){var e=o.lang,n=o.i18n;return n[t]?n[t]:i[t]&&i[t][e]||""}})}));var u="";try{u=this.render()}catch(h){var l;throw JE.logError("Plugin:".concat(this.pluginName,":render"),h),new Error(lh(l="Plugin:".concat(this.pluginName,":render:")).call(l,h.message))}if(u)(r=n.insert(u,e,t.index)).setAttribute("data-index",t.index);else{if(!t.tag)return;(r=ZE.createDom(t.tag,"",t.attr,t.name)).setAttribute("data-index",t.index),e.appendChild(r)}this.root=r,this.parent=e;var c=this.config.attr||{},f=this.config.style||{};this.setAttr(c),this.setStyle(f),this.config.index&&this.root.setAttribute("data-index",this.config.index),this.__registerChildren()}}},{key:"__registerChildren",value:function(){var t=this;if(this.root){this._children=[];var e,n=this.children();if(n&&"object"===x_(n))if(Vh(n).length>0)c_(e=Vh(n)).call(e,(function(e){var r,i,o=e,a=n[o],s={root:t.root};"function"==typeof a?(r=t.config[o]||{},i=a):"object"===x_(a)&&"function"==typeof a.plugin&&(r=a.options?ZE.deepCopy(t.config[o]||{},a.options):t.config[o]||{},i=a.plugin),s.config=r,void 0!==r.index&&(s.index=r.index),r.root&&(s.root=r.root),t.registerPlugin(i,s,o)}))}}},{key:"updateLang",value:function(t){t||(t=this.lang);var e=this.root,n=this.i18n,r=this.langText;e&&function t(e,n){for(var r=0;r<e.children.length;r++)e.children[r].children.length>0?t(e.children[r],n):n(e.children[r])}(e,(function(e){var i=e.getAttribute&&e.getAttribute("lang-key");if(i){var o=n[i.toUpperCase()]||r[i];o&&(e.innerHTML="function"==typeof o?o(t):o)}}))}},{key:"lang",get:function(){return this.player.lang}},{key:"changeLangTextKey",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.i18n||{},r=this.langText;t.setAttribute&&t.setAttribute("lang-key",e);var i=n[e]||r[e]||"";i&&(t.innerHTML=i)}},{key:"plugins",value:function(){return this._children}},{key:"disable",value:function(){this.config.disable=!0,ZE.addClass(cw(this).call(this,".xgplayer-icon"),LA)}},{key:"enable",value:function(){this.config.disable=!1,ZE.removeClass(cw(this).call(this,".xgplayer-icon"),LA)}},{key:"children",value:function(){return{}}},{key:"registerPlugin",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e.root=e.root||this.root;var i=j_(R_(n.prototype),"registerPlugin",this).call(this,t,e,r);return this._children.push(i),i}},{key:"registerIcons",value:function(){return{}}},{key:"registerLanguageTexts",value:function(){return{}}},{key:"find",value:function(t){if(this.root)return this.root.querySelector(t)}},{key:"bind",value:function(t,e,r){var i=this;if(arguments.length<3&&"function"==typeof e)sb(t)?lp(t).call(t,(function(t){i.bindEL(t,e)})):this.bindEL(t,e);else{var o,a=n.delegate.call(this,this.root,t,e,r);this.__delegates=lh(o=this.__delegates).call(o,a)}}},{key:"unbind",value:function(t,e){var n=this;if(arguments.length<3&&"function"==typeof e)sb(t)?lp(t).call(t,(function(t){n.unbindEL(t,e)})):this.unbindEL(t,e);else for(var r,i=lh(r="".concat(t,"_")).call(r,e),o=0;o<this.__delegates.length;o++)if(this.__delegates[o].key===i){var a;this.__delegates[o].destroy(),Bw(a=this.__delegates).call(a,o,1);break}}},{key:"setStyle",value:function(t,e){var n,r=this;if(this.root)return"String"===ZE.typeOf(t)?this.root.style[t]=e:void("Object"===ZE.typeOf(t)&&c_(n=Vh(t)).call(n,(function(e){r.root.style[e]=t[e]})))}},{key:"setAttr",value:function(t,e){var n,r=this;if(this.root)return"String"===ZE.typeOf(t)?this.root.setAttribute(t,e):void("Object"===ZE.typeOf(t)&&c_(n=Vh(t)).call(n,(function(e){r.root.setAttribute(e,t[e])})))}},{key:"setHtml",value:function(t,e){this.root&&(this.root.innerHTML=t,"function"==typeof e&&e())}},{key:"bindEL",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.root&&"on".concat(t)in this.root&&"function"==typeof e&&this.root.addEventListener(t,e,n)}},{key:"unbindEL",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.root&&"on".concat(t)in this.root&&"function"==typeof e&&this.root.removeEventListener(t,e,n)}},{key:"show",value:function(t){if(this.root)return this.root.style.display=void 0!==t?t:"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(t,e){if(!this.root)return null;if(arguments.length<2&&arguments[0]instanceof window.Element)return this.root.appendChild(arguments[0]);if(!(e&&e instanceof window.Element))return null;try{return"string"==typeof t?cw(this).call(this,t).appendChild(e):t.appendChild(e)}catch(n){return JE.logError("Plugin:appendChild",n),null}}},{key:"render",value:function(){return""}},{key:"destroy",value:function(){}},{key:"__destroy",value:function(){var t,e,r,i=this,o=this.player;(c_(t=this.__delegates).call(t,(function(t){t.destroy()})),this.__delegates=[],this._children instanceof Array)&&(c_(r=this._children).call(r,(function(t){o.unRegisterPlugin(t.pluginName)})),this._children=null);this.root&&(this.root.hasOwnProperty("remove")?this.root.remove():this.root.parentNode&&this.root.parentNode.removeChild(this.root)),j_(R_(n.prototype),"__destroy",this).call(this),this.icons={},c_(e=["root","parent"]).call(e,(function(t){i[t]=null}))}}],[{key:"insert",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=e.children.length,i=Number(n),o=t instanceof window.Node;if(r){for(var a=0,s=null,u="";a<r;a++){s=e.children[a];var l=Number(s.getAttribute("data-index"));if(l>=i){u="beforebegin";break}l<i&&(u="afterend")}return o?"afterend"===u?e.appendChild(t):e.insertBefore(t,s):s.insertAdjacentHTML(u,t),"afterend"===u?e.children[e.children.length-1]:e.children[a]}return o?e.appendChild(t):e.insertAdjacentHTML("beforeend",t),e.children[e.children.length-1]}},{key:"defaultConfig",get:function(){return{}}},{key:"delegate",value:function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=[];if(t instanceof window.Node&&"function"==typeof r)if(sb(n))lp(n).call(n,(function(n){var a,s=CA(t,e,n,r,i);s.key=lh(a="".concat(e,"_")).call(a,n),o.push(s)}));else{var a,s=CA(t,e,n,r,i);s.key=lh(a="".concat(e,"_")).call(a,n),o.push(s)}return o}},{key:"ROOT_TYPES",get:function(){return SA}},{key:"POSITIONS",get:function(){return xA}}]),n}(wA),RA="xgplayer-is-enter",UA="xgplayer-pause",BA="xgplayer-playing",DA="xgplayer-ended",jA="xgplayer-isloading",NA="xgplayer-is-error",FA="xgplayer-replay",HA="xgplayer-nostart",zA="not-allow-autoplay",VA=6;function qA(){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 GA(){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}function YA(t,e,n){try{var r,i;return lh(r=lh(i=' <div class="xg-tips '.concat(n?"hide":" ",'" lang-key="')).call(i,t.i18nKeys[e],'">\n ')).call(r,t.i18n[e],"\n </div>")}catch(o){return'<div class="xg-tips hide"></div>'}}var WA=[{tag:"xg-cache",className:"xgplayer-progress-cache",styleKey:"cachedColor"},{tag:"xg-played",className:"xgplayer-progress-played",styleKey:"playedColor"}],KA=function(){function t(e){L_(this,t),this.fragments=e.fragments||[],0===this.fragments.length&&this.fragments.push({percent:1}),this._callBack=e.actionCallback,this.fragConfig={fragFocusClass:e.fragFocusClass||"inner-focus-point",fragAutoFocus:!!e.fragAutoFocus,fragClass:e.fragClass||""},this.style=e.style||{playedColor:"",cachedColor:"",progressColor:""},this.duration=0,this.cachedIndex=0,this.playedIndex=0,this.focusIndex=-1}return O_(t,[{key:"updateDuration",value:function(t){var e=this;this.duration=t;var n=0,r=this.fragments;this.fragments=c_(r).call(r,(function(t){return t.start=i_(n,10),t.end=i_(n+t.percent*e.duration,10),t.duration=i_(t.percent*e.duration,10),n+=t.percent*e.duration,t}))}},{key:"updateProgress",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"played",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{newIndex:0,curIndex:0,millisecond:0},n=this.progressList,r=this.fragments;if(!(n.length<1)){var i=e.newIndex,o=e.curIndex,a=e.millisecond;i!==o&&c_(n).call(n,(function(e,n){n<i?e[t].style.width="100%":n>i&&(e[t].style.width=0)}));var s=r[i],u=0===a?0:(a-s.start)/s.duration;n[i][t].style.width=u<0?0:"".concat(100*u,"%")}}},{key:"updateFocus",value:function(t){if(this.fragConfig.fragAutoFocus&&!(this.fragments.length<2))if(t){var e=mh(this).call(this,1e3*t.currentTime,this.focusIndex);if(e>=0&&e!==this.focusIndex){this.focusIndex>-1&&this.unHightLight(this.focusIndex),this.setHightLight(e);var n={index:e,preIndex:this.focusIndex,fragment:this.fragments[this.focusIndex]};this.focusIndex=e,this._callBack&&this._callBack(n)}}else if(this.focusIndex>-1){this.unHightLight(this.focusIndex);var r={index:-1,preIndex:this.focusIndex,fragment:null};this._callBack&&this._callBack(r),this.focusIndex=-1}}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{cached:0,played:0},e=arguments.length>1?arguments[1]:void 0;if(!this.duration||i_(1e3*e,10)!==this.duration){if(!e&&0!==e)return;this.updateDuration(i_(1e3*e,10))}var n=this.playedIndex,r=this.cachedIndex;if("Undefined"!==ZE.typeOf(t.played)){var i=mh(this).call(this,1e3*t.played,n);if(i<0)return;this.updateProgress("played",{newIndex:i,curIndex:n,millisecond:i_(1e3*t.played,10)}),this.playedIndex=i}if("Undefined"!==ZE.typeOf(t.cached)){var o=mh(this).call(this,1e3*t.cached,r);if(o<0)return;this.updateProgress("cached",{newIndex:o,curIndex:r,millisecond:i_(1e3*t.cached,10)}),this.cachedIndex=o}}},{key:"findIndex",value:function(t,e){var n=this.fragments;if(!n||0===n.length)return-1;if(1===n.length)return 0;if(e>-1&&e<n.length&&t>n[e].start&&t<n[e].end)return e;if(t>n[n.length-1].start)return n.length-1;for(var r=0;r<n.length;r++)if(t>n[r].start&&t<=n[r].end){e=r;break}return e}},{key:"findHightLight",value:function(){for(var t=this.root.children,e=0;e<t.length;e++)if(ZE.hasClass(t[e],this.fragConfig.fragFocusClass))return{dom:t[e],pos:t[e].getBoundingClientRect()}}},{key:"findFragment",value:function(t){var e=this.root.children;return t<0||t>=e.length?null:{dom:e[t],pos:e[t].getBoundingClientRect()}}},{key:"unHightLight",value:function(){for(var t=this.root.children,e=0;e<t.length;e++)ZE.removeClass(t[e],this.fragConfig.fragFocusClass)}},{key:"setHightLight",value:function(t){var e=this.root.children;if(t<e.length)return ZE.addClass(e[t],this.fragConfig.fragFocusClass),{dom:e[t],pos:e[t].getBoundingClientRect()}}},{key:"destroy",value:function(){this.progressList=null,this.fragments=null,this.root.innerHTML=""}},{key:"reset",value:function(t){var e,n=this;if(lp(e=Vh(this.fragConfig)).call(e,(function(e){void 0!==t[e]&&(n.fragConfig[e]=t[e])})),t.fragments){if(this.fragments=0===t.fragments.length?[{percent:1}]:t.fragments,this.updateDuration(this.duration),this.playedIndex=0,this.cachedIndex=0,this.root)for(var r=this.root.children;r.length>0;)this.root.removeChild(r[0]);this.render()}}},{key:"render",value:function(){var t=this,e=this.style.progressColor;if(this.root||(this.root=ZE.createDom("xg-inners","",{},"progress-list")),this.fragments){var n,r=this.fragConfig,i=r.fragClass,o=r.fragFocusClass;this.progressList=c_(n=this.fragments).call(n,(function(n){var r,a,s=ZE.createDom("xg-inner","",{style:e?lh(r="background:".concat(e,"; flex: ")).call(r,n.percent):"flex: ".concat(n.percent)},lh(a="".concat(n.isFocus?o:""," xgplayer-progress-inner ")).call(a,i));return t.root.appendChild(s),lp(WA).call(WA,(function(e){s.appendChild(ZE.createDom(e.tag,"",{style:e.styleKey?"background: ".concat(t.style[e.styleKey],"; width:0;"):"width:0;"},e.className))})),{cached:s.children[0],played:s.children[1]}}))}return this.root}}]),t}(),XA={POINT:"inner-focus-point",HIGHLIGHT:"inner-focus-highlight"},$A=function(t){P_(n,t);var e=D_(n);function n(t){var r;return L_(this,n),I_(B_(r=e.call(this,t)),"onMoveOnly",(function(t,e){var n=B_(r),i=n.pos,o=n.config,a=n.player,s=e;if(t){ZE.event(t);var u=ZE.getEventPos(t,a.zoom),l=90===a.rotateDeg?u.clientY:u.clientX;if(i.moving&&Math.abs(i.x-l)<o.miniMoveStep)return;i.moving=!0,i.x=l,s=r.computeTime(t,l)}r.triggerCallbacks("dragmove",s,t),r._updateInnerFocus(s)})),I_(B_(r),"onBodyClick",(function(t){r.pos.isLocked&&(r.pos.isLocked=!1,t.preventDefault(),t.stopPropagation())})),I_(B_(r),"_mouseDownHandler",(function(t,e){r._state.time=e.currentTime,r.updateWidth(e.currentTime,e.seekTime,e.percent,0),r._updateInnerFocus(e)})),I_(B_(r),"_mouseUpHandler",(function(t,e){B_(r).pos.moving&&r.updateWidth(e.currentTime,e.seekTime,e.percent,2)})),I_(B_(r),"_mouseMoveHandler",(function(t,e){var n=B_(r),i=n._state,o=n.pos,a=n.config,s=n.player;i.time<e.currentTime?e.forward=!0:e.forward=!1,i.time=e.currentTime,o.isDown&&!o.moving&&(o.moving=!0,a.isPauseMoving&&s.pause(),r.triggerCallbacks("dragstart",e,t),r.emitUserAction("drag","dragstart",e)),r.updateWidth(e.currentTime,e.seekTime,e.percent,1),r.triggerCallbacks("dragmove",e,t),r._updateInnerFocus(e)})),I_(B_(r),"onMouseDown",(function(t){var e=B_(r),n=e._state,i=e.player,o=e.pos,a=e.config,s=e.playerConfig,u=ZE.getEventPos(t,i.zoom),l=90===i.rotateDeg?u.clientY:u.clientX;if(!(i.isMini||a.closeMoveSeek||!s.allowSeekAfterEnded&&i.ended)){if(i.duration||i.isPlaying){t.stopPropagation(),r.focus(),ZE.checkIsFunction(s.disableSwipeHandler)&&s.disableSwipeHandler(),ZE.checkIsFunction(a.onMoveStart)&&a.onMoveStart(),ZE.event(t),o.x=l,o.isDown=!0,o.moving=!1,n.prePlayTime=i.currentTime,i.focus({autoHide:!1}),r.isProgressMoving=!0,ZE.addClass(r.progressBtn,"active");var c=r.computeTime(t,l);return c.prePlayTime=n.prePlayTime,r._mouseDownHandlerHook(t,c),"touchstart"===t.type?(r.root.addEventListener("touchmove",r.onMouseMove),r.root.addEventListener("touchend",r.onMouseUp),r.root.addEventListener("touchcancel",r.onMouseUp)):(r.unbind("mousemove",r.onMoveOnly),document.addEventListener("mousemove",r.onMouseMove,!1),document.addEventListener("mouseup",r.onMouseUp,!1)),!0}i.play()}})),I_(B_(r),"onMouseUp",(function(t){var e=B_(r),n=e.player,i=e.config,o=e.pos,a=e.playerConfig,s=e._state;t.stopPropagation(),t.preventDefault(),ZE.checkIsFunction(a.enableSwipeHandler)&&a.enableSwipeHandler(),ZE.checkIsFunction(i.onMoveEnd)&&i.onMoveEnd(),ZE.event(t),ZE.removeClass(r.progressBtn,"active");var u=r.computeTime(t,o.x);u.prePlayTime=s.prePlayTime,o.moving?(r.triggerCallbacks("dragend",u,t),r.emitUserAction("drag","dragend",u)):(r.triggerCallbacks("click",u,t),r.emitUserAction("click","click",u)),r._mouseUpHandlerHook(t,u),o.moving=!1,o.isDown=!1,o.x=0,o.y=0,o.isLocked=!0,s.prePlayTime=0,s.time=0;var l=t.type;"touchend"===l||"touchcancel"===l?(r.root.removeEventListener("touchmove",r.onMouseMove),r.root.removeEventListener("touchend",r.onMouseUp),r.root.removeEventListener("touchcancel",r.onMouseUp),r.blur()):(document.removeEventListener("mousemove",r.onMouseMove,!1),document.removeEventListener("mouseup",r.onMouseUp,!1),o.isEnter?"mobile"!==a.isMobileSimulateMode&&nb(r).call(r,"mousemove",r.onMoveOnly):r.onMouseLeave(t)),ZE.setTimeout(B_(r),(function(){r.resetSeekState()}),1),n.focus()})),I_(B_(r),"onMouseMove",(function(t){var e=B_(r),n=e._state,i=e.pos,o=e.player,a=e.config;ZE.checkTouchSupport()&&t.preventDefault(),ZE.event(t);var s=ZE.getEventPos(t,o.zoom),u=90===o.rotateDeg?s.clientY:s.clientX,l=Math.abs(i.x-u);if(!(i.moving&&l<a.miniMoveStep||!i.moving&&l<a.miniStartStep)){i.x=u;var c=r.computeTime(t,u);c.prePlayTime=n.prePlayTime,r._mouseMoveHandlerHook(t,c)}})),I_(B_(r),"onMouseOut",(function(t){r.triggerCallbacks("mouseout",null,t)})),I_(B_(r),"onMouseOver",(function(t){r.triggerCallbacks("mouseover",null,t)})),I_(B_(r),"onMouseEnter",(function(t){var e=B_(r),n=e.player,i=e.pos;if(!(i.isDown||i.isEnter||n.isMini||!n.config.allowSeekAfterEnded&&n.ended)){i.isEnter=!0,nb(r).call(r,"mousemove",r.onMoveOnly),nb(r).call(r,"mouseleave",r.onMouseLeave),ZE.event(t);var o=ZE.getEventPos(t,n.zoom),a=90===n.rotateDeg?o.clientY:o.clientX,s=r.computeTime(t,a);r.triggerCallbacks("mouseenter",s,t),r.focus()}})),I_(B_(r),"onMouseLeave",(function(t){r.triggerCallbacks("mouseleave",null,t),r.unlock(),r._updateInnerFocus(null)})),I_(B_(r),"onVideoResize",(function(){var t=r.pos,e=t.x,n=t.isDown;if(t.isEnter&&!n){var i=r.computeTime(null,e);r.onMoveOnly(null,i)}})),r.useable=!1,r.isProgressMoving=!1,r.__dragCallBacks=[],r._state={now:-1,direc:0,time:0,prePlayTime:-1},r._disableBlur=!1,"boolean"==typeof r.config.isDragingSeek&&(console.warn("[XGPLAYER] 'isDragingSeek' is deprecated, please use 'isDraggingSeek' instead"),r.config.isDraggingSeek=r.config.isDragingSeek),r}return O_(n,[{key:"offsetDuration",get:function(){return this.playerConfig.customDuration||this.player.offsetDuration||this.player.duration}},{key:"duration",get:function(){return this.playerConfig.customDuration||this.player.duration}},{key:"timeOffset",get:function(){return this.playerConfig.timeOffset||0}},{key:"currentTime",get:function(){var t=this.player,e=t.offsetCurrentTime,n=t.currentTime;return e>=0?e:n+this.timeOffset}},{key:"changeState",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.useable=t}},{key:"show",value:function(t){this.root&&(this.root.style.display="flex")}},{key:"_initInner",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e&&0!==e.length||(e=[{percent:1}]);var r,i=S_(S_({fragments:e},n),{},{actionCallback:function(e){t.emitUserAction("fragment_focus","fragment_focus",e)}});this.innerList?this.innerList.reset(i):(this.innerList=new KA(i),this.outer.insertBefore(this.innerList.render(),this.outer.children[0]),c_(r=["findHightLight","unHightLight","setHightLight","findFragment"]).call(r,(function(e){var n;t[e]=nb(n=t.innerList[e]).call(n,t.innerList)})))}},{key:"_updateInnerFocus",value:function(t){this.innerList&&this.innerList.updateFocus(t)}},{key:"afterCreate",value:function(){if(!this.config.disable&&!this.playerConfig.isLive){this.pos={x:0,y:0,moving:!1,isDown:!1,isEnter:!1,isLocked:!1},this.outer=cw(this).call(this,"xg-outer");var t=this.config,e=t.fragFocusClass,n=t.fragAutoFocus,r=t.fragClass;this._initInner(this.config.fragments,{fragFocusClass:e,fragAutoFocus:n,fragClass:r,style:this.playerConfig.commonStyle||{}}),"mobile"===rA.device&&(this.config.isDraggingSeek=!1,this.isMobile=!0),this.progressBtn=cw(this).call(this,".xgplayer-progress-btn"),this.listenEvents(),this.bindDomEvents(),this.initCustomStyle()}}},{key:"listenEvents",value:function(){var t=this;this.on(lA,(function(){t.onMouseLeave()})),this.on(uA,(function(){t.onTimeupdate()})),this.on(sA,(function(){t.onTimeupdate(),t.onCacheUpdate()})),this.on("progress",(function(){t.onCacheUpdate()})),this.on(oA,(function(){t.onCacheUpdate(!0),t.onTimeupdate(!0),t._state.now=0})),this.on(fA,(function(){t.onReset()})),this.on(pA,(function(){t.onVideoResize()}))}},{key:"setConfig",value:function(t){var e,n=this,r=null;lp(e=Vh(t)).call(e,(function(e){n.config[e]=t[e],"fragments"===e&&(r=t[e])})),r&&this._initInner(r,t)}},{key:"initCustomStyle",value:function(){var t=(this.playerConfig||{}).commonStyle.sliderBtnStyle,e=this.progressBtn;if(t)if("string"==typeof t)e.style.boxShadow=t;else if("object"===x_(t)){var n;c_(n=Vh(t)).call(n,(function(n){e.style[n]=t[n]}))}}},{key:"triggerCallbacks",value:function(t,e,n){var r;this.__dragCallBacks.length>0&&c_(r=this.__dragCallBacks).call(r,(function(r){if(r&&r.handler&&r.type===t)try{r.handler(e,n)}catch(XM){console.error("[XGPLAYER][triggerCallbacks] ".concat(r," error"),XM)}}))}},{key:"addCallBack",value:function(t,e){e&&"function"==typeof e&&this.__dragCallBacks.push({type:t,handler:e})}},{key:"removeCallBack",value:function(t,e){var n=this.__dragCallBacks,r=-1;c_(n).call(n,(function(n,i){n&&n.type===t&&n.handler===e&&(r=i)})),r>-1&&Bw(n).call(n,r,1)}},{key:"unlock",value:function(){var t=this.player,e=this.pos;e.isEnter=!1,e.isLocked=!1,t.isMini||(this.unbind("mousemove",this.onMoveOnly),e.isDown?this.unbind("mouseleave",this.onMouseLeave):this.blur())}},{key:"bindDomEvents",value:function(){var t=this.player.config;(this._mouseDownHandlerHook=this.hook("dragstart",this._mouseDownHandler),this._mouseUpHandlerHook=this.hook("dragend",this._mouseUpHandler),this._mouseMoveHandlerHook=this.hook("drag",this._mouseMoveHandler),"touch"!==this.domEventType&&"compatible"!==this.domEventType||this.root.addEventListener("touchstart",this.onMouseDown),"mouse"===this.domEventType||"compatible"===this.domEventType)&&(nb(this).call(this,"mousedown",this.onMouseDown),"mobile"!==t.isMobileSimulateMode&&nb(this).call(this,"mouseenter",this.onMouseEnter),nb(this).call(this,"mouseover",this.onMouseOver),nb(this).call(this,"mouseout",this.onMouseOut),this.player.root.addEventListener("click",this.onBodyClick,!0))}},{key:"focus",value:function(){this.player.controls.pauseAutoHide(),ZE.addClass(this.root,"active")}},{key:"blur",value:function(){this._disableBlur||(this.player.controls.recoverAutoHide(),ZE.removeClass(this.root,"active"))}},{key:"disableBlur",value:function(){this._disableBlur=!0}},{key:"enableBlur",value:function(){this._disableBlur=!1}},{key:"updateWidth",value:function(t,e,n,r){var i=this.config,o=this.player;if(!i.isCloseClickSeek||0!==r){var a=e=e>=o.duration?o.duration-i.endedDiff:Number(e).toFixed(1);this.updatePercent(n),this.updateTime(t),(1!==r||i.isDraggingSeek&&"audio"!==o.config.mediaType)&&(this._state.now=a,this._state.direc=a>o.currentTime?0:1,o.seek(a))}}},{key:"computeTime",value:function(t,e){var n,r,i=this.player,o=this.root.getBoundingClientRect(),a=o.width,s=o.height,u=o.top,l=o.left,c=e;90===i.rotateDeg?(n=s,r=u):(n=a,r=l);var f=c-r,h=(f=f>n?n:f<0?0:f)/n,p=i_((h=h<0?0:h>1?1:h)*this.offsetDuration*1e3,10)/1e3;return{percent:h,currentTime:p,seekTime:ZE.getCurrentTimeByOffset(p,i.timeSegments),offset:f,width:n,left:r,e:t}}},{key:"updateTime",value:function(t){var e=this.player,n=this.duration;t>n?t=n:t<0&&(t=0);var r=e.plugins.time;r&&r.updateTime(t)}},{key:"resetSeekState",value:function(){this.isProgressMoving=!1;var t=this.player.plugins.time;t&&t.resetActive()}},{key:"updatePercent",value:function(t,e){if(this.isProgressMoving=!0,!this.config.disable){t=t>1?1:t<0?0:t,this.progressBtn.style.left="".concat(100*t,"%"),this.innerList.update({played:t*this.offsetDuration},this.offsetDuration);var n=this.player.plugins.miniprogress;n&&n.update({played:t*this.offsetDuration},this.offsetDuration)}}},{key:"onTimeupdate",value:function(t){var e=this.player,n=this._state,r=this.offsetDuration;if(!(e.isSeeking&&e.media.seeking||this.isProgressMoving)&&e.hasStart){if(n.now>-1){var i=i_(1e3*n.now,10)-i_(1e3*e.currentTime,10);if(0===n.direc&&i>300||1===n.direc&&i>-300)return void(n.now=-1);n.now=-1}var o=this.currentTime;o=ZE.adjustTimeByDuration(o,r,t),this.innerList.update({played:o},r),this.progressBtn.style.left="".concat(o/r*100,"%")}}},{key:"onCacheUpdate",value:function(t){var e=this.player,n=this.duration;if(e){var r=e.bufferedPoint.end;r=ZE.adjustTimeByDuration(r,n,t),this.innerList.update({cached:r},n)}}},{key:"onReset",value:function(){this.innerList.update({played:0,cached:0},0),this.progressBtn.style.left="0%"}},{key:"destroy",value:function(){var t=this.player;this.thumbnailPlugin=null,this.innerList.destroy(),this.innerList=null;var e=this.domEventType;"touch"!==e&&"compatible"!==e||(this.root.removeEventListener("touchstart",this.onMouseDown),this.root.removeEventListener("touchmove",this.onMouseMove),this.root.removeEventListener("touchend",this.onMouseUp),this.root.removeEventListener("touchcancel",this.onMouseUp)),"mouse"!==e&&"compatible"!==e||(this.unbind("mousedown",this.onMouseDown),this.unbind("mouseenter",this.onMouseEnter),this.unbind("mousemove",this.onMoveOnly),this.unbind("mouseleave",this.onMouseLeave),document.removeEventListener("mousemove",this.onMouseMove,!1),document.removeEventListener("mouseup",this.onMouseUp,!1),t.root.removeEventListener("click",this.onBodyClick,!0))}},{key:"render",value:function(){if(!this.config.disable&&!this.playerConfig.isLive){var t=this.player.controls?this.player.controls.config.mode:"";return'\n <xg-progress class="xgplayer-progress '.concat("bottom"===t?"xgplayer-progress-bottom":"",'">\n <xg-outer class="xgplayer-progress-outer">\n <xg-progress-btn class="xgplayer-progress-btn"></xg-progress-btn>\n </xg-outer>\n </xg-progress>\n ')}}}],[{key:"pluginName",get:function(){return"progress"}},{key:"defaultConfig",get:function(){return{position:xA.CONTROLS_CENTER,index:0,disable:!1,isDraggingSeek:!0,closeMoveSeek:!1,isPauseMoving:!1,isCloseClickSeek:!1,fragments:[{percent:1}],fragFocusClass:XA.POINT,fragClass:"",fragAutoFocus:!1,miniMoveStep:5,miniStartStep:2,onMoveStart:function(){},onMoveEnd:function(){},endedDiff:.2}}},{key:"FRAGMENT_FOCUS_CLASS",get:function(){return XA}}]),n}(PA),JA=function(t){P_(n,t);var e=D_(n);function n(){var t,r;L_(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return I_(B_(r=e.call.apply(e,lh(t=[this]).call(t,o))),"_onMouseenter",(function(t){r.emit("icon_mouseenter",{pluginName:r.pluginName})})),I_(B_(r),"_onMouseLeave",(function(t){r.emit("icon_mouseleave",{pluginName:r.pluginName})})),r}return O_(n,[{key:"afterCreate",value:function(){nb(this).call(this,"mouseenter",this._onMouseenter),nb(this).call(this,"mouseleave",this._onMouseLeave),this.config.disable&&this.disable()}},{key:"destroy",value:function(){this.unbind("mouseenter",this._onMouseenter),this.unbind("mouseleave",this._onMouseLeave)}}]),n}(PA),QA=function(t){P_(n,t);var e=D_(n);function n(){var t,r;L_(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return I_(B_(r=e.call.apply(e,lh(t=[this]).call(t,o))),"btnClick",(function(t){t.preventDefault(),t.stopPropagation();var e=B_(r).player;return r.emitUserAction(t,"switch_play_pause",{prop:"paused",from:e.paused,to:!e.paused}),e.ended?e.replay():e.paused?(e.play(),r.animate(!1)):(e.pause(),r.animate(!0)),!1})),r}return O_(n,[{key:"afterCreate",value:function(){j_(R_(n.prototype),"afterCreate",this).call(this),this.config.disable||(this.initIcons(),nb(this).call(this,["touchend","click"],this.btnClick),this.listenEvents(),this.animate(!0))}},{key:"listenEvents",value:function(){var t=this,e=this.player;this.on([iA,aA,"error",fA],(function(){t.animate(e.paused)}))}},{key:"registerIcons",value:function(){return{play:{icon:qA,class:"xg-icon-play"},pause:{icon:GA,class:"xg-icon-pause"}}}},{key:"initIcons",value:function(){var t=this.icons;this.appendChild(".xgplayer-icon",t.play),this.appendChild(".xgplayer-icon",t.pause)}},{key:"animate",value:function(t){if(this.player){var e=this.i18nKeys,n=cw(this).call(this,".xg-tips");t?(this.setAttr("data-state","pause"),n&&this.changeLangTextKey(n,e.PLAY_TIPS)):(this.setAttr("data-state","play"),n&&this.changeLangTextKey(n,e.PAUSE_TIPS))}}},{key:"destroy",value:function(){j_(R_(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(YA(this,"PLAY_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"play"}},{key:"defaultConfig",get:function(){return{position:xA.CONTROLS_LEFT,index:0,disable:!1}}}]),n}(JA);function ZA(){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 tT=function(t){P_(n,t);var e=D_(n);function n(){return L_(this,n),e.apply(this,arguments)}return O_(n,[{key:"afterCreate",value:function(){var t=this;this.initIcons(),this.onClick=function(e){e.preventDefault(),e.stopPropagation(),t.config.onClick(e)},nb(this).call(this,["click","touchend"],this.onClick)}},{key:"registerIcons",value:function(){return{screenBack:{icon:ZA,class:"xg-fullscreen-back"}}}},{key:"initIcons",value:function(){var t=this.icons;this.appendChild(this.root,t.screenBack)}},{key:"show",value:function(){ZE.addClass(this.root,"show")}},{key:"hide",value:function(){ZE.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:xA.ROOT_TOP,index:0}}}]),n}(PA);function eT(){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 nT(){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 rT=function(t){P_(n,t);var e=D_(n);function n(){var t,r;L_(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return I_(B_(r=e.call.apply(e,lh(t=[this]).call(t,o))),"_onOrientationChange",(function(t){r.player.fullscreen&&r.config.rotateFullscreen&&(90===window.orientation||-90===window.orientation?r.player.setRotateDeg(0):r.player.setRotateDeg(90))})),r}return O_(n,[{key:"afterCreate",value:function(){var t=this;j_(R_(n.prototype),"afterCreate",this).call(this);var e=this.config,r=this.playerConfig;if(!e.disable){e.target&&(this.playerConfig.fullscreenTarget=this.config.target);var i=ZE.getFullScreenEl();r.fullscreenTarget===i&&this.player.getFullscreen().catch((function(t){})),this.initIcons(),this.handleFullscreen=this.hook("fullscreenChange",this.toggleFullScreen,{pre:function(e){var n=t.player.fullscreen;t.emitUserAction(e,"switch_fullscreen",{prop:"fullscreen",from:n,to:!n})}}),nb(this).call(this,".xgplayer-fullscreen",["touchend","click"],this.handleFullscreen),this.on("fullscreen_change",(function(e){var n=cw(t).call(t,".xg-tips");n&&t.changeLangTextKey(n,e?t.i18nKeys.EXITFULLSCREEN_TIPS:t.i18nKeys.FULLSCREEN_TIPS),t.animate(e)})),this.config.needBackIcon&&(this.topBackIcon=this.player.registerPlugin({plugin:tT,options:{config:{onClick:function(e){t.handleFullscreen(e)}}}})),"mobile"===rA.device&&window.addEventListener("orientationchange",this._onOrientationChange)}}},{key:"registerIcons",value:function(){return{fullscreen:{icon:eT,class:"xg-get-fullscreen"},exitFullscreen:{icon:nT,class:"xg-exit-fullscreen"}}}},{key:"destroy",value:function(){j_(R_(n.prototype),"destroy",this).call(this),this.unbind(".xgplayer-icon","mobile"===rA.device?"touchend":"click",this.handleFullscreen),"mobile"===rA.device&&window.removeEventListener("orientationchange",this._onOrientationChange)}},{key:"initIcons",value:function(){var t=this.icons;this.appendChild(".xgplayer-icon",t.fullscreen),this.appendChild(".xgplayer-icon",t.exitFullscreen)}},{key:"toggleFullScreen",value:function(t){t&&(t.preventDefault(),t.stopPropagation());var e=this.player,n=this.config;!0===n.useCssFullscreen||"function"==typeof n.useCssFullscreen&&n.useCssFullscreen()?(e.fullscreen?e.exitCssFullscreen():e.getCssFullscreen(),this.animate(e.fullscreen)):n.rotateFullscreen?(e.fullscreen?e.exitRotateFullscreen():e.getRotateFullscreen(),this.animate(e.fullscreen)):n.switchCallback&&"function"==typeof n.switchCallback?n.switchCallback(e.fullscreen):e.fullscreen?(e.exitFullscreen(),n.useScreenOrientation&&this.unlockScreen()):(e.getFullscreen().catch((function(t){})),n.useScreenOrientation&&e.aspectRatio>1&&this.lockScreen(n.lockOrientationType))}},{key:"animate",value:function(t){t?this.setAttr("data-state","full"):this.setAttr("data-state","normal"),this.topBackIcon&&(t?(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(YA(this,"FULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}},{key:"lockScreen",value:function(t){try{screen.orientation.lock(t).catch((function(t){}))}catch(e){}}},{key:"unlockScreen",value:function(){try{screen.orientation.unlock().catch((function(t){}))}catch(t){}}}],[{key:"pluginName",get:function(){return"fullscreen"}},{key:"defaultConfig",get:function(){return{position:xA.CONTROLS_RIGHT,index:0,useCssFullscreen:!1,rotateFullscreen:!1,useScreenOrientation:!1,lockOrientationType:"landscape",switchCallback:null,target:null,disable:!1,needBackIcon:!1}}}]),n}(JA),iT=function(t){P_(n,t);var e=D_(n);function n(t){var r;return L_(this,n),(r=e.call(this,t)).isActiving=!1,r}return O_(n,[{key:"duration",get:function(){var t=this.player,e=t.offsetDuration,n=t.duration;return this.playerConfig.customDuration||e||n}},{key:"currentTime",get:function(){var t=this.player,e=t.offsetCurrentTime,n=t.currentTime;return e>=0?e:n}},{key:"timeOffset",get:function(){return this.playerConfig.timeOffset||0}},{key:"afterCreate",value:function(){var t=this.player.controls.config.mode;this.mode="flex"===t?"flex":"normal",this.config.disable||("flex"===this.mode&&(this.createCenterTime(),this.root.style.display="none"),this.durationDom=cw(this).call(this,".time-duration"),this.timeDom=cw(this).call(this,".time-current"),this.listenEvents())}},{key:"listenEvents",value:function(){var t=this;this.on([lA,sA,uA],(function(e){"durationchange"===e.eventName&&(t.isActiving=!1),t.onTimeUpdate()})),this.on(oA,(function(){t.onTimeUpdate(!0)})),this.on(fA,(function(){t.onReset()}))}},{key:"show",value:function(t){if("flex"===this.mode)return this.centerCurDom&&(this.centerCurDom.style.display="block"),void(this.centerDurDom&&(this.centerDurDom.style.display="block"));this.root.style.display="block"}},{key:"hide",value:function(){if("flex"===this.mode)return this.centerCurDom&&(this.centerCurDom.style.display="none"),void(this.centerDurDom&&(this.centerDurDom.style.display="none"));this.root.style.display="none"}},{key:"onTimeUpdate",value:function(t){var e=this.player,n=this.config,r=this.duration;if(!n.disable&&!this.isActiving&&e.hasStart){var i=this.currentTime+this.timeOffset;i=ZE.adjustTimeByDuration(i,r,t),"flex"===this.mode?(this.centerCurDom.innerHTML=this.minWidthTime(ZE.format(i)),r!==1/0&&r>0&&(this.centerDurDom.innerHTML=ZE.format(r))):(this.timeDom.innerHTML=this.minWidthTime(ZE.format(i)),r!==1/0&&r>0&&(this.durationDom.innerHTML=ZE.format(r)))}}},{key:"onReset",value:function(){"flex"===this.mode?(this.centerCurDom.innerHTML=this.minWidthTime(ZE.format(0)),this.centerDurDom.innerHTML=ZE.format(0)):(this.timeDom.innerHTML=this.minWidthTime(ZE.format(0)),this.durationDom.innerHTML=ZE.format(0))}},{key:"createCenterTime",value:function(){var t=this.player;if(t.controls&&t.controls.center){var e=t.controls.center;this.centerCurDom=ZE.createDom("xg-icon","00:00",{},"xgplayer-time xg-time-left"),this.centerDurDom=ZE.createDom("xg-icon","00:00",{},"xgplayer-time xg-time-right"),e.children.length>0?e.insertBefore(this.centerCurDom,e.children[0]):e.appendChild(this.centerCurDom),e.appendChild(this.centerDurDom)}}},{key:"afterPlayerInit",value:function(){var t=this.config;this.duration===1/0||this.playerConfig.isLive?(ZE.hide(this.durationDom),ZE.hide(this.timeDom),ZE.hide(cw(this).call(this,".time-separator")),ZE.show(cw(this).call(this,".time-live-tag"))):ZE.hide(cw(this).call(this,".time-live-tag"));t.hide?this.hide():this.show()}},{key:"changeLiveState",value:function(t){t?(ZE.hide(this.durationDom),ZE.hide(this.timeDom),ZE.hide(cw(this).call(this,".time-separator")),ZE.show(cw(this).call(this,".time-live-tag"))):(ZE.hide(cw(this).call(this,".time-live-tag")),ZE.show(cw(this).call(this,".time-separator")),ZE.show(this.durationDom),ZE.show(this.timeDom))}},{key:"updateTime",value:function(t){this.isActiving=!0,!t&&0!==t||t>this.duration||("flex"!==this.mode?this.timeDom.innerHTML=this.minWidthTime(ZE.format(t)):this.centerCurDom.innerHTML=this.minWidthTime(ZE.format(t)))}},{key:"minWidthTime",value:function(t){var e;return c_(e=t.split(":")).call(e,(function(t){return'<span class="time-min-width">'.concat(t,"</span>")})).join(":")}},{key:"resetActive",value:function(){var t=this,e=this.player,n=function(){t.isActiving=!1};this.off(sA,n),e.isSeeking&&e.media.seeking?this.once(sA,n):this.isActiving=!1}},{key:"destroy",value:function(){var t=this.player.controls.center;this.centerCurDom&&t.removeChild(this.centerCurDom),this.centerCurDom=null,this.centerDurDom&&t.removeChild(this.centerDurDom),this.centerDurDom=null}},{key:"render",value:function(){if(!this.config.disable)return'<xg-icon class="xgplayer-time">\n <span class="time-current">00:00</span>\n <span class="time-separator">/</span>\n <span class="time-duration">00:00</span>\n <span class="time-live-tag">'.concat(this.i18n.LIVE_TIP,"</span>\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"time"}},{key:"defaultConfig",get:function(){return{position:xA.CONTROLS_LEFT,index:2,disable:!1}}}]),n}(PA);function oT(){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 aT(){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 sT(){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 uT=function(t){P_(n,t);var e=D_(n);function n(){var t,r;L_(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return I_(B_(r=e.call.apply(e,lh(t=[this]).call(t,o))),"onBarMousedown",(function(t){var e=B_(r).player,n=cw(r).call(r,".xgplayer-bar");ZE.event(t);var i=n.getBoundingClientRect(),o=ZE.getEventPos(t,e.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,t),document.addEventListener("mouseup",r.onBarMouseUp),r._d.isStart=!0,!1})),I_(B_(r),"onBarMouseMove",(function(t){var e=B_(r)._d;if(e.isStart){var n=B_(r),i=n.pos,o=n.player;t.preventDefault(),t.stopPropagation(),ZE.event(t);var a=ZE.getEventPos(t,o.zoom);e.isMoving=!0;var s=i.h-a.clientY+i.clientY;s>i.barH||r.updateVolumePos(s,t)}})),I_(B_(r),"onBarMouseUp",(function(t){ZE.event(t),document.removeEventListener("mouseup",r.onBarMouseUp);var e=B_(r)._d;e.isStart=!1,e.isMoving=!1})),I_(B_(r),"onMouseenter",(function(t){r._d.isActive=!0,r.focus(),r.emit("icon_mouseenter",{pluginName:r.pluginName})})),I_(B_(r),"onMouseleave",(function(t){r._d.isActive=!1,r.unFocus(100,!1,t),r.emit("icon_mouseleave",{pluginName:r.pluginName})})),I_(B_(r),"onVolumeChange",(function(t){if(r.player){var e=r.player,n=e.muted,i=e.volume;r._d.isMoving||(cw(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 O_(n,[{key:"registerIcons",value:function(){return{volumeSmall:{icon:aT,class:"xg-volume-small"},volumeLarge:{icon:oT,class:"xg-volume"},volumeMuted:{icon:sT,class:"xg-volume-mute"}}}},{key:"afterCreate",value:function(){var t=this;if(this._timerId=null,this._d={isStart:!1,isMoving:!1,isActive:!1},!this.config.disable){this.initIcons();var e=this.playerConfig,n=e.commonStyle,r=e.volume;if(n.volumeColor)cw(this).call(this,".xgplayer-drag").style.backgroundColor=n.volumeColor;if(this.changeMutedHandler=this.hook("mutedChange",(function(e){t.changeMuted(e)}),{pre:function(t){t.preventDefault(),t.stopPropagation()}}),this._onMouseenterHandler=this.hook("mouseenter",this.onMouseenter),this._onMouseleaveHandler=this.hook("mouseleave",this.onMouseleave),"mobile"!==rA.device&&"mobile"!==this.playerConfig.isMobileSimulateMode)nb(this).call(this,"mouseenter",this._onMouseenterHandler),nb(this).call(this,["blur","mouseleave"],this._onMouseleaveHandler),nb(this).call(this,".xgplayer-slider","mousedown",this.onBarMousedown),nb(this).call(this,".xgplayer-slider","mousemove",this.onBarMouseMove),nb(this).call(this,".xgplayer-slider","mouseup",this.onBarMouseUp);nb(this).call(this,".xgplayer-icon",["touchend","click"],this.changeMutedHandler),this.on(cA,this.onVolumeChange),this.once("loadeddata",this.onVolumeChange),"Number"!==ZE.typeOf(r)&&(this.player.volume=this.config.default),this.onVolumeChange()}}},{key:"updateVolumePos",value:function(t,e){var n=this.player,r=cw(this).call(this,".xgplayer-drag"),i=cw(this).call(this,".xgplayer-bar");if(i&&r){var o=i_(t/i.getBoundingClientRect().height*1e3,10);r.style.height="".concat(t,"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(e,"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 t=this.player,e=t.volume,n=t.muted,r=cw(this).call(this,".xgplayer-value-label"),i=Math.max(Math.min(e,1),0);r.innerText=n?0:Math.round(100*i)}},{key:"focus",value:function(){this.player.focus({autoHide:!1}),this._timerId&&(ZE.clearTimeout(this,this._timerId),this._timerId=null),ZE.addClass(this.root,"slide-show")}},{key:"unFocus",value:function(){var t=this,e=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&&(ZE.clearTimeout(this,this._timerId),this._timerId=null),this._timerId=ZE.setTimeout(this,(function(){i.isActive||(n?o.blur():o.focus(),ZE.removeClass(t.root,"slide-show"),i.isStart&&t.onBarMouseUp(r)),t._timerId=null}),e))}},{key:"changeMuted",value:function(t){t&&t.stopPropagation();var e=this.player;this._d.isStart&&this.onBarMouseUp(t),this.emitUserAction(t,"change_muted",{muted:e.muted,volume:e.volume,props:{muted:{from:e.muted,to:!e.muted}}}),e.volume>0&&(e.muted=!e.muted),e.volume<.01&&(e.volume=this.config.miniVolume)}},{key:"animate",value:function(t,e){t||0===e?this.setAttr("data-state","mute"):e<.5&&this.icons.volumeSmall?this.setAttr("data-state","small"):this.setAttr("data-state","normal")}},{key:"initIcons",value:function(){var t=this.icons;this.appendChild(".xgplayer-icon",t.volumeSmall),this.appendChild(".xgplayer-icon",t.volumeLarge),this.appendChild(".xgplayer-icon",t.volumeMuted)}},{key:"destroy",value:function(){this._timerId&&(ZE.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"===rA.device?"touchend":"click",this.changeMutedHandler)}},{key:"render",value:function(){var t;if(!this.config.disable){var e=this.config.default||this.player.volume,n=this.config.showValueLabel;return lh(t='\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*e,"</div>"):"",'\n <div class="xgplayer-bar">\n <xg-drag class="xgplayer-drag" style="height: ')).call(t,100*e,'%"></xg-drag>\n </div>\n </xg-slider>\n </xg-icon>')}}}],[{key:"pluginName",get:function(){return"volume"}},{key:"defaultConfig",get:function(){return{position:xA.CONTROLS_RIGHT,index:1,disable:!1,showValueLabel:!1,default:.6,miniVolume:.2}}}]),n}(PA),lT=a,cT=pe("iterator"),fT=!lT((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,n="";return t.pathname="c%20d",e.forEach((function(t,r){e.delete("b"),n+=r+t})),!t.toJSON||!e.size&&true||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[cT]||"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})),hT=y,pT=2147483647,dT=/[^\0-\u007E]/,gT=/[.\u3002\uFF0E\uFF61]/g,vT="Overflow: input needs wider integers to process",yT=RangeError,mT=hT(gT.exec),bT=Math.floor,wT=String.fromCharCode,_T=hT("".charCodeAt),kT=hT([].join),ET=hT([].push),AT=hT("".replace),TT=hT("".split),CT=hT("".toLowerCase),ST=function(t){return t+22+75*(t<26)},xT=function(t,e,n){var r=0;for(t=n?bT(t/700):t>>1,t+=bT(t/e);t>455;)t=bT(t/35),r+=36;return bT(r+36*t/(t+38))},LT=function(t){var e=[];t=function(t){for(var e=[],n=0,r=t.length;n<r;){var i=_T(t,n++);if(i>=55296&&i<=56319&&n<r){var o=_T(t,n++);56320==(64512&o)?ET(e,((1023&i)<<10)+(1023&o)+65536):(ET(e,i),n--)}else ET(e,i)}return e}(t);var n,r,i=t.length,o=128,a=0,s=72;for(n=0;n<t.length;n++)(r=t[n])<128&&ET(e,wT(r));var u=e.length,l=u;for(u&&ET(e,"-");l<i;){var c=pT;for(n=0;n<t.length;n++)(r=t[n])>=o&&r<c&&(c=r);var f=l+1;if(c-o>bT((pT-a)/f))throw yT(vT);for(a+=(c-o)*f,o=c,n=0;n<t.length;n++){if((r=t[n])<o&&++a>pT)throw yT(vT);if(r==o){for(var h=a,p=36;;){var d=p<=s?1:p>=s+26?26:p-s;if(h<d)break;var g=h-d,v=36-d;ET(e,wT(ST(d+g%v))),h=bT(g/v),p+=36}ET(e,wT(ST(h))),s=xT(a,f,l==u),a=0,l++}}a++,o++}return kT(e,"")},MT=fo,OT=Mn,IT=o,PT=P,RT=y,UT=M,BT=fT,DT=fo,jT=po,NT=function(t,e,n){for(var r in e)n&&n.unsafe&&t[r]?t[r]=e[r]:MT(t,r,e[r],n);return t},FT=jo,HT=$u,zT=ta,VT=Zd,qT=x,GT=Zt,YT=Je,WT=lr,KT=rn,XT=et,$T=ei,JT=Wi,QT=F,ZT=od,tC=Dh,eC=ag,nC=pE,rC=pe("iterator"),iC="URLSearchParams",oC=iC+"Iterator",aC=zT.set,sC=zT.getterFor(iC),uC=zT.getterFor(oC),lC=Object.getOwnPropertyDescriptor,cC=function(t){if(!UT)return IT[t];var e=lC(IT,t);return e&&e.value},fC=cC("fetch"),hC=cC("Request"),pC=cC("Headers"),dC=hC&&hC.prototype,gC=pC&&pC.prototype,vC=IT.RegExp,yC=IT.TypeError,mC=IT.decodeURIComponent,bC=IT.encodeURIComponent,wC=RT("".charAt),_C=RT([].join),kC=RT([].push),EC=RT("".replace),AC=RT([].shift),TC=RT([].splice),CC=RT("".split),SC=RT("".slice),xC=/\+/g,LC=Array(4),MC=function(t){return LC[t-1]||(LC[t-1]=vC("((?:%[\\da-f]{2}){"+t+"})","gi"))},OC=function(t){try{return mC(t)}catch(XM){return t}},IC=function(t){var e=EC(t,xC," "),n=4;try{return mC(e)}catch(XM){for(;n;)e=EC(e,MC(n--),OC);return e}},PC=/[!'()~]|%20/g,RC={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},UC=function(t){return RC[t]},BC=function(t){return EC(bC(t),PC,UC)},DC=HT((function(t,e){aC(this,{type:oC,iterator:ZT(sC(t).entries),kind:e})}),"Iterator",(function(){var t=uC(this),e=t.kind,n=t.iterator.next(),r=n.value;return n.done||(n.value="keys"===e?r.key:"values"===e?r.value:[r.key,r.value]),n}),!0),jC=function(t){this.entries=[],this.url=null,void 0!==t&&(XT(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===wC(t,0)?SC(t,1):t:$T(t)))};jC.prototype={type:iC,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,n,r,i,o,a,s,u=tC(t);if(u)for(n=(e=ZT(t,u)).next;!(r=PT(n,e)).done;){if(o=(i=ZT(KT(r.value))).next,(a=PT(o,i)).done||(s=PT(o,i)).done||!PT(o,i).done)throw yC("Expected sequence with length 2");kC(this.entries,{key:$T(a.value),value:$T(s.value)})}else for(var l in t)GT(t,l)&&kC(this.entries,{key:l,value:$T(t[l])})},parseQuery:function(t){if(t)for(var e,n,r=CC(t,"&"),i=0;i<r.length;)(e=r[i++]).length&&(n=CC(e,"="),kC(this.entries,{key:IC(AC(n)),value:IC(_C(n,"="))}))},serialize:function(){for(var t,e=this.entries,n=[],r=0;r<e.length;)t=e[r++],kC(n,BC(t.key)+"="+BC(t.value));return _C(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var NC=function(){VT(this,FC);var t=aC(this,new jC(arguments.length>0?arguments[0]:void 0));UT||(this.length=t.entries.length)},FC=NC.prototype;if(NT(FC,{append:function(t,e){eC(arguments.length,2);var n=sC(this);kC(n.entries,{key:$T(t),value:$T(e)}),UT||this.length++,n.updateURL()},delete:function(t){eC(arguments.length,1);for(var e=sC(this),n=e.entries,r=$T(t),i=0;i<n.length;)n[i].key===r?TC(n,i,1):i++;UT||(this.length=n.length),e.updateURL()},get:function(t){eC(arguments.length,1);for(var e=sC(this).entries,n=$T(t),r=0;r<e.length;r++)if(e[r].key===n)return e[r].value;return null},getAll:function(t){eC(arguments.length,1);for(var e=sC(this).entries,n=$T(t),r=[],i=0;i<e.length;i++)e[i].key===n&&kC(r,e[i].value);return r},has:function(t){eC(arguments.length,1);for(var e=sC(this).entries,n=$T(t),r=0;r<e.length;)if(e[r++].key===n)return!0;return!1},set:function(t,e){eC(arguments.length,1);for(var n,r=sC(this),i=r.entries,o=!1,a=$T(t),s=$T(e),u=0;u<i.length;u++)(n=i[u]).key===a&&(o?TC(i,u--,1):(o=!0,n.value=s));o||kC(i,{key:a,value:s}),UT||(this.length=i.length),r.updateURL()},sort:function(){var t=sC(this);nC(t.entries,(function(t,e){return t.key>e.key?1:-1})),t.updateURL()},forEach:function(t){for(var e,n=sC(this).entries,r=YT(t,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)r((e=n[i++]).value,e.key,this)},keys:function(){return new DC(this,"keys")},values:function(){return new DC(this,"values")},entries:function(){return new DC(this,"entries")}},{enumerable:!0}),DT(FC,rC,FC.entries,{name:"entries"}),DT(FC,"toString",(function(){return sC(this).serialize()}),{enumerable:!0}),UT&&jT(FC,"size",{get:function(){return sC(this).entries.length},configurable:!0,enumerable:!0}),FT(NC,iC),OT({global:!0,constructor:!0,forced:!BT},{URLSearchParams:NC}),!BT&&qT(pC)){var HC=RT(gC.has),zC=RT(gC.set),VC=function(t){if(XT(t)){var e,n=t.body;if(WT(n)===iC)return e=t.headers?new pC(t.headers):new pC,HC(e,"content-type")||zC(e,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),JT(t,{body:QT(0,$T(n)),headers:QT(0,e)})}return t};if(qT(fC)&&OT({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(t){return fC(t,arguments.length>1?VC(arguments[1]):{})}}),qT(hC)){var qC=function(t){return VT(this,dC),new hC(t,arguments.length>1?VC(arguments[1]):{})};dC.constructor=qC,qC.prototype=dC,OT({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:qC})}}var GC,YC=Mn,WC=M,KC=fT,XC=o,$C=Je,JC=y,QC=fo,ZC=po,tS=Zd,eS=Zt,nS=E_,rS=_b,iS=ro,oS=bc.codeAt,aS=function(t){var e,n,r=[],i=TT(AT(CT(t),gT,"."),".");for(e=0;e<i.length;e++)n=i[e],ET(r,mT(dT,n)?"xn--"+LT(n):n);return kT(r,".")},sS=ei,uS=jo,lS=ag,cS={URLSearchParams:NC,getState:sC},fS=ta,hS=fS.set,pS=fS.getterFor("URL"),dS=cS.URLSearchParams,gS=cS.getState,vS=XC.URL,yS=XC.TypeError,mS=XC.parseInt,bS=Math.floor,wS=Math.pow,_S=JC("".charAt),kS=JC(/./.exec),ES=JC([].join),AS=JC(1..toString),TS=JC([].pop),CS=JC([].push),SS=JC("".replace),xS=JC([].shift),LS=JC("".split),MS=JC("".slice),OS=JC("".toLowerCase),IS=JC([].unshift),PS="Invalid scheme",RS="Invalid host",US="Invalid port",BS=/[a-z]/i,DS=/[\d+-.a-z]/i,jS=/\d/,NS=/^0x/i,FS=/^[0-7]+$/,HS=/^\d+$/,zS=/^[\da-f]+$/i,VS=/[\0\t\n\r #%/:<>?@[\\\]^|]/,qS=/[\0\t\n\r #/:<>?@[\\\]^|]/,GS=/^[\u0000-\u0020]+/,YS=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,WS=/[\t\n\r]/g,KS=function(t){var e,n,r,i;if("number"==typeof t){for(e=[],n=0;n<4;n++)IS(e,t%256),t=bS(t/256);return ES(e,".")}if("object"==typeof t){for(e="",r=function(t){for(var e=null,n=1,r=null,i=0,o=0;o<8;o++)0!==t[o]?(i>n&&(e=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(e=r,n=i),e}(t),n=0;n<8;n++)i&&0===t[n]||(i&&(i=!1),r===n?(e+=n?":":"::",i=!0):(e+=AS(t[n],16),n<7&&(e+=":")));return"["+e+"]"}return t},XS={},$S=nS({},XS,{" ":1,'"':1,"<":1,">":1,"`":1}),JS=nS({},$S,{"#":1,"?":1,"{":1,"}":1}),QS=nS({},JS,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ZS=function(t,e){var n=oS(t,0);return n>32&&n<127&&!eS(e,t)?t:encodeURIComponent(t)},tx={ftp:21,file:null,http:80,https:443,ws:80,wss:443},ex=function(t,e){var n;return 2==t.length&&kS(BS,_S(t,0))&&(":"==(n=_S(t,1))||!e&&"|"==n)},nx=function(t){var e;return t.length>1&&ex(MS(t,0,2))&&(2==t.length||"/"===(e=_S(t,2))||"\\"===e||"?"===e||"#"===e)},rx=function(t){return"."===t||"%2e"===OS(t)},ix={},ox={},ax={},sx={},ux={},lx={},cx={},fx={},hx={},px={},dx={},gx={},vx={},yx={},mx={},bx={},wx={},_x={},kx={},Ex={},Ax={},Tx=function(t,e,n){var r,i,o,a=sS(t);if(e){if(i=this.parse(a))throw yS(i);this.searchParams=null}else{if(void 0!==n&&(r=new Tx(n,!0)),i=this.parse(a,null,r))throw yS(i);(o=gS(new dS)).bindURL(this),this.searchParams=o}};Tx.prototype={type:"URL",parse:function(t,e,n){var r,i,o,a,s,u=this,l=e||ix,c=0,f="",h=!1,p=!1,d=!1;for(t=sS(t),e||(u.scheme="",u.username="",u.password="",u.host=null,u.port=null,u.path=[],u.query=null,u.fragment=null,u.cannotBeABaseURL=!1,t=SS(t,GS,""),t=SS(t,YS,"$1")),t=SS(t,WS,""),r=rS(t);c<=r.length;){switch(i=r[c],l){case ix:if(!i||!kS(BS,i)){if(e)return PS;l=ax;continue}f+=OS(i),l=ox;break;case ox:if(i&&(kS(DS,i)||"+"==i||"-"==i||"."==i))f+=OS(i);else{if(":"!=i){if(e)return PS;f="",l=ax,c=0;continue}if(e&&(u.isSpecial()!=eS(tx,f)||"file"==f&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=f,e)return void(u.isSpecial()&&tx[u.scheme]==u.port&&(u.port=null));f="","file"==u.scheme?l=yx:u.isSpecial()&&n&&n.scheme==u.scheme?l=sx:u.isSpecial()?l=fx:"/"==r[c+1]?(l=ux,c++):(u.cannotBeABaseURL=!0,CS(u.path,""),l=kx)}break;case ax:if(!n||n.cannotBeABaseURL&&"#"!=i)return PS;if(n.cannotBeABaseURL&&"#"==i){u.scheme=n.scheme,u.path=iS(n.path),u.query=n.query,u.fragment="",u.cannotBeABaseURL=!0,l=Ax;break}l="file"==n.scheme?yx:lx;continue;case sx:if("/"!=i||"/"!=r[c+1]){l=lx;continue}l=hx,c++;break;case ux:if("/"==i){l=px;break}l=_x;continue;case lx:if(u.scheme=n.scheme,i==GC)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=iS(n.path),u.query=n.query;else if("/"==i||"\\"==i&&u.isSpecial())l=cx;else if("?"==i)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=iS(n.path),u.query="",l=Ex;else{if("#"!=i){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=iS(n.path),u.path.length--,l=_x;continue}u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=iS(n.path),u.query=n.query,u.fragment="",l=Ax}break;case cx:if(!u.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,l=_x;continue}l=px}else l=hx;break;case fx:if(l=hx,"/"!=i||"/"!=_S(f,c+1))continue;c++;break;case hx:if("/"!=i&&"\\"!=i){l=px;continue}break;case px:if("@"==i){h&&(f="%40"+f),h=!0,o=rS(f);for(var g=0;g<o.length;g++){var v=o[g];if(":"!=v||d){var y=ZS(v,QS);d?u.password+=y:u.username+=y}else d=!0}f=""}else if(i==GC||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(h&&""==f)return"Invalid authority";c-=rS(f).length+1,f="",l=dx}else f+=i;break;case dx:case gx:if(e&&"file"==u.scheme){l=bx;continue}if(":"!=i||p){if(i==GC||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(u.isSpecial()&&""==f)return RS;if(e&&""==f&&(u.includesCredentials()||null!==u.port))return;if(a=u.parseHost(f))return a;if(f="",l=wx,e)return;continue}"["==i?p=!0:"]"==i&&(p=!1),f+=i}else{if(""==f)return RS;if(a=u.parseHost(f))return a;if(f="",l=vx,e==gx)return}break;case vx:if(!kS(jS,i)){if(i==GC||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()||e){if(""!=f){var m=mS(f,10);if(m>65535)return US;u.port=u.isSpecial()&&m===tx[u.scheme]?null:m,f=""}if(e)return;l=wx;continue}return US}f+=i;break;case yx:if(u.scheme="file","/"==i||"\\"==i)l=mx;else{if(!n||"file"!=n.scheme){l=_x;continue}if(i==GC)u.host=n.host,u.path=iS(n.path),u.query=n.query;else if("?"==i)u.host=n.host,u.path=iS(n.path),u.query="",l=Ex;else{if("#"!=i){nx(ES(iS(r,c),""))||(u.host=n.host,u.path=iS(n.path),u.shortenPath()),l=_x;continue}u.host=n.host,u.path=iS(n.path),u.query=n.query,u.fragment="",l=Ax}}break;case mx:if("/"==i||"\\"==i){l=bx;break}n&&"file"==n.scheme&&!nx(ES(iS(r,c),""))&&(ex(n.path[0],!0)?CS(u.path,n.path[0]):u.host=n.host),l=_x;continue;case bx:if(i==GC||"/"==i||"\\"==i||"?"==i||"#"==i){if(!e&&ex(f))l=_x;else if(""==f){if(u.host="",e)return;l=wx}else{if(a=u.parseHost(f))return a;if("localhost"==u.host&&(u.host=""),e)return;f="",l=wx}continue}f+=i;break;case wx:if(u.isSpecial()){if(l=_x,"/"!=i&&"\\"!=i)continue}else if(e||"?"!=i)if(e||"#"!=i){if(i!=GC&&(l=_x,"/"!=i))continue}else u.fragment="",l=Ax;else u.query="",l=Ex;break;case _x:if(i==GC||"/"==i||"\\"==i&&u.isSpecial()||!e&&("?"==i||"#"==i)){if(".."===(s=OS(s=f))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(u.shortenPath(),"/"==i||"\\"==i&&u.isSpecial()||CS(u.path,"")):rx(f)?"/"==i||"\\"==i&&u.isSpecial()||CS(u.path,""):("file"==u.scheme&&!u.path.length&&ex(f)&&(u.host&&(u.host=""),f=_S(f,0)+":"),CS(u.path,f)),f="","file"==u.scheme&&(i==GC||"?"==i||"#"==i))for(;u.path.length>1&&""===u.path[0];)xS(u.path);"?"==i?(u.query="",l=Ex):"#"==i&&(u.fragment="",l=Ax)}else f+=ZS(i,JS);break;case kx:"?"==i?(u.query="",l=Ex):"#"==i?(u.fragment="",l=Ax):i!=GC&&(u.path[0]+=ZS(i,XS));break;case Ex:e||"#"!=i?i!=GC&&("'"==i&&u.isSpecial()?u.query+="%27":u.query+="#"==i?"%23":ZS(i,XS)):(u.fragment="",l=Ax);break;case Ax:i!=GC&&(u.fragment+=ZS(i,$S))}c++}},parseHost:function(t){var e,n,r;if("["==_S(t,0)){if("]"!=_S(t,t.length-1))return RS;if(e=function(t){var e,n,r,i,o,a,s,u=[0,0,0,0,0,0,0,0],l=0,c=null,f=0,h=function(){return _S(t,f)};if(":"==h()){if(":"!=_S(t,1))return;f+=2,c=++l}for(;h();){if(8==l)return;if(":"!=h()){for(e=n=0;n<4&&kS(zS,h());)e=16*e+mS(h(),16),f++,n++;if("."==h()){if(0==n)return;if(f-=n,l>6)return;for(r=0;h();){if(i=null,r>0){if(!("."==h()&&r<4))return;f++}if(!kS(jS,h()))return;for(;kS(jS,h());){if(o=mS(h(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;f++}u[l]=256*u[l]+i,2!=++r&&4!=r||l++}if(4!=r)return;break}if(":"==h()){if(f++,!h())return}else if(h())return;u[l++]=e}else{if(null!==c)return;f++,c=++l}}if(null!==c)for(a=l-c,l=7;0!=l&&a>0;)s=u[l],u[l--]=u[c+a-1],u[c+--a]=s;else if(8!=l)return;return u}(MS(t,1,-1)),!e)return RS;this.host=e}else if(this.isSpecial()){if(t=aS(t),kS(VS,t))return RS;if(e=function(t){var e,n,r,i,o,a,s,u=LS(t,".");if(u.length&&""==u[u.length-1]&&u.length--,(e=u.length)>4)return t;for(n=[],r=0;r<e;r++){if(""==(i=u[r]))return t;if(o=10,i.length>1&&"0"==_S(i,0)&&(o=kS(NS,i)?16:8,i=MS(i,8==o?1:2)),""===i)a=0;else{if(!kS(10==o?HS:8==o?FS:zS,i))return t;a=mS(i,o)}CS(n,a)}for(r=0;r<e;r++)if(a=n[r],r==e-1){if(a>=wS(256,5-e))return null}else if(a>255)return null;for(s=TS(n),r=0;r<n.length;r++)s+=n[r]*wS(256,3-r);return s}(t),null===e)return RS;this.host=e}else{if(kS(qS,t))return RS;for(e="",n=rS(t),r=0;r<n.length;r++)e+=ZS(n[r],XS);this.host=e}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return eS(tx,this.scheme)},shortenPath:function(){var t=this.path,e=t.length;!e||"file"==this.scheme&&1==e&&ex(t[0],!0)||t.length--},serialize:function(){var t=this,e=t.scheme,n=t.username,r=t.password,i=t.host,o=t.port,a=t.path,s=t.query,u=t.fragment,l=e+":";return null!==i?(l+="//",t.includesCredentials()&&(l+=n+(r?":"+r:"")+"@"),l+=KS(i),null!==o&&(l+=":"+o)):"file"==e&&(l+="//"),l+=t.cannotBeABaseURL?a[0]:a.length?"/"+ES(a,"/"):"",null!==s&&(l+="?"+s),null!==u&&(l+="#"+u),l},setHref:function(t){var e=this.parse(t);if(e)throw yS(e);this.searchParams.update()},getOrigin:function(){var t=this.scheme,e=this.port;if("blob"==t)try{return new Cx(t.path[0]).origin}catch(XM){return"null"}return"file"!=t&&this.isSpecial()?t+"://"+KS(this.host)+(null!==e?":"+e:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(t){this.parse(sS(t)+":",ix)},getUsername:function(){return this.username},setUsername:function(t){var e=rS(sS(t));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<e.length;n++)this.username+=ZS(e[n],QS)}},getPassword:function(){return this.password},setPassword:function(t){var e=rS(sS(t));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<e.length;n++)this.password+=ZS(e[n],QS)}},getHost:function(){var t=this.host,e=this.port;return null===t?"":null===e?KS(t):KS(t)+":"+e},setHost:function(t){this.cannotBeABaseURL||this.parse(t,dx)},getHostname:function(){var t=this.host;return null===t?"":KS(t)},setHostname:function(t){this.cannotBeABaseURL||this.parse(t,gx)},getPort:function(){var t=this.port;return null===t?"":sS(t)},setPort:function(t){this.cannotHaveUsernamePasswordPort()||(""==(t=sS(t))?this.port=null:this.parse(t,vx))},getPathname:function(){var t=this.path;return this.cannotBeABaseURL?t[0]:t.length?"/"+ES(t,"/"):""},setPathname:function(t){this.cannotBeABaseURL||(this.path=[],this.parse(t,wx))},getSearch:function(){var t=this.query;return t?"?"+t:""},setSearch:function(t){""==(t=sS(t))?this.query=null:("?"==_S(t,0)&&(t=MS(t,1)),this.query="",this.parse(t,Ex)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var t=this.fragment;return t?"#"+t:""},setHash:function(t){""!=(t=sS(t))?("#"==_S(t,0)&&(t=MS(t,1)),this.fragment="",this.parse(t,Ax)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Cx=function(t){var e=tS(this,Sx),n=lS(arguments.length,1)>1?arguments[1]:void 0,r=hS(e,new Tx(t,!1,n));WC||(e.href=r.serialize(),e.origin=r.getOrigin(),e.protocol=r.getProtocol(),e.username=r.getUsername(),e.password=r.getPassword(),e.host=r.getHost(),e.hostname=r.getHostname(),e.port=r.getPort(),e.pathname=r.getPathname(),e.search=r.getSearch(),e.searchParams=r.getSearchParams(),e.hash=r.getHash())},Sx=Cx.prototype,xx=function(t,e){return{get:function(){return pS(this)[t]()},set:e&&function(t){return pS(this)[e](t)},configurable:!0,enumerable:!0}};if(WC&&(ZC(Sx,"href",xx("serialize","setHref")),ZC(Sx,"origin",xx("getOrigin")),ZC(Sx,"protocol",xx("getProtocol","setProtocol")),ZC(Sx,"username",xx("getUsername","setUsername")),ZC(Sx,"password",xx("getPassword","setPassword")),ZC(Sx,"host",xx("getHost","setHost")),ZC(Sx,"hostname",xx("getHostname","setHostname")),ZC(Sx,"port",xx("getPort","setPort")),ZC(Sx,"pathname",xx("getPathname","setPathname")),ZC(Sx,"search",xx("getSearch","setSearch")),ZC(Sx,"searchParams",xx("getSearchParams")),ZC(Sx,"hash",xx("getHash","setHash"))),QC(Sx,"toJSON",(function(){return pS(this).serialize()}),{enumerable:!0}),QC(Sx,"toString",(function(){return pS(this).serialize()}),{enumerable:!0}),vS){var Lx=vS.createObjectURL,Mx=vS.revokeObjectURL;Lx&&QC(Cx,"createObjectURL",$C(Lx,vS)),Mx&&QC(Cx,"revokeObjectURL",$C(Mx,vS))}uS(Cx,"URL"),YC({global:!0,constructor:!0,forced:!KC,sham:!WC},{URL:Cx});var Ox=Mn,Ix=a,Px=ag,Rx=ei,Ux=fT,Bx=st("URL");Ox({target:"URL",stat:!0,forced:!(Ux&&Ix((function(){Bx.canParse()})))},{canParse:function(t){var e=Px(arguments.length,1),n=Rx(t),r=e<2||void 0===arguments[1]?void 0:Rx(arguments[1]);try{return!!new Bx(n,r)}catch(XM){return!1}}});var Dx=n(nt.URL);function jx(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="31" height="40" viewBox="0 -5 31 40">\n <path fill="#fff" transform="scale(1.3, 1.3)" class=\'path_full\' d="M9,10v1a.9.9,0,0,1-1,1,.9.9,0,0,1-1-1V9A.9.9,0,0,1,8,8h2a.9.9,0,0,1,1,1,.9.9,0,0,1-1,1Zm6,4V13a1,1,0,0,1,2,0v2a.9.9,0,0,1-1,1H14a1,1,0,0,1,0-2Zm3-7H6V17H18Zm2,0V17a2,2,0,0,1-2,2H6a2,2,0,0,1-2-2V7A2,2,0,0,1,6,5H18A2,2,0,0,1,20,7Z"></path>\n</svg>\n',"image/svg+xml").firstChild}function Nx(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="31" height="40" viewBox="0 -5 31 40">\n <path fill="#fff" transform="scale(1.3, 1.3)" d="M9,10V9a.9.9,0,0,1,1-1,.9.9,0,0,1,1,1v2a.9.9,0,0,1-1,1H8a.9.9,0,0,1-1-1,.9.9,0,0,1,1-1Zm6,4v1a1,1,0,0,1-2,0V13a.9.9,0,0,1,1-1h2a1,1,0,0,1,0,2Zm3-7H6V17H18Zm2,0V17a2,2,0,0,1-2,2H6a2,2,0,0,1-2-2V7A2,2,0,0,1,6,5H18A2,2,0,0,1,20,7Z"></path>\n</svg>\n',"image/svg+xml").firstChild}var Fx=function(t){P_(n,t);var e=D_(n);function n(){return L_(this,n),e.apply(this,arguments)}return O_(n,[{key:"beforeCreate",value:function(t){"boolean"==typeof t.player.config.cssFullscreen&&(t.config.disable=!t.player.config.cssFullscreen)}},{key:"afterCreate",value:function(){var t,e=this;j_(R_(n.prototype),"afterCreate",this).call(this),this.config.disable||(this.config.target&&(this.playerConfig.fullscreenTarget=this.config.target),this.initIcons(),this.on("cssFullscreen_change",(function(t){e.animate(t)})),this.btnClick=nb(t=this.btnClick).call(t,this),this.handleCssFullscreen=this.hook("cssFullscreen_change",this.btnClick,{pre:function(t){t.preventDefault(),t.stopPropagation()}}),nb(this).call(this,["click","touchend"],this.handleCssFullscreen))}},{key:"initIcons",value:function(){var t=this.icons,e=cw(this).call(this,".xgplayer-icon");e.appendChild(t.cssFullscreen),e.appendChild(t.exitCssFullscreen)}},{key:"btnClick",value:function(t){t.preventDefault(),t.stopPropagation();var e=this.player.isCssfullScreen;this.emitUserAction(t,"switch_cssfullscreen",{cssfullscreen:e}),e?this.player.exitCssFullscreen():this.player.getCssFullscreen()}},{key:"animate",value:function(t){this.root&&(t?this.setAttr("data-state","full"):this.setAttr("data-state","normal"),this.switchTips(t))}},{key:"switchTips",value:function(t){var e=this.i18nKeys,n=cw(this).call(this,".xg-tips");n&&this.changeLangTextKey(n,t?e.EXITCSSFULLSCREEN_TIPS:e.CSSFULLSCREEN_TIPS)}},{key:"registerIcons",value:function(){return{cssFullscreen:{icon:jx,class:"xg-get-cssfull"},exitCssFullscreen:{icon:Nx,class:"xg-exit-cssfull"}}}},{key:"destroy",value:function(){j_(R_(n.prototype),"destroy",this).call(this),this.unbind(["click","touchend"],this.btnClick)}},{key:"render",value:function(){if(!this.config.disable)return"<xg-icon class='xgplayer-cssfullscreen'>\n <div class=\"xgplayer-icon\">\n </div>\n ".concat(YA(this,"CSSFULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"cssFullscreen"}},{key:"defaultConfig",get:function(){return{position:xA.CONTROLS_RIGHT,index:1,disable:!1,target:null}}}]),n}(JA),Hx=et,zx=_,Vx=pe("match"),qx=function(t){var e;return Hx(t)&&(void 0!==(e=t[Vx])?!!e:"RegExp"==zx(t))},Gx=TypeError,Yx=pe("match"),Wx=et,Kx=Math.floor;Mn({target:"Number",stat:!0},{isInteger:Number.isInteger||function(t){return!Wx(t)&&isFinite(t)&&Kx(t)===t}});var Xx=n(nt.Number.isInteger),$x=fi.includes;Mn({target:"Array",proto:!0,forced:a((function(){return!Array(1).includes()}))},{includes:function(t){return $x(this,t,arguments.length>1?arguments[1]:void 0)}});var Jx=af("Array").includes,Qx=Mn,Zx=function(t){if(qx(t))throw Gx("The method doesn't accept regular expressions");return t},tL=X,eL=ei,nL=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[Yx]=!1,"/./"[t](e)}catch(r){}}return!1},rL=y("".indexOf);Qx({target:"String",proto:!0,forced:!nL("includes")},{includes:function(t){return!!~rL(eL(tL(this)),eL(Zx(t)),arguments.length>1?arguments[1]:void 0)}});var iL=af("String").includes,oL=ut,aL=Jx,sL=iL,uL=Array.prototype,lL=String.prototype,cL=n((function(t){var e=t.includes;return t===uL||oL(uL,t)&&e===uL.includes?aL:"string"==typeof t||t===lL||oL(lL,t)&&e===lL.includes?sL:e})),fL=$t,hL=ai,pL=Kn,dL=function(t){for(var e=fL(this),n=pL(e),r=arguments.length,i=hL(r>1?arguments[1]:void 0,n),o=r>2?arguments[2]:void 0,a=void 0===o?n:hL(o,n);a>i;)e[i++]=t;return e};Mn({target:"Array",proto:!0},{fill:dL});var gL=af("Array").fill,vL=ut,yL=gL,mL=Array.prototype,bL=n((function(t){var e=t.fill;return t===mL||vL(mL,t)&&e===mL.fill?yL:e}));function wL(t){return(wL="function"==typeof Oh&&"symbol"==typeof eb?function(t){return typeof t}:function(t){return t&&"function"==typeof Oh&&t.constructor===Oh&&t!==Oh.prototype?"symbol":typeof t})(t)}function _L(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),xp(t,kL(r.key),r)}}function kL(t){var e=function(t,e){if("object"!==Mc(t)||null===t)return t;var n=t[Cb];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Mc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Mc(e)?e:String(e)}var EL,AL,TL,CL=1,SL=2,xL=3,LL=4,ML=["Boolean","Number","String","Undefined","Null","Date","Object"],OL=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.name=e||"",this._prefix="[".concat(this.name,"]"),this.logCacheLevel=(null==n?void 0:n.logCacheLevel)||3,this.logMaxSize=(null==n?void 0:n.logMaxSize)||204800,this.logSize=0,this.logTextArray=[]}var e,n,r;return e=t,n=[{key:"debug",value:function(){for(var e,n,r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,lh(e=[CL]).call(e,o)),t.disabled||(r=console).debug.apply(r,lh(n=[this._prefix,IL()]).call(n,o))}},{key:"log",value:function(){for(var e,n,r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,lh(e=[SL]).call(e,o)),t.disabled||(r=console).log.apply(r,lh(n=[this._prefix,IL()]).call(n,o))}},{key:"warn",value:function(){for(var e,n,r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,lh(e=[xL]).call(e,o)),t.disabled||(r=console).warn.apply(r,lh(n=[this._prefix,IL()]).call(n,o))}},{key:"error",value:function(){for(var e,n,r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];this.logCache.apply(this,lh(e=[LL]).call(e,o)),t.disabled||(r=console).error.apply(r,lh(n=[this._prefix,IL()]).call(n,o))}},{key:"logCache",value:function(t){if(!(t<this.logCacheLevel)){var e="";try{for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=c_(r).call(r,(function(t){return RL(t)}));e=this._prefix+IL()+Mh(o)}catch(s){return}if(t>=this.logCacheLevel&&(this.logSize+=e.length,this.logTextArray.push(e)),this.logSize>this.logMaxSize){var a=this.logTextArray.shift();this.logSize-=a.length}}}},{key:"getLogCache",value:function(){var t=this.logTextArray.join("\n");return this.reset(),t}},{key:"reset",value:function(){this.logTextArray=[],this.logSize=0}},{key:"table",value:function(){var e;t.disabled||(console.group(this._prefix),(e=console).table.apply(e,arguments),console.groupEnd())}},{key:"setLogLevel",value:function(t){this.logCacheLevel=t}}],r=[{key:"enable",value:function(){t.disabled=!1}},{key:"disable",value:function(){t.disabled=!0}}],n&&_L(e.prototype,n),r&&_L(e,r),xp(e,"prototype",{writable:!1}),t}();function IL(){return(new Date).toLocaleString()}function PL(t){var e;if("object"!==wL(t))return t;var n=tb(e=Object.prototype.toString.call(t)).call(e,8,-1);switch(n){case"Array":case"Uint8Array":case"ArrayBuffer":return n+"["+t.length+"]";case"Object":return"{}";default:return n}}function RL(t,e,n){var r;n||(n=1),e||(e=2);var i={};if(!t||"object"!==wL(t))return t;var o=tb(r=Object.prototype.toString.call(t)).call(r,8,-1);if(!cL(ML).call(ML,o))return o;if(!(n>e)){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(n===e?i[a]=PL(t[a]):"object"===wL(t[a])?i[a]=RL(t[a],e,n+1):i[a]=t[a]);return i}}EL=OL,TL=!0,(AL=kL(AL="disabled"))in EL?xp(EL,AL,{value:TL,enumerable:!0,configurable:!0,writable:!0}):EL[AL]=TL;var UL=new Blob([new Uint8Array([255,227,24,196,0,0,0,3,72,1,64,0,0,4,132,16,31,227,192,225,76,255,67,12,255,221,27,255,228,97,73,63,255,195,131,69,192,232,223,255,255,207,102,239,255,255,255,101,158,206,70,20,59,255,254,95,70,149,66,4,16,128,0,2,2,32,240,138,255,36,106,183,255,227,24,196,59,11,34,62,80,49,135,40,0,253,29,191,209,200,141,71,7,255,252,152,74,15,130,33,185,6,63,255,252,195,70,203,86,53,15,255,255,247,103,76,121,64,32,47,255,34,227,194,209,138,76,65,77,69,51,46,57,55,170,170,170,170,170,170,170,170,170,170,255,227,24,196,73,13,153,210,100,81,135,56,0,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170])],{type:"audio/mpeg"}),BL=new Blob([new Uint8Array([0,0,0,28,102,116,121,112,105,115,111,109,0,0,2,0,105,115,111,109,105,115,111,50,109,112,52,49,0,0,0,8,102,114,101,101,0,0,2,239,109,100,97,116,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,0,0,2,194,109,111,111,118,0,0,0,108,109,118,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,232,0,0,0,47,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,1,236,116,114,97,107,0,0,0,92,116,107,104,100,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,47,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,101,100,116,115,0,0,0,28,101,108,115,116,0,0,0,0,0,0,0,1,0,0,0,47,0,0,0,0,0,1,0,0,0,0,1,100,109,100,105,97,0,0,0,32,109,100,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,68,0,0,8,0,85,196,0,0,0,0,0,45,104,100,108,114,0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0,0,0,1,15,109,105,110,102,0,0,0,16,115,109,104,100,0,0,0,0,0,0,0,0,0,0,0,36,100,105,110,102,0,0,0,28,100,114,101,102,0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1,0,0,0,211,115,116,98,108,0,0,0,103,115,116,115,100,0,0,0,0,0,0,0,1,0,0,0,87,109,112,52,97,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,16,0,0,0,0,172,68,0,0,0,0,0,51,101,115,100,115,0,0,0,0,3,128,128,128,34,0,2,0,4,128,128,128,20,64,21,0,0,0,0,1,244,0,0,1,243,249,5,128,128,128,2,18,16,6,128,128,128,1,2,0,0,0,24,115,116,116,115,0,0,0,0,0,0,0,1,0,0,0,2,0,0,4,0,0,0,0,28,115,116,115,99,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,28,115,116,115,122,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,115,0,0,1,116,0,0,0,20,115,116,99,111,0,0,0,0,0,0,0,1,0,0,0,44,0,0,0,98,117,100,116,97,0,0,0,90,109,101,116,97,0,0,0,0,0,0,0,33,104,100,108,114,0,0,0,0,0,0,0,0,109,100,105,114,97,112,112,108,0,0,0,0,0,0,0,0,0,0,0,0,45,105,108,115,116,0,0,0,37,169,116,111,111,0,0,0,29,100,97,116,97,0,0,0,1,0,0,0,0,76,97,118,102,53,54,46,52,48,46,49,48,49])],{type:"video/mp4"});function DL(t){return T_({muted:!1,timeout:250,inline:!1},t)}function jL(t,e){var n=t.muted,r=t.timeout,i=t.inline,o=e(),a=o.element,s=o.source,u=void 0,l=void 0,c=void 0;return a.muted=n,!0===n&&a.setAttribute("muted","muted"),!0===i&&a.setAttribute("playsinline","playsinline"),a.src=s,new Am((function(t){u=a.play(),l=Uk((function(){c(!1,new Error("Timeout "+r+" ms has been reached"))}),r),c=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;a.remove(),a.srcObject=null,clearTimeout(l),t({result:e,error:n})},void 0!==u?u.then((function(){return c(!0)})).catch((function(t){return c(!1,t)})):c(!0)}))}var NL={audio:function(t){return jL(t=DL(t),(function(){return{element:document.createElement("audio"),source:Dx.createObjectURL(UL)}}))},video:function(t){return jL(t=DL(t),(function(){return{element:document.createElement("video"),source:Dx.createObjectURL(BL)}}))}},FL=new OL("AdsPluginBaseAdManager"),HL=function(t){Db(n,t);var e=Hb(n);function n(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Pb(this,n),(t=e.call(this)).options=r,t.config=r.config||{},t.plugin=r.plugin,t.player=r.plugin.player,t.mediaElement=t.player.media||t.player.video,t.isLinearAdRunning=!1,t._shouldBlockVideoContent=!1,t._isAdPaused=!0,t._isMediaEnded=!1,t.context={currentTime:0,duration:0},t}return Ub(n,[{key:"currentTime",get:function(){return this.context.currentTime}},{key:"duration",get:function(){return this.context.duration}},{key:"paused",get:function(){return this._isAdPaused}},{key:"shouldBlockVideoContent",get:function(){return this.isLinearAdRunning||this._shouldBlockVideoContent},set:function(t){this._shouldBlockVideoContent=t}},{key:"updateConfig",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t?this.config=xb(xb({},this.config),t):FL.warn("config is empty")}},{key:"isFullScreen",value:function(){return!!this.player.fullscreen}},{key:"destroy",value:function(){this.removeAllListeners()}},{key:"tryContentPlay",value:function(){var t=this.player,e=t.play();void 0!==e&&e&&e.then?e.then((function(){FL.log("content play"),t.removeClass(zA),t.addClass(BA),t.state<VA&&(t.setState(VA),t.emit(hA))})).catch((function(e){if(FL.error("content play error",e),t.media&&t.media.error)return t.onError(),void t.removeClass(RA)})):t.state<VA&&(t.setState(VA),t.removeClass(zA),t.removeClass(HA),t.removeClass(RA),t.addClass(BA),t.emit(hA))}}]),n}(V_.EventEmitter),zL=new OL("AdsPluginImaAdManager"),VL="xgplayer-ads-playing",qL=function(t){Db(o,t);var e,n,r,i=Hb(o);function o(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Pb(this,o),Bb(Fb(t=i.call(this,e)),"_onMediaEnded",(function(){var e;t.isLinearAdRunning||(t._isMediaEnded=!0,null===(e=t.adsLoader)||void 0===e||e.contentComplete())})),Bb(Fb(t),"_onMediaResize",(function(){var e,n=Fb(t).player,r=t.isFullScreen()?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL;null===(e=t.adsManager)||void 0===e||e.resize(n.sizeInfo.width,n.sizeInfo.height,r)})),Bb(Fb(t),"_onMediaPlay",(function(){t._mediaPlayed=!0})),Bb(Fb(t),"_onMediaPause",(function(){t._mediaPlayed=!1})),Bb(Fb(t),"_onMediaVolumeChange",(function(){var e;null===(e=t.adsManager)||void 0===e||e.setVolume(t.player.muted?0:t.player.volume)})),Bb(Fb(t),"_onAdsManagerLoaded",(function(e){var n=new google.ima.AdsRenderingSettings;n.restoreCustomPlaybackStateOnAdBreakComplete=!0,n.enablePreloading=!0;var r=t.adsManager=e.getAdsManager(t.mediaElement,n);zL.log("AdManager Loaded",r);var i=r.getCuePoints();i.length&&zL.log("cuePoints",i),t._initAdsManagerEventListeners(),t.player.emit(kh,{adsManager:r})})),Bb(Fb(t),"_onAdsManagerAdError",(function(e){t._handleAdError(e.getError()),t._resumeContent()})),Bb(Fb(t),"_onAdsLoaderAdError",(function(e){t._handleAdError(e.getError())})),Bb(Fb(t),"_handleAdError",(function(e){var n;zL.log("AdError",e),t.shouldBlockVideoContent=!1,t.isLinearAdRunning=!1,null===(n=t.adsManager)||void 0===n||n.destroy(),t.player.emit(Eh,e)})),Bb(Fb(t),"onAdEvent",(function(e){var n,r=Fb(t).player,i=null==e?void 0:e.getAd(),o=!1;switch(null==e?void 0:e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:t.player.emit("ima_ad_break_ready",{ad:i});break;case google.ima.AdEvent.Type.LOADED:var a=e.getAdData().adPodInfo;o=!0,0===(null==a?void 0:a.podIndex)&&(i.isLinear()?t.shouldBlockVideoContent=!0:(t.shouldBlockVideoContent=!1,t.tryContentPlay())),t.plugin.emit("ima_ad_loaded",{ad:i});break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:t._resumeContent(),t.emit(Th,{ad:i});break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:t.isLinearAdRunning=!0,t.shouldBlockVideoContent=!0,ZE.addClass(t.player.root,VL),null==r||r.pause(),t.emit(Ah,{ad:i});break;case google.ima.AdEvent.Type.STARTED:i.isLinear()&&(t._isAdPaused=!1,t.plugin.emit(bh,{ad:i}),n=Rk((function(){}),300));break;case google.ima.AdEvent.Type.RESUMED:t._isAdPaused=!1,t.plugin.emit(bh,{ad:i});break;case google.ima.AdEvent.Type.PAUSED:t._isAdPaused=!0,t.plugin.emit(wh,{ad:i});break;case google.ima.AdEvent.Type.AD_PROGRESS:var s=e.getAdData(),u=s.currentTime,l=s.duration;T_(t.context,{currentTime:u,duration:l}),t.plugin.emit(_h,{ad:i});break;case google.ima.AdEvent.Type.COMPLETE:null!=i&&i.isLinear()&&clearInterval(n),t.plugin.emit("ima_ad_complete",{ad:i}),t.plugin.emit("ad_complete",{ad:i});break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:null!=i&&i.isLinear()&&clearInterval(n),t.plugin.emit("ima_all_ads_completed",{ad:i}),t.player.emit("ad_all_completed",{ad:i});break;default:null!=i&&i.isLinear()&&clearInterval(n)}zL.log("AdEvent",null==e?void 0:e.type,o?Mh((null==e?void 0:e.getAdData())||{}):null==e?void 0:e.getAd())})),t.displayContainer=null,t.adsLoader=null,t.adsManager=null,t}return Ub(o,[{key:"init",value:(r=Ib(Lb().mark((function t(){return Lb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.shouldBlockVideoContent=!0,t.prev=1,t.next=4,this._loadIMASdk();case 4:this.emit("ima_sdk_load_success"),t.next=13;break;case 7:return t.prev=7,t.t0=t.catch(1),zL.error("google.ima sdk is not loaded, due to error",(null===t.t0||void 0===t.t0?void 0:t.t0.message)||t.t0),this.emit("ima_sdk_load_error"),this.shouldBlockVideoContent=!1,t.abrupt("return");case 13:this._initConfig(),this._initMediaEvents(),this._initContainer(),this._initLoader(),this._initAdsRequest();case 18:case"end":return t.stop()}}),t,this,[[1,7]])}))),function(){return r.apply(this,arguments)})},{key:"destroy",value:function(){zb(jb(o.prototype),"destroy",this).call(this),this.reset(),this._removeMediaEvents(),this._destroyLoader()}},{key:"_initConfig",value:function(){var t=this.config.locale;t&&google.ima.settings.setLocale(t)}},{key:"_loadIMASdk",value:function(){var t=this;return new Am((function(e,n){if("undefined"!=typeof google&&google.ima)e();else{var r=document.createElement("script"),i=Uk((function(){n(new Error("google.ima sdk load timeout"))}),t.config.loadSdkTimeout||3e3);r.src="https://imasdk.googleapis.com/js/sdkloader/ima3".concat(t.config.debug?"_debug":"",".js"),r.onload=function(){clearTimeout(i),e()},r.onerror=function(t){clearTimeout(i),n(null==t?void 0:t.message)},document.head.appendChild(r)}}))}},{key:"_initMediaEvents",value:function(){var t=this.player;t.on(pA,this._onMediaResize),t.on(oA,this._onMediaEnded),t.on(iA,this._onMediaPlay),t.on(aA,this._onMediaPause),t.on(cA,this._onMediaVolumeChange)}},{key:"_removeMediaEvents",value:function(){var t=this.player;t.off(pA,this._onMediaResize),t.off(oA,this._onMediaEnded),t.off(iA,this._onMediaPlay),t.off(aA,this._onMediaPause),t.off(cA,this._onMediaVolumeChange)}},{key:"_initContainer",value:function(){var t=this.options.displayContainer;this.displayContainer=new google.ima.AdDisplayContainer(t,this.mediaElement)}},{key:"_initLoader",value:function(){var t=this.adsLoader=new google.ima.AdsLoader(this.displayContainer);t.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this._onAdsManagerLoaded,!1),t.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdsLoaderAdError,!1),this.player.emit("ima_ad_loader_ready",{adsLoader:t})}},{key:"_destroyLoader",value:function(){var t=this.adsLoader;t||(t.removeEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this._onAdsManagerLoaded,!1),t.removeEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdsLoaderAdError,!1))}},{key:"_initAdsRequest",value:(n=Ib(Lb().mark((function t(){var e,n,r,i,o=this;return Lb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.config,n=e.adsRequest,r=e.adsResponse,i=e.adTagUrl,!(n||r||i)){t.next=9;break}return t.next=4,this._checkAutoplaySupport();case 4:this.requestAds(),this.player.once(kh,(function(){o.autoplayAllowed?o.playAds():o.player.useHooks("play",(function t(){return o.playAds(),o.player.removeHooks("play",t),!1})),o.emit(Ch)})),this.player.once(Eh,(function(){o.emit(Ch)})),t.next=10;break;case 9:this.emit(Ch);case 10:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"playAds",value:function(){try{this._onMediaVolumeChange(),this.displayContainerInitialized||(this.displayContainer.initialize(),this.displayContainerInitialized=!0);var t=this.player,e=this.isFullScreen()?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL;this.adsManager.init(t.sizeInfo.width,t.sizeInfo.height,e),this.adsManager.start()}catch(n){this._handleAdError(n),this._resumeContent()}}},{key:"_initAdsManagerEventListeners",value:function(){var t=this,e=this.adsManager;e.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdsManagerAdError);var n=["LOADED","STARTED","RESUMED","PAUSED","COMPLETE","ALL_ADS_COMPLETED","CONTENT_PAUSE_REQUESTED","CONTENT_RESUME_REQUESTED","VOLUME_CHANGED","VOLUME_MUTED","AD_METADATA","AD_CAN_PLAY","AD_PROGRESS","AD_BUFFERING","CLICK","VIDEO_CLICKED","VIDEO_ICON_CLICKED","FIRST_QUARTILE","MIDPOINT","THIRD_QUARTILE","SKIPPED","USER_CLOSE","AD_BREAK_READY","AD_BREAK_FETCH_ERROR"];lp(n).call(n,(function(n){e.addEventListener(google.ima.AdEvent.Type[n],t.onAdEvent)}))}},{key:"_resumeContent",value:function(){var t;(this.isLinearAdRunning=!1,this.shouldBlockVideoContent=!1,ZE.removeClass(this.player.root,VL),this._isMediaEnded)||(null===(t=this.player)||void 0===t||t.play())}},{key:"reset",value:function(){var t,e;this.isLinearAdRunning=!1,null===(t=this.adsManager)||void 0===t||t.destroy(),this.adsManager=null,null===(e=this.adsLoader)||void 0===e||e.contentComplete(),ZE.removeClass(this.player.root,VL)}},{key:"requestAds",value:function(){var t,e=this.config,n=e.adsRequest,r=e.adsResponse,i=e.adTagUrl,o=this.player,a=new google.ima.AdsRequest;if(a.linearAdSlotWidth=o.sizeInfo.width,a.linearAdSlotHeight=o.sizeInfo.height,a.nonLinearAdSlotWidth=o.sizeInfo.width,a.nonLinearAdSlotHeight=o.sizeInfo.height,a.setAdWillAutoPlay(this.autoplayAllowed),a.setAdWillPlayMuted(this.autoplayRequiresMuted),i)a.adTagUrl=i;else if(r)a.adsResponse=r;else if(n&&"object"===Mb(n)){var s;lp(s=Vh(n)).call(s,(function(t){a[t]=n[t]}))}zL.log("requestAds",Mh(a)),null===(t=this.adsLoader)||void 0===t||t.requestAds(a)}},{key:"pause",value:function(){var t;return null===(t=this.adsManager)||void 0===t?void 0:t.pause()}},{key:"play",value:function(){var t;return null===(t=this.adsManager)||void 0===t?void 0:t.resume()}},{key:"skip",value:function(){var t;return null===(t=this.adsManager)||void 0===t?void 0:t.skip()}},{key:"updateConfig",value:function(t){zb(jb(o.prototype),"updateConfig",this).call(this,t),this._initConfig()}},{key:"_checkAutoplaySupport",value:(e=Ib(Lb().mark((function t(){var e,n,r,i,o;return Lb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.player.config.autoplay,t.next=4,Am.all([e?NL.video({timeout:800}).then((function(t){return t.result})):Am.resolve(!1),e&&this.player.config.autoplayMuted?NL.video({timeout:800,muted:!0}).then((function(t){return t.result})):Am.resolve(!1)]);case 4:n=t.sent,r=Vb(n,2),i=r[0],o=r[1],this.autoplayAllowed=i||o,this.autoplayRequiresMuted=!i&&o,zL.log("checkAutoplaySupport",this.autoplayAllowed,this.autoplayRequiresMuted);case 11:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})}]),o}(HL),GL=function(t){Db(n,t);var e=Hb(n);function n(){var t,r;Pb(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Bb(Fb(r=e.call.apply(e,lh(t=[this]).call(t,o))),"btnClick",(function(t){t.preventDefault(),t.stopPropagation();var e=r.getAdPlugin();return e.paused?(e.play(),r.animate(!1)):(e.pause(),r.animate(!0)),!1})),r}return Ub(n,[{key:"getAdPlugin",value:function(){return this.player.getPlugin("ad")}},{key:"listenEvents",value:function(){var t=this;this.on([wh],(function(){t.animate(!0)})),this.on(bh,(function(){t.animate(!1)}))}}],[{key:"pluginName",get:function(){return"adPlay"}}]),n}(QA),YL=function(t){Db(n,t);var e=Hb(n);function n(){return Pb(this,n),e.apply(this,arguments)}return Ub(n,[{key:"getAdPlugin",value:function(){return this.player.getPlugin("ad")}},{key:"duration",get:function(){var t=this.getAdPlugin();return(null==t?void 0:t.duration)||0}},{key:"offsetDuration",get:function(){return this.duration}},{key:"timeOffset",get:function(){return 0}},{key:"currentTime",get:function(){var t=this.getAdPlugin();return(null==t?void 0:t.currentTime)||0}},{key:"afterCreate",value:function(){T_(this.config,{isCloseClickSeek:!0,isDraggingSeek:!0,closeMoveSeek:!0}),zb(jb(n.prototype),"afterCreate",this).call(this)}},{key:"listenEvents",value:function(){var t=this;this.on(_h,(function(){t.onTimeupdate()}))}}],[{key:"pluginName",get:function(){return"adProgress"}}]),n}($A),WL=function(t){Db(n,t);var e=Hb(n);function n(){return Pb(this,n),e.apply(this,arguments)}return Ub(n,[{key:"getAdPlugin",value:function(){return this.player.getPlugin("ad")}},{key:"duration",get:function(){var t=this.getAdPlugin();return(null==t?void 0:t.duration)||0}},{key:"currentTime",get:function(){var t=this.getAdPlugin();return(null==t?void 0:t.currentTime)||0}},{key:"listenEvents",value:function(){var t=this;this.on([_h],(function(e){t.onTimeUpdate()}))}}],[{key:"pluginName",get:function(){return"adTime"}}]),n}(iT),KL=function(){function t(e,n){var r=n.player,i=n.plugin;Pb(this,t),this.player=r,this.config=e,this.adPlugin=i,this.adUIPlugins=[],this.fragment=document.createDocumentFragment(),this.controlsPos=null,this.decoratedAdPluginList=[[QA,GL],[iT,WL],[$A,YL],[uT,null],[Fx,null],[rT,null]],this.init(),this.initEvents()}return Ub(t,[{key:"init",value:function(){var t=this.player,e=this.adUIPlugins,n=this.fragment,r=this.decoratedAdPluginList;lp(r).call(r,(function(r){var i=Vb(r,2),o=i[0],a=i[1],s=t.getPlugin(o.pluginName);if(s){var u=null;a&&!t.getPlugin(a.pluginName)&&(t.registerPlugin(a),u=t.getPlugin(a.pluginName),n.appendChild(u.root)),e.push([s,u])}}))}},{key:"initEvents",value:function(){var t=this.adPlugin,e=this.player;t.on(bh,(function(){var t=[HA,UA,DA,NA,FA,jA];lp(t).call(t,(function(t){e.removeClass(t)}))}))}},{key:"showAdUI",value:function(){var t,e=this.player,n=this.config,r=this.adUIPlugins,i=this.fragment;lp(r).call(r,(function(t){var e=Vb(t,2),n=e[0],r=e[1];if(r){var o=r.root,a=n.root;i.contains(o)&&i.removeChild(o),a.parentNode.insertBefore(o,a),i.appendChild(a)}}));var o=this._getNonAdPlugin();lp(t=$h(o).call(o,(function(t){return!!t.root}))).call(t,(function(t){var e=t.root;t.__adStub__||(t.__adStub__=ZE.createDom("xg-ad-stub","",{})),e.parentNode.insertBefore(t.__adStub__,e),i.appendChild(e)}));var a=e.getPlugin("start");a&&a.hide(),!1===n.controls&&e.controls&&this.hideControls()}},{key:"hideAdUI",value:function(){var t,e,n=this.player,r=this.config,i=this.adUIPlugins,o=this.fragment;lp(i).call(i,(function(t){var e=Vb(t,2),n=e[0],r=e[1];if(r){var i=r.root,a=n.root;o.contains(a)&&o.removeChild(a),o.contains(i)||(i.parentNode.insertBefore(a,i),o.appendChild(i))}}));var a=this._getNonAdPlugin();lp(t=$h(a).call(a,(function(t){return!!t.root}))).call(t,(function(t){var e,n,r=t.root;o.contains(r)&&o.removeChild(r),null===(e=t.__adStub__)||void 0===e||null===(n=e.parentNode)||void 0===n||n.insertBefore(r,t.__adStub__)})),!1===r.controls&&o.contains(null===(e=n.controls)||void 0===e?void 0:e.root)&&this.showControls();var s=n.getPlugin("start");if(s){var u=s.config.disableAnimate,l=s.config.isShowPause;u||(s.config.disableAnimate=!0,s.config.isShowPause=!1),n.once("play",(function(){Uk((function(){s.config.disableAnimate=u,s.config.disableAnimate=l}),10)}))}}},{key:"hideControls",value:function(){var t=this.player,e=this.config,n=this.fragment;if(!1===e.controls&&t.controls){var r=t.controls.root,i=r.parentElement,o=r.previousSibling,a=r.nextSibling;this.controlsPos={parentNode:i,previousSibling:o,nextSibling:a},n.appendChild(t.controls.root)}}},{key:"showControls",value:function(){var t=this.player,e=this.config,n=this.fragment;if(!1===e.controls&&t.controls){if(!this.controlsPos)return;var r=t.controls.root;n.contains(r)&&n.removeChild(r);var i=this.controlsPos,o=i.parentNode,a=i.previousSibling,s=i.nextSibling;o&&(s?o.insertBefore(r,s):a?o.insertBefore(r,a.nextSibling):o.appendChild(r)),this.controlsPos=null}}},{key:"_getNonAdPlugin",value:function(){var t,e=this.player,n=this.decoratedAdPluginList,r=[];lp(n).call(n,(function(t){var e=Vb(t,2),n=e[0],i=e[1];r.push(n.pluginName.toLowerCase()),i&&r.push(i.pluginName.toLowerCase())}));var i=(null===(t=e.controls)||void 0===t?void 0:t.plugins())||[];return $h(i).call(i,(function(t){return-1===ew(r).call(r,t.pluginName.toLowerCase())}))}}]),t}(),XL=new OL("AdsPlugin"),$L=function(t){Db(n,t);var e=Hb(n);function n(){return Pb(this,n),e.apply(this,arguments)}return Ub(n,[{key:"version",get:function(){return"3.0.20-alpha.5"}},{key:"paused",get:function(){var t,e;return!(null===(t=this.csManager)||void 0===t||!t.isLinearAdRunning||null===(e=this.csManager)||void 0===e||!e.paused)}},{key:"currentTime",get:function(){var t;return(null===(t=this.csManager)||void 0===t?void 0:t.currentTime)||0}},{key:"duration",get:function(){var t;return(null===(t=this.csManager)||void 0===t?void 0:t.duration)||0}},{key:"afterCreate",value:function(){var t=this.config;XL.log("plugin afterCreate, config: ".concat(Mh(t||{}))),this.csManager=void 0,this._blockContentPlay()}},{key:"beforePlayerInit",value:function(){var t,e,n;switch(XL.log("plugin beforePlayerInit"),this.initPromise=((n=new Am((function(n,r){t=n,e=r}))).used=!1,n.resolve=function(){return n.used=!0,t.apply(void 0,arguments)},n.reject=function(){return n.used=!0,e.apply(void 0,arguments)},n),this.uiManager=new KL(this.config,{plugin:this,player:this.player}),this.config.adType){case"ima":case"google-ima":this._initClientSideAd()}return this.initPromise}},{key:"render",value:function(){return ZE.createDom("xg-ad","",{},"xgplayer-ads")}},{key:"_initClientSideAd",value:function(){switch(this.config.adType){case"ima":case"google-ima":this._initImaAd()}}},{key:"_initImaAd",value:function(){var t=this;this.csManager=new qL({plugin:this,config:this.config.ima,displayContainer:this.root}),this.csManager.once(Ch,(function(){var e;null===(e=t.initPromise)||void 0===e||e.resolve()})),this.csManager.on(Ah,(function(){t.uiManager.showAdUI()})),this.csManager.on(Th,(function(){t.uiManager.hideAdUI()})),this.csManager.init()}},{key:"requestAds",value:function(){var t;null===(t=this.csManager)||void 0===t||t.requestAds()}},{key:"playAds",value:function(){var t;null===(t=this.csManager)||void 0===t||t.playAds()}},{key:"pause",value:function(){var t;null===(t=this.csManager)||void 0===t||t.pause()}},{key:"play",value:function(){var t;null===(t=this.csManager)||void 0===t||t.play()}},{key:"destroy",value:function(){var t;null===(t=this.csManager)||void 0===t||t.destroy()}},{key:"reset",value:function(){var t;null===(t=this.csManager)||void 0===t||t.reset()}},{key:"updateConfig",value:function(t){var e;null===(e=this.csManager)||void 0===e||e.updateConfig(t)}},{key:"_blockContentPlay",value:function(){var t=this,e=this.player;e.on("play",(function(){var n;null!==(n=t.csManager)&&void 0!==n&&n.shouldBlockVideoContent&&(XL.log("block content play"),e.pause())}))}}],[{key:"pluginName",get:function(){return"ad"}}]),n}(PA);function JL(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function QL(t,e){var n=void 0!==cc&&Nh(t)||t["@@iterator"];if(!n){if(ab(t)||(n=function(t,e){var n;if(t){if("string"==typeof t)return JL(t,e);var r=Zm(n=Object.prototype.toString.call(t)).call(n,8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Ab(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?JL(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}var ZL={},tM={},eM={};!function(t){xp(t,"__esModule",{value:!0}),t.shiftThirtyTwoBits=t.THIRTY_TWO_BIT_MULTIPLIER=t.bytesToUUID=void 0;t.bytesToUUID=function(t){if(16!==t.length)throw new Error("scte35-js Uint8Array uuid bad size: ".concat(t.length));return c_([]).call(t,(function(t,e){var n=(t<=15?"0":"")+t.toString(16);return e>=4&&e<=10&&e%2==0?"-"+n:n})).join("")},t.THIRTY_TWO_BIT_MULTIPLIER=Math.pow(2,32);t.shiftThirtyTwoBits=function(e){return e*t.THIRTY_TWO_BIT_MULTIPLIER}}(eM),xp(tM,"__esModule",{value:!0}),tM.parseDescriptor=tM.SegmentationMessage=void 0;var nM,rM,iM=eM;(rM=nM||(tM.SegmentationMessage=nM={}))[rM.RESTRICT_GROUP_0=0]="RESTRICT_GROUP_0",rM[rM.RESTRICT_GROUP_1=1]="RESTRICT_GROUP_1",rM[rM.RESTRICT_GROUP_2=2]="RESTRICT_GROUP_2",rM[rM.NONE=3]="NONE";tM.parseDescriptor=function(t){var e,n=function(t){var e={},n=0;for(e.spliceDescriptorTag=t.getUint8(n++),e.descriptorLength=t.getUint8(n++),e.identifier="";e.identifier.length<4;)e.identifier+=String.fromCharCode(t.getUint8(n++));return e}(t),r=6;if(0===n.spliceDescriptorTag)r=n.descriptorLength+2,console.warn("scte35-js TODO: support spliceDescriptorTag: SpliceDescriptorTag.AVAIL_DESCRIPTOR");else if(1===n.spliceDescriptorTag)r=n.descriptorLength+2,console.warn("scte35-js TODO: support spliceDescriptorTag: SpliceDescriptorTag.DTMF_DESCRIPTOR");else if(2===n.spliceDescriptorTag){var i=n;if(i.segmentationEventId=t.getUint32(r),r+=4,i.segmentationEventCancelIndicator=!!(128&t.getUint8(r++)),!i.segmentationEventCancelIndicator){var o=t.getUint8(r++);i.programSegmentationFlag=!!(128&o),i.segmentationDurationFlag=!!(64&o),i.deliveryNotRestrictedFlag=!!(32&o),i.deliveryNotRestrictedFlag||(i.webDeliveryAllowedFlag=!!(16&o),i.noRegionalBlackoutFlag=!!(8&o),i.archiveAllowedFlag=!!(4&o),i.deviceRestrictions=3&o),i.programSegmentationFlag||(i.componentCount=t.getUint8(r++),console.warn("scte35-js TODO: segmentationDescriptor.componentCount: "+i.componentCount),r+=6*i.componentCount),i.segmentationDurationFlag&&(i.segmentationDuration=iM.shiftThirtyTwoBits(t.getUint8(r++)),i.segmentationDuration+=t.getUint32(r),r+=4),i.segmentationUpidType=t.getUint8(r++),i.segmentationUpidLength=t.getUint8(r++);var a=i.segmentationUpidLength;for(i.segmentationUpid=new Uint8Array(a);a>=0;)a--,i.segmentationUpid[a]=t.getUint8(r+a);r+=i.segmentationUpidLength,i.segmentationTypeId=t.getUint8(r++),i.segmentNum=t.getUint8(r++),i.segmentsExpected=t.getUint8(r++),r<n.descriptorLength+2&&(52===i.segmentationTypeId||54===i.segmentationTypeId)&&(i.subSegmentNum=t.getUint8(r++),i.subSegmentsExpected=t.getUint8(r++))}}else 3===n.spliceDescriptorTag?(r=n.descriptorLength+2,console.warn("scte35-js TODO: support spliceDescriptorTag: SpliceDescriptorTag.TIME_DESCRIPTOR")):(console.error("scte35-js Unrecognized spliceDescriptorTag ".concat(n.spliceDescriptorTag)),r=n.descriptorLength+2);r!==n.descriptorLength+2&&console.error(lh(e="scte35-js Error reading descriptor offset @".concat(r," of ")).call(e,n.descriptorLength+2));return n};var oM=n(nt.Symbol.for),aM=h,sM=Q,uM=Vn,lM=Kn,cM=Zh,fM=Math.min,hM=[].lastIndexOf,pM=!!hM&&1/[1].lastIndexOf(1,-0)<0,dM=cM("lastIndexOf"),gM=pM||!dM?function(t){if(pM)return aM(hM,this,arguments)||0;var e=sM(this),n=lM(e),r=n-1;for(arguments.length>1&&(r=fM(r,uM(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}:hM;Mn({target:"Array",proto:!0,forced:gM!==[].lastIndexOf},{lastIndexOf:gM});var vM=af("Array").lastIndexOf,yM=ut,mM=vM,bM=Array.prototype,wM=n((function(t){var e=t.lastIndexOf;return t===bM||yM(bM,t)&&e===bM.lastIndexOf?mM:e})),_M=$t,kM=ai,EM=Kn,AM=mw,TM=Math.min,CM=[].copyWithin||function(t,e){var n=_M(this),r=EM(n),i=kM(t,r),o=kM(e,r),a=arguments.length>2?arguments[2]:void 0,s=TM((void 0===a?r:kM(a,r))-o,r-i),u=1;for(o<i&&i<o+s&&(u=-1,o+=s-1,i+=s-1);s-- >0;)o in n?n[i]=n[o]:AM(n,i),i+=u,o+=u;return n};Mn({target:"Array",proto:!0},{copyWithin:CM});for(var SM=af("Array").copyWithin,xM=ut,LM=SM,MM=Array.prototype,OM=n((function(t){var e=t.copyWithin;return t===MM||xM(MM,t)&&e===MM.copyWithin?LM:e})),IM={},PM={byteLength:function(t){var e=NM(t),n=e[0],r=e[1];return 3*(n+r)/4-r},toByteArray:function(t){var e,n,r=NM(t),i=r[0],o=r[1],a=new BM(function(t,e,n){return 3*(e+n)/4-n}(0,i,o)),s=0,u=o>0?i-4:i;for(n=0;n<u;n+=4)e=UM[t.charCodeAt(n)]<<18|UM[t.charCodeAt(n+1)]<<12|UM[t.charCodeAt(n+2)]<<6|UM[t.charCodeAt(n+3)],a[s++]=e>>16&255,a[s++]=e>>8&255,a[s++]=255&e;2===o&&(e=UM[t.charCodeAt(n)]<<2|UM[t.charCodeAt(n+1)]>>4,a[s++]=255&e);1===o&&(e=UM[t.charCodeAt(n)]<<10|UM[t.charCodeAt(n+1)]<<4|UM[t.charCodeAt(n+2)]>>2,a[s++]=e>>8&255,a[s++]=255&e);return a},fromByteArray:function(t){for(var e,n=t.length,r=n%3,i=[],o=16383,a=0,s=n-r;a<s;a+=o)i.push(FM(t,a,a+o>s?s:a+o));1===r?(e=t[n-1],i.push(RM[e>>2]+RM[e<<4&63]+"==")):2===r&&(e=(t[n-2]<<8)+t[n-1],i.push(RM[e>>10]+RM[e>>4&63]+RM[e<<2&63]+"="));return i.join("")}},RM=[],UM=[],BM="undefined"!=typeof Uint8Array?Uint8Array:Array,DM="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",jM=0;jM<64;++jM)RM[jM]=DM[jM],UM[DM.charCodeAt(jM)]=jM;function NM(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=ew(t).call(t,"=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function FM(t,e,n){for(var r,i,o=[],a=e;a<n;a+=3)r=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),o.push(RM[(i=r)>>18&63]+RM[i>>12&63]+RM[i>>6&63]+RM[63&i]);return o.join("")}UM["-".charCodeAt(0)]=62,UM["_".charCodeAt(0)]=63;var HM={read:function(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,l=u>>1,c=-7,f=n?i-1:0,h=n?-1:1,p=t[e+f];for(f+=h,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+t[e+f],f+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+t[e+f],f+=h,c-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=l}return(p?-1:1)*a*Math.pow(2,o-r)},write:function(t,e,n,r,i,o){var a,s,u,l=8*o-i-1,c=(1<<l)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(e*u-1)*Math.pow(2,i),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[n+p]=255&s,p+=d,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;t[n+p]=255&a,p+=d,a/=256,l-=8);t[n+p-d]|=128*g}};(function(e){var n=PM,r=HM,i="function"==typeof Oh&&"function"==typeof oM?oM("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=function(t){+t!=t&&(t=0);return s.alloc(+t)},e.INSPECT_MAX_BYTES=50;var o=2147483647;function a(t){if(t>o)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Op(e,s.prototype),e}function s(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return c(t)}return u(t,e,n)}function u(t,e,n){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!s.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var n=0|d(t,e),r=a(n),i=r.write(t,e);i!==n&&(r=tb(r).call(r,0,i));return r}(t,e);if(ArrayBuffer.isView(t))return function(t){if(K(t,Uint8Array)){var e=new Uint8Array(t);return h(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+Mc(t));if(K(t,ArrayBuffer)||t&&K(t.buffer,ArrayBuffer))return h(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(K(t,SharedArrayBuffer)||t&&K(t.buffer,SharedArrayBuffer)))return h(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return s.from(r,e,n);var i=function(t){if(s.isBuffer(t)){var e=0|p(t.length),n=a(e);return 0===n.length||t.copy(n,0,0,e),n}if(void 0!==t.length)return"number"!=typeof t.length||X(t.length)?a(0):f(t);if("Buffer"===t.type&&sb(t.data))return f(t.data)}(t);if(i)return i;if(void 0!==Oh&&null!=Cb&&"function"==typeof t[Cb])return s.from(t[Cb]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+Mc(t))}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function c(t){return l(t),a(t<0?0:0|p(t))}function f(t){for(var e=t.length<0?0:0|p(t.length),n=a(e),r=0;r<e;r+=1)n[r]=255&t[r];return n}function h(t,e,n){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;return r=void 0===e&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,e):new Uint8Array(t,e,n),Op(r,s.prototype),r}function p(t){if(t>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function d(t,e){if(s.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||K(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+Mc(t));var n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return G(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Y(t).length;default:if(i)return r?-1:G(t).length;e=(""+e).toLowerCase(),i=!0}}function g(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return L(this,e,n);case"utf8":case"utf-8":return T(this,e,n);case"ascii":return S(this,e,n);case"latin1":case"binary":return x(this,e,n);case"base64":return A(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function v(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function y(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),X(n=+n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=s.from(e,r)),s.isBuffer(e))return 0===e.length?-1:m(t,e,n,r,i);if("number"==typeof e)return e&=255,"function"==typeof ew(Uint8Array.prototype)?i?ew(Uint8Array.prototype).call(t,e,n):wM(Uint8Array.prototype).call(t,e,n):m(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,n,r,i){var o,a=1,s=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,n/=2}function l(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var c=-1;for(o=n;o<s;o++)if(l(t,o)===l(e,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*a}else-1!==c&&(o-=o-c),c=-1}else for(n+u>s&&(n=s-u),o=n;o>=0;o--){for(var f=!0,h=0;h<u;h++)if(l(t,o+h)!==l(e,h)){f=!1;break}if(f)return o}return-1}function b(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o,a=e.length;for(r>a/2&&(r=a/2),o=0;o<r;++o){var s=i_(e.substr(2*o,2),16);if(X(s))return o;t[n+o]=s}return o}function w(t,e,n,r){return W(G(e,t.length-n),t,n,r)}function _(t,e,n,r){return W(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function k(t,e,n,r){return W(Y(e),t,n,r)}function E(t,e,n,r){return W(function(t,e){for(var n,r,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)r=(n=t.charCodeAt(a))>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function A(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(tb(t).call(t,e,r))}function T(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o=t[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(i+s<=n){var u=void 0,l=void 0,c=void 0,f=void 0;switch(s){case 1:o<128&&(a=o);break;case 2:128==(192&(u=t[i+1]))&&(f=(31&o)<<6|63&u)>127&&(a=f);break;case 3:u=t[i+1],l=t[i+2],128==(192&u)&&128==(192&l)&&(f=(15&o)<<12|(63&u)<<6|63&l)>2047&&(f<55296||f>57343)&&(a=f);break;case 4:u=t[i+1],l=t[i+2],c=t[i+3],128==(192&u)&&128==(192&l)&&128==(192&c)&&(f=(15&o)<<18|(63&u)<<12|(63&l)<<6|63&c)>65535&&f<1114112&&(a=f)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return function(t){var e=t.length;if(e<=C)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,tb(t).call(t,r,r+=C));return n}(r)}e.kMaxLength=o,s.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Op(e,Uint8Array.prototype),Op(t,e),42===t.foo()}catch(n){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),xp(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),xp(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(t,e,n){return u(t,e,n)},Op(s.prototype,Uint8Array.prototype),Op(s,Uint8Array),s.alloc=function(t,e,n){return function(t,e,n){return l(t),t<=0?a(t):void 0!==e?"string"==typeof n?bL(r=a(t)).call(r,e,n):bL(i=a(t)).call(i,e):a(t);var r,i}(t,e,n)},s.allocUnsafe=function(t){return c(t)},s.allocUnsafeSlow=function(t){return c(t)},s.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==s.prototype},s.compare=function(t,e){if(K(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),K(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,e){if(!sb(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=s.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var o=t[n];if(K(o,Uint8Array))i+o.length>r.length?(s.isBuffer(o)||(o=s.from(o)),o.copy(r,i)):Uint8Array.prototype.set.call(r,o,i);else{if(!s.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i)}i+=o.length}return r},s.byteLength=d,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)v(this,e,e+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)v(this,e,e+3),v(this,e+1,e+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)v(this,e,e+7),v(this,e+1,e+6),v(this,e+2,e+5),v(this,e+3,e+4);return this},s.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?T(this,0,t):g.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t,n="",r=e.INSPECT_MAX_BYTES;return n=sE(t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ")).call(t),this.length>r&&(n+=" ... "),"<Buffer "+n+">"},i&&(s.prototype[i]=s.prototype.inspect),s.prototype.compare=function(t,e,n,r,i){if(K(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+Mc(t));if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),u=Math.min(o,a),l=tb(this).call(this,r,i),c=tb(t).call(t,e,n),f=0;f<u;++f)if(l[f]!==c[f]){o=l[f],a=c[f];break}return o<a?-1:a<o?1:0},s.prototype.includes=function(t,e,n){return-1!==ew(this).call(this,t,e,n)},s.prototype.indexOf=function(t,e,n){return y(this,t,e,n,!0)},s.prototype.lastIndexOf=function(t,e,n){return y(this,t,e,n,!1)},s.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":case"latin1":case"binary":return _(this,t,e,n);case"base64":return k(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:tb(Array.prototype).call(this._arr||this,0)}};var C=4096;function S(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function x(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function L(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=$[t[o]];return i}function M(t,e,n){for(var r=tb(t).call(t,e,n),i="",o=0;o<r.length-1;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function O(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function I(t,e,n,r,i,o){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function P(t,e,n,r,i){H(e,r,i,t,n,7);var o=Number(e&BigInt(4294967295));t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o;var a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,n}function R(t,e,n,r,i){H(e,r,i,t,n,7);var o=Number(e&BigInt(4294967295));t[n+7]=o,o>>=8,t[n+6]=o,o>>=8,t[n+5]=o,o>>=8,t[n+4]=o;var a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n+3]=a,a>>=8,t[n+2]=a,a>>=8,t[n+1]=a,a>>=8,t[n]=a,n+8}function U(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(t,e,n,i,o){return e=+e,n>>>=0,o||U(t,0,n,4),r.write(t,e,n,i,23,4),n+4}function D(t,e,n,i,o){return e=+e,n>>>=0,o||U(t,0,n,8),r.write(t,e,n,i,52,8),n+8}s.prototype.slice=function(t,e){var n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);var r=this.subarray(t,e);return Op(r,s.prototype),r},s.prototype.readUintLE=s.prototype.readUIntLE=function(t,e,n){t>>>=0,e>>>=0,n||O(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},s.prototype.readUintBE=s.prototype.readUIntBE=function(t,e,n){t>>>=0,e>>>=0,n||O(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},s.prototype.readUint8=s.prototype.readUInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),this[t]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readBigUInt64LE=J((function(t){z(t>>>=0,"offset");var e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);var r=e+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,24),i=this[++t]+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+n*Math.pow(2,24);return BigInt(r)+(BigInt(i)<<BigInt(32))})),s.prototype.readBigUInt64BE=J((function(t){z(t>>>=0,"offset");var e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);var r=e*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+this[++t],i=this[++t]*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+n;return(BigInt(r)<<BigInt(32))+BigInt(i)})),s.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||O(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},s.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||O(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},s.prototype.readInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){t>>>=0,e||O(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(t,e){t>>>=0,e||O(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readBigInt64LE=J((function(t){z(t>>>=0,"offset");var e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);var r=this[t+4]+this[t+5]*Math.pow(2,8)+this[t+6]*Math.pow(2,16)+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(e+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,24))})),s.prototype.readBigInt64BE=J((function(t){z(t>>>=0,"offset");var e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);var r=(e<<24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+this[++t];return(BigInt(r)<<BigInt(32))+BigInt(this[++t]*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+n)})),s.prototype.readFloatLE=function(t,e){return t>>>=0,e||O(t,4,this.length),r.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return t>>>=0,e||O(t,4,this.length),r.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return t>>>=0,e||O(t,8,this.length),r.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return t>>>=0,e||O(t,8,this.length),r.read(this,t,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e>>>=0,n>>>=0,r)||I(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e>>>=0,n>>>=0,r)||I(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,1,255,0),this[e]=255&t,e+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeBigUInt64LE=J((function(t){return P(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeBigUInt64BE=J((function(t){return R(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){var i=Math.pow(2,8*n-1);I(this,t,e,n,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<n&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},s.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){var i=Math.pow(2,8*n-1);I(this,t,e,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},s.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},s.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||I(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeBigInt64LE=J((function(t){return P(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeBigInt64BE=J((function(t){return R(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeFloatLE=function(t,e,n){return B(this,t,e,!0,n)},s.prototype.writeFloatBE=function(t,e,n){return B(this,t,e,!1,n)},s.prototype.writeDoubleLE=function(t,e,n){return D(this,t,e,!0,n)},s.prototype.writeDoubleBE=function(t,e,n){return D(this,t,e,!1,n)},s.prototype.copy=function(t,e,n,r){if(!s.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i=r-n;this===t&&"function"==typeof OM(Uint8Array.prototype)?OM(this).call(this,e,n,r):Uint8Array.prototype.set.call(t,this.subarray(n,r),e);return i},s.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===t.length){var i=t.charCodeAt(0);("utf8"===r&&i<128||"latin1"===r)&&(t=i)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else{var a=s.isBuffer(t)?t:s.from(t,r),u=a.length;if(0===u)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<n-e;++o)this[o+e]=a[o%u]}return this};var j={};function N(e,n,r){j[e]=function(r){Bf(o,r);var i=rh(o);function o(){var r,a;return t(this,o),a=i.call(this),xp(Bc(a),"message",{value:n.apply(Bc(a),arguments),writable:!0,configurable:!0}),a.name=lh(r="".concat(a.name," [")).call(r,e,"]"),a.stack,delete a.name,a}return Uc(o,[{key:"code",get:function(){return e},set:function(t){xp(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}},{key:"toString",value:function(){var t,n;return lh(t=lh(n="".concat(this.name," [")).call(n,e,"]: ")).call(t,this.message)}}]),o}(r)}function F(t){for(var e,n="",r=t.length,i="-"===t[0]?1:0;r>=i+4;r-=3){var o;n=lh(o="_".concat(tb(t).call(t,r-3,r))).call(o,n)}return lh(e="".concat(tb(t).call(t,0,r))).call(e,n)}function H(t,e,n,r,i,o){if(t>n||t<e){var a,s,u,l,c,f,h,p,d,g,v="bigint"==typeof e?"n":"";if(o>3)if(0===e||e===BigInt(0))a=lh(s=lh(u=lh(l=">= 0".concat(v," and < 2")).call(l,v," ** ")).call(u,8*(o+1))).call(s,v);else a=lh(c=lh(f=">= -(2".concat(v," ** ")).call(f,8*(o+1)-1)).call(c,v,") and < 2 ** ")+lh(h="".concat(8*(o+1)-1)).call(h,v);else a=lh(p=lh(d=lh(g=">= ".concat(e)).call(g,v," and <= ")).call(d,n)).call(p,v);throw new j.ERR_OUT_OF_RANGE("value",a,t)}!function(t,e,n){z(e,"offset"),void 0!==t[e]&&void 0!==t[e+n]||V(e,t.length-(n+1))}(r,i,o)}function z(t,e){if("number"!=typeof t)throw new j.ERR_INVALID_ARG_TYPE(e,"number",t)}function V(t,e,n){var r;if(Math.floor(t)!==t)throw z(t,n),new j.ERR_OUT_OF_RANGE(n||"offset","an integer",t);if(e<0)throw new j.ERR_BUFFER_OUT_OF_BOUNDS;throw new j.ERR_OUT_OF_RANGE(n||"offset",lh(r=">= ".concat(n?1:0," and <= ")).call(r,e),t)}N("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?"".concat(t," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),N("ERR_INVALID_ARG_TYPE",(function(t,e){var n;return lh(n='The "'.concat(t,'" argument must be of type number. Received type ')).call(n,Mc(e))}),TypeError),N("ERR_OUT_OF_RANGE",(function(t,e,n){var r,i='The value of "'.concat(t,'" is out of range.'),o=n;return Xx(n)&&Math.abs(n)>Math.pow(2,32)?o=F(String(n)):"bigint"==typeof n&&(o=String(n),(n>Math.pow(BigInt(2),BigInt(32))||n<-Math.pow(BigInt(2),BigInt(32)))&&(o=F(o)),o+="n"),i+=lh(r=" It must be ".concat(e,". Received ")).call(r,o)}),RangeError);var q=/[^+/0-9A-Za-z-_]/g;function G(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function Y(t){return n.toByteArray(function(t){if(t=t.split("=")[0],(t=sE(t).call(t).replace(q,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function W(t,e,n,r){var i;for(i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function K(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function X(t){return t!=t}var $=function(){for(var t="0123456789abcdef",e=new Array(256),n=0;n<16;++n)for(var r=16*n,i=0;i<16;++i)e[r+i]=t[n]+t[i];return e}();function J(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}})(IM),xp(ZL,"__esModule",{value:!0});ZL.SCTE35=void 0;var zM=tM,VM=eM,qM=IM,GM=function(){function e(){t(this,e),this.buffer=qM.Buffer}return Uc(e,[{key:"parseFromB64",value:function(t){var e,n=Uint8Array.from(c_(e=this.parseBase64(t).split("")).call(e,(function(t){return t.charCodeAt(0)})));return this.parseSCTE35Data(n)}},{key:"parseFromHex",value:function(t){var e=t.match(/[a-f\d]{2}/gi)||[],n=Uint8Array.from(c_(e).call(e,(function(t){return i_(t,16)})));return this.parseSCTE35Data(n)}},{key:"parseBase64",value:function(t){return this.buffer.from(t,"base64").toString("binary")}},{key:"spliceEvent",value:function(t,e,n){var r=0;if(t.spliceEventId=e.getUint32(r),r+=4,t.spliceEventCancelIndicator=!!(128&e.getUint8(r++)),t.spliceEventCancelIndicator)return r;var i=e.getUint8(r++);if(t.outOfNetworkIndicator=!!(128&i),t.programSpliceFlag=!!(64&i),t.durationFlag=!!(32&i),5===n&&(t.spliceImmediateFlag=!!(16&i)),t.programSpliceFlag)if(5!==n||t.spliceImmediateFlag)4===n&&(t.utcSpliceTime=e.getUint32(r),r+=4);else{var o=this.timeSignal(new DataView(e.buffer,e.byteOffset+r,5));t.spliceTime=o,r++,o.specified&&(r+=4)}else if(t.componentCount=e.getUint8(r++),4===n){for(var a=[];a.length!==t.componentCount;)a.push({componentTag:e.getUint8(r++),utcSpliceTime:e.getUint32(r)}),r+=4;t.utcSpliceComponents=a}else console.warn("scte35-js TODO: support splice_insert");return t.durationFlag&&(i=e.getUint8(r++),t.breakDuration={autoReturn:!!(128&i),duration:(1&i?VM.THIRTY_TWO_BIT_MULTIPLIER:0)+e.getUint32(r)},r+=4),t.uniqueProgramId=e.getUint16(r),r+=2,t.available=e.getUint8(r++),t.expected=e.getUint8(r++),r}},{key:"spliceSchedule",value:function(t){var e={};e.spliceCount=t.getUint8(0),e.spliceEvents=[];for(var n,r=1;e.spliceEvents.length!==e.spliceCount;){var i={};r+=this.spliceEvent(i,new DataView(t.buffer,t.byteOffset+r),4),e.spliceEvents.push(i)}r!==t.byteLength&&console.error(lh(n="scte35-js Bad read splice_schedule actual: ".concat(r," expected: ")).call(n,t.byteLength));return e}},{key:"spliceInsert",value:function(t){var e,n={},r=this.spliceEvent(n,t,5);r!==t.byteLength&&console.error(lh(e="scte35-js Bad read splice_insert actual: ".concat(r," expected: ")).call(e,t.byteLength));return n}},{key:"timeSignal",value:function(t){var e={},n=t.getUint8(0);return e.specified=!!(128&n),e.specified&&(e.pts=1&n?VM.THIRTY_TWO_BIT_MULTIPLIER:0,e.pts+=t.getUint32(1)),e}},{key:"privateCommand",value:function(t){var e={},n=t.getUint32(0),r=new Uint8Array(t.buffer,t.byteOffset+4,t.byteLength-4);return e.identifier=n,e.identifier&&(e.rawData=r),e}},{key:"parseSCTE35Data",value:function(t){var e={},n=new DataView(t.buffer),r=0;e.tableId=n.getUint8(r++);var i,o=n.getUint8(r++);if(e.selectionSyntaxIndicator=!!(128&o),e.privateIndicator=!!(64&o),e.sectionLength=((15&o)<<8)+n.getUint8(r++),e.sectionLength+3!==t.byteLength)throw new Error(lh(i="Binary read error sectionLength: ".concat(e.sectionLength," + 3 !== data.length: ")).call(i,t.byteLength));if(e.protocolVersion=n.getUint8(r++),o=n.getUint8(r++),e.encryptedPacket=!!(128&o),e.encryptedAlgorithm=(126&o)>>1,e.encryptedPacket&&console.error("scte35-js splice_info_section encrypted_packet ".concat(e.encryptedAlgorithm," not supported")),e.ptsAdjustment=1&o?VM.THIRTY_TWO_BIT_MULTIPLIER:0,e.ptsAdjustment+=n.getUint32(r),r+=4,e.cwIndex=n.getUint8(r++),e.tier=n.getUint8(r++)<<4,o=n.getUint8(r++),e.tier+=(240&o)>>4,e.spliceCommandLength=((15&o)<<8)+n.getUint8(r++),e.spliceCommandType=n.getUint8(r++),4095===e.spliceCommandLength)if(6===e.spliceCommandType){var a=128&n.getUint8(r);e.spliceCommandLength=a?5:1}else if(0===e.spliceCommandType)e.spliceCommandLength=0;else if(5===e.spliceCommandType){var s=r;if(s+=4,!(128&n.getUint8(s++))){var u=n.getUint8(s++),l=16&u,c=32&u,f=64&u;if(f&&!l&&(s+=5),!f){var h=n.getUint8(s++);s+=h,s+=l?0:5*h}c&&(s+=5),s+=4,e.spliceCommandLength=s-r}}else console.error("scte35-js Unspecified length not supported in this context");if(0!==e.spliceCommandType){var p=new DataView(t.buffer,r,e.spliceCommandLength);4===e.spliceCommandType?e.spliceCommand=this.spliceSchedule(p):5===e.spliceCommandType?e.spliceCommand=this.spliceInsert(p):6===e.spliceCommandType?e.spliceCommand=this.timeSignal(p):255===e.spliceCommandType&&(e.spliceCommand=this.privateCommand(p))}if(r+=e.spliceCommandLength,e.descriptorLoopLength=n.getUint16(r),r+=2,e.descriptorLoopLength){var d=e.descriptorLoopLength;e.descriptors=[];try{for(;d;){var g=new DataView(t.buffer,r,d),v=zM.parseDescriptor(g);d-=v.descriptorLength+2,r+=v.descriptorLength+2,e.descriptors.push(v)}}catch(XM){var y;console.error(lh(y="scte35-js Error reading descriptor @ ".concat(r,", ignoring remaining bytes: ")).call(y,d," in loop.")),console.error(XM),r+=d,d=0}}return e.crc=n.getUint32(r),(r+=4)!==n.byteLength&&console.error("scte35-js Bad SCTE35 read - remaining data: ".concat(tb(t).call(t,r).join(", "))),e}}]),e}();new(ZL.SCTE35=GM);var YM=function(){function e(n){var r=this;t(this,e),ih(this,"_options",void 0),ih(this,"_track",void 0),ih(this,"_startTime",void 0),ih(this,"_adBreakCues",void 0),ih(this,"_activeRequestedAdBreak",void 0),ih(this,"_activePlayingAdBreak",void 0),ih(this,"_handleTimeUpdate",(function(){var t,e,n;if(null!==(t=r._adBreakCues)&&void 0!==t&&t.length){for(var i=0;i<r._adBreakCues.length;i++){var o=r._adBreakCues[i];if(o.startTime>=r._player.currentTime){e=o;break}}for(var a=r._adBreakCues.length-1;a>=0;a--){var s=r._adBreakCues[a];if(s.startTime<=r._player.currentTime){n=s;break}}}r._tryToRequestOrPlayAd(e,n)})),ih(this,"_clearActiveAds",(function(){r._activePlayingAdBreak=void 0,r._activeRequestedAdBreak=void 0})),ih(this,"_handleHlsCoreEvent",(function(t){var e=t.eventName,n=t.playlist;if("core.hlslevelloaded"===e){var i;if(null!=n&&null!==(i=n.segments)&&void 0!==i&&i.length&&!r._startTime){var o,a=QL(n.segments);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(0===s.start){r._startTime=new Date(s.dataTime).getTime();break}}}catch(c){a.e(c)}finally{a.f()}}if(null!=n&&n.dateRanges&&r._startTime){var u,l=Vh(n.dateRanges);r._adBreakCues=c_(u=$h(l).call(l,(function(t){return!!n.dateRanges[t]["SCTE35-OUT"]&&!!n.dateRanges[t]["START-DATE"]}))).call(u,(function(t){return{id:n.dateRanges[t].ID,startTime:(new Date(n.dateRanges[t]["START-DATE"]).getTime()-r._startTime)/1e3,data:n.dateRanges[t]["SCTE35-OUT"]}}))}}})),ih(this,"_onAddTrack",(function(t){var e=t.track;"metadata"===(null==e?void 0:e.kind)&&(e.mode="hidden",r._track=e,r._track.addEventListener("cuechange",r._onCuechange))})),ih(this,"_onCuechange",(function(){var t,e,n;r._adBreakCues=c_(t=$h(e=(null===(n=r._track)||void 0===n?void 0:n.cues)||[]).call(e,(function(t){var e;return"SCTE35-OUT"===(null===(e=t.value)||void 0===e?void 0:e.key)}))).call(t,(function(t){return{id:String(t.startTime),startTime:t.startTime,data:t.value.data}}))})),this._options=n,this._init()}return Uc(e,[{key:"_player",get:function(){return this._options.player}},{key:"_adManager",get:function(){return this._options.adManager}},{key:"_adTagUrl",get:function(){return this._options.adTagUrl}},{key:"_mediaElement",get:function(){return this._player.media}},{key:"destroy",value:function(){var t,e,n;null===(t=this._track)||void 0===t||t.removeEventListener("cuechange",this._onCuechange),this._track=void 0,null===(e=this._mediaElement)||void 0===e||null===(e=e.textTracks)||void 0===e||e.removeEventListener("addtrack",this._onAddTrack),this._player.off("core_event",this._handleHlsCoreEvent),this._player.off(uA,this._handleTimeUpdate),this._player.off(Eh,this._clearActiveAds),null===(n=this._adManager)||void 0===n||n.off(Th,this._clearActiveAds)}},{key:"_init",value:function(){var t,e;null===(t=this._mediaElement)||void 0===t||null===(t=t.textTracks)||void 0===t||t.addEventListener("addtrack",this._onAddTrack),this._player.on("core_event",this._handleHlsCoreEvent),this._player.on(uA,this._handleTimeUpdate),this._player.on(Eh,this._clearActiveAds),null===(e=this._adManager)||void 0===e||e.on(Th,this._clearActiveAds)}},{key:"_tryToRequestOrPlayAd",value:function(t,e){var n,r,i,o;t&&!this._activeRequestedAdBreak&&(this._activeRequestedAdBreak=t,console.log("Requesting Ads for",this._activeRequestedAdBreak,this._player.currentTime),null===(n=this._adManager)||void 0===n||n.reset(),null===(r=this._adManager)||void 0===r||r.updateConfig({adTagUrl:this._adTagUrl}),null===(i=this._adManager)||void 0===i||i.requestAds());e&&this._activeRequestedAdBreak&&this._activeRequestedAdBreak.startTime===e.startTime&&!this._activePlayingAdBreak&&(this._activePlayingAdBreak=e,console.log("Playing Ads for",this._activePlayingAdBreak,this._player.currentTime),null===(o=this._adManager)||void 0===o||o.playAds())}}]),e}();function WM(t){var e;return 0===(null==t||null===(e=t.getAdPodInfo())||void 0===e?void 0:e.getTimeOffset())}var KM=function(e){Bf(r,e);var n=rh(r);function r(){var e,i;t(this,r);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return ih(Bc(i=n.call.apply(n,lh(e=[this]).call(e,a))),"_scte35Manager",void 0),ih(Bc(i),"_handleRetryAfterPreroll",(function(t){WM(t.ad)&&i.player.retry()})),ih(Bc(i),"_handleHlsDisconnectTimeAndMaxLatency",(function(t){var e,n=t.adsManager;(i.config.enableSCTE35||(null==n||null===(e=n.getCuePoints())||void 0===e?void 0:mh(e).call(e,(function(t){return t>0})))>=0)&&(i.player.plugins.hls.hls.config.disconnectTime=Number.POSITIVE_INFINITY,i.player.plugins.hls.hls.config.maxLatency=Number.POSITIVE_INFINITY)})),ih(Bc(i),"_handlePrerollMuted",(function(t){var e,n;WM(t.ad)&&(null===(e=(n=i.player.plugins.autoplayplugin).handleAutoplayStart)||void 0===e||e.call(n),i.player.once(cA,(function(){var t,e;null===(t=(e=i.player.plugins.autoplayplugin).initState)||void 0===t||t.call(e)})))})),i}return Uc(r,[{key:"afterCreate",value:function(){Of(Mf(r.prototype),"afterCreate",this).call(this),this._init()}},{key:"beforePlayerInit",value:function(){var t,e,n=Of(Mf(r.prototype),"beforePlayerInit",this).call(this);return null===(t=this.csManager)||void 0===t||t.once(Th,this._handleRetryAfterPreroll),this.player.plugins.hls&&this.config.enableSCTE35&&null!==(e=this.config.ima)&&void 0!==e&&e.adTagUrlForSCTE35&&(this._scte35Manager=new YM({player:this.player,adTagUrl:this.config.ima.adTagUrlForSCTE35,adManager:this.csManager})),n}},{key:"destroy",value:function(){var t,e;Of(Mf(r.prototype),"destroy",this).call(this),null===(t=this._scte35Manager)||void 0===t||t.destroy(),this._scte35Manager=void 0,null===(e=this.csManager)||void 0===e||e.off(Th,this._handleRetryAfterPreroll),this.player.plugins.hls&&this.player.off(kh,this._handleHlsDisconnectTimeAndMaxLatency)}},{key:"_init",value:function(){var t,e;null!==(t=this.config.ima)&&void 0!==t&&t.adTagUrl||null===(e=this.config.ima)||void 0===e||null===(e=e.schedule)||void 0===e||!e.length||(this.config.ima.adsResponse=function(t){var e;if(t&&t.length){var n=document.implementation.createDocument("http://www.iab.net/videosuite/vmap","vmap:VMAP"),r=n.getElementsByTagName("vmap:VMAP");r[0].setAttribute("version","1.0");var i,o=0,a=0;return lp(e=GE(t).call(t,(function(t,e){return"pre"===t.offset||"post"===e.offset?-1:"post"===t.offset||"pre"===e.offset?1:Date.parse("2024-01-01T".concat(t.offset))<Date.parse("2024-01-01T".concat(e.offset))?-1:1}))).call(e,(function(t){var e,s,u,l=t.offset,c=t.type,f=t.tag;switch(l){case"pre":s="start",u="preroll";break;case"post":s="end",u="postroll";break;default:s=l,i!==l?(i=l,a=1,u="midroll-".concat(++o)):(a++,u="midroll-".concat(o))}var h=n.createElement("vmap:AdBreak");h.setAttribute("timeOffset",s),h.setAttribute("breakId",u),h.setAttribute("breakType",c||"linear"),r[0].appendChild(h);var p=n.createElement("vmap:AdSource");p.setAttribute("id",lh(e="".concat(u,"-ad-")).call(e,a)),p.setAttribute("allowMultipleAds","true"),p.setAttribute("followRedirects","true"),h.appendChild(p);var d=n.createElement("vmap:AdTagURI");d.setAttribute("templateType","vast3"),p.appendChild(d),d.innerHTML="<![CDATA[ ".concat(f," ]]>")})),(new XMLSerializer).serializeToString(n)}}(this.config.ima.schedule)),this.player.plugins.hls&&this.player.on(kh,this._handleHlsDisconnectTimeAndMaxLatency),this.player.plugins.autoplayplugin&&this.player.once(bh,this._handlePrerollMuted)}}],[{key:"pluginName",get:function(){return"ad"}}]),r}($L);return KM}));
|