@volcengine/veplayer-plugin 2.5.0 → 2.6.0-rc.1

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.
Files changed (31) hide show
  1. package/esm/index.d.ts +1 -0
  2. package/esm/index.development.css +14 -0
  3. package/esm/index.development.js +42959 -31350
  4. package/esm/index.production.css +1 -1
  5. package/esm/index.production.js +13 -4
  6. package/esm/veplayer.plugin.ad.development.css +14 -0
  7. package/esm/veplayer.plugin.ad.development.js +13318 -0
  8. package/esm/veplayer.plugin.ad.production.css +1 -0
  9. package/esm/veplayer.plugin.ad.production.js +4 -0
  10. package/esm/veplayer.plugin.flv.development.js +2 -2
  11. package/esm/veplayer.plugin.flv.production.js +1 -1
  12. package/esm/veplayer.plugin.hls.development.js +11 -5
  13. package/esm/veplayer.plugin.hls.production.js +1 -1
  14. package/esm/veplayer.plugin.mp4.development.js +1 -1
  15. package/esm/veplayer.plugin.mp4.production.js +1 -1
  16. package/esm/veplayer.plugin.rtm.development.js +45 -142
  17. package/esm/veplayer.plugin.rtm.production.js +1 -1
  18. package/package.json +1 -1
  19. package/umd/index.d.ts +1 -0
  20. package/umd/veplayer.plugin.ad.development.css +14 -0
  21. package/umd/veplayer.plugin.ad.development.js +13321 -0
  22. package/umd/veplayer.plugin.ad.production.css +1 -0
  23. package/umd/veplayer.plugin.ad.production.js +1 -0
  24. package/umd/veplayer.plugin.flv.development.js +2 -2
  25. package/umd/veplayer.plugin.flv.production.js +1 -1
  26. package/umd/veplayer.plugin.hls.development.js +11 -5
  27. package/umd/veplayer.plugin.hls.production.js +1 -1
  28. package/umd/veplayer.plugin.mp4.development.js +1 -1
  29. package/umd/veplayer.plugin.mp4.production.js +1 -1
  30. package/umd/veplayer.plugin.rtm.development.js +45 -142
  31. package/umd/veplayer.plugin.rtm.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=_,A=y,E=function(t){if("Function"===k(t))return A(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},M={},L=!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,W=function(t){return null==t},Y=W,K=TypeError,X=function(t){if(Y(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,At=x,Et=ut,Tt=Object,Ct=_t?function(t){return"symbol"==typeof t}:function(t){var e=kt("Symbol");return At(e)&&Et(e.prototype,Tt(t))},St=String,xt=function(t){try{return St(t)}catch(e){return"Object"}},Mt=x,Lt=xt,Ot=TypeError,It=function(t){if(Mt(t))return t;throw Ot(Lt(t)+" is not a function")},Pt=It,Rt=W,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,{}),Wt=Gt;(Ft.exports=function(t,e){return Wt[t]||(Wt[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 Yt=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=Yt,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,Ae=function(t){var e=_e(t,"string");return ke(e)?e:e+""},Ee=et,Te=o.document,Ce=Ee(Te)&&Ee(Te.createElement),Se=function(t){return Ce?Te.createElement(t):{}},xe=Se,Me=!L&&!a((function(){return 7!=Object.defineProperty(xe("div"),"a",{get:function(){return 7}}).a})),Le=L,Oe=P,Ie=R,Pe=F,Re=Q,Ue=Ae,Be=Zt,De=Me,je=Object.getOwnPropertyDescriptor;M.f=Le?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==We||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",We=ze.POLYFILL="P",Ye=ze,Ke=It,Xe=s,$e=E(E.bind),Je=function(t,e){return Ke(t),void 0===e?t:Xe?$e(t,e):function(){return t.apply(e,arguments)}},Qe={},Ze=L&&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=L,an=Me,sn=Ze,un=rn,ln=Ae,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=L?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=E,kn=x,An=M.f,En=Ye,Tn=nt,Cn=Je,Sn=mn,xn=Zt,Mn=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},Ln=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=En(h?o:f+(p?".":"#")+o,t.forced))&&g&&xn(g,o),s=v[o],r&&(u=t.dontCallGetSet?(c=An(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?Mn(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=Ln,In=L,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,Wn=function(t){return t>0?Gn(qn(t),9007199254740991):0},Yn=Wn,Kn=function(t){return Yn(t.length)},Xn=TypeError,$n=function(t){if(t>9007199254740991)throw Xn("Maximum allowed index exceeded");return t},Jn=Ae,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/,Ar=dr(kr.exec),Er=!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 Er||!!Ar(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,Mr=Sr,Lr=et,Or=pe("species"),Ir=Array,Pr=function(t){var e;return xr(t)&&(e=t.constructor,(Mr(e)&&(e===Ir||xr(e.prototype))||Lr(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=Ln,Fr=a,Hr=Nn,zr=et,Vr=$t,qr=Kn,Gr=$n,Wr=tr,Yr=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=Yr(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&&Wr(s,u,o[n]);else Gr(u+1),Wr(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)},Ai=L,Ei=Ze,Ti=Qe,Ci=rn,Si=Q,xi=ki;ni.f=Ai&&!Ei?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 Mi,Li=st("document","documentElement"),Oi=ie,Ii=Yt("keys"),Pi=function(t){return Ii[t]||(Ii[t]=Oi(t))},Ri=rn,Ui=ni,Bi=bi,Di=hi,ji=Li,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},Wi=function(){try{Mi=new ActiveXObject("htmlfile")}catch(i){}var t,e,n;Wi="undefined"!=typeof document?document.domain&&Mi?Gi(Mi):(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(Mi);for(var r=Bi.length;r--;)delete Wi[Fi][Bi[r]];return Wi()};Di[zi]=!0;var Yi=Object.create||function(t,e){var n;return null!==t?(Vi[Fi]=Ri(t),n=new Vi,Vi[Fi]=null,n[zi]=t):n=Wi(),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,Ao=Qe.f,Eo=function(t){var e=wo.Symbol||(wo.Symbol={});_o(e,t)||Ao(e,t,{value:ko.f(t)})},To=P,Co=st,So=pe,xo=fo,Mo=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})},Lo=lr,Oo=nr?{}.toString:function(){return"[object "+Lo(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,Wo=Gt,Yo=Pi,Ko=hi,Xo="Object already initialized",$o=zo.TypeError,Jo=zo.WeakMap;if(Ho||Wo.state){var Qo=Wo.state||(Wo.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=Yo("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=Ln,ca=o,fa=P,ha=y,pa=L,da=wt,ga=a,va=Zt,ya=ut,ma=rn,ba=Q,wa=Ae,_a=ei,ka=F,Aa=Yi,Ea=ki,Ta=Ki,Ca=Ji,Sa=lo,xa=M,Ma=Qe,La=ni,Oa=R,Ia=fo,Pa=po,Ra=Yt,Ua=hi,Ba=ie,Da=pe,ja=go,Na=Eo,Fa=Mo,Ha=jo,za=ta,Va=ua.forEach,qa=Pi("hidden"),Ga="Symbol",Wa="prototype",Ya=za.set,Ka=za.getterFor(Ga),Xa=Object[Wa],$a=ca.Symbol,Ja=$a&&$a[Wa],Qa=ca.TypeError,Za=ca.QObject,ts=xa.f,es=Ma.f,ns=Ca.f,rs=Oa.f,is=ha([].push),os=Ra("symbols"),as=Ra("op-symbols"),ss=Ra("wks"),us=!Za||!Za[Wa]||!Za[Wa].findChild,ls=pa&&ga((function(){return 7!=Aa(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]=Aa(Ja);return Ya(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=Aa(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=Ea(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[Wa],"toString",(function(){return Ka(this).tag})),Ia($a,"withoutSetter",(function(t){return cs(Ba(t),t)})),Oa.f=ps,Ma.f=fs,La.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(Ea(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?Aa(t):hs(Aa(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=Ln,bs=st,ws=Zt,_s=ei,ks=Yt,As=ys,Es=ks("string-to-symbol-registry"),Ts=ks("symbol-to-string-registry");ms({target:"Symbol",stat:!0,forced:!As},{for:function(t){var e=_s(t);if(ws(Es,e))return Es[e];var n=bs("Symbol")(e);return Es[e]=n,Ts[n]=e,n}});var Cs=Ln,Ss=Zt,xs=Ct,Ms=xt,Ls=ys,Os=Yt("symbol-to-string-registry");Cs({target:"Symbol",stat:!0,forced:!Ls},{keyFor:function(t){if(!xs(t))throw TypeError(Ms(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=Ln,Ns=st,Fs=h,Hs=P,zs=y,Vs=a,qs=x,Gs=Ct,Ws=Is,Ys=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=Ws(arguments),r=Ys(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=Ws(arguments),i=Fs(ou?su:$s,null,r);return au&&"string"==typeof i?tu(i,nu,uu):i}});var lu=lo,cu=$t;Ln({target:"Object",stat:!0,forced:!wt||a((function(){lu.f(1)}))},{getOwnPropertySymbols:function(t){var e=lu.f;return e?e(cu(t)):[]}}),Eo("asyncIterator"),Eo("hasInstance"),Eo("isConcatSpreadable"),Eo("iterator"),Eo("match"),Eo("matchAll"),Eo("replace"),Eo("search"),Eo("species"),Eo("split");var fu=Mo;Eo("toPrimitive"),fu();var hu=st,pu=jo;Eo("toStringTag"),pu(hu("Symbol"),"Symbol"),Eo("unscopables"),jo(o.JSON,"JSON",!0);var du,gu,vu,yu=nt.Symbol,mu={},bu=L,wu=Zt,_u=Function.prototype,ku=bu&&Object.getOwnPropertyDescriptor,Au=wu(_u,"name"),Eu={EXISTS:Au,PROPER:Au&&"something"===function(){}.name,CONFIGURABLE:Au&&(!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,Mu=Tu,Lu=Pi("IE_PROTO"),Ou=Object,Iu=Ou.prototype,Pu=Mu?Ou.getPrototypeOf:function(t){var e=xu(t);if(Cu(e,Lu))return e[Lu];var n=e.constructor;return Su(n)&&e instanceof n?n.prototype:e instanceof Ou?Iu:null},Ru=a,Uu=x,Bu=et,Du=Yi,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=Yi,Wu=F,Yu=jo,Ku=mu,Xu=function(){return this},$u=function(t,e,n,r){var i=e+" Iterator";return t.prototype=Gu(qu,{next:Wu(+!r,n)}),Yu(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=Ln,sl=P,ul=Eu,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},Al=function(t,e){return{value:t,done:e}},El=Q,Tl=mu,Cl=ta;Qe.f;var Sl=kl,xl=Al,Ml="Array Iterator",Ll=Cl.set,Ol=Cl.getterFor(Ml);Sl(Array,"Array",(function(t,e){Ll(this,{type:Ml,target:El(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;Eo("dispose");var zl=Hl;Eo("asyncDispose");var Vl=Ln,ql=y,Gl=st("Symbol"),Wl=Gl.keyFor,Yl=ql(Gl.prototype.valueOf);Vl({target:"Symbol",stat:!0},{isRegistered:function(t){try{return void 0!==Wl(Yl(t))}catch(e){return!1}}});for(var Kl=Ln,Xl=Yt,$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(oR){}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(oR){}return!1}}),Eo("matcher"),Eo("metadataKey"),Eo("observable"),Eo("metadata"),Eo("patternMatch"),Eo("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,Ac=kl,Ec=Al,Tc="String Iterator",Cc=kc.set,Sc=kc.getterFor(Tc);Ac(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?Ec(void 0,!0):(t=wc(n,r),e.index+=t.length,Ec(t,!1))}));var xc=go.f("iterator"),Mc=n(xc);function Lc(t){return(Lc="function"==typeof cc&&"symbol"==typeof Mc?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"!==Lc(t)||null===t)return t;var n=t[Ic];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Lc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Lc(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=M,Vc=Pu;Ln({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),Wc=y,Yc=It,Kc=et,Xc=Zt,$c=Is,Jc=s,Qc=Function,Zc=Wc([].concat),tf=Wc([].join),ef={},nf=Jc?Qc.bind:function(t){var e=Yc(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;Ln({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=Ln,gf=a,vf=Q,yf=M.f,mf=L;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);Ln({target:"Object",stat:!0},{setPrototypeOf:ol});var Af=nt.Object.setPrototypeOf,Ef=n(Af),Tf=$t,Cf=Pu,Sf=Tu;Ln({target:"Object",stat:!0,forced:a((function(){Cf(1)})),sham:!Sf},{getPrototypeOf:function(t){return Cf(Tf(t))}});var xf=nt.Object.getPrototypeOf,Mf=n(xf);function Lf(t){var e;return(Lf=Ef?hf(e=Mf).call(e):function(t){return t.__proto__||Mf(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=Lf(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)}Ln({target:"Object",stat:!0,sham:!L},{create:Yi});var If=nt.Object,Pf=function(t,e){return If.create(t,e)},Rf=n(Pf);function Uf(t,e){var n;return(Uf=Ef?hf(n=Ef).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=Ln,zf=h,Vf=nf,qf=Ff,Gf=rn,Wf=et,Yf=Yi,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=Yf(Wf(i)?i:$f),a=zf(t,o,e);return Wf(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=Lf(t);if(e){var i=Lf(this).constructor;n=nh(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===Lc(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="ad_start",fh="ad_play",hh="ad_pause",ph="ad_time_update",dh="ad_skipped",gh="ad_error",vh="ad_complete",yh="ad_all_completed",mh="ima_sdk_load_start",bh="ima_sdk_load_error",wh="ima_ad_manager_ready",_h="ima_ad_complete",kh="ima_ad_error",Ah="ima_ad_loaded",Eh="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 Mh=function(t,e,n){return xh(Sh.JSON.stringify,null,arguments)},Lh=n(Mh),Oh=n(lc),Ih=lr,Ph=Ut,Rh=W,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;Ln({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;Ln({target:"Array",proto:!0,forced:!jr("filter")},{filter:function(t){return Gh(this,t,arguments.length>1?arguments[1]:void 0)}});var Wh=af("Array").filter,Yh=ut,Kh=Wh,Xh=Array.prototype,$h=n((function(t){var e=t.filter;return t===Xh||Yh(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)};Ln({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=M,bp=tr;Ln({target:"Object",stat:!0,sham:!L},{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=Ln,Ap=L,Ep=ni.f;kp({target:"Object",stat:!0,forced:Object.defineProperties!==Ep,sham:!Ap},{defineProperties:Ep});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),Mp=n(Pf),Lp=n(xf),Op=n(Af),Ip=Zt,Pp=gp,Rp=M,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,Wp=function(t,e){if(zp&&"string"==typeof t&&!jp.prepareStackTrace)for(;e--;)t=Np(t,Hp,"");return t},Yp=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(oR){i=!0,r=oR}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,Ad=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(oR){bd(r,"throw",oR)}if("object"==typeof s&&s&&vd(kd,s))return s}return new _d(!1)},Ed=ei,Td=Ln,Cd=ut,Sd=Pu,xd=ol,Md=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))}},Ld=Yi,Od=mn,Id=F,Pd=function(t,e){Bp(e)&&"cause"in e&&Dp(t,"cause",e.cause)},Rd=function(t,e,n,r){Yp&&(Kp?Kp(t,e):Gp(t,"stack",Wp(n,r)))},Ud=Ad,Bd=function(t,e){return void 0===t?arguments.length<2?"":e:Ed(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:Ld(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):Md(Fd,jd,{name:!0});var Hd=Fd.prototype=Ld(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,Wd="undefined"!=typeof process&&"process"==_(process),Yd=st,Kd=po,Xd=L,$d=pe("species"),Jd=function(t){var e=Yd(t);Xd&&e&&!e[$d]&&Kd(e,$d,{configurable:!0,get:function(){return this}})},Qd=ut,Zd=TypeError,tg=function(t,e){if(Qd(e,t))return t;throw Zd("Incorrect invocation")},eg=rn,ng=Ff,rg=W,ig=pe("species"),og=function(t,e){var n,r=eg(t).constructor;return void 0===r||rg(n=eg(r)[ig])?e:ng(n)},ag=TypeError,sg=function(t,e){if(t<e)throw ag("Not enough arguments");return t},ug=/(?:ipad|iphone|ipod).*applewebkit/i.test(lt),lg=o,cg=h,fg=Je,hg=x,pg=Zt,dg=a,gg=Li,vg=Is,yg=Se,mg=sg,bg=ug,wg=Wd,_g=lg.setImmediate,kg=lg.clearImmediate,Ag=lg.process,Eg=lg.Dispatch,Tg=lg.Function,Cg=lg.MessageChannel,Sg=lg.String,xg=0,Mg={},Lg="onreadystatechange";dg((function(){zd=lg.location}));var Og=function(t){if(pg(Mg,t)){var e=Mg[t];delete Mg[t],e()}},Ig=function(t){return function(){Og(t)}},Pg=function(t){Og(t.data)},Rg=function(t){lg.postMessage(Sg(t),zd.protocol+"//"+zd.host)};_g&&kg||(_g=function(t){mg(arguments.length,1);var e=hg(t)?t:Tg(t),n=vg(arguments,1);return Mg[++xg]=function(){cg(e,void 0,n)},Vd(xg),xg},kg=function(t){delete Mg[t]},wg?Vd=function(t){Ag.nextTick(Ig(t))}:Eg&&Eg.now?Vd=function(t){Eg.now(Ig(t))}:Cg&&!bg?(Gd=(qd=new Cg).port2,qd.port1.onmessage=Pg,Vd=fg(Gd.postMessage,Gd)):lg.addEventListener&&hg(lg.postMessage)&&!lg.importScripts&&zd&&"file:"!==zd.protocol&&!dg(Rg)?(Vd=Rg,lg.addEventListener("message",Pg,!1)):Vd=Lg in yg("script")?function(t){gg.appendChild(yg("script"))[Lg]=function(){gg.removeChild(this),Og(t)}}:function(t){setTimeout(Ig(t),0)});var Ug={set:_g,clear:kg},Bg=function(){this.head=null,this.tail=null};Bg.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 Dg,jg,Ng,Fg,Hg,zg=Bg,Vg=/ipad|iphone|ipod/i.test(lt)&&"undefined"!=typeof Pebble,qg=/web0s(?!.*chrome)/i.test(lt),Gg=o,Wg=Je,Yg=M.f,Kg=Ug.set,Xg=zg,$g=ug,Jg=Vg,Qg=qg,Zg=Wd,tv=Gg.MutationObserver||Gg.WebKitMutationObserver,ev=Gg.document,nv=Gg.process,rv=Gg.Promise,iv=Yg(Gg,"queueMicrotask"),ov=iv&&iv.value;if(!ov){var av=new Xg,sv=function(){var t,e;for(Zg&&(t=nv.domain)&&t.exit();e=av.get();)try{e()}catch(oR){throw av.head&&Dg(),oR}t&&t.enter()};$g||Zg||Qg||!tv||!ev?!Jg&&rv&&rv.resolve?((Fg=rv.resolve(void 0)).constructor=rv,Hg=Wg(Fg.then,Fg),Dg=function(){Hg(sv)}):Zg?Dg=function(){nv.nextTick(sv)}:(Kg=Wg(Kg,Gg),Dg=function(){Kg(sv)}):(jg=!0,Ng=ev.createTextNode(""),new tv(sv).observe(Ng,{characterData:!0}),Dg=function(){Ng.data=jg=!jg}),ov=function(t){av.head||Dg(),av.add(t)}}var uv=ov,lv=function(t){try{return{error:!1,value:t()}}catch(oR){return{error:!0,value:oR}}},cv=o.Promise,fv="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,hv=!fv&&!Wd&&"object"==typeof window&&"object"==typeof document,pv=o,dv=cv,gv=x,vv=Ye,yv=pr,mv=pe,bv=hv,wv=fv,_v=vt,kv=dv&&dv.prototype,Av=mv("species"),Ev=!1,Tv=gv(pv.PromiseRejectionEvent),Cv={CONSTRUCTOR:vv("Promise",(function(){var t=yv(dv),e=t!==String(dv);if(!e&&66===_v)return!0;if(!kv.catch||!kv.finally)return!0;if(!_v||_v<51||!/native code/.test(t)){var n=new dv((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[Av]=r,!(Ev=n.then((function(){}))instanceof r))return!0}return!e&&(bv||wv)&&!Tv})),REJECTION_EVENT:Tv,SUBCLASSING:Ev},Sv={},xv=It,Mv=TypeError,Lv=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw Mv("Bad Promise constructor");e=t,n=r})),this.resolve=xv(e),this.reject=xv(n)};Sv.f=function(t){return new Lv(t)};var Ov,Iv,Pv=Ln,Rv=Wd,Uv=o,Bv=P,Dv=fo,jv=jo,Nv=Jd,Fv=It,Hv=x,zv=et,Vv=tg,qv=og,Gv=Ug.set,Wv=uv,Yv=function(t,e){try{1==arguments.length?console.error(t):console.error(t,e)}catch(oR){}},Kv=lv,Xv=zg,$v=ta,Jv=cv,Qv=Cv,Zv=Sv,ty="Promise",ey=Qv.CONSTRUCTOR,ny=Qv.REJECTION_EVENT,ry=$v.getterFor(ty),iy=$v.set,oy=Jv&&Jv.prototype,ay=Jv,sy=oy,uy=Uv.TypeError,ly=Uv.document,cy=Uv.process,fy=Zv.f,hy=fy,py=!!(ly&&ly.createEvent&&Uv.dispatchEvent),dy="unhandledrejection",gy=function(t){var e;return!(!zv(t)||!Hv(e=t.then))&&e},vy=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&&_y(e),e.rejection=1),!0===s?n=o:(c&&c.enter(),n=s(o),c&&(c.exit(),i=!0)),n===t.promise?l(uy("Promise-chain cycle")):(r=gy(n))?Bv(r,n,u,l):u(n)):l(o)}catch(oR){c&&!i&&c.exit(),l(oR)}},yy=function(t,e){t.notified||(t.notified=!0,Wv((function(){for(var n,r=t.reactions;n=r.get();)vy(n,t);t.notified=!1,e&&!t.rejection&&by(t)})))},my=function(t,e,n){var r,i;py?((r=ly.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),Uv.dispatchEvent(r)):r={promise:e,reason:n},!ny&&(i=Uv["on"+t])?i(r):t===dy&&Yv("Unhandled promise rejection",n)},by=function(t){Bv(Gv,Uv,(function(){var e,n=t.facade,r=t.value;if(wy(t)&&(e=Kv((function(){Rv?cy.emit("unhandledRejection",r,n):my(dy,n,r)})),t.rejection=Rv||wy(t)?2:1,e.error))throw e.value}))},wy=function(t){return 1!==t.rejection&&!t.parent},_y=function(t){Bv(Gv,Uv,(function(){var e=t.facade;Rv?cy.emit("rejectionHandled",e):my("rejectionhandled",e,t.value)}))},ky=function(t,e,n){return function(r){t(e,r,n)}},Ay=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,yy(t,!0))},Ey=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw uy("Promise can't be resolved itself");var r=gy(e);r?Wv((function(){var n={done:!1};try{Bv(r,e,ky(Ey,n,t),ky(Ay,n,t))}catch(oR){Ay(n,oR,t)}})):(t.value=e,t.state=1,yy(t,!1))}catch(oR){Ay({done:!1},oR,t)}}};ey&&(sy=(ay=function(t){Vv(this,sy),Fv(t),Bv(Ov,this);var e=ry(this);try{t(ky(Ey,e),ky(Ay,e))}catch(oR){Ay(e,oR)}}).prototype,(Ov=function(t){iy(this,{type:ty,done:!1,notified:!1,parent:!1,reactions:new Xv,rejection:!1,state:0,value:void 0})}).prototype=Dv(sy,"then",(function(t,e){var n=ry(this),r=fy(qv(this,ay));return n.parent=!0,r.ok=!Hv(t)||t,r.fail=Hv(e)&&e,r.domain=Rv?cy.domain:void 0,0==n.state?n.reactions.add(r):Wv((function(){vy(r,n)})),r.promise})),Iv=function(){var t=new Ov,e=ry(t);this.promise=t,this.resolve=ky(Ey,e),this.reject=ky(Ay,e)},Zv.f=fy=function(t){return t===ay||undefined===t?new Iv(t):hy(t)}),Pv({global:!0,constructor:!0,wrap:!0,forced:ey},{Promise:ay}),jv(ay,ty,!1,!0),Nv(ty);var Ty=pe("iterator"),Cy=!1;try{var Sy=0,xy={next:function(){return{done:!!Sy++}},return:function(){Cy=!0}};xy[Ty]=function(){return this},Array.from(xy,(function(){throw 2}))}catch(oR){}var My=function(t,e){if(!e&&!Cy)return!1;var n=!1;try{var r={};r[Ty]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(oR){}return n},Ly=cv,Oy=Cv.CONSTRUCTOR||!My((function(t){Ly.all(t).then(void 0,(function(){}))})),Iy=P,Py=It,Ry=Sv,Uy=lv,By=Ad;Ln({target:"Promise",stat:!0,forced:Oy},{all:function(t){var e=this,n=Ry.f(e),r=n.resolve,i=n.reject,o=Uy((function(){var n=Py(e.resolve),o=[],a=0,s=1;By(t,(function(t){var u=a++,l=!1;s++,Iy(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 Dy=Ln,jy=Cv.CONSTRUCTOR;cv&&cv.prototype,Dy({target:"Promise",proto:!0,forced:jy,real:!0},{catch:function(t){return this.then(void 0,t)}});var Ny=P,Fy=It,Hy=Sv,zy=lv,Vy=Ad;Ln({target:"Promise",stat:!0,forced:Oy},{race:function(t){var e=this,n=Hy.f(e),r=n.reject,i=zy((function(){var i=Fy(e.resolve);Vy(t,(function(t){Ny(i,e,t).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var qy=P,Gy=Sv;Ln({target:"Promise",stat:!0,forced:Cv.CONSTRUCTOR},{reject:function(t){var e=Gy.f(this);return qy(e.reject,void 0,t),e.promise}});var Wy=rn,Yy=et,Ky=Sv,Xy=function(t,e){if(Wy(t),Yy(e)&&e.constructor===t)return e;var n=Ky.f(t);return(0,n.resolve)(e),n.promise},$y=Ln,Jy=cv,Qy=Cv.CONSTRUCTOR,Zy=Xy,tm=st("Promise"),em=!Qy;$y({target:"Promise",stat:!0,forced:true},{resolve:function(t){return Zy(em&&this===tm?Jy:this,t)}});var nm=P,rm=It,im=Sv,om=lv,am=Ad;Ln({target:"Promise",stat:!0,forced:Oy},{allSettled:function(t){var e=this,n=im.f(e),r=n.resolve,i=n.reject,o=om((function(){var n=rm(e.resolve),i=[],o=0,a=1;am(t,(function(t){var s=o++,u=!1;a++,nm(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 sm=P,um=It,lm=st,cm=Sv,fm=lv,hm=Ad,pm="No one promise resolved";Ln({target:"Promise",stat:!0,forced:Oy},{any:function(t){var e=this,n=lm("AggregateError"),r=cm.f(e),i=r.resolve,o=r.reject,a=fm((function(){var r=um(e.resolve),a=[],s=0,u=1,l=!1;hm(t,(function(t){var c=s++,f=!1;u++,sm(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,pm)))}))})),--u||o(new n(a,pm))}));return a.error&&o(a.value),r.promise}});var dm=Ln,gm=cv,vm=a,ym=st,mm=x,bm=og,wm=Xy,_m=gm&&gm.prototype;dm({target:"Promise",proto:!0,real:!0,forced:!!gm&&vm((function(){_m.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=bm(this,ym("Promise")),n=mm(t);return this.then(n?function(n){return wm(e,t()).then((function(){return n}))}:t,n?function(n){return wm(e,t()).then((function(){throw n}))}:t)}});var km=nt.Promise,Am=Sv,Em=lv;Ln({target:"Promise",stat:!0,forced:!0},{try:function(t){var e=Am.f(this),n=Em(t);return(n.error?e.reject:e.resolve)(n.value),e.promise}});var Tm=n(km),Cm=Ln,Sm=Nn,xm=y([].reverse),Mm=[1,2];Cm({target:"Array",proto:!0,forced:String(Mm)===String(Mm.reverse())},{reverse:function(){return Sm(this)&&(this.length=this.length),xm(this)}});var Lm=af("Array").reverse,Om=ut,Im=Lm,Pm=Array.prototype,Rm=n((function(t){var e=t.reverse;return t===Pm||Om(Pm,t)&&e===Pm.reverse?Im:e})),Um=Ln,Bm=Nn,Dm=Sr,jm=et,Nm=ai,Fm=Kn,Hm=Q,zm=tr,Vm=pe,qm=Is,Gm=jr("slice"),Wm=Vm("species"),Ym=Array,Km=Math.max;Um({target:"Array",proto:!0,forced:!Gm},{slice:function(t,e){var n,r,i,o=Hm(this),a=Fm(o),s=Nm(t,a),u=Nm(void 0===e?a:e,a);if(Bm(o)&&(n=o.constructor,(Dm(n)&&(n===Ym||Bm(n.prototype))||jm(n)&&null===(n=n[Wm]))&&(n=void 0),n===Ym||void 0===n))return qm(o,s,u);for(r=new(void 0===n?Ym:n)(Km(u-s,0)),i=0;s<u;s++,i++)s in o&&zm(r,i,o[s]);return r.length=i,r}});var Xm=af("Array").slice,$m=ut,Jm=Xm,Qm=Array.prototype,Zm=function(t){var e=t.slice;return t===Qm||$m(Qm,t)&&e===Qm.slice?Jm:e},tb=n(Zm),eb=n(Zm),nb=n(xc),rb=n(ff),ib=n(eh),ob=n(qc);Ln({target:"Array",stat:!0},{isArray:Nn});var ab=nt.Array.isArray,sb=n(ab),ub=n(ab),lb=rn,cb=ld,fb=Je,hb=P,pb=$t,db=function(t,e,n,r){try{return r?e(lb(n)[0],n[1]):e(n)}catch(oR){cb(t,"throw",oR)}},gb=Qp,vb=Sr,yb=Kn,mb=tr,bb=od,wb=Dh,_b=Array,kb=function(t){var e=pb(t),n=vb(this),r=arguments.length,i=r>1?arguments[1]:void 0,o=void 0!==i;o&&(i=fb(i,r>2?arguments[2]:void 0));var a,s,u,l,c,f,h=wb(e),p=0;if(!h||this===_b&&gb(h))for(a=yb(e),s=n?new this(a):_b(a);a>p;p++)f=o?i(e[p],p):e[p],mb(s,p,f);else for(c=(l=bb(e,h)).next,s=n?new this:[];!(u=hb(c,l)).done;p++)f=o?db(l,i,[u.value,p],!0):u.value,mb(s,p,f);return s.length=p,s},Ab=kb;Ln({target:"Array",stat:!0,forced:!My((function(t){Array.from(t)}))},{from:Ab});var Eb=nt.Array.from,Tb=n(Eb),Cb=n(Eb),Sb=n(Oc);function xb(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 Mb(t){for(var e=1;e<arguments.length;e++){var n,r,i=null!=arguments[e]?arguments[e]:{};e%2?lp(n=xb(Object(i),!0)).call(n,(function(e){Db(t,e,i[e])})):wp?Sp(t,wp(i)):lp(r=xb(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=Mp(o.prototype),s=new E(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=Lp&&Lp(Lp(T([])));v&&v!==e&&n.call(v,o)&&(g=v);var y=d.prototype=h.prototype=Mp(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"==Lc(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 A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(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=Mp(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=Tm);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 Rm(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,E.prototype={constructor:E,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,A),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+eb(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),A(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;A(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 Ob(t){return(Ob="function"==typeof Oh&&"symbol"==typeof nb?function(t){return typeof t}:function(t){return t&&"function"==typeof Oh&&t.constructor===Oh&&t!==Oh.prototype?"symbol":typeof t})(t)}function Ib(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(oR){return void n(oR)}s.done?e(u):Tm.resolve(u).then(r,i)}function Pb(t){return function(){var e=this,n=arguments;return new Tm((function(r,i){var o=t.apply(e,n);function a(t){Ib(o,r,i,a,s,"next",t)}function s(t){Ib(o,r,i,a,s,"throw",t)}a(void 0)}))}}function Rb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ub(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,Wb(r.key),r)}}function Bb(t,e,n){return e&&Ub(t.prototype,e),n&&Ub(t,n),xp(t,"prototype",{writable:!1}),t}function Db(t,e,n){return(e=Wb(e))in t?xp(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function jb(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Mp(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),xp(t,"prototype",{writable:!1}),e&&Fb(t,e)}function Nb(t){var e;return(Nb=Op?rb(e=Lp).call(e):function(t){return t.__proto__||Lp(t)})(t)}function Fb(t,e){var n;return(Fb=Op?rb(n=Op).call(n):function(t,e){return t.__proto__=e,t})(t,e)}function Hb(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function zb(t){var e=function(){if("undefined"==typeof Reflect||!ib)return!1;if(ib.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ib(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Nb(t);if(e){var i=Nb(this).constructor;n=ib(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===Lc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Hb(t)}(this,n)}}function Vb(){var t;"undefined"!=typeof Reflect&&ob?Vb=rb(t=ob).call(t):Vb=function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Nb(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 Vb.apply(this,arguments)}function qb(t,e){return function(t){if(ub(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 Gb(t,e);var r=eb(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Cb(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Gb(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 Gb(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 Wb(t){var e=function(t,e){if("object"!==Lc(t)||null===t)return t;var n=t[Sb];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Lc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Lc(e)?e:String(e)}var Yb=Ln,Kb=fi.indexOf,Xb=Zh,$b=E([].indexOf),Jb=!!$b&&1/$b([1],1,-0)<0;Yb({target:"Array",proto:!0,forced:Jb||!Xb("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return Jb?$b(this,t,e)||0:Kb(this,t,e)}});var Qb=af("Array").indexOf,Zb=ut,tw=Qb,ew=Array.prototype,nw=n((function(t){var e=t.indexOf;return t===ew||Zb(ew,t)&&e===ew.indexOf?tw:e})),rw=Ln,iw=ua.find,ow="find",aw=!0;ow in[]&&Array(1)[ow]((function(){aw=!1})),rw({target:"Array",proto:!0,forced:aw},{find:function(t){return iw(this,t,arguments.length>1?arguments[1]:void 0)}});var sw=af("Array").find,uw=ut,lw=sw,cw=Array.prototype,fw=n((function(t){var e=t.find;return t===cw||uw(cw,t)&&e===cw.find?lw:e})),hw=L,pw=Nn,dw=TypeError,gw=Object.getOwnPropertyDescriptor,vw=hw&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(oR){return oR instanceof TypeError}}(),yw=xt,mw=TypeError,bw=function(t,e){if(!delete t[e])throw mw("Cannot delete property "+yw(e)+" of "+yw(t))},ww=Ln,_w=$t,kw=ai,Aw=Vn,Ew=Kn,Tw=vw?function(t,e){if(pw(t)&&!gw(t,"length").writable)throw dw("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e},Cw=$n,Sw=Rr,xw=tr,Mw=bw,Lw=jr("splice"),Ow=Math.max,Iw=Math.min;ww({target:"Array",proto:!0,forced:!Lw},{splice:function(t,e){var n,r,i,o,a,s,u=_w(this),l=Ew(u),c=kw(t,l),f=arguments.length;for(0===f?n=r=0:1===f?(n=0,r=l-c):(n=f-2,r=Iw(Ow(Aw(e),0),l-c)),Cw(l+n-r),i=Sw(u,r),o=0;o<r;o++)(a=c+o)in u&&xw(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]:Mw(u,s);for(o=l;o>l-r+n;o--)Mw(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]:Mw(u,s);for(o=0;o<n;o++)u[o+c]=arguments[o+2];return Tw(u,l-r+n),i}});var Pw=af("Array").splice,Rw=ut,Uw=Pw,Bw=Array.prototype,Dw=n((function(t){var e=t.splice;return t===Bw||Rw(Bw,t)&&e===Bw.splice?Uw:e})),jw="\t\n\v\f\r                 \u2028\u2029\ufeff",Nw=X,Fw=ei,Hw=jw,zw=y("".replace),Vw=RegExp("^["+Hw+"]+"),qw=RegExp("(^|[^"+Hw+"])["+Hw+"]+$"),Gw=function(t){return function(e){var n=Fw(Nw(e));return 1&t&&(n=zw(n,Vw,"")),2&t&&(n=zw(n,qw,"$1")),n}},Ww={start:Gw(1),end:Gw(2),trim:Gw(3)},Yw=o,Kw=a,Xw=y,$w=ei,Jw=Ww.trim,Qw=jw,Zw=Yw.parseInt,t_=Yw.Symbol,e_=t_&&t_.iterator,n_=/^[+-]?0x/i,r_=Xw(n_.exec),i_=8!==Zw(Qw+"08")||22!==Zw(Qw+"0x16")||e_&&!Kw((function(){Zw(Object(e_))}))?function(t,e){var n=Jw($w(t));return Zw(n,e>>>0||(r_(n_,n)?16:10))}:Zw;Ln({global:!0,forced:parseInt!=i_},{parseInt:i_});var o_=n(nt.parseInt),a_=ua.map;Ln({target:"Array",proto:!0,forced:!jr("map")},{map:function(t){return a_(this,t,arguments.length>1?arguments[1]:void 0)}});var s_=af("Array").map,u_=ut,l_=s_,c_=Array.prototype,f_=n((function(t){var e=t.map;return t===c_||u_(c_,t)&&e===c_.map?l_:e})),h_=L,p_=y,d_=P,g_=a,v_=ki,y_=lo,m_=R,b_=$t,w_=G,__=Object.assign,k_=Object.defineProperty,A_=p_([].concat),E_=!__||g_((function(){if(h_&&1!==__({b:1},__(k_({},"a",{enumerable:!0,get:function(){k_(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!=__({},t)[n]||v_(__({},e)).join("")!=r}))?function(t,e){for(var n=b_(t),r=arguments.length,i=1,o=y_.f,a=m_.f;r>i;)for(var s,u=w_(arguments[i++]),l=o?A_(v_(u),o(u)):v_(u),c=l.length,f=0;c>f;)s=l[f++],h_&&!d_(a,u,s)||(n[s]=u[s]);return n}:__,T_=E_;Ln({target:"Object",stat:!0,arity:2,forced:Object.assign!==T_},{assign:T_});var C_=n(nt.Object.assign);function S_(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 x_(t){for(var e=1;e<arguments.length;e++){var n,r,i=null!=arguments[e]?arguments[e]:{};e%2?lp(n=S_(Object(i),!0)).call(n,(function(e){P_(t,e,i[e])})):wp?Sp(t,wp(i)):lp(r=S_(Object(i))).call(r,(function(e){xp(t,e,Jh(i,e))}))}return t}function M_(t){return(M_="function"==typeof Oh&&"symbol"==typeof nb?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 O_(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,z_(r.key),r)}}function I_(t,e,n){return e&&O_(t.prototype,e),n&&O_(t,n),xp(t,"prototype",{writable:!1}),t}function P_(t,e,n){return(e=z_(e))in t?xp(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function R_(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Mp(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),xp(t,"prototype",{writable:!1}),e&&B_(t,e)}function U_(t){var e;return(U_=Op?rb(e=Lp).call(e):function(t){return t.__proto__||Lp(t)})(t)}function B_(t,e){var n;return(B_=Op?rb(n=Op).call(n):function(t,e){return t.__proto__=e,t})(t,e)}function D_(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function j_(t){var e=function(){if("undefined"==typeof Reflect||!ib)return!1;if(ib.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ib(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=U_(t);if(e){var i=U_(this).constructor;n=ib(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===Lc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return D_(t)}(this,n)}}function N_(){var t;"undefined"!=typeof Reflect&&ob?N_=rb(t=ob).call(t):N_=function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=U_(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 N_.apply(this,arguments)}function F_(t){return function(t){if(ub(t))return H_(t)}(t)||function(t){if(void 0!==Oh&&null!=Fh(t)||null!=t["@@iterator"])return Cb(t)}(t)||function(t,e){var n;if(!t)return;if("string"==typeof t)return H_(t,e);var r=eb(n=Object.prototype.toString.call(t)).call(n,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Cb(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return H_(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 H_(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 z_(t){var e=function(t,e){if("object"!==Lc(t)||null===t)return t;var n=t[Sb];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Lc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Lc(e)?e:String(e)}var V_={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}Mp&&(r.prototype=Mp(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?eb(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}(V_);var q_=V_.exports,G_=ua.some;Ln({target:"Array",proto:!0,forced:!Zh("some")},{some:function(t){return G_(this,t,arguments.length>1?arguments[1]:void 0)}});var W_=af("Array").some,Y_=ut,K_=W_,X_=Array.prototype,$_=n((function(t){var e=t.some;return t===X_||Y_(X_,t)&&e===X_.some?K_:e})),J_=Vn,Q_=ei,Z_=X,tk=RangeError,ek=y,nk=Wn,rk=ei,ik=X,ok=ek((function(t){var e=Q_(Z_(this)),n="",r=J_(t);if(r<0||r==1/0)throw tk("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(e+=e))1&r&&(n+=e);return n})),ak=ek("".slice),sk=Math.ceil,uk=function(t){return function(e,n,r){var i,o,a=rk(ik(e)),s=nk(n),u=a.length,l=void 0===r?" ":rk(r);return s<=u||""==l?a:((o=ok(l,sk((i=s-u)/l.length))).length>i&&(o=ak(o,0,i)),t?a+o:o+a)}},lk={start:uk(!1),end:uk(!0)},ck=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(lt),fk=lk.start;Ln({target:"String",proto:!0,forced:ck},{padStart:function(t){return fk(this,t,arguments.length>1?arguments[1]:void 0)}});var hk,pk=af("String").padStart,dk=ut,gk=pk,vk=String.prototype,yk=n((function(t){var e=t.padStart;return"string"==typeof t||t===vk||dk(vk,t)&&e===vk.padStart?gk:e})),mk="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,bk=o,wk=h,_k=x,kk=mk,Ak=lt,Ek=Is,Tk=sg,Ck=bk.Function,Sk=/MSIE .\./.test(Ak)||kk&&((hk=bk.Bun.version.split(".")).length<3||0==hk[0]&&(hk[1]<3||3==hk[1]&&0==hk[2])),xk=function(t,e){var n=e?2:1;return Sk?function(r,i){var o=Tk(arguments.length,1)>n,a=_k(r)?r:Ck(r),s=o?Ek(arguments,n):[],u=o?function(){wk(a,this,s)}:a;return e?t(u,i):t(u)}:t},Mk=Ln,Lk=o,Ok=xk(Lk.setInterval,!0);Mk({global:!0,bind:!0,forced:Lk.setInterval!==Ok},{setInterval:Ok});var Ik=Ln,Pk=o,Rk=xk(Pk.setTimeout,!0);Ik({global:!0,bind:!0,forced:Pk.setTimeout!==Rk},{setTimeout:Rk});var Uk=n(nt.setInterval),Bk=n(nt.setTimeout),Dk=ua.every;Ln({target:"Array",proto:!0,forced:!Zh("every")},{every:function(t){return Dk(this,t,arguments.length>1?arguments[1]:void 0)}});var jk=af("Array").every,Nk=ut,Fk=jk,Hk=Array.prototype,zk=n((function(t){var e=t.every;return t===Hk||Nk(Hk,t)&&e===Hk.every?Fk:e})),Vk=o,qk=a,Gk=ei,Wk=Ww.trim,Yk=jw,Kk=y("".charAt),Xk=Vk.parseFloat,$k=Vk.Symbol,Jk=$k&&$k.iterator,Qk=1/Xk(Yk+"-0")!=-1/0||Jk&&!qk((function(){Xk(Object(Jk))}))?function(t){var e=Wk(Gk(t)),n=Xk(e);return 0===n&&"-"==Kk(e,0)?-0:n}:Xk;Ln({global:!0,forced:parseFloat!=Qk},{parseFloat:Qk});var Zk=n(nt.parseFloat),tA=Eu.PROPER,eA=a,nA=jw,rA=Ww.trim;Ln({target:"String",proto:!0,forced:function(t){return eA((function(){return!!nA[t]()||"​…᠎"!=="​…᠎"[t]()||tA&&nA[t].name!==t}))}("trim")},{trim:function(){return rA(this)}});var iA=af("String").trim,oA=ut,aA=iA,sA=String.prototype,uA=n((function(t){var e=t.trim;return"string"==typeof t||t===sA||oA(sA,t)&&e===sA.trim?aA:e})),lA=ro,cA=Math.floor,fA=function(t,e){var n=t.length,r=cA(n/2);return n<8?hA(t,e):pA(t,fA(lA(t,0,r),e),fA(lA(t,r),e),e)},hA=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},pA=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},dA=fA,gA=lt.match(/firefox\/(\d+)/i),vA=!!gA&&+gA[1],yA=/MSIE|Trident/.test(lt),mA=lt.match(/AppleWebKit\/(\d+)\./),bA=!!mA&&+mA[1],wA=Ln,_A=y,kA=It,AA=$t,EA=Kn,TA=bw,CA=ei,SA=a,xA=dA,MA=Zh,LA=vA,OA=yA,IA=vt,PA=bA,RA=[],UA=_A(RA.sort),BA=_A(RA.push),DA=SA((function(){RA.sort(void 0)})),jA=SA((function(){RA.sort(null)})),NA=MA("sort"),FA=!SA((function(){if(IA)return IA<70;if(!(LA&&LA>3)){if(OA)return!0;if(PA)return PA<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++)RA.push({k:e+r,v:n})}for(RA.sort((function(t,e){return e.v-t.v})),r=0;r<RA.length;r++)e=RA[r].k.charAt(0),i.charAt(i.length-1)!==e&&(i+=e);return"DGBEFHACIJK"!==i}}));wA({target:"Array",proto:!0,forced:DA||!jA||!NA||!FA},{sort:function(t){void 0!==t&&kA(t);var e=AA(this);if(FA)return void 0===t?UA(e):UA(e,t);var n,r,i=[],o=EA(e);for(r=0;r<o;r++)r in e&&BA(i,e[r]);for(xA(i,function(t){return function(e,n){return void 0===n?-1:void 0===e?1:void 0!==t?+t(e,n)||0:CA(e)>CA(n)?1:-1}}(t)),n=EA(i),r=0;r<n;)e[r]=i[r++];for(;r<o;)TA(e,r++);return e}});var HA,zA=af("Array").sort,VA=ut,qA=zA,GA=Array.prototype,WA=n((function(t){var e=t.sort;return t===GA||VA(GA,t)&&e===GA.sort?qA:e})),YA="undefined"!=typeof window&&window.location&&nw(HA=window.location.href).call(HA,"xgplayerdebugger=1")>-1,KA="color: #525252; background-color: #90ee90;",XA="color: #525252; background-color: red;",$A="color: #525252; background-color: yellow; ",JA="%c[xgplayer]",QA={config:{debug:YA?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=[JA,KA,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=[JA,$A,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=[JA,XA,t]).call(e,o))}}},ZA=function(){function t(e){L_(this,t),this.bufferedList=e}return I_(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}(),tE={};tE.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},tE.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&&tE.addClass(i,n),e)lp(o=Vh(e)).call(o,(function(t){i.setAttribute(t,e[t])}));return i}return null}catch(a){return QA.logError("util.createDomFromHtml",a),null}},tE.hasClass=function(t,e){if(!t||!e)return!1;try{return $_(Array.prototype).call(t.classList,(function(t){return t===e}))}catch(r){var n=t.className&&"object"===M_(t.className)?t.getAttribute("class"):t.className;return n&&!!n.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))}},tE.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){tE.hasClass(t,e)||(t.className&&"object"===M_(t.className)?t.setAttribute("class",t.getAttribute("class")+" "+e):t.className+=" "+e)}},tE.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(tE.hasClass(t,e))lp(r=e.split(/\s+/g)).call(r,(function(e){var n=new RegExp("(\\s|^)"+e+"(\\s|$)");t.className&&"object"===M_(t.className)?t.setAttribute("class",t.getAttribute("class").replace(n," ")):t.className=t.className.replace(n," ")}))}},tE.toggleClass=function(t,e){var n;t&&lp(n=e.split(/\s+/g)).call(n,(function(e){tE.hasClass(t,e)?tE.removeClass(t,e):tE.addClass(t,e)}))},tE.classNames=function(){for(var t=arguments,e=[],n=function(n){if("String"===tE.typeOf(t[n]))e.push(t[n]);else if("Object"===tE.typeOf(t[n])){var r;f_(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(" ")},tE.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){QA.logError("util.findDom",r),0===nw(n).call(n,"#")&&(t=e.getElementById(eb(n).call(n,1)))}return t},tE.getCss=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,!1)[e]},tE.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},tE.format=function(t){if(window.isNaN(t))return"";t=Math.round(t);var e=yk(tE).call(tE,Math.floor(t/3600),2,0),n=yk(tE).call(tE,Math.floor((t-3600*e)/60),2,0),r=yk(tE).call(tE,Math.floor(t-3600*e-60*n),2,0);return("00"===e?[n,r]:[e,n,r]).join(":")},tE.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},tE.typeOf=function(t){return Object.prototype.toString.call(t).match(/([^\s.*]+)(?=]$)/g)[0]},tE.deepCopy=function(t,e){var n;if("Object"===tE.typeOf(e)&&"Object"===tE.typeOf(t))return lp(n=Vh(e)).call(n,(function(n){if("Object"!==tE.typeOf(e[n])||e[n]instanceof Node)if("Array"===tE.typeOf(e[n])){var r;t[n]="Array"===tE.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]:tE.deepCopy(t[n],e[n])})),t},tE.deepMerge=function(t,e){var n;return f_(n=Vh(e)).call(n,(function(n){var r;"Array"===tE.typeOf(e[n])&&"Array"===tE.typeOf(t[n])?"Array"===tE.typeOf(t[n])&&(r=t[n]).push.apply(r,F_(e[n])):tE.typeOf(t[n])!==tE.typeOf(e[n])||null===t[n]||"Object"!==tE.typeOf(t[n])||e[n]instanceof window.Node?null!==e[n]&&(t[n]=e[n]):tE.deepMerge(t[n],e[n])})),t},tE.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},tE.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""},tE.setInterval=function(t,e,n,r){t._interval[e]||(t._interval[e]=Uk(rb(n).call(n,t),r))},tE.clearInterval=function(t,e){clearInterval(t._interval[e]),t._interval[e]=null},tE.setTimeout=function(t,e,n){t._timers||(t._timers=[]);var r=Bk((function(){e(),tE.clearTimeout(t,r)}),n);return t._timers.push(r),r},tE.clearTimeout=function(t,e){var n=t._timers;if("Array"===tE.typeOf(n)){for(var r=0;r<n.length;r++)if(n[r]===e){Dw(n).call(n,r,1),clearTimeout(e);break}}else clearTimeout(e)},tE.clearAllTimers=function(t){var e=t._timers;"Array"===tE.typeOf(e)&&(f_(e).call(e,(function(t){clearTimeout(t)})),t._timerIds=[])},tE.createImgBtn=function(t,e,n,r){var i,o,a,s,u,l,c,f,h,p,d,g,v=tE.createDom("xg-".concat(t),"",{},"xgplayer-".concat(t,"-img"));(v.style.backgroundImage='url("'.concat(e,'")'),n&&r)&&(zk(i=["px","rem","em","pt","dp","vw","vh","vm","%"]).call(i,(function(t){var e,i;return!(nw(n).call(n,t)>-1&&nw(r).call(r,t)>-1)||(c=Zk(uA(e=eb(n).call(n,0,nw(n).call(n,t))).call(e)),f=Zk(uA(i=eb(r).call(r,0,nw(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},tE.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(o_(t,16))})),lh(n="rgba(".concat(r.join(","),", ")).call(n,e,")")):"rgba(255, 255, 255, 0.1)"},tE.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},tE.checkIsFunction=function(t){return t&&"function"==typeof t},tE.checkIsObject=function(t){return null!==t&&"object"===M_(t)},tE.hide=function(t){t.style.display="none"},tE.show=function(t,e){t.style.display=e||"block"},tE.isUndefined=function(t){if(null==t)return!0},tE.isNotNull=function(t){return!(null==t)},tE.setStyleFromCsstext=function(t,e){if(e)if("String"===tE.typeOf(e)){var n=e.replace(/\s+/g,"").split(";");f_(n).call(n,(function(e){if(e){var n=e.split(":");n.length>1&&(t.style[n[0]]=n[1])}}))}else{var r;f_(r=Vh(e)).call(r,(function(n){t.style[n]=e[n]}))}},tE.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 f_(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(nw(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",""),f_(e=Vh(a)).call(e,(function(e){t.style[e]=a[e]})),o},tE.getStyleFromCsstext=function(t){var e=t.style.cssText;if(!e)return{};var n=e.replace(/\s+/g,"").split(";"),r={};return f_(n).call(n,(function(t){if(t){var e=t.split(":");e.length>1&&(r[e[0]]=e[1])}})),r},tE.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}},tE.stopPropagation=function(t){t&&t.stopPropagation()},tE.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},tE.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},tE.checkTouchSupport=function(){return"ontouchstart"in window},tE.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)});WA(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 ZA(i)},tE.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}},tE.requestAnimationFrame=function(t){var e=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(e)return e(t)},tE.getHostFromUrl=function(t){if("String"!==tE.typeOf(t))return"";var e=t.split("/"),n="";return e.length>3&&e[2]&&(n=e[2]),n},tE.cancelAnimationFrame=function(t){var e=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;e&&e(t)},tE.isMSE=function(t){return t.media&&(t=t.media),!!(t&&t instanceof HTMLMediaElement)&&(/^blob/.test(t.currentSrc)||/^blob/.test(t.src))},tE.isBlob=function(t){return"string"==typeof t&&/^blob/.test(t)},tE.generateSessionId=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=(new Date).getTime();try{t=o_(t)}catch(n){t=0}return e+=t,window.performance&&"function"==typeof window.performance.now&&(e+=o_(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)}))},tE.createEvent=function(t){var e;return"function"==typeof window.Event?e=new Event(t):(e=document.createEvent("Event")).initEvent(t,!0,!0),e},tE.adjustTimeByDuration=function(t,e,n){return e&&t&&(t>e||n&&t<e)?e:t},tE.createPositionBar=function(t,e){var n=tE.createDom("xg-bar","",{"data-index":-1},t);return e.appendChild(n),n},tE.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},tE.convertDeg=function(t){return Math.abs(t)<=1?360*t:t%360},tE.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},tE.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:tE.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},tE.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 eE=/(Android)\s([\d.]+)/,nE=/(Version)\/([\d.]+)/,rE=["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"],iE={get device(){return iE.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)?nE:eE)?e.exec(t):[];if(n&&n.length>=3){var r=n[2].split(".");return r.length>0?o_(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&&f_(rE).call(rE,(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(oR){return this._logger.error(t,oR),!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 Tm.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 Tm.resolve({supported:i&&o,smooth:!1,powerEfficient:!1})}catch(a){return Tm.resolve(e)}}},oE="play",aE="ended",sE="pause",uE="seeked",lE="timeupdate",cE="durationchange",fE="volumechange",hE="emptied",pE="autoplay_started",dE="video_resize";function gE(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 vE(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),rb(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,eb(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&&ub(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&&gE.apply(void 0,lh(n=[o,e,r.next]).call(n,F_(i)))})).catch((function(t){throw t}));else gE.apply(void 0,lh(c=[this,e,r.next]).call(c,eb(Array.prototype).call(arguments)));else if(void 0===f){var h;gE.apply(void 0,lh(h=[this,e,r.next]).call(h,eb(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 gE.apply(void 0,lh(n=[this,e,r.next]).call(n,eb(Array.prototype).call(arguments)))}).call(n,this)}function yE(t,e){var n=this.__hooks;if(!n||!ub(n[t]))return-1;for(var r=n[t],i=0;i<r.length;i++)if(r[i]===e)return i;return-1}function mE(t,e){var n=this.__hooks;if(n)return n.hasOwnProperty(t)?(ub(n[t])||(n[t]=[]),-1===yE.call(this,t,e)&&n[t].push(e),!0):(console.warn("has no supported hook which name [".concat(t,"]")),!1)}function bE(t,e){var n=this.__hooks;if(n){if(ub(n[t])){var r=n[t],i=yE.call(this,t,e);-1!==i&&Dw(r).call(r,i,1)}delete n[t]}}function wE(t,e){var n;QA.logError(lh(n="[".concat(t,"] event or callback cant be undefined or null when call ")).call(n,e))}var _E=function(){function t(e){L_(this,t),tE.checkIsFunction(this.beforeCreate)&&this.beforeCreate(e),function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];t.__hooks={},e&&f_(e).call(e,(function(e){t.__hooks[e]=null})),xp(t,"hooks",{get:function(){var e;return t.__hooks&&f_(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 I_(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=tE.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)):ub(t)&&lp(t).call(t,(function(t){n.__events[t]=e,n.player.on(t,e)})):wE(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)):ub(t)&&lp(t).call(t,(function(r){n.__onceEvents[r]=e,n.player.once(t,e)})):wE(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)):ub(t)&&lp(t).call(t,(function(r){delete n.__events[t],n.player.off(r,e)})):wE(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=x_(x_({},n),{},{pluginName:this.pluginName});this.player.emitUserAction(t,e,r)}}},{key:"hook",value:function(t,e){var n;return vE.call.apply(vE,lh(n=[this]).call(n,eb(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 mE.call.apply(mE,lh(n=[this]).call(n,eb(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 bE.call.apply(bE,lh(n=[this]).call(n,eb(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(),tE.clearAllTimers(this),tE.checkIsFunction(this.destroy)&&this.destroy(),f_(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:"defineMethod",value:function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&"function"==typeof e[n]&&xp(t,n,{configurable:!0,value:e[n]})}},{key:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),t}();if("undefined"!=typeof Element&&!Element.prototype.matches){var kE=Element.prototype;kE.matches=kE.matchesSelector||kE.mozMatchesSelector||kE.msMatchesSelector||kE.oMatchesSelector||kE.webkitMatchesSelector}var AE=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}};function EE(t,e,n,r,i){var o=TE.apply(this,arguments);return t.addEventListener(n,o,i),{destroy:function(){t.removeEventListener(n,o,i)}}}function TE(t,e,n,r){return function(n){n.delegateTarget=AE(n.target,e),n.delegateTarget&&r.call(t,n)}}var CE=function(t,e,n,r,i){return"function"==typeof t.addEventListener?EE.apply(null,arguments):"function"==typeof n?rb(EE).call(EE,null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),f_(Array.prototype).call(t,(function(t){return EE(t,e,n,r,i)})))},SE=n(CE),xE={CONTROLS:"controls",ROOT:"root"},ME={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"},LE="xg-icon-disable";function OE(t){return!!t&&(nw(t)&&/^(?:http|data:|\/)/.test(t))}function IE(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 tE.addClass(t,i),f_(r=Vh(o)).call(r,(function(e){t.setAttribute(e,o[e])})),t;if(OE(t)||OE(t.url))return o.src=OE(t)?t:t.url||"",s=tE.createDom(t.tag||"img","",o,"xg-img ".concat(i));if("function"==typeof t)try{var u,l;return(s=t())instanceof window.Element?(tE.addClass(s,i),f_(u=Vh(o)).call(u,(function(t){s.setAttribute(t,o[t])})),s):(QA.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 QA.logError("Plugin named [".concat(a,"]:createIcon"),c),null}return"string"==typeof t?tE.createDomFromHtml(t,o,i):(QA.logWarn(lh(n="warn>>icons.".concat(e," in config of plugin named [")).call(n,a,"] is invalid")),null)}function PE(t,e){var n,r=e.config.icons||e.playerConfig.icons;f_(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"===M_(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"===M_(t)&&t.attr&&"object"===M_(t.attr)&&f_(n=Vh(t.attr)).call(n,(function(n){e[n]=t.attr[n]})),e}(r[n],a),s=IE(r[n],n,o,a,e.pluginName)),!s&&i&&(s=IE(i.icon?i.icon:i,a,o,{},e.pluginName)),e.icons[n]=s}))}var RE=function(t){R_(n,t);var e=j_(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 I_(n,[{key:"__init",value:function(t){if(N_(U_(n.prototype),"__init",this).call(this,t),t.root){var e=t.root,r=null;this.icons={},this.root=null,this.parent=null,PE(this.registerIcons()||{},this),this.langText={};var i,o,a,s=this.registerLanguageTexts()||{};o=this,f_(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 QA.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=tE.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"===M_(n))if(Vh(n).length>0)f_(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"===M_(a)&&"function"==typeof a.plugin&&(r=a.options?tE.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,tE.addClass(fw(this).call(this,".xgplayer-icon"),LE)}},{key:"enable",value:function(){this.config.disable=!1,tE.removeClass(fw(this).call(this,".xgplayer-icon"),LE)}},{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=N_(U_(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)ub(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)ub(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(),Dw(a=this.__delegates).call(a,o,1);break}}},{key:"setStyle",value:function(t,e){var n,r=this;if(this.root)return"String"===tE.typeOf(t)?this.root.style[t]=e:void("Object"===tE.typeOf(t)&&f_(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"===tE.typeOf(t)?this.root.setAttribute(t,e):void("Object"===tE.typeOf(t)&&f_(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?fw(this).call(this,t).appendChild(e):t.appendChild(e)}catch(n){return QA.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;(f_(t=this.__delegates).call(t,(function(t){t.destroy()})),this.__delegates=[],this._children instanceof Array)&&(f_(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)),N_(U_(n.prototype),"__destroy",this).call(this),this.icons={},f_(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(ub(n))lp(n).call(n,(function(n){var a,s=SE(t,e,n,r,i);s.key=lh(a="".concat(e,"_")).call(a,n),o.push(s)}));else{var a,s=SE(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 xE}},{key:"POSITIONS",get:function(){return ME}}]),n}(_E),UE="xgplayer-is-enter",BE="xgplayer-pause",DE="xgplayer-playing",jE="xgplayer-ended",NE="xgplayer-isloading",FE="xgplayer-is-error",HE="xgplayer-replay",zE="xgplayer-nostart",VE="not-allow-autoplay",qE=6;function GE(){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 WE(){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 YE(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 KE=Ln,XE=ua.findIndex,$E="findIndex",JE=!0;$E in[]&&Array(1)[$E]((function(){JE=!1})),KE({target:"Array",proto:!0,forced:JE},{findIndex:function(t){return XE(this,t,arguments.length>1?arguments[1]:void 0)}});var QE=af("Array").findIndex,ZE=ut,tT=QE,eT=Array.prototype,nT=n((function(t){var e=t.findIndex;return t===eT||ZE(eT,t)&&e===eT.findIndex?tT:e})),rT=[{tag:"xg-cache",className:"xgplayer-progress-cache",styleKey:"cachedColor"},{tag:"xg-played",className:"xgplayer-progress-played",styleKey:"playedColor"}],iT=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 I_(t,[{key:"updateDuration",value:function(t){var e=this;this.duration=t;var n=0,r=this.fragments;this.fragments=f_(r).call(r,(function(t){return t.start=o_(n,10),t.end=o_(n+t.percent*e.duration,10),t.duration=o_(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&&f_(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=nT(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||o_(1e3*e,10)!==this.duration){if(!e&&0!==e)return;this.updateDuration(o_(1e3*e,10))}var n=this.playedIndex,r=this.cachedIndex;if("Undefined"!==tE.typeOf(t.played)){var i=nT(this).call(this,1e3*t.played,n);if(i<0)return;this.updateProgress("played",{newIndex:i,curIndex:n,millisecond:o_(1e3*t.played,10)}),this.playedIndex=i}if("Undefined"!==tE.typeOf(t.cached)){var o=nT(this).call(this,1e3*t.cached,r);if(o<0)return;this.updateProgress("cached",{newIndex:o,curIndex:r,millisecond:o_(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(tE.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++)tE.removeClass(t[e],this.fragConfig.fragFocusClass)}},{key:"setHightLight",value:function(t){var e=this.root.children;if(t<e.length)return tE.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=tE.createDom("xg-inners","",{},"progress-list")),this.fragments){var n,r=this.fragConfig,i=r.fragClass,o=r.fragFocusClass;this.progressList=f_(n=this.fragments).call(n,(function(n){var r,a,s=tE.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(rT).call(rT,(function(e){s.appendChild(tE.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}(),oT={POINT:"inner-focus-point",HIGHLIGHT:"inner-focus-highlight"},aT=function(t){R_(n,t);var e=j_(n);function n(t){var r;return L_(this,n),P_(D_(r=e.call(this,t)),"onMoveOnly",(function(t,e){var n=D_(r),i=n.pos,o=n.config,a=n.player,s=e;if(t){tE.event(t);var u=tE.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)})),P_(D_(r),"onBodyClick",(function(t){r.pos.isLocked&&(r.pos.isLocked=!1,t.preventDefault(),t.stopPropagation())})),P_(D_(r),"_mouseDownHandler",(function(t,e){r._state.time=e.currentTime,r.updateWidth(e.currentTime,e.seekTime,e.percent,0),r._updateInnerFocus(e)})),P_(D_(r),"_mouseUpHandler",(function(t,e){D_(r).pos.moving&&r.updateWidth(e.currentTime,e.seekTime,e.percent,2)})),P_(D_(r),"_mouseMoveHandler",(function(t,e){var n=D_(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)})),P_(D_(r),"onMouseDown",(function(t){var e=D_(r),n=e._state,i=e.player,o=e.pos,a=e.config,s=e.playerConfig,u=tE.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(),tE.checkIsFunction(s.disableSwipeHandler)&&s.disableSwipeHandler(),tE.checkIsFunction(a.onMoveStart)&&a.onMoveStart(),tE.event(t),o.x=l,o.isDown=!0,o.moving=!1,n.prePlayTime=i.currentTime,i.focus({autoHide:!1}),r.isProgressMoving=!0,tE.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()}})),P_(D_(r),"onMouseUp",(function(t){var e=D_(r),n=e.player,i=e.config,o=e.pos,a=e.playerConfig,s=e._state;t.stopPropagation(),t.preventDefault(),tE.checkIsFunction(a.enableSwipeHandler)&&a.enableSwipeHandler(),tE.checkIsFunction(i.onMoveEnd)&&i.onMoveEnd(),tE.event(t),tE.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&&rb(r).call(r,"mousemove",r.onMoveOnly):r.onMouseLeave(t)),tE.setTimeout(D_(r),(function(){r.resetSeekState()}),1),n.focus()})),P_(D_(r),"onMouseMove",(function(t){var e=D_(r),n=e._state,i=e.pos,o=e.player,a=e.config;tE.checkTouchSupport()&&t.preventDefault(),tE.event(t);var s=tE.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)}})),P_(D_(r),"onMouseOut",(function(t){r.triggerCallbacks("mouseout",null,t)})),P_(D_(r),"onMouseOver",(function(t){r.triggerCallbacks("mouseover",null,t)})),P_(D_(r),"onMouseEnter",(function(t){var e=D_(r),n=e.player,i=e.pos;if(!(i.isDown||i.isEnter||n.isMini||!n.config.allowSeekAfterEnded&&n.ended)){i.isEnter=!0,rb(r).call(r,"mousemove",r.onMoveOnly),rb(r).call(r,"mouseleave",r.onMouseLeave),tE.event(t);var o=tE.getEventPos(t,n.zoom),a=90===n.rotateDeg?o.clientY:o.clientX,s=r.computeTime(t,a);r.triggerCallbacks("mouseenter",s,t),r.focus()}})),P_(D_(r),"onMouseLeave",(function(t){r.triggerCallbacks("mouseleave",null,t),r.unlock(),r._updateInnerFocus(null)})),P_(D_(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 I_(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=x_(x_({fragments:e},n),{},{actionCallback:function(e){t.emitUserAction("fragment_focus","fragment_focus",e)}});this.innerList?this.innerList.reset(i):(this.innerList=new iT(i),this.outer.insertBefore(this.innerList.render(),this.outer.children[0]),f_(r=["findHightLight","unHightLight","setHightLight","findFragment"]).call(r,(function(e){var n;t[e]=rb(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=fw(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"===iE.device&&(this.config.isDraggingSeek=!1,this.isMobile=!0),this.progressBtn=fw(this).call(this,".xgplayer-progress-btn"),this.listenEvents(),this.bindDomEvents(),this.initCustomStyle()}}},{key:"listenEvents",value:function(){var t=this;this.on(cE,(function(){t.onMouseLeave()})),this.on(lE,(function(){t.onTimeupdate()})),this.on(uE,(function(){t.onTimeupdate(),t.onCacheUpdate()})),this.on("progress",(function(){t.onCacheUpdate()})),this.on(aE,(function(){t.onCacheUpdate(!0),t.onTimeupdate(!0),t._state.now=0})),this.on(hE,(function(){t.onReset()})),this.on(dE,(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"===M_(t)){var n;f_(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&&f_(r=this.__dragCallBacks).call(r,(function(r){if(r&&r.handler&&r.type===t)try{r.handler(e,n)}catch(oR){console.error("[XGPLAYER][triggerCallbacks] ".concat(r," error"),oR)}}))}},{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;f_(n).call(n,(function(n,i){n&&n.type===t&&n.handler===e&&(r=i)})),r>-1&&Dw(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)&&(rb(this).call(this,"mousedown",this.onMouseDown),"mobile"!==t.isMobileSimulateMode&&rb(this).call(this,"mouseenter",this.onMouseEnter),rb(this).call(this,"mouseover",this.onMouseOver),rb(this).call(this,"mouseout",this.onMouseOut),this.player.root.addEventListener("click",this.onBodyClick,!0))}},{key:"focus",value:function(){this.player.controls.pauseAutoHide(),tE.addClass(this.root,"active")}},{key:"blur",value:function(){this._disableBlur||(this.player.controls.recoverAutoHide(),tE.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=o_((h=h<0?0:h>1?1:h)*this.offsetDuration*1e3,10)/1e3;return{percent:h,currentTime:p,seekTime:tE.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=o_(1e3*n.now,10)-o_(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=tE.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=tE.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:ME.CONTROLS_CENTER,index:0,disable:!1,isDraggingSeek:!0,closeMoveSeek:!1,isPauseMoving:!1,isCloseClickSeek:!1,fragments:[{percent:1}],fragFocusClass:oT.POINT,fragClass:"",fragAutoFocus:!1,miniMoveStep:5,miniStartStep:2,onMoveStart:function(){},onMoveEnd:function(){},endedDiff:.2}}},{key:"FRAGMENT_FOCUS_CLASS",get:function(){return oT}}]),n}(RE),sT=function(t){R_(n,t);var e=j_(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 P_(D_(r=e.call.apply(e,lh(t=[this]).call(t,o))),"_onMouseenter",(function(t){r.emit("icon_mouseenter",{pluginName:r.pluginName})})),P_(D_(r),"_onMouseLeave",(function(t){r.emit("icon_mouseleave",{pluginName:r.pluginName})})),r}return I_(n,[{key:"afterCreate",value:function(){rb(this).call(this,"mouseenter",this._onMouseenter),rb(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}(RE),uT=function(t){R_(n,t);var e=j_(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 P_(D_(r=e.call.apply(e,lh(t=[this]).call(t,o))),"btnClick",(function(t){t.preventDefault(),t.stopPropagation();var e=D_(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 I_(n,[{key:"afterCreate",value:function(){N_(U_(n.prototype),"afterCreate",this).call(this),this.config.disable||(this.initIcons(),rb(this).call(this,["touchend","click"],this.btnClick),this.listenEvents(),this.animate(!0))}},{key:"listenEvents",value:function(){var t=this,e=this.player;this.on([oE,sE,"error",hE],(function(){t.animate(e.paused)}))}},{key:"registerIcons",value:function(){return{play:{icon:GE,class:"xg-icon-play"},pause:{icon:WE,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=fw(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(){N_(U_(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(YE(this,"PLAY_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"play"}},{key:"defaultConfig",get:function(){return{position:ME.CONTROLS_LEFT,index:0,disable:!1}}}]),n}(sT);function lT(){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 cT=function(t){R_(n,t);var e=j_(n);function n(){return L_(this,n),e.apply(this,arguments)}return I_(n,[{key:"afterCreate",value:function(){var t=this;this.initIcons(),this.onClick=function(e){e.preventDefault(),e.stopPropagation(),t.config.onClick(e)},rb(this).call(this,["click","touchend"],this.onClick)}},{key:"registerIcons",value:function(){return{screenBack:{icon:lT,class:"xg-fullscreen-back"}}}},{key:"initIcons",value:function(){var t=this.icons;this.appendChild(this.root,t.screenBack)}},{key:"show",value:function(){tE.addClass(this.root,"show")}},{key:"hide",value:function(){tE.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:ME.ROOT_TOP,index:0}}}]),n}(RE);function fT(){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 hT(){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 pT=function(t){R_(n,t);var e=j_(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 P_(D_(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 I_(n,[{key:"afterCreate",value:function(){var t=this;N_(U_(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=tE.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})}}),rb(this).call(this,".xgplayer-fullscreen",["touchend","click"],this.handleFullscreen),this.on("fullscreen_change",(function(e){var n=fw(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:cT,options:{config:{onClick:function(e){t.handleFullscreen(e)}}}})),"mobile"===iE.device&&window.addEventListener("orientationchange",this._onOrientationChange)}}},{key:"registerIcons",value:function(){return{fullscreen:{icon:fT,class:"xg-get-fullscreen"},exitFullscreen:{icon:hT,class:"xg-exit-fullscreen"}}}},{key:"destroy",value:function(){N_(U_(n.prototype),"destroy",this).call(this),this.unbind(".xgplayer-icon","mobile"===iE.device?"touchend":"click",this.handleFullscreen),"mobile"===iE.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 instanceof Event&&(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(YE(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:ME.CONTROLS_RIGHT,index:0,useCssFullscreen:!1,rotateFullscreen:!1,useScreenOrientation:!1,lockOrientationType:"landscape",switchCallback:null,target:null,disable:!1,needBackIcon:!1}}}]),n}(sT),dT=function(t){R_(n,t);var e=j_(n);function n(t){var r;return L_(this,n),(r=e.call(this,t)).isActiving=!1,r}return I_(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=fw(this).call(this,".time-duration"),this.timeDom=fw(this).call(this,".time-current"),this.listenEvents())}},{key:"listenEvents",value:function(){var t=this;this.on([cE,uE,lE],(function(e){"durationchange"===e.eventName&&(t.isActiving=!1),t.onTimeUpdate()})),this.on(aE,(function(){t.onTimeUpdate(!0)})),this.on(hE,(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=tE.adjustTimeByDuration(i,r,t),"flex"===this.mode?(this.centerCurDom.innerHTML=this.minWidthTime(tE.format(i)),r!==1/0&&r>0&&(this.centerDurDom.innerHTML=tE.format(r))):(this.timeDom.innerHTML=this.minWidthTime(tE.format(i)),r!==1/0&&r>0&&(this.durationDom.innerHTML=tE.format(r)))}}},{key:"onReset",value:function(){"flex"===this.mode?(this.centerCurDom.innerHTML=this.minWidthTime(tE.format(0)),this.centerDurDom.innerHTML=tE.format(0)):(this.timeDom.innerHTML=this.minWidthTime(tE.format(0)),this.durationDom.innerHTML=tE.format(0))}},{key:"createCenterTime",value:function(){var t=this.player;if(t.controls&&t.controls.center){var e=t.controls.center;this.centerCurDom=tE.createDom("xg-icon","00:00",{},"xgplayer-time xg-time-left"),this.centerDurDom=tE.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?(tE.hide(this.durationDom),tE.hide(this.timeDom),tE.hide(fw(this).call(this,".time-separator")),tE.show(fw(this).call(this,".time-live-tag"))):tE.hide(fw(this).call(this,".time-live-tag"));t.hide?this.hide():this.show()}},{key:"changeLiveState",value:function(t){t?(tE.hide(this.durationDom),tE.hide(this.timeDom),tE.hide(fw(this).call(this,".time-separator")),tE.show(fw(this).call(this,".time-live-tag"))):(tE.hide(fw(this).call(this,".time-live-tag")),tE.show(fw(this).call(this,".time-separator")),tE.show(this.durationDom),tE.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(tE.format(t)):this.centerCurDom.innerHTML=this.minWidthTime(tE.format(t)))}},{key:"minWidthTime",value:function(t){var e;return f_(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(uE,n),e.isSeeking&&e.media.seeking?this.once(uE,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:ME.CONTROLS_LEFT,index:2,disable:!1}}}]),n}(RE);function gT(){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 vT(){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 yT(){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 mT=function(t){R_(n,t);var e=j_(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 P_(D_(r=e.call.apply(e,lh(t=[this]).call(t,o))),"onBarMousedown",(function(t){var e=D_(r).player,n=fw(r).call(r,".xgplayer-bar");tE.event(t);var i=n.getBoundingClientRect(),o=tE.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})),P_(D_(r),"onBarMouseMove",(function(t){var e=D_(r)._d;if(e.isStart){var n=D_(r),i=n.pos,o=n.player;t.preventDefault(),t.stopPropagation(),tE.event(t);var a=tE.getEventPos(t,o.zoom);e.isMoving=!0;var s=i.h-a.clientY+i.clientY;s>i.barH||r.updateVolumePos(s,t)}})),P_(D_(r),"onBarMouseUp",(function(t){tE.event(t),document.removeEventListener("mouseup",r.onBarMouseUp);var e=D_(r)._d;e.isStart=!1,e.isMoving=!1})),P_(D_(r),"onMouseenter",(function(t){r._d.isActive=!0,r.focus(),r.emit("icon_mouseenter",{pluginName:r.pluginName})})),P_(D_(r),"onMouseleave",(function(t){r._d.isActive=!1,r.unFocus(100,!1,t),r.emit("icon_mouseleave",{pluginName:r.pluginName})})),P_(D_(r),"onVolumeChange",(function(t){if(r.player){var e=r.player,n=e.muted,i=e.volume;r._d.isMoving||(fw(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 I_(n,[{key:"registerIcons",value:function(){return{volumeSmall:{icon:vT,class:"xg-volume-small"},volumeLarge:{icon:gT,class:"xg-volume"},volumeMuted:{icon:yT,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)fw(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"!==iE.device&&"mobile"!==this.playerConfig.isMobileSimulateMode)rb(this).call(this,"mouseenter",this._onMouseenterHandler),rb(this).call(this,["blur","mouseleave"],this._onMouseleaveHandler),rb(this).call(this,".xgplayer-slider","mousedown",this.onBarMousedown),rb(this).call(this,".xgplayer-slider","mousemove",this.onBarMouseMove),rb(this).call(this,".xgplayer-slider","mouseup",this.onBarMouseUp);rb(this).call(this,".xgplayer-icon",["touchend","click"],this.changeMutedHandler),this.on(fE,this.onVolumeChange),this.once("loadeddata",this.onVolumeChange),"Number"!==tE.typeOf(r)&&(this.player.volume=this.config.default),this.onVolumeChange()}}},{key:"updateVolumePos",value:function(t,e){var n=this.player,r=fw(this).call(this,".xgplayer-drag"),i=fw(this).call(this,".xgplayer-bar");if(i&&r){var o=o_(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=fw(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&&(tE.clearTimeout(this,this._timerId),this._timerId=null),tE.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&&(tE.clearTimeout(this,this._timerId),this._timerId=null),this._timerId=tE.setTimeout(this,(function(){i.isActive||(n?o.blur():o.focus(),tE.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&&(tE.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"===iE.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:ME.CONTROLS_RIGHT,index:1,disable:!1,showValueLabel:!1,default:.6,miniVolume:.2}}}]),n}(RE),bT=a,wT=pe("iterator"),_T=!bT((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[wT]||"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})),kT=y,AT=2147483647,ET=/[^\0-\u007E]/,TT=/[.\u3002\uFF0E\uFF61]/g,CT="Overflow: input needs wider integers to process",ST=RangeError,xT=kT(TT.exec),MT=Math.floor,LT=String.fromCharCode,OT=kT("".charCodeAt),IT=kT([].join),PT=kT([].push),RT=kT("".replace),UT=kT("".split),BT=kT("".toLowerCase),DT=function(t){return t+22+75*(t<26)},jT=function(t,e,n){var r=0;for(t=n?MT(t/700):t>>1,t+=MT(t/e);t>455;)t=MT(t/35),r+=36;return MT(r+36*t/(t+38))},NT=function(t){var e=[];t=function(t){for(var e=[],n=0,r=t.length;n<r;){var i=OT(t,n++);if(i>=55296&&i<=56319&&n<r){var o=OT(t,n++);56320==(64512&o)?PT(e,((1023&i)<<10)+(1023&o)+65536):(PT(e,i),n--)}else PT(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&&PT(e,LT(r));var u=e.length,l=u;for(u&&PT(e,"-");l<i;){var c=AT;for(n=0;n<t.length;n++)(r=t[n])>=o&&r<c&&(c=r);var f=l+1;if(c-o>MT((AT-a)/f))throw ST(CT);for(a+=(c-o)*f,o=c,n=0;n<t.length;n++){if((r=t[n])<o&&++a>AT)throw ST(CT);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;PT(e,LT(DT(d+g%v))),h=MT(g/v),p+=36}PT(e,LT(DT(h))),s=jT(a,f,l==u),a=0,l++}}a++,o++}return IT(e,"")},FT=fo,HT=function(t,e,n){for(var r in e)n&&n.unsafe&&t[r]?t[r]=e[r]:FT(t,r,e[r],n);return t},zT=Ln,VT=o,qT=P,GT=y,WT=L,YT=_T,KT=fo,XT=po,$T=HT,JT=jo,QT=$u,ZT=ta,tC=tg,eC=x,nC=Zt,rC=Je,iC=lr,oC=rn,aC=et,sC=ei,uC=Yi,lC=F,cC=od,fC=Dh,hC=sg,pC=dA,dC=pe("iterator"),gC="URLSearchParams",vC=gC+"Iterator",yC=ZT.set,mC=ZT.getterFor(gC),bC=ZT.getterFor(vC),wC=Object.getOwnPropertyDescriptor,_C=function(t){if(!WT)return VT[t];var e=wC(VT,t);return e&&e.value},kC=_C("fetch"),AC=_C("Request"),EC=_C("Headers"),TC=AC&&AC.prototype,CC=EC&&EC.prototype,SC=VT.RegExp,xC=VT.TypeError,MC=VT.decodeURIComponent,LC=VT.encodeURIComponent,OC=GT("".charAt),IC=GT([].join),PC=GT([].push),RC=GT("".replace),UC=GT([].shift),BC=GT([].splice),DC=GT("".split),jC=GT("".slice),NC=/\+/g,FC=Array(4),HC=function(t){return FC[t-1]||(FC[t-1]=SC("((?:%[\\da-f]{2}){"+t+"})","gi"))},zC=function(t){try{return MC(t)}catch(oR){return t}},VC=function(t){var e=RC(t,NC," "),n=4;try{return MC(e)}catch(oR){for(;n;)e=RC(e,HC(n--),zC);return e}},qC=/[!'()~]|%20/g,GC={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},WC=function(t){return GC[t]},YC=function(t){return RC(LC(t),qC,WC)},KC=QT((function(t,e){yC(this,{type:vC,iterator:cC(mC(t).entries),kind:e})}),"Iterator",(function(){var t=bC(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),XC=function(t){this.entries=[],this.url=null,void 0!==t&&(aC(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===OC(t,0)?jC(t,1):t:sC(t)))};XC.prototype={type:gC,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,n,r,i,o,a,s,u=fC(t);if(u)for(n=(e=cC(t,u)).next;!(r=qT(n,e)).done;){if(o=(i=cC(oC(r.value))).next,(a=qT(o,i)).done||(s=qT(o,i)).done||!qT(o,i).done)throw xC("Expected sequence with length 2");PC(this.entries,{key:sC(a.value),value:sC(s.value)})}else for(var l in t)nC(t,l)&&PC(this.entries,{key:l,value:sC(t[l])})},parseQuery:function(t){if(t)for(var e,n,r=DC(t,"&"),i=0;i<r.length;)(e=r[i++]).length&&(n=DC(e,"="),PC(this.entries,{key:VC(UC(n)),value:VC(IC(n,"="))}))},serialize:function(){for(var t,e=this.entries,n=[],r=0;r<e.length;)t=e[r++],PC(n,YC(t.key)+"="+YC(t.value));return IC(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var $C=function(){tC(this,JC);var t=yC(this,new XC(arguments.length>0?arguments[0]:void 0));WT||(this.length=t.entries.length)},JC=$C.prototype;if($T(JC,{append:function(t,e){hC(arguments.length,2);var n=mC(this);PC(n.entries,{key:sC(t),value:sC(e)}),WT||this.length++,n.updateURL()},delete:function(t){hC(arguments.length,1);for(var e=mC(this),n=e.entries,r=sC(t),i=0;i<n.length;)n[i].key===r?BC(n,i,1):i++;WT||(this.length=n.length),e.updateURL()},get:function(t){hC(arguments.length,1);for(var e=mC(this).entries,n=sC(t),r=0;r<e.length;r++)if(e[r].key===n)return e[r].value;return null},getAll:function(t){hC(arguments.length,1);for(var e=mC(this).entries,n=sC(t),r=[],i=0;i<e.length;i++)e[i].key===n&&PC(r,e[i].value);return r},has:function(t){hC(arguments.length,1);for(var e=mC(this).entries,n=sC(t),r=0;r<e.length;)if(e[r++].key===n)return!0;return!1},set:function(t,e){hC(arguments.length,1);for(var n,r=mC(this),i=r.entries,o=!1,a=sC(t),s=sC(e),u=0;u<i.length;u++)(n=i[u]).key===a&&(o?BC(i,u--,1):(o=!0,n.value=s));o||PC(i,{key:a,value:s}),WT||(this.length=i.length),r.updateURL()},sort:function(){var t=mC(this);pC(t.entries,(function(t,e){return t.key>e.key?1:-1})),t.updateURL()},forEach:function(t){for(var e,n=mC(this).entries,r=rC(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 KC(this,"keys")},values:function(){return new KC(this,"values")},entries:function(){return new KC(this,"entries")}},{enumerable:!0}),KT(JC,dC,JC.entries,{name:"entries"}),KT(JC,"toString",(function(){return mC(this).serialize()}),{enumerable:!0}),WT&&XT(JC,"size",{get:function(){return mC(this).entries.length},configurable:!0,enumerable:!0}),JT($C,gC),zT({global:!0,constructor:!0,forced:!YT},{URLSearchParams:$C}),!YT&&eC(EC)){var QC=GT(CC.has),ZC=GT(CC.set),tS=function(t){if(aC(t)){var e,n=t.body;if(iC(n)===gC)return e=t.headers?new EC(t.headers):new EC,QC(e,"content-type")||ZC(e,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),uC(t,{body:lC(0,sC(n)),headers:lC(0,e)})}return t};if(eC(kC)&&zT({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(t){return kC(t,arguments.length>1?tS(arguments[1]):{})}}),eC(AC)){var eS=function(t){return tC(this,TC),new AC(t,arguments.length>1?tS(arguments[1]):{})};TC.constructor=eS,eS.prototype=TC,zT({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:eS})}}var nS,rS=Ln,iS=L,oS=_T,aS=o,sS=Je,uS=y,lS=fo,cS=po,fS=tg,hS=Zt,pS=E_,dS=kb,gS=ro,vS=bc.codeAt,yS=function(t){var e,n,r=[],i=UT(RT(BT(t),TT,"."),".");for(e=0;e<i.length;e++)n=i[e],PT(r,xT(ET,n)?"xn--"+NT(n):n);return IT(r,".")},mS=ei,bS=jo,wS=sg,_S={URLSearchParams:$C,getState:mC},kS=ta,AS=kS.set,ES=kS.getterFor("URL"),TS=_S.URLSearchParams,CS=_S.getState,SS=aS.URL,xS=aS.TypeError,MS=aS.parseInt,LS=Math.floor,OS=Math.pow,IS=uS("".charAt),PS=uS(/./.exec),RS=uS([].join),US=uS(1..toString),BS=uS([].pop),DS=uS([].push),jS=uS("".replace),NS=uS([].shift),FS=uS("".split),HS=uS("".slice),zS=uS("".toLowerCase),VS=uS([].unshift),qS="Invalid scheme",GS="Invalid host",WS="Invalid port",YS=/[a-z]/i,KS=/[\d+-.a-z]/i,XS=/\d/,$S=/^0x/i,JS=/^[0-7]+$/,QS=/^\d+$/,ZS=/^[\da-f]+$/i,tx=/[\0\t\n\r #%/:<>?@[\\\]^|]/,ex=/[\0\t\n\r #/:<>?@[\\\]^|]/,nx=/^[\u0000-\u0020]+/,rx=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,ix=/[\t\n\r]/g,ox=function(t){var e,n,r,i;if("number"==typeof t){for(e=[],n=0;n<4;n++)VS(e,t%256),t=LS(t/256);return RS(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+=US(t[n],16),n<7&&(e+=":")));return"["+e+"]"}return t},ax={},sx=pS({},ax,{" ":1,'"':1,"<":1,">":1,"`":1}),ux=pS({},sx,{"#":1,"?":1,"{":1,"}":1}),lx=pS({},ux,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),cx=function(t,e){var n=vS(t,0);return n>32&&n<127&&!hS(e,t)?t:encodeURIComponent(t)},fx={ftp:21,file:null,http:80,https:443,ws:80,wss:443},hx=function(t,e){var n;return 2==t.length&&PS(YS,IS(t,0))&&(":"==(n=IS(t,1))||!e&&"|"==n)},px=function(t){var e;return t.length>1&&hx(HS(t,0,2))&&(2==t.length||"/"===(e=IS(t,2))||"\\"===e||"?"===e||"#"===e)},dx=function(t){return"."===t||"%2e"===zS(t)},gx={},vx={},yx={},mx={},bx={},wx={},_x={},kx={},Ax={},Ex={},Tx={},Cx={},Sx={},xx={},Mx={},Lx={},Ox={},Ix={},Px={},Rx={},Ux={},Bx=function(t,e,n){var r,i,o,a=mS(t);if(e){if(i=this.parse(a))throw xS(i);this.searchParams=null}else{if(void 0!==n&&(r=new Bx(n,!0)),i=this.parse(a,null,r))throw xS(i);(o=CS(new TS)).bindURL(this),this.searchParams=o}};Bx.prototype={type:"URL",parse:function(t,e,n){var r,i,o,a,s,u=this,l=e||gx,c=0,f="",h=!1,p=!1,d=!1;for(t=mS(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=jS(t,nx,""),t=jS(t,rx,"$1")),t=jS(t,ix,""),r=dS(t);c<=r.length;){switch(i=r[c],l){case gx:if(!i||!PS(YS,i)){if(e)return qS;l=yx;continue}f+=zS(i),l=vx;break;case vx:if(i&&(PS(KS,i)||"+"==i||"-"==i||"."==i))f+=zS(i);else{if(":"!=i){if(e)return qS;f="",l=yx,c=0;continue}if(e&&(u.isSpecial()!=hS(fx,f)||"file"==f&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=f,e)return void(u.isSpecial()&&fx[u.scheme]==u.port&&(u.port=null));f="","file"==u.scheme?l=xx:u.isSpecial()&&n&&n.scheme==u.scheme?l=mx:u.isSpecial()?l=kx:"/"==r[c+1]?(l=bx,c++):(u.cannotBeABaseURL=!0,DS(u.path,""),l=Px)}break;case yx:if(!n||n.cannotBeABaseURL&&"#"!=i)return qS;if(n.cannotBeABaseURL&&"#"==i){u.scheme=n.scheme,u.path=gS(n.path),u.query=n.query,u.fragment="",u.cannotBeABaseURL=!0,l=Ux;break}l="file"==n.scheme?xx:wx;continue;case mx:if("/"!=i||"/"!=r[c+1]){l=wx;continue}l=Ax,c++;break;case bx:if("/"==i){l=Ex;break}l=Ix;continue;case wx:if(u.scheme=n.scheme,i==nS)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=gS(n.path),u.query=n.query;else if("/"==i||"\\"==i&&u.isSpecial())l=_x;else if("?"==i)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=gS(n.path),u.query="",l=Rx;else{if("#"!=i){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=gS(n.path),u.path.length--,l=Ix;continue}u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=gS(n.path),u.query=n.query,u.fragment="",l=Ux}break;case _x:if(!u.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,l=Ix;continue}l=Ex}else l=Ax;break;case kx:if(l=Ax,"/"!=i||"/"!=IS(f,c+1))continue;c++;break;case Ax:if("/"!=i&&"\\"!=i){l=Ex;continue}break;case Ex:if("@"==i){h&&(f="%40"+f),h=!0,o=dS(f);for(var g=0;g<o.length;g++){var v=o[g];if(":"!=v||d){var y=cx(v,lx);d?u.password+=y:u.username+=y}else d=!0}f=""}else if(i==nS||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(h&&""==f)return"Invalid authority";c-=dS(f).length+1,f="",l=Tx}else f+=i;break;case Tx:case Cx:if(e&&"file"==u.scheme){l=Lx;continue}if(":"!=i||p){if(i==nS||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()){if(u.isSpecial()&&""==f)return GS;if(e&&""==f&&(u.includesCredentials()||null!==u.port))return;if(a=u.parseHost(f))return a;if(f="",l=Ox,e)return;continue}"["==i?p=!0:"]"==i&&(p=!1),f+=i}else{if(""==f)return GS;if(a=u.parseHost(f))return a;if(f="",l=Sx,e==Cx)return}break;case Sx:if(!PS(XS,i)){if(i==nS||"/"==i||"?"==i||"#"==i||"\\"==i&&u.isSpecial()||e){if(""!=f){var m=MS(f,10);if(m>65535)return WS;u.port=u.isSpecial()&&m===fx[u.scheme]?null:m,f=""}if(e)return;l=Ox;continue}return WS}f+=i;break;case xx:if(u.scheme="file","/"==i||"\\"==i)l=Mx;else{if(!n||"file"!=n.scheme){l=Ix;continue}if(i==nS)u.host=n.host,u.path=gS(n.path),u.query=n.query;else if("?"==i)u.host=n.host,u.path=gS(n.path),u.query="",l=Rx;else{if("#"!=i){px(RS(gS(r,c),""))||(u.host=n.host,u.path=gS(n.path),u.shortenPath()),l=Ix;continue}u.host=n.host,u.path=gS(n.path),u.query=n.query,u.fragment="",l=Ux}}break;case Mx:if("/"==i||"\\"==i){l=Lx;break}n&&"file"==n.scheme&&!px(RS(gS(r,c),""))&&(hx(n.path[0],!0)?DS(u.path,n.path[0]):u.host=n.host),l=Ix;continue;case Lx:if(i==nS||"/"==i||"\\"==i||"?"==i||"#"==i){if(!e&&hx(f))l=Ix;else if(""==f){if(u.host="",e)return;l=Ox}else{if(a=u.parseHost(f))return a;if("localhost"==u.host&&(u.host=""),e)return;f="",l=Ox}continue}f+=i;break;case Ox:if(u.isSpecial()){if(l=Ix,"/"!=i&&"\\"!=i)continue}else if(e||"?"!=i)if(e||"#"!=i){if(i!=nS&&(l=Ix,"/"!=i))continue}else u.fragment="",l=Ux;else u.query="",l=Rx;break;case Ix:if(i==nS||"/"==i||"\\"==i&&u.isSpecial()||!e&&("?"==i||"#"==i)){if(".."===(s=zS(s=f))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(u.shortenPath(),"/"==i||"\\"==i&&u.isSpecial()||DS(u.path,"")):dx(f)?"/"==i||"\\"==i&&u.isSpecial()||DS(u.path,""):("file"==u.scheme&&!u.path.length&&hx(f)&&(u.host&&(u.host=""),f=IS(f,0)+":"),DS(u.path,f)),f="","file"==u.scheme&&(i==nS||"?"==i||"#"==i))for(;u.path.length>1&&""===u.path[0];)NS(u.path);"?"==i?(u.query="",l=Rx):"#"==i&&(u.fragment="",l=Ux)}else f+=cx(i,ux);break;case Px:"?"==i?(u.query="",l=Rx):"#"==i?(u.fragment="",l=Ux):i!=nS&&(u.path[0]+=cx(i,ax));break;case Rx:e||"#"!=i?i!=nS&&("'"==i&&u.isSpecial()?u.query+="%27":u.query+="#"==i?"%23":cx(i,ax)):(u.fragment="",l=Ux);break;case Ux:i!=nS&&(u.fragment+=cx(i,sx))}c++}},parseHost:function(t){var e,n,r;if("["==IS(t,0)){if("]"!=IS(t,t.length-1))return GS;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 IS(t,f)};if(":"==h()){if(":"!=IS(t,1))return;f+=2,c=++l}for(;h();){if(8==l)return;if(":"!=h()){for(e=n=0;n<4&&PS(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(!PS(XS,h()))return;for(;PS(XS,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}(HS(t,1,-1)),!e)return GS;this.host=e}else if(this.isSpecial()){if(t=yS(t),PS(tx,t))return GS;if(e=function(t){var e,n,r,i,o,a,s,u=FS(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"==IS(i,0)&&(o=PS($S,i)?16:8,i=HS(i,8==o?1:2)),""===i)a=0;else{if(!PS(10==o?QS:8==o?JS:ZS,i))return t;a=MS(i,o)}DS(n,a)}for(r=0;r<e;r++)if(a=n[r],r==e-1){if(a>=OS(256,5-e))return null}else if(a>255)return null;for(s=BS(n),r=0;r<n.length;r++)s+=n[r]*OS(256,3-r);return s}(t),null===e)return GS;this.host=e}else{if(PS(ex,t))return GS;for(e="",n=dS(t),r=0;r<n.length;r++)e+=cx(n[r],ax);this.host=e}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return hS(fx,this.scheme)},shortenPath:function(){var t=this.path,e=t.length;!e||"file"==this.scheme&&1==e&&hx(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+=ox(i),null!==o&&(l+=":"+o)):"file"==e&&(l+="//"),l+=t.cannotBeABaseURL?a[0]:a.length?"/"+RS(a,"/"):"",null!==s&&(l+="?"+s),null!==u&&(l+="#"+u),l},setHref:function(t){var e=this.parse(t);if(e)throw xS(e);this.searchParams.update()},getOrigin:function(){var t=this.scheme,e=this.port;if("blob"==t)try{return new Dx(t.path[0]).origin}catch(oR){return"null"}return"file"!=t&&this.isSpecial()?t+"://"+ox(this.host)+(null!==e?":"+e:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(t){this.parse(mS(t)+":",gx)},getUsername:function(){return this.username},setUsername:function(t){var e=dS(mS(t));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<e.length;n++)this.username+=cx(e[n],lx)}},getPassword:function(){return this.password},setPassword:function(t){var e=dS(mS(t));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<e.length;n++)this.password+=cx(e[n],lx)}},getHost:function(){var t=this.host,e=this.port;return null===t?"":null===e?ox(t):ox(t)+":"+e},setHost:function(t){this.cannotBeABaseURL||this.parse(t,Tx)},getHostname:function(){var t=this.host;return null===t?"":ox(t)},setHostname:function(t){this.cannotBeABaseURL||this.parse(t,Cx)},getPort:function(){var t=this.port;return null===t?"":mS(t)},setPort:function(t){this.cannotHaveUsernamePasswordPort()||(""==(t=mS(t))?this.port=null:this.parse(t,Sx))},getPathname:function(){var t=this.path;return this.cannotBeABaseURL?t[0]:t.length?"/"+RS(t,"/"):""},setPathname:function(t){this.cannotBeABaseURL||(this.path=[],this.parse(t,Ox))},getSearch:function(){var t=this.query;return t?"?"+t:""},setSearch:function(t){""==(t=mS(t))?this.query=null:("?"==IS(t,0)&&(t=HS(t,1)),this.query="",this.parse(t,Rx)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var t=this.fragment;return t?"#"+t:""},setHash:function(t){""!=(t=mS(t))?("#"==IS(t,0)&&(t=HS(t,1)),this.fragment="",this.parse(t,Ux)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Dx=function(t){var e=fS(this,jx),n=wS(arguments.length,1)>1?arguments[1]:void 0,r=AS(e,new Bx(t,!1,n));iS||(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())},jx=Dx.prototype,Nx=function(t,e){return{get:function(){return ES(this)[t]()},set:e&&function(t){return ES(this)[e](t)},configurable:!0,enumerable:!0}};if(iS&&(cS(jx,"href",Nx("serialize","setHref")),cS(jx,"origin",Nx("getOrigin")),cS(jx,"protocol",Nx("getProtocol","setProtocol")),cS(jx,"username",Nx("getUsername","setUsername")),cS(jx,"password",Nx("getPassword","setPassword")),cS(jx,"host",Nx("getHost","setHost")),cS(jx,"hostname",Nx("getHostname","setHostname")),cS(jx,"port",Nx("getPort","setPort")),cS(jx,"pathname",Nx("getPathname","setPathname")),cS(jx,"search",Nx("getSearch","setSearch")),cS(jx,"searchParams",Nx("getSearchParams")),cS(jx,"hash",Nx("getHash","setHash"))),lS(jx,"toJSON",(function(){return ES(this).serialize()}),{enumerable:!0}),lS(jx,"toString",(function(){return ES(this).serialize()}),{enumerable:!0}),SS){var Fx=SS.createObjectURL,Hx=SS.revokeObjectURL;Fx&&lS(Dx,"createObjectURL",sS(Fx,SS)),Hx&&lS(Dx,"revokeObjectURL",sS(Hx,SS))}bS(Dx,"URL"),rS({global:!0,constructor:!0,forced:!oS,sham:!iS},{URL:Dx});var zx=Ln,Vx=a,qx=sg,Gx=ei,Wx=_T,Yx=st("URL");zx({target:"URL",stat:!0,forced:!(Wx&&Vx((function(){Yx.canParse()})))},{canParse:function(t){var e=qx(arguments.length,1),n=Gx(t),r=e<2||void 0===arguments[1]?void 0:Gx(arguments[1]);try{return!!new Yx(n,r)}catch(oR){return!1}}});var Kx=n(nt.URL);function Xx(){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 $x(){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 Jx=function(t){R_(n,t);var e=j_(n);function n(){return L_(this,n),e.apply(this,arguments)}return I_(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;N_(U_(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=rb(t=this.btnClick).call(t,this),this.handleCssFullscreen=this.hook("cssFullscreen_change",this.btnClick,{pre:function(t){t.preventDefault(),t.stopPropagation()}}),rb(this).call(this,["click","touchend"],this.handleCssFullscreen))}},{key:"initIcons",value:function(){var t=this.icons,e=fw(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=fw(this).call(this,".xg-tips");n&&this.changeLangTextKey(n,t?e.EXITCSSFULLSCREEN_TIPS:e.CSSFULLSCREEN_TIPS)}},{key:"registerIcons",value:function(){return{cssFullscreen:{icon:Xx,class:"xg-get-cssfull"},exitCssFullscreen:{icon:$x,class:"xg-exit-cssfull"}}}},{key:"destroy",value:function(){N_(U_(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(YE(this,"CSSFULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"cssFullscreen"}},{key:"defaultConfig",get:function(){return{position:ME.CONTROLS_RIGHT,index:1,disable:!1,target:null}}}]),n}(sT),Qx=et,Zx=_,tM=pe("match"),eM=function(t){var e;return Qx(t)&&(void 0!==(e=t[tM])?!!e:"RegExp"==Zx(t))},nM=TypeError,rM=pe("match"),iM=et,oM=Math.floor;Ln({target:"Number",stat:!0},{isInteger:Number.isInteger||function(t){return!iM(t)&&isFinite(t)&&oM(t)===t}});var aM=n(nt.Number.isInteger),sM=fi.includes;Ln({target:"Array",proto:!0,forced:a((function(){return!Array(1).includes()}))},{includes:function(t){return sM(this,t,arguments.length>1?arguments[1]:void 0)}});var uM=af("Array").includes,lM=Ln,cM=function(t){if(eM(t))throw nM("The method doesn't accept regular expressions");return t},fM=X,hM=ei,pM=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[rM]=!1,"/./"[t](e)}catch(r){}}return!1},dM=y("".indexOf);lM({target:"String",proto:!0,forced:!pM("includes")},{includes:function(t){return!!~dM(hM(fM(this)),hM(cM(t)),arguments.length>1?arguments[1]:void 0)}});var gM=af("String").includes,vM=ut,yM=uM,mM=gM,bM=Array.prototype,wM=String.prototype,_M=n((function(t){var e=t.includes;return t===bM||vM(bM,t)&&e===bM.includes?yM:"string"==typeof t||t===wM||vM(wM,t)&&e===wM.includes?mM:e})),kM=$t,AM=ai,EM=Kn,TM=function(t){for(var e=kM(this),n=EM(e),r=arguments.length,i=AM(r>1?arguments[1]:void 0,n),o=r>2?arguments[2]:void 0,a=void 0===o?n:AM(o,n);a>i;)e[i++]=t;return e};Ln({target:"Array",proto:!0},{fill:TM});var CM=af("Array").fill,SM=ut,xM=CM,MM=Array.prototype,LM=n((function(t){var e=t.fill;return t===MM||SM(MM,t)&&e===MM.fill?xM:e})),OM={exports:{}},IM=a((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),PM=a,RM=et,UM=_,BM=IM,DM=Object.isExtensible,jM=PM((function(){DM(1)}))||BM?function(t){return!!RM(t)&&((!BM||"ArrayBuffer"!=UM(t))&&(!DM||DM(t)))}:DM,NM=!a((function(){return Object.isExtensible(Object.preventExtensions({}))})),FM=Ln,HM=y,zM=hi,VM=et,qM=Zt,GM=Qe.f,WM=Ki,YM=Ji,KM=jM,XM=NM,$M=!1,JM=ie("meta"),QM=0,ZM=function(t){GM(t,JM,{value:{objectID:"O"+QM++,weakData:{}}})},tL=OM.exports={enable:function(){tL.enable=function(){},$M=!0;var t=WM.f,e=HM([].splice),n={};n[JM]=1,t(n).length&&(WM.f=function(n){for(var r=t(n),i=0,o=r.length;i<o;i++)if(r[i]===JM){e(r,i,1);break}return r},FM({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:YM.f}))},fastKey:function(t,e){if(!VM(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!qM(t,JM)){if(!KM(t))return"F";if(!e)return"E";ZM(t)}return t[JM].objectID},getWeakData:function(t,e){if(!qM(t,JM)){if(!KM(t))return!0;if(!e)return!1;ZM(t)}return t[JM].weakData},onFreeze:function(t){return XM&&$M&&KM(t)&&!qM(t,JM)&&ZM(t),t}};zM[JM]=!0;var eL=OM.exports,nL=Ln,rL=o,iL=eL,oL=a,aL=mn,sL=Ad,uL=tg,lL=x,cL=et,fL=jo,hL=Qe.f,pL=ua.forEach,dL=L,gL=ta.set,vL=ta.getterFor,yL=Yi,mL=po,bL=HT,wL=Je,_L=tg,kL=W,AL=Ad,EL=kl,TL=Al,CL=Jd,SL=L,xL=eL.fastKey,ML=ta.set,LL=ta.getterFor,OL={getConstructor:function(t,e,n,r){var i=t((function(t,i){_L(t,o),ML(t,{type:e,index:yL(null),first:void 0,last:void 0,size:0}),SL||(t.size=0),kL(i)||AL(i,t[r],{that:t,AS_ENTRIES:n})})),o=i.prototype,a=LL(e),s=function(t,e,n){var r,i,o=a(t),s=u(t,e);return s?s.value=n:(o.last=s={index:i=xL(e,!0),key:e,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=s),r&&(r.next=s),SL?o.size++:t.size++,"F"!==i&&(o.index[i]=s)),t},u=function(t,e){var n,r=a(t),i=xL(e);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==e)return n};return bL(o,{clear:function(){for(var t=a(this),e=t.index,n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete e[n.index],n=n.next;t.first=t.last=void 0,SL?t.size=0:this.size=0},delete:function(t){var e=this,n=a(e),r=u(e,t);if(r){var i=r.next,o=r.previous;delete n.index[r.index],r.removed=!0,o&&(o.next=i),i&&(i.previous=o),n.first==r&&(n.first=i),n.last==r&&(n.last=o),SL?n.size--:e.size--}return!!r},forEach:function(t){for(var e,n=a(this),r=wL(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!u(this,t)}}),bL(o,n?{get:function(t){var e=u(this,t);return e&&e.value},set:function(t,e){return s(this,0===t?0:t,e)}}:{add:function(t){return s(this,t=0===t?0:t,t)}}),SL&&mL(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(t,e,n){var r=e+" Iterator",i=LL(e),o=LL(r);EL(t,e,(function(t,e){ML(this,{type:r,target:t,state:i(t),kind:e,last:void 0})}),(function(){for(var t=o(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?TL("keys"==e?n.key:"values"==e?n.value:[n.key,n.value],!1):(t.target=void 0,TL(void 0,!0))}),n?"entries":"values",!n,!0),CL(e)}};(function(t,e,n){var r,i=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),a=i?"set":"add",s=rL[t],u=s&&s.prototype,l={};if(dL&&lL(s)&&(o||u.forEach&&!oL((function(){(new s).entries().next()})))){var c=(r=e((function(e,n){gL(uL(e,c),{type:t,collection:new s}),null!=n&&sL(n,e[a],{that:e,AS_ENTRIES:i})}))).prototype,f=vL(t);pL(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(t){var e="add"==t||"set"==t;!(t in u)||o&&"clear"==t||aL(c,t,(function(n,r){var i=f(this).collection;if(!e&&o&&!cL(n))return"get"==t&&void 0;var a=i[t](0===n?0:n,r);return e?this:a}))})),o||hL(c,"size",{configurable:!0,get:function(){return f(this).collection.size}})}else r=n.getConstructor(e,t,i,a),iL.enable();fL(r,t,!1,!0),l[t]=r,nL({global:!0,forced:!0},l),o||n.setStrong(r,t,i)})("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),OL);var IL=nt.Map,PL=Je,RL=P,UL=It,BL=Ff,DL=W,jL=Ad,NL=[].push,FL=function(t){var e,n,r,i,o=arguments.length,a=o>1?arguments[1]:void 0;return BL(this),(e=void 0!==a)&&UL(a),DL(t)?new this:(n=[],e?(r=0,i=PL(a,o>2?arguments[2]:void 0),jL(t,(function(t){RL(NL,n,i(t,r++))}))):jL(t,NL,{that:n}),new this(n))};Ln({target:"Map",stat:!0,forced:!0},{from:FL});var HL=Is,zL=function(){return new this(HL(arguments))};Ln({target:"Map",stat:!0,forced:!0},{of:zL});var VL=xt,qL=function(t){if("object"==typeof t&&"size"in t&&"has"in t&&"get"in t&&"set"in t&&"delete"in t&&"entries"in t)return t;throw TypeError(VL(t)+" is not a map")},GL=function(t,e){return 1==e?function(e,n){return e[t](n)}:function(e,n,r){return e[t](n,r)}},WL=st("Map"),YL={Map:WL,set:GL("set",2),get:GL("get",1),has:GL("has",1),remove:GL("delete",1),proto:WL.prototype},KL=qL,XL=YL.remove;Ln({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=KL(this),n=!0,r=0,i=arguments.length;r<i;r++)t=XL(e,arguments[r]),n=n&&t;return!!n}});var $L=qL,JL=YL.get,QL=YL.has,ZL=YL.set;Ln({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(t,e){var n,r,i=$L(this);return QL(i,t)?(n=JL(i,t),"update"in e&&(n=e.update(n,t,i),ZL(i,t,n)),n):(r=e.insert(t,i),ZL(i,t,r),r)}});var tO=P,eO=function(t,e,n){for(var r,i,o=n||t.next;!(r=tO(o,t)).done;)if(void 0!==(i=e(r.value)))return i},nO=function(t,e,n){return n?eO(t.entries(),(function(t){return e(t[1],t[0])})):t.forEach(e)},rO=Je,iO=qL,oO=nO;Ln({target:"Map",proto:!0,real:!0,forced:!0},{every:function(t){var e=iO(this),n=rO(t,arguments.length>1?arguments[1]:void 0);return!1!==oO(e,(function(t,r){if(!n(t,r,e))return!1}),!0)}});var aO=Je,sO=qL,uO=nO,lO=YL.Map,cO=YL.set;Ln({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(t){var e=sO(this),n=aO(t,arguments.length>1?arguments[1]:void 0),r=new lO;return uO(e,(function(t,i){n(t,i,e)&&cO(r,i,t)})),r}});var fO=Je,hO=qL,pO=nO;Ln({target:"Map",proto:!0,real:!0,forced:!0},{find:function(t){var e=hO(this),n=fO(t,arguments.length>1?arguments[1]:void 0),r=pO(e,(function(t,r){if(n(t,r,e))return{value:t}}),!0);return r&&r.value}});var dO=Je,gO=qL,vO=nO;Ln({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(t){var e=gO(this),n=dO(t,arguments.length>1?arguments[1]:void 0),r=vO(e,(function(t,r){if(n(t,r,e))return{key:r}}),!0);return r&&r.key}});var yO=Ln,mO=P,bO=x,wO=It,_O=Ad,kO=YL.Map,AO=y([].push);yO({target:"Map",stat:!0,forced:!0},{groupBy:function(t,e){var n=new(bO(this)?this:kO);wO(e);var r=wO(n.has),i=wO(n.get),o=wO(n.set);return _O(t,(function(t){var a=e(t);mO(r,n,a)?AO(mO(i,n,a),t):mO(o,n,a,[t])})),n}});var EO=function(t,e){return t===e||t!=t&&e!=e},TO=qL,CO=nO;Ln({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(t){return!0===CO(TO(this),(function(e){if(EO(e,t))return!0}),!0)}});var SO=P,xO=Ad,MO=x,LO=It,OO=YL.Map;Ln({target:"Map",stat:!0,forced:!0},{keyBy:function(t,e){var n=new(MO(this)?this:OO);LO(e);var r=LO(n.set);return xO(t,(function(t){SO(r,n,e(t),t)})),n}});var IO=qL,PO=nO;Ln({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(t){var e=PO(IO(this),(function(e,n){if(e===t)return{key:n}}),!0);return e&&e.key}});var RO=Je,UO=qL,BO=nO,DO=YL.Map,jO=YL.set;Ln({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(t){var e=UO(this),n=RO(t,arguments.length>1?arguments[1]:void 0),r=new DO;return BO(e,(function(t,i){jO(r,n(t,i,e),t)})),r}});var NO=Je,FO=qL,HO=nO,zO=YL.Map,VO=YL.set;Ln({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(t){var e=FO(this),n=NO(t,arguments.length>1?arguments[1]:void 0),r=new zO;return HO(e,(function(t,i){VO(r,i,n(t,i,e))})),r}});var qO=qL,GO=Ad,WO=YL.set;Ln({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(t){for(var e=qO(this),n=arguments.length,r=0;r<n;)GO(arguments[r++],(function(t,n){WO(e,t,n)}),{AS_ENTRIES:!0});return e}});var YO=It,KO=qL,XO=nO,$O=TypeError;Ln({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(t){var e=KO(this),n=arguments.length<2,r=n?void 0:arguments[1];if(YO(t),XO(e,(function(i,o){n?(n=!1,r=i):r=t(r,i,o,e)})),n)throw $O("Reduce of empty map with no initial value");return r}});var JO=Je,QO=qL,ZO=nO;Ln({target:"Map",proto:!0,real:!0,forced:!0},{some:function(t){var e=QO(this),n=JO(t,arguments.length>1?arguments[1]:void 0);return!0===ZO(e,(function(t,r){if(n(t,r,e))return!0}),!0)}});var tI=It,eI=qL,nI=TypeError,rI=YL.get,iI=YL.has,oI=YL.set;Ln({target:"Map",proto:!0,real:!0,forced:!0},{update:function(t,e){var n=eI(this),r=arguments.length;tI(e);var i=iI(n,t);if(!i&&r<3)throw nI("Updating absent value");var o=i?rI(n,t):tI(r>2?arguments[2]:void 0)(t,n);return oI(n,t,e(o,t,n)),n}});var aI=P,sI=It,uI=x,lI=rn,cI=TypeError,fI=function(t,e){var n,r=lI(this),i=sI(r.get),o=sI(r.has),a=sI(r.set),s=arguments.length>2?arguments[2]:void 0;if(!uI(e)&&!uI(s))throw cI("At least one callback required");return aI(o,r,t)?(n=aI(i,r,t),uI(e)&&(n=e(n),aI(a,r,t,n))):uI(s)&&(n=s(),aI(a,r,t,n)),n};Ln({target:"Map",proto:!0,real:!0,forced:!0},{upsert:fI}),Ln({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:fI});var hI=n(IL);function pI(t){return(pI="function"==typeof Oh&&"symbol"==typeof nb?function(t){return typeof t}:function(t){return t&&"function"==typeof Oh&&t.constructor===Oh&&t!==Oh.prototype?"symbol":typeof t})(t)}function dI(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,gI(r.key),r)}}function gI(t){var e=function(t,e){if("object"!==Lc(t)||null===t)return t;var n=t[Sb];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Lc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Lc(e)?e:String(e)}var vI=It,yI=$t,mI=G,bI=Kn,wI=TypeError,_I=function(t){return function(e,n,r,i){vI(n);var o=yI(e),a=mI(o),s=bI(o),u=t?s-1:0,l=t?-1:1;if(r<2)for(;;){if(u in a){i=a[u],u+=l;break}if(u+=l,t?u<0:s<=u)throw wI("Reduce of empty array with no initial value")}for(;t?u>=0:s>u;u+=l)u in a&&(i=n(i,a[u],u,o));return i}},kI={left:_I(!1),right:_I(!0)}.left;Ln({target:"Array",proto:!0,forced:!Wd&&vt>79&&vt<83||!Zh("reduce")},{reduce:function(t){var e=arguments.length;return kI(this,t,e,e>1?arguments[1]:void 0)}});var AI,EI,TI,CI=af("Array").reduce,SI=ut,xI=CI,MI=Array.prototype,LI=n((function(t){var e=t.reduce;return t===MI||SI(MI,t)&&e===MI.reduce?xI:e})),OI=1,II=2,PI=3,RI=4,UI=["Boolean","Number","String","Undefined","Null","Date","Object"],BI=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=[OI]).call(e,o)),t.disabled||(r=console).debug.apply(r,lh(n=[this._prefix,DI()]).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=[II]).call(e,o)),t.disabled||(r=console).log.apply(r,lh(n=[this._prefix,DI()]).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=[PI]).call(e,o)),t.disabled||(r=console).warn.apply(r,lh(n=[this._prefix,DI()]).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=[RI]).call(e,o)),t.disabled||(r=console).error.apply(r,lh(n=[this._prefix,DI()]).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=f_(r).call(r,(function(t){return NI(t)}));e=this._prefix+DI()+Lh(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&&dI(e.prototype,n),r&&dI(e,r),xp(e,"prototype",{writable:!1}),t}();function DI(){return(new Date).toLocaleString()}function jI(t){var e;if("object"!==pI(t))return t;var n=eb(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 NI(t,e,n){var r;n||(n=1),e||(e=2);var i={};if(!t||"object"!==pI(t))return t;var o=eb(r=Object.prototype.toString.call(t)).call(r,8,-1);if(!_M(UI).call(UI,o))return o;if(!(n>e)){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(n===e?i[a]=jI(t[a]):"object"===pI(t[a])?i[a]=NI(t[a],e,n+1):i[a]=t[a]);return i}}AI=BI,TI=!0,(EI=gI(EI="disabled"))in AI?xp(AI,EI,{value:TI,enumerable:!0,configurable:!0,writable:!0}):AI[EI]=TI;var FI=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"}),HI=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 zI(t){return C_({muted:!1,timeout:250,inline:!1},t)}function VI(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 Tm((function(t){u=a.play(),l=Bk((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 qI={audio:function(t){return VI(t=zI(t),(function(){return{element:document.createElement("audio"),source:Kx.createObjectURL(FI)}}))},video:function(t){return VI(t=zI(t),(function(){return{element:document.createElement("video"),source:Kx.createObjectURL(HI)}}))}},GI=new BI("AdsPluginBaseAdManager"),WI=function(t){jb(n,t);var e=zb(n);function n(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Rb(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 Bb(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=Mb(Mb({},this.config),t):GI.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(){GI.log("content play"),t.removeClass(VE),t.addClass(DE),t.state<qE&&(t.setState(qE),t.emit(pE))})).catch((function(e){if(GI.error("content play error",e),t.media&&t.media.error)return t.onError(),void t.removeClass(UE)})):t.state<qE&&(t.setState(qE),t.removeClass(VE),t.removeClass(zE),t.removeClass(UE),t.addClass(DE),t.emit(pE))}}]),n}(q_.EventEmitter),YI=new BI("AdsPluginImaAdManager"),KI="xgplayer-ads-playing",XI=function(t){jb(o,t);var e,n,r,i=zb(o);function o(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Rb(this,o),Db(Hb(t=i.call(this,e)),"_onMediaEnded",(function(){var e;t.isLinearAdRunning||(t._isMediaEnded=!0,null===(e=t.adsLoader)||void 0===e||e.contentComplete())})),Db(Hb(t),"_onMediaResize",(function(){var e,n=Hb(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)})),Db(Hb(t),"_onMediaPlay",(function(){t._mediaPlayed=!0})),Db(Hb(t),"_onMediaPause",(function(){t._mediaPlayed=!1})),Db(Hb(t),"_onMediaVolumeChange",(function(){var e;null===(e=t.adsManager)||void 0===e||e.setVolume(t.player.muted?0:t.player.volume)})),Db(Hb(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);YI.log("AdManager Loaded",r);var i=r.getCuePoints();i.length&&YI.log("cuePoints",i),t._initAdsManagerEventListeners(),t.player.emit(wh,{adsManager:r})})),Db(Hb(t),"_onAdsManagerAdError",(function(e){t._handleAdError(e.getError()),t._resumeContent()})),Db(Hb(t),"_onAdsLoaderAdError",(function(e){t._handleAdError(e.getError())})),Db(Hb(t),"_handleAdError",(function(e){var n,r,i;YI.log("AdError",e),t.shouldBlockVideoContent=!1,t.isLinearAdRunning=!1,null===(n=t.adsManager)||void 0===n||n.destroy(),null===(r=t.plugin)||void 0===r||r.emit(kh,e),null===(i=t.plugin)||void 0===i||i.emit(gh,e)})),Db(Hb(t),"onAdEvent",(function(e){var n,r=Hb(t).player,i=null==e?void 0:e.getAd(),o=(null==e?void 0:e.getAdData())||(null==i?void 0:i.data),a=!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 s=(o||{}).adPodInfo,u=0===(null==s?void 0:s.podIndex);a=!0,u&&(i.isLinear()?t.shouldBlockVideoContent=!0:(t.shouldBlockVideoContent=!1,t.tryContentPlay())),t.emit(Ah,{ad:i,isPreroll:u}),t.plugin.emit(Ah,{ad:i,isPreroll:u});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,tE.addClass(t.player.root,KI),null==r||r.pause(),t.emit(Eh,{ad:i});break;case google.ima.AdEvent.Type.STARTED:t.plugin.emit(ch,{ad:i}),i.isLinear()&&(t._isAdPaused=!1,t.plugin.emit(fh,{ad:i}),n=Uk((function(){}),300));break;case google.ima.AdEvent.Type.RESUMED:t._isAdPaused=!1,t.plugin.emit(fh,{ad:i});break;case google.ima.AdEvent.Type.PAUSED:t._isAdPaused=!0,t.plugin.emit(hh,{ad:i});break;case google.ima.AdEvent.Type.SKIPPED:t.plugin.emit(dh,{ad:i});break;case google.ima.AdEvent.Type.AD_PROGRESS:var l=e.getAdData(),c=l.currentTime,f=l.duration;C_(t.context,{currentTime:c,duration:f}),t.plugin.emit(ph,{ad:i});break;case google.ima.AdEvent.Type.COMPLETE:var h=(o||{}).adPodInfo,p=!1;null!=i&&i.isLinear()&&(h&&(p=h.adPosition<h.totalAds),clearInterval(n)),t.plugin.emit(_h,{ad:i,hasNextInPod:p}),t.plugin.emit(vh,{ad:i,hasNextInPod:p});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(yh,{ad:i});break;default:null!=i&&i.isLinear()&&clearInterval(n)}YI.log("AdEvent",null==e?void 0:e.type,a?Lh((null==e?void 0:e.getAdData())||{}):null==e?void 0:e.getAd())})),t.displayContainer=null,t.adsLoader=null,t.adsManager=null,t}return Bb(o,[{key:"init",value:(r=Pb(Lb().mark((function t(){return Lb().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.shouldBlockVideoContent=!!(this.config.adTagUrl||this.config.adsResponse||this.config.adsRequest),t.prev=1,this.emit(mh),t.next=5,this._loadIMASdk();case 5:this.emit("ima_sdk_load_success"),t.next=14;break;case 8:return t.prev=8,t.t0=t.catch(1),YI.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(bh),this.shouldBlockVideoContent=!1,t.abrupt("return");case 14:this._initConfig(),this._initMediaEvents(),this._initContainer(),this._initLoader(),this._initAdsRequest();case 19:case"end":return t.stop()}}),t,this,[[1,8]])}))),function(){return r.apply(this,arguments)})},{key:"destroy",value:function(){Vb(Nb(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 Tm((function(e,n){if("undefined"!=typeof google&&google.ima)e();else{var r=document.createElement("script"),i=Bk((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(dE,this._onMediaResize),t.on(aE,this._onMediaEnded),t.on(oE,this._onMediaPlay),t.on(sE,this._onMediaPause),t.on(fE,this._onMediaVolumeChange)}},{key:"_removeMediaEvents",value:function(){var t=this.player;t.off(dE,this._onMediaResize),t.off(aE,this._onMediaEnded),t.off(oE,this._onMediaPlay),t.off(sE,this._onMediaPause),t.off(fE,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=Pb(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(wh,(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(kh,(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,tE.removeClass(this.player.root,KI),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(),tE.removeClass(this.player.root,KI)}},{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"===Ob(n)){var s;lp(s=Vh(n)).call(s,(function(t){a[t]=n[t]}))}YI.log("requestAds",Lh(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){Vb(Nb(o.prototype),"updateConfig",this).call(this,t),this._initConfig()}},{key:"_checkAutoplaySupport",value:(e=Pb(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,Tm.all([e?qI.video({timeout:800}).then((function(t){return t.result})):Tm.resolve(!1),e&&this.player.config.autoplayMuted?qI.video({timeout:800,muted:!0}).then((function(t){return t.result})):Tm.resolve(!1)]);case 4:n=t.sent,r=qb(n,2),i=r[0],o=r[1],this.autoplayAllowed=i||o,this.autoplayRequiresMuted=!i&&o,YI.log("checkAutoplaySupport",this.autoplayAllowed,this.autoplayRequiresMuted);case 11:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})}]),o}(WI),$I="xgplayer-ad-start",JI="xgplayer-ad-show-ui",QI=function(t){jb(n,t);var e=zb(n);function n(){var t,r;Rb(this,n);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return Db(Hb(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 Bb(n,[{key:"getAdPlugin",value:function(){return this.player.getPlugin("ad")}},{key:"listenEvents",value:function(){var t=this;this.on([hh],(function(){t.animate(!0)})),this.on(fh,(function(){t.animate(!1)}))}}],[{key:"pluginName",get:function(){return"adPlay"}}]),n}(uT),ZI=function(t){jb(n,t);var e=zb(n);function n(){return Rb(this,n),e.apply(this,arguments)}return Bb(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(){C_(this.config,{isCloseClickSeek:!0,isDraggingSeek:!0,closeMoveSeek:!0}),Vb(Nb(n.prototype),"afterCreate",this).call(this)}},{key:"listenEvents",value:function(){var t=this;this.on(ph,(function(){t.onTimeupdate()}))}}],[{key:"pluginName",get:function(){return"adProgress"}}]),n}(aT),tP=function(t){jb(n,t);var e=zb(n);function n(){return Rb(this,n),e.apply(this,arguments)}return Bb(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([ph],(function(e){t.onTimeUpdate()}))}}],[{key:"pluginName",get:function(){return"adTime"}}]),n}(dT),eP=function(){function t(e,n){Rb(this,t);var r=n.player,i=n.plugin;this.player=r,this.config=e,this.adPlugin=i,this.adUIPlugins=[],this.fragment=document.createDocumentFragment(),this.controlsPos=null,this.decoratedAdPluginList=[[uT,QI],[dT,tP],[aT,ZI],[mT,null],[Jx,null],[pT,null]],this.init(),this.initEvents()}return Bb(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=qb(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:"destroy",value:function(){this.fragment=null,this.adUIPlugins=[],this.decoratedAdPluginList=[],this.adPlugin=null,this.player=null}},{key:"initEvents",value:function(){var t=this,e=this.adPlugin,n=this.player;e.on(fh,(function(){var t=[zE,BE,jE,FE,HE,NE];lp(t).call(t,(function(t){n.removeClass(t)}))})),e.on(ch,(function(){t.showAdContainer()})),e.on(vh,(function(e){e.hasNextInPod||t.hideAdContainer()})),e.on(dh,(function(){t.hideAdContainer()})),e.on(gh,(function(){t.hideAdContainer()}))}},{key:"showAdContainer",value:function(){var t=this.player;tE.hasClass(t.root,$I)||tE.addClass(t.root,$I)}},{key:"hideAdContainer",value:function(){var t=this.player;tE.hasClass(t.root,$I)&&tE.removeClass(t.root,$I)}},{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=qb(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__=tE.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(),this.showAdContainer(),e.addClass(JI)}},{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=qb(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(){Bk((function(){s.config.disableAnimate=u,s.config.disableAnimate=l}),10)}))}n.removeClass(JI)}},{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=qb(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===nw(r).call(r,t.pluginName.toLowerCase())}))}}]),t}(),nP=new BI("AdsPlugin"),rP=function(t){jb(n,t);var e=zb(n);function n(){return Rb(this,n),e.apply(this,arguments)}return Bb(n,[{key:"version",get:function(){return"3.0.20-alpha.8"}},{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;nP.log("plugin afterCreate, config: ".concat(Lh(t||{}))),this.csManager=void 0,this._blockContentPlay()}},{key:"beforePlayerInit",value:function(){var t,e,n;switch(nP.log("plugin beforePlayerInit"),this.initPromise=((n=new Tm((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 eP(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 tE.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 XI({plugin:this,config:this.config.ima,displayContainer:this.root}),this.csManager.once(mh,(function(){t.uiManager.showAdContainer()})),this.csManager.on(bh,(function(){t.uiManager.hideAdContainer()})),this.csManager.once(Ah,(function(e){e.isPreroll||t.uiManager.hideAdContainer()})),this.csManager.once(Ch,(function(){var e;null===(e=t.initPromise)||void 0===e||e.resolve()})),this.csManager.on(Eh,(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,e;this.offAll(),null===(t=this.csManager)||void 0===t||t.destroy(),null===(e=this.uiManager)||void 0===e||e.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&&(nP.log("block content play"),e.pause())}))}}],[{key:"pluginName",get:function(){return"ad"}}]),n}(RE);function iP(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 oP(t,e){var n=void 0!==cc&&Nh(t)||t["@@iterator"];if(!n){if(sb(t)||(n=function(t,e){var n;if(t){if("string"==typeof t)return iP(t,e);var r=tb(n=Object.prototype.toString.call(t)).call(n,8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Tb(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?iP(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 aP={},sP={},uP={};!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 f_([]).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}}(uP),xp(sP,"__esModule",{value:!0}),sP.parseDescriptor=sP.SegmentationMessage=void 0;var lP,cP,fP=uP;(cP=lP||(sP.SegmentationMessage=lP={}))[cP.RESTRICT_GROUP_0=0]="RESTRICT_GROUP_0",cP[cP.RESTRICT_GROUP_1=1]="RESTRICT_GROUP_1",cP[cP.RESTRICT_GROUP_2=2]="RESTRICT_GROUP_2",cP[cP.NONE=3]="NONE";sP.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=fP.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 hP=n(nt.Symbol.for),pP=h,dP=Q,gP=Vn,vP=Kn,yP=Zh,mP=Math.min,bP=[].lastIndexOf,wP=!!bP&&1/[1].lastIndexOf(1,-0)<0,_P=yP("lastIndexOf"),kP=wP||!_P?function(t){if(wP)return pP(bP,this,arguments)||0;var e=dP(this),n=vP(e),r=n-1;for(arguments.length>1&&(r=mP(r,gP(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}:bP;Ln({target:"Array",proto:!0,forced:kP!==[].lastIndexOf},{lastIndexOf:kP});var AP=af("Array").lastIndexOf,EP=ut,TP=AP,CP=Array.prototype,SP=n((function(t){var e=t.lastIndexOf;return t===CP||EP(CP,t)&&e===CP.lastIndexOf?TP:e})),xP=$t,MP=ai,LP=Kn,OP=bw,IP=Math.min,PP=[].copyWithin||function(t,e){var n=xP(this),r=LP(n),i=MP(t,r),o=MP(e,r),a=arguments.length>2?arguments[2]:void 0,s=IP((void 0===a?r:MP(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]:OP(n,i),i+=u,o+=u;return n};Ln({target:"Array",proto:!0},{copyWithin:PP});for(var RP=af("Array").copyWithin,UP=ut,BP=RP,DP=Array.prototype,jP=n((function(t){var e=t.copyWithin;return t===DP||UP(DP,t)&&e===DP.copyWithin?BP:e})),NP={},FP={byteLength:function(t){var e=WP(t),n=e[0],r=e[1];return 3*(n+r)/4-r},toByteArray:function(t){var e,n,r=WP(t),i=r[0],o=r[1],a=new VP(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=zP[t.charCodeAt(n)]<<18|zP[t.charCodeAt(n+1)]<<12|zP[t.charCodeAt(n+2)]<<6|zP[t.charCodeAt(n+3)],a[s++]=e>>16&255,a[s++]=e>>8&255,a[s++]=255&e;2===o&&(e=zP[t.charCodeAt(n)]<<2|zP[t.charCodeAt(n+1)]>>4,a[s++]=255&e);1===o&&(e=zP[t.charCodeAt(n)]<<10|zP[t.charCodeAt(n+1)]<<4|zP[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(YP(t,a,a+o>s?s:a+o));1===r?(e=t[n-1],i.push(HP[e>>2]+HP[e<<4&63]+"==")):2===r&&(e=(t[n-2]<<8)+t[n-1],i.push(HP[e>>10]+HP[e>>4&63]+HP[e<<2&63]+"="));return i.join("")}},HP=[],zP=[],VP="undefined"!=typeof Uint8Array?Uint8Array:Array,qP="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",GP=0;GP<64;++GP)HP[GP]=qP[GP],zP[qP.charCodeAt(GP)]=GP;function WP(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=nw(t).call(t,"=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function YP(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(HP[(i=r)>>18&63]+HP[i>>12&63]+HP[i>>6&63]+HP[63&i]);return o.join("")}zP["-".charCodeAt(0)]=62,zP["_".charCodeAt(0)]=63;var KP={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=FP,r=KP,i="function"==typeof Oh&&"function"==typeof hP?hP("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=eb(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 "+Lc(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&&ub(t.data))return f(t.data)}(t);if(i)return i;if(void 0!==Oh&&null!=Sb&&"function"==typeof t[Sb])return s.from(t[Sb]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+Lc(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 '+Lc(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 W(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 M(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 E(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(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 nw(Uint8Array.prototype)?i?nw(Uint8Array.prototype).call(t,e,n):SP(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=o_(e.substr(2*o,2),16);if(X(s))return o;t[n+o]=s}return o}function w(t,e,n,r){return Y(G(e,t.length-n),t,n,r)}function _(t,e,n,r){return Y(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 Y(W(e),t,n,r)}function A(t,e,n,r){return Y(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 E(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(eb(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,eb(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?LM(r=a(t)).call(r,e,n):LM(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(!ub(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=uA(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 '+Lc(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=eb(this).call(this,r,i),c=eb(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!==nw(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 A(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:eb(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 M(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 L(t,e,n){for(var r=eb(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 jP(Uint8Array.prototype)?jP(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(eb(t).call(t,r-3,r))).call(o,n)}return lh(e="".concat(eb(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,Lc(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 aM(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 W(t){return n.toByteArray(function(t){if(t=t.split("=")[0],(t=uA(t).call(t).replace(q,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Y(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")}})(NP),xp(aP,"__esModule",{value:!0});var XP=aP.SCTE35=void 0,$P=sP,JP=uP,QP=NP,ZP=function(){function e(){t(this,e),this.buffer=QP.Buffer}return Uc(e,[{key:"parseFromB64",value:function(t){var e,n=Uint8Array.from(f_(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(f_(e).call(e,(function(t){return o_(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?JP.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?JP.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?JP.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=$P.parseDescriptor(g);d-=v.descriptorLength+2,r+=v.descriptorLength+2,e.descriptors.push(v)}}catch(oR){var y;console.error(lh(y="scte35-js Error reading descriptor @ ".concat(r,", ignoring remaining bytes: ")).call(y,d," in loop.")),console.error(oR),r+=d,d=0}}return e.crc=n.getUint32(r),(r+=4)!==n.byteLength&&console.error("scte35-js Bad SCTE35 read - remaining data: ".concat(eb(t).call(t,r).join(", "))),e}}]),e}();XP=aP.SCTE35=ZP;var tR="SCTE35-OUT",eR="START-DATE",nR="PLANNED-DURATION";var rR=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,"_activeAdBreak",void 0),ih(this,"_activeAdBreakStatus","WAITING_PREROLL"),ih(this,"_scte35",new XP),ih(this,"_scte35ResultMap",new hI),ih(this,"_handleTimeUpdate",(function(){var t,e,n,i;if(r._tryToPlayAd(),null!==(t=r._adBreakCues)&&void 0!==t&&t.length)for(var o=0;o<r._adBreakCues.length;o++){var a=r._adBreakCues[o];if(a.startTime>=r._player.currentTime){e=a;break}}e&&((null===(n=r._activeAdBreak)||void 0===n?void 0:n.id)===e.id&&(null===(i=r._activeAdBreak)||void 0===i?void 0:i.startTime)!==e.startTime&&r._changeActiveAdBreakStatus(void 0,e),r._tryToRequestAd(e))})),ih(this,"_onReady",(function(){r._changeActiveAdBreakStatus("READY"),r._player.off(kh,r._onReady),r._adManager.off(yh,r._onReady),r._player.on(lE,r._handleTimeUpdate),r._player.on(_h,r._onAdComplete),r._player.on(kh,r._onAdError),r._handleTimeUpdate()})),ih(this,"_onAdComplete",(function(){r._changeActiveAdBreakStatus("COMPLETE")})),ih(this,"_onAdError",(function(){r._changeActiveAdBreakStatus("ERROR")})),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&&0===r._player.currentTime){var o,a=oP(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=WA(u=LI(l).call(l,(function(t,e){var i=n.dateRanges[e];if(function(t){return!!(t[tR]&&t[eR]&&t[nR])}(i)){var o=r._getScte35Result(i[tR]);5===(null==o?void 0:o.spliceCommandType)&&t.push({data:o,id:i.ID,startTime:(new Date(i[eR]).getTime()-r._startTime)/1e3,duration:Zk(i[nR]||"0"),startDate:i[eR]})}return t}),[])).call(u,(function(t,e){return t.startTime-e.startTime}))}}})),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(){this._player.off("core_event",this._handleHlsCoreEvent),this._player.off(lE,this._handleTimeUpdate),this._player.off(_h,this._onAdComplete),this._player.off(kh,this._onAdError)}},{key:"_init",value:function(){this._player.on("core_event",this._handleHlsCoreEvent);var t=this._adManager.config,e=t.adsRequest,n=t.adsResponse,r=t.adTagUrl;e||n||r?(this._player.once(kh,this._onReady),this._player.once(yh,this._onReady)):this._onReady()}},{key:"_changeActiveAdBreakStatus",value:function(t,e){var n,r;t&&(this._activeAdBreakStatus=t),e&&(this._activeAdBreak=e),console.log(lh(n=lh(r="Update adbreak status, status: ".concat(this._activeAdBreakStatus,", player start time: ")).call(r,this._startTime,", player current time: ")).call(n,this._player.currentTime),this._activeAdBreak)}},{key:"_canRequestAd",value:function(t){return"WAITING_PREROLL"!==this._activeAdBreakStatus&&(!!t&&(!this._activeAdBreak||t.id!==this._activeAdBreak.id&&("COMPLETE"===this._activeAdBreakStatus||"ERROR"===this._activeAdBreakStatus||"REQUESTED"===this._activeAdBreakStatus)))}},{key:"_canPlayAd",value:function(){return!(!this._activeAdBreak||"REQUESTED"!==this._activeAdBreakStatus||this._activeAdBreak.startTime>this._player.currentTime)}},{key:"_tryToRequestAd",value:function(t){this._canRequestAd(t)&&(this._changeActiveAdBreakStatus("REQUESTED",t),this._adManager.reset(),this._adManager.updateConfig({adTagUrl:this._adTagUrl}),this._adManager.requestAds())}},{key:"_tryToPlayAd",value:function(){this._canPlayAd()&&(this._changeActiveAdBreakStatus("STARTED"),this._adManager.playAds())}},{key:"_getScte35Result",value:function(t){if(!this._scte35ResultMap.has(t))try{this._scte35ResultMap.set(t,this._scte35.parseFromHex(t))}catch(e){}if(!this._scte35ResultMap.has(t))try{this._scte35ResultMap.set(t,this._scte35.parseFromB64(t))}catch(e){}return this._scte35ResultMap.get(t)}}]),e}();var iR=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),"_handlePrerollMuted",(function(t){var e,n;(function(t){var e;return 0===(null==t||null===(e=t.getAdPodInfo())||void 0===e?void 0:e.getTimeOffset())})(t.ad)&&(null===(e=i.player.plugins.autoplayplugin)||void 0===e||null===(n=e.handleAutoplayStart)||void 0===n||n.call(e),i.player.once(fE,(function(){var t,e;null===(t=i.player.plugins.autoplayplugin)||void 0===t||null===(e=t.initState)||void 0===e||e.call(t)})))})),i}return Uc(r,[{key:"afterCreate",value:function(){Of(Lf(r.prototype),"afterCreate",this).call(this),this._init()}},{key:"beforePlayerInit",value:function(){var t,e=Of(Lf(r.prototype),"beforePlayerInit",this).call(this);return this.config.enableSCTE35&&null!==(t=this.config.ima)&&void 0!==t&&t.adTagUrlForSCTE35&&(this._scte35Manager=new rR({player:this.player,adTagUrl:this.config.ima.adTagUrlForSCTE35,adManager:this.csManager})),e}},{key:"destroy",value:function(){var t;Of(Lf(r.prototype),"destroy",this).call(this),null===(t=this._scte35Manager)||void 0===t||t.destroy(),this._scte35Manager=void 0}},{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,n;if(t&&t.length){var r=document.implementation.createDocument("http://www.iab.net/videosuite/vmap","vmap:VMAP"),i=r.getElementsByTagName("vmap:VMAP");i[0].setAttribute("version","1.0");var o,a=0,s=0;return lp(e=WA(n=$h(t).call(t,(function(t){var e=t.offset;return"pre"===e||"post"===e||/^(\d\d):([0-5]\d):([0-5]\d)(.\d\d\d)?$/.test(e)}))).call(n,(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,n,u,l=t.offset,c=t.type,f=t.tag;switch(l){case"pre":n="start",u="preroll";break;case"post":n="end",u="postroll";break;default:n=l,o!==l?(o=l,s=1,u="midroll-".concat(++a)):(s++,u="midroll-".concat(a))}var h=r.createElement("vmap:AdBreak");h.setAttribute("timeOffset",n),h.setAttribute("breakId",u),h.setAttribute("breakType",c||"linear"),i[0].appendChild(h);var p=r.createElement("vmap:AdSource");p.setAttribute("id",lh(e="".concat(u,"-ad-")).call(e,s)),p.setAttribute("allowMultipleAds","true"),p.setAttribute("followRedirects","true"),h.appendChild(p);var d=r.createElement("vmap:AdTagURI");d.setAttribute("templateType","vast3"),p.appendChild(d),d.innerHTML="<![CDATA[ ".concat(f," ]]>")})),(new XMLSerializer).serializeToString(r)}}(this.config.ima.schedule)),this.player.once(fh,this._handlePrerollMuted)}}],[{key:"pluginName",get:function(){return"ad"}}]),r}(rP);return iR}));