libpgs
Version:
Renderer for graphical subtitles (PGS) in the browser.
1 lines • 57.4 kB
JavaScript
var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=function(t){return t&&t.Math===Math&&t},r=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof t&&t)||e("object"==typeof t&&t)||function(){return this}()||Function("return this")(),n={},i=function(t){try{return!!t()}catch(t){return!0}},o=!i((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),a=!i((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),s=a,u=Function.prototype.call,c=s?u.bind(u):function(){return u.apply(u,arguments)},f={},h={}.propertyIsEnumerable,p=Object.getOwnPropertyDescriptor,l=p&&!h.call({1:2},1);f.f=l?function(t){var e=p(this,t);return!!e&&e.enumerable}:h;var d,y,v=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},b=a,g=Function.prototype,m=g.call,w=b&&g.bind.bind(m,m),S=b?w:function(t){return function(){return m.apply(t,arguments)}},O=S,T=O({}.toString),P=O("".slice),j=function(t){return P(T(t),8,-1)},A=i,E=j,I=Object,x=S("".split),R=A((function(){return!I("z").propertyIsEnumerable(0)}))?function(t){return"String"===E(t)?x(t,""):I(t)}:I,U=function(t){return null==t},D=U,B=TypeError,C=function(t){if(D(t))throw new B("Can't call method on "+t);return t},_=R,F=C,L=function(t){return _(F(t))},k="object"==typeof document&&document.all,N=void 0===k&&void 0!==k?function(t){return"function"==typeof t||t===k}:function(t){return"function"==typeof t},M=N,q=function(t){return"object"==typeof t?null!==t:M(t)},H=r,G=N,z=function(t,e){return arguments.length<2?(r=H[t],G(r)?r:void 0):H[t]&&H[t][e];var r},$=S({}.isPrototypeOf),V=r.navigator,W=V&&V.userAgent,X=W?String(W):"",J=r,Y=X,K=J.process,Z=J.Deno,Q=K&&K.versions||Z&&Z.version,tt=Q&&Q.v8;tt&&(y=(d=tt.split("."))[0]>0&&d[0]<4?1:+(d[0]+d[1])),!y&&Y&&(!(d=Y.match(/Edge\/(\d+)/))||d[1]>=74)&&(d=Y.match(/Chrome\/(\d+)/))&&(y=+d[1]);var et=y,rt=et,nt=i,it=r.String,ot=!!Object.getOwnPropertySymbols&&!nt((function(){var t=Symbol("symbol detection");return!it(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&rt&&rt<41})),at=ot&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,st=z,ut=N,ct=$,ft=Object,ht=at?function(t){return"symbol"==typeof t}:function(t){var e=st("Symbol");return ut(e)&&ct(e.prototype,ft(t))},pt=String,lt=function(t){try{return pt(t)}catch(t){return"Object"}},dt=N,yt=lt,vt=TypeError,bt=function(t){if(dt(t))return t;throw new vt(yt(t)+" is not a function")},gt=bt,mt=U,wt=function(t,e){var r=t[e];return mt(r)?void 0:gt(r)},St=c,Ot=N,Tt=q,Pt=TypeError,jt={exports:{}},At=r,Et=Object.defineProperty,It=function(t,e){try{Et(At,t,{value:e,configurable:!0,writable:!0})}catch(r){At[t]=e}return e},xt=r,Rt=It,Ut="__core-js_shared__",Dt=jt.exports=xt[Ut]||Rt(Ut,{});(Dt.versions||(Dt.versions=[])).push({version:"3.38.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Bt=jt.exports,Ct=Bt,_t=function(t,e){return Ct[t]||(Ct[t]=e||{})},Ft=C,Lt=Object,kt=function(t){return Lt(Ft(t))},Nt=kt,Mt=S({}.hasOwnProperty),qt=Object.hasOwn||function(t,e){return Mt(Nt(t),e)},Ht=S,Gt=0,zt=Math.random(),$t=Ht(1..toString),Vt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+$t(++Gt+zt,36)},Wt=_t,Xt=qt,Jt=Vt,Yt=ot,Kt=at,Zt=r.Symbol,Qt=Wt("wks"),te=Kt?Zt.for||Zt:Zt&&Zt.withoutSetter||Jt,ee=function(t){return Xt(Qt,t)||(Qt[t]=Yt&&Xt(Zt,t)?Zt[t]:te("Symbol."+t)),Qt[t]},re=c,ne=q,ie=ht,oe=wt,ae=function(t,e){var r,n;if("string"===e&&Ot(r=t.toString)&&!Tt(n=St(r,t)))return n;if(Ot(r=t.valueOf)&&!Tt(n=St(r,t)))return n;if("string"!==e&&Ot(r=t.toString)&&!Tt(n=St(r,t)))return n;throw new Pt("Can't convert object to primitive value")},se=TypeError,ue=ee("toPrimitive"),ce=function(t,e){if(!ne(t)||ie(t))return t;var r,n=oe(t,ue);if(n){if(void 0===e&&(e="default"),r=re(n,t,e),!ne(r)||ie(r))return r;throw new se("Can't convert object to primitive value")}return void 0===e&&(e="number"),ae(t,e)},fe=ht,he=function(t){var e=ce(t,"string");return fe(e)?e:e+""},pe=q,le=r.document,de=pe(le)&&pe(le.createElement),ye=function(t){return de?le.createElement(t):{}},ve=ye,be=!o&&!i((function(){return 7!==Object.defineProperty(ve("div"),"a",{get:function(){return 7}}).a})),ge=o,me=c,we=f,Se=v,Oe=L,Te=he,Pe=qt,je=be,Ae=Object.getOwnPropertyDescriptor;n.f=ge?Ae:function(t,e){if(t=Oe(t),e=Te(e),je)try{return Ae(t,e)}catch(t){}if(Pe(t,e))return Se(!me(we.f,t,e),t[e])};var Ee={},Ie=o&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),xe=q,Re=String,Ue=TypeError,De=function(t){if(xe(t))return t;throw new Ue(Re(t)+" is not an object")},Be=o,Ce=be,_e=Ie,Fe=De,Le=he,ke=TypeError,Ne=Object.defineProperty,Me=Object.getOwnPropertyDescriptor,qe="enumerable",He="configurable",Ge="writable";Ee.f=Be?_e?function(t,e,r){if(Fe(t),e=Le(e),Fe(r),"function"==typeof t&&"prototype"===e&&"value"in r&&Ge in r&&!r[Ge]){var n=Me(t,e);n&&n[Ge]&&(t[e]=r.value,r={configurable:He in r?r[He]:n[He],enumerable:qe in r?r[qe]:n[qe],writable:!1})}return Ne(t,e,r)}:Ne:function(t,e,r){if(Fe(t),e=Le(e),Fe(r),Ce)try{return Ne(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new ke("Accessors not supported");return"value"in r&&(t[e]=r.value),t};var ze=Ee,$e=v,Ve=o?function(t,e,r){return ze.f(t,e,$e(1,r))}:function(t,e,r){return t[e]=r,t},We={exports:{}},Xe=o,Je=qt,Ye=Function.prototype,Ke=Xe&&Object.getOwnPropertyDescriptor,Ze=Je(Ye,"name"),Qe={EXISTS:Ze,PROPER:Ze&&"something"===function(){}.name,CONFIGURABLE:Ze&&(!Xe||Xe&&Ke(Ye,"name").configurable)},tr=N,er=Bt,rr=S(Function.toString);tr(er.inspectSource)||(er.inspectSource=function(t){return rr(t)});var nr,ir,or,ar=er.inspectSource,sr=N,ur=r.WeakMap,cr=sr(ur)&&/native code/.test(String(ur)),fr=Vt,hr=_t("keys"),pr=function(t){return hr[t]||(hr[t]=fr(t))},lr={},dr=cr,yr=r,vr=q,br=Ve,gr=qt,mr=Bt,wr=pr,Sr=lr,Or="Object already initialized",Tr=yr.TypeError,Pr=yr.WeakMap;if(dr||mr.state){var jr=mr.state||(mr.state=new Pr);jr.get=jr.get,jr.has=jr.has,jr.set=jr.set,nr=function(t,e){if(jr.has(t))throw new Tr(Or);return e.facade=t,jr.set(t,e),e},ir=function(t){return jr.get(t)||{}},or=function(t){return jr.has(t)}}else{var Ar=wr("state");Sr[Ar]=!0,nr=function(t,e){if(gr(t,Ar))throw new Tr(Or);return e.facade=t,br(t,Ar,e),e},ir=function(t){return gr(t,Ar)?t[Ar]:{}},or=function(t){return gr(t,Ar)}}var Er={set:nr,get:ir,has:or,enforce:function(t){return or(t)?ir(t):nr(t,{})},getterFor:function(t){return function(e){var r;if(!vr(e)||(r=ir(e)).type!==t)throw new Tr("Incompatible receiver, "+t+" required");return r}}},Ir=S,xr=i,Rr=N,Ur=qt,Dr=o,Br=Qe.CONFIGURABLE,Cr=ar,_r=Er.enforce,Fr=Er.get,Lr=String,kr=Object.defineProperty,Nr=Ir("".slice),Mr=Ir("".replace),qr=Ir([].join),Hr=Dr&&!xr((function(){return 8!==kr((function(){}),"length",{value:8}).length})),Gr=String(String).split("String"),zr=We.exports=function(t,e,r){"Symbol("===Nr(Lr(e),0,7)&&(e="["+Mr(Lr(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!Ur(t,"name")||Br&&t.name!==e)&&(Dr?kr(t,"name",{value:e,configurable:!0}):t.name=e),Hr&&r&&Ur(r,"arity")&&t.length!==r.arity&&kr(t,"length",{value:r.arity});try{r&&Ur(r,"constructor")&&r.constructor?Dr&&kr(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=_r(t);return Ur(n,"source")||(n.source=qr(Gr,"string"==typeof e?e:"")),t};Function.prototype.toString=zr((function(){return Rr(this)&&Fr(this).source||Cr(this)}),"toString");var $r=We.exports,Vr=N,Wr=Ee,Xr=$r,Jr=It,Yr=function(t,e,r,n){n||(n={});var i=n.enumerable,o=void 0!==n.name?n.name:e;if(Vr(r)&&Xr(r,o,n),n.global)i?t[e]=r:Jr(e,r);else{try{n.unsafe?t[e]&&(i=!0):delete t[e]}catch(t){}i?t[e]=r:Wr.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},Kr={},Zr=Math.ceil,Qr=Math.floor,tn=Math.trunc||function(t){var e=+t;return(e>0?Qr:Zr)(e)},en=function(t){var e=+t;return e!=e||0===e?0:tn(e)},rn=en,nn=Math.max,on=Math.min,an=en,sn=Math.min,un=function(t){var e=an(t);return e>0?sn(e,9007199254740991):0},cn=function(t){return un(t.length)},fn=L,hn=function(t,e){var r=rn(t);return r<0?nn(r+e,0):on(r,e)},pn=cn,ln=function(t){return function(e,r,n){var i=fn(e),o=pn(i);if(0===o)return!t&&-1;var a,s=hn(n,o);if(t&&r!=r){for(;o>s;)if((a=i[s++])!=a)return!0}else for(;o>s;s++)if((t||s in i)&&i[s]===r)return t||s||0;return!t&&-1}},dn={includes:ln(!0),indexOf:ln(!1)},yn=qt,vn=L,bn=dn.indexOf,gn=lr,mn=S([].push),wn=function(t,e){var r,n=vn(t),i=0,o=[];for(r in n)!yn(gn,r)&&yn(n,r)&&mn(o,r);for(;e.length>i;)yn(n,r=e[i++])&&(~bn(o,r)||mn(o,r));return o},Sn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],On=wn,Tn=Sn.concat("length","prototype");Kr.f=Object.getOwnPropertyNames||function(t){return On(t,Tn)};var Pn={};Pn.f=Object.getOwnPropertySymbols;var jn=z,An=Kr,En=Pn,In=De,xn=S([].concat),Rn=jn("Reflect","ownKeys")||function(t){var e=An.f(In(t)),r=En.f;return r?xn(e,r(t)):e},Un=qt,Dn=Rn,Bn=n,Cn=Ee,_n=function(t,e,r){for(var n=Dn(e),i=Cn.f,o=Bn.f,a=0;a<n.length;a++){var s=n[a];Un(t,s)||r&&Un(r,s)||i(t,s,o(e,s))}},Fn=i,Ln=N,kn=/#|\.prototype\./,Nn=function(t,e){var r=qn[Mn(t)];return r===Gn||r!==Hn&&(Ln(e)?Fn(e):!!e)},Mn=Nn.normalize=function(t){return String(t).replace(kn,".").toLowerCase()},qn=Nn.data={},Hn=Nn.NATIVE="N",Gn=Nn.POLYFILL="P",zn=Nn,$n=r,Vn=n.f,Wn=Ve,Xn=Yr,Jn=It,Yn=_n,Kn=zn,Zn=function(t,e){var r,n,i,o,a,s=t.target,u=t.global,c=t.stat;if(r=u?$n:c?$n[s]||Jn(s,{}):$n[s]&&$n[s].prototype)for(n in e){if(o=e[n],i=t.dontCallGetSet?(a=Vn(r,n))&&a.value:r[n],!Kn(u?n:s+(c?".":"#")+n,t.forced)&&void 0!==i){if(typeof o==typeof i)continue;Yn(o,i)}(t.sham||i&&i.sham)&&Wn(o,"sham",!0),Xn(r,n,o,t)}},Qn=j,ti=S,ei=function(t){if("Function"===Qn(t))return ti(t)},ri=bt,ni=a,ii=ei(ei.bind),oi=function(t,e){return ri(t),void 0===e?t:ni?ii(t,e):function(){return t.apply(e,arguments)}},ai=j,si=Array.isArray||function(t){return"Array"===ai(t)},ui={};ui[ee("toStringTag")]="z";var ci="[object z]"===String(ui),fi=ci,hi=N,pi=j,li=ee("toStringTag"),di=Object,yi="Arguments"===pi(function(){return arguments}()),vi=fi?pi:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=di(t),li))?r:yi?pi(e):"Object"===(n=pi(e))&&hi(e.callee)?"Arguments":n},bi=S,gi=i,mi=N,wi=vi,Si=ar,Oi=function(){},Ti=z("Reflect","construct"),Pi=/^\s*(?:class|function)\b/,ji=bi(Pi.exec),Ai=!Pi.test(Oi),Ei=function(t){if(!mi(t))return!1;try{return Ti(Oi,[],t),!0}catch(t){return!1}},Ii=function(t){if(!mi(t))return!1;switch(wi(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Ai||!!ji(Pi,Si(t))}catch(t){return!0}};Ii.sham=!0;var xi=!Ti||gi((function(){var t;return Ei(Ei.call)||!Ei(Object)||!Ei((function(){t=!0}))||t}))?Ii:Ei,Ri=si,Ui=xi,Di=q,Bi=ee("species"),Ci=Array,_i=function(t){var e;return Ri(t)&&(e=t.constructor,(Ui(e)&&(e===Ci||Ri(e.prototype))||Di(e)&&null===(e=e[Bi]))&&(e=void 0)),void 0===e?Ci:e},Fi=oi,Li=R,ki=kt,Ni=cn,Mi=function(t,e){return new(_i(t))(0===e?0:e)},qi=S([].push),Hi=function(t){var e=1===t,r=2===t,n=3===t,i=4===t,o=6===t,a=7===t,s=5===t||o;return function(u,c,f,h){for(var p,l,d=ki(u),y=Li(d),v=Ni(y),b=Fi(c,f),g=0,m=h||Mi,w=e?m(u,v):r||a?m(u,0):void 0;v>g;g++)if((s||g in y)&&(l=b(p=y[g],g,d),t))if(e)w[g]=l;else if(l)switch(t){case 3:return!0;case 5:return p;case 6:return g;case 2:qi(w,p)}else switch(t){case 4:return!1;case 7:qi(w,p)}return o?-1:n||i?i:w}},Gi={forEach:Hi(0),map:Hi(1),filter:Hi(2),some:Hi(3),every:Hi(4),find:Hi(5),findIndex:Hi(6),filterReject:Hi(7)},zi={},$i=wn,Vi=Sn,Wi=Object.keys||function(t){return $i(t,Vi)},Xi=o,Ji=Ie,Yi=Ee,Ki=De,Zi=L,Qi=Wi;zi.f=Xi&&!Ji?Object.defineProperties:function(t,e){Ki(t);for(var r,n=Zi(e),i=Qi(e),o=i.length,a=0;o>a;)Yi.f(t,r=i[a++],n[r]);return t};var to,eo=z("document","documentElement"),ro=De,no=zi,io=Sn,oo=lr,ao=eo,so=ye,uo="prototype",co="script",fo=pr("IE_PROTO"),ho=function(){},po=function(t){return"<"+co+">"+t+"</"+co+">"},lo=function(t){t.write(po("")),t.close();var e=t.parentWindow.Object;return t=null,e},yo=function(){try{to=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;yo="undefined"!=typeof document?document.domain&&to?lo(to):(e=so("iframe"),r="java"+co+":",e.style.display="none",ao.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(po("document.F=Object")),t.close(),t.F):lo(to);for(var n=io.length;n--;)delete yo[uo][io[n]];return yo()};oo[fo]=!0;var vo=Object.create||function(t,e){var r;return null!==t?(ho[uo]=ro(t),r=new ho,ho[uo]=null,r[fo]=t):r=yo(),void 0===e?r:no.f(r,e)},bo=ee,go=vo,mo=Ee.f,wo=bo("unscopables"),So=Array.prototype;void 0===So[wo]&&mo(So,wo,{configurable:!0,value:go(null)});var Oo=function(t){So[wo][t]=!0},To=Zn,Po=Gi.find,jo=Oo,Ao="find",Eo=!0;Ao in[]&&Array(1)[Ao]((function(){Eo=!1})),To({target:"Array",proto:!0,forced:Eo},{find:function(t){return Po(this,t,arguments.length>1?arguments[1]:void 0)}}),jo(Ao);var Io=r,xo=S;(function(t,e){xo(Io[t].prototype[e])})("Array","find");var Ro=!i((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Uo=qt,Do=N,Bo=kt,Co=Ro,_o=pr("IE_PROTO"),Fo=Object,Lo=Fo.prototype,ko=Co?Fo.getPrototypeOf:function(t){var e=Bo(t);if(Uo(e,_o))return e[_o];var r=e.constructor;return Do(r)&&e instanceof r?r.prototype:e instanceof Fo?Lo:null},No=S,Mo=bt,qo=q,Ho=function(t){return qo(t)||null===t},Go=String,zo=TypeError,$o=function(t,e,r){try{return No(Mo(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}},Vo=q,Wo=C,Xo=function(t){if(Ho(t))return t;throw new zo("Can't set "+Go(t)+" as a prototype")},Jo=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=$o(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return Wo(r),Xo(n),Vo(r)?(e?t(r,n):r.__proto__=n,r):r}}():void 0),Yo=q,Ko=Ve,Zo=Error,Qo=S("".replace),ta=String(new Zo("zxcasd").stack),ea=/\n\s*at [^:]*:[^\n]*/,ra=ea.test(ta),na=v,ia=!i((function(){var t=new Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",na(1,7)),7!==t.stack)})),oa=Ve,aa=function(t,e){if(ra&&"string"==typeof t&&!Zo.prepareStackTrace)for(;e--;)t=Qo(t,ea,"");return t},sa=ia,ua=Error.captureStackTrace,ca={},fa=ca,ha=ee("iterator"),pa=Array.prototype,la=vi,da=wt,ya=U,va=ca,ba=ee("iterator"),ga=function(t){if(!ya(t))return da(t,ba)||da(t,"@@iterator")||va[la(t)]},ma=c,wa=bt,Sa=De,Oa=lt,Ta=ga,Pa=TypeError,ja=c,Aa=De,Ea=wt,Ia=oi,xa=c,Ra=De,Ua=lt,Da=function(t){return void 0!==t&&(fa.Array===t||pa[ha]===t)},Ba=cn,Ca=$,_a=function(t,e){var r=arguments.length<2?Ta(t):e;if(wa(r))return Sa(ma(r,t));throw new Pa(Oa(t)+" is not iterable")},Fa=ga,La=function(t,e,r){var n,i;Aa(t);try{if(!(n=Ea(t,"return"))){if("throw"===e)throw r;return r}n=ja(n,t)}catch(t){i=!0,n=t}if("throw"===e)throw r;if(i)throw n;return Aa(n),r},ka=TypeError,Na=function(t,e){this.stopped=t,this.result=e},Ma=Na.prototype,qa=function(t,e,r){var n,i,o,a,s,u,c,f=r&&r.that,h=!(!r||!r.AS_ENTRIES),p=!(!r||!r.IS_RECORD),l=!(!r||!r.IS_ITERATOR),d=!(!r||!r.INTERRUPTED),y=Ia(e,f),v=function(t){return n&&La(n,"normal",t),new Na(!0,t)},b=function(t){return h?(Ra(t),d?y(t[0],t[1],v):y(t[0],t[1])):d?y(t,v):y(t)};if(p)n=t.iterator;else if(l)n=t;else{if(!(i=Fa(t)))throw new ka(Ua(t)+" is not iterable");if(Da(i)){for(o=0,a=Ba(t);a>o;o++)if((s=b(t[o]))&&Ca(Ma,s))return s;return new Na(!1)}n=_a(t,i)}for(u=p?t.next:n.next;!(c=xa(u,n)).done;){try{s=b(c.value)}catch(t){La(n,"throw",t)}if("object"==typeof s&&s&&Ca(Ma,s))return s}return new Na(!1)},Ha=vi,Ga=String,za=function(t){if("Symbol"===Ha(t))throw new TypeError("Cannot convert a Symbol value to a string");return Ga(t)},$a=za,Va=Zn,Wa=$,Xa=ko,Ja=Jo,Ya=_n,Ka=vo,Za=Ve,Qa=v,ts=function(t,e){Yo(e)&&"cause"in e&&Ko(t,"cause",e.cause)},es=function(t,e,r,n){sa&&(ua?ua(t,e):oa(t,"stack",aa(r,n)))},rs=qa,ns=function(t,e){return void 0===t?arguments.length<2?"":e:$a(t)},is=ee("toStringTag"),os=Error,as=[].push,ss=function(t,e){var r,n=Wa(us,this);Ja?r=Ja(new os,n?Xa(this):us):(r=n?this:Ka(us),Za(r,is,"Error")),void 0!==e&&Za(r,"message",ns(e)),es(r,ss,r.stack,1),arguments.length>2&&ts(r,arguments[2]);var i=[];return rs(t,as,{that:i}),Za(r,"errors",i),r};Ja?Ja(ss,os):Ya(ss,os,{name:!0});var us=ss.prototype=Ka(os.prototype,{constructor:Qa(1,ss),message:Qa(1,""),name:Qa(1,"AggregateError")});Va({global:!0,constructor:!0,arity:2},{AggregateError:ss});var cs,fs,hs,ps=i,ls=N,ds=q,ys=ko,vs=Yr,bs=ee("iterator"),gs=!1;[].keys&&("next"in(hs=[].keys())?(fs=ys(ys(hs)))!==Object.prototype&&(cs=fs):gs=!0);var ms=!ds(cs)||ps((function(){var t={};return cs[bs].call(t)!==t}));ms&&(cs={}),ls(cs[bs])||vs(cs,bs,(function(){return this}));var ws={IteratorPrototype:cs,BUGGY_SAFARI_ITERATORS:gs},Ss=Ee.f,Os=qt,Ts=ee("toStringTag"),Ps=function(t,e,r){t&&!r&&(t=t.prototype),t&&!Os(t,Ts)&&Ss(t,Ts,{configurable:!0,value:e})},js=ws.IteratorPrototype,As=vo,Es=v,Is=Ps,xs=ca,Rs=function(){return this},Us=Zn,Ds=c,Bs=N,Cs=function(t,e,r,n){var i=e+" Iterator";return t.prototype=As(js,{next:Es(+!n,r)}),Is(t,i,!1),xs[i]=Rs,t},_s=ko,Fs=Jo,Ls=Ps,ks=Ve,Ns=Yr,Ms=ca,qs=Qe.PROPER,Hs=Qe.CONFIGURABLE,Gs=ws.IteratorPrototype,zs=ws.BUGGY_SAFARI_ITERATORS,$s=ee("iterator"),Vs="keys",Ws="values",Xs="entries",Js=function(){return this},Ys=function(t,e,r,n,i,o,a){Cs(r,e,n);var s,u,c,f=function(t){if(t===i&&y)return y;if(!zs&&t&&t in l)return l[t];switch(t){case Vs:case Ws:case Xs:return function(){return new r(this,t)}}return function(){return new r(this)}},h=e+" Iterator",p=!1,l=t.prototype,d=l[$s]||l["@@iterator"]||i&&l[i],y=!zs&&d||f(i),v="Array"===e&&l.entries||d;if(v&&(s=_s(v.call(new t)))!==Object.prototype&&s.next&&(_s(s)!==Gs&&(Fs?Fs(s,Gs):Bs(s[$s])||Ns(s,$s,Js)),Ls(s,h,!0)),qs&&i===Ws&&d&&d.name!==Ws&&(Hs?ks(l,"name",Ws):(p=!0,y=function(){return Ds(d,this)})),i)if(u={values:f(Ws),keys:o?y:f(Vs),entries:f(Xs)},a)for(c in u)(zs||p||!(c in l))&&Ns(l,c,u[c]);else Us({target:e,proto:!0,forced:zs||p},u);return l[$s]!==y&&Ns(l,$s,y,{name:i}),Ms[e]=y,u},Ks=function(t,e){return{value:t,done:e}},Zs=L,Qs=Oo,tu=ca,eu=Er,ru=Ee.f,nu=Ys,iu=Ks,ou=o,au="Array Iterator",su=eu.set,uu=eu.getterFor(au),cu=nu(Array,"Array",(function(t,e){su(this,{type:au,target:Zs(t),index:0,kind:e})}),(function(){var t=uu(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,iu(void 0,!0);switch(t.kind){case"keys":return iu(r,!1);case"values":return iu(e[r],!1)}return iu([r,e[r]],!1)}),"values"),fu=tu.Arguments=tu.Array;if(Qs("keys"),Qs("values"),Qs("entries"),ou&&"values"!==fu.name)try{ru(fu,"name",{value:"values"})}catch(t){}var hu=vi,pu=ci?{}.toString:function(){return"[object "+hu(this)+"]"};ci||Yr(Object.prototype,"toString",pu,{unsafe:!0});var lu,du,yu,vu,bu=r,gu=X,mu=j,wu=function(t){return gu.slice(0,t.length)===t},Su=wu("Bun/")?"BUN":wu("Cloudflare-Workers")?"CLOUDFLARE":wu("Deno/")?"DENO":wu("Node.js/")?"NODE":bu.Bun&&"string"==typeof Bun.version?"BUN":bu.Deno&&"object"==typeof Deno.version?"DENO":"process"===mu(bu.process)?"NODE":bu.window&&bu.document?"BROWSER":"REST",Ou="NODE"===Su,Tu=$r,Pu=Ee,ju=z,Au=function(t,e,r){return r.get&&Tu(r.get,e,{getter:!0}),r.set&&Tu(r.set,e,{setter:!0}),Pu.f(t,e,r)},Eu=o,Iu=ee("species"),xu=$,Ru=TypeError,Uu=xi,Du=lt,Bu=TypeError,Cu=De,_u=function(t){if(Uu(t))return t;throw new Bu(Du(t)+" is not a constructor")},Fu=U,Lu=ee("species"),ku=function(t,e){var r,n=Cu(t).constructor;return void 0===n||Fu(r=Cu(n)[Lu])?e:_u(r)},Nu=a,Mu=Function.prototype,qu=Mu.apply,Hu=Mu.call,Gu="object"==typeof Reflect&&Reflect.apply||(Nu?Hu.bind(qu):function(){return Hu.apply(qu,arguments)}),zu=S([].slice),$u=TypeError,Vu=/(?:ipad|iphone|ipod).*applewebkit/i.test(X),Wu=r,Xu=Gu,Ju=oi,Yu=N,Ku=qt,Zu=i,Qu=eo,tc=zu,ec=ye,rc=function(t,e){if(t<e)throw new $u("Not enough arguments");return t},nc=Vu,ic=Ou,oc=Wu.setImmediate,ac=Wu.clearImmediate,sc=Wu.process,uc=Wu.Dispatch,cc=Wu.Function,fc=Wu.MessageChannel,hc=Wu.String,pc=0,lc={},dc="onreadystatechange";Zu((function(){lu=Wu.location}));var yc=function(t){if(Ku(lc,t)){var e=lc[t];delete lc[t],e()}},vc=function(t){return function(){yc(t)}},bc=function(t){yc(t.data)},gc=function(t){Wu.postMessage(hc(t),lu.protocol+"//"+lu.host)};oc&&ac||(oc=function(t){rc(arguments.length,1);var e=Yu(t)?t:cc(t),r=tc(arguments,1);return lc[++pc]=function(){Xu(e,void 0,r)},du(pc),pc},ac=function(t){delete lc[t]},ic?du=function(t){sc.nextTick(vc(t))}:uc&&uc.now?du=function(t){uc.now(vc(t))}:fc&&!nc?(vu=(yu=new fc).port2,yu.port1.onmessage=bc,du=Ju(vu.postMessage,vu)):Wu.addEventListener&&Yu(Wu.postMessage)&&!Wu.importScripts&&lu&&"file:"!==lu.protocol&&!Zu(gc)?(du=gc,Wu.addEventListener("message",bc,!1)):du=dc in ec("script")?function(t){Qu.appendChild(ec("script"))[dc]=function(){Qu.removeChild(this),yc(t)}}:function(t){setTimeout(vc(t),0)});var mc={set:oc,clear:ac},wc=r,Sc=o,Oc=Object.getOwnPropertyDescriptor,Tc=function(){this.head=null,this.tail=null};Tc.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.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 Pc,jc,Ac,Ec,Ic,xc=Tc,Rc=/ipad|iphone|ipod/i.test(X)&&"undefined"!=typeof Pebble,Uc=/web0s(?!.*chrome)/i.test(X),Dc=r,Bc=function(t){if(!Sc)return wc[t];var e=Oc(wc,t);return e&&e.value},Cc=oi,_c=mc.set,Fc=xc,Lc=Vu,kc=Rc,Nc=Uc,Mc=Ou,qc=Dc.MutationObserver||Dc.WebKitMutationObserver,Hc=Dc.document,Gc=Dc.process,zc=Dc.Promise,$c=Bc("queueMicrotask");if(!$c){var Vc=new Fc,Wc=function(){var t,e;for(Mc&&(t=Gc.domain)&&t.exit();e=Vc.get();)try{e()}catch(t){throw Vc.head&&Pc(),t}t&&t.enter()};Lc||Mc||Nc||!qc||!Hc?!kc&&zc&&zc.resolve?((Ec=zc.resolve(void 0)).constructor=zc,Ic=Cc(Ec.then,Ec),Pc=function(){Ic(Wc)}):Mc?Pc=function(){Gc.nextTick(Wc)}:(_c=Cc(_c,Dc),Pc=function(){_c(Wc)}):(jc=!0,Ac=Hc.createTextNode(""),new qc(Wc).observe(Ac,{characterData:!0}),Pc=function(){Ac.data=jc=!jc}),$c=function(t){Vc.head||Pc(),Vc.add(t)}}var Xc=$c,Jc=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Yc=r.Promise,Kc=r,Zc=Yc,Qc=N,tf=zn,ef=ar,rf=ee,nf=Su,of=et;Zc&&Zc.prototype;var af=rf("species"),sf=!1,uf=Qc(Kc.PromiseRejectionEvent),cf=tf("Promise",(function(){var t=ef(Zc),e=t!==String(Zc);if(!e&&66===of)return!0;if(!of||of<51||!/native code/.test(t)){var r=new Zc((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};if((r.constructor={})[af]=n,!(sf=r.then((function(){}))instanceof n))return!0}return!(e||"BROWSER"!==nf&&"DENO"!==nf||uf)})),ff={CONSTRUCTOR:cf,REJECTION_EVENT:uf,SUBCLASSING:sf},hf={},pf=bt,lf=TypeError,df=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw new lf("Bad Promise constructor");e=t,r=n})),this.resolve=pf(e),this.reject=pf(r)};hf.f=function(t){return new df(t)};var yf,vf,bf,gf=Zn,mf=Ou,wf=r,Sf=c,Of=Yr,Tf=Jo,Pf=Ps,jf=function(t){var e=ju(t);Eu&&e&&!e[Iu]&&Au(e,Iu,{configurable:!0,get:function(){return this}})},Af=bt,Ef=N,If=q,xf=function(t,e){if(xu(e,t))return t;throw new Ru("Incorrect invocation")},Rf=ku,Uf=mc.set,Df=Xc,Bf=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}},Cf=Jc,_f=xc,Ff=Er,Lf=Yc,kf=hf,Nf="Promise",Mf=ff.CONSTRUCTOR,qf=ff.REJECTION_EVENT,Hf=ff.SUBCLASSING,Gf=Ff.getterFor(Nf),zf=Ff.set,$f=Lf&&Lf.prototype,Vf=Lf,Wf=$f,Xf=wf.TypeError,Jf=wf.document,Yf=wf.process,Kf=kf.f,Zf=Kf,Qf=!!(Jf&&Jf.createEvent&&wf.dispatchEvent),th="unhandledrejection",eh=function(t){var e;return!(!If(t)||!Ef(e=t.then))&&e},rh=function(t,e){var r,n,i,o=e.value,a=1===e.state,s=a?t.ok:t.fail,u=t.resolve,c=t.reject,f=t.domain;try{s?(a||(2===e.rejection&&sh(e),e.rejection=1),!0===s?r=o:(f&&f.enter(),r=s(o),f&&(f.exit(),i=!0)),r===t.promise?c(new Xf("Promise-chain cycle")):(n=eh(r))?Sf(n,r,u,c):u(r)):c(o)}catch(t){f&&!i&&f.exit(),c(t)}},nh=function(t,e){t.notified||(t.notified=!0,Df((function(){for(var r,n=t.reactions;r=n.get();)rh(r,t);t.notified=!1,e&&!t.rejection&&oh(t)})))},ih=function(t,e,r){var n,i;Qf?((n=Jf.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),wf.dispatchEvent(n)):n={promise:e,reason:r},!qf&&(i=wf["on"+t])?i(n):t===th&&Bf("Unhandled promise rejection",r)},oh=function(t){Sf(Uf,wf,(function(){var e,r=t.facade,n=t.value;if(ah(t)&&(e=Cf((function(){mf?Yf.emit("unhandledRejection",n,r):ih(th,r,n)})),t.rejection=mf||ah(t)?2:1,e.error))throw e.value}))},ah=function(t){return 1!==t.rejection&&!t.parent},sh=function(t){Sf(Uf,wf,(function(){var e=t.facade;mf?Yf.emit("rejectionHandled",e):ih("rejectionhandled",e,t.value)}))},uh=function(t,e,r){return function(n){t(e,n,r)}},ch=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,nh(t,!0))},fh=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw new Xf("Promise can't be resolved itself");var n=eh(e);n?Df((function(){var r={done:!1};try{Sf(n,e,uh(fh,r,t),uh(ch,r,t))}catch(e){ch(r,e,t)}})):(t.value=e,t.state=1,nh(t,!1))}catch(e){ch({done:!1},e,t)}}};if(Mf&&(Wf=(Vf=function(t){xf(this,Wf),Af(t),Sf(yf,this);var e=Gf(this);try{t(uh(fh,e),uh(ch,e))}catch(t){ch(e,t)}}).prototype,(yf=function(t){zf(this,{type:Nf,done:!1,notified:!1,parent:!1,reactions:new _f,rejection:!1,state:0,value:null})}).prototype=Of(Wf,"then",(function(t,e){var r=Gf(this),n=Kf(Rf(this,Vf));return r.parent=!0,n.ok=!Ef(t)||t,n.fail=Ef(e)&&e,n.domain=mf?Yf.domain:void 0,0===r.state?r.reactions.add(n):Df((function(){rh(n,r)})),n.promise})),vf=function(){var t=new yf,e=Gf(t);this.promise=t,this.resolve=uh(fh,e),this.reject=uh(ch,e)},kf.f=Kf=function(t){return t===Vf||undefined===t?new vf(t):Zf(t)},Ef(Lf)&&$f!==Object.prototype)){bf=$f.then,Hf||Of($f,"then",(function(t,e){var r=this;return new Vf((function(t,e){Sf(bf,r,t,e)})).then(t,e)}),{unsafe:!0});try{delete $f.constructor}catch(t){}Tf&&Tf($f,Wf)}gf({global:!0,constructor:!0,wrap:!0,forced:Mf},{Promise:Vf}),Pf(Vf,Nf,!1),jf(Nf);var hh=ee("iterator"),ph=!1;try{var lh=0,dh={next:function(){return{done:!!lh++}},return:function(){ph=!0}};dh[hh]=function(){return this},Array.from(dh,(function(){throw 2}))}catch(t){}var yh=Yc,vh=function(t,e){try{if(!e&&!ph)return!1}catch(t){return!1}var r=!1;try{var n={};n[hh]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r},bh=ff.CONSTRUCTOR||!vh((function(t){yh.all(t).then(void 0,(function(){}))})),gh=c,mh=bt,wh=hf,Sh=Jc,Oh=qa;Zn({target:"Promise",stat:!0,forced:bh},{all:function(t){var e=this,r=wh.f(e),n=r.resolve,i=r.reject,o=Sh((function(){var r=mh(e.resolve),o=[],a=0,s=1;Oh(t,(function(t){var u=a++,c=!1;s++,gh(r,e,t).then((function(t){c||(c=!0,o[u]=t,--s||n(o))}),i)})),--s||n(o)}));return o.error&&i(o.value),r.promise}});var Th=Zn,Ph=ff.CONSTRUCTOR,jh=Yc,Ah=z,Eh=N,Ih=Yr,xh=jh&&jh.prototype;if(Th({target:"Promise",proto:!0,forced:Ph,real:!0},{catch:function(t){return this.then(void 0,t)}}),Eh(jh)){var Rh=Ah("Promise").prototype.catch;xh.catch!==Rh&&Ih(xh,"catch",Rh,{unsafe:!0})}var Uh=c,Dh=bt,Bh=hf,Ch=Jc,_h=qa;Zn({target:"Promise",stat:!0,forced:bh},{race:function(t){var e=this,r=Bh.f(e),n=r.reject,i=Ch((function(){var i=Dh(e.resolve);_h(t,(function(t){Uh(i,e,t).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}});var Fh=hf;Zn({target:"Promise",stat:!0,forced:ff.CONSTRUCTOR},{reject:function(t){var e=Fh.f(this);return(0,e.reject)(t),e.promise}});var Lh=De,kh=q,Nh=hf,Mh=function(t,e){if(Lh(t),kh(e)&&e.constructor===t)return e;var r=Nh.f(t);return(0,r.resolve)(e),r.promise},qh=Zn,Hh=ff.CONSTRUCTOR,Gh=Mh;z("Promise"),qh({target:"Promise",stat:!0,forced:Hh},{resolve:function(t){return Gh(this,t)}});var zh=c,$h=bt,Vh=hf,Wh=Jc,Xh=qa;Zn({target:"Promise",stat:!0,forced:bh},{allSettled:function(t){var e=this,r=Vh.f(e),n=r.resolve,i=r.reject,o=Wh((function(){var r=$h(e.resolve),i=[],o=0,a=1;Xh(t,(function(t){var s=o++,u=!1;a++,zh(r,e,t).then((function(t){u||(u=!0,i[s]={status:"fulfilled",value:t},--a||n(i))}),(function(t){u||(u=!0,i[s]={status:"rejected",reason:t},--a||n(i))}))})),--a||n(i)}));return o.error&&i(o.value),r.promise}});var Jh=c,Yh=bt,Kh=z,Zh=hf,Qh=Jc,tp=qa,ep="No one promise resolved";Zn({target:"Promise",stat:!0,forced:bh},{any:function(t){var e=this,r=Kh("AggregateError"),n=Zh.f(e),i=n.resolve,o=n.reject,a=Qh((function(){var n=Yh(e.resolve),a=[],s=0,u=1,c=!1;tp(t,(function(t){var f=s++,h=!1;u++,Jh(n,e,t).then((function(t){h||c||(c=!0,i(t))}),(function(t){h||c||(h=!0,a[f]=t,--u||o(new r(a,ep)))}))})),--u||o(new r(a,ep))}));return a.error&&o(a.value),n.promise}});var rp=hf;Zn({target:"Promise",stat:!0},{withResolvers:function(){var t=rp.f(this);return{promise:t.promise,resolve:t.resolve,reject:t.reject}}});var np=Zn,ip=Yc,op=i,ap=z,sp=N,up=ku,cp=Mh,fp=Yr,hp=ip&&ip.prototype;if(np({target:"Promise",proto:!0,real:!0,forced:!!ip&&op((function(){hp.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=up(this,ap("Promise")),r=sp(t);return this.then(r?function(r){return cp(e,t()).then((function(){return r}))}:t,r?function(r){return cp(e,t()).then((function(){throw r}))}:t)}}),sp(ip)){var pp=ap("Promise").prototype.finally;hp.finally!==pp&&fp(hp,"finally",pp,{unsafe:!0})}var lp=S,dp=en,yp=za,vp=C,bp=lp("".charAt),gp=lp("".charCodeAt),mp=lp("".slice),wp=function(t){return function(e,r){var n,i,o=yp(vp(e)),a=dp(r),s=o.length;return a<0||a>=s?t?"":void 0:(n=gp(o,a))<55296||n>56319||a+1===s||(i=gp(o,a+1))<56320||i>57343?t?bp(o,a):n:t?mp(o,a,a+2):i-56320+(n-55296<<10)+65536}},Sp={codeAt:wp(!1),charAt:wp(!0)}.charAt,Op=za,Tp=Er,Pp=Ys,jp=Ks,Ap="String Iterator",Ep=Tp.set,Ip=Tp.getterFor(Ap);Pp(String,"String",(function(t){Ep(this,{type:Ap,string:Op(t),index:0})}),(function(){var t,e=Ip(this),r=e.string,n=e.index;return n>=r.length?jp(void 0,!0):(t=Sp(r,n),e.index+=t.length,jp(t,!1))})),r.Promise;var xp=ye("span").classList,Rp=xp&&xp.constructor&&xp.constructor.prototype,Up=Rp===Object.prototype?void 0:Rp,Dp=r,Bp={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},Cp=Up,_p=cu,Fp=Ve,Lp=Ps,kp=ee("iterator"),Np=_p.values,Mp=function(t,e){if(t){if(t[kp]!==Np)try{Fp(t,kp,Np)}catch(e){t[kp]=Np}if(Lp(t,e,!0),Bp[e])for(var r in _p)if(t[r]!==_p[r])try{Fp(t,r,_p[r])}catch(e){t[r]=_p[r]}}};for(var qp in Bp)Mp(Dp[qp]&&Dp[qp].prototype,qp);Mp(Cp,"DOMTokenList");var Hp="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||"undefined"!=typeof global&&global||{},Gp="URLSearchParams"in Hp,zp="Symbol"in Hp&&"iterator"in Symbol,$p="FileReader"in Hp&&"Blob"in Hp&&function(){try{return new Blob,!0}catch(t){return!1}}(),Vp="FormData"in Hp,Wp="ArrayBuffer"in Hp;if(Wp)var Xp=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Jp=ArrayBuffer.isView||function(t){return t&&Xp.indexOf(Object.prototype.toString.call(t))>-1};function Yp(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function Kp(t){return"string"!=typeof t&&(t=String(t)),t}function Zp(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return zp&&(e[Symbol.iterator]=function(){return e}),e}function Qp(t){this.map={},t instanceof Qp?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){if(2!=t.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+t.length);this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function tl(t){if(!t._noBody)return t.bodyUsed?Promise.reject(new TypeError("Already read")):void(t.bodyUsed=!0)}function el(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function rl(t){var e=new FileReader,r=el(e);return e.readAsArrayBuffer(t),r}function nl(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function il(){return this.bodyUsed=!1,this._initBody=function(t){var e;this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:$p&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:Vp&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:Gp&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():Wp&&$p&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=nl(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Wp&&(ArrayBuffer.prototype.isPrototypeOf(t)||Jp(t))?this._bodyArrayBuffer=nl(t):this._bodyText=t=Object.prototype.toString.call(t):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):Gp&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},$p&&(this.blob=function(){var t=tl(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var t=tl(this);return t||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if($p)return this.blob().then(rl);throw new Error("could not read as ArrayBuffer")},this.text=function(){var t=tl(this);if(t)return t;if(this._bodyBlob)return function(t){var e=new FileReader,r=el(e),n=/charset=([A-Za-z0-9_-]+)/.exec(t.type),i=n?n[1]:"utf-8";return e.readAsText(t,i),r}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n<e.length;n++)r[n]=String.fromCharCode(e[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},Vp&&(this.formData=function(){return this.text().then(sl)}),this.json=function(){return this.text().then(JSON.parse)},this}Qp.prototype.append=function(t,e){t=Yp(t),e=Kp(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},Qp.prototype.delete=function(t){delete this.map[Yp(t)]},Qp.prototype.get=function(t){return t=Yp(t),this.has(t)?this.map[t]:null},Qp.prototype.has=function(t){return this.map.hasOwnProperty(Yp(t))},Qp.prototype.set=function(t,e){this.map[Yp(t)]=Kp(e)},Qp.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},Qp.prototype.keys=function(){var t=[];return this.forEach((function(e,r){t.push(r)})),Zp(t)},Qp.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),Zp(t)},Qp.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),Zp(t)},zp&&(Qp.prototype[Symbol.iterator]=Qp.prototype.entries);var ol=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function al(t,e){if(!(this instanceof al))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r=(e=e||{}).body;if(t instanceof al){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new Qp(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,r||null==t._bodyInit||(r=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new Qp(e.headers)),this.method=function(t){var e=t.toUpperCase();return ol.indexOf(e)>-1?e:t}(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal||function(){if("AbortController"in Hp)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache)){var n=/([?&])_=[^&]*/;if(n.test(this.url))this.url=this.url.replace(n,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function sl(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(i))}})),e}function ul(t,e){if(!(this instanceof ul))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new Qp(e.headers),this.url=e.url||"",this._initBody(t)}al.prototype.clone=function(){return new al(this,{body:this._bodyInit})},il.call(al.prototype),il.call(ul.prototype),ul.prototype.clone=function(){return new ul(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Qp(this.headers),url:this.url})},ul.error=function(){var t=new ul(null,{status:200,statusText:""});return t.ok=!1,t.status=0,t.type="error",t};var cl=[301,302,303,307,308];ul.redirect=function(t,e){if(-1===cl.indexOf(e))throw new RangeError("Invalid status code");return new ul(null,{status:e,headers:{location:t}})};var fl=Hp.DOMException;try{new fl}catch(t){(fl=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack}).prototype=Object.create(Error.prototype),fl.prototype.constructor=fl}function hl(t,e){return new Promise((function(r,n){var i=new al(t,e);if(i.signal&&i.signal.aborted)return n(new fl("Aborted","AbortError"));var o=new XMLHttpRequest;function a(){o.abort()}if(o.onload=function(){var t,e,n={statusText:o.statusText,headers:(t=o.getAllResponseHeaders()||"",e=new Qp,t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var r=t.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();try{e.append(n,i)}catch(t){console.warn("Response "+t.message)}}})),e)};0===i.url.indexOf("file://")&&(o.status<200||o.status>599)?n.status=200:n.status=o.status,n.url="responseURL"in o?o.responseURL:n.headers.get("X-Request-URL");var a="response"in o?o.response:o.responseText;setTimeout((function(){r(new ul(a,n))}),0)},o.onerror=function(){setTimeout((function(){n(new TypeError("Network request failed"))}),0)},o.ontimeout=function(){setTimeout((function(){n(new TypeError("Network request timed out"))}),0)},o.onabort=function(){setTimeout((function(){n(new fl("Aborted","AbortError"))}),0)},o.open(i.method,function(t){try{return""===t&&Hp.location.href?Hp.location.href:t}catch(e){return t}}(i.url),!0),"include"===i.credentials?o.withCredentials=!0:"omit"===i.credentials&&(o.withCredentials=!1),"responseType"in o&&($p?o.responseType="blob":Wp&&(o.responseType="arraybuffer")),e&&"object"==typeof e.headers&&!(e.headers instanceof Qp||Hp.Headers&&e.headers instanceof Hp.Headers)){var s=[];Object.getOwnPropertyNames(e.headers).forEach((function(t){s.push(Yp(t)),o.setRequestHeader(t,Kp(e.headers[t]))})),i.headers.forEach((function(t,e){-1===s.indexOf(e)&&o.setRequestHeader(e,t)}))}else i.headers.forEach((function(t,e){o.setRequestHeader(e,t)}));i.signal&&(i.signal.addEventListener("abort",a),o.onreadystatechange=function(){4===o.readyState&&i.signal.removeEventListener("abort",a)}),o.send(void 0===i._bodyInit?null:i._bodyInit)}))}hl.polyfill=!0,Hp.fetch||(Hp.fetch=hl,Hp.Headers=Qp,Hp.Request=al,Hp.Response=ul);var pl=function(){function t(){this.empty=!0,this.x=0,this.y=0,this.width=0,this.height=0}return t.prototype.reset=function(){this.empty=!0,this.x=0,this.y=0,this.width=0,this.height=0},t.prototype.set=function(t,e,r,n){void 0===r&&(r=0),void 0===n&&(n=0),this.empty=!1,this.x=t,this.y=e,this.width=r,this.height=n},t.prototype.union=function(t,e,r,n){void 0===r&&(r=0),void 0===n&&(n=0),this.empty?(this.empty=!1,this.x=t,this.y=e,this.width=r,this.height=n):(t<this.x&&(this.width+=this.x-t,this.x=t),e<this.y&&(this.height+=this.y-e,this.y=e),t+r>this.x+this.width&&(this.width=t+r-this.x),e+n>this.y+this.height&&(this.height=e+n-this.y))},t}(),ll=function(){function t(t){this.dirtyArea=new pl,this.canvas=t,this.context=t.getContext("2d")}return t.prototype.draw=function(t){this.canvas&&this.context&&(this.dirtyArea.empty||(this.context.clearRect(this.dirtyArea.x,this.dirtyArea.y,this.dirtyArea.width,this.dirtyArea.height),this.dirtyArea.reset()),t&&(this.canvas.width==t.width&&this.canvas.height==t.height||(this.canvas.width=t.width,this.canvas.height=t.height),this.drawSubtitleData(t,this.dirtyArea)))},t.prototype.drawSubtitleData=function(t,e){for(var r=0,n=t.compositionData;r<n.length;r++){var i=n[r];this.drawSubtitleCompositionData(i,e)}},t.prototype.drawSubtitleCompositionData=function(t,e){var r,n,i=t.compositionObject;i.hasCropping?(null===(r=this.context)||void 0===r||r.putImageData(t.pixelData,i.horizontalPosition,i.verticalPosition,i.croppingHorizontalPosition,i.croppingVerticalPosition,i.croppingWidth,i.croppingHeight),null==e||e.union(i.horizontalPosition,i.verticalPosition,i.croppingWidth,i.croppingHeight)):(null===(n=this.context)||void 0===n||n.putImageData(t.pixelData,i.horizontalPosition,i.verticalPosition),null==e||e.union(i.horizontalPosition,i.verticalPosition,t.pixelData.width,t.pixelData.height))},t}();function dl(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(t){o(t)}}function s(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))}function yl(t,e){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(u){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}"function"==typeof SuppressedError&&SuppressedError;var vl,bl=function(){function t(t){this.$position=0,this.array=t}return Object.defineProperty(t.prototype,"position",{get:function(){return this.$position},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this.array.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"eof",{get:function(){return this.position>=this.length},enumerable:!1,configurable:!0}),t.prototype.readByte=function(){return this.array[this.$position++]},t.prototype.readBytes=function(t){var e=this.array.slice(this.$position,this.$position+t);return this.$position+=t,e},t}(),gl=function(){function t(t){t instanceof Uint8Array?this.baseReader=new bl(t):this.baseReader=t}return Object.defineProperty(t.prototype,"position",{get:function(){return this.baseReader.position},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this.baseReader.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"eof",{get:function(){return this.baseReader.eof},enumerable:!1,configurable:!0}),t.prototype.readUInt8=function(){return this.baseReader.readByte()},t.prototype.readUInt16=function(){return(this.baseReader.readByte()<<8)+this.baseReader.readByte()},t.prototype.readUInt24=function(){return(this.baseReader.readByte()<<16)+(this.baseReader.readByte()<<8)+this.baseReader.readByte()},t.prototype.readUInt32=function(){return(this.baseReader.readByte()<<24)+(this.baseReader.readByte()<<16)+(this.baseReader.readByte()<<8)+this.baseReader.readByte()},t.prototype.readBytes=function(t){return this.baseReader.readBytes(t)},t}();!function(t){t[t.paletteDefinition=20]="paletteDefinition",t[t.objectDefinition=21]="objectDefinition",t[t.presentationComposition=22]="presentationComposition",t[t.windowDefinition=23]="windowDefinition",t[t.end=128]="end"}(vl||(vl={}));var ml=function(){function t(){this.id=0,this.windowId=0,this.croppedFlag=0,this.horizontalPosition=0,this.verticalPosition=0,this.croppingHorizontalPosition=0,this.croppingVerticalPosition=0,this.croppingWidth=0,this.croppingHeight=0}return Object.defineProperty(t.prototype,"hasCropping",{get:function(){return!!(128&this.croppedFlag)},enumerable:!1,configurable:!0}),t}(),wl=function(){function t(){this.width=0,this.height=0,this.frameRate=0,this.compositionNumber=0,this.compositionState=0,this.paletteUpdateFlag=0,this.paletteId=0,this.compositionObjects=[]}return Object.defineProperty(t.prototype,"segmentType",{get:function(){return vl.presentationComposition},enumerable:!1,configurable:!0}),t.prototype.read=function(t,e){this.width=t.readUInt16(),this.height=t.readUInt16(),this.frameRate=t.readUInt8(),this.compositionNumber=t.readUInt16(),this.compositionState=t.readUInt8(),this.paletteUpdateFlag=t.readUInt8(),this.paletteId=t.readUInt8();var r=t.readUInt8();this.compositionObjects=[];for(var n=0;n<r;n++){var i=new ml;i.id=t.readUInt16(),i.windowId=t.readUInt8(),i.croppedFlag=t.readUInt8(),i.horizontalPosition=t.readUInt16(),i.verticalPosition=t.readUInt16(),i.hasCropping&&(i.croppingHorizontalPosition=t.readUInt16(),i.croppingVerticalPosition=t.readUInt16(),i.croppingWidth=t.readUInt16(),i.croppingHeight=t.readUInt16()),this.compositionObjects.push(i)}},t}(),Sl=function(){function t(){this.id=0,this.versionNumber=0,this.rgba=[]}return Object.defineProperty(t.prototype,"segmentType",{get:function(){return vl.paletteDefinition},enumerable:!1,configurable:!0}),t.prototype.read=function(e,r){this.id=e.readUInt8(),this.versionNumber=e.readUInt8();var n=(r-2)/5,i=new Uint32Array(1),o=new Uint8Array(i.buffer);this.rgba=[];for(var a=0;a<n;a++){var s=e.readUInt8(),u=e.readUInt8(),c=e.readUInt8()-128,f=e.readUInt8()-128,h=e.readUInt8(),p=t.clamp(Math.round(u+1.402*c),0,255),l=t.clamp(Math.round(u-.34414*f-.71414*c),0,255),d=t.clamp(Math.round(u+1.772*f),0,255);o[0]=p,o[1]=l,o[2]=d,o[3]=h,this.rgba[s]=i[0]}},t.clamp=function(t,e,r){return t<e?e:t>r?r:t},t}(),Ol=function(){function t(){this.id=0,this.versionNumber=0,this.lastInSequenceFlag=0,this.width=0,this.height=0,this.dataLength=0}return Object.defineProperty(t.prototype,"isFirstInSequence",{get:function(){return!!(128&this.lastInSequenceFlag)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isLastInSequence",{get:function(){return!!(64&this.lastInSequenceFlag)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"segmentType",{get:function(){return vl.objectDefinition},enumerable:!1,configurable:!0}),t.prototype.read=function(t,e){this.id=t.readUInt16(),this.versionNumber=t.readUInt8(),this.lastInSequenceFlag=t.readUInt8(),this.isFirstInSequence?(this.dataLength=t.readUInt24(),this.width=t.readUInt16(),this.height=t.readUInt16(),this.data=t.readBytes(e-11)):this.data=t.readBytes(e-4)},t}(),Tl=function(){this.id=0,this.horizontalPosition=0,this.verticalPosition=0,this.width=0,this.height=0},Pl=function(){function t(){this.windows=[]}return Object.defineProperty(t.prototype,"segmentType",{get:function(){return vl.windowDefinition},enumerable:!1,configurable:!0}),t.prototype.read=function(t,e){var r=t.readUInt8();this.windows=[];for(var n=0;n<r;n++){var i=new Tl;i.id=t.readUInt8(),i.horizontalPosition=t.readUInt16(),i.verticalPosition=t.readUInt16(),i.width=t.readUInt16(),i.height=t.readUInt16(),this.windows.push(i)}},t}(),jl=function(){function t(){this.presentationTimestamp=0,this.decodingTimestamp=0,this.paletteDefinitions=[],this.objectDefinitions=[],this.windowDefinitions=[]}return t.prototype.read=function(t,e){return dl(this,void 0,void 0,(function(){var r,n,i,o,a,s,u,c,f;return yl(this,(function(h){switch(h.label){case 0:this.presentationTimestamp=0,this.decodingTimestamp=0,this.presentationComposition=void 0,this.paletteDefinitions=[],this.objectDefinitions=[],this.windowDefinitions=[],r=void 0,"requestData"in t.baseReader&&(r=t.baseReader),h.label=1;case 1:return n=0,i=0,e?[4,null==r?void 0:r.requestData(10)]:[3,3];case 2:if(h.sent(),20551!=t.readUInt16())throw new Error("Invalid ma