@theoplayer/theoads 7.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +125 -0
- package/THEOplayer.chromeless.d.ts +8 -0
- package/THEOplayer.chromeless.esm.js +40 -0
- package/THEOplayer.chromeless.js +39 -0
- package/THEOplayer.common.d.ts +13425 -0
- package/THEOplayer.common.esm.js +40 -0
- package/THEOplayer.d.ts +278 -0
- package/THEOplayer.esm.js +40 -0
- package/THEOplayer.js +40 -0
- package/THEOplayer.transmux.asmjs.js +30 -0
- package/THEOplayer.transmux.js +30 -0
- package/THEOplayer.transmux.wasm +0 -0
- package/iframe.html +1 -0
- package/package.json +68 -0
- package/theoplayer.d.js +31 -0
- package/ui.css +1 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
THEOplayer
|
|
3
|
+
|
|
4
|
+
Usage of this software is limited by the THEOplayer License.
|
|
5
|
+
|
|
6
|
+
It is prohibited to reverse engineer, decompile, translate,
|
|
7
|
+
disassemble, decipher, decrypt, or otherwise attempt to
|
|
8
|
+
discover the source code of this software.
|
|
9
|
+
|
|
10
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
11
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
12
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
13
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
14
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
15
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
16
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
17
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
18
|
+
|
|
19
|
+
For more information, visit https://www.theoplayer.com or contact
|
|
20
|
+
contact @ theoplayer . com
|
|
21
|
+
|
|
22
|
+
This product makes use of Open Source Software: video.js
|
|
23
|
+
(Apache 2.0 - Copyright Brightcove, Inc.), long.js (Apache 2.0),
|
|
24
|
+
nodejs-langs (MIT - Copyright Andrew Lawson), promise-polyfill
|
|
25
|
+
(MIT - Copyright (c) 2014 Taylor Hakes & Forbes Lindesay),
|
|
26
|
+
shaka-player (Apache 2.0 - Copyright 2016 Google LLC)
|
|
27
|
+
The code of these projects has been heavily modified during
|
|
28
|
+
integration.
|
|
29
|
+
More information on the licenses can be found here: Apache 2.0
|
|
30
|
+
(http://www.apache.org/licenses/LICENSE-2.0), MIT
|
|
31
|
+
(https://opensource.org/licenses/MIT)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
THEOplayer is based on patented technology developed by
|
|
35
|
+
THEO Technologies (https://www.theoplayer.com).
|
|
36
|
+
|
|
37
|
+
Version: 7.10.0
|
|
38
|
+
Created: 2024-08-13T09:50:33.155Z
|
|
39
|
+
*/
|
|
40
|
+
var td,r,Mh,a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:void 0!==s?s:"undefined"!=typeof global?global:this,s=a.window,h=a.document,id=a.location,ed=a.navigator,u=a.setTimeout,c=a.clearTimeout,v=a.setInterval,m=a.clearInterval,g=a.Error,b=a.TypeError,w=(a.SyntaxError,a.Object),_=a.Math,x=a.parseInt,C=a.parseFloat,S=a.isNaN,j=a.Uint8Array,sd=a.Worker,nd=(a.WorkerGlobalScope,a.XMLHttpRequest),rd=w.create,hd=w.defineProperty,od=w.getOwnPropertyDescriptor,ad=w.getOwnPropertyNames,ud=w.getPrototypeOf,cd=w.prototype.hasOwnProperty,fs=(t,i)=>()=>(i||t((i={exports:{}}).exports,i),i.exports),Ns=(t,i,e)=>(e=null!=t?rd(ud(t)):{},((t,i,e,s)=>{if(i&&"object"==typeof i||"function"==typeof i)for(let n of ad(i))cd.call(t,n)||n===e||hd(t,n,{get:()=>i[n],enumerable:!(s=od(i,n))||s.enumerable});return t})(!i&&t&&t.__esModule?e:hd(e,"default",{value:t,enumerable:!0}),t)),dd=fs(((t,i)=>{i.exports=function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}})),ld=fs(((t,i)=>{i.exports=function(t,i){var e=i[0],s=i[1],n=i[2],r=i[3],h=e+e,o=s+s,a=n+n,u=e*h,c=s*h,d=s*o,l=n*h,f=n*o,_=n*a,g=r*h,w=r*o,A=r*a;return t[0]=1-d-_,t[1]=c+A,t[2]=l-w,t[3]=0,t[4]=c-A,t[5]=1-u-_,t[6]=f+g,t[7]=0,t[8]=l+w,t[9]=f-g,t[10]=1-u-d,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}})),fd=fs(((t,i)=>{i.exports=function(t,i,e){var s,n,r,h=e[0],o=e[1],a=e[2],u=_.sqrt(h*h+o*o+a*a);if(_.abs(u)<1e-6)return null;return h*=u=1/u,o*=u,a*=u,s=_.sin(i),n=_.cos(i),r=1-n,t[0]=h*h*r+n,t[1]=o*h*r+a*s,t[2]=a*h*r-o*s,t[3]=0,t[4]=h*o*r-a*s,t[5]=o*o*r+n,t[6]=a*o*r+h*s,t[7]=0,t[8]=h*a*r+o*s,t[9]=o*a*r-h*s,t[10]=a*a*r+n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}})),_d=fs(((t,i)=>{i.exports=function(t,i){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=i[0],t[13]=i[1],t[14]=i[2],t[15]=1,t}})),gd=fs(((t,i)=>{i.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}})),wd=fs(((t,i)=>{i.exports=function(t,i){var e=i[0],s=i[1],n=i[2],r=i[3],h=i[4],o=i[5],a=i[6],u=i[7],c=i[8],d=i[9],l=i[10],f=i[11],_=i[12],g=i[13],w=i[14],A=i[15],v=e*o-s*h,m=e*a-n*h,p=e*u-r*h,y=s*a-n*o,M=s*u-r*o,T=n*u-r*a,N=c*g-d*_,D=c*w-l*_,S=c*A-f*_,I=d*w-l*g,E=d*A-f*g,b=l*A-f*w,L=v*b-m*E+p*I+y*S-M*D+T*N;if(!L)return null;return L=1/L,t[0]=(o*b-a*E+u*I)*L,t[1]=(n*E-s*b-r*I)*L,t[2]=(g*T-w*M+A*y)*L,t[3]=(l*M-d*T-f*y)*L,t[4]=(a*S-h*b-u*D)*L,t[5]=(e*b-n*S+r*D)*L,t[6]=(w*p-_*T-A*m)*L,t[7]=(c*T-l*p+f*m)*L,t[8]=(h*E-o*S+u*N)*L,t[9]=(s*S-e*E-r*N)*L,t[10]=(_*M-g*p+A*v)*L,t[11]=(d*p-c*M-f*v)*L,t[12]=(o*D-h*I-a*N)*L,t[13]=(e*I-s*D+n*N)*L,t[14]=(g*m-_*y-w*v)*L,t[15]=(c*y-d*m+l*v)*L,t}})),Ad=fs(((t,i)=>{i.exports=function(t,i,e){var s=i[0],n=i[1],r=i[2],h=i[3],o=i[4],a=i[5],u=i[6],c=i[7],d=i[8],l=i[9],f=i[10],_=i[11],g=i[12],w=i[13],A=i[14],v=i[15],m=e[0],p=e[1],y=e[2],M=e[3];return t[0]=m*s+p*o+y*d+M*g,t[1]=m*n+p*a+y*l+M*w,t[2]=m*r+p*u+y*f+M*A,t[3]=m*h+p*c+y*_+M*v,m=e[4],p=e[5],y=e[6],M=e[7],t[4]=m*s+p*o+y*d+M*g,t[5]=m*n+p*a+y*l+M*w,t[6]=m*r+p*u+y*f+M*A,t[7]=m*h+p*c+y*_+M*v,m=e[8],p=e[9],y=e[10],M=e[11],t[8]=m*s+p*o+y*d+M*g,t[9]=m*n+p*a+y*l+M*w,t[10]=m*r+p*u+y*f+M*A,t[11]=m*h+p*c+y*_+M*v,m=e[12],p=e[13],y=e[14],M=e[15],t[12]=m*s+p*o+y*d+M*g,t[13]=m*n+p*a+y*l+M*w,t[14]=m*r+p*u+y*f+M*A,t[15]=m*h+p*c+y*_+M*v,t}})),vd=fs(((t,i)=>{i.exports=function(t,i,e,s,n){var r=1/_.tan(i/2),h=1/(s-n);return t[0]=r/e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(n+s)*h,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*n*s*h,t[15]=0,t}})),md=fs(((t,i)=>{i.exports=function(t,i,e,s){var n,r,h,o,a,u,c,d,l,f,g,w,A,v,m,p,y,M,T,N,D,S,I,E,b=s[0],L=s[1],k=s[2],C=_.sqrt(b*b+L*L+k*k);if(_.abs(C)<1e-6)return null;b*=C=1/C,L*=C,k*=C,n=_.sin(e),r=_.cos(e),h=1-r,o=i[0],a=i[1],u=i[2],c=i[3],d=i[4],l=i[5],f=i[6],g=i[7],w=i[8],A=i[9],v=i[10],m=i[11],p=b*b*h+r,y=L*b*h+k*n,M=k*b*h-L*n,T=b*L*h-k*n,N=L*L*h+r,D=k*L*h+b*n,S=b*k*h+L*n,I=L*k*h-b*n,E=k*k*h+r,t[0]=o*p+d*y+w*M,t[1]=a*p+l*y+A*M,t[2]=u*p+f*y+v*M,t[3]=c*p+g*y+m*M,t[4]=o*T+d*N+w*D,t[5]=a*T+l*N+A*D,t[6]=u*T+f*N+v*D,t[7]=c*T+g*N+m*D,t[8]=o*S+d*I+w*E,t[9]=a*S+l*I+A*E,t[10]=u*S+f*I+v*E,t[11]=c*S+g*I+m*E,i!==t&&(t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15]);return t}})),pd=fs(((t,i)=>{i.exports=function(t,i,e){var s,n,r,h,o,a,u,c,d,l,f,_,g=e[0],w=e[1],A=e[2];i===t?(t[12]=i[0]*g+i[4]*w+i[8]*A+i[12],t[13]=i[1]*g+i[5]*w+i[9]*A+i[13],t[14]=i[2]*g+i[6]*w+i[10]*A+i[14],t[15]=i[3]*g+i[7]*w+i[11]*A+i[15]):(s=i[0],n=i[1],r=i[2],h=i[3],o=i[4],a=i[5],u=i[6],c=i[7],d=i[8],l=i[9],f=i[10],_=i[11],t[0]=s,t[1]=n,t[2]=r,t[3]=h,t[4]=o,t[5]=a,t[6]=u,t[7]=c,t[8]=d,t[9]=l,t[10]=f,t[11]=_,t[12]=s*g+o*w+d*A+i[12],t[13]=n*g+a*w+l*A+i[13],t[14]=r*g+u*w+f*A+i[14],t[15]=h*g+c*w+_*A+i[15]);return t}}));function yd(t,i){return Td(t.slice(),i)}function Md(t,i){const e=Td(t,i);return e!==t&&Nd(e,void 0,t.length,t),t}function Td(t,i){let e=t;const s=e.length;if(s<=1)return e;let n=new Array(s);for(let t=1;t<s;t*=2){Nd(e,i,t,n);const s=e;e=n,n=s}return e}function Nd(t,i,e,s){const n=t.length;let r=0;const h=2*e;let o,a,u,c,d;for(a=0;a<n;a+=h)for(u=a+e,o=u+e,u>n&&(u=n),o>n&&(o=n),c=a,d=u;;)if(c<u&&d<o)i&&i(t[c],t[d])<=0?s[r++]=t[c++]:s[r++]=t[d++];else if(c<u)s[r++]=t[c++];else{if(!(d<o))break;s[r++]=t[d++]}}(r=td||(td={}))[r.CONFIGURATION_ERROR=1e3]="CONFIGURATION_ERROR",r[r.LICENSE_ERROR=2e3]="LICENSE_ERROR",r[r.LICENSE_INVALID_DOMAIN=2001]="LICENSE_INVALID_DOMAIN",r[r.LICENSE_INVALID_SOURCE=2002]="LICENSE_INVALID_SOURCE",r[r.LICENSE_EXPIRED=2003]="LICENSE_EXPIRED",r[r.LICENSE_INVALID_FEATURE=2004]="LICENSE_INVALID_FEATURE",r[r.SOURCE_INVALID=3e3]="SOURCE_INVALID",r[r.SOURCE_NOT_SUPPORTED=3001]="SOURCE_NOT_SUPPORTED",r[r.MANIFEST_LOAD_ERROR=4e3]="MANIFEST_LOAD_ERROR",r[r.MANIFEST_CORS_ERROR=4001]="MANIFEST_CORS_ERROR",r[r.MANIFEST_PARSE_ERROR=4002]="MANIFEST_PARSE_ERROR",r[r.MEDIA_NOT_SUPPORTED=5e3]="MEDIA_NOT_SUPPORTED",r[r.MEDIA_LOAD_ERROR=5001]="MEDIA_LOAD_ERROR",r[r.MEDIA_DECODE_ERROR=5002]="MEDIA_DECODE_ERROR",r[r.MEDIA_AVPLAYER_ERROR=5003]="MEDIA_AVPLAYER_ERROR",r[r.MEDIA_ABORTED=5004]="MEDIA_ABORTED",r[r.NETWORK_ERROR=6e3]="NETWORK_ERROR",r[r.NETWORK_TIMEOUT=6001]="NETWORK_TIMEOUT",r[r.CONTENT_PROTECTION_ERROR=7e3]="CONTENT_PROTECTION_ERROR",r[r.CONTENT_PROTECTION_NOT_SUPPORTED=7001]="CONTENT_PROTECTION_NOT_SUPPORTED",r[r.CONTENT_PROTECTION_CONFIGURATION_MISSING=7002]="CONTENT_PROTECTION_CONFIGURATION_MISSING",r[r.CONTENT_PROTECTION_CONFIGURATION_INVALID=7003]="CONTENT_PROTECTION_CONFIGURATION_INVALID",r[r.CONTENT_PROTECTION_INITIALIZATION_INVALID=7004]="CONTENT_PROTECTION_INITIALIZATION_INVALID",r[r.CONTENT_PROTECTION_CERTIFICATE_ERROR=7005]="CONTENT_PROTECTION_CERTIFICATE_ERROR",r[r.CONTENT_PROTECTION_CERTIFICATE_INVALID=7006]="CONTENT_PROTECTION_CERTIFICATE_INVALID",r[r.CONTENT_PROTECTION_LICENSE_ERROR=7007]="CONTENT_PROTECTION_LICENSE_ERROR",r[r.CONTENT_PROTECTION_LICENSE_INVALID=7008]="CONTENT_PROTECTION_LICENSE_INVALID",r[r.CONTENT_PROTECTION_KEY_EXPIRED=7009]="CONTENT_PROTECTION_KEY_EXPIRED",r[r.CONTENT_PROTECTION_KEY_MISSING=7010]="CONTENT_PROTECTION_KEY_MISSING",r[r.CONTENT_PROTECTION_OUTPUT_RESTRICTED=7011]="CONTENT_PROTECTION_OUTPUT_RESTRICTED",r[r.CONTENT_PROTECTION_INTERNAL_ERROR=7012]="CONTENT_PROTECTION_INTERNAL_ERROR",r[r.SUBTITLE_LOAD_ERROR=8e3]="SUBTITLE_LOAD_ERROR",r[r.SUBTITLE_CORS_ERROR=8001]="SUBTITLE_CORS_ERROR",r[r.SUBTITLE_PARSE_ERROR=8002]="SUBTITLE_PARSE_ERROR",r[r.VR_PLATFORM_UNSUPPORTED=9e3]="VR_PLATFORM_UNSUPPORTED",r[r.VR_PRESENTATION_ERROR=9001]="VR_PRESENTATION_ERROR",r[r.AD_ERROR=1e4]="AD_ERROR",r[r.AD_BLOCKER_DETECTED=10001]="AD_BLOCKER_DETECTED",r[r.FULLSCREEN_ERROR=11e3]="FULLSCREEN_ERROR",r[r.CACHE_SOURCE_ERROR=12e3]="CACHE_SOURCE_ERROR",r[r.CACHE_CONTENT_PROTECTION_ERROR=12001]="CACHE_CONTENT_PROTECTION_ERROR",r[r.THEO_LIVE_UNKNOWN_ERROR=13e3]="THEO_LIVE_UNKNOWN_ERROR",r[r.THEO_LIVE_CHANNEL_NOT_FOUND=13001]="THEO_LIVE_CHANNEL_NOT_FOUND",r[r.THEO_LIVE_END_OF_DEMO=13002]="THEO_LIVE_END_OF_DEMO",r[r.THEO_LIVE_ANALYTICS_ERROR=13003]="THEO_LIVE_ANALYTICS_ERROR",function(t){t[t.CONFIGURATION=1]="CONFIGURATION",t[t.LICENSE=2]="LICENSE",t[t.SOURCE=3]="SOURCE",t[t.MANIFEST=4]="MANIFEST",t[t.MEDIA=5]="MEDIA",t[t.NETWORK=6]="NETWORK",t[t.CONTENT_PROTECTION=7]="CONTENT_PROTECTION",t[t.SUBTITLE=8]="SUBTITLE",t[t.VR=9]="VR",t[t.AD=10]="AD",t[t.FULLSCREEN=11]="FULLSCREEN",t[t.CACHE=12]="CACHE",t[t.THEOLIVE=13]="THEOLIVE"}(Mh||(Mh={})),function(t){t.fromCode=function(i){const e=_.floor(i/1e3);if(e in t)return e;throw new b("Invalid error code: "+i)}}(Mh||(Mh={}));var Xt={}.hasOwnProperty,Qc={}.toString;function Dd(t){return null!=t}function Sa(t){return void 0===t}var $=Array.isArray||function(t){return"[object Array]"===Qc.call(t)};function tn(t){return Mo(t)&&Xt.call(t,"length")&&bd(t.length)}function Mo(t){return"object"==typeof t&&null!==t}function Nn(t){return Mo(t)&&t.constructor&&t.constructor===w}function Qs(t){return"string"==typeof t}function Sd(t){return"boolean"==typeof t}function Id(t){return Dd(t)&&"function"==typeof t.then}function Ed(t){return"[object Date]"===Qc.call(t)}function bd(t){return"number"==typeof t}function Ld(t){return"function"==typeof t}function Us(t){return Ld(t)||Mo(t)}var pe,Da=9007199254740991,kd=2**-52;function Pe(t,i,e){return _.min(_.max(t,i),e)}function be(t,i,e){return t===i||_.abs(t-i)<=e}function Cd(t,i){if(t===i)return!0;const e=_.abs(t-i);if(e<kd)return!0;return e<_.max(_.abs(t),_.abs(i))*kd}function xd(t,i){return t%i+(t<0?i:0)}function Od(t){return t!=t}function jd(t,i){return t===i||Od(t)&&Od(i)}function zd(t,i){let e=t,s=i;for(;0!==s;){const t=e%s;e=s,s=t}return e<0?-e:e}function Yc(t,i){return t.reduce(((t,e)=>t+i(e)),0)}!function(t){t[t.Zr=0]="Zr",t[t.hd=1]="hd",t[t.Nd=-1]="Nd"}(pe||(pe={}));var Ta=(t,i)=>(0|t)-(0|i),Pd=(t,i)=>t===i?0:t<i?-1:t>i?1:S(t)?S(i)?0:1:-1;function Bd(t,i,e){return be(t,i,e)?0:Pd(t,i)}var Rd=(t,i)=>Cd(t,i)?0:Pd(t,i);var Ud="function"==typeof Array.prototype.find?(t,i)=>t.find(i):(t,i)=>{const e=Yd(t,i);return-1===e?void 0:t[e]},Po=Ud,Qd="function"==typeof Array.prototype.findLast?(t,i)=>t.findLast(i):(t,i)=>{const e=Gd(t,i);return-1===e?void 0:t[e]},Fd=Qd,Yd="function"==typeof Array.prototype.findIndex?(t,i)=>t.findIndex(i):(t,i)=>{for(let e=0;e<t.length;e+=1){if(i(t[e],e,t))return e}return-1},Gd="function"==typeof Array.prototype.findLastIndex?(t,i)=>t.findLastIndex(i):(t,i)=>{for(let e=t.length-1;e>=0;e-=1){if(i(t[e],e,t))return e}return-1};function _s(t,i){const e=t.indexOf(i);return-1!==e&&(si(t,e),!0)}function si(t,i){0===i?t.shift():t.splice(i,1)}function Vd(t,i){const e=new Array(t.length);let s=0,n=0;for(;n<t.length;){if(t[n]===i){n++,e.length-=1;break}e[s++]=t[n++]}for(;n<t.length;)e[s++]=t[n++];return e}function ae(t,i){return-1!==t.indexOf(i)}function Wd(t,i,e){if(t===i)return!0;if(t.length!==i.length)return!1;for(let s=0;s<t.length;s+=1)if(!e(t[s],i[s]))return!1;return!0}function No(t){t.length=0}function yl(t,i){if(t.length!==i.length)return!1;for(const e of t)if(!ae(i,e))return!1;return!0}Array.prototype.flat;var xl="function"==typeof Array.prototype.flatMap?(t,i)=>t.flatMap(i):(t,i)=>{const e=[];for(let s=0;s<t.length;s++)e.push(...i(t[s],s));return e};function ol(t,i){return $n(t,((t,e)=>Pd(i(t),i(e))))}function Hd(t,i){return qd(t,((t,e)=>Pd(i(t),i(e))))}function $n(t,i){if(0!==t.length)return t.reduce(((t,e)=>i(t,e)<=0?t:e))}function qd(t,i){return $n(t,((t,e)=>i(e,t)))}function pl(t){return t.filter(((i,e)=>t.indexOf(i)===e))}function Xd(t,i){return Promise.all(t.map(i)).then((i=>t.filter(((t,e)=>i[e]))))}function Zd(t,i,e){if(t.length!==i.length)return!1;for(let s=0;s<t.length;s++)if(!e(t[s],i[s]))return!1;return!0}function Kd(){const t=w.create(null);return t.Dd=void 0,delete t.Dd,t}function Cn(){return new Dl}function Y(){return new Il}function Jd(t){const i=Cn();for(const e in t)Xt.call(t,e)&&i.set(e,t[e]);return i}function $d(t){const i=[];return t.forEach((t=>i.push(t))),i}var Nl="undefined"!=typeof Map&&"entries"in Map.prototype?Map:void 0,Dl=Nl||function(){class t{next(){const t=this.index;return t<this.keys.length?(this.index++,{value:this.selector(this.data,this.keys[t]),done:!1}):{value:void 0,done:!0}}constructor(t,i){this.index=0,this.data=t,this.selector=i,this.keys=w.keys(t)}}return class{get(t){return this.data[t]}set(t,i){return this.has(t)||this.size++,this.data[t]=i,this}has(t){return t in this.data}delete(t){return!!this.has(t)&&(this.size--,delete this.data[t],!0)}clear(){this.data=Kd(),this.size=0}keys(){return new t(this.data,((t,i)=>i))}values(){return new t(this.data,((t,i)=>t[i]))}entries(){return new t(this.data,((t,i)=>[i,t[i]]))}forEach(t){for(const i in this.data)t(this.data[i],i)}constructor(){this.data=Kd(),this.size=0}}}();var Il=Nl||function(){class t{next(){const t=this.Id.next();return t.done?t:{value:this.Ld(t.value),done:!1}}constructor(t,i){this.Id=t,this.Ld=i}}return class{get size(){return this.Od.size}get(t){return this.Od.get(""+t)}set(t,i){return this.Od.set(""+t,i),this}has(t){return this.Od.has(""+t)}delete(t){return this.Od.delete(""+t)}clear(){this.Od.clear()}keys(){return new t(this.Od.keys(),(t=>Number(t)))}values(){return this.Od.values()}entries(){return new t(this.Od.entries(),(t=>{let[i,e]=t;return[Number(i),e]}))}forEach(t){this.Od.forEach(((i,e)=>{t(i,Number(e))}))}constructor(){this.Od=Cn()}}}();var gl=function(){for(var t=arguments.length,i=new Array(t),e=0;e<t;e++)i[e]=arguments[e];g.apply(this,i)};(gl.prototype=w.create(g.prototype)).constructor=gl;var i,Jo=class extends gl{get name(){return"BaseError"}constructor(t,i){super(),this.message=t||"Unknown error",this.cause=i,g.captureStackTrace&&g.captureStackTrace(this,this.constructor)}},El=class{zd(){if(!this.Bd&&!this.Rd){this.Bd=!0;for(const t of this.Ud.slice())t();this.Qd()}}Qd(){if(!this.Rd){this.Rd=!0;for(const t of this.Fd.slice())t();No(this.Ud),No(this.Fd)}}Yd(t){this.Rd||this.Ud.push(t)}Gd(t){this.Rd||_s(this.Ud,t)}Vd(t){this.Rd||this.Fd.push(t)}Wd(t){this.Rd||_s(this.Fd,t)}constructor(){this.Bd=!1,this.Rd=!1,this.Ud=[],this.Fd=[]}},er=class t{get Hd(){return this.qd}Xd(){this.qd.zd()}Qd(){this.qd.Qd()}Zd(t){const i=this.qd;if(i.Bd)return;if(t.Bd)return void i.zd();if(i.Rd||t.Rd)return;const e=()=>{s(),i.zd()},s=()=>{t.Gd(e),t.Wd(s),i.Gd(e),i.Wd(s)};t.Yd(e),t.Vd(s),i.Yd(e),i.Vd(s)}Kd(){const i=new t,e=new t,s=i.Hd,n=e.Hd,r=this.qd,h=()=>{s.Bd&&n.Rd||n.Bd&&s.Rd?r.zd():s.Rd&&n.Rd&&r.Qd()};s.Yd(h),n.Yd(h),s.Vd(h),n.Vd(h),i.Zd(r),e.Zd(r);return r.Vd((()=>{s.Gd(h),n.Gd(h),s.Wd(h),n.Wd(h)})),[i,e]}constructor(){this.qd=new El}};var qo=()=>{},Ll=t=>t;function Is(t,e){let s=-1/0;return function(){for(var n=arguments.length,r=new Array(n),h=0;h<n;h++)r[h]=arguments[h];const o=i.Jd();o-s>=e&&(t.apply(this,r),s=o)}}function Un(t,e){let s=0;return function(){for(var n=arguments.length,r=new Array(n),h=0;h<n;h++)r[h]=arguments[h];const o=this;0!==s&&i.$d(s),s=i.ul((()=>{s=0,t.apply(o,r)}),e)}}function Ol(t){let i;return()=>(void 0!==t&&(i=t(),t=void 0),i)}var is=class extends Jo{get name(){return"AbortError"}constructor(t,i){super(t||"Aborted",i)}};function Mi(t){return t instanceof g&&"AbortError"===t.name}function fo(t){if(t&&t.Bd)throw new is}function Kc(t){if(Mi(t))throw t}function Ah(t){if(!Mi(t))throw t}function ji(t,i){return i?new Promise(((e,s)=>{if(i.Bd)return t.catch(qo),s(new is);const n=()=>{i.Gd(n),s(new is)};i.Yd(n),t.then((t=>{i.Gd(n),e(t)}),(t=>{i.Gd(n),s(t)}))})):t}function dn(t,i){return t.then((t=>(i.Xd(),t)),(t=>{throw i.Xd(),t}))}function Ph(t,i){const e=new er;return i&&e.Zd(i),dn(t(e.Hd),e)}var zl=Promise.resolve(),Ac="function"==typeof queueMicrotask?queueMicrotask:t=>{zl.then(t)};function Ys(t){t.then(qo,qo)}async function Pl(t){try{return await Promise.all(t)}catch(i){throw await Promise.all(t.map((t=>t.catch(qo)))),i}}function Di(t,e){return new Promise(((s,n)=>{if(void 0!==e&&e.Bd)return void n(new is);const r=i.ul((()=>{void 0!==e&&e.Gd(h),s()}),t),h=()=>{i.$d(r),n(new is)};void 0!==e&&e.Yd(h)}))}function Bl(t,i,e){if("function"==typeof e)e.call(t,i);else for(const s of e)s.call(t,i)}var Rl,Bo=class{yn(t,i){if("function"==typeof i)if("string"==typeof t)this.tf(t,i);else for(const e of t)this.tf(e,i)}tf(t,i){const e=this.if[t];void 0===e?this.if[t]=i:"function"==typeof e?this.if[t]=[e,i]:0===this.ef?e.push(i):this.if[t]=e.concat(i)}sf(t){if("function"!=typeof t)return;const i=this.nf;void 0===i?this.nf=t:"function"==typeof i?this.nf=[i,t]:0===this.ef?i.push(t):this.nf=i.concat(t)}Vo(){this.if=Kd(),this.nf=void 0}Co(t){this.ef++;const i=this.if[t.type],e=this.nf;void 0!==i&&Bl(this.rf,t,i),void 0!==e&&Bl(this.rf,t,e),this.ef--}fn(t,i){if("function"==typeof i)if("string"==typeof t)this.hf(t,i);else for(const e of t)this.hf(e,i)}hf(t,i){const e=this.if[t];void 0!==e&&("function"==typeof e?e===i&&(this.if[t]=void 0):0===this.ef?_s(e,i):this.if[t]=Vd(e,i))}uf(t){if("string"==typeof t)this.if[t]=void 0;else for(const i of t)this.if[i]=void 0}cf(t){const i=this.nf;void 0!==i&&("function"==typeof i?i===t&&(this.nf=void 0):0===this.ef?_s(i,t):this.nf=Vd(i,t))}df(t,i){return new Promise(((e,s)=>{if(i&&i.Bd)return s(new is);const n=t=>{h(),e(t)},r=()=>{h(),s(new is)},h=()=>{this.fn(t,n),i&&i.Gd(r)};this.yn(t,n),i&&i.Yd(r)}))}constructor(t){this.if=Kd(),this.nf=void 0,this.ef=0,this.Ds=t=>{this.Co(t)},this.rf=null!=t?t:this}},Mt=class extends Bo{Co(t){Ac((()=>{super.Co(t)}))}},Ut=class extends Bo{sf(t){super.sf(t)}cf(t){super.cf(t)}},Ul=class extends Ut{},_a=class extends Ut{get ht(){return this.lf()}lf(){return this._f.ht}gf(){return this._f.gf()}get wf(){return this.Af()}Af(){return this._f.wf}get vf(){return this.mf()}set vf(t){this.pf(t)}mf(){return this._f.vf}pf(t){this._f.vf=t}get bt(){return this.yf()}yf(){return this._f.bt}get Mf(){return this.Tf()}set Mf(t){this.Nf(t)}Tf(){return this._f.Mf}Nf(t){this._f.Mf=t}get ct(){return this.Td()}Td(){return this._f.ct}get we(){return this.Df()}Df(){return this._f.we}get Sf(){return this.If()}If(){return this._f.Sf}get lt(){return this.Ef()}get bf(){return this.Lf()}Ef(){return this._f.lt}Lf(){return this._f.bf}get kf(){return this.Cf()}Cf(){return this._f.kf}get xf(){return this.Of()}Of(){return this._f.xf}get jf(){return this.zf()}zf(){return this._f.jf}get Pf(){return this.Bf()}set Pf(t){this.Rf(t)}Bf(){return this._f.Pf}Rf(t){this._f.Pf=t}get Uf(){return this.Qf()}Qf(){return this._f.Uf}get Ff(){return this.Yf()}Yf(){return this._f.Ff}get Gf(){return this.Vf()}set Gf(t){this.Wf(t)}Vf(){return this._f.Gf}Wf(t){this._f.Gf=t}get Hf(){return this.qf()}qf(){return this._f.Hf}get Xf(){return this.Zf()}set Xf(t){this.Kf(t)}Zf(){return this._f.Xf}Kf(t){this._f.Xf=t}get Jf(){return this.$f()}$f(){return this._f.Jf}get t_(){return this.i_()}i_(){return this._f.t_}get e_(){return this.s_()}s_(){return this._f.e_}Wa(){return this._f.Wa()}ga(t,i){return this._f.ga(t,i)}get nt(){return this.n_()}n_(){return this._f.nt}get r_(){return this.h_()}h_(){return this._f.r_}get rt(){return this.o_()}o_(){return this._f.rt}get a_(){return this.u_()}u_(){return this._f.a_}get c_(){return this.d_()}set c_(t){this.l_(t)}get f_(){return this.__()}__(){return this._f.f_}d_(){return this._f.c_}l_(t){this._f.c_=t}get g_(){return this._f.g_}set g_(t){this._f.g_=t}w_(){return this._f.w_()}A_(){return this._f.A_()}ur(t){this._f.ur(t)}ar(){this._f.ar()}be(){this._f.be()}v_(){this._f.v_()}m_(){this._f.m_()}p_(){this._f.p_()}ge(){this._f.ge()}y_(){return this._f.y_()}M_(){return this._f.M_()}T_(){this._f.T_()}N_(){this._f.N_()}tr(){return this._f.tr()}D_(){this._f.D_()}S_(){this._f.S_()}I_(t){return this._f.I_(t)}E_(t){return!1}async gn(){this.Vo(),await this._f.gn()}constructor(t){super(),this.b_=t=>{this.E_(t)||this.Co(t)},this._f=t,t.sf(this.b_)}};!function(t){t.L_="k_",t.C_="x_"}(Rl||(Rl={}));var Yi=class{constructor(t,i=new Date){this.type=t,this.date=i}},Ao=class extends Yi{get va(){return this.Xa||(this.Xa=this.fa()),this.Xa}constructor(t,i){super(t,i),this.Xa=void 0}};function Ql(t){return Boolean(t&&t.va)}var na,Oe=class extends Ao{constructor(t){super(t)}},Zs=class extends Yi{constructor(t){super(t)}},Fl=class extends Oe{fa(){return new Yl(this.Lt.va)}constructor(t){super(Rl.L_),this.Lt=t}},Yl=class extends Zs{constructor(t){super("addtrack"),this.track=t}},Gl=class extends Oe{fa(){return new Vl(this.Lt.va)}constructor(t){super(Rl.C_),this.Lt=t}},Vl=class extends Zs{constructor(t){super("removetrack"),this.track=t}};!function(t){t.O_="j_",t.z_="P_",t.B_="R_",t.U_="Q_",t.F_="Y_",t.G_="V_",t.ra="W_",t.H_="q_",t.X_="Z_",t.K_="Yn",t.J_="eg",t.rg="hg",t.QUALITY_UNAVAILABLE="qualityunavailable",t.NO_QUALITY="noquality"}(na||(na={}));var me=class extends Bo{get og(){return this.ag}get va(){return this.Xa||(this.Xa=this.fa()),this.Xa}get U(){return this.ag.length}cg(t){return this.ag[t]}tt(t){return!(!t||ae(this.ag,t))&&(this.ag.push(t),this.Xa&&this.Xa.push(t.va),t.yn(na.ra,this.Ds),this.Co(new Fl(t)),!0)}it(t){if(!t)return!1;const i=this.ag.indexOf(t);return!(i<0)&&(si(this.ag,i),this.Xa&&si(this.Xa,i),t.fn(na.ra,this.Ds),this.Co(new Gl(t)),!0)}dg(t){return ae(this.ag,t)}tr(){const t=this.ag;for(let i=t.length-1;i>=0;i-=1)this.it(t[i])}gn(){this.tr(),this.Vo()}constructor(){super(),this.ag=[],this.Xa=void 0}},Ji=class extends Oe{fa(){return new Wl(this.Lt.va)}constructor(t){super(na.ra),this.Lt=t}},Wl=class extends Zs{constructor(t){super("change"),this.track=t}},cl=class extends me{get fg(){return this._g}set fg(t){const i=this._g;if(t!==i){if(i){this.gg(i);for(const e of i.og)t&&t.dg(e)||this.it(e)}if(this._g=t,t){const i=[];for(const e of t.og)this.tt(e),this.wg(e)&&i.push(e);this.Ag(t);for(const t of i)t.Co(new Ji(t))}}}Ag(t){t.yn(Rl.L_,this.vg),t.yn(Rl.C_,this.pg)}gg(t){t.fn(Rl.L_,this.vg),t.fn(Rl.C_,this.pg)}gn(t){!t&&this._g&&this._g.gn(),super.gn()}constructor(){super(),this._g=void 0,this.vg=t=>{const i=t.Lt;this.tt(i)},this.pg=t=>{const i=t.Lt;this.it(i)}}},Hl=w.freeze||Ll;function Tl(t,i,e){w.defineProperty(t,i,{writable:!1,enumerable:!0,value:e})}function ql(t){return Hl(t)}function vi(t,i){for(const e of w.getOwnPropertyNames(i))w.defineProperty(t,e,w.getOwnPropertyDescriptor(i,e));return t}function ie(t){if(Nn(t)){const i={};for(const e in t)Xt.call(t,e)&&(i[e]=ie(t[e]));return i}if($(t)){const i=new Array(t.length);for(let e=0;e<i.length;e++)e in t&&(i[e]=ie(t[e]));return i}return t}function Xl(t,i){const e=i;for(const i in t){var s,n;if(Nn(t[i]))(s=e)[n=i]||(s[n]={}),Xl(t[i],e[i]);else Xt.call(e,i)||(e[i]=t[i])}return e}function Dh(t,i){return t===i||!(!t||!i)&&(!(!Mo(t)||!Mo(i))&&(tn(t)?!!tn(i)&&function(t,i){const e=t.length,s=i.length;if(e!==s)return!1;for(let s=0;s<e;s+=1)if(!Dh(t[s],i[s]))return!1;return!0}(t,i):!tn(i)&&function(t,i){const e=w.keys(t),s=w.keys(i);if(!e||!s||e.length!==s.length)return!1;for(const s of e)if(!Xt.call(i,s)||!Dh(t[s],i[s]))return!1;return!0}(t,i)))}function Zl(t,i){if(!Mo(t))return!1;for(const e of i)if(!(e in t))return!1;return!0}function Kl(t,i){return t.constructor===i.constructor}function Jl(t){const i={};for(const e of w.keys(t)){const s=t[e];null!=s&&(i[e]=s)}return i}function $l(t){const i={};for(const e of w.keys(t)){const s=t[e];if(tn(s)){const t=[];for(let i=0;i<s.length;i+=1){const e=s[i];if(null!=e){const i=Mo(e)?$l(e):e;t.push(i)}}i[e]=t}else null!=s&&(i[e]=Mo(s)?$l(s):s)}return i}function Ks(t){let i=t;if("string"==typeof i){if(i=i.toLowerCase(),"true"===i)return!0;if("false"===i)return!1}return Boolean(i)}function hu(t){return Dd(t)?Ks(t):void 0}function $h(t){return"string"==typeof t?""===t?NaN:Number(t):"boolean"==typeof t||null==t||t instanceof Date||"number"!=typeof Number(t)&&!t?NaN:Number(t)}function tf(t){const i=$h(t);if(S(i))throw new g("Expected a valid number.");return i}function jo(t){return"string"==typeof t?t:""}function ef(t,i){if(!tn(t))return[];const e=0|t.length,s=new Array(e);for(let n=0;n<e;n++)s[n]=i(t[n]);return s}function Fr(t,i){let e;return e=tn(t)?ef(t,i):i(t),e}var cc,sf=[Rl.L_,Rl.C_,na.ra];function nf(t){let i;const e=t.og.map((t=>t.va));return e.item=i=>{const e=0|i,s=t.cg(e);return s&&s.va||void 0},e.addEventListener=(t,e)=>{i.yn(t,e)},e.removeEventListener=(t,e)=>{i.fn(t,e)},i=new Mt(e),t.yn(sf,(t=>i.Co(t.va))),e}function rf(t){switch(t){case 0:return"caption";case 2:return"sign";case 1:return"description";case 3:return"enhanced audio intelligibility";case 4:return"easy reader";case 5:return"transcribes spoken dialog";case 6:return"describes music and sound";case 7:return"describes video"}}function hf(){}function Bs(t){const i=[na.K_,na.ra,na.J_,na.rg,na.QUALITY_UNAVAILABLE];let e;const s={get activeQuality(){return t.yg&&t.yg.va},get enabled(){return t.Rt},set enabled(i){t.Rt=Ks(i)},get id(){return t.o},get uid(){return t.Mg},get kind(){return t.zt},get label(){return t.kh},set label(i){t.kh=jo(i)},get accessibility(){var i,e;return null!=(e=null==(i=t.Tg)?void 0:i.map(rf))?e:[]},get language(){return t.gs},get qualities(){return t.Ng.va},set targetQuality(i){let e;e=i?function(t,i){const e=[];for(const s of t.Ng.og)for(const t of i)s.va===t&&e.push(s);return e}(t,$(i)?i:[i]):[],e.length>0?t.Dg=e:t.Dg=void 0},get targetQuality(){if(t.Dg)return 1===t.Dg.length?t.Dg[0].va:t.Dg.map((t=>t.va))},addEventListener(t,i){const s=Fr(t,jo);e.yn(s,i)},removeEventListener(t,i){const s=Fr(t,jo);e.fn(s,i)}};return e=new Mt(s),t.yn(i,(t=>e.Co(t.va))),w.defineProperty(s,"constructor",{value:hf}),s}function of(){}function af(t){const i=nf(t);return w.defineProperty(i,"constructor",{value:of}),i}!function(t){t[t.Sg=0]="Sg",t[t.Ig=1]="Ig",t[t.Eg=2]="Eg",t[t.Lg=3]="Lg",t[t.Cg=4]="Cg",t[t.TRANSCRIBES_SPOKEN_DIALOG=5]="TRANSCRIBES_SPOKEN_DIALOG",t[t.DESCRIBES_MUSIC_AND_SOUND=6]="DESCRIBES_MUSIC_AND_SOUND",t[t.xg=7]="xg"}(cc||(cc={}));var L,ut,ta=class extends cl{fa(){return af(this)}wg(t){return t.Rt}};function $r(t){if("string"==typeof t){const i=t.toLowerCase();switch(i){case"disabled":case"hidden":case"showing":return i}}else if("number"==typeof t)switch(t){case 0:return"disabled";case 1:return"hidden";case 2:return"showing"}return"disabled"}function uf(){}function cf(t){const i=[na.ra,na.K_,na.O_,na.z_,na.U_,na.F_,na.B_,na.G_,na.H_,na.X_],e=[ut.ha];let s;const n={get kind(){return t.zt},get label(){return t.kh},set label(i){t.kh=jo(i)},get language(){return t.gs},get id(){return t.o},get uid(){return t.Mg},get inBandMetadataTrackDispatchType(){return t.Og},get mode(){return t.jg},set mode(i){i!==L.Jn&&i!==L.zg&&i!==L.Ch||t.Pg(i)},get forced(){return Boolean(t.Bg)},get accessibility(){var i,e;return null!=(e=null==(i=t.Tg)?void 0:i.map(rf))?e:[]},get type(){return t.Rg},get readyState(){return t.Jf},get cues(){return t.jg===L.Ch?null:t.L.va},get activeCues(){return t.jg===L.Ch?null:t.q.va},get src(){return t.Ug||""},addEventListener(t,i){const e=Fr(t,jo);s.yn(e,i)},removeEventListener(t,i){const e=Fr(t,jo);s.fn(e,i)}};return s=new Mt(t),t.yn(i,(t=>s.Co(t.va))),t.yn(e,(t=>s.Co(t))),w.defineProperty(n,"constructor",{value:uf}),n}function df(){}function Ei(t){const i=nf(t);return w.defineProperty(i,"constructor",{value:df}),i}!function(t){t.Ch="disabled",t.zg="hidden",t.Jn="showing"}(L||(L={})),(ut||(ut={})).ha="error";var Co,Zt,lc=class extends cl{fa(){return Ei(this)}wg(t){return t.jg===L.Jn}};!function(t){t.Qg="Fg",t.Yg="Gg",t.Vg="contentprotectionerror",t.Wg="contentprotectionsuccess",t.Hg="currentsourcechange",t.qg="destroy",t.Xg="durationchange",t.Zg="emptied",t.Kg="encrypted",t.Jg="ended",t.$g="iw",t.ew="nw",t.hw="ow",t.aw="uw",t.cw="loadstart",t.dw="manifestupdate",t.lw="nosupportedrepresentationfound",t.fw="offline",t._w="online",t.Sh="pause",t.jh="play",t.gw="progress",t.ww="ratechange",t.Aw="representationchange",t.mw="resize",t.pw="seeked",t.yw="seeking",t.Mw="segmentnotfound",t.Tw="Nw",t.Dw="Sw",t.lo="sourcechange",t.Iw="timeupdate",t.Ew="volumechange",t.Lw="Cw",t.xw="metricschange"}(Co||(Co={})),function(t){t.Ow="canplay",t.jw="canplaythrough",t.zw="loadeddata",t.Pw="loadedmetadata",t.H_="readystatechange",t.Bw="waiting",t.Rw="playing"}(Zt||(Zt={}));var lf,Wn=["canplay","canplaythrough","loadeddata","loadedmetadata","readystatechange","waiting","playing"],mu=.92,ff=1.08,_f=.25;!function(t){t[t.Ch=0]="Ch",t[t.Uw=1]="Uw",t[t.Qw=2]="Qw"}(lf||(lf={}));var gf=class extends Bo{Fw(){this.Yw(),this.Gw=i.ul((()=>this.Vw()),500)}Yw(){void 0!==this.Gw&&(i.$d(this.Gw),this.Gw=void 0)}get Ww(){return this.Le&&0!==this.ja}get Hw(){return this.qw}get Xw(){return this.Zw}set Xw(t){this.Zw=t,this.Kw()}get Rt(){return this.Le}set Rt(t){this.Le=t,t?this.Cn():this.y_()}Jw(t){this.$w.push(t),this.Kw()}tA(t){_s(this.$w,t),this.Kw()}Kw(){this.qw=this.iA(),1===this.ja&&this.Vw()}Cn(){this.Le&&this.eA&&(1!==this.ja&&this.sA.yn(Co.Iw,this.Vw),this.Fw(),this.ja=1)}y_(){this.nA(),this.ja=0}m_(){this.nA(),this.ja=2}Qd(){this.y_(),this.ja=0,this.Qo.fn(Zt.Bw,this.rA),this.Vo()}nA(){1===this.ja&&(this.Yw(),this.sA.fn(Co.Iw,this.Vw),this.hA(1))}hA(t){this.canChangePlaybackRate()&&this.Qo.Gf!==t&&(this.Qo.Gf=t)}iA(){const t=this.oA+this.getMinimumLatencyMargin();var i;const e=[null!=(i=this.Zw)?i:this.aA,...this.$w],s=e.reduce(((t,i)=>{var e;return _.max(t,null!=(e=null==i?void 0:i.minimumOffset)?e:0)}),t),n=e.reduce(((t,i)=>{var e;return _.max(t,null!=(e=null==i?void 0:i.targetOffset)?e:0)}),s+_f),r=e.reduce(((t,i)=>{var e;return _.max(t,null!=(e=null==i?void 0:i.maximumOffset)?e:0)}),n+_f);return{minimumOffset:s,targetOffset:n,maximumOffset:r,forceSeekOffset:e.reduce(((t,i)=>{var e;return _.max(t,null!=(e=null==i?void 0:i.forceSeekOffset)?e:0)}),r+_f),minimumPlaybackRate:mu,maximumPlaybackRate:ff}}get uA(){return this.Qo.cA}constructor(t,e,s){super(),this.ja=0,this.Gw=void 0,this.oA=0,this.Le=!1,this.eA=!1,this.Zw=void 0,this.$w=[],this.rA=()=>{const t=this.sA.wf,i=this.sA.Mf,e=t.dA(i);e&&(this.oA=_.min(_.max(this.oA,e.jn(0)-i),.5),this.Kw())},this.lA=()=>{this.eA=!0,this.Qo.fn(Zt.Rw,this.lA),this.Le&&this.Cn()},this.Vw=()=>{this.Yw(),this.Fw();const t=this.uA;if(!t)return;if(t>this.qw.forceSeekOffset)return this.Co(new Yi("latencyrecoveryseek")),void this.fA();const{minimumOffset:e,targetOffset:s,maximumOffset:n}=this.qw,r=this.sA.Gf;t>n?this.hA(this.qw.maximumPlaybackRate):t<e&&!i.Ys._A?this.hA(this.qw.minimumPlaybackRate):(r>1&&t<s||r<1&&t>s)&&this.hA(1)},this.Qo=t,this.sA=e,this.aA=s,this.qw=s,this.Qo.yn(Zt.Bw,this.rA),this.Qo.yn(Zt.Rw,this.lA)}},wf=.25,Af=400,vf={minimumOffset:.2,targetOffset:.45,maximumOffset:.7,forceSeekOffset:3,minimumPlaybackRate:mu,maximumPlaybackRate:ff},mf={minimumOffset:.4,targetOffset:.65,maximumOffset:1,forceSeekOffset:3,minimumPlaybackRate:mu,maximumPlaybackRate:ff},pf={minimumOffset:.4,targetOffset:.7,maximumOffset:.9,forceSeekOffset:3,minimumPlaybackRate:mu,maximumPlaybackRate:ff},yf={minimumOffset:.2,targetOffset:.45,maximumOffset:1,forceSeekOffset:3,minimumPlaybackRate:mu,maximumPlaybackRate:ff},Mf={minimumOffset:.5,targetOffset:1.125,maximumOffset:1.75,forceSeekOffset:2.55,minimumPlaybackRate:mu,maximumPlaybackRate:ff};function Tf(){let t;return t=i.Ys._A?yf:i.Ys.gA?mf:i.Ys.wA?"Android"===i.vA.AA?pf:vf:Mf,i.vA.mA?function(t){if(i.vA.mA){const i=(Af+250)/1e3,e=_.max(i,t.minimumOffset),s=_.max(e+wf,t.targetOffset),n=_.max(s+wf,t.maximumOffset);return{minimumOffset:e,targetOffset:s,maximumOffset:n,forceSeekOffset:_.max(n+wf,t.forceSeekOffset),minimumPlaybackRate:mu,maximumPlaybackRate:ff}}return t}(t):t}function Nf(t){return{windowStart:t.minimumOffset,windowEnd:t.maximumOffset,target:t.targetOffset,maxOffset:t.forceSeekOffset}}var Df=class extends Bo{get pA(){return Nf(Tf())}get yA(){}get cA(){}get MA(){}get Ww(){return!1}get TA(){}get va(){var t;return null!=(t=this.Xa)?t:this.Xa=Sf(this)}fA(){}constructor(...t){super(...t),this.NA=void 0}};function Sf(t){return{goLive:()=>t.fA(),get isLive(){return t.Ww},get currentServerLiveTime(){return t.yA},get currentLatency(){return t.cA},get latencies(){return t.MA},get latency(){return t.pA},set latency(i){if(!function(t){if(!Mo(t))return!1;const i=t;return"number"==typeof i.target&&"number"==typeof i.windowEnd&&"number"==typeof i.windowStart&&"number"==typeof i.maxOffset&&(i.windowStart>=0&&i.windowStart<=i.target&&i.target<=i.windowEnd&&i.maxOffset>=i.windowEnd)}(i))throw new g("Invalid latency configuration");t.NA=i},get manifest(){return t.TA},addEventListener(i,e){t.yn(Ef(i),e)},removeEventListener(i,e){t.fn(Ef(i),e)}}}var If=["golive","latencyrecoveryseek"];function Ef(t){const i=Fr(t,jo);return(Qs(i)?[i]:i).filter((t=>ae(If,t)))}var Ia=class extends Bo{set fg(t){const i=this._g;t!==i&&(i&&this.gg(i),t&&this.Ag(t),this._g=t,this._g&&(this._g.NA=this.DA))}get fg(){return this._g}get va(){return this.Xa||(this.Xa=Sf(this)),this.Xa}Ag(t){t.yn(If,this.Ds)}gg(t){t.fn(If,this.Ds)}fA(){var t;null==(t=this._g)||t.fA()}get yA(){var t;return null==(t=this._g)?void 0:t.yA}get cA(){var t;return null==(t=this._g)?void 0:t.cA}get MA(){var t;return null==(t=this._g)?void 0:t.MA}get Ww(){return!!this._g&&this._g.Ww}get pA(){return this._g?this._g.pA:null!=(t=this.DA)?t:Nf(Tf());var t}get NA(){return this._g?this._g.NA:this.DA}set NA(t){this._g&&(this._g.NA=t),this.DA=t}get TA(){var t;return null==(t=this._g)?void 0:t.TA}gn(){this.Vo(),this._g&&this.gg(this._g),this._g=void 0}constructor(){super(),this._g=void 0,this.Xa=void 0,this.DA=void 0,this._g=void 0}};function Tt(){return Tt=w.assign||function(t){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var s in e)w.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s])}return t},Tt.apply(this,arguments)}var bf="function"==typeof String.prototype.replaceAll?(t,i,e)=>t.replaceAll(i,e):(t,i,e)=>t.split(i).join(e);function It(t,i){return Dd(t)&&-1!==t.indexOf(i)}var D="function"==typeof String.prototype.startsWith?(t,i)=>Dd(t)&&t.startsWith(i):(t,i)=>Dd(t)&&t.substr(0,i.length)===i,Rh="function"==typeof String.prototype.endsWith?(t,i)=>Dd(t)&&t.endsWith(i):(t,i)=>Dd(t)&&t.substr(t.length-i.length,i.length)===i;function Ts(t,i){return t.length===i.length&&t.toUpperCase()===i.toUpperCase()}var Lf="function"==typeof String.prototype.repeat?(t,i)=>t.repeat(i):(t,i)=>{let e=0|i;if(0===t.length||0===e)return"";let s=t,n="";for(;1==(1&e)&&(n+=s),e>>>=1,0!==e;)s+=s;return n},eu="function"==typeof String.prototype.padStart?(t,i,e)=>(void 0===e&&(e=" "),t.padStart(i,e)):(t,i,e)=>{void 0===e&&(e=" ");let s=e;const n=(0|i)-t.length;return n<=0?t:(n>s.length&&(s+=Lf(s,n/s.length)),s.slice(0,n)+t)},kf=(String.prototype.padEnd,16384),Cf="function"==typeof String.fromCodePoint?t=>t.length<=kf?String.fromCodePoint(...t):Of(t,String.fromCodePoint):t=>{const i=[];for(let e of t)e>65535&&(e-=65536,i.push(e>>>10&1023|55296),e=56320|1023&e),i.push(e);return xf(i)};function xf(t){return t.length<=kf?String.fromCharCode(...t):Of(t,String.fromCharCode)}function Of(t,i){const e=[];for(let s=0;s<t.length;s+=kf)e.push(i(...t.slice(s,s+kf)));return e.join("")}function jf(t){return t.replace(/[\\"]/g,(t=>"\\"+t))}function Ra(t,e){const s=i.Dh(t);return zf(s,e),s.toString()}function zf(t,i){for(const e of w.keys(i))t.searchParams.set(e,i[e])}function Wa(t,e){let s=i.SA(t);return e&&!Rh(s,"/")&&(s+="/"),s}var Pf=/cache:(.+)?(?=&|$)/,Bf="http://webcache.googleusercontent.com/search?q=cache:";function Rf(t){if(!D(t,Bf))return"";const e=i.Dh(t).search.match(Pf);return e&&e.length>1?e[1]:""}function Uf(t){return i.Dh(".",t)}var Qf,ms,yi,Ff="8E80B9CE";function Yf(t){return{appID:t&&t.appID?jo(t.appID):Ff}}function Gf(t){if(null!==t)return t}function Vf(t){const e={apiKey:t.apiKey,integration:t.integration,streamActivityMonitorID:Gf(t.streamActivityMonitorID),adTagParameters:Mo(t.adTagParameters)?t.adTagParameters:{},authToken:Gf(t.authToken),omidAccessModeRules:Gf(t.omidAccessModeRules)};if("vod"===(null==t?void 0:t.availabilityType)||function(t){const i=t;return Boolean(i.videoID&&i.contentSourceID)}(t)){const s=t.videoID,n=t.contentSourceID;return s?n?Tt({},e,{availabilityType:"vod",videoID:s,contentSourceID:n}):void i.IA("A VOD DAI configuration was provided without valid contentSourceID which is required."):void i.IA("A VOD DAI configuration was provided without valid videoID which is required.")}if("live"===(null==t?void 0:t.availabilityType)||function(t){const i=t;return Boolean(i.assetKey)}(t)){const s=t.assetKey;return s?Tt({},e,{availabilityType:"live",assetKey:s}):void i.IA("A Live DAI configuration was provided without valid assetKey which is required.")}i.IA("A DAI configuration was provided without a valid availabilityType which is required.")}function Wf(t){switch(t.integration){case"google-dai":return Vf(t);case"imagine":return function(t){return{integration:t.integration}}(t);case"yospace":return function(t){var i;return{integration:t.integration,streamType:null!=(i=t.streamType)?i:void 0}}(t);default:return{integration:t.integration}}}!function(t){t.AUTO="auto",t.MANUAL="manual",t.DISABLED="disabled"}(Qf||(Qf={})),function(t){t.EA="",t.bA="anonymous",t.LA="use-credentials"}(ms||(ms={})),function(t){t.kA="application/dash+xml",t.CA="application/vnd.apple.mpegurl",t.xA="application/x-mpegurl",t.OA="video/mp4",t.jA="application/vnd.theoplayer.hesp+json",t.zA="application/vnd.theo.hesp+json"}(yi||(yi={}));var ge,We,Hf="titanium",qf="conax",Xf="ezdrm",Dn="irdeto",Zf="vudrm",Kf="verimatrix",Jf="keyos",$f="drmtoday",t_="expressplay",Hs="azure",On="xstream",i_="vimond",e_="axinom",s_="uplynk",n_="comcast",r_="custom";function h_(t,i){if(null==t)return{};var e,s,n={},r=w.keys(t);for(s=0;s<r.length;s++)e=r[s],i.indexOf(e)>=0||(n[e]=t[e]);return n}function o_(t){return Dd(t.token&&t.deviceId)}function a_(t){var i;const e=null==(i=t.fairplay)?void 0:i.headers;return void 0!==e&&Dd(e.PreAuthorization)}function u_(t){const i=t;return o_(i)&&""!==i.token&&""!==i.deviceId&&!a_(i)}!function(t){t.PA="playready",t.BA="widevine",t.RA="fairplay",t.UA="clearkey",t.QA="aes128"}(ge||(ge={})),function(t){t.FA=!1,t.YA=!1,t.GA=!1,t.VA=!1,t.LOG_ADS_DETAILS=!1,t.LOG_CHROMECAST_DETAILS=!1,t.LOG_CUSTOM_DRM=!1,t.LOG_BUFFERING_VIDEO_MAIN=!1,t.LOG_BUFFERING_VIDEO_SELECTION=!1,t.LOG_BUFFERING_AUDIO_MAIN=!1,t.LOG_BUFFERING_AUDIO_SELECTION=!1,t.WA=!1,t.HA=!1,t.LOG_LCEVC_DETAILS=!1}(We||(We={}));var $i=class extends Jo{get name(){return"THEOplayerError"}get category(){return Mh.fromCode(this.code)}constructor(t,i,e){super(i,e),this.code=t}};function c_(t,i){return t instanceof $i?t:t instanceof g?new $i(i,t.message,t):new $i(i,String(t))}var Or=class extends $i{get name(){return"ContentProtectionError"}constructor(t,i,e,s,n,r,h,o){super(t,i,e),this.url=s,this.status=n,this.statusText=r,this.response=h,this.systemCode=o}};var d_,l_=class{get qA(){return this.XA}get ZA(){return this.KA}JA(t){return function(t){const i=t.onCertificateRequest;if(void 0!==i&&"function"!=typeof i)throw new b("ContentProtectionIntegration.onCertificateRequest is not a function.");const e=t.onCertificateResponse;if(void 0!==e&&"function"!=typeof e)throw new b("ContentProtectionIntegration.onCertificateResponse is not a function.");const s=t.onLicenseRequest;if(void 0!==s&&"function"!=typeof s)throw new b("ContentProtectionIntegration.onLicenseRequest is not a function.");const n=t.onLicenseResponse;if(void 0!==n&&"function"!=typeof n)throw new b("ContentProtectionIntegration.onLicenseResponse is not a function.");const r=t.extractFairplayContentId;if(void 0!==r&&"function"!=typeof r)throw new b("ContentProtectionIntegration.extractFairplayContentId is not a function.");return t}(this.$A.build(t))}constructor(t,i,e){this.XA=t,this.KA=i,this.$A=e}};!function(t){t.FAILED="FAILED",t.OVERRIDDEN="OVERRIDDEN",t.SUCCEEDED="SUCCEEDED"}(d_||(d_={}));var f_,_u=class{registerContentProtectionIntegration(t,e,s){switch(this.rv(t,e,s)){case d_.FAILED:throw new Or(td.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The keySystem should be 'widevine', 'playready' or 'fairplay', but was "+e+".");case d_.OVERRIDDEN:{const s=Li(e);i.IA("Warning: Overwriting an earlier registered integration for "+t+" and "+s+".");break}case d_.SUCCEEDED:Li(e);0;break}}rv(t,i,e){const s=Li(i);if(!s)return d_.FAILED;let n=d_.SUCCEEDED;for(const i of this.hv.slice())i.qA===t&&i.ZA===s&&(n=d_.OVERRIDDEN,_s(this.hv,i));return this.hv.push(new l_(t,s,e)),n}ov(t,i){return void 0!==this.uv(t,i)}fv(t,i,e){const s=this.uv(t,i);if(!s)throw g("No ContentProtectionIntegrationInit was found for integration id "+t+" and key system "+i);return s.JA(e)}uv(t,i){for(const e of this.hv)if(e.qA===t&&(!i||e.ZA===i))return e}constructor(){this.hv=[]}};_u._v=new _u,function(t){t.PA="9a04f079-9840-4286-ab92-e65be0885f95",t.BA="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",t.UA="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",t.RA="94ce86fb-07ff-4f43-adb8-93d2fa968ca2"}(f_||(f_={}));var he,__,au,ci,rr,g_="urn:mpeg:dash:mp4protection:2011",nr="cenc",w_="sinf",zn="skd",A_="9a04f079-9840-4286-ab92-e65be0885f95",Xs="urn:uuid:"+A_,v_="com.microsoft.playready",m_="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",Ht="urn:uuid:"+m_,p_="com.widevine.alpha",y_="1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",M_="urn:uuid:"+y_,Ii="94ce86fb-07ff-4f43-adb8-93d2fa968ca2",xa="urn:uuid:"+Ii,T_="com.apple.fps.1_0",N_="com.apple.streamingkeydelivery",D_="identity";!function(t){t.Av="moov",t.vv="mvhd",t.mv="trak",t.pv="tkhd",t.yv="mdia",t.Mv="mdhd",t.Tv="hdlr",t.Nv="minf",t.Dv="stbl",t.Sv="stsd",t.Iv="stsc",t.Ev="mvex",t.bv="trex",t.Lv="avc1",t.Cv="avcC",t.xv="hev1",t.Ov="hvc1",t.zv="hvcC",t.Pv="vp09",t.Bv="vpcC",t.Rv="av01",t.Uv="av1C",t.Qv="colr",t.Fv="pasp",t.Yv="mp4a",t.Gv="esds",t.Vv="wvtt",t.Wv="vttC",t.Hv="vlab",t.qv="enca",t.Xv="encv",t.Zv="moof",t.Kv="mfhd",t.Jv="traf",t.$v="tfhd",t.tm="trun",t.im="tfdt",t.nm="senc",t.hm="mdat",t.um="pssh",t.dm="emsg",t.lm="sidx",t.fm="styp",t._m="ftyp",t.gm="sinf",t.wm="frma"}(he||(he={})),function(t){t.Am="vide",t.vm="soun",t.pm="subt",t.ym="hint",t.Mm="meta",t.Tm="auxv"}(__||(__={})),function(t){t.ON_SCREEN_COLOURS="nclx",t.RESTRICTED_ICC_PROFILE="rICC",t.UNRESTRICED_ICC_PROFILE="prof"}(au||(au={})),function(t){t[t.BASE_DATA_OFFSET_PRESENT=1]="BASE_DATA_OFFSET_PRESENT",t[t.SAMPLE_DESCRIPTION_INDEX_PRESENT=2]="SAMPLE_DESCRIPTION_INDEX_PRESENT",t[t.DEFAULT_SAMPLE_DURATION_PRESENT=8]="DEFAULT_SAMPLE_DURATION_PRESENT",t[t.DEFAULT_SAMPLE_SIZE_PRESENT=16]="DEFAULT_SAMPLE_SIZE_PRESENT",t[t.DEFAULT_SAMPLE_FLAGS_PRESENT=32]="DEFAULT_SAMPLE_FLAGS_PRESENT",t[t.DURATION_IS_EMPTY=65536]="DURATION_IS_EMPTY",t[t.DEFAULT_BASE_IS_MOOF=131072]="DEFAULT_BASE_IS_MOOF"}(ci||(ci={})),function(t){t[t.DATA_OFFSET_PRESENT=1]="DATA_OFFSET_PRESENT",t[t.FIRST_SAMPLE_FLAGS_PRESENT=4]="FIRST_SAMPLE_FLAGS_PRESENT",t[t.SAMPLE_DURATION_PRESENT=256]="SAMPLE_DURATION_PRESENT",t[t.SAMPLE_SIZE_PRESENT=512]="SAMPLE_SIZE_PRESENT",t[t.SAMPLE_FLAGS_PRESENT=1024]="SAMPLE_FLAGS_PRESENT",t[t.SAMPLE_COMPOSITION_TIME_OFFSET_PRESENT=2048]="SAMPLE_COMPOSITION_TIME_OFFSET_PRESENT"}(rr||(rr={}));var S_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),I_=16383,E_=/[\t\n\f\r ]/g;function b_(t){return 43===t?62:47===t?63:t>=48&&t<=57?t-48+52:t>=65&&t<=90?t-65:t>=97&&t<=122?t-97+26:L_()}function L_(){throw new g("Invalid base64 input")}function Ae(t){let i=t;E_.test(i)&&(i=i.replace(E_,""));let e=i.length;e%4==0&&e>=1&&"="===i[e-1]&&(e>=2&&"="===i[e-2]?e-=2:e-=1,i=i.substr(0,e));const s=e%4;if(1===s)return L_();const n=0===s?0:4-s,r=new j(function(t,i){return 3*(t+i)/4-i}(e,n)),h=n>0?e-4:e;let o,a=0,u=0;for(;a<h;a+=4)o=b_(i.charCodeAt(a))<<18|b_(i.charCodeAt(a+1))<<12|b_(i.charCodeAt(a+2))<<6|b_(i.charCodeAt(a+3)),r[u++]=o>>16&255,r[u++]=o>>8&255,r[u++]=255&o;return 2===n?(o=b_(i.charCodeAt(a))<<2|b_(i.charCodeAt(a+1))>>4,r[u++]=255&o):1===n&&(o=b_(i.charCodeAt(a))<<10|b_(i.charCodeAt(a+1))<<4|b_(i.charCodeAt(a+2))>>2,r[u++]=o>>8&255,r[u++]=255&o),r}function k_(t,i,e){return S_[t>>2]+S_[(3&t)<<4|i>>4]+S_[(15&i)<<2|e>>6]+S_[63&e]}function C_(t,i,e){const s=[];for(let n=i;n<e;n+=3)s.push(k_(t[n],t[n+1],t[n+2]));return s.join("")}function jc(t){const i=t.length,e=i%3,s=[],n=i-e;for(let i=0;i<n;i+=I_)s.push(C_(t,i,_.min(n,i+I_)));if(1===e){const e=t[i-1];s.push(S_[e>>2]+S_[(3&e)<<4]+"==")}else if(2===e){const e=t[i-2],n=t[i-1];s.push(S_[e>>2]+S_[(3&e)<<4|n>>4]+S_[(15&n)<<2]+"=")}return s.join("")}function x_(t){return t.replace(/\+/g,"-").replace(/\//g,"_").replace(/[=]/g,"")}var O_=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object DataView]"],Ja=ArrayBuffer.isView||(t=>t&&ae(O_,Qc.call(t)));function yu(t,i){if(t===i)return!0;if(t.byteLength!==i.byteLength)return!1;return ne(new j(t),new j(i))}function ne(t,i){if(t===i)return!0;if(t.byteLength!==i.byteLength)return!1;for(let e=0;e<t.length;e+=1)if(t[e]!==i[e])return!1;return!0}function Qt(t){const i=t.reduce(((t,i)=>t+i.byteLength),0);return j_(t,i)}function j_(t,i){const e=new j(i);let s=0;for(const i of t)e.set(i,s),s+=i.byteLength;return e}function z_(t,i,e){const s=new j(t.byteLength+i.byteLength),n=Ig(t,0,e),r=Ig(t,e);return s.set(n),s.set(i,e),s.set(r,e+i.byteLength),s}function za(t){return Ae(t).buffer}function P_(t){return jc(new j(t))}function $a(t){return jc(fu(t))}function Qh(t,i){const e=i.Ku,s=t.getUint8(e>>3),n=1<<7-(7&e);return i.Nm(1),(s&n)===n?1:0}function Ri(t,i,e){let s=0;for(let n=0;n<e;n++)s=2*s+Qh(t,i);return s}var B_=class t{get Ku(){return this.Zu}Nm(t){this.Zu+=t}Dm(t){this.Zu=t}Sm(){return new t(this.Ku)}constructor(t=0){this.Zu=t}};var R_=_.clz32||function(t){let i=32,e=t>>16;return e&&(i-=16,t=e),e=t>>8,e&&(i-=8,t=e),e=t>>4,e&&(i-=4,t=e),e=t>>2,e&&(i-=2,t=e),e=t>>1,e?i-2:i-t},hi=null;try{hi=new WebAssembly.Instance(new WebAssembly.Module(new j([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(r){}function _i(t,i,e){this.low=0|t,this.high=0|i,this.unsigned=!!e}function ya(t){return!0===(t&&t.Im)}function U_(t){var i=_.clz32(t&-t);return t?31-i:i}_i.prototype.Im,w.defineProperty(_i.prototype,"Im",{value:!0}),_i.isLong=ya;var Q_={},F_={};function Hn(t,i){var e,s,n;return i?(n=0<=(t>>>=0)&&t<256)&&(s=F_[t])?s:(e=ss(t,0,!0),n&&(F_[t]=e),e):(n=-128<=(t|=0)&&t<128)&&(s=Q_[t])?s:(e=ss(t,t<0?-1:0,!1),n&&(Q_[t]=e),e)}function ni(t,i){if(S(t))return i?Z_:Ir;if(i){if(t<0)return Z_;if(t>=H_)return tg}else{if(t<=-q_)return du;if(t+1>=q_)return $_}return t<0?ni(-t,i).neg():ss(t%W_|0,t/W_|0,i)}function ss(t,i,e){return new _i(t,i,e)}_i.fromInt=Hn,_i.fromNumber=ni,_i.fromBits=ss;var Y_=_.pow;function G_(t,i,e){if(0===t.length)throw g("empty string");if("number"==typeof i?(e=i,i=!1):i=!!i,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return i?Z_:Ir;if((e=e||10)<2||36<e)throw RangeError("radix");var s;if((s=t.indexOf("-"))>0)throw g("interior hyphen");if(0===s)return G_(t.substring(1),i,e).neg();for(var n=ni(Y_(e,8)),r=Ir,h=0;h<t.length;h+=8){var o=_.min(8,t.length-h),a=x(t.substring(h,h+o),e);if(o<8){var u=ni(Y_(e,o));r=r.mul(u).add(ni(a))}else r=(r=r.mul(n)).add(ni(a))}return r.unsigned=i,r}function V_(t,i){return"number"==typeof t?ni(t,i):"string"==typeof t?G_(t,i):ss(t.low,t.high,"boolean"==typeof i?i:t.unsigned)}_i.fromString=G_,_i.fromValue=V_;var W_=4294967296,H_=W_*W_,q_=H_/2,X_=Hn(1<<24),Ir=Hn(0);_i.ZERO=Ir;var Z_=Hn(0,!0);_i.UZERO=Z_;var Cs=Hn(1);_i.ONE=Cs;var K_=Hn(1,!0);_i.UONE=K_;var J_=Hn(-1);_i.NEG_ONE=J_;var $_=ss(-1,2147483647,!1);_i.MAX_VALUE=$_;var tg=ss(-1,-1,!0);_i.MAX_UNSIGNED_VALUE=tg;var du=ss(0,-2147483648,!1);_i.MIN_VALUE=du;var To=_i.prototype;To.toInt=function(){return this.unsigned?this.low>>>0:this.low},To.toNumber=function(){return this.unsigned?(this.high>>>0)*W_+(this.low>>>0):this.high*W_+(this.low>>>0)},To.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(du)){var i=ni(t),e=this.div(i),s=e.mul(i).sub(this);return e.toString(t)+s.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var n=ni(Y_(t,6),this.unsigned),r=this,h="";;){var o=r.div(n),a=(r.sub(o.mul(n)).toInt()>>>0).toString(t);if((r=o).isZero())return a+h;for(;a.length<6;)a="0"+a;h=""+a+h}},To.getHighBits=function(){return this.high},To.getHighBitsUnsigned=function(){return this.high>>>0},To.getLowBits=function(){return this.low},To.getLowBitsUnsigned=function(){return this.low>>>0},To.getNumBitsAbs=function(){if(this.isNegative())return this.eq(du)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,i=31;i>0&&0==(t&1<<i);i--);return 0!=this.high?i+33:i+1},To.isZero=function(){return 0===this.high&&0===this.low},To.eqz=To.isZero,To.isNegative=function(){return!this.unsigned&&this.high<0},To.isPositive=function(){return this.unsigned||this.high>=0},To.isOdd=function(){return 1==(1&this.low)},To.isEven=function(){return 0==(1&this.low)},To.equals=function(t){return ya(t)||(t=V_(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},To.eq=To.equals,To.notEquals=function(t){return!this.eq(t)},To.neq=To.notEquals,To.ne=To.notEquals,To.lessThan=function(t){return this.comp(t)<0},To.lt=To.lessThan,To.lessThanOrEqual=function(t){return this.comp(t)<=0},To.lte=To.lessThanOrEqual,To.le=To.lessThanOrEqual,To.greaterThan=function(t){return this.comp(t)>0},To.gt=To.greaterThan,To.greaterThanOrEqual=function(t){return this.comp(t)>=0},To.gte=To.greaterThanOrEqual,To.ge=To.greaterThanOrEqual,To.compare=function(t){if(ya(t)||(t=V_(t)),this.eq(t))return 0;var i=this.isNegative(),e=t.isNegative();return i&&!e?-1:!i&&e?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},To.comp=To.compare,To.negate=function(){return!this.unsigned&&this.eq(du)?du:this.not().add(Cs)},To.neg=To.negate,To.add=function(t){ya(t)||(t=V_(t));var i=this.high>>>16,e=65535&this.high,s=this.low>>>16,n=65535&this.low,r=t.high>>>16,h=65535&t.high,o=t.low>>>16,a=0,u=0,c=0,d=0;return c+=(d+=n+(65535&t.low))>>>16,u+=(c+=s+o)>>>16,a+=(u+=e+h)>>>16,a+=i+r,ss((c&=65535)<<16|(d&=65535),(a&=65535)<<16|(u&=65535),this.unsigned)},To.subtract=function(t){return ya(t)||(t=V_(t)),this.add(t.neg())},To.sub=To.subtract,To.multiply=function(t){if(this.isZero())return this;if(ya(t)||(t=V_(t)),hi)return ss(hi.mul(this.low,this.high,t.low,t.high),hi.get_high(),this.unsigned);if(t.isZero())return this.unsigned?Z_:Ir;if(this.eq(du))return t.isOdd()?du:Ir;if(t.eq(du))return this.isOdd()?du:Ir;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(X_)&&t.lt(X_))return ni(this.toNumber()*t.toNumber(),this.unsigned);var i=this.high>>>16,e=65535&this.high,s=this.low>>>16,n=65535&this.low,r=t.high>>>16,h=65535&t.high,o=t.low>>>16,a=65535&t.low,u=0,c=0,d=0,l=0;return d+=(l+=n*a)>>>16,c+=(d+=s*a)>>>16,d&=65535,c+=(d+=n*o)>>>16,u+=(c+=e*a)>>>16,c&=65535,u+=(c+=s*o)>>>16,c&=65535,u+=(c+=n*h)>>>16,u+=i*a+e*o+s*h+n*r,ss((d&=65535)<<16|(l&=65535),(u&=65535)<<16|(c&=65535),this.unsigned)},To.mul=To.multiply,To.divide=function(t){if(ya(t)||(t=V_(t)),t.isZero())throw g("division by zero");var i,e,s;if(hi)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?ss((this.unsigned?hi.div_u:hi.div_s)(this.low,this.high,t.low,t.high),hi.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?Z_:Ir;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return Z_;if(t.gt(this.shru(1)))return K_;s=Z_}else{if(this.eq(du))return t.eq(Cs)||t.eq(J_)?du:t.eq(du)?Cs:(i=this.shr(1).div(t).shl(1)).eq(Ir)?t.isNegative()?Cs:J_:(e=this.sub(t.mul(i)),s=i.add(e.div(t)));if(t.eq(du))return this.unsigned?Z_:Ir;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();s=Ir}for(e=this;e.gte(t);){i=_.max(1,_.floor(e.toNumber()/t.toNumber()));for(var n=_.ceil(_.log(i)/_.LN2),r=n<=48?1:Y_(2,n-48),h=ni(i),o=h.mul(t);o.isNegative()||o.gt(e);)o=(h=ni(i-=r,this.unsigned)).mul(t);h.isZero()&&(h=Cs),s=s.add(h),e=e.sub(o)}return s},To.div=To.divide,To.modulo=function(t){return ya(t)||(t=V_(t)),hi?ss((this.unsigned?hi.rem_u:hi.rem_s)(this.low,this.high,t.low,t.high),hi.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},To.mod=To.modulo,To.rem=To.modulo,To.not=function(){return ss(~this.low,~this.high,this.unsigned)},To.countLeadingZeros=function(){return this.high?_.clz32(this.high):_.clz32(this.low)+32},To.clz=To.countLeadingZeros,To.countTrailingZeros=function(){return this.low?U_(this.low):U_(this.high)+32},To.ctz=To.countTrailingZeros,To.and=function(t){return ya(t)||(t=V_(t)),ss(this.low&t.low,this.high&t.high,this.unsigned)},To.or=function(t){return ya(t)||(t=V_(t)),ss(this.low|t.low,this.high|t.high,this.unsigned)},To.xor=function(t){return ya(t)||(t=V_(t)),ss(this.low^t.low,this.high^t.high,this.unsigned)},To.shiftLeft=function(t){return ya(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?ss(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):ss(0,this.low<<t-32,this.unsigned)},To.shl=To.shiftLeft,To.shiftRight=function(t){return ya(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?ss(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):ss(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},To.shr=To.shiftRight,To.shiftRightUnsigned=function(t){return ya(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?ss(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):ss(32===t?this.high:this.high>>>t-32,0,this.unsigned)},To.shru=To.shiftRightUnsigned,To.shr_u=To.shiftRightUnsigned,To.rotateLeft=function(t){var i;return ya(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?ss(this.high,this.low,this.unsigned):t<32?(i=32-t,ss(this.low<<t|this.high>>>i,this.high<<t|this.low>>>i,this.unsigned)):(i=32-(t-=32),ss(this.high<<t|this.low>>>i,this.low<<t|this.high>>>i,this.unsigned))},To.rotl=To.rotateLeft,To.rotateRight=function(t){var i;return ya(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?ss(this.high,this.low,this.unsigned):t<32?(i=32-t,ss(this.high<<i|this.low>>>t,this.low<<i|this.high>>>t,this.unsigned)):(i=32-(t-=32),ss(this.low<<i|this.high>>>t,this.high<<i|this.low>>>t,this.unsigned))},To.rotr=To.rotateRight,To.toSigned=function(){return this.unsigned?ss(this.low,this.high,!1):this},To.toUnsigned=function(){return this.unsigned?this:ss(this.low,this.high,!0)},To.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},To.toBytesLE=function(){var t=this.high,i=this.low;return[255&i,i>>>8&255,i>>>16&255,i>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},To.toBytesBE=function(){var t=this.high,i=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,i>>>24,i>>>16&255,i>>>8&255,255&i]},_i.fromBytes=function(t,i,e){return e?_i.fromBytesLE(t,i):_i.fromBytesBE(t,i)},_i.fromBytesLE=function(t,i){return new _i(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,i)},_i.fromBytesBE=function(t,i){return new _i(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],i)};var Ce=_i;function ig(t,i){return t.lessThan(i)?t:i}function eg(t){if(t>=55296&&t<=57343)throw new g("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function sg(t,i){return t>>i&63|128}function ng(t,i){0!=(4294967168&t)?(0==(4294965248&t)?i.push(t>>6&31|192):0==(4294901760&t)?(eg(t),i.push(t>>12&15|224),i.push(sg(t,6))):0==(4292870144&t)&&(i.push(t>>18&7|240),i.push(sg(t,12)),i.push(sg(t,6))),i.push(63&t|128)):i.push(t)}function Js(t,i){if(i.Ku>=t.length)throw new g("Invalid byte index");const e=255&t[i.Ku];if(i.Nm(1),128==(192&e))return 63&e;throw new g("Invalid continuation byte")}function rg(t,i){const e=i.Ku;if(e>t.length)throw new g("Invalid byte index");if(e===t.length)return!1;const s=255&t[e];if(i.Nm(1),0==(128&s))return s;if(192==(224&s)){const e=(31&s)<<6|Js(t,i);if(e>=128)return e;throw new g("Invalid continuation byte")}if(224==(240&s)){const e=(15&s)<<12|Js(t,i)<<6|Js(t,i);if(e>=2048)return eg(e),e;throw new g("Invalid continuation byte")}if(240==(248&s)){const e=(7&s)<<18|Js(t,i)<<12|Js(t,i)<<6|Js(t,i);if(e>=65536&&e<=1114111)return e}throw new g("Invalid UTF-8 detected")}var hg=65279;var og=[128,64,32,16,8,4,2,1],ws=class{Em(t){return ag(this.Lm,t)}constructor(t){this.Lm=t}};function ag(t,i){return(t&i)===i}function Xu(t,i){return ag(t,og[i])}function ha(t,i){const e=t.getUint8(i.Ku);return i.Nm(1),e}function ug(t,i,e){t.setUint8(i.Ku,e),i.Nm(1)}function Jc(t,i,e){const s=Ig($t(t),i.Ku,i.Ku+e);return i.Nm(s.byteLength),s}function cg(t,i,e){$t(t).set($t(e),i.Ku),i.Nm(e.byteLength)}function dg(t,i,e){return i.Ku+e<=t.byteLength}function As(t,i,e,s){return void 0===s&&(s=!1),s?function(t,i,e){let s=0,n=1;for(let r=0;r<e;r++)s+=ha(t,i)*n,n*=256;return s}(t,i,e):function(t,i,e){let s=0;for(let n=0;n<e;n++)s=256*s+ha(t,i);return s}(t,i,e)}function lg(t,i,e){void 0===e&&(e=!1);const s=t.getUint16(i.Ku,e);return i.Nm(2),s}function fg(t,i,e,s){void 0===s&&(s=!1),t.setUint16(i.Ku,e,s),i.Nm(2)}function cs(t,i,e){void 0===e&&(e=!1);const s=t.getUint32(i.Ku,e);return i.Nm(4),s}function sc(t,i,e,s){void 0===s&&(s=!1),t.setUint32(i.Ku,e,s),i.Nm(4)}function io(t,i,e){void 0===e&&(e=!1);const s=cs(t,i,e),n=cs(t,i,e),r=e?n:s,h=e?s:n;return Ce.fromBits(h,r,!0)}function _g(t,i,e,s){void 0===s&&(s=!1);const n=e.getHighBitsUnsigned(),r=e.getLowBitsUnsigned(),h=s?n:r;sc(t,i,s?r:n,s),sc(t,i,h,s)}function gg(t,i){return Vu(t,i)}function ia(t,i,e){return xf(bg(Jc(t,i,e)))}function wg(t,i){const e=ha(t,i);let s;return 0==(128&e)?s=e:192==(224&e)?s=64*(31&e)+(63&ha(t,i)):224==(240&e)?s=4096*(15&e)+64*(63&ha(t,i))+(63&ha(t,i)):240==(248&e)&&(s=262144*(7&e)+4096*(63&ha(t,i))+64*(63&ha(t,i))+(63&ha(t,i))),s}function Vu(t,i){return Ag(t,i,!0)}function Ag(t,i,e){const s=[];for(;i.Ku<t.byteLength;){const n=ha(t,i);if(e&&!n)break;s.push(n)}return xf(s)}function vg(t,i,e){const s=e.length;for(let n=0;n<s;n+=1){ug(t,i,e.charCodeAt(n))}}function mg(t,i){if(!(i.Ku+2<=t.byteLength))return;const e=t.getUint8(i.Ku),s=t.getUint8(i.Ku+1);return(254!==e||255!==s)&&(255===e&&254===s||void 0)}function pg(t,i){const e=mg(t,i);return void 0!==e&&i.Nm(2),gu(t,i,!0===e)}function gu(t,i,e){return void 0===e&&(e=!1),yg(t,i,e,!0)}function yg(t,i,e,s){const n=[];for(;i.Ku+2<=t.byteLength;){const r=lg(t,i,e);if(s&&!r)break;n.push(r)}return xf(n)}function Mg(t,i,e,s){void 0===s&&(s=!1);const n=e.length;for(let r=0;r<n;r+=1){fg(t,i,e.charCodeAt(r),s)}}function $s(t){return Ag(hl(t),new Ha,!1)}function fu(t){const i=new j(t.length);return vg(hl(i),new Ha,t),i}function Tg(t,i){return void 0===i&&(i=!1),yg(hl(t),new Ha,i,!1)}function Ng(t,i){void 0===i&&(i=!1);const e=new j(2*t.length);return Mg(hl(e),new Ha,t,i),e}function Dg(t,i){return i.Ku+3<=t.byteLength&&(239===t.getUint8(i.Ku)&&187===t.getUint8(i.Ku+1)&&191===t.getUint8(i.Ku+2))}function Ya(t,i){return function(t,i,e){const s=[],n=Dg(t,i);n&&i.Nm(3);for(;i.Ku<t.byteLength;){const n=wg(t,i);if(void 0===n)break;if(e&&0===n)break;s.push(n)}return Cf(s)}(t,i,!0)}function $e(t){return function(t){return Cf(t)}(function(t,i){const e=[],s=new Ha;let n;if(!i){if(n=rg(t,s),!1===n)return e;n===hg||e.push(n)}for(;!1!==(n=rg(t,s));)e.push(n);return e}($t(t)))}function bu(t){return new j(function(t){const i=[];for(const e of t)ng(e,i);return i}(function(t){const i=[];let e=0;const s=t.length;for(;e<s;){const n=t.charCodeAt(e++);if(n>=55296&&n<=56319&&e<s){const s=t.charCodeAt(e++);56320==(64512&s)?i.push(((1023&n)<<10)+(1023&s)+65536):(i.push(n),e--)}else i.push(n)}return i}(t)))}function Sg(t,i){if(Dg(t,i))return Ya(t,i);if(void 0!==mg(t,i))return pg(t,i);if(i.Ku+4<=t.byteLength){if(0===t.getUint8(i.Ku)&&0===t.getUint8(i.Ku+2))return gu(t,i,!1);if(0===t.getUint8(i.Ku+1)&&0===t.getUint8(i.Ku+3))return gu(t,i,!0)}return Ya(t,i)}function Ig(t,i,e){return void 0===i&&(i=0),void 0===e&&(e=t.byteLength),new j(t.buffer,t.byteOffset+i,e-i)}function Yh(t,i,e){return void 0===i&&(i=0),void 0===e&&(e=t.byteLength),new DataView(t.buffer,t.byteOffset+i,e-i)}function hl(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function $t(t){return new j(t.buffer,t.byteOffset,t.byteLength)}function Eg(t){return t instanceof ArrayBuffer||Ja(t)}function Oi(t){return t instanceof ArrayBuffer?new j(t):$t(t)}function Yo(t,i,e){return void 0===i&&(i=0),void 0===e&&(e=t.byteLength),t.slice?t.slice(i,e):_t(Ig(t,i,e))}function _t(t){if(t.slice)return t.slice(0);{const i=new j(t.byteLength);return i.set(t,0),i}}function bg(t){return[].slice.call(t)}var Ha=class t{get Ku(){return this.Zu}Nm(t){this.Zu+=t}Dm(t){this.Zu=t}Sm(){return new t(this.Ku)}Cm(){return new B_(this.Ku<<3)}constructor(t=0){this.Zu=t}};function Lg(t){let i=t.toLowerCase(),e=0,s=0;D(i,"0x")&&(i=i.substring(2));const n=new j(_.ceil(i.length/2));for(1==(1&i.length)&&(e=1,n[s++]=x(i[0],16));e<i.length;e+=2)n[s++]=x(i.substr(e,2),16);return n}function kg(t){return.001*t}var Ea=class t{xm(){return ha(this.Om,this.jm)}zm(){return lg(this.Om,this.jm)}Pm(){return function(t,i,e){void 0===e&&(e=!1);const s=t.getInt16(i.Ku,e);return i.Nm(2),s}(this.Om,this.jm)}Bm(){return cs(this.Om,this.jm)}Rm(){return function(t,i,e){void 0===e&&(e=!1);const s=t.getInt32(i.Ku,e);return i.Nm(4),s}(this.Om,this.jm)}Um(){return io(this.Om,this.jm)}Qm(t){return Jc(this.Om,this.jm,t)}Fm(t){return function(t,i,e){const s=[];for(let n=0;n<e;n++)s.push(cs(t,i));return s}(this.Om,this.jm,t)}Ym(t){return ia(this.Om,this.jm,t)}Gm(){return Ya(this.Om,this.jm)}Vm(t){this.jm.Nm(t)}Sm(){return new t(this.Om,this.jm.Sm())}constructor(t,i){this.Om=t,this.jm=i}};function Cg(t,i){return t.Rg===i}function xg(t,i){for(const e of t)if(Cg(e,i))return e}var Se=class extends Jo{get name(){return"DataIncompleteError"}constructor(t,i){super(),this.Wm=t,this.Hm=i}},Nt=class t{static qm(i){const e=i.Om,s=i.jm,n=t.Xm(e,s,!1);if(!n.Zm)throw new Se(s.Ku,n.m);return n.m}static Xm(i,e,s){const n=[];for(;e.Ku<i.byteLength;){const r=t.Km(i,e,s);if(!r.Zm)return{Zm:!1,m:n};n.push(r.Jm)}return{Zm:!0,m:n}}static $m(i,e){const s=t.Km(i,e,!1);if(!s.Zm)throw new Se(e.Ku);return s.Jm}static tp(i,e){const s=i.Om,n=i.jm;for(;n.Ku<s.byteLength;){const i=t.Km(s,n,!1);if(!i.Zm)return;if(i.Jm.Rg===e)return i.Jm}}static Km(i,e,s){const n=e.Ku,r=t.ip(i,e);if(!r.Zm)return r;const h=r.ep;let o=h.sp;if(0===o){if(s)return e.Dm(n),{Zm:!1,np:1/0};o=i.byteLength-n}const a=n+o;if(a>i.byteLength){const t=a;return e.Dm(n),{Zm:!1,np:t}}const u={Rg:h.Rg,Ku:n,Om:new Ea(Yh(i,n,a),new Ha(h.rp))};return e.Dm(a),{Zm:!0,Jm:u}}static ip(t,i){const e=i.Ku;if(!dg(t,i,8)){return{Zm:!1,np:i.Ku+8}}let s=cs(t,i),n=ia(t,i,4);if(1===s){if(!dg(t,i,8)){const t=i.Ku+8;return i.Dm(e),{Zm:!1,np:t}}s=io(t,i).toNumber()}if("uuid"===n){if(!dg(t,i,16)){const t=i.Ku+16;return i.Dm(e),{Zm:!1,np:t}}n=ia(t,i,16)}return{Zm:!0,ep:{Rg:n,sp:s,rp:i.Ku-e}}}static hp(t,i,e){const s=t.Om,n=t.jm;let r=Ig($t(s),n.Ku,s.byteLength);return e&&(r=_t(r)),n.Nm(r.byteLength),{Rg:i,Om:r}}static op(i,e,s){const n=i.Bm(),{version:r,flags:h}=ac(n);return{Rg:e,ap:r,cp:h,Om:t.hp(i,e,s).Om}}};function Go(t,i){const e=Et(t,i);if(!e)throw new g("Missing "+i+" atom");return e}function Et(t,i){for(const e of t)if(e.Rg===i)return e.Om}function Og(t,i){const e=[];for(const s of t)s.Rg===i&&e.push(s.Om);return e}function ac(t){return{version:t>>24,flags:new ws(16777215&t)}}var Eh=class t{static dp(i){const e=[],s=Nt.qm(new Ea(i,new Ha));for(const i of s){const s=t.lp(i);s&&e.push(s)}return e}static fp(t){return Nt.Xm(t,new Ha,!1).m.some(this._p)}static gp(i){return Og(Nt.qm(new Ea(i,new Ha)),he.um).map(t.wp)}static Ap(i){return Og(Nt.qm(i.Om),he.um).map(t.wp)}static _p(t){return t.Rg===he._m||t.Rg===he.fm||t.Rg===he.Av||t.Rg===he.Zv||t.Rg===he.hm||t.Rg===he.lm||t.Rg===he.dm}static lp(i){switch(i.Rg){case he.Av:return t.vp(i.Om);case he.Zv:return t.mp(i.Om,i.Ku);case he.hm:return t.pp(i.Om);case he.lm:return t.yp(i.Om);case he.dm:return t.Mp(i.Om)}}static vp(i){const e=Nt.qm(i),s=Go(e,he.vv),n=Og(e,he.mv),r=Et(e,he.Ev),h=t.Tp(s),o=n.map(t.Np),a=r?t.Dp(r):void 0;return{Rg:he.Av,ep:h,Z:o,Sp:a}}static Tp(t){const i=t.Bm(),{version:e,flags:s}=ac(i),n=1===e?t.Um():t.Bm(),r=1===e?t.Um():t.Bm(),h=t.Bm(),o=1===e?t.Um():t.Bm(),a=t.Bm(),u=t.zm()>>8;t.Vm(2),t.Vm(8);const c=t.Fm(9);t.Vm(24);const d=t.Bm();return{Rg:he.vv,ap:e,cp:s,Ip:n,Ep:r,bp:h,ct:o,Lp:a,c_:u,kp:c,Cp:d}}static Np(i){const e=Nt.qm(i),s=Go(e,he.pv),n=Go(e,he.yv),r=t.xp(s),h=t.Op(n);return{Rg:he.mv,ep:r,jp:h}}static xp(t){const i=t.Bm(),{version:e,flags:s}=ac(i),n=1===e?t.Um():t.Bm(),r=1===e?t.Um():t.Bm(),h=t.Bm();t.Vm(4);const o=1===e?t.Um():t.Bm();t.Vm(8);const a=t.Pm(),u=t.Pm(),c=t.Pm()/256;t.Vm(2);const d=t.Fm(9),l=t.Bm()/65536,f=t.Bm()/65536;return{Rg:he.pv,zp:s.Em(1),Pp:s.Em(2),Bp:s.Em(4),Ip:n,Ep:r,Rp:h,ct:o,Up:a,Qp:u,c_:c,kp:d,ji:l,Ti:f}}static Op(i){const e=Nt.qm(i),s=Go(e,he.Mv),n=Go(e,he.Tv),r=Go(e,he.Nv),h=t.Fp(s),o=t.Yp(n),a=t.Gp(r);return{Rg:he.yv,ep:h,Vp:o,Wp:a}}static Fp(t){const i=t.Bm(),{version:e,flags:s}=ac(i),n=1===e?t.Um():t.Bm(),r=1===e?t.Um():t.Bm(),h=t.Bm(),o=1===e?t.Um():t.Bm();t.zm();return t.Vm(2),{Rg:he.Mv,ap:e,cp:s,Ip:n,Ep:r,bp:h,ct:o}}static Yp(t){const i=t.Bm(),{version:e,flags:s}=ac(i);t.Vm(4);const n=t.Ym(4);t.Vm(12);const r=t.Gm();return{Rg:he.Tv,ap:e,cp:s,Hp:n,l:r}}static Gp(i){const e=Go(Nt.qm(i),he.Dv),s=t.qp(e);return{Rg:he.Nv,Xp:s}}static qp(i){const e=Go(Nt.qm(i),he.Sv),s=t.Zp(e);return{Rg:he.Dv,Kp:s}}static Zp(i){const e=i.Bm(),{version:s,flags:n}=ac(e),r=(i.Bm(),[]),h=Nt.qm(i);for(const i of h){const e=t.Jp(i.Om,i.Rg);e&&r.push(e)}return{Rg:he.Sv,ap:s,cp:n,$p:r}}static Jp(i,e){let s=t.iy(i,e);return s||(s=t.ey(i,e),s||(e===he.Vv?t.sy(i):void 0))}static iy(i,e){return e===he.Yv?t.oy(i):e===he.qv?t.uy(i):void 0}static ey(i,e){return e===he.Lv?t.ly(i):e===he.xv||e===he.Ov?t._y(i,e):e===he.Pv?t.gy(i,e):e===he.Rv?t.wy(i,e):e===he.Xv?t.Ay(i):void 0}static vy(t,i){t.Vm(6);return{Rg:i,py:t.zm()}}static yy(i,e){const s=t.vy(i,e);i.Vm(8);const n=i.zm(),r=i.zm();i.Vm(2),i.Vm(2);return Tt({},s,{My:n,Ty:r,Ny:i.Bm()>>>16})}static Dy(i,e){const s=t.vy(i,e);i.Vm(2),i.Vm(2),i.Vm(12);const n=i.zm(),r=i.zm(),h=i.Bm(),o=i.Bm();i.Vm(4);const a=i.zm();i.Vm(32);const u=i.zm();return i.Vm(2),Tt({},s,{ji:n,Ti:r,Sy:h,Iy:o,Ey:a,by:u})}static oy(i){const e=t.yy(i,he.Yv),s=Go(Nt.qm(i),he.Gv);return Tt({},e,{Ly:t.Cy(s)})}static sy(i){const e=t.vy(i,he.Vv),s=Nt.qm(i),n=Go(s,he.Wv),r=t.xy(n),h=Et(s,he.Hv);return Tt({},e,{Oy:r,jy:h?t.zy(h):void 0})}static xy(t){return{Rg:he.Wv,wd:t.Gm()}}static zy(t){return{Rg:he.Hv,kh:t.Gm()}}static Cy(t){return Nt.op(t,he.Gv,!0)}static ly(i){const e=t.Dy(i,he.Lv),s=Nt.qm(i),n=Go(s,he.Cv),r=Et(s,he.Fv);return Tt({},e,{Py:t.By(n),Ry:r?t.Uy(r):void 0})}static _y(i,e){const s=t.Dy(i,e),n=Go(Nt.qm(i),he.zv);return Tt({},s,{Qy:t.Fy(n)})}static gy(i,e){const s=t.Dy(i,e),n=Go(Nt.qm(i),he.Bv);return Tt({},s,{Yy:t.Gy(n)})}static wy(i,e){const s=t.Dy(i,e),n=Nt.qm(i),r=Go(n,he.Uv),h=t.Vy(r),o=Et(n,he.Qv);return Tt({},s,{Wy:h,Hy:o?t.qy(o):void 0})}static Ay(i){const e=i.Sm(),s=t.Dy(i,he.Xv),n=Go(Nt.qm(i),he.gm),r=t.Xy(n);return Tt({},s,{Zy:t.ey(e,r.Jy.Ky),$y:r})}static uy(i){const e=i.Sm(),s=t.yy(i,he.qv),n=Go(Nt.qm(i),he.gm),r=t.Xy(n);return Tt({},s,{Zy:t.iy(e,r.Jy.Ky),$y:r})}static Xy(i){const e=Go(Nt.qm(i),he.wm),s=t.tM(e);return{Rg:he.gm,Jy:s}}static tM(t){const i=t.Ym(4);return{Rg:he.wm,Ky:i}}static By(t){return Nt.hp(t,he.Cv,!0)}static Fy(t){return Nt.hp(t,he.zv,!0)}static Gy(t){return Nt.hp(t,he.Bv,!0)}static Vy(t){return Nt.hp(t,he.Uv,!0)}static qy(t){const i=t.Ym(4);switch(i){case"nclx":return{iM:au.ON_SCREEN_COLOURS,eM:t.zm(),sM:t.zm(),nM:t.zm(),rM:0!=(128&t.xm())};case"rICC":return{iM:au.RESTRICTED_ICC_PROFILE};case"prof":return{iM:au.UNRESTRICED_ICC_PROFILE};default:throw g("Could not parse ColourInformationBox: unknown type '"+i+"'.")}}static Uy(t){const i=t.Bm(),e=t.Bm();return{Rg:he.Fv,hM:i,oM:e}}static Dp(i){const e=Og(Nt.qm(i),he.bv).map(t.aM);return{Rg:he.Ev,Z:e}}static aM(t){const i=t.Bm(),{version:e,flags:s}=ac(i),n=t.Bm(),r=t.Bm(),h=t.Bm(),o=t.Bm(),a=t.Bm();return{Rg:he.bv,ap:e,cp:s,Rp:n,uM:r,cM:h,dM:o,lM:a}}static mp(i,e){const s=Nt.qm(i),n=Go(s,he.Kv),r=Og(s,he.Jv),h=t.fM(n),o=r.map(t._M);return{Rg:he.Zv,gM:e,ep:h,Z:o}}static fM(t){const i=t.Bm(),{version:e,flags:s}=ac(i),n=t.Bm();return{Rg:he.Kv,ap:e,cp:s,wM:n}}static _M(i){const e=Nt.qm(i),s=Go(e,he.$v),n=Og(e,he.tm),r=Et(e,he.im),h=t.AM(s),o=n.map((i=>t.vM(i,h))),a=r?t.mM(r):void 0;return{Rg:he.Jv,ep:h,pM:o,yM:a}}static AM(t){const i=t.Bm(),{version:e,flags:s}=ac(i),n=t.Bm(),r=s.Em(ci.BASE_DATA_OFFSET_PRESENT)?t.Um():void 0,h=s.Em(ci.SAMPLE_DESCRIPTION_INDEX_PRESENT)?t.Bm():void 0,o=s.Em(ci.DEFAULT_SAMPLE_DURATION_PRESENT)?t.Bm():void 0,a=s.Em(ci.DEFAULT_SAMPLE_SIZE_PRESENT)?t.Bm():void 0,u=s.Em(ci.DEFAULT_SAMPLE_FLAGS_PRESENT)?t.Bm():void 0;return{Rg:he.$v,ap:e,cp:s,Rp:n,MM:r,TM:h,cM:o,dM:a,lM:u}}static vM(i,e){const s=i.Bm(),{version:n,flags:r}=ac(s),h=i.Bm(),o=r.Em(rr.DATA_OFFSET_PRESENT)?i.Rm():void 0,a=r.Em(rr.FIRST_SAMPLE_FLAGS_PRESENT)?i.Bm():void 0,u=[];for(let s=0;s<h;s++){const h=t.NM(i,r,n,e);0===s&&void 0!==a&&(h.cp=a),u.push(h)}return{Rg:he.tm,ap:n,cp:r,DM:h,gM:o,SM:a,IM:u}}static NM(t,i,e,s){return{ct:i.Em(rr.SAMPLE_DURATION_PRESENT)?t.Bm():s.cM,sp:i.Em(rr.SAMPLE_SIZE_PRESENT)?t.Bm():s.dM,cp:i.Em(rr.SAMPLE_FLAGS_PRESENT)?t.Bm():s.lM,EM:i.Em(rr.SAMPLE_COMPOSITION_TIME_OFFSET_PRESENT)?0===e?t.Bm():t.Rm():void 0}}static Mp(t){const i=t.Om,e=t.jm,s=cs(i,e),{version:n,flags:r}=ac(s);if(1===n){const t=cs(i,e),s=io(i,e),h=cs(i,e),o=cs(i,e),a=gg(i,e),u=gg(i,e),c=Yo($t(i),e.Ku,i.byteLength);return e.Nm(c.byteLength),{Rg:he.dm,ap:n,cp:r,bM:a,LM:u,bp:t,kM:s,CM:h,o:o,xM:c}}{const t=gg(i,e),s=gg(i,e),h=cs(i,e),o=cs(i,e),a=cs(i,e),u=cs(i,e),c=Yo($t(i),e.Ku,i.byteLength);return e.Nm(c.byteLength),{Rg:he.dm,cp:r,ap:n,bM:t,LM:s,bp:h,OM:o,CM:a,o:u,xM:c}}}static pp(t){return Nt.hp(t,he.hm,!1)}static wp(i){const e=i.Om,s=i.jm,n=_t($t(e)).buffer,r=cs(e,s),{version:h,flags:o}=ac(r),a=t.jM(e,s),u=[];if(h>0){const t=cs(e,s);for(let i=0;i<t;i++){const t=Jc(e,s,16);u.push(t)}}const c=cs(e,s),d=new j(n,s.Ku,c);return s.Nm(e.byteLength),{Rg:he.um,ap:h,cp:o,zM:a,PM:u,BM:c,Om:d,RM:n}}static jM(t,i){let e="";for(let s=0;s<4;s++){const s=ha(t,i).toString(16);e+=1===s.length?"0"+s:s}e+="-";for(let s=0;s<2;s++){const s=ha(t,i).toString(16);e+=1===s.length?"0"+s:s}e+="-";for(let s=0;s<2;s++){const s=ha(t,i).toString(16);e+=1===s.length?"0"+s:s}e+="-";for(let s=0;s<2;s++){const s=ha(t,i).toString(16);e+=1===s.length?"0"+s:s}e+="-";for(let s=0;s<6;s++){const s=ha(t,i).toString(16);e+=1===s.length?"0"+s:s}return e.toLowerCase()}static yp(t){const i=t.Om,e=t.jm,s=cs(i,e),{version:n,flags:r}=ac(s),h=cs(i,e),o=cs(i,e);let a,u;0===n?(a=Ce.fromBits(cs(i,e),0,!0),u=Ce.fromBits(cs(i,e),0,!0)):(a=io(i,e),u=io(i,e)),e.Nm(2);const c=lg(i,e),d=[];for(let t=0;t<c;t+=1){const t=cs(i,e),s=t>>31&1,n=2147483647&t,r=cs(i,e),h=cs(i,e),o=h>>31&1,a=h>>28&7,u=268435455&h;d.push({UM:s,QM:n,ct:r,FM:o,YM:a,GM:u})}return{Rg:he.lm,ap:n,cp:r,VM:h,bp:o,WM:a,HM:u,qM:c,XM:d}}static mM(t){const i=t.Om,e=t.jm,s=cs(i,e),{version:n,flags:r}=ac(s);let h;return h=0===n?Ce.fromBits(cs(i,e),0,!0):io(i,e),{Rg:he.im,ap:n,cp:r,yM:h}}},jg={playready:"https://pr-keyos.licensekeyserver.com/core/rightsmanager.asmx",widevine:"https://wv-keyos.licensekeyserver.com/",fairplay:"https://fp-keyos.licensekeyserver.com/getkey"};function zg(t){if(!t)return!0;const i=t.licenseAcquisitionURL,e=t.certificateURL,s=t.keys,n=t.headers,r=t.useCredentials,h=t.queryParameters;return!(i||e||s||n||r||h)}function Pg(t){return t&&void 0!==t.licenseAcquisitionURL}var Bg,f,Rg=Pg,Ug=Pg;function Qg(t){if(!t)return!0;if(Vg(t))return!1;const i=t.fairplay,e=t.playready,s=t.widevine,n=t.clearkey,r=t.aes128;return zg(i)&&zg(e)&&zg(s)&&void 0===n&&zg(r)}function Fg(t){const i=u_(t),e=function(t){var i;const e=t;return a_(e)&&""!==(null==(i=e.fairplay)?void 0:i.headers.PreAuthorization)&&!o_(e)}(t);return(!i||!e)&&(i||e)}function Yg(t){return t.integration===Dn}function Gg(t){const i=t;if(!i)return!1;if(Qg(i))return!1;const e=i.fairplay,s=i.playready,n=i.widevine,r=i.clearkey;if(Vg(t))return!0;if(e&&!function(t){const i=t;return i&&(void 0!==i.certificateURL||void 0!==i.certificate)}(e))return!1;if(s&&!Rg(s))return!1;if(n&&!Ug(n))return!1;if(r&&!function(t){return void 0!==t}(r))return!1;if(i.integration){if(_u._v.ov(i.integration))return!0;switch(i.integration){case Hf:if(!function(t){const i=t,e=i.integration===Hf;return e&&(Wg(t)||Hg(t))}(t))return!1;break;case Zf:if(!qg(t))return!1;break;case Kf:if(!function(t){const i=t;return i.integration===Kf}(t))return!1;break;case Dn:if(!Yg(t))return!1;break;case qf:if(!Fg(t))return!1;break;case Xf:if(!function(t){const i=t;return i.integration===Xf}(t))return!1;break;case Jf:if(!Vg(t))return!1;break;case $f:if(!function(t){const i=t;return i.integration===$f&&(void 0!==i.token||function(t){return void 0!==t.merchant&&void 0!==t.sessionId&&void 0!==t.userId}(i))}(t))return!1;break;case t_:if(!function(t){const i=t;return i.integration===t_}(t))return!1;break;case On:if(!Xg(t))return!1;break;case i_:if(!function(t){return t.integration===i_}(t))return!1;break;case e_:if(!Yn(t))return!1;break;case Hs:if(!function(t){const i=t;return i.integration===Hs&&void 0!==i.token}(t))return!1;break;case s_:if(!function(t){const i=t;return i.integration===s_}(t))return!1;break;case n_:if(!function(t){const i=t;return i&&Dd(i.releasePid)&&Dd(i.accountId)&&Dd(i.token)}(t))return!1;break;case r_:return!0;default:return!1}}return!0}function Vg(t){return t.integration===Jf}function Wg(t){return void 0!==t.authToken}function Hg(t){const i=t;return void 0!==i.accountName&&void 0!==i.customerName&&void 0!==i.portalId}function qg(t){const i=t;return i.integration===Zf&&void 0!==i.token}function Xg(t){const i=t;return i&&i.integration===On&&Qs(i.ticketAcquisitionURL)&&Qs(i.streamId)}function Yn(t){const i=t;return i.integration===e_&&void 0!==i.token}function Zg(t,i){const e=i[t];var s;const n=null!=(s=null==e?void 0:e.licenseAcquisitionURL)?s:jg[t];var r;const h=null!=(r=null==e?void 0:e.customdata)?r:i.customdata,o=h?{customData:h}:{};var a;const u=Tt({},null!=(a=null==e?void 0:e.headers)?a:{},o),c=null!=e?e:{},{customdata:d}=c;return Tt({},h_(c,["customdata"]),{licenseAcquisitionURL:n,headers:u})}function Li(t){switch(t.toLowerCase()){case"widevine":case Ht:return Ht;case"playready":case Xs:return Xs;case"fairplay":case xa:return xa}}function Kg(t,i){switch(t){case nr:return function(t){const i={},e=Eh.gp(new DataView(t));for(const t of e)i[t.zM]=t.RM;return i}(i);case w_:case zn:return function(t){return{[Ii]:t}}(i);default:throw new $i(td.CONTENT_PROTECTION_INITIALIZATION_INVALID,"Unsupported initDataType "+t)}}function Jg(t,i,e){const s=function(t,i,e){var s;const{useCredentials:n,crossOrigin:r}=function(t,i){let e=ms.EA;return t.useCredentials?e=ms.LA:t.crossOrigin&&(e=Aw(t.crossOrigin)),e===ms.EA&&i&&i.vr&&i.vr[360]&&(e=ms.bA),{useCredentials:e===ms.LA,crossOrigin:e}}(t,i);let h=t.liveOffset;Dd(h)||(h=e&&Dd(e.liveOffset)?e.liveOffset:void 0);let o=t.timeServer;Dd(o)||(o=i&&Dd(i.timeServer)?i.timeServer:void 0);let a=t.hlsDateRange;Dd(a)||(a=e&&Dd(e.hlsDateRange)?Boolean(e.hlsDateRange):void 0);const u=Boolean(t.experimentalRendering),c=Boolean(t.nativeUiRendering),d=Boolean(t.lowLatency),l=Boolean(t.useNativePlayback),f=Boolean(t.useManagedMediaSource),_=Dd(t.dash)?tw(t.dash):void 0,g=Dd(t.hls)?iw(t.hls):void 0,w=nw(sw(t.abr),null==e?void 0:e.abr),A=hu(t.lcevc),v=Dd(t.ignoreEmbeddedTextTrackTypes)?xw(t.ignoreEmbeddedTextTrackTypes):[];var m;const p=fw(null!=(m=t.seamlessSwitchStrategy)?m:null==(s=t.dash)?void 0:s.useSeamlessPeriodSwitch),y=lw(t.latencyConfiguration);return{crossOrigin:r,useCredentials:n,liveOffset:h,timeServer:o,hlsDateRange:a,experimentalRendering:u,nativeUiRendering:c,lowLatency:d,useNativePlayback:l,useManagedMediaSource:f,dash:_,hls:g,abr:w,lcevc:A,ignoreEmbeddedTextTrackTypes:v,seamlessSwitchStrategy:p,latencyConfiguration:y}}(t,i,e),n=Gf(t.src);let r=t.type;r||(r=t.src?ww(t.src):void 0);const h=function(t,i){let e;e=Dd(t.contentProtection)?t.contentProtection:Dd(t.drm)?t.drm:Dd(i)&&Dd(i.contentProtection)?i.contentProtection:Dd(i)&&Dd(i.drm)?i.drm:void 0;return $g(e)}(t,i);return Tt({},s,{src:n,type:r,contentProtection:h,ssai:Dd(t.ssai)?Wf(t.ssai):void 0,integrationData:void 0,isAdvertisement:Boolean(t.isAdvertisement)})}function $g(t){return Gg(t)&&t.integration&&t.integration===Jf?function(t){const i=Zg(ge.BA,t),e=Zg(ge.PA,t),s=t[ge.RA]&&Zg(ge.RA,t);return Tt({integration:"keyos",widevine:i,playready:e},s?{fairplay:s}:{})}(t):t}function tw(t){return{useSeamlessPeriodSwitch:fw(null==t?void 0:t.useSeamlessPeriodSwitch),needsTimescaleShifting:hu(null==t?void 0:t.needsTimescaleShifting),desiredTimescale:void 0!==(null==t?void 0:t.desiredTimescale)?$h(null==t?void 0:t.desiredTimescale):void 0,forceSeekToSynchronize:hu(null==t?void 0:t.forceSeekToSynchronize),ignoreAvailabilityWindow:hu(null==t?void 0:t.ignoreAvailabilityWindow),forceHardSwitchWhenSeekingBackwards:hu(null==t?void 0:t.forceHardSwitchWhenSeekingBackwards)}}function iw(t){return{discontinuityAlignment:ew(null==t?void 0:t.discontinuityAlignment),delaySubtitlePreload:Ks(null==t?void 0:t.delaySubtitlePreload)}}function ew(t){if(!t||!Qs(t))return"auto";switch(t){case"playlist":return"playlist";case"media":return"media";default:return"auto"}}function sw(t){if(!Dd(t))return;return rw(ef(null==t?void 0:t.preferredAudioCodecs,jo),ef(null==t?void 0:t.preferredVideoCodecs,jo),hu(null==t?void 0:t.restrictToPlayerSize))}function nw(t,i){if(!Dd(t)&&!Dd(i))return;var e;return rw(hw(null==t?void 0:t.preferredAudioCodecs,null==i?void 0:i.preferredAudioCodecs),hw(null==t?void 0:t.preferredVideoCodecs,null==i?void 0:i.preferredVideoCodecs),null!=(e=null==t?void 0:t.restrictToPlayerSize)?e:null==i?void 0:i.restrictToPlayerSize)}function rw(t,i,e){if(0!==t.length||0!==i.length||void 0!==e)return{preferredAudioCodecs:0===t.length?void 0:t,preferredVideoCodecs:0===i.length?void 0:i,restrictToPlayerSize:e}}function hw(t,i){return void 0!==t&&(null==t?void 0:t.length)>0?t:null!=i?i:[]}function ow(t,i){if(void 0!==i)switch(t){case f.Am:return i.preferredVideoCodecs;case f.vm:return i.preferredAudioCodecs;default:return}}!function(t){t.ZM="auto",t.KM="playlist",t.JM="media"}(Bg||(Bg={})),function(t){t.vm="audio",t.Am="video",t.Ru="text",t.$M="image",t.tT="unknown"}(f||(f={}));var wi,te,aw,Jn,Wt,oe,uw=.66,cw=1.5,dw=3;function lw(t){if(!Dd(t))return;const i=t.targetOffset;var e;var s;var n;var r;var h;return{minimumOffset:null!=(e=t.minimumOffset)?e:i*uw,targetOffset:i,maximumOffset:null!=(s=t.maximumOffset)?s:i*cw,forceSeekOffset:null!=(n=t.forceSeekOffset)?n:i*dw,minimumPlaybackRate:null!=(r=t.minimumPlaybackRate)?r:mu,maximumPlaybackRate:null!=(h=t.maximumPlaybackRate)?h:ff}}function fw(t){if(!t||!Qs(t))return"auto";switch(t){case"always":return"always";case"never":return"never";case"clear-only":return"clear-only";case"same-drm-only":return"same-drm-only";default:return"auto"}}function _w(t){switch(t){case"":case"srt":case"ttml":case"webvtt":case"emsg":case"eventstream":case"id3":case"cea608":case"daterange":return!0;default:return!1}}function gw(t){return!!t&&It(t,"mpd")}function ww(t){let i=yi.OA;return gw(t)&&(i=yi.kA),function(t){return!!t&&It(t,"m3u8")}(t)&&(i=yi.CA),i}function Aw(t){switch(t){case ms.bA:case ms.LA:return t;default:return ms.EA}}function vw(t){if(!t)return!1;const i=t.toLowerCase();return D(i,yi.kA)}function mw(t){if(!t)return!1;const i=t.toLowerCase();return D(i,yi.CA)||D(i,yi.xA)}function pw(t){return Mo(t)&&Mo(t.ssai)&&"google-dai"===t.ssai.integration}function yw(t){return Mo(t)&&Qs(t.integration)&&"verizon-media"===t.integration}function Mw(t){return Mo(t)&&Qs(t.integration)&&"theolive"===t.integration}function Tw(t){return Mo(t)&&Qs(t.integration)&&"mediatailor"===t.integration}function Nw(t){if(Qs(t))return!t;if(yw(t))return!t.id;if(pw(t)){const i=t.ssai,e="live"===i.availabilityType&&i.assetKey,s="vod"===i.availabilityType&&i.contentSourceID&&i.videoID;return Boolean(e&&s)}return!t.src}function Dw(t){return Boolean(Mo(t)&&Qs(t.src))}function Sw(t){return t.type===yi.jA||t.type===yi.zA}function Iw(t){return Qs(t)||Dw(t)||pw(t)||yw(t)}function Ft(t){if(t){if(Iw(t))return Nw(t);for(const i of t)if(!Nw(i))return!1;return!0}return!0}function Ew(){return{crossOrigin:ms.EA,useCredentials:!1,liveOffset:void 0,timeServer:void 0,hlsDateRange:void 0,experimentalRendering:!1,nativeUiRendering:!1,lowLatency:!1,useNativePlayback:!1,useManagedMediaSource:!1,dash:void 0,hls:void 0,abr:void 0,lcevc:void 0,ignoreEmbeddedTextTrackTypes:[],seamlessSwitchStrategy:wi.ZM,latencyConfiguration:void 0}}function bw(){return Tt({},Ew(),{src:void 0,type:yi.OA,contentProtection:void 0,ssai:void 0,integrationData:void 0,isAdvertisement:void 0})}function Lw(t){const i={allowedMimeTypes:void 0,preload:"midroll-and-postroll",showCountdown:!0,vpaidMode:aw.ENABLED,googleIma:{useNativeIma:!1,bitrate:-1,language:void 0,uiElements:void 0}};return void 0===t||(void 0!==t.preload&&(i.preload=function(t){return"none"===t?Jn.NONE:Jn.MIDROLL_AND_POSTROLL}(t.preload)),void 0!==t.showCountdown&&(i.showCountdown=Ks(t.showCountdown)),void 0!==t.vpaidMode&&(i.vpaidMode=function(t){switch(t){case"insecure":return aw.INSECURE;case"disabled":return aw.DISABLED;default:return aw.ENABLED}}(t.vpaidMode)),$(t.allowedMimeTypes)&&(i.allowedMimeTypes=t.allowedMimeTypes.filter(Qs)),void 0!==t.googleIma&&(i.googleIma=function(t){return void 0===t?{useNativeIma:!1,bitrate:-1,language:void 0,uiElements:void 0}:{useNativeIma:Ks(t.useNativeIma),bitrate:null!=(i=t.bitrate)?i:-1,language:Dd(t.language)?jo(t.language):void 0,uiElements:t.uiElements};var i}(t.googleIma))),i}function kw(t){if(!tn(t))return[];const i=[];for(const e of t)Mo(e)&&i.push(e);return i}function Cw(t){return Qs(t.src)}function xw(t){return $(t)?t.filter(_w):[]}!function(t){t.ZM="auto",t.iT="always",t.eT="never",t.CLEAR_ONLY="clear-only",t.SAME_DRM_ONLY="same-drm-only"}(wi||(wi={})),function(t){t.VERIZON_MEDIA="verizon-media",t.MEDIATAILOR="mediatailor",t.THEOLIVE="theolive"}(te||(te={})),function(t){t.ENABLED="enabled",t.INSECURE="insecure",t.DISABLED="disabled"}(aw||(aw={})),function(t){t.NONE="none",t.MIDROLL_AND_POSTROLL="midroll-and-postroll"}(Jn||(Jn={})),function(t){t.DEFAULT="",t.SRT="srt",t.TTML="ttml",t.WEBVTT="webvtt",t.EMSG="emsg",t.EVENT_STREAM="eventstream",t.ID3="id3",t.CEA608="cea608",t.DATE_RANGE="daterange"}(Wt||(Wt={})),function(t){t[t.sT=0]="sT",t[t.Xn=1]="Xn",t[t.nT=2]="nT",t[t.rT=3]="rT",t[t.hT=4]="hT"}(oe||(oe={}));var Ow=class extends Yi{constructor(t,i=oe.sT){super(Co.Zg),this.currentTime=t,this.readyState=i}},iu=class extends Yi{constructor(t){super(Co.Sh),this.currentTime=t}},Qn=class extends Yi{constructor(t){super(Co.jh),this.currentTime=t}},ti=class extends Yi{constructor(t,i=oe.Xn){super(Zt.Pw),this.currentTime=t,this.readyState=i}},os=class extends Yi{constructor(t){super(Co.Xg),this.duration=t}},Kn=class extends Yi{constructor(t,i){super(Co.ww),this.currentTime=t,this.playbackRate=i}},Dr=class extends Yi{constructor(t,i){super(Co.Iw),this.currentTime=t,this.currentProgramDateTime=i}},ve=class extends Yi{constructor(t){super(Co.Jg),this.currentTime=t}},ki=class extends Yi{constructor(t,i=oe.nT){super(Zt.zw),this.currentTime=t,this.readyState=i}},lo=class extends Yi{constructor(t){super(Co.yw),this.currentTime=t}},_r=class extends Yi{constructor(t){super(Co.pw),this.currentTime=t}},Tc=class extends Yi{constructor(t,i){super(Co.Ew),this.currentTime=t,this.volume=i}},jw=class extends Yi{constructor(t,i=oe.rT){super(Zt.Ow),this.currentTime=t,this.readyState=i}},di=class extends Yi{constructor(t,i=oe.hT){super(Zt.jw),this.currentTime=t,this.readyState=i}},Bn=class extends Yi{constructor(t,i){super(Zt.H_),this.currentTime=t,this.readyState=i}},fh=class extends Ao{get error(){return this.errorObject.message}fa(){return this}constructor(t){super(ut.ha),this.errorObject=t}};async function Wu(t,i,e,s,n){void 0===e&&(e=3),void 0===s&&(s=1e3),void 0===n&&(n=1/0);let r=0;for(;;)try{return await t(i)}catch(t){if(Kc(t),r<e){const t=_.min(s*2**r,n);r++,await Di(t,i);continue}throw t}}var zw,Pw={maxRetries:1/0,minimumBackoff:200,maximumBackoff:3e4};function Bw(t){switch(t){case"all":case"content":return t;default:return"none"}}function Rw(t){const e=ie(t||{});return e.libraryLocation&&(e.libraryLocation=Wa(e.libraryLocation,!0)),e.isEmbeddable=Boolean(e.isEmbeddable),e.cast=function(t){const i=Yf(t?t.chromecast:void 0),e=function(t){switch(t){case"auto":return"auto";case"manual":default:return"manual";case"disabled":return"disabled"}}(t?t.strategy:void 0);return{chromecast:i,strategy:e}}(e.cast),e.ads=Lw(e.ads),e.analytics=kw(e.analytics),e.mutedAutoplay=Bw(e.mutedAutoplay),e.allowNativeFullscreen=Boolean(e.allowNativeFullscreen),e.allowMixedContent=Boolean(e.allowMixedContent),e.persistVolume=Boolean(e.persistVolume),e.liveOffset=function(t){return Number(t)||void 0}(e.liveOffset),e.hlsDateRange=function(t){return Boolean(t)}(e.hlsDateRange),e.retainPlaybackRateOnSourceChange=Boolean(e.retainPlaybackRateOnSourceChange),e.license=function(t){return Qs(t)?t:void 0}(e.license),e.licenseUrl=function(t){if(!t)return;try{return Wa(t)}catch(t){return void i.IA("Invalid 'licenseUrl', falling back to default URL")}}(e.licenseUrl),e.vr=function(t){return{useWebXR:Boolean(t&&t.useWebXR)}}(e.vr),e.abr=sw(e.abr),e.retryConfiguration=function(t){const i=Tt({},Pw);return void 0!==t&&(void 0!==t.maxRetries&&(i.maxRetries=Number(t.maxRetries)),void 0!==t.minimumBackoff&&(i.minimumBackoff=Number(t.minimumBackoff)),void 0!==t.maximumBackoff&&(i.maximumBackoff=Number(t.maximumBackoff))),i}(e.retryConfiguration),e.hideDeprecationWarnings=Boolean(e.hideDeprecationWarnings),e.theoLive=function(t){if(!t)return t;return Tt({},t,{externalSessionId:t.externalSessionId?jo(t.externalSessionId):void 0,fallbackEnabled:hu(t.fallbackEnabled)})}(e.theoLive),e}function Uw(t){return{bt:t.bt,Mf:t.Mf,ct:t.ct,Sf:t.Sf,lt:t.lt,bf:t.bf,Pf:t.Pf,Ff:t.Ff,Gf:t.Gf,Jf:t.Jf,e_:t.e_,r_:t.r_,a_:t.a_,c_:t.c_}}function Qw(t,i){const e=i.c_,s=i.Pf;t.c_=e,t.Pf=s}function ru(t,i,e){if(i===e)return;const s=i.bt!==e.bt,n=i.Mf,r=i.ct,h=i.Pf,o=i.Ff,a=i.Gf,u=i.Jf,c=i.e_,d=(i.a_,i.r_,i.c_),l=e.Mf,f=e.ct,_=e.Sf,g=e.bf,w=e.Pf,A=e.Ff,v=e.Gf,m=e.Jf,p=e.e_,y=(e.a_,e.r_,e.c_);(s||u>oe.sT&&m===oe.sT)&&t.Co(new Ow(l,m)),A&&!o?t.Co(new iu(l)):!A&&o&&t.Co(new Qn(l)),m>=oe.Xn&&(s||u<oe.Xn)&&t.Co(new ti(l,m)),f===r||S(f)&&S(r)||t.Co(new os(f)),v!==a&&t.Co(new Kn(l,v)),l!==n&&t.Co(new Dr(l,void 0)),_&&t.Co(new ve(l)),m>=oe.nT&&(s||u<oe.nT)&&t.Co(new ki(l,m)),p&&!c?t.Co(new lo(l)):!p&&c&&t.Co(new _r(l)),y===d&&w===h||t.Co(new Tc(l,y)),m>=oe.rT&&(s||u<oe.rT)&&t.Co(new jw(l,m)),m>=oe.hT&&(s||u<oe.hT)&&t.Co(new di(l,m)),m!==u&&t.Co(new Bn(l,m)),g&&t.Co(new fh(g))}!function(t){t.NONE="none",t.ALL="all",t.CONTENT="content"}(zw||(zw={}));var zt=class extends Yi{constructor(t){super(Co.Hg),this.currentSource=t}},Mu=class extends Yi{constructor(){super(Co.$g)}},Ci=class extends Yi{constructor(){super(Co.ew)}},Fw=class extends _a{lf(){return this.oT}get kf(){return this.Cf()}Cf(){return this.aT}n_(){return this.Dl}o_(){return this.uT}cT(t){const i=this._f;if(i===t)return;i.cf(this.b_);const e=Uw(this),s=this.yf(),n=this.w_(),r=this.A_();this._f=t,this.oT.fg=t.ht,this.uT.fg=t.rt,this.Dl.fg=t.nt,this.aT.fg=t.kf,void 0!==e&&ru(this,e,this);const h=this.yf();h!==s&&this.Co(new zt(h)),this.w_()!==n&&this.Co(new Mu),this.A_()!==r&&this.Co(new Ci),t.sf(this.b_)}async gn(){await super.gn(),this.oT.gn(),this.uT.gn(),this.Dl.gn(),this.aT.gn()}constructor(t){super(t),this.oT=new ta,this.uT=new ta,this.Dl=new lc,this.aT=new Ia,this.oT.fg=t.ht,this.uT.fg=t.rt,this.Dl.fg=t.nt,this.aT.fg=t.kf}};var oi,Yw=class extends Fw{zf(){return function(t){let i=0,e=0,s=0,n=0,r=0,h=0,o=0;for(const a of t)i+=a.dT,e+=a.lT,s+=a.fT,n+=a._T,r+=a.gT,h+=a.wT.amountOfBufferedAudioSegments,o+=a.wT.amountOfBufferedVideoSegments;return{dT:i,lT:e,fT:s,_T:n,gT:r,wT:{amountOfBufferedAudioSegments:h,amountOfBufferedVideoSegments:o}}}(this.AT.map((t=>t.jf)))}y_(){return Pl(this.AT.map((t=>t.y_()))).then(qo)}tr(){return Pl(this.AT.map((t=>t.tr()))).then(qo)}v_(){if(!this.bo){for(const t of this.AT)t.v_();this.bo=!0}}gf(){const t=[];for(const i of this.AT)t.push(...i.gf());return t}I_(t){let i=!1;for(const e of this.AT)i=e.I_(t)||i;return i}Co(t){this.I_(t)||super.Co(t)}get fg(){return this._f}set fg(t){this.cT(t)}vT(t){this.AT.push(t)}mT(t){_s(this.AT,t)}cT(t){if(t===this._f)return;const i=this._f;i.ar(),super.cT(t),t.ur(i)}D_(){for(const t of this.AT)t.D_()}async gn(){this.Vo(),this._f.ar();for(const t of this.AT)this._f!==t&&await t.gn();await super.gn()}constructor(t){super(t),this.AT=[],this.bo=!1,this.pT=!1,this.vT(t)}};!function(t){t[t.ABORTED=1]="ABORTED",t[t.NETWORK=2]="NETWORK",t[t.DECODE=3]="DECODE",t[t.SRC_NOT_SUPPORTED=4]="SRC_NOT_SUPPORTED",t[t.ENCRYPTED=5]="ENCRYPTED",t[t.LICENSE_INVALID=6]="LICENSE_INVALID",t[t.ADVERTISEMENT_ERROR=7]="ADVERTISEMENT_ERROR"}(oi||(oi={}));var wc=class extends gl{get name(){return"MediaError"}constructor(t,i,e,s){super(i),this.code=t,this.message=null!=i?i:"Unknown error",this.cause=e,this.systemCode=s,g.captureStackTrace&&g.captureStackTrace(this,this.constructor)}};function Gw(t){Tl(t,"MEDIA_ERR_ABORTED",1),Tl(t,"MEDIA_ERR_NETWORK",2),Tl(t,"MEDIA_ERR_DECODE",3),Tl(t,"MEDIA_ERR_SRC_NOT_SUPPORTED",4),Tl(t,"MEDIA_ERR_ENCRYPTED",5)}function Zr(t){var i,e;return function(t){return t.category===Mh.CONTENT_PROTECTION}(t)?new wc(5,t.message,null==(i=t.cause)?void 0:i.message,t.systemCode):new wc(Vw(t.code),t.message,null==(e=t.cause)?void 0:e.message)}function Vw(t){if(t===td.MEDIA_ABORTED)return 1;if(t===td.MANIFEST_LOAD_ERROR||t===td.MEDIA_LOAD_ERROR||t===td.SUBTITLE_LOAD_ERROR)return 2;if(t===td.MEDIA_DECODE_ERROR)return 3;if(t===td.MEDIA_NOT_SUPPORTED)return 4;const i=Mh.fromCode(t);return i===Mh.NETWORK?2:i===Mh.SOURCE?4:i===Mh.LICENSE?6:i===Mh.CONTENT_PROTECTION?5:i===Mh.AD?7:3}function se(t){return new $i(Ww(t.code),t.message,t)}function Ww(t){switch(t){case 1:return td.MEDIA_ABORTED;case 2:return td.NETWORK_ERROR;case 3:return td.MEDIA_DECODE_ERROR;case 4:return td.SOURCE_NOT_SUPPORTED;case 5:return td.CONTENT_PROTECTION_ERROR;case 6:return td.LICENSE_ERROR;case 7:return td.AD_ERROR}}Gw(wc),Gw(wc.prototype);var Ur=class extends me{tt(t){return super.tt(t)}fa(){return af(this)}};var Lt=class{get og(){return this.yT}get U(){return this.yT.length}get va(){return this.Xa||(this.Xa=function(t){const i=t.og.map((t=>t.va));return i.item=i=>{const e=0|i,s=t.cg(e);return s&&s.va||void 0},i}(this)),this.Xa}MT(t){this.yT.push(t),this.Xa&&this.Xa.push(t.va)}TT(t){_s(this.yT,t),this.Xa&&_s(this.Xa,t.va)}cg(t){return this.yT[t]}NT(t){return $(t)?function(t,i){for(const e of i)if(!ae(t,e))return!1;return!0}(this.yT,t):ae(this.yT,t)}tr(){No(this.yT),this.Xa&&No(this.Xa)}constructor(){this.yT=[],this.Xa=void 0}},gh=class extends Oe{fa(){return new Hw(this.Lt.va)}constructor(t){super(na.K_),this.Lt=t}},Hw=class extends Zs{constructor(t){super("update"),this.track=t}},qw=0;function Xw(){return qw++}var Zw=0;var Kw=0;function Jw(){return Kw++}var $w=0;function tA(){return $w++}var iA=0;var eA=class extends Bo{get yg(){}get Rt(){return this.Le}set Rt(t){this.Le!==t&&(this.Le=t,this.DT=t,this.Co(new Ji(this)))}get DT(){return this.ST.enabled}set DT(t){this.ST.enabled=t}get va(){return this.Xa||(this.Xa=Bs(this)),this.Xa}get o(){return this.IT}get Mg(){return this.ET}get zt(){return this.ST.kind}get kh(){return this.bT}set kh(t){t!==this.bT&&(this.bT=t,this.Co(new gh(this)))}get gs(){return this.ST.language}get jg(){return this.Rt?"enabled":"disabled"}get LT(){return this.ST}get Ng(){return this.yT}get Dg(){}set Dg(t){}kT(t){this.Rt=t}CT(){this.Rt=this.DT}constructor(t){super(),this.Rg=f.vm,this.Le=!1,this.Xa=void 0,this.ST=t,this.ET=Xw(),this.IT=iA+++"",this.bT=t.label,this.yT=new Lt,this.CT()}},sA=0;var Rt,nA,rA=class extends Bo{get yg(){}get Rt(){return this.Le}set Rt(t){this.Le!==t&&(this.Le=t,this.DT=t,this.Co(new Ji(this)))}get DT(){return!!this.ST.selected}set DT(t){this.ST.selected=t}get va(){return this.Xa||(this.Xa=Bs(this)),this.Xa}get o(){return this.IT}get Mg(){return this.ET}get zt(){return"main"}get kh(){return this.bT}set kh(t){t!==this.bT&&(this.bT=t,this.Co(new gh(this)))}get gs(){return this.ST.language}get jg(){return this.Rt?"enabled":"disabled"}get LT(){return this.ST}get Ng(){return this.yT}get Dg(){}set Dg(t){}CT(){this.Rt=this.DT}kT(t){this.Rt=t}constructor(t){super(),this.Rg=f.Am,this.Le=!1,this.Xa=void 0,this.ST=t,this.ET=Xw(),this.IT=sA+++"",this.yT=new Lt,this.bT=t.label,this.CT()}},hA=class extends Yi{constructor(t){super(Co.Qg),this.xf=t}};!function(t){t[t.NONE=0]="NONE",t[t.LOADING=1]="LOADING",t[t.LOADED=2]="LOADED",t[t.ERROR=3]="ERROR"}(Rt||(Rt={})),function(t){t.xT="cue",t.OT="region",t.jT="stylesheet"}(nA||(nA={}));var sa,oA={"line-left":"start",center:"middle","line-right":"end"},aA={start:"line-left",middle:"center",end:"line-right"};function uA(t,i){if("auto"===t)switch(i){case"start":case"left":return"line-left";case"end":case"right":return"line-right";default:return"center"}return t}function cA(t,i){if("auto"===t)switch(i){case"left":return 0;case"right":return 100;default:return 50}return function(t,i){const e="number"==typeof t?t:C(t);return S(e)?i:e}(t,50)}!function(t){t.zT="mo",t.PT="So",t.K_="Yn"}(sa||(sa={}));var Su=class extends Oe{constructor(t,i){super(t),this.BT=i}},lu=class extends Zs{constructor(t,i){super(t),this.cue=i}};function dA(t){const i=[sa.zT,sa.PT,sa.K_];let e;const s={get track(){return t.Lt.va},get id(){return t.o},get uid(){return t.Mg},get startTime(){return t.RT},set startTime(i){t.RT=i},get endTime(){return t.UT},set endTime(i){t.UT=i},get content(){return t.O},addEventListener(t,i){const s=Fr(t,jo);e.yn(s,i)},removeEventListener(t,i){const s=Fr(t,jo);e.fn(s,i)}};return e=new Mt(s),t.yn(i,(t=>e.Co(t.va))),s}function lA(){}function fA(t){return vi(dA(t),{get align(){return t.QT},get line(){return t.FT},get lineAlign(){return t.YT},get position(){return t.po},get positionAlign(){return t.GT},get region(){return t.VT?t.VT.va:null},get size(){return t.sp},get snapToLines(){return t.WT},get text(){return t.O},get vertical(){return t.Pt}})}var Cu=class extends Su{fa(){return new _A(this.BT.va)}constructor(t){super(sa.K_,t)}},_A=class extends lu{constructor(t){super("update",t)}},gA=class extends Oe{fa(){return new wA(this.BT.va)}constructor(t){super(na.B_),this.BT=t}},wA=class extends Zs{constructor(t){super("updatecue"),this.cue=t}},sr=.02;function AA(t,i){return be(t.HT,i.HT,sr)&&be(t.qT,i.qT,sr)&&t.o===i.o}var dh=class extends Bo{get RT(){return this.XT}set RT(t){var i,e;this.XT!==t&&(this.XT=t,null==(i=this.ZT)||i.KT(this),this.Co(new Cu(this)),null==(e=this.ZT)||e.Co(new gA(this)))}get UT(){return this.JT}set UT(t){var i,e;this.JT!==t&&(this.JT=t,null==(i=this.ZT)||i.KT(this),this.Co(new Cu(this)),null==(e=this.ZT)||e.Co(new gA(this)))}get o(){return this.IT}get Mg(){return this.ET}get va(){return this.Xa||(this.Xa=this.fa()),this.Xa}fa(){return dA(this)}get ro(){return this.ho}set ro(t){this.ho=t}get Lt(){return this.ZT}set Lt(t){this.ZT=t}get O(){return this.$T}set O(t){var i;this.$T!==t&&(this.$T=t,this.Co(new Cu(this)),null==(i=this.ZT)||i.Co(new gA(this)))}get tN(){return this.iN}set tN(t){this.iN=t}eN(t){return this===t||Kl(this,t)&&AA(this,t)&&this.sN(t)}sN(t){return Dh(this.O,t.O)}nN(t,i){this.XT=t,this.JT=i,this.HT=t,this.qT=i}gn(){this.Vo()}constructor(t,i,e,s,n){super(),this.Xa=void 0,this.ZT=void 0,this.ho=!1,this.rN=-1,this.ET=tA(),this.XT=t,this.JT=i,this.HT=t,this.qT=i,this.$T=e,this.iN=Boolean(s),this.IT=null!=n?n:""}};function vA(t,i){return t.O===i.O&&t.FT===i.FT&&t.YT===i.YT&&t.po===i.po&&t.GT===i.GT&&t.VT===i.VT&&t.WT===i.WT&&t.sp===i.sp&&t.QT===i.QT&&t.Pt===i.Pt}var mA=class extends dh{get va(){return this.Xa||(this.Xa=fA(this)),this.Xa}get Rg(){return nA.xT}sN(t){return vA(this,t)}constructor(t,i,e,s,n){super(t,i,e,s,n),this.FT="auto",this.YT="start",this.po="auto",this.GT="auto",this.VT=void 0,this.WT=!0,this.sp=100,this.QT="center",this.Pt=""}};function pA(t){const i=t.FT,e=bd(i);return e&&!t.WT&&(i<0||i>100)?100:e?Number(i):t.WT?-1:100}function yA(t){return cA(t.po,t.QT)}function MA(t){return uA(t.GT,t.QT)}function TA(t){const i=MA(t),e=yA(t);let s;switch(i){case"line-left":s=100-e;break;case"line-right":s=e;break;case"center":s=e<=50?2*e:2*(100-e)}return _.min(t.sp,s)}function NA(t){return{get id(){return t.o},get identifier(){return t.o},get lines(){return t.hN},get regionAnchorX(){return t.oN},get regionAnchorY(){return t.aN},get scrollValue(){return t.uN},get viewportAnchorX(){return t.cN},get viewportAnchorY(){return t.dN},get width(){return t.ji}}}var DA=class{get va(){return this.Xa||(this.Xa=NA(this)),this.Xa}get Rg(){return nA.OT}constructor(t,i,e,s,n,r,h,o){this.o=t,this.ji=i,this.hN=e,this.oN=s,this.aN=n,this.cN=r,this.dN=h,this.uN=o}},SA=1e6,Ie=class{lN(t){return this.fN()*t}_N(t){return this.gN(t)>0}wN(t){return this.gN(t)>=0}AN(t,i){return this.mN(t).vN(i)}eN(t){return 0===this.gN(t)}pN(t){return this.gN(t)<0}vN(t){return this.gN(t)<=0}yN(){return this.MN()?this.TN():this}NN(t){return this.MT(t.TN())}mN(t){return this.NN(t).yN()}};function IA(t,i){return t.DN()?i.DN()?pe.Zr:pe.hd:i.DN()?pe.Nd:t.SN()?i.SN()&&t.MN()===i.MN()?pe.Zr:t.MN()?pe.Nd:pe.hd:i.MN()?pe.hd:pe.Nd}var EA=4294967296,bA=EA*EA,LA=bA*bA,kA=LA/2,ts=class t{static IN(i,e,s){return s?new t(i.toUnsigned(),e.toUnsigned()):new t(i.toSigned(),e.toSigned())}static EN(i){return i.unsigned?new t(i,Ce.UZERO):new t(i,i.isNegative()?Ce.NEG_ONE:Ce.ZERO)}static bN(i,e){if(S(i))return e?t.LN:t.kN;if(e){if(i<0)return t.LN;if(i>=LA)return t.CN}else{if(i<=-kA)return t.xN;if(i+1>=kA)return t.ON}return i<0?t.bN(-i,e).TN():t.IN(Ce.fromNumber(i%bA),Ce.fromNumber(i/bA),e)}jN(){return this.zN.unsigned}PN(){return this.BN.isZero()&&this.zN.isZero()}MN(){return this.zN.isNegative()}RN(){return this.jN()?t.IN(this.BN,this.zN,!1):this}UN(){return this.jN()?this:t.IN(this.BN,this.zN,!0)}QN(){return this.BN}fN(){return this.MN()?-this.TN().fN():this.zN.toNumber()*bA+this.BN.toUnsigned().toNumber()}FN(){return this.BN.toInt()}eN(t){return(this.jN()===t.jN()||this.zN.getHighBits()>>>31!=1||t.zN.getHighBits()>>>31!=1)&&(this.zN.toUnsigned().eq(t.zN.toUnsigned())&&this.BN.toUnsigned().eq(t.BN.toUnsigned()))}gN(t){if(this.eN(t))return pe.Zr;const i=this.MN(),e=t.MN();if(i&&!e)return pe.Nd;if(!i&&e)return pe.hd;if(!this.jN())return this.NN(t).MN()?pe.Nd:pe.hd;const s=this.UN(),n=t.UN(),r=n.zN.comp(s.zN);return r>0||0===r&&n.BN.gt(s.BN)?pe.Nd:pe.hd}pN(t){return this.gN(t)<0}vN(t){return this.gN(t)<=0}YN(t){return this.gN(t)>0}GN(t){return this.gN(t)>=0}VN(){return new t(this.BN.not(),this.zN.not())}WN(i){return new t(this.BN.and(i.BN),this.zN.and(i.zN))}HN(i){return new t(this.BN.or(i.BN),this.zN.or(i.zN))}qN(i){const e=127&i;return 0===e?this:e<64?t.IN(this.BN.shl(e),this.zN.shl(e).or(this.BN.shru(64-e)),this.jN()):t.IN(Ce.ZERO,this.BN.shl(e-64),this.jN())}XN(i){const e=127&i;return 0===e?this:e<64?t.IN(this.BN.shru(e).or(this.zN.shl(64-e)),this.zN.shr(e),this.jN()):t.IN(this.zN.shr(e-64),this.zN.isNegative()?Ce.NEG_ONE:Ce.ZERO,this.jN())}ZN(i){const e=127&i;return 0===e?this:e<64?t.IN(this.BN.shru(e).or(this.zN.shl(64-e)),this.zN.shru(e),this.jN()):64===e?t.IN(this.zN,Ce.ZERO,this.jN()):t.IN(this.zN.shru(e-64),Ce.ZERO,this.jN())}MT(i){const e=this.zN.high>>>16,s=65535&this.zN.high,n=this.zN.low>>>16,r=65535&this.zN.low,h=this.BN.high>>>16,o=65535&this.BN.high,a=this.BN.low>>>16,u=65535&this.BN.low,c=i.zN.high>>>16,d=65535&i.zN.high,l=i.zN.low>>>16,f=65535&i.zN.low,_=i.BN.high>>>16,g=65535&i.BN.high,w=i.BN.low>>>16;let A=0,v=0,m=0,p=0,y=0,M=0,T=0,N=0;N+=u+(65535&i.BN.low),T+=N>>>16,N&=65535,T+=a+w,M+=T>>>16,T&=65535,M+=o+g,y+=M>>>16,M&=65535,y+=h+_,p+=y>>>16,y&=65535,p+=r+f,m+=p>>>16,p&=65535,m+=n+l,v+=m>>>16,m&=65535,v+=s+d,A+=v>>>16,v&=65535,A+=e+c,A&=65535;const D=this.jN(),S=Ce.fromBits(m<<16|p,A<<16|v,D),I=Ce.fromBits(T<<16|N,y<<16|M,D);return t.IN(I,S,D)}NN(t){return this.MT(t.TN())}TN(){return this.VN().MT(t.KN)}JN(i){if(this.PN()||i.PN())return this.jN()?t.LN:t.kN;if(this.MN())return i.MN()?this.TN().JN(i.TN()):this.TN().JN(i).TN();if(i.MN())return this.JN(i.TN()).TN();if(this.zN.isZero()&&0===this.BN.high&&i.zN.isZero()&&0===i.BN.high)return t.EN(this.BN.multiply(i.BN));const e=Ce.fromBits(4294967295,0,!0),s=this.BN.and(e),n=this.BN.shru(32),r=this.zN.and(e),h=this.zN.shru(32),o=i.BN.and(e),a=i.BN.shru(32),u=i.zN.and(e),c=i.zN.shru(32);let d=Ce.UZERO,l=Ce.UZERO,f=Ce.UZERO,_=Ce.UZERO;d=d.add(s.mul(o)),l=l.add(d.shru(32)),d=d.and(e),l=l.add(n.mul(o)),f=f.add(l.shru(32)),l=l.and(e),l=l.add(s.mul(a)),f=f.add(l.shru(32)),l=l.and(e),f=f.add(r.mul(o)),_=_.add(f.shru(32)),f=f.and(e),f=f.add(n.mul(a)),_=_.add(f.shru(32)),f=f.and(e),f=f.add(s.mul(u)),_=_.add(f.shru(32)),f=f.and(e),_=_.add(h.mul(o)).add(r.mul(a)).add(n.mul(u)).add(s.mul(c)).and(e);const g=Ce.fromBits(d.getLowBitsUnsigned(),l.getLowBitsUnsigned(),!0),w=Ce.fromBits(f.getLowBitsUnsigned(),_.getLowBitsUnsigned(),!0);return t.IN(g,w,this.jN())}$N(i){let e,s,n=i;if(n.PN())throw new RangeError("division by zero");if(this.PN())return this.jN()?[t.LN,t.LN]:[t.kN,t.kN];if(this.jN()){if(n.jN()||(n=n.UN()),n.YN(this))return[t.LN,this];if(n.YN(this.ZN(1)))return s=t.tD,e=this.NN(n),[s,e];s=t.LN}else{if(this.eN(t.xN)){if(n.eN(t.KN)||n.eN(t.iD))return[t.xN,t.kN];if(n.eN(t.xN))return[t.KN,t.kN];{const i=this.XN(1).eD(n).qN(1);return i.eN(t.kN)?s=n.MN()?t.KN:t.iD:(e=this.NN(n.JN(i)),s=i.MT(e.eD(n))),e=this.NN(n.JN(s)),[s,e]}}if(n.eN(t.xN))return this.jN()?[t.LN,this]:[t.kN,this];if(this.MN())return n.MN()?this.TN().$N(n.TN()):([s,e]=this.TN().$N(n),[s.TN(),e.TN()]);if(n.MN())return[s,e]=this.$N(n.TN()),[s.TN(),e.TN()];s=t.kN}for(e=this;e.GN(n);){let i=_.max(1,_.floor(e.fN()/n.fN()));const r=_.ceil(_.log(i)/_.LN2),h=r<=48?1:2**(r-48);let o=t.bN(i),a=o.JN(n);for(;a.MN()||a.YN(e);)i-=h,o=t.bN(i,this.jN()),a=o.JN(n);o.PN()&&(o=t.KN),s=s.MT(o),e=e.NN(a)}return[s,e]}eD(t){return this.$N(t)[0]}sD(t){return this.$N(t)[1]}toString(i){const e=i||10;if(e<2||e>36)throw new RangeError("radix");if(this.PN())return"0";if(this.MN()){if(this.eN(t.xN)){const i=t.bN(e),s=this.eD(i),n=s.JN(i).NN(this);return s.toString(e)+n.FN().toString(e)}return"-"+this.TN().toString(e)}const s=t.bN(e**6,this.jN());let n=this,r="";for(;;){const t=n.eD(s);let i=(n.NN(t.JN(s)).FN()>>>0).toString(e);if(n=t,n.PN())return i+r;for(;i.length<6;)i="0"+i;r=String(i)+r}}constructor(t,i){this.BN=t,this.zN=i}};ts.kN=ts.EN(Ce.ZERO),ts.LN=ts.EN(Ce.UZERO),ts.KN=ts.EN(Ce.ONE),ts.tD=ts.EN(Ce.UONE),ts.iD=ts.EN(Ce.NEG_ONE),ts.ON=ts.IN(Ce.NEG_ONE,Ce.MAX_VALUE,!1),ts.CN=ts.IN(Ce.MAX_UNSIGNED_VALUE,Ce.MAX_UNSIGNED_VALUE,!0),ts.xN=ts.IN(Ce.ZERO,Ce.MIN_VALUE,!1);var P=class t{get SN(){return!isFinite(this.nD)}get Kl(){return this.nD/this.bp}static rD(i){return new t(_.ceil(i.nD),i.bp)}static hD(i){return new t(_.floor(i.nD),i.bp)}static oD(t,i){return t.wN(i)?t:i}static aD(t,i){return t.vN(i)?t:i}MT(i){return this.bp>=i.bp?new t(this.nD+i.uD(this.bp).nD,this.bp):new t(this.uD(i.bp).nD+i.nD,i.bp)}_N(t){return t.pN(this)}wN(t){return t.vN(this)}mN(i){if(this.bp>=i.bp){const e=_.abs(this.nD-i.uD(this.bp).nD),s=this.bp;return new t(e,s)}return i.mN(this)}AN(t,i){return this.mN(t).vN(i)}gN(t){return function(t,i){return t.bp>=i.bp?Rd(t.nD,i.uD(t.bp).nD):Rd(t.uD(i.bp).nD,i.nD)}(this,t)}eN(t){return 0===this.gN(t)}pN(t){return this.gN(t)<0}vN(t){return this.gN(t)<=0}uD(i){return new t(this.nD*(i/this.bp),i)}NN(i){return this.bp>=i.bp?new t(this.nD-i.uD(this.bp).nD,this.bp):new t(this.uD(i.bp).nD-i.nD,i.bp)}cD(i){return new t(this.nD*i,this.bp)}constructor(t,i=1){this.nD=t,this.bp=i}};P.Zl=new P(1/6,1),P.kN=new P(0),P.dD=new P(1/0),P.lD=1e6;var Vh=class t extends Ie{static fD(i,e){return void 0===e&&(e=SA),t.bN(i*e,e)}static bN(i,e){return S(i)?t._D:i===1/0?t.gD:i===-1/0?t.wD:new t(Ce.fromNumber(i),e)}static EN(i,e){return new t(i,e)}static vD(i){return t.fD(i.Kl,SA)}static mD(i){return new t(Ce.fromNumber(i.getTime()),1e3)}static oD(t,i){return t.wN(i)?t:i}static aD(t,i){return t.vN(i)?t:i}static pD(i,e,s){return t.oD(e,t.aD(s,i))}MN(){return this.LM.isNegative()}PN(){return 0!==this.bp&&this.LM.isZero()}SN(){return 0===this.bp&&!this.LM.isZero()}DN(){return 0===this.bp&&this.LM.isZero()}fN(){if(0===this.bp)return this.LM.isZero()?NaN:this.LM.isNegative()?-1/0:1/0;const t=this.LM.divide(this.bp),i=this.LM.subtract(t.multiply(this.bp));return t.toNumber()+i.toNumber()/this.bp}QN(){if(0===this.bp)throw new g("Failed to convert timestamp");return this.LM}yD(){return new Date(0===this.bp?NaN:this.uD(1e3).LM.toNumber())}MD(){return new P(0===this.bp?this.fN():this.LM.toNumber(),this.bp)}uD(i,e){void 0===e&&(e=Nu.TD);const s=this.bp;if(s===i)return this;if(0===s)return this;const n=zd(s,i),r=function(t,i,e){const[s,n]=t.$N(i);if(n.PN())return s;if(e===Nu.TD)return n.MN()?s.NN(ts.KN):s;if(e===Nu.ND)return n.MN()?s:s.MT(ts.KN);{const t=n.JN(ts.bN(2));return t.MN()?t.TN().pN(i)?s:s.NN(ts.KN):t.pN(i)?s:s.MT(ts.KN)}}(ts.EN(this.LM).JN(ts.bN(i/n)),ts.bN(s/n),e);return new t(r.QN(),i)}gN(t){if(this===t)return pe.Zr;if(0===this.bp||0===t.bp)return IA(this,t);if(this.PN())return t.PN()?pe.Zr:t.MN()?pe.hd:pe.Nd;if(t.PN())return this.MN()?pe.Nd:pe.hd;const i=_.min(this.bp,t.bp),e=this.uD(i,Nu.DD).LM,s=t.uD(i,Nu.DD).LM;return e.compare(s)}TN(){return 0===this.bp?function(t){0;return t.DN()?t:t.MN()?Vh.gD:Vh.wD}(this):new t(this.LM.negate(),this.bp)}MT(i){if(0===this.bp||0===i.bp)return function(t,i){0;if(t.DN()||i.DN())return Vh._D;if(t.SN()&&i.SN())return t.MN()===i.MN()?t:Vh._D;return t.SN()?t:i}(this,i);if(this.PN())return i;if(i.PN())return this;const e=_.max(this.bp,i.bp),s=this.uD(e,Nu.DD),n=i.uD(e,Nu.DD);return new t(s.LM.add(n.LM),e)}JN(i){if(this.DN()||S(i))return t._D;if(this.SN()||!isFinite(i)){if(this.PN()||0===i)return t._D;{const e=this.MN()?t.wD:t.gD;return i<0?e.TN():e}}return this.PN()?this:new t(0===i?Ce.ZERO:this.LM.multiply(i),this.bp)}eD(i){if(this.DN()||S(i))return t._D;if(this.SN())return isFinite(i)?0===i?1/i<0?this.TN():this:i<0?this.TN():this:t._D;if(!isFinite(i))return new t(Ce.ZERO,this.bp);if(this.PN())return 0===i?t._D:new t(Ce.ZERO,this.bp);if(0===i){const e=this.MN()?t.wD:t.gD;return 1/i<0?e.TN():e}return new t(this.LM.divide(i),this.bp)}SD(){return[this.LM.low,this.LM.high,this.bp]}constructor(t,i){super(),this.LM=t.toSigned(),this.bp=i>>>0}};Vh.kN=new Vh(Ce.ZERO,SA),Vh._D=new Vh(Ce.ZERO,0),Vh.gD=new Vh(Ce.ONE,0),Vh.wD=new Vh(Ce.NEG_ONE,0);var Nu,B=class t extends Ie{static fD(i,e){return void 0===e&&(e=SA),t.bN(i*e,e)}static bN(i,e){return S(i)?t._D:i===1/0?t.gD:i===-1/0?t.wD:new t(BigInt(_.floor(i)),e)}static EN(i,e){return new t(BigInt(i.high)<<BigInt(32)|BigInt(i.low>>>0),e)}static vD(i){return t.fD(i.Kl,SA)}static mD(i){return t.bN(i.getTime(),1e3)}static get kN(){return t.ED||(t.ED=new t(BigInt(0),SA)),t.ED}static get _D(){return t.bD||(t.bD=new t(BigInt(0),0)),t.bD}static get gD(){return t.LD||(t.LD=new t(BigInt(1),0)),t.LD}static get wD(){return t.kD||(t.kD=new t(BigInt(-1),0)),t.kD}static oD(t,i){return t.wN(i)?t:i}static aD(t,i){return t.vN(i)?t:i}static pD(i,e,s){return t.oD(e,t.aD(s,i))}MN(){return this.LM<BigInt(0)}PN(){return 0!==this.bp&&this.LM===BigInt(0)}SN(){return 0===this.bp&&this.LM!==BigInt(0)}DN(){return 0===this.bp&&this.LM===BigInt(0)}fN(){if(0===this.bp)return this.LM===BigInt(0)?NaN:this.LM<BigInt(0)?-1/0:1/0;const t=this.LM/BigInt(this.bp),i=this.LM-t*BigInt(this.bp);return Number(t)+Number(i)/this.bp}QN(){if(0===this.bp)throw new g("Failed to convert timestamp");return this.CD()}CD(){const t=this.LM&BigInt(4294967295),i=this.LM>>BigInt(32)&BigInt(4294967295);return Ce.fromBits(Number(t),Number(i))}yD(){return new Date(0===this.bp?NaN:Number(this.uD(1e3).LM))}MD(){return new P(0===this.bp?this.fN():Number(this.LM),this.bp)}uD(i,e){void 0===e&&(e=Nu.TD);const s=this.bp;if(s===i)return this;if(0===s)return this;const n=zd(s,i),r=function(t,i,e){const s=t/i,n=t-s*i;if(n===BigInt(0))return s;if(e===Nu.TD)return n<BigInt(0)?s-BigInt(1):s;if(e===Nu.ND)return n<BigInt(0)?s:s+BigInt(1);{const t=n*BigInt(2);return t<BigInt(0)?-t<i?s:s-BigInt(1):t<i?s:s+BigInt(1)}}(this.LM*BigInt(i/n),BigInt(s/n),e);return new t(r,i)}gN(t){if(this===t)return pe.Zr;if(0===this.bp||0===t.bp)return IA(this,t);if(this.PN())return t.PN()?pe.Zr:t.MN()?pe.hd:pe.Nd;if(t.PN())return this.MN()?pe.Nd:pe.hd;const i=_.min(this.bp,t.bp),e=this.uD(i,Nu.DD).LM,s=t.uD(i,Nu.DD).LM;return e>s?pe.hd:e<s?pe.Nd:pe.Zr}TN(){return 0===this.bp?function(t){0;return t.DN()?t:t.MN()?B.gD:B.wD}(this):new t(-this.LM,this.bp)}MT(i){if(0===this.bp||0===i.bp)return function(t,i){0;if(t.DN()||i.DN())return B._D;if(t.SN()&&i.SN())return t.MN()===i.MN()?t:B._D;return t.SN()?t:i}(this,i);if(this.PN())return i;if(i.PN())return this;const e=_.max(this.bp,i.bp),s=this.uD(e,Nu.DD),n=i.uD(e,Nu.DD);return new t(s.LM+n.LM,e)}JN(i){if(this.DN()||S(i))return t._D;if(this.SN()||!isFinite(i)){if(this.PN()||0===i)return t._D;{const e=this.MN()?t.wD:t.gD;return i<0?e.TN():e}}return this.PN()?this:new t(0===i?BigInt(0):this.LM*BigInt(i),this.bp)}eD(i){if(this.DN()||S(i))return t._D;if(this.SN())return isFinite(i)?0===i?1/i<0?this.TN():this:i<0?this.TN():this:t._D;if(!isFinite(i))return new t(BigInt(0),this.bp);if(this.PN())return 0===i?t._D:new t(BigInt(0),this.bp);if(0===i){const e=this.MN()?t.wD:t.gD;return 1/i<0?e.TN():e}return new t(this.LM/BigInt(i),this.bp)}SD(){const t=this.CD();return[t.low,t.high,this.bp]}constructor(t,i){super(),this.LM=BigInt.asIntN(64,t),this.bp=i>>>0}};B.ED=void 0,B.bD=void 0,B.LD=void 0,B.kD=void 0,function(t){t[t.TD=0]="TD",t[t.ND=1]="ND",t[t.DD=2]="DD"}(Nu||(Nu={}));var Sn=function(){try{return"function"==typeof BigInt&&"bigint"==typeof BigInt(0)}catch(t){return!1}}()?B:Vh;function CA(t,i){return t.gN(i)}function xA(t,i){return void 0!==t?void 0!==i?Sn.aD(t,i):t:i}var OA=9e4,ur=Ol((()=>Sn.bN(8589934592,OA))),jA=Ol((()=>ur().eD(2)));var zA={xD:0,OD:1/0,jD:0},PA=6,BA=["WEBVTT","WEBVTT ","WEBVTT\t","WEBVTT\n"],RA=[" ","\t","\n","\f","\r"],UA=/^\d*$/,QA=/.*[0-9]+.*/,FA=/^[\d.-]+$/,YA=/(^\.|\.$)/,GA=/(\D\.|\.\D)/;function VA(t,i){void 0===i&&(i=zA);return WA(Sg(hl(t),new Ha),i)}function WA(t,i){void 0===i&&(i=zA);const e={L:[],zD:[],PD:[]},s=HA(t),n=new Ha;if(hv(s),qA(s,(t=>"\n"!==t),n),n.Ku>=s.length)return e;if(n.Nm(1),"\n"!==s.charAt(n.Ku)){$A(XA(s,n,false,!0,e,i),e)}else n.Nm(1);for(qA(s,(t=>"\n"===t),n);n.Ku<s.length;){$A(XA(s,n,false,!1,e,i),e),qA(s,(t=>"\n"===t),n)}return e}function HA(t){const i=bf(t,"\0"," "),e=bf(i,"\r\n","\n");return bf(e,"\r","\n")}function qA(t,i,e){const s=e.Ku;for(;e.Ku<t.length&&i(t.charAt(e.Ku));)e.Nm(1);return t.substring(s,e.Ku)}function XA(t,e,s,n,r,h){let o,a=0,u=e.Ku,c="",d=!1,l=!1,f=null,_=null,g=null;for(;!d;)if(o=qA(t,(t=>"\n"!==t),e),a++,e.Ku>=t.length?d=!0:e.Nm(1),It(o,"--\x3e")){if(n||1!==a&&(2!==a||l)){e.Dm(u);break}l=!0,u=e.Ku,f=new mA(0,0,"",!1,c);try{iv(o,r.zD,f,h),c=""}catch(t){i.IA(t),f=null}}else{if(""===o)break;n&&D(o,"X-TIMESTAMP-MAP")&&(r.BD=ZA(o)),n||2!==a||s||(Ts("STYLE",c.replace(/ /g,""))?(_={Rg:nA.jT},c=""):Ts("REGION",c.replace(/ /g,""))&&(g=new DA("",100,3,0,100,0,100,""),c="")),c&&(c+="\n"),c+=o,u=e.Ku}if(f)return f.O=c,f;if(_);else if(g)return function(t,i){const e=t.split(/\s/),s=":";for(const t of e)if(0!==t.length&&It(t,s)&&t.charAt(0)!==s&&t.charAt(t.length-1)!==s){const e=t.indexOf(s),n=t.substring(0,e),r=t.substring(e+1,t.length);switch(n.toUpperCase()){case"ID":Av(r,i);break;case"WIDTH":pv(r,i);break;case"LINES":mv(r,i);break;case"REGIONANCHOR":{const t=wv(r);t&&(i.oN=t[0],i.aN=t[1]);break}case"VIEWPORTANCHOR":{const t=wv(r);t&&(i.cN=t[0],i.dN=t[1]);break}case"SCROLL":vv(r,i)}}}(c,g),g;return null}function ZA(t){const i=t.split("=")[1].trim().split(","),e=JA(i[0].trim(),"MPEGTS")?i[0]:i[1],s=JA(i[0].trim(),"LOCAL")?i[0]:i[1];var n;return{RD:KA(Number(e.split(/:(.*)/)[1].trim())||0),lh:Sn.fD(null!=(n=nv(s.split(/:(.*)/)[1].trim(),new Ha))?n:0)}}function KA(t){return Sn.bN(t,OA)}function JA(t,i){return D(t,i)}function $A(t,i){t&&function(t){return"cue"===t.Rg}(t)?i.L.push(t):t&&function(t){return"region"===t.Rg}(t)?i.zD.push(t):t&&function(t){return"stylesheet"===t.Rg}(t)&&i.PD.push(t)}function iv(t,i,e,s){const n=new Ha;av(t,n);const r=ev(nv(t,n),s);if(av(t,n),"--\x3e"!==t.substring(n.Ku,n.Ku+3))throw g("Something went wrong with parsing a WebVTT Cue");n.Nm(3),av(t,n);const h=ev(nv(t,n),s);e.nN(r,h);!function(t,i,e){const s=t.split(/\s/),n=":";for(const t of s)if(0!==t.length&&It(t,n)&&t.charAt(0)!==n&&t.charAt(t.length-1)!==n){const s=t.indexOf(n),r=t.substring(0,s),h=t.substring(s+1,t.length);switch(r.toUpperCase()){case"REGION":lv(h,i,e);break;case"VERTICAL":_v(h,i);break;case"D":gv(h,i);break;case"LINE":case"L":cv(h,i);break;case"POSITION":case"T":dv(h,i);break;case"SIZE":case"S":fv(h,i);break;case"ALIGN":case"A":uv(h,i)}}}(t.substring(n.Ku,t.length),e,i)}function ev(t,i){return t+i.xD}function sv(t){return/^[0-9]$/.test(t)}function nv(t,i){const e=bf(t,",",".");let s,n,r,h=!1;if(i.Ku>=e.length||!sv(e.charAt(i.Ku)))throw new g("Something went wrong with parsing a WebVTT Cue timestamp");const o=qA(e,sv,i),a=x(o,10);if((o.length>2||a>59)&&(h=!0),i.Ku>=e.length||":"!==e.charAt(i.Ku))throw new g("Something went wrong with parsing a WebVTT Cue timestamp");i.Nm(1);const u=qA(e,sv,i);if(2!==u.length)throw new g("Something went wrong with parsing a WebVTT Cue timestamp");const c=x(u,10);if(h||i.Ku<e.length&&":"===e.charAt(i.Ku)){if(i.Ku>=e.length||":"!==e.charAt(i.Ku))throw new g("Something went wrong with parsing a WebVTT Cue timestamp");i.Nm(1);const t=qA(e,sv,i);if(2!==u.length)throw new g("Something went wrong with parsing a WebVTT Cue timestamp");s=a,n=c,r=x(t,10)}else s=0,n=a,r=c;if(i.Ku>=e.length||"."!==e.charAt(i.Ku))throw new g("Something went wrong with parsing a WebVTT Cue timestamp");i.Nm(1);const d=qA(e,sv,i),l=x(d,10);if(c>59||r>59)throw new g("Something went wrong with parsing a WebVTT Cue timestamp");return 60*s*60+60*n+r+l/1e3}function rv(t){return hv(HA(t))}function hv(t){if(t.length<PA)return!1;for(const i of BA)if(D(t,i))return!0;return!1}function ov(t){return ae(RA,t)}function av(t,i){for(;i.Ku<t.length&&ov(t.charAt(i.Ku));)i.Nm(1)}function Ve(t){const i=t.lastIndexOf("%");if(i>-1){const e=C(t.substring(0,i));if(!S(e)&&e>=0&&e<=100)return e}return null}function uv(t,i){const e=t.toLowerCase();switch(e){case"start":case"center":case"end":case"left":case"right":i.QT=e;break;case"middle":i.QT="center"}}function cv(t,i){let e,s;const n=t.indexOf(",");if(n>=0?(e=t.substring(0,n),s=t.substring(n+1,t.length)):(e=t,s=""),!QA.test(e))return;let r,h;if(Rh(e,"%")){const t=Ve(e);if(null===t)return;r=t,h=!1}else{if(!FA.test(e)||e.lastIndexOf("-")>0)return;const t=e.indexOf(".");if(t>=0&&(t!==e.lastIndexOf(".")||!GA.test(e)||YA.test(e)))return;if(r=C(e),S(r))return;h=!0}switch(i.FT=r,i.WT=h,s=s.toLowerCase(),s){case"start":case"center":case"end":i.YT=s;break;case"middle":i.YT="center"}}function dv(t,i){let e,s;const n=t.indexOf(",");n>=0?(e=t.substring(0,n),s=t.substring(n+1,t.length)):(e=t,s="");const r=Ve(e);if(null!==r)switch(i.po=r,s=s.toLowerCase(),s){case"line-left":case"center":case"line-right":case"auto":i.GT=s;break;case"start":i.GT="line-left";break;case"middle":i.GT="center";break;case"end":i.GT="line-right"}}function lv(t,i,e){const s=Fd(e,(i=>i.o===t));void 0!==s&&(i.VT=s)}function fv(t,i){const e=Ve(t);null!==e&&(i.sp=e)}function _v(t,i){switch(t.toLowerCase()){case"rl":case"vertical:rl":case"vertical-rl":i.Pt="rl";break;case"lr":case"vertical:lr":case"vertical-lr":i.Pt="lr";break;default:i.Pt=""}}function gv(t,i){"VERTICAL"===t.toUpperCase()?i.Pt="rl":"VERTICAL-LR"===t.toUpperCase()&&(i.Pt="lr")}function wv(t){if(t.indexOf(",")>=0){const i=Ve(t.substring(0,t.indexOf(","))),e=Ve(t.substring(t.indexOf(",")+1,t.length));return[Pe(i||0,0,100),Pe(e||100,0,100)]}return null}function Av(t,i){i.o=t}function vv(t,i){"up"===t.toLowerCase()&&(i.uN="up")}function mv(t,i){UA.test(t)&&(i.hN=x(t))}function pv(t,i){const e=Ve(t);null!==e&&(i.ji=e)}function yv(t){return t&&"UD"in t?t.UD:t}var Ot,Mv=class extends dh{get QD(){return this.FD}get zD(){return this.YD}get GD(){return this.VD}get va(){return this.Xa||(this.Xa=function(t){return vi(dA(t),{get styles(){return t.QD},get regions(){return t.zD},get metadata(){return yv(t.GD)},get content(){return yv(t.O)}})}(this)),this.Xa}sN(t){return!!Dh(this.QD,t.QD)&&(!!Dh(this.zD,t.zD)&&(this.GD&&t.GD?!!this.GD.WD(t.GD)&&(this.O&&t.O?this.O.WD(t.O):this.O===t.O):this.GD===t.GD))}constructor(t,i,e,s,n,r,h){super(t,i,e,s),this.FD=n,this.YD=r,this.VD=h||void 0}};function re(t){return 1===t.HD}function Tv(t){return 3===t.HD}!function(t){t[t.qD=1]="qD",t[t.XD=2]="XD",t[t.Ru=3]="Ru",t[t.ZD=4]="ZD",t[t.KD=9]="KD"}(Ot||(Ot={}));var Nv=class{get JD(){return this.tS.$D(!0)}get RT(){return this.iS}get UT(){return this.eS}constructor(t,i,e){this.iS=t,this.eS=i,re(e)?this.tS=function(t,i,e){for(const t of["begin","end","dur"])e.sS(t);return e}(0,0,e):this.tS=e}};var Dt={VIDEO_H264:"video/avc",VIDEO_H265:"video/hevc",VIDEO_MP4:"video/mp4",VIDEO_MPEG:"video/mpeg",VIDEO_MPEG2:"video/mpeg2",VIDEO_WEBM:"video/webm",VIDEO_UNKNOWN:"video/x-unknown",AUDIO_AAC:"audio/mp4a-latm",AUDIO_MP4:"audio/mp4",AUDIO_WEBM:"audio/webm",AUDIO_UNKOWN:"audio/x-unknown",IMAGE_JPEG:"image/jpeg",APPLICATION_TTML_XML:"application/ttml+xml",APPLICATION_MP4:"application/mp4",TEXT_VTT:"text/vtt"};function Bt(t){return It(t,Dt.APPLICATION_MP4)||It(t,Dt.VIDEO_MP4)||It(t,Dt.AUDIO_MP4)}function Dv(t){return It(t,Dt.VIDEO_WEBM)||It(t,Dt.AUDIO_WEBM)}var Sv=class{nS(t){for(const[i,e]of this.rS)if(i.toLowerCase()===t.toLowerCase())return e}constructor(t,i){this.Rg=t,this.rS=i}};function An(t){const i=t.trim(),e=i.indexOf(";");if(e<0)return new Sv(i,[]);const s=i.substr(0,e).trim(),n=i.substr(e+1).trim(),r=[];let h=0,o=!1;for(let t=0;t<n.length;t++){const i=n[t];if(o||";"!==i)'"'===i&&(o=!o);else{const i=Iv(n.substr(h,t));i&&r.push(i),h=t+1}}if(h!==n.length){const t=Iv(n.substr(h));t&&r.push(t)}return new Sv(s,r)}function Iv(t){const i=t.indexOf("=");if(i<0)return;const e=t.substr(0,i).trim();let s=t.substr(i+1).trim();return'"'===s[0]&&(s=s.substring(1,s.length-1)),[e,s]}function Ne(t){const i=t.trim(),e=i.indexOf(";");return e<0?i:i.substr(0,e).trim()}function Ev(t){let i=t;const e=i.match(/^avc1\.(\d+)\.(\d+)$/);if(e){const t=Number(e[1]),s=Number(e[2]);i="avc1."+eu((t<<16|s).toString(16),6,"0")}return i}var bv="http://www.w3.org/XML/1998/namespace";function Lv(t,i,e,s){let n=t.hS(e,i);return 0===n.length&&(n=t.oS(s+":"+i)),n}function kv(t){const i={};for(const e of t.aS)i[e.uS]=e.LM;return i}var Cv=/^(\d\d+):(\d\d):(\d+)((\.(\d+))?|(:(\d\d+)(\.(\d+))?))$/,xv=/^(\d+)(\.(\d+))?(h|m|s|ms|f|t)$/,dr="http://www.w3.org/ns/ttml";function Ov(t,i,e,s){void 0===e&&(e=zA),void 0===s&&(s=Dt.APPLICATION_TTML_XML);let n=[];const r=hl(t);return s===Dt.APPLICATION_MP4?n=function(t,i,e){const s=Eh.dp(t),n=xg(s,he.hm);if(!n)return[];return Pv(hl(n.Om),i,e)}(r,i,e):s===Dt.APPLICATION_TTML_XML&&(n=Pv(r,i,e)),n}function jv(t,i,e){return void 0===e&&(e=zA),Bv(t,i,e)}function zv(t,i){const e=Wv(i.JD),s={};for(const i of e)s[i]=t[i];return s}function Pv(t,i,e){return Bv(Sg(t,new Ha),i,e)}function Bv(t,e,s){const n=[];let r;try{r=i.cS(t)}catch(t){return n}const h=r.dS;if("tt"!==h.uS)return n;const o=h&&h.hS(dr,"head")[0],a=h&&h.hS(dr,"body")[0];if(!a||!o)return n;const u=function(t){const i={},e=t.hS(dr,"styling")[0],s=e&&e.hS(dr,"style")||[];for(const t of s){i[t.lS(bv,"id")]=kv(t)}return i}(o),c=function(t){const i={},e=t.hS(dr,"layout")[0],s=e&&e.hS(dr,"region")||[];for(const t of s){const e=t.lS(bv,"id");if(!e)continue;i[e]=kv(t);const s=Vv(t);for(const t in s)Xt.call(s,t)&&(i[e][t]=s[t])}return i}(o),d=function(t,i){const e=ie(t),s=Qv(i.fS("tts:extent"));if(!s)return e;for(const t of w.keys(e)){const i=Qv(e[t].extent);if(i){const n=Rv(i[0],s[0]),r=Rv(i[1],s[1]);e[t].extent=n+" "+r}const n=Qv(e[t].origin);if(n){const i=Rv(n[0],s[0]),r=Rv(n[1],s[1]);e[t].origin=i+" "+r}}return e}(c,h),l=o.hS(dr,"metadata")[0],f=Fv(a,s.xD,s.OD,s.jD);for(const t of f){const i=zv(d,t);n.push(new Mv(t.RT,t.UT,t.JD,!1,u,i,l))}return n}function Rv(t,i){const e=Uv(t),s=Uv(i);if(e&&s&&e===s){const n=Number(t.slice(0,-e.length)),r=Number(i.slice(0,-s.length));return S(n)||S(r)?t:n/r*100+"%"}return t}function Uv(t){return Rh(t,"px")?"px":Rh(t,"em")?"em":Rh(t,"c")?"c":Rh(t,"%")?"%":void 0}function Qv(t){if(!t)return;const i=t.split(" ");return 2===i.length?[i[0],i[1]]:void 0}function Fv(t,i,e,s){let n,r=i,h=e,o=[];const a=[];if(re(t)){var u,c;r=null!=(u=Gv(t.fS("begin"),s))?u:r,n=Gv(t.fS("dur"),0),h=null!=(c=Gv(t.fS("end"),s))?c:void 0!==n?r+n:h;const i=t._S;for(let e=0;e<i.length;e++)("body"===t.uS||"div"===t.uS)&&i[e].HD>1||(o=o.concat(Fv(i[e],r,h,s)))}const d=function(t,i,e){const s=[];s.push(t,i);for(const t of e)s.push(t.RT,t.UT);s.sort(Pd);let n=s.length;for(let t=0;t<n-1;t++)s[t+1]===s[t]&&(si(s,t+1),t--,n=s.length);return s}(r,h,o);for(let i=0;i<d.length-1;i++){const e=Yv(d[i],d[i+1],o);if(e.length<=0&&Hv(t)){const e=t.$D(!1);a.push(new Nv(d[i],d[i+1],e))}else if(e.length>0){const s=t.$D(!1);e.forEach((t=>s.gS(t.JD))),a.push(new Nv(d[i],d[i+1],s))}}return a}function Yv(t,i,e){const s=[];for(let n=0;n<e.length;n++){const r=e[n].RT,h=e[n].UT;(r>=t&&h<=i||r<i&&h>=i||r<t&&h>t)&&s.push(e[n])}return s}function Gv(t,i){if(t){if(Cv.test(t)){const e=Cv.exec(t);if(!e)return;const s=Number(e[1])||0,n=Number(e[2])||0,r=Number(e[3])||0,h=e[6];return 3600*s+60*n+r+(h?Number(h)*.1**h.length:0)+i}if(xv.test(t)){const e=xv.exec(t);if(!e)return;const s=Number(e[1]);let n;switch(e[4]){case"h":n=3600*s;break;case"m":n=60*s;break;case"s":n=s;break;case"ms":n=.001*s;break;default:n=NaN}return n+i}}}function Vv(t){const i={},e=t.oS("style")||[];for(const t of e){const e=kv(t);for(const t in e)Xt.call(e,t)&&(i[t]=e[t])}return i}function Wv(t){let i,e=[];if(re(t)){i=t.fS("region"),i&&e.push(i);const s=t._S;for(let t=0;t<s.length;t++)e=e.concat(Wv(s[t]))}return e}function Hv(t){if(re(t)){const i=t.uS.toUpperCase(),e=Boolean(t.fS("smpte:backgroundImage"));return"BR"===i||e}return t.HD===Ot.Ru}function qv(t){const e=function(t){try{return i.cS(t).dS}catch(t){}}(t);return"tt"===(null==e?void 0:e.uS)}var hh,Zi=class extends me{tt(t){return super.tt(t)}it(t){const i=super.it(t);return i&&(t.jg=L.Ch),i}fa(){return Ei(this)}};!function(t){t.pm="subtitles",t.wS="captions",t.AS="descriptions",t.Fn="chapters",t.Mm="metadata",t.vS="thumbnails"}(hh||(hh={}));var Xv=["subtitles","captions","descriptions","chapters","metadata","thumbnails"];function Zv(t){return"string"==typeof t&&ae(Xv,t)}function Kv(t,i){return!(!Zv(t)||!Zv(i))&&(t===i||"subtitles"===t&&"captions"===i||"captions"===t&&"subtitles"===i)}var kn,Be=class extends $i{constructor(t,i,e,s,n){super(t,i,n),this.url=e,this.status=s}};!function(t){t.mS="HttpOpenError",t.pS="HttpResponseError",t.yS="HttpTimeoutError"}(kn||(kn={}));var R=class extends Jo{get MS(){return this.TS}constructor(t,i,e){super(i,e),this.TS=t}};var li=class extends R{get name(){return kn.pS}get NS(){return this.DS}constructor(t,i,e){super(t.MS,null!=e?e:function(t){return"Error while loading "+t.MS.zu+", status code "+t.SS}(t),i),this.DS=t}};var Jv,Uu=class extends R{get name(){return kn.yS}constructor(t,i){super(t,function(t){return"Request for "+t.zu+" timed out after "+t.IS+" seconds."}(t),i)}};function Cc(t){return t instanceof R}function $v(t){return t instanceof li}function tm(t){return t===hh.pm||t===hh.wS}function im(t){return t.some(em)}function em(t){return It(t,"stpp")}function sm(t){return t.some(nm)}function nm(t){return It(t,"vtt")||It(t,"wvtt")}function hr(t,i){return Bt(t)&&sm(i)}function rm(t,i){return t===hh.vS||t===hh.Mm&&i===hh.vS}function hm(t,i,e,s){for(const n of t.L.og){if(n.RT>e)break;i<=n.UT&&!ae(s,n)&&s.push(n)}}function om(t,i){return Ta(t.Mg,i.Mg)}function am(t,i,e,s){const n=function(t){switch(t){case Wt.WEBVTT:return"WebVTT";case Wt.SRT:return"SRT";case Wt.TTML:return"TTML";default:return""}}(t);return new Be(td.SUBTITLE_PARSE_ERROR,"Could not parse the "+(n?n+" ":"")+"subtitle file.",i,e,s)}function um(t,i){const e=[];for(const s of t.L.og)if(s.UT<=i)e.push(s);else if(s.RT>=i)break;for(const i of e)t.ES(i)}function cm(t,i){if(t.U>0){const e=10,s=t.Cn(0),n=_.max(0,s-e);for(const t of i)t.bS(n)}}!function(t){t.LS="vtt",t.Vv="wvtt",t.kS="stpp"}(Jv||(Jv={}));var dm,F=class extends Bo{tt(t){t.yn(na.ra,this.CS),this.Z.tt(t),this.xS(t)}it(t){t.fn(na.ra,this.CS),t.jg=L.Ch,this.Z.it(t)}OS(t){}jS(t){}xS(t){t.jg!==L.Ch?this.OS(t):this.jS(t)}zS(){for(const t of this.Z.og)t.fn(na.ra,this.CS),t.gn()}bS(t){if(t>0)for(const i of this.Z.og)um(i,t)}tr(){return this.zS(),this.Z.tr(),Promise.resolve()}async gn(){this.Vo(),await this.tr(),this.Z.gn()}constructor(...t){super(...t),this.Z=new Zi,this.CS=t=>{const i=t.Lt;this.xS(i)}}};!function(t){t.PS="arraybuffer",t.RS="json",t.US="stream",t.Ru="text"}(dm||(dm={}));var G,N,aa,Ws,lm,gs=class t{append(t,i){let e=t,s=i;e=fm(e),s=_m(s);const n=e.toLowerCase();if(this.Od.hasOwnProperty(n)){const t=this.Od[n],i=t[1];t[1]=i?i+", "+s:s}else this.Od[n]=[e,s]}delete(t){const i=fm(t).toLowerCase();delete this.Od[i]}get(t){const i=fm(t).toLowerCase();return this.Od.hasOwnProperty(i)?this.Od[i][1]:null}has(t){const i=fm(t).toLowerCase();return this.Od.hasOwnProperty(i)}set(t,i){let e=t;e=fm(e);const s=e.toLowerCase();this.Od[s]=[e,_m(i)]}forEach(t,i){for(const e in this.Od)this.Od.hasOwnProperty(e)&&t.call(i,this.Od[e][1],e,this)}asList(){const t=[];for(const i in this.Od)if(this.Od.hasOwnProperty(i)){const[e,s]=this.Od[i];t.push([e,s])}return t}QS(){const t={};return this.forEach(((i,e)=>{t[e]=i})),t}FS(t){t.forEach(((t,i)=>{this.append(i,t)}))}YS(t){t.forEach(((t,i)=>{this.set(i,t)}))}constructor(i){this.Od={},i instanceof t?i.asList().forEach((t=>{let[i,e]=t;this.append(i,e)})):Array.isArray(i)?i.forEach((t=>{let[i,e]=t;this.append(i,e)})):i&&w.getOwnPropertyNames(i).forEach((t=>{this.append(t,i[t])}))}};function fm(t){let i=t;if("string"!=typeof i&&(i=String(i)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(i))throw new b("Invalid character in header field name");return i}function _m(t){let i=t;return"string"!=typeof i&&(i=String(i)),i}!function(t){t.DELETE="DELETE",t.GET="GET",t.HEAD="HEAD",t.OPTIONS="OPTIONS",t.POST="POST",t.PUT="PUT"}(G||(G={})),function(t){t.tT="",t.GS="manifest",t.VS="segment",t.WS="preload-hint",t.HS="content-protection"}(N||(N={})),function(t){t.tT="",t.qS="initialization-segment",t.XS="fairplay-license",t.ZS="fairplay-certificate",t.KS="widevine-license",t.JS="widevine-certificate",t.$S="playready-license",t.tI="clearkey-license",t.iI="aes128-key"}(aa||(aa={})),function(t){t.tT="",t.vm="audio",t.Am="video",t.Ru="text",t.$M="image"}(Ws||(Ws={})),function(t){t.eI="same-origin",t.EA="no-cors",t.sI="cors",t.nI="navigate"}(lm||(lm={}));var Io,Pc=class{constructor(t,i){const e=t.zu;let s,n,r,h,o,a,u,c,d,l,f,_,g,w;var A,v;i?(s=i.rI,n=i.hI,r=i.oI,h=i.aI,o=i.IS,a=i.uI,u=i.Hd,c=i.Rg,d=i.cI,l=i.dI,f=i.lI,_=i.fI,g=i.jg,w=i._I):(s=null,n={},r="GET",h=dm.Ru,o=0,a=0,c="",d="",l="",f=!1,g=void 0,w=!1),this.zu=e,this.rI=t.rI||s,this.hI=new gs(t.hI||n),this.oI=t.oI||r,this.aI=t.aI||h,this.IS=void 0!==t.IS?Number(t.IS)||0:o,this.uI=void 0!==t.uI?Number(t.uI)||0:a,this.Hd=t.Hd||u||(new er).Hd,this.Rg=t.Rg||c,this.cI=t.cI||d,this.dI=t.dI||l,this.lI=void 0!==t.lI?Boolean(t.lI):f,this.fI=t.fI||_,this.jg=null!=(A=t.jg)?A:g,this._I=null!=(v=t._I)?v:w}},gm=class extends Ao{get error(){return this.errorObject.message}fa(){return this}constructor(t){super(ut.ha),this.errorObject=t}},Tu=class extends F{gI(t){if(!t.src)return;const i=t.kind||hh.pm,e=this.AI.wI(i,t.id,t.label,t.srclang,t.default);return e.Ug=Wa(t.src),this.tt(e),e}async vI(t,i){t.Jf=Rt.LOADING;const e=new Pc({zu:t.Ug,aI:dm.Ru,oI:G.GET,Hd:i});let s,n;try{const t=await this.mI.MS(e);n=t.SS,s=await t.pI()}catch(i){return Kc(i),t.Jf=Rt.ERROR,void t.Co(new gm(function(t,i){let e=i,s=0;if(Cc(t)&&t.name===kn.mS)e=t.MS.zu;else if($v(t)){const i=t.NS;if(e=i.yI,s=i.SS,0===s)return new Be(td.SUBTITLE_CORS_ERROR,"Could not load the subtitle file. Make sure the source is set correctly and that CORS support is enabled.",e,s,t)}return new Be(td.SUBTITLE_LOAD_ERROR,"Could not load the subtitle file.",e,s,t)}(i,t.Ug)))}try{const i=function(t){return rv(t)?Wt.WEBVTT:qv(t)?Wt.TTML:Wt.SRT}(s);t.Rg=i;let e=[];if(i===Wt.WEBVTT||i===Wt.SRT){e=WA(s).L}else i===Wt.TTML&&(e=jv(s,t));for(const i of e)t.MI(i)}catch(i){return Kc(i),t.Jf=Rt.ERROR,void t.Co(new gm(am(t.Rg,t.Ug,n,i)))}t.Jf=Rt.LOADED}OS(t){ae(this.Z.og,t)&&t.Jf===Rt.NONE&&this.vI(t,this.TI.Hd).catch(Ah)}$n(){}async tr(){this.TI.Xd(),this.TI=new er;for(const t of this.Z.og)this.AI.NI(t);await super.tr()}constructor(t,i){super(),this.TI=new er,this.AI=t,this.mI=i}};function wm(t,i){for(const e of t)if(e.zt===i&&e.DI)return e}function Am(t,i){vm(wm(t.og,i))}function vm(t){void 0!==t&&(t.jg=L.Jn)}function mm(t,i){const e=wm(t.og,i)||function(t,i){for(const e of t)if(e.zt===i)return e}(t.og,i);vm(e)}function pm(t){for(const i of Xv)i===hh.Fn?mm(t,i):Am(t,i)}!function(t){t.SI="web",t.II="android",t.EI="android-tv",t.bI="ios",t.LI="tvos",t.kI="chromecast",t.CI="theoliveweb"}(Io||(Io={}));var Sl=ed?ed.userAgent:"",ym=Sl.match(/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Mm=Sl.match(/Edg\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i),Tm=Sl.match(/Android ([0-9\.]+)/i),Nm=Sl.match(/Windows NT ([0-9\.]+)/i),Dm=Sl.match(/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/),Sm=Sl.match(/Firefox\/([0-9\.]+)/i),Im=Sl.match(/OPR\/(\d+\.\d+)/i),Em=Sl.match(/Tizen ([0-9\.]+)/i),bm=Sl.match(/(iPhone OS|iPad OS|iPod OS|Mac OS X) (\d+)_(\d+)_?(\d+)?/),Lm=class{get Je(){return this.xI}get OI(){return this.jI}get zI(){return this.BI}get RI(){return this.UI}get QI(){return this.FI}get YI(){return this.GI}get VI(){return this.WI}get HI(){return this.qI}get XI(){return this.ZI}get KI(){return this.JI}get $I(){return this.tE}get Ga(){return this.iE}get eE(){return this.sE}get nE(){return this.rE||this.hE}get td(){return this.oE}get Qs(){return this.aE}get uE(){return this.cE}get dE(){return this.lE}get fE(){var t;return null!=(t=this._E)?t:this.gE}get wE(){return this.AE}get vE(){return this.mE}get pE(){return this.yE}get ME(){return this.TE}get NE(){return this.DE}get SE(){return this.EE}get bE(){return this.LE}get kE(){return this.CE}get xE(){return this.OE}get jE(){return this.zE}get PE(){return this.BE}get RE(){return this.UE}get QE(){return this.FE}get YE(){return this.GE}get VE(){return this.WE}get HE(){return this.qE}get XE(){return this.ZE}get KE(){return this.JE}get $E(){return!(!this.NE&&!this.pE)&&this.fE<=56}get ib(){return this.eb}get sb(){return this.hb}get ob(){return this.ub}get fb(){return this._b}get gb(){return this.wb}get Ab(){return this.vb}get mb(){return this.pb}constructor(){this.xI=Boolean("ontouchstart"in self||self.DocumentTouch&&h instanceof self.DocumentTouch||ed&&ed.msMaxTouchPoints),this.jI=/(mac\sos\sx)\s?([\w\s\.]+\w)*/i.test(Sl)||/(macintosh|mac(?=_powerpc)\s)/i.test(Sl),this.BI=/Windows NT/i.test(Sl),this.UI=Nm?C(Nm[1]):0,this.FI=/Android/i.test(Sl),this.GI=Tm?C(Tm[1]):0,this.WI=/windows phone (8|8\.1)/i.test(Sl),this.qI=/iPhone/i.test(Sl),this.ZI=/iPad/i.test(Sl),this.JI=this.jI&&this.xI&&!this.ZI,this.tE=/iPod/i.test(Sl),this.oE=/Mobile Safari/i.test(Sl),this.rE=/EOS\d*STB/i.test(Sl),this.hE=/APP\d*STB/i.test(Sl),this.iE=(this.qI||this.ZI||this.JI||this.tE)&&!this.WI,this.sE=bm?C(bm[2]):0,this.aE=this.WI||this.iE||this.FI||this.oE,this.cE=/CriOS/i.test(Sl),this.lE=Boolean(self.chrome&&/google/i.test(ed.vendor))||this.cE,this.AE=this.lE&&/Edg\//i.test(ed.userAgent),this.mE=Mm?x(Mm[1],10):0,this.pb=Boolean(self.chrome||/Chrome/i.test(Sl)||/CriOS/i.test(Sl)),this.gE=ym?x(ym[1],10):0,this.yE=/SMART-TV.*Tizen/i.test(Sl),this.TE=Em?C(Em[1]):0,this._E=this.TE>0?function(t){return t>=8?108:t>=7?94:t>=6.5?85:t>=6?76:t>=5.5?69:t>=5?63:t>=4?56:t>=3?47:0}(this.TE):void 0,this.DE=/webos|web0s/i.test(Sl),this.EE=/VIZIO/i.test(Sl),this.LE=/Edge\/\d+/i.test(Sl),this.CE=/Trident/i.test(Sl),this.OE=this.CE&&!self.ActiveXObject&&"ActiveXObject"in self,this.zE=/Vivaldi/i.test(Sl),this.BE=/Firefox/i.test(Sl)&&!/Seamonkey/i.test(Sl),this.UE=Sm?C(Sm[1]):0,this.FE=/Safari/i.test(Sl)&&!/Chrome/i.test(Sl)&&!this.WI&&!this.yE,this.GE=Dm?C(Dm[2]):0,this.WE=Boolean(Im),this.qE=Im?C(Im[1]):0,this.ZE=/CrKey/.test(Sl),this.JE=/\b(tv|smart-tv|smarttv|appletv|crkey|googletv|hbbtv|pov_tv|roku|viera|nettv|philipstv|vizio)\b/i.test(Sl),this.eb="web"===Io.EI,this.hb="web"===Io.II,this.ub=this.hb||this.eb,this._b="web"===Io.bI,this.wb="web"===Io.LI,this.vb="web"===Io.kI}};Lm.yb=new Lm;var km,Cm,Vs,Qr,xm,Om,fi=Lm.yb,tc=class extends Yi{constructor(){super(Co.mw)}};var or={Rg:ge.PA,Mb:v_,Tb:"cenc",Nb:A_,Db:Xs,Sb:"PlayReady"},jm={Rg:ge.BA,Mb:p_,Tb:"cenc",Nb:m_,Db:Ht,Sb:"Widevine"},on={Rg:ge.RA,Mb:T_,Tb:"skd",Nb:Ii,Db:xa,Sb:"FairPlay"},zm={Rg:ge.RA,Mb:"com.apple.fps",Tb:"sinf",Nb:Ii,Db:xa,Sb:"FairPlay"},fr={Rg:ge.UA,Mb:"org.w3.clearkey",Tb:"cenc",Nb:y_,Db:M_,Sb:"ClearKey"},Pm=[or,jm,on,fr];function Bm(t){return Pm.filter((i=>i.Db===t.toLowerCase()))}var Zh,Rm=["cenc"],Um=["cbcs","cbcs-1-9"],to=class extends Yi{constructor(t){super("Ib"),this.Eb=t}},Pn=class extends Yi{constructor(t,i,e,s){super("bb"),this.Eb=t,this.Lb=i,this.bb=e,this.kb=s}},Qm=class extends Yi{constructor(){super("lt")}};!function(t){t.Kg="Cb",t.xb="Ob"}(Zh||(Zh={}));var V=class extends Yi{constructor(t,i){super("Cb"),this.Tb=t,this.jb=i}},Fm=class extends Yi{constructor(){super("Ob")}},sn=new j([0]).buffer,ze=class{get sp(){return this.Xu.length}zb(t){for(const i of this.Xu)if(i[0]===t)return!0;return!1}Pb(t){for(const i of this.Xu)if(i[0]===t)return i[1]}Bb(t,i){this.Xu.forEach((i=>t(i[1],i[0])),i)}Rb(t,i){this.Xu.push([t,i])}Ub(){No(this.Xu)}constructor(){this.Xu=[]}},Rs=class{Qb(t){this.Fb&&(this.Fb(t),this.Qd())}Yb(t){this.Gb&&(this.Gb(t),this.Qd())}Xd(){this.Vb.catch(qo),this.Yb(new is)}Zd(t){t.then((t=>this.Qb(t)),(t=>this.Yb(t)))}Qd(){this.Fb=void 0,this.Gb=void 0}constructor(){this.Vb=new Promise(((t,i)=>{this.Fb=t,this.Gb=i}))}};function Ym(){return new j([8,4]).buffer}function Gm(t,i){return t===v_?function(t){if(t.byteLength<2*Vm.length)return t;const i=new DataView(t,0,2*Vm.length),e=Tg(i,!0);if(e===Vm)return t;return function(t){const i='<PlayReadyKeyMessage type="LicenseAcquisition"><LicenseAcquisition Version="1"><Challenge encoding="base64encoded">',e='</Challenge><HttpHeaders><HttpHeader><name>Content-Type</name><value>text/xml; charset=utf-8</value></HttpHeader><HttpHeader><name>SOAPAction</name><value>"http://schemas.microsoft.com/DRM/2007/03/protocols/AcquireLicense"</value></HttpHeader></HttpHeaders></LicenseAcquisition></PlayReadyKeyMessage>',s=""+i+P_(t)+e;return Ng(s,!0).buffer}(t)}(i):i}var Vm="<PlayReady";var bi=class extends Jo{constructor(t,i,e,s){super(t,s),this.Wb=i,this.Hb=e}},Wm=function(t,i){return(Wm=w.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)w.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])})(t,i)};function Yt(t,i){if("function"!=typeof i&&null!==i)throw new b("Class extends value "+String(i)+" is not a constructor or null");function e(){this.constructor=t}Wm(t,i),t.prototype=null===i?w.create(i):(e.prototype=i.prototype,new e)}function Hm(t,i,e){return t.indexOf?t.indexOf(i,e):Array.prototype.indexOf.call(t,i,e)}(function(){function t(t,i){this.qb=t,this.Xb=i}t.prototype.get=function(t){var i=this.qb.get(t);if(0===this.Xb||void 0===i)return i;var e=this.qb.get(t+1)||0,s=i&(1<<8-this.Xb)-1,n=e>>8-this.Xb;return(s<<this.Xb)+n},t.prototype.getBit=function(t){if(!(t<0)){var i=this.qb.get(_.floor((t+this.Xb)/8));if(void 0!==i)return(i&1<<7-this.Xb-t%8)>0?1:0}},w.defineProperty(t.prototype,"bitLength",{get:function(){return this.qb.bitLength-this.Xb},enumerable:!1,configurable:!0}),w.defineProperty(t.prototype,"length",{get:function(){return this.qb.length},enumerable:!1,configurable:!0})})(),_.pow(2,-52);function qm(t,i,e){return _.min(_.max(t,i),e)}function en(t,i){return t>>8-i}function Xm(t,i){return t&(1<<i)-1}var pc=function(){function t(t){this.Zb=t,this.Kb=0,this.Jb=0}return w.defineProperty(t.prototype,"totalBitsRead",{get:function(){return 8*this.Kb+this.Jb},enumerable:!1,configurable:!0}),w.defineProperty(t.prototype,"done",{get:function(){return this.Kb===this.Zb.length&&0===this.Jb},enumerable:!1,configurable:!0}),w.defineProperty(t.prototype,"location",{get:function(){return{byte:this.Kb,bit:this.Jb}},enumerable:!1,configurable:!0}),t.prototype.copy=function(){var i=new t(this.Zb);return i.seek(this.Kb,this.Jb),i},t.prototype.canReadBits=function(t){return 8*this.Kb+t+this.Jb<=8*this.Zb.length},t.prototype.canReadBytes=function(t){return 0===this.Jb?this.Kb+t<=this.Zb.length:this.Kb+t<this.Zb.length},t.prototype.incBit=function(){this.Jb++,this.Jb>7&&(this.Kb++,this.Jb=0)},t.prototype.seek=function(t,i){this.Kb=t,this.Jb=i},t.prototype.peekBit=function(){if(!this.canReadBits(1))throw new g("Cannot read past end of buffer.");return this.Zb.get(this.Kb)>>7-this.Jb&1},t.prototype.readBit=function(){var t=this.peekBit();return this.incBit(),t},t.prototype.readByte=function(){if(!this.canReadBytes(1))throw new g("Cannot read past end of buffer.");if(0===this.Jb)return this.Zb.get(this.Kb++);var t=Xm(this.Zb.get(this.Kb),8-this.Jb),i=en(this.Zb.get(this.Kb+1),this.Jb);return this.Kb++,t<<this.Jb|i},t.prototype.readBits=function(t){if(!this.canReadBits(t))throw new g("Cannot read past end of buffer.");for(var i=[],e=0;e<t;e++)i.push(this.readBit());return i},t.prototype.readUInt=function(t){if(t>32)throw new g("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new g("Cannot read past end of buffer.");var i=0;if(0===this.Jb&&t%8==0)for(var e=t-8;e>=0;e-=8)i|=this.readByte()<<e;else for(e=t-1;e>=0;e--)i|=this.readBit()<<e;return i},t.prototype.readInt=function(t){if(t>32)throw new g("The max bitlength that can be provided is 32.");if(!this.canReadBits(t))throw new g("Cannot read past end of buffer.");var i=this.readUInt(t);return 0===(i&1<<t-1)?i:i-_.pow(2,t)},t.prototype.readExponentialGolombCode=function(){for(var t=0;0===this.readBit();)t++;var i=1<<t;return i+=this.readUInt(t)-1},t.prototype.readSignedExponentialGolombCode=function(){var t=this.readExponentialGolombCode();return 1&t?(t+1)/2:-t/2},t.prototype.skipBits=function(t){if(!this.canReadBits(t))throw new g("Skipping over the buffer edge is not allowed.");var i=this.Jb+t;this.Kb+=i>>3,this.Jb=7&i},t.prototype.readBool=function(){return this.readBit()>0},t.prototype.readString=function(t){if(!this.canReadBytes(t))throw new g("Cannot read past end of buffer.");for(var i=[],e=0;e<t;e++)i.push(this.readByte());return String.fromCharCode.apply(String,i)},t}(),Zm=function(t,i){return t===i?0:t<i?-1:t>i?1:S(t)?S(i)?0:1:-1},Ou=function(){function t(){this.$b=[],this.tL=[],this.iL=0}return t.from=function(){for(var i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];for(var s=new t,n=0,r=i;n<r.length;n++){var h=r[n];s.pushRange(h)}return s},t.prototype.pushRange=function(t,i,e){if(void 0===i&&(i=0),void 0===e&&(e=t.length),e<0)throw new g("The buffer length must be positive.");if(0!==e){if(0===this.tL.length)this.tL.push(0);else{var s=this.tL[this.tL.length-1]+this.$b[this.$b.length-1].length;this.tL.push(s)}this.$b.push(t.subarray(i,i+e)),this.iL+=e}},t.prototype.concat=function(i){var e=new t;return e.pushRange(this.join()),e.pushRange(i.join()),e},t.prototype.copy=function(t,i,e,s){if(void 0===i&&(i=0),void 0===e&&(e=0),void 0===s&&(s=this.length),i<0||e<0||s<0)throw new RangeError;return this.slice(e,s).copyInternal(t,i)},t.prototype.copyInternal=function(t,i){for(var e=0,s=i,n=0,r=this.$b;n<r.length;n++){var h=r[n];t.set(h,s),e+=h.length,s+=h.length}return e},t.prototype.clear=function(){this.$b=[],this.tL=[],this.iL=0},t.prototype.get=function(t){if(!(t<0||t>=this.length)){var i=this.findContainingBufferIndex(t),e=t-this.tL[i];return this.$b[i][e]}},w.defineProperty(t.prototype,"first",{get:function(){return this.get(0)},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){if(this.$b.length<1)return-1;if(this.$b.length>1){var i=this.join();this.clear(),this.pushRange(i)}var e=this.$b[0];return"number"==typeof t?Hm(e,t):"undefined"!=typeof Buffer?Buffer.from(e.buffer,e.byteOffset,e.byteLength).indexOf(t):function(t,i){if(0===i.length)return 0;for(var e=i[0],s=i.length,n=t.length-s,r=0;r<=n&&!((r=Hm(t,e,r))<0||r>n);r++){for(var h=r+1,o=r+s,a=1;h<o&&t[h]===i[a];h++,a++);if(h===o)return r}return-1}(e,t)},t.prototype.findContainingBufferIndex=function(t){return function(t,i,e){if(0!==t.length){var s=0,n=t.length-1;if(1!==e(t[s],i)){if(1===e(i,t[n]))return n;for(;s!==n;){var r=_.ceil((s+n)/2);e(t[r],i)<=0?s=r:n=r-1}return s}}}(this.tL,t,Zm)},t.prototype.join=function(){if(1===this.$b.length)return this.$b[0];var t=new j(this.length);return this.copyInternal(t,0),t},w.defineProperty(t.prototype,"length",{get:function(){return this.iL},enumerable:!1,configurable:!0}),w.defineProperty(t.prototype,"bitLength",{get:function(){return 8*this.length},enumerable:!1,configurable:!0}),t.prototype.readUIntBE=function(t,i){if(i<=0||i>4)throw new g("Expected byteLength to be between 0 and 4 but was "+i);if(t<0||t>this.length-i)throw new g("Offset must be between 0 and buffer.length - byteLength, but was "+t+" (max allowed "+(this.length-i)+")");if(1===i)return this.get(t);for(var e=0,s=0;s<i;s++)e+=this.get(t+s)*_.pow(2,8*(i-s-1));return e},t.prototype.slice=function(i,e){void 0===e&&(e=this.length);var s=qm(i,0,this.length),n=qm(e,0,this.length);if(s>n)return new t;if(s===n)return new t;for(var r=new t,h=this.findContainingBufferIndex(s),o=this.$b[h],a=s,u=a-this.tL[h];a+o.length-u<n;)r.pushRange(o,u,o.length-u),h+=1,u=(a+=o.length-u)-this.tL[h],o=this.$b[h];var c=n-a;return r.pushRange(o,u,c),r},t.prototype.trim=function(){if(0===this.length)return new t;for(var i=this.length-1,e=this.$b.length-1,s=this.$b[e],n=s.length-1;i>=0&&e>=0;){if(0!==s[n])break;if(0===n){if(0===e)return new t;e-=1,n=(s=this.$b[e]).length-1}else n-=1;i-=1}return this.slice(0,i+1)},t}(),Km=function(){function t(i){this.eL=i||t.BUFFER_CHUNK_SIZE,this.sL=!1,this.nL=new Ou,this.Zb=new j(this.eL),this.rL=0,this.hL=0,this.Jb=7}return t.prototype.closeByte=function(){this.Zb[this.rL++]=this.hL,this.rL>=this.eL&&this.closeBuffer(),this.hL=0,this.Jb=7},t.prototype.closeBuffer=function(t){void 0===t&&(t=!0),0!==this.rL&&(this.nL.pushRange(this.Zb,0,this.rL),t&&(this.Zb=new j(this.eL)),this.rL=0)},w.defineProperty(t.prototype,"isWritingStartBit",{get:function(){return 7===this.Jb},enumerable:!1,configurable:!0}),t.prototype.close=function(){if(this.sL)throw new g("Cannot close a closed BitWriter.");return this.isWritingStartBit||this.closeByte(),this.closeBuffer(!1),this.sL=!0,this.nL},t.prototype.writeBit=function(t){if(this.sL)throw new g("Cannot write to a closed BitWriter.");this.hL|=t<<this.Jb,0===this.Jb?this.closeByte():this.Jb--},t.prototype.writeByte=function(t){if(this.sL)throw new g("Cannot write to a closed BitWriter.");this.isWritingStartBit?(this.hL=t,this.closeByte()):this.writeByteUnaligned(t)},t.prototype.writeByteUnaligned=function(t){var i=this.Jb;this.hL|=en(t,i+1),this.closeByte(),this.hL=Xm(t,8-i)<<i+1,this.Jb=i},t.prototype.writeBits=function(t){for(var i=0,e=t;i<e.length;i++){var s=e[i];this.writeBit(s)}},t.prototype.writeBytes=function(t){if(this.sL)throw new g("Cannot write to a closed BitWriter.");this.isWritingStartBit?this.writeBytesAligned(t):this.writeBytesUnaligned(t)},t.prototype.writeBytesAligned=function(t){this.rL+t.length<=this.eL?(this.Zb.set(t,this.rL),this.rL+=t.length,this.rL===this.eL&&this.closeBuffer()):(this.closeBuffer(),this.nL.pushRange(t))},t.prototype.writeBytesUnaligned=function(t){if(0!==t.length){var i=this.Jb;this.hL|=en(t[0],i+1),this.closeByte();for(var e=1;e<t.length;e++){var s=Xm(t[e-1],8-i),n=en(t[e],i+1);this.hL=s<<i+1|n,this.closeByte()}this.hL=Xm(t[t.length-1],8-i)<<i+1,this.Jb=i}},t.prototype.writeUInt=function(t,i){if(t<0)throw new g("Received a negative number.");if(i>32)throw new g("The max bitlength that can be provided is 32.");if(t>=_.pow(2,i))throw new g("Uint "+t+" cannot be represented in "+i+" bit(s).");if(this.isWritingStartBit&&i%8==0)for(var e=i-8;e>=0;e-=8)this.writeByte(t>>e&255);else for(e=i-1;e>=0;e--)this.writeBool((t&1<<e)>0)},t.prototype.writeInt=function(t,i){if(i>32)throw new g("The max bitlength that can be provided is 32.");if(_.abs(t)>=_.pow(2,i-1))throw new g("Signed integer "+t+" cannot be represented in "+i+" bit(s).");t<0?this.writeUInt(t+_.pow(2,i),i):this.writeUInt(t,i)},t.prototype.writeExponentialGolombCode=function(t){if(t<0)throw new g("Received a negative number.");for(var i=_.floor(_.log2(t+1))+1,e=0;e<i-1;e++)this.writeBit(0);this.writeUInt(t+1,i)},t.prototype.writeSignedExponentialGolombCode=function(t){0===t?this.writeExponentialGolombCode(0):t<0?this.writeExponentialGolombCode(-2*t):this.writeExponentialGolombCode(2*t-1)},t.prototype.padByte=function(t){for(;!this.isWritingStartBit;)this.writeBit(t)},t.prototype.writeBool=function(t){this.writeBit(t?1:0)},t.prototype.writeString=function(t){for(var i=function(t){for(var i=new j(t.length),e=0;e<t.length;e++)i[e]=t.charCodeAt(e);return i}(t),e=0;e<i.length;e++)this.writeByte(i[e])},t.BUFFER_CHUNK_SIZE=1024,t}(),Jm=function(){function t(t){this.rb=new Ou,this.oL=t}return t.prototype.closeWriter=function(){void 0!==this.oL&&(this.rb=this.rb.concat(this.oL.close()),this.oL=void 0)},w.defineProperty(t.prototype,"writer",{get:function(){return void 0===this.oL&&(this.oL=new Km),this.oL},enumerable:!1,configurable:!0}),t.prototype.concat=function(t){this.closeWriter(),this.rb=this.rb.concat(t)},t.prototype.toRangedBuffer=function(){return this.closeWriter(),this.rb},t}(),Lr=function(){function t(t){if(this.boxType=t,4!==t.length&&16!==t.length)throw new g("The provided box type does not conform to either a 4 character type or a 16 byte uuid.")}return t.prototype.serializeCommonBoxHeader=function(i){var e=this.getSize(),s=e>=t.LARGE_SIZE/8,n=16===this.boxType.length;i.writeUInt(s?1:e,32),i.writeString(n?"uuid":this.boxType),s&&(i.writeUInt(_.floor(e/t.LARGE_SIZE),32),i.writeUInt(e%t.LARGE_SIZE,32)),n&&i.writeString(this.boxType)},t.prototype.getSize=function(){var i=8+(this.boxType.length>4?16:0),e=this.getBoxContentSize()+i;return e>=t.LARGE_SIZE/8&&(e+=8),e},t.prototype.serialize=function(){var t=new Jm;return this.serializeCommonBoxHeader(t.writer),this.serializeBoxContent(t),t.toRangedBuffer()},t.LARGE_SIZE=_.pow(2,32),t}();function $m(t,i){return t instanceof Ce?64===i:t<_.pow(2,i)}function rs(t,i){return _.round(t*_.pow(2,i))}function tp(t,i){for(var e=0;e<i.length;e++)t.writeByte(i[e])}function Dc(t,i){return t/_.pow(2,i)}var At=function(t){function i(i,e,s){var n=t.call(this,i)||this;if(n.version=e,!$m(e,8))throw new g("the provided version cannot fit in 8 bits.");return n.flags=s,n}return Yt(i,t),w.defineProperty(i.prototype,"flags",{get:function(){return this.aL},set:function(t){this.aL=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return 4},i.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new g("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},i.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},i}(Lr),ip=function(t){function i(i,e){var s=t.call(this,i)||this;return s.data=e,s}return Yt(i,t),i.prototype.getBoxContentSize=function(){return this.data.length},i.prototype.serializeBoxContent=function(t){t.concat(Ou.from(this.data))},i}(Lr),ep=function(){function t(t){void 0===t&&(t=0),this.offset=t}return t.prototype.shift=function(t){this.offset+=t},t.prototype.seek=function(t){this.offset=t},t.prototype.clone=function(){return new t(this.offset)},t}();var sp=16384;function np(t){var i=t.length;if(i<=sp)return String.fromCharCode.apply(String,t);for(var e=[],s=0;s<i;s+=sp)e.push(String.fromCharCode.apply(String,t.slice(s,s+sp)));return e.join("")}var rp=function(){function t(t){this.raw=t}return t.prototype.isSet=function(t){return function(t,i){return(t&i)===i}(this.raw,t)},t}();function hp(t,i){var e=t.getUint8(i.offset);return i.shift(1),e}function op(t,i,e){var s=_p(Ap(t),i.offset,i.offset+e);return i.shift(s.byteLength),s}function ap(t,i,e){return i.offset+e<=t.byteLength}function up(t,i,e){void 0===e&&(e=!1);var s=t.getUint32(i.offset,e);return i.shift(4),s}function cp(t,i,e){void 0===e&&(e=!1);var s=up(t,i,e),n=up(t,i,e),r=e?n:s,h=e?s:n;return Ce.fromBits(h,r,!0)}function dp(t,i,e){return np(function(t){return[].slice.call(t)}(op(t,i,e)))}function lp(t,i){var e,s=hp(t,i);return 0==(128&s)?e=s:192==(224&s)?e=64*(31&s)+(63&hp(t,i)):224==(240&s)?e=4096*(15&s)+64*(63&hp(t,i))+(63&hp(t,i)):240==(248&s)&&(e=262144*(7&s)+4096*(63&hp(t,i))+64*(63&hp(t,i))+(63&hp(t,i))),e}function fp(t,i){return function(t,i,e){var s=[],n=function(t,i){return i.offset+3<=t.byteLength&&239===t.getUint8(i.offset)&&187===t.getUint8(i.offset+1)&&191===t.getUint8(i.offset+2)}(t,i);n&&i.shift(3);for(;i.offset<t.byteLength;){var r=lp(t,i);if(void 0===r)break;if(e&&0===r)break;s.push(r)}return function(t){for(var i=[],e=0,s=t;e<s.length;e++){var n=s[e];n>65535&&(n-=65536,i.push(n>>>10&1023|55296),n=56320|1023&n),i.push(n)}return np(i)}(s)}(t,i,!0)}function _p(t,i,e){return void 0===i&&(i=0),void 0===e&&(e=t.byteLength),new j(t.buffer,t.byteOffset+i,e-i)}function gp(t,i,e){return void 0===i&&(i=0),void 0===e&&(e=t.byteLength),new DataView(t.buffer,t.byteOffset+i,e-i)}function wp(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Ap(t){return new j(t.buffer,t.byteOffset,t.byteLength)}var vp=function(){function t(t){void 0===t&&(t=0),this.offset=t}return t.prototype.shift=function(t){this.offset+=t},t.prototype.seek=function(t){this.offset=t},t.prototype.clone=function(){return new t(this.offset)},t.prototype.toBit=function(){return new ep(this.offset<<3)},t}(),mp=function(){function t(t,i){this.data=t,this.cursor=i}return t.prototype.nextUint8=function(){return hp(this.data,this.cursor)},t.prototype.nextUint16=function(){return function(t,i,e){void 0===e&&(e=!1);var s=t.getUint16(i.offset,e);return i.shift(2),s}(this.data,this.cursor)},t.prototype.nextInt16=function(){return function(t,i,e){void 0===e&&(e=!1);var s=t.getInt16(i.offset,e);return i.shift(2),s}(this.data,this.cursor)},t.prototype.nextUint32=function(){return up(this.data,this.cursor)},t.prototype.nextInt32=function(){return function(t,i,e){void 0===e&&(e=!1);var s=t.getInt32(i.offset,e);return i.shift(4),s}(this.data,this.cursor)},t.prototype.nextInt64=function(){return function(t,i,e){void 0===e&&(e=!1);var s=up(t,i,e),n=up(t,i,e),r=e?n:s,h=e?s:n;return Ce.fromBits(h,r,!1)}(this.data,this.cursor)},t.prototype.nextUint64=function(){return cp(this.data,this.cursor)},t.prototype.nextUint8Array=function(t){return op(this.data,this.cursor,t)},t.prototype.nextUint32Array=function(t){return function(t,i,e){for(var s=[],n=0;n<e;n++)s.push(up(t,i));return s}(this.data,this.cursor,t)},t.prototype.nextChars=function(t){return dp(this.data,this.cursor,t)},t.prototype.nextUTF8String=function(){return fp(this.data,this.cursor)},t.prototype.skip=function(t){this.cursor.shift(t)},t.prototype.clone=function(){return new t(this.data,this.cursor.clone())},t}();function ks(t,i){return t.type===i}var pp=8;function Ro(t){var i=function(t,i){var e=[];for(;i.offset<t.byteLength;){var s=yp(t,i);if(!s.complete)return{complete:!1,boxes:e};e.push(s.box)}return{complete:!0,boxes:e}}(t.data,t.cursor);if(!i.complete)throw new g("Data incomplete");return i.boxes}function yp(t,i){var e=i.offset,s=function(t,i){var e=i.offset;if(!ap(t,i,pp)){return{complete:!1,neededOffset:r=i.offset+pp}}var s=up(t,i),n=dp(t,i,4);if(1===s){if(!ap(t,i,8)){var r=i.offset+8;return i.seek(e),{complete:!1,neededOffset:r}}s=cp(t,i).toNumber()}if("uuid"===n){if(!ap(t,i,16)){r=i.offset+16;return i.seek(e),{complete:!1,neededOffset:r}}n=dp(t,i,16)}var h=i.offset,o={type:n,size:s,headerSize:h-e};return{complete:!0,header:o}}(t,i);if(!s.complete)return s;var n=s.header,r=n.size;0===r&&(r=t.byteLength-e);var h=e+r;if(h>t.byteLength){var o=h;return i.seek(e),{complete:!1,neededOffset:o}}var a={type:n.type,offset:e,data:new mp(gp(t,e,h),new vp(n.headerSize))};return i.seek(h),{complete:!0,box:a}}function tu(t){return{version:t>>24,flags:new rp(16777215&t)}}function Mp(t,i){var e,s,n,r;return 1===i?(e=t.nextUint64(),s=t.nextUint64(),n=t.nextUint32(),r=t.nextUint64()):(e=t.nextUint32(),s=t.nextUint32(),n=t.nextUint32(),r=t.nextUint32()),{creation:e,modification:s,scale:n,duration:r}}function lr(t){return t.skipBits(4),{isLeading:t.readUInt(2),sampleDependsOn:t.readUInt(2),sampleIsDependedOn:t.readUInt(2),sampleHasRedundancy:t.readUInt(2),samplePaddingValue:t.readUInt(3),sampleIsNonSyncSample:Boolean(t.readBit()),sampleDegradationPriority:t.readUInt(16)}}function Tp(t){var i=t.nextUint32Array(9);return{a:Dc(i[0],16),b:Dc(i[1],16),u:Dc(i[2],30),c:Dc(i[3],16),d:Dc(i[4],16),v:Dc(i[5],30),x:Dc(i[6],16),y:Dc(i[7],16),w:Dc(i[8],30)}}function Lh(t){return new ip(t.type,_p(Ap(t.data.data),t.data.cursor.offset))}var Np=function(t){function i(i,e,s,n){void 0===s&&(s=0),void 0===n&&(n=0);var r=t.call(this,"hdlr",s,n)||this;return r.name=e,r.handlerType=i,r}return Yt(i,t),w.defineProperty(i.prototype,"handlerType",{get:function(){return this.uL},set:function(t){this.uL=t},enumerable:!1,configurable:!0}),i.prototype.serializeReserved=function(t){t.writer.writeUInt(0,32),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)},i.prototype.getBoxContentSize=function(){var i,e;return t.prototype.getBoxContentSize.call(this)+4+4+12+(null!==(e=null===(i=this.name)||void 0===i?void 0:i.length)&&void 0!==e?e:0)+1},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(0,32),i.writer.writeString(this.handlerType),this.serializeReserved(i),this.name&&i.writer.writeString(this.name),i.writer.writeByte(0)},i}(At);function Dp(t){var i=t.data,e=tu(i.nextUint32()),s=e.version,n=e.flags;i.skip(4);var r=i.nextChars(4);i.skip(12);var h=i.nextUTF8String();return new Np(r,h,s,n.raw)}!function(t){function i(){return t.call(this,"mdir")||this}Yt(i,t),i.prototype.serializeReserved=function(t){t.writer.writeString("appl"),t.writer.writeUInt(0,32),t.writer.writeUInt(0,32)}}(Np);var Sp=function(){function t(t,i){void 0===i&&(i=!1),this.fixed28BitMode=i,this.tag=t}return t.prototype.encodeSize=function(t){for(var i=[];t>0;)i.length>0&&(i[i.length-1]+=128),i.push(t%128),t>>=7;if(this.fixed28BitMode)for(;i.length<4;)i.push(128);return i.reverse()},w.defineProperty(t.prototype,"tag",{get:function(){return this.cL},set:function(t){if(!$m(t,8))throw new g("Provided tag does not fit in 8 bits.");this.cL=t},enumerable:!1,configurable:!0}),t.prototype.getSize=function(){return this.getDescriptorSize()+1+this.encodeSize(this.getDescriptorSize()).length},t.prototype.serialize=function(t){t.writer.writeByte(this.tag);for(var i=0,e=this.encodeSize(this.getDescriptorSize());i<e.length;i++){var s=e[i];t.writer.writeByte(s)}this.serializeDescriptorContent(t)},t}(),Ip=(function(t){function i(i,e,s,n,r,h,o){void 0===o&&(o={});var a=t.call(this,4,o.fixed28BitMode)||this;return a.upStream=s,a.decoderSpecificInfo=h,a.objectTypeIndication=i,a.streamType=e,a.bufferSizeDb=n,a.maxBitrate=r.max,a.avgBitrate=r.avg,a}Yt(i,t),w.defineProperty(i.prototype,"objectTypeIndication",{get:function(){return this.dL},set:function(t){if(!$m(t,8))throw new g("Provided objectTypeIndication does not fit in 8 bits.");this.dL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"streamType",{get:function(){return this.lL},set:function(t){if(!$m(t,6))throw new g("Provided streamType does not fit in 6 bits.");this.lL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"bufferSizeDb",{get:function(){return this.fL},set:function(t){if(!$m(t,24))throw new g("Provided bufferSizeDb does not fit in 24 bits.");this.fL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"maxBitrate",{get:function(){return this._L},set:function(t){if(!$m(t,32))throw new g("Provided maxBitrate does not fit in 32 bits.");this._L=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"avgBitrate",{get:function(){return this.gL},set:function(t){if(!$m(t,32))throw new g("Provided avgBitrate does not fit in 32 bits.");this.gL=t},enumerable:!1,configurable:!0}),i.prototype.getDescriptorSize=function(){return 13+this.decoderSpecificInfo.reduce((function(t,i){return t+i.getSize()}),0)},i.prototype.serializeDescriptorContent=function(t){t.writer.writeByte(this.objectTypeIndication),t.writer.writeUInt(this.streamType,6),t.writer.writeBool(this.upStream),t.writer.writeBit(1),t.writer.writeUInt(this.bufferSizeDb,24),t.writer.writeUInt(this.maxBitrate,32),t.writer.writeUInt(this.avgBitrate,32);for(var i=0,e=this.decoderSpecificInfo;i<e.length;i++){e[i].serialize(t)}}}(Sp),function(t){function i(i,e){void 0===e&&(e={});var s=t.call(this,5,e.fixed28BitMode)||this;return s.data=i,s}Yt(i,t),i.prototype.getDescriptorSize=function(){return this.data.length},i.prototype.serializeDescriptorContent=function(t){t.concat(Ou.from(this.data))}}(Sp),function(t){function i(i){void 0===i&&(i=!1);var e=t.call(this,6,i)||this;return e.predefined=2,e}return Yt(i,t),i.prototype.getDescriptorSize=function(){return 1},i.prototype.serializeDescriptorContent=function(t){t.writer.writeByte(this.predefined)},i}(Sp)),Ep=(function(t){function i(i,e,s,n){void 0===n&&(n={});var r=t.call(this,3,n.fixed28BitMode)||this;return r.decoderConfigDescriptor=s,r.esId=i,r.streamPriority=e,r.dependsOnEsId=null==n?void 0:n.dependsOnEsId,r.urlString=null==n?void 0:n.url,r.ocrEsId=null==n?void 0:n.ocrEsId,r.slConfigDescriptor=new Ip(n.fixed28BitMode),r}Yt(i,t),w.defineProperty(i.prototype,"streamDependenceFlag",{get:function(){return void 0!==this.dependsOnEsId},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"urlFlag",{get:function(){return void 0!==this.urlString},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"ocrStreamFlag",{get:function(){return void 0!==this.ocrEsId},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"esId",{get:function(){return this.wL},set:function(t){if(!$m(t,16))throw new g("Provided esId does not fit in 16 bits.");this.wL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"streamPriority",{get:function(){return this.AL},set:function(t){if(!$m(t,5))throw new g("Provided streamPriority does not fit in 5 bits.");this.AL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"dependsOnEsId",{get:function(){return this.vL},set:function(t){if(t&&!$m(t,16))throw new g("Provided dependsOnEsId does not fit in 16 bits.");this.vL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"ocrEsId",{get:function(){return this.mL},set:function(t){if(t&&!$m(t,16))throw new g("Provided ocrEsId does not fit in 16 bits.");this.mL=t},enumerable:!1,configurable:!0}),i.prototype.getDescriptorSize=function(){return 3+(this.streamDependenceFlag?2:0)+(this.urlFlag?1+this.urlString.length:0)+(this.ocrStreamFlag?2:0)+this.decoderConfigDescriptor.getSize()+this.slConfigDescriptor.getSize()},i.prototype.serializeDescriptorContent=function(t){t.writer.writeUInt(this.esId,16),t.writer.writeBool(this.streamDependenceFlag),t.writer.writeBool(this.urlFlag),t.writer.writeBool(this.ocrStreamFlag),t.writer.writeUInt(this.streamPriority,5),this.streamDependenceFlag&&t.writer.writeUInt(this.dependsOnEsId,16),this.urlFlag&&(t.writer.writeByte(this.urlString.length),t.writer.writeString(this.urlString)),this.ocrStreamFlag&&t.writer.writeUInt(this.ocrEsId,16),this.decoderConfigDescriptor.serialize(t),this.slConfigDescriptor.serialize(t)}}(Sp),function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.boxes=[],i}return Yt(i,t),i.prototype.getSize=function(){return t.prototype.getSize.call(this)+this.boxes.reduce((function(t,i){return t+i.getSize()}),0)},i.prototype.serialize=function(){for(var i=t.prototype.serialize.call(this),e=0,s=this.boxes;e<s.length;e++){var n=s[e];i=i.concat(n.serialize())}return i},i}(Lr)),Qe=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return Yt(i,t),i.prototype.serializeBoxContent=function(t){},i.prototype.getBoxContentSize=function(){return 0},i}(Ep),bp=function(t){function i(i,e){var s=t.call(this,i)||this;return s.dataReferenceIndex=e,s}return Yt(i,t),w.defineProperty(i.prototype,"dataReferenceIndex",{get:function(){return this.pL},set:function(t){if(!$m(t,16))throw new g("Provided dataReferenceIndex does not fit in 16 bits.");this.pL=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return 8},i.prototype.serializeBoxContent=function(t){for(var i=0;i<6;i++)t.writer.writeByte(0);t.writer.writeUInt(this.dataReferenceIndex,16)},i}(Qe),Lp=function(t){function i(i,e,s,n){var r,h,o=this;return(o=t.call(this,i,e)||this).extra=n,o.channelCount=null!==(r=s.channelCount)&&void 0!==r?r:2,o.sampleSize=null!==(h=s.sampleSize)&&void 0!==h?h:16,o.sampleRate=s.sampleRate,o}return Yt(i,t),w.defineProperty(i.prototype,"channelCount",{get:function(){return this.yL},set:function(t){if(!$m(t,16))throw new g("Provided channelCount does not fit in 16 bits.");this.yL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"sampleSize",{get:function(){return this.ML},set:function(t){if(!$m(t,16))throw new g("Provided sampleSize does not fit in 16 bits.");this.ML=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"sampleRate",{get:function(){return this.TL},set:function(t){if(!$m(rs(t,16),32))throw new g("Provided rate does not fit in 32 bits (fixed 16.16).");this.TL=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){var i,e;return t.prototype.getBoxContentSize.call(this)+8+2+2+2+2+(void 0!==this.sampleRate?4:0)+(null!==(e=null===(i=this.extra)||void 0===i?void 0:i.length)&&void 0!==e?e:0)},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(0,32),i.writer.writeUInt(0,32),i.writer.writeUInt(this.channelCount,16),i.writer.writeUInt(this.sampleSize,16),i.writer.writeUInt(0,16),i.writer.writeUInt(0,16),i.writer.writeUInt(rs(this.sampleRate,16),32),this.extra&&tp(i.writer,this.extra)},i}(bp),Fu=(function(t){function i(i){var e=t.call(this,"stco",0,0)||this;return e.entries=i,e}Yt(i,t),w.defineProperty(i.prototype,"entries",{get:function(){return this.NL},set:function(t){if(!$m(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!$m(t,32)})))throw new g("Not all entries can be represented in 32 bits.");this.NL=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4*this.entries.length},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(this.entries.length,32);for(var e=0,s=this.entries;e<s.length;e++){var n=s[e];i.writer.writeUInt(n,32)}}}(At),function(t){function i(i){var e=t.call(this,"clap")||this;return e.cleanApertureWidthN=i.cleanApertureWidthN,e.cleanApertureWidthD=i.cleanApertureWidthD,e.cleanApertureHeightN=i.cleanApertureHeightN,e.cleanApertureHeightD=i.cleanApertureHeightD,e.horizOffN=i.horizOffN,e.horizOffD=i.horizOffD,e.vertOffN=i.vertOffN,e.vertOffD=i.vertOffD,e}Yt(i,t),w.defineProperty(i.prototype,"cleanApertureWidthN",{get:function(){return this.DL},set:function(t){if(!$m(t,32))throw new g("Provided cleanApertureWidthN does not fit in 32 bits.");this.DL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"cleanApertureWidthD",{get:function(){return this.SL},set:function(t){if(!$m(t,32))throw new g("Provided cleanApertureWidthD does not fit in 32 bits.");this.SL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"cleanApertureHeightN",{get:function(){return this.IL},set:function(t){if(!$m(t,32))throw new g("Provided cleanApertureHeightN does not fit in 32 bits.");this.IL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"cleanApertureHeightD",{get:function(){return this.EL},set:function(t){if(!$m(t,32))throw new g("Provided cleanApertureHeightD does not fit in 32 bits.");this.EL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"horizOffN",{get:function(){return this.bL},set:function(t){if(!$m(t,32))throw new g("Provided horizOffN does not fit in 32 bits.");this.bL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"horizOffD",{get:function(){return this.LL},set:function(t){if(!$m(t,32))throw new g("Provided horizOffD does not fit in 32 bits.");this.LL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"vertOffN",{get:function(){return this.kL},set:function(t){if(!$m(t,32))throw new g("Provided vertOffN does not fit in 32 bits.");this.kL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"vertOffD",{get:function(){return this.CL},set:function(t){if(!$m(t,32))throw new g("Provided vertOffD does not fit in 32 bits.");this.CL=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return 32},i.prototype.serializeBoxContent=function(t){t.writer.writeUInt(this.cleanApertureWidthN,32),t.writer.writeUInt(this.cleanApertureWidthD,32),t.writer.writeUInt(this.cleanApertureHeightN,32),t.writer.writeUInt(this.cleanApertureHeightD,32),t.writer.writeUInt(this.horizOffN,32),t.writer.writeUInt(this.horizOffD,32),t.writer.writeUInt(this.vertOffN,32),t.writer.writeUInt(this.vertOffD,32)}}(Lr),function(t){function i(i,e){var s=t.call(this,"ctts",i,0)||this;return s.entries=e,s}Yt(i,t),w.defineProperty(i.prototype,"entries",{get:function(){return this.NL},set:function(t){if(!$m(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!$m(t.sampleCount,32)||!$m(t.sampleOffset,32)})))throw new g("Not all entries can be represented in 64 bits.");this.NL=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+8*this.entries.length},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(this.entries.length,32);for(var e=0,s=this.entries;e<s.length;e++){var n=s[e];i.writer.writeUInt(n.sampleCount,32),0===this.version?i.writer.writeUInt(n.sampleOffset,32):1===this.version&&i.writer.writeInt(n.sampleOffset,32)}}}(At),function(t){function i(i){var e=t.call(this,"url ",0,void 0===i?1:0)||this;return e.location=i,e}Yt(i,t),w.defineProperty(i.prototype,"location",{get:function(){return this.xL},set:function(t){this.flags=void 0===t?1:0,this.xL=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){var i=t.prototype.getBoxContentSize.call(this);return this.location?i+this.location.length+1:i},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),this.location&&(i.writer.writeString(this.location),i.writer.writeByte(0))}}(At),function(t){function i(i,e,s){var n=t.call(this,"urn ",0,s)||this;return n.name=i,n.location=e,n}Yt(i,t),w.defineProperty(i.prototype,"location",{get:function(){return this.xL},set:function(t){if(1&this.flags)throw new g("The moov containment flag is set, a DataEntryUrlBox should be used instead.");this.xL=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){var i=t.prototype.getBoxContentSize.call(this)+this.name.length+1;return this.location?i+this.location.length+1:i},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeString(this.name),i.writer.writeByte(0),this.location&&(i.writer.writeString(this.location),i.writer.writeByte(0))}}(At),function(t){function i(){return t.call(this,"dinf")||this}Yt(i,t)}(Qe),function(t){function i(i,e,s){var n=t.call(this,i)||this;if(n.version=e,!$m(e,8))throw new g("the provided version cannot fit in 8 bits.");return n.flags=s,n}return Yt(i,t),w.defineProperty(i.prototype,"flags",{get:function(){return this.aL},set:function(t){this.aL=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return 4},i.prototype.serializeFlags=function(t){if("number"!=typeof this.flags)throw new g("Missing custom serializeFlags method.");t.writer.writeUInt(this.flags,24)},i.prototype.serializeBoxContent=function(t){t.writer.writeByte(this.version),this.serializeFlags(t)},i}(Ep)),kp=(function(t){function i(){return t.call(this,"dref",0,0)||this}Yt(i,t),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(this.boxes.length,32)}}(Fu),function(t){function i(i,e,s){void 0===s&&(s=0);var n=t.call(this,"elst",e,s)||this;return n.entries=i,n}return Yt(i,t),w.defineProperty(i.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"entries",{get:function(){return this.NL},set:function(t){for(var i=0,e=t;i<e.length;i++){var s=e[i];if(!$m(s.segmentDuration,this.bitSize))throw new g("SegmentDuration of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!$m(s.mediaTime,this.bitSize))throw new g("MediaTime of one of the entries does not fit in ".concat(this.bitSize," bits."));if(!$m(s.mediaRateInteger,16))throw new g("Provided mediaRateInteger does not fit in 16 bits.");if(s.mediaRateFraction&&!$m(s.mediaRateFraction,16))throw new g("Provided mediaRateFraction does not fit in 16 bits.")}this.NL=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+this.entries.length*(2*this.bitSize/8+2+2)},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(this.entries.length,32),this.serializeElstBoxContent(i)},i}(At)),Cp=function(t){function i(i,e){return void 0===e&&(e=0),t.call(this,i,0,e)||this}return Yt(i,t),i.prototype.serializeElstBoxContent=function(t){for(var i,e=0,s=this.entries;e<s.length;e++){var n=s[e];t.writer.writeUInt(n.segmentDuration,32),t.writer.writeInt(n.mediaTime,32),t.writer.writeUInt(n.mediaRateInteger,16),t.writer.writeUInt(null!==(i=n.mediaRateFraction)&&void 0!==i?i:0,16)}},i}(kp),xp=function(t){function i(i,e){return void 0===e&&(e=0),t.call(this,i,1,e)||this}return Yt(i,t),i.prototype.serializeElstBoxContent=function(t){for(var i,e=0,s=this.entries;e<s.length;e++){var n=s[e];t.writer.writeUInt(n.segmentDuration.getHighBitsUnsigned(),32),t.writer.writeUInt(n.segmentDuration.getLowBitsUnsigned(),32),t.writer.writeInt(n.mediaTime.getHighBits(),32),t.writer.writeInt(n.mediaTime.getLowBits(),32),t.writer.writeUInt(n.mediaRateInteger,16),t.writer.writeUInt(null!==(i=n.mediaRateFraction)&&void 0!==i?i:0,16)}},i}(kp);function Op(t){for(var i=t.data,e=tu(i.nextUint32()),s=e.version,n=e.flags,r=i.nextUint32(),h=[],o=0;o<r;o++){var a=void 0,u=void 0;0===s?(a=i.nextUint32(),u=i.nextInt32()):(a=i.nextUint64(),u=i.nextInt64());var c=i.nextInt16(),d=i.nextInt16();h.push({segmentDuration:a,mediaTime:u,mediaRateFraction:d,mediaRateInteger:c})}return 0===s?new Cp(h,n.raw):new xp(h,n.raw)}var jp=function(t){function i(){return t.call(this,"edts")||this}return Yt(i,t),i}(Qe);function zp(t){for(var i=new jp,e=0,s=Ro(t.data);e<s.length;e++){var n=s[e];ks(n,"elst")?i.boxes.push(Op(n)):i.boxes.push(Lh(n))}return i}var Pp=function(t){function i(i,e,s,n){var r=t.call(this,i)||this;return r.majorBrand=e,r.minorVersion=s,r.compatibleBrands=n,r}return Yt(i,t),w.defineProperty(i.prototype,"majorBrand",{get:function(){return this.OL},set:function(t){if(4!==t.length)throw new g("the provided major brand does not conform to the 4 character requirement");this.OL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"minorVersion",{get:function(){return this.jL},set:function(t){if(!$m(t,32))throw new g("the provided minor version does not fit in 32 bits.");this.jL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"compatibleBrands",{get:function(){return this.zL},set:function(t){if(t.some((function(t){return 4!==t.length})))throw new g("Some of the compatible brands do not conform to the 4 character requirement");this.zL=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return 4*(2+this.compatibleBrands.length)},i.prototype.serializeBoxContent=function(t){t.writer.writeString(this.majorBrand),t.writer.writeUInt(this.minorVersion,32);for(var i=0,e=this.compatibleBrands;i<e.length;i++){var s=e[i];t.writer.writeString(s)}},i}(Lr),Bp=function(t){function i(i,e,s){return t.call(this,"ftyp",i,e,s)||this}return Yt(i,t),i}(Pp);function Rp(t){for(var i=t.data,e=i.nextChars(4),s=i.nextUint32(),n=[];i.cursor.offset<i.data.byteLength;)n.push(i.nextChars(4));return new Bp(e,s,n)}var Up=function(t){function i(i,e){void 0===e&&(e="free");var s=t.call(this,e)||this;return s.data=i,s}return Yt(i,t),i.prototype.getBoxContentSize=function(){var t,i;return null!==(i=null===(t=this.data)||void 0===t?void 0:t.length)&&void 0!==i?i:0},i.prototype.serializeBoxContent=function(t){this.data&&t.concat(Ou.from(this.data))},i}(Lr),Qp=function(t){function i(i,e,s,n){void 0===n&&(n=0);var r=t.call(this,"mdhd",s,n)||this;return r.creationTime=i.creation,r.modificationTime=i.modification,r.timescale=i.scale,r.duration=i.duration,r.language=e,r}return Yt(i,t),w.defineProperty(i.prototype,"creationTime",{get:function(){return this.PL},set:function(t){if(!$m(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.PL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"modificationTime",{get:function(){return this.BL},set:function(t){if(!$m(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.BL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"timescale",{get:function(){return this.RL},set:function(t){if(!$m(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.RL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"duration",{get:function(){return this.UL},set:function(t){if(!$m(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.UL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"language",{get:function(){return this.QL},set:function(t){if(!Vp(t))throw new g("Expected an ISO-639-2/T language code");this.QL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8*3+4+2+2},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),this.serializeMdiaContent(i),i.writer.writeBit(0);for(var e=0,s=this.language;e<s.length;e++){var n=s[e];i.writer.writeUInt(n.charCodeAt(0)-96,5)}i.writer.writeUInt(0,16)},i}(At),Fp=function(t){function i(i,e,s){return void 0===s&&(s=0),t.call(this,i,e,0,s)||this}return Yt(i,t),i.prototype.serializeMdiaContent=function(t){t.writer.writeUInt(this.creationTime,32),t.writer.writeUInt(this.modificationTime,32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration,32)},i}(Qp),Yp=function(t){function i(i,e,s){return void 0===s&&(s=0),t.call(this,i,e,1,s)||this}return Yt(i,t),i.prototype.serializeMdiaContent=function(t){t.writer.writeUInt(this.creationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.creationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration.getHighBitsUnsigned(),32),t.writer.writeUInt(this.duration.getLowBitsUnsigned(),32)},i}(Qp);function Gp(t){var i=t.data,e=tu(i.nextUint32()),s=e.version,n=e.flags,r=Mp(i,s),h=new pc(Ou.from(i.nextUint8Array(2)));h.skipBits(1);for(var o=[],a=0;a<3;a++)o.push(h.readUInt(5));var u=o.map((function(t){return String.fromCharCode(t+96)})).join("");return Vp(u)||(u="und"),i.skip(2),0===s?new Fp(r,u,n.raw):new Yp(r,u,n.raw)}function Vp(t){return/^[a-z]{3}$/.test(t)}var un=function(t){function i(){return t.call(this,"mdia")||this}return Yt(i,t),i}(Qe);function Wp(t){for(var i=new un,e=0,s=Ro(t.data);e<s.length;e++){var n=s[e];ks(n,"mdhd")?i.boxes.push(Gp(n)):ks(n,"hdlr")?i.boxes.push(Dp(n)):i.boxes.push(Lh(n))}return i}var Hp=function(t){function i(){var i=t.call(this,"mdat")||this;return i.data=new Ou,i}return Yt(i,t),i.prototype.getBoxContentSize=function(){return this.data.length},i.prototype.serializeBoxContent=function(t){t.concat(this.data)},i}(Lr);function qp(t){var i=t.data,e=i.nextUint8Array(i.data.byteLength-i.cursor.offset),s=new Hp;return s.data.pushRange(e),s}var Xp;(function(t){function i(){return t.call(this,"minf")||this}Yt(i,t)})(Qe),function(t){function i(i){var e=t.call(this,"meta",0,0)||this;return e.handler=i,e}Yt(i,t),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.handler.getSize()},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.concat(this.handler.serialize())}}(Fu);!function(t){t.VIDEO="vide",t.AUXILIARY_VIDEO="auxv",t.AUDIO="soun",t.METADATA="meta",t.HINT="hint",t.TEXT="text",t.SUBTITLE="subt",t.FONT="fdsm"}(Xp||(Xp={}));var Zp,Kp,Jp={a:1,b:0,u:0,c:0,d:1,v:0,x:0,y:0,w:1};function $p(t,i){i.writer.writeUInt(rs(t.a,16),32),i.writer.writeUInt(rs(t.b,16),32),i.writer.writeUInt(rs(0,30),32),i.writer.writeUInt(rs(t.c,16),32),i.writer.writeUInt(rs(t.d,16),32),i.writer.writeUInt(rs(0,30),32),i.writer.writeUInt(rs(t.x,16),32),i.writer.writeUInt(rs(t.y,16),32),i.writer.writeUInt(rs(1,30),32)}function ty(t,i){var e,s,n,r;i.writer.writeUInt(null!==(e=t.isLeading)&&void 0!==e?e:Zp.UNKNOWN,2),i.writer.writeUInt(null!==(s=t.sampleDependsOn)&&void 0!==s?s:Kp.UNKNOWN,2),i.writer.writeUInt(null!==(n=t.sampleIsDependedOn)&&void 0!==n?n:Kp.UNKNOWN,2),i.writer.writeUInt(null!==(r=t.sampleHasRedundancy)&&void 0!==r?r:Kp.UNKNOWN,2)}function iy(t,i){var e,s,n;i.writer.writeUInt(0,4),ty(t,i),i.writer.writeUInt(null!==(e=t.samplePaddingValue)&&void 0!==e?e:0,3),i.writer.writeBool(null!==(s=t.sampleIsNonSyncSample)&&void 0!==s&&s),i.writer.writeUInt(null!==(n=t.sampleDegradationPriority)&&void 0!==n?n:0,16)}!function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WITH_DEPENDENCY=1]="WITH_DEPENDENCY",t[t.NO=2]="NO",t[t.WITHOUT_DEPENDENCY=3]="WITHOUT_DEPENDENCY"}(Zp||(Zp={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.YES=1]="YES",t[t.NO=2]="NO",t[t.RESERVED=3]="RESERVED"}(Kp||(Kp={}));var ey=function(){},sy=function(t){function i(i,e,s){var n=t.call(this,"pssh",i,0)||this;return n.systemId=e,n.data=s,n}return Yt(i,t),w.defineProperty(i.prototype,"systemId",{get:function(){return this.FL},set:function(t){if(16!==t.length)throw new g("Provided systemId length is not 16.");this.FL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"data",{get:function(){return this.YL},set:function(t){if(!$m(t.length,32))throw new g("Provided data length does not fit in 32 bits.");this.YL=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+16+4+this.data.length},i.prototype.serializeVersionBoxContent=function(t){},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.concat(Ou.from(this.systemId)),this.serializeVersionBoxContent(i),i.writer.writeUInt(this.data.length,32),i.concat(Ou.from(this.data))},i}(At),ny=function(t){function i(i,e){return t.call(this,0,i,e)||this}return Yt(i,t),i}(sy),ry=function(t){function i(i,e,s){var n=t.call(this,1,i,e)||this;return n.kIds=s,n}return Yt(i,t),w.defineProperty(i.prototype,"kIds",{get:function(){return this.GL},set:function(t){if(!$m(t.length,32))throw new g("Provided kIds length cannot fit in 32 bits.");if(t.some((function(t){return 16!==t.length})))throw new g("Not all provided key ids are 16 bytes long.");this.GL=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+16*this.kIds.length},i.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.kIds.length,32);for(var i=0,e=this.kIds;i<e.length;i++){var s=e[i];t.concat(Ou.from(s))}},i}(sy);function an(t){var i=t.data.nextUint8();t.data.skip(3);var e=t.data.nextUint8Array(16),s=[];if(1===i)for(var n=t.data.nextUint32(),r=0;r<n;r++)s.push(t.data.nextUint8Array(16));var h=t.data.nextUint32(),o=t.data.nextUint8Array(h);return 1===i?new ry(e,o,s):new ny(e,o)}var hy=function(t){function i(i,e,s){void 0===s&&(s=0);var n=t.call(this,"mehd",e,s)||this;return n.fragmentDuration=i,n}return Yt(i,t),w.defineProperty(i.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"fragmentDuration",{get:function(){return this.VL},set:function(t){if(!$m(t,this.bitSize))throw new g("The provided fragmentDuration does not fit in ".concat(this.bitSize," bits."));this.VL=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},i}(At),oy=function(t){function i(i,e){return void 0===e&&(e=0),t.call(this,i,0,e)||this}return Yt(i,t),i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(this.fragmentDuration,32)},i}(hy),ay=function(t){function i(i,e){return void 0===e&&(e=0),t.call(this,i,1,e)||this}return Yt(i,t),i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(this.fragmentDuration.getHighBitsUnsigned(),32),i.writer.writeUInt(this.fragmentDuration.getLowBitsUnsigned(),32)},i}(hy);function uy(t){var i=t.data,e=tu(i.nextUint32()),s=e.version,n=e.flags;return 0===s?new oy(i.nextUint32(),n.raw):new ay(i.nextUint64(),n.raw)}var Ru=function(t){function i(i,e,s,n){void 0===e&&(e={}),void 0===s&&(s=0),void 0===n&&(n=0);var r,h,o,a=this;return(a=t.call(this,"trex",s,n)||this).trackId=i,a.defaultSampleDescriptionIndex=null!==(r=null==e?void 0:e.sampleDescriptionIndex)&&void 0!==r?r:0,a.defaultSampleDuration=null!==(h=e.sampleDuration)&&void 0!==h?h:0,a.defaultSampleSize=null!==(o=e.sampleSize)&&void 0!==o?o:0,a.defaultSampleFlags=e.sampleFlags,a}return Yt(i,t),w.defineProperty(i.prototype,"trackId",{get:function(){return this.WL},set:function(t){if(!$m(t,32))throw new g("Provided track id does not fit in 32 bits.");this.WL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.HL},set:function(t){if(!$m(t,32))throw new g("Provided default sample description index does not fit in 32 bits.");this.HL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"defaultSampleDuration",{get:function(){return this.qL},set:function(t){if(!$m(t,32))throw new g("Provided default sample duration does not fit in 32 bits.");this.qL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"defaultSampleSize",{get:function(){return this.XL},set:function(t){if(!$m(t,32))throw new g("Provided default sample size does not fit in 32 bits.");this.XL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"defaultSampleFlags",{get:function(){return this.ZL},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!$m(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!$m(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.ZL=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+20},i.prototype.serializeBoxContent=function(i){var e;t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(this.trackId,32),i.writer.writeUInt(this.defaultSampleDescriptionIndex,32),i.writer.writeUInt(this.defaultSampleDuration,32),i.writer.writeUInt(this.defaultSampleSize,32),iy(null!==(e=this.defaultSampleFlags)&&void 0!==e?e:{},i)},i}(At);function cy(t){var i=t.data,e=tu(i.nextUint32()),s=e.version,n=e.flags,r=i.nextUint32(),h=i.nextUint32(),o=i.nextUint32(),a=i.nextUint32(),u=lr(new pc(Ou.from(i.nextUint8Array(4))));return new Ru(r,{sampleDescriptionIndex:h,sampleDuration:o,sampleSize:a,sampleFlags:u},s,n.raw)}var Ju=function(t){function i(){return t.call(this,"mvex")||this}return Yt(i,t),i}(Qe);function dy(t){for(var i=new Ju,e=0,s=Ro(t.data);e<s.length;e++){var n=s[e];ks(n,"mehd")?i.boxes.push(uy(n)):ks(n,"trex")?i.boxes.push(cy(n)):i.boxes.push(Lh(n))}return i}var ly=function(t){function i(e,s,n,r,h){void 0===h&&(h=0);var o,a,u,c=this;return(c=t.call(this,"mvhd",r,h)||this).creationTime=e.creation,c.modificationTime=e.modification,c.timescale=e.scale,c.duration=e.duration,c.rate=null!==(o=n.rate)&&void 0!==o?o:i.DEFAULT_RATE,c.volume=null!==(a=n.volume)&&void 0!==a?a:i.DEFAULT_VOLUME,c.matrix=null!==(u=n.matrix)&&void 0!==u?u:Jp,c.KL=s,c}return Yt(i,t),w.defineProperty(i.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"creationTime",{get:function(){return this.PL},set:function(t){if(!$m(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.PL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"modificationTime",{get:function(){return this.BL},set:function(t){if(!$m(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.BL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"timescale",{get:function(){return this.RL},set:function(t){if(!$m(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.RL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"duration",{get:function(){return this.UL},set:function(t){if(!$m(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.UL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"rate",{get:function(){return this.JL},set:function(t){if(!$m(rs(t,16),32))throw new g("Provided rate does not fit in 32 bits (fixed 16.16).");this.JL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"volume",{get:function(){return this.$L},set:function(t){if(!$m(rs(t,8),16))throw new g("Provided volume does not fit in 16 bits (fixed 8.8).");this.$L=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"matrix",{get:function(){return this.ek},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new g("(u, v, w) does not match the required (0, 0, 1)");this.ek=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"nextTrackId",{get:function(){return this.KL},set:function(t){if(0===t)throw new g("NextTrackId cannot be 0.");if(!$m(t,32))throw new g("NextTrackId cannot exceed 32 bits.");this.KL=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8*3+4+4+2+2+8+36+24+4},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),this.serializeMvhdContent(i),i.writer.writeUInt(rs(this.rate,16),32),i.writer.writeUInt(rs(this.volume,8),16),i.writer.writeUInt(0,16),i.writer.writeUInt(0,32),i.writer.writeUInt(0,32),$p(this.matrix,i);for(var e=0;e<6;e++)i.writer.writeUInt(0,32);i.writer.writeUInt(this.nextTrackId,32)},i.DEFAULT_RATE=1,i.DEFAULT_VOLUME=1,i}(At),fy=function(t){function i(i,e,s,n){return void 0===s&&(s={}),void 0===n&&(n=0),t.call(this,i,e,s,0,n)||this}return Yt(i,t),i.prototype.serializeMvhdContent=function(t){t.writer.writeUInt(this.creationTime,32),t.writer.writeUInt(this.modificationTime,32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration,32)},i}(ly),_y=function(t){function i(i,e,s,n){return void 0===s&&(s={}),void 0===n&&(n=0),t.call(this,i,e,s,1,n)||this}return Yt(i,t),i.prototype.serializeMvhdContent=function(t){t.writer.writeUInt(this.creationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.creationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.timescale,32),t.writer.writeUInt(this.duration.getHighBitsUnsigned(),32),t.writer.writeUInt(this.duration.getLowBitsUnsigned(),32)},i}(ly);function gy(t){var i=t.data,e=tu(i.nextUint32()),s=e.version,n=e.flags,r=Mp(i,s),h=Dc(i.nextUint32(),16),o=Dc(i.nextUint16(),8);i.skip(2),i.skip(8);var a=Tp(i);i.skip(24);var u=i.nextUint32();return 0===s?new fy(r,u,{rate:h,volume:o,matrix:a},n.raw):new _y(r,u,{rate:h,volume:o,matrix:a},n.raw)}var wy=function(t){function i(i,e,s,n,r,h,o){void 0===o&&(o={});var a,u,c,d=this;return d=t.call(this,"tkhd",i,function(t){var i,e,s,n;return{trackEnabled:null===(i=null==t?void 0:t.trackEnabled)||void 0===i||i,trackInMovie:null===(e=null==t?void 0:t.trackInMovie)||void 0===e||e,trackInPreview:null===(s=null==t?void 0:t.trackInPreview)||void 0===s||s,trackSizeIsAspectRatio:null!==(n=null==t?void 0:t.trackSizeIsAspectRatio)&&void 0!==n&&n}}(o))||this,d.creationTime=e.creation,d.modificationTime=e.modification,d.trackId=s,d.duration=e.duration,d.volume=n,d.width=r,d.height=h,d.layer=null!==(a=o.layer)&&void 0!==a?a:0,d.alternateGroup=null!==(u=o.alternateGroup)&&void 0!==u?u:0,d.matrix=null!==(c=o.matrix)&&void 0!==c?c:Jp,d}return Yt(i,t),w.defineProperty(i.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"creationTime",{get:function(){return this.PL},set:function(t){if(!$m(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.PL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"modificationTime",{get:function(){return this.BL},set:function(t){if(!$m(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.BL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"trackId",{get:function(){return this.WL},set:function(t){if(0===t)throw new g("trackId cannot be 0.");if(!$m(t,32))throw new g("trackId cannot exceed 32 bits.");this.WL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"duration",{get:function(){return this.UL},set:function(t){if(!$m(t,this.bitSize))throw new g("Provided sequence number does not fit in ".concat(this.bitSize," bits."));this.UL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"volume",{get:function(){return this.$L},set:function(t){if(!$m(rs(t,8),16))throw new g("Provided volume does not fit in 16 bits (fixed 8.8).");this.$L=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"width",{get:function(){return this.nk},set:function(t){if(!$m(rs(t,16),32))throw new g("Provided width does not fit in 32 bits (fixed 16.16).");this.nk=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"height",{get:function(){return this.rk},set:function(t){if(!$m(rs(t,16),32))throw new g("Provided height does not fit in 32 bits (fixed 16.16).");this.rk=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"layer",{get:function(){return this.hk},set:function(t){if(!$m(t,16))throw new g("Provided layer does not fit in 16 bits.");this.hk=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"alternateGroup",{get:function(){return this.ck},set:function(t){if(!$m(t,16))throw new g("Provided alternateGroup does not fit in 16 bits.");this.ck=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"matrix",{get:function(){return this.ek},set:function(t){if(0!==t.u||0!==t.v||1!==t.w)throw new g("(u, v, w) does not match the required (0, 0, 1)");this.ek=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8*3+4+4+8+2+2+2+2+36+4+4},i.prototype.serializeFlags=function(t){t.writer.writeUInt(0,20),t.writer.writeBool(this.flags.trackSizeIsAspectRatio),t.writer.writeBool(this.flags.trackInPreview),t.writer.writeBool(this.flags.trackInMovie),t.writer.writeBool(this.flags.trackEnabled)},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),this.serializeTkhdContent(i),i.writer.writeUInt(0,32),i.writer.writeUInt(0,32),i.writer.writeUInt(this.layer,16),i.writer.writeUInt(this.alternateGroup,16),i.writer.writeUInt(rs(this.volume,8),16),i.writer.writeUInt(0,16),$p(this.matrix,i),i.writer.writeUInt(rs(this.width,16),32),i.writer.writeUInt(rs(this.height,16),32)},i}(At),Ue=function(t){function i(i,e,s,n,r,h){return t.call(this,0,i,e,s,n,r,h)||this}return Yt(i,t),i.prototype.serializeTkhdContent=function(t){t.writer.writeUInt(this.creationTime,32),t.writer.writeUInt(this.modificationTime,32),t.writer.writeUInt(this.trackId,32),t.writer.writeUInt(0,32),t.writer.writeUInt(this.duration,32)},i}(wy),kr=function(t){function i(i,e,s,n,r,h){return t.call(this,1,i,e,s,n,r,h)||this}return Yt(i,t),i.prototype.serializeTkhdContent=function(t){t.writer.writeUInt(this.creationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.creationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.modificationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.trackId,32),t.writer.writeUInt(0,32),t.writer.writeUInt(this.duration.getHighBitsUnsigned(),32),t.writer.writeUInt(this.duration.getLowBitsUnsigned(),32)},i}(wy);function Ay(t){var i,e,s,n,r=t.data,h=tu(r.nextUint32()),o=h.version,a=h.flags,u=a.isSet(8),c=a.isSet(4),d=a.isSet(2),l=a.isSet(1);0===o?(i=r.nextUint32(),e=r.nextUint32(),s=r.nextUint32(),r.skip(4),n=r.nextUint32()):(i=r.nextUint64(),e=r.nextUint64(),s=r.nextUint32(),r.skip(4),n=r.nextUint64()),r.skip(8);var f=r.nextInt16(),_=r.nextInt16(),g=Dc(r.nextInt16(),8);r.skip(2);var w=Tp(r),A=Dc(r.nextUint32(),16),v=Dc(r.nextUint32(),16);return 0===o?new Ue({creation:i,modification:e,duration:n},s,g,A,v,{layer:f,matrix:w,alternateGroup:_,trackSizeIsAspectRatio:u,trackEnabled:l,trackInPreview:c,trackInMovie:d}):new kr({creation:i,modification:e,duration:n},s,g,A,v,{layer:f,matrix:w,alternateGroup:_,trackSizeIsAspectRatio:u,trackEnabled:l,trackInPreview:c,trackInMovie:d})}var vy=function(t){function i(){return t.call(this,"trak")||this}return Yt(i,t),i}(Qe);function my(t){for(var i=new vy,e=0,s=Ro(t.data);e<s.length;e++){var n=s[e];ks(n,"tkhd")?i.boxes.push(Ay(n)):ks(n,"mdia")?i.boxes.push(Wp(n)):ks(n,"edts")?i.boxes.push(zp(n)):i.boxes.push(Lh(n))}return i}var py=function(t){function i(){return t.call(this,"moov")||this}return Yt(i,t),i}(Qe);function yy(t){for(var i=new py,e=0,s=Ro(t.data);e<s.length;e++){var n=s[e];ks(n,"mvhd")?i.boxes.push(gy(n)):ks(n,"trak")?i.boxes.push(my(n)):ks(n,"mvex")?i.boxes.push(dy(n)):ks(n,"pssh")?i.boxes.push(an(n)):i.boxes.push(Lh(n))}return i}var My=function(t){function i(i,e,s){void 0===s&&(s=0);var n=t.call(this,"tfdt",e,s)||this;return n.baseMediaDecodeTime=i,n}return Yt(i,t),w.defineProperty(i.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"baseMediaDecodeTime",{get:function(){return this.dk},set:function(t){if(!$m(t,this.bitSize))throw new g("Provided baseMediaDecodeTime does not fit in ".concat(this.bitSize," bits."));this.dk=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.bitSize/8},i}(At),vr=function(t){function i(i,e){return void 0===e&&(e=0),t.call(this,i,0,e)||this}return Yt(i,t),i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(this.baseMediaDecodeTime,32)},i}(My),Lu=function(t){function i(i,e){return void 0===e&&(e=0),t.call(this,i,1,e)||this}return Yt(i,t),i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(this.baseMediaDecodeTime.getHighBitsUnsigned(),32),i.writer.writeUInt(this.baseMediaDecodeTime.getLowBitsUnsigned(),32)},i}(My);function Ty(t){var i=t.data,e=tu(i.nextUint32()),s=e.version,n=e.flags;return 0===s?new vr(i.nextUint32(),n.raw):new Lu(i.nextUint64(),n.raw)}var Ny=function(t){function i(i,e){void 0===e&&(e=0);var s=t.call(this,"tfhd",e,function(t){return{baseDataOffsetPresent:void 0!==t.baseDataOffset,sampleDescriptionIndexPresent:void 0!==t.sampleDescriptionIndex,defaultSampleDurationPresent:void 0!==t.defaultSampleDuration,defaultSampleSizePresent:void 0!==t.defaultSampleSize,defaultSampleFlagsPresent:void 0!==t.defaultSampleFlags,durationIsEmpty:t.durationIsEmpty,defaultBaseIsMoof:t.defaultBaseIsMoof}}(i))||this;return s.trackId=i.trackId,s.baseDataOffset=i.baseDataOffset,s.sampleDescriptionIndex=i.sampleDescriptionIndex,s.defaultSampleDuration=i.defaultSampleDuration,s.defaultSampleSize=i.defaultSampleSize,s.defaultSampleFlags=i.defaultSampleFlags,s}return Yt(i,t),w.defineProperty(i.prototype,"trackId",{get:function(){return this.WL},set:function(t){if(!$m(t,32))throw new g("Provided track id does not fit in 32 bits.");this.WL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"baseDataOffset",{get:function(){return this.lk},set:function(t){if(void 0===t&&this.flags.baseDataOffsetPresent)throw new g("The base data offset present flag is set.");if(void 0!==t&&!this.flags.baseDataOffsetPresent)throw new g("The base data offset present flag is not set.");if(t&&!$m(t,64))throw new g("Provided baseDataOffset does not fit in 32 bits.");this.lk=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"sampleDescriptionIndex",{get:function(){return this.fk},set:function(t){if(void 0===t&&this.flags.sampleDescriptionIndexPresent)throw new g("The sample description index flag is set.");if(void 0!==t&&!this.flags.sampleDescriptionIndexPresent)throw new g("The sample description index flag is not set.");if(t&&!$m(t,32))throw new g("Provided sampleDescriptionIndex does not fit in 32 bits.");this.fk=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"defaultSampleDuration",{get:function(){return this.qL},set:function(t){if(void 0===t&&this.flags.defaultSampleDurationPresent)throw new g("The default sample duration present flag is set.");if(void 0!==t&&!this.flags.defaultSampleDurationPresent)throw new g("The default sample duration present flag is not set.");if(t&&!$m(t,32))throw new g("Provided defaultSampleDuration does not fit in 32 bits.");this.qL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"defaultSampleSize",{get:function(){return this.XL},set:function(t){if(void 0===t&&this.flags.defaultSampleSizePresent)throw new g("The default sample size present flag is set.");if(void 0!==t&&!this.flags.defaultSampleSizePresent)throw new g("The default sample size present flag is not set.");if(t&&!$m(t,32))throw new g("Provided defaultSampleSize does not fit in 32 bits.");this.XL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"defaultSampleFlags",{get:function(){return this.ZL},set:function(t){if(void 0===t&&this.flags.defaultSampleFlagsPresent)throw new g("The default sample flags present flag is set.");if(void 0!==t&&!this.flags.defaultSampleFlagsPresent)throw new g("The default sample flags present flag is not set.");if((null==t?void 0:t.samplePaddingValue)&&!$m(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!$m(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.ZL=t},enumerable:!1,configurable:!0}),i.prototype.serializeFlags=function(t){t.writer.writeUInt(0,6),t.writer.writeBool(this.flags.defaultBaseIsMoof),t.writer.writeBool(this.flags.durationIsEmpty),t.writer.writeByte(0),t.writer.writeUInt(0,2),t.writer.writeBool(this.flags.defaultSampleFlagsPresent),t.writer.writeBool(this.flags.defaultSampleSizePresent),t.writer.writeBool(this.flags.defaultSampleDurationPresent),t.writer.writeBit(0),t.writer.writeBool(this.flags.sampleDescriptionIndexPresent),t.writer.writeBool(this.flags.baseDataOffsetPresent)},i.prototype.getBoxContentSize=function(){var i=t.prototype.getBoxContentSize.call(this)+4;return this.flags.baseDataOffsetPresent&&(i+=8),this.flags.sampleDescriptionIndexPresent&&(i+=4),this.flags.defaultSampleDurationPresent&&(i+=4),this.flags.defaultSampleSizePresent&&(i+=4),this.flags.defaultSampleFlagsPresent&&(i+=4),i},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(this.trackId,32),this.flags.baseDataOffsetPresent&&(i.writer.writeUInt(this.baseDataOffset.getHighBitsUnsigned(),32),i.writer.writeUInt(this.baseDataOffset.getLowBitsUnsigned(),32)),this.flags.sampleDescriptionIndexPresent&&i.writer.writeUInt(this.sampleDescriptionIndex,32),this.flags.defaultSampleDurationPresent&&i.writer.writeUInt(this.defaultSampleDuration,32),this.flags.defaultSampleSizePresent&&i.writer.writeUInt(this.defaultSampleSize,32),this.flags.defaultSampleFlagsPresent&&iy(this.defaultSampleFlags,i)},i}(At);function Dy(t){var i=t.data,e=i.nextUint8(),s=new pc(Ou.from(i.nextUint8Array(3)));s.skipBits(6);var n=Boolean(s.readBit()),r=Boolean(s.readBit());s.skipBits(10);var h=Boolean(s.readBit()),o=Boolean(s.readBit()),a=Boolean(s.readBit());s.skipBits(1);var u=Boolean(s.readBit()),c=Boolean(s.readBit()),d=i.nextUint32(),l=c?i.nextUint64():void 0,f=u?i.nextUint32():void 0,_=a?i.nextUint32():void 0,g=o?i.nextUint32():void 0,w=h?lr(new pc(Ou.from(i.nextUint8Array(4)))):void 0;return new Ny({trackId:d,defaultBaseIsMoof:n,durationIsEmpty:r,baseDataOffset:l,sampleDescriptionIndex:f,defaultSampleDuration:_,defaultSampleSize:g,defaultSampleFlags:w},e)}var br=function(t){function i(i,e,s){var n=t.call(this,"trun",i,function(t){var i,e,s,n;return{dataOffsetPresent:void 0!==t.dataOffset,firstSampleFlagsPresent:void 0!==t.firstSampleFlags,sampleDurationPresent:null!==(i=t.sampleDurationPresent)&&void 0!==i&&i,sampleSizePresent:null!==(e=t.sampleSizePresent)&&void 0!==e&&e,sampleFlagsPresent:null!==(s=t.sampleFlagsPresent)&&void 0!==s&&s,sampleCompositionTimeOffsetsPresent:null!==(n=t.sampleCompositionTimeOffsetsPresent)&&void 0!==n&&n}}(e))||this;return n.dataOffset=e.dataOffset,n.samples=s,n.firstSampleFlags=e.firstSampleFlags,n}return Yt(i,t),w.defineProperty(i.prototype,"dataOffset",{get:function(){return this._k},set:function(t){if(t&&!$m(t,32))throw new g("Provided data offset does not fit in 32 bits.");this._k=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"firstSampleFlags",{get:function(){return this.gk},set:function(t){if((null==t?void 0:t.samplePaddingValue)&&!$m(t.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null==t?void 0:t.sampleDegradationPriority)&&!$m(t.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");this.gk=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"samples",{get:function(){return this.wk},set:function(t){var i,e;if(!$m(t.length,32))throw new g("The sample count cannot be represented in 32 bits.");for(var s=0,n=t;s<n.length;s++){var r=n[s];if(void 0===r.duration&&this.flags.sampleDurationPresent)throw new g("The sample duration present flag is set.");if(void 0!==r.duration&&!this.flags.sampleDurationPresent)throw new g("The sample duration present flag is not set.");if(r.duration&&!$m(r.duration,32))throw new g("Provided sample duration does not fit in 32 bits.");if(void 0===r.size&&this.flags.sampleSizePresent)throw new g("The sample size present flag is set.");if(void 0!==r.size&&!this.flags.sampleSizePresent)throw new g("The sample size present flag is not set.");if(r.size&&!$m(r.size,32))throw new g("Provided sample size does not fit in 32 bits.");if(void 0===r.flags&&this.flags.sampleFlagsPresent)throw new g("The sample flags present flag is set.");if(void 0!==r.flags&&!this.flags.sampleFlagsPresent)throw new g("The sample flags present flag is not set.");if((null===(i=r.flags)||void 0===i?void 0:i.samplePaddingValue)&&!$m(r.flags.samplePaddingValue,3))throw new g("Provided sample padding value does not fit in 3 bits.");if((null===(e=r.flags)||void 0===e?void 0:e.sampleDegradationPriority)&&!$m(r.flags.sampleDegradationPriority,16))throw new g("Provided sample degradation priority does not fit in 16 bits.");if(void 0===r.compositionTimeOffset&&this.flags.sampleCompositionTimeOffsetsPresent)throw new g("The sample compositionTimeOffset present flag is set.");if(void 0!==r.compositionTimeOffset&&!this.flags.sampleCompositionTimeOffsetsPresent)throw new g("The sample compositionTimeOffset present flag is not set.");if(r.compositionTimeOffset&&!$m(r.compositionTimeOffset,32))throw new g("Provided sample compositionTimeOffset does not fit in 32 bits.")}this.wk=t},enumerable:!1,configurable:!0}),i.prototype.serializeFlags=function(t){t.writer.writeByte(0),t.writer.writeUInt(0,4),t.writer.writeBool(this.flags.sampleCompositionTimeOffsetsPresent),t.writer.writeBool(this.flags.sampleFlagsPresent),t.writer.writeBool(this.flags.sampleSizePresent),t.writer.writeBool(this.flags.sampleDurationPresent),t.writer.writeUInt(0,5),t.writer.writeBool(this.flags.firstSampleFlagsPresent),t.writer.writeBit(0),t.writer.writeBool(this.flags.dataOffsetPresent)},i.prototype.getBoxContentSize=function(){var i=t.prototype.getBoxContentSize.call(this)+4;return this.flags.dataOffsetPresent&&(i+=4),this.flags.firstSampleFlagsPresent&&(i+=4),this.flags.sampleDurationPresent&&(i+=4*this.samples.length),this.flags.sampleSizePresent&&(i+=4*this.samples.length),this.flags.sampleFlagsPresent&&(i+=4*this.samples.length),this.flags.sampleCompositionTimeOffsetsPresent&&(i+=4*this.samples.length),i},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(this.samples.length,32),this.flags.dataOffsetPresent&&i.writer.writeUInt(this.dataOffset,32),this.flags.firstSampleFlagsPresent&&iy(this.firstSampleFlags,i);for(var e=0,s=this.samples;e<s.length;e++){var n=s[e];this.flags.sampleDurationPresent&&i.writer.writeUInt(n.duration,32),this.flags.sampleSizePresent&&i.writer.writeUInt(n.size,32),this.flags.sampleFlagsPresent&&iy(n.flags,i),this.flags.sampleCompositionTimeOffsetsPresent&&(0===this.version?i.writer.writeUInt(n.compositionTimeOffset,32):i.writer.writeInt(n.compositionTimeOffset,32))}},i}(At);function Sy(t){var i=t.data,e=i.nextUint8(),s=new pc(Ou.from(i.nextUint8Array(3)));s.skipBits(12);var n=Boolean(s.readBit()),r=Boolean(s.readBit()),h=Boolean(s.readBit()),o=Boolean(s.readBit());s.skipBits(5);var a=Boolean(s.readBit());s.skipBits(1);var u=Boolean(s.readBit()),c=i.nextUint32(),d={sampleDurationPresent:o,sampleSizePresent:h,sampleFlagsPresent:r,sampleCompositionTimeOffsetsPresent:n};u&&(d.dataOffset=i.nextInt32()),a&&(d.firstSampleFlags=lr(new pc(Ou.from(i.nextUint8Array(4)))));for(var l=[],f=0;f<c;f++){var _={};o&&(_.duration=i.nextUint32()),h&&(_.size=i.nextUint32()),r&&(_.flags=lr(new pc(Ou.from(i.nextUint8Array(4))))),n&&(_.compositionTimeOffset=0===e?i.nextUint32():i.nextInt32()),l.push(_)}return new br(e,d,l)}var Ls=function(t){function i(){return t.call(this,"traf")||this}return Yt(i,t),i}(Qe);function Iy(t){for(var i=new Ls,e=0,s=Ro(t.data);e<s.length;e++){var n=s[e];ks(n,"tfhd")?i.boxes.push(Dy(n)):ks(n,"tfdt")?i.boxes.push(Ty(n)):ks(n,"trun")?i.boxes.push(Sy(n)):i.boxes.push(Lh(n))}return i}var Ey=function(t){function i(){return t.call(this,"moof")||this}return Yt(i,t),i}(Qe);function by(t){for(var i=new Ey,e=0,s=Ro(t.data);e<s.length;e++){var n=s[e];ks(n,"traf")?i.boxes.push(Iy(n)):ks(n,"pssh")?i.boxes.push(an(n)):i.boxes.push(Lh(n))}return i}!function(t){function i(i){var e=t.call(this,"mfhd",0,0)||this;return e.sequenceNumber=i,e}Yt(i,t),w.defineProperty(i.prototype,"sequenceNumber",{get:function(){return this.Ak},set:function(t){if(!$m(t,32))throw new g("Provided sequence number does not fit in 32 bits.");this.Ak=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(this.sequenceNumber,32)}}(At);var Ly=function(t){function i(i){var e=t.call(this,"frma")||this;return e.codingName=i,e}return Yt(i,t),w.defineProperty(i.prototype,"codingName",{get:function(){return this.vk},set:function(t){if(4!==t.length)throw new g("Provided coding name was not 4 characters long.");this.vk=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return 4},i.prototype.serializeBoxContent=function(t){t.writer.writeString(this.codingName)},i}(Lr),ky=(function(t){function i(i,e){var s=t.call(this,"pasp")||this;return s.hSpacing=i,s.vSpacing=e,s}Yt(i,t),w.defineProperty(i.prototype,"hSpacing",{get:function(){return this.pk},set:function(t){if(!$m(t,32))throw new g("Provided hSpacing does not fit in 32 bits.");this.pk=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"vSpacing",{get:function(){return this.yk},set:function(t){if(!$m(t,32))throw new g("Provided vSpacing does not fit in 32 bits.");this.yk=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return 8},i.prototype.serializeBoxContent=function(t){t.writer.writeUInt(this.hSpacing,32),t.writer.writeUInt(this.vSpacing,32)}}(Lr),function(t){function i(i,e,s){var n=t.call(this,i)||this;return n.sample=e,n.sinf=s,n}Yt(i,t),i.prototype.getBoxContentSize=function(){return this.sample.getBoxContentSize()+this.sinf.getSize()},i.prototype.serializeBoxContent=function(t){this.sample.serializeBoxContent(t),t.concat(this.sinf.serialize())}}(Qe),function(t){function i(i,e,s){var n=t.call(this,"sinf")||this;return n.schm=e,n.schi=s,n.frma=new Ly(i),n}Yt(i,t),i.prototype.getBoxContentSize=function(){var t,i,e,s;return this.frma.getSize()+(null!==(i=null===(t=this.schm)||void 0===t?void 0:t.getSize())&&void 0!==i?i:0)+(null!==(s=null===(e=this.schi)||void 0===e?void 0:e.getSize())&&void 0!==s?s:0)},i.prototype.serializeBoxContent=function(t){t.concat(this.frma.serialize()),this.schm&&t.concat(this.schm.serialize()),this.schi&&t.concat(this.schi.serialize())}}(Lr),function(t){function i(i,e,s){var n=t.call(this,"saio",i,void 0===s?0:1)||this;return n.entries=e,n.explicitAuxInfoType=s,n}return Yt(i,t),w.defineProperty(i.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"entries",{get:function(){return this.NL},set:function(t){var i=this;if(!$m(t.length,32))throw new g("Number of entries provided does not fit in 32 bits.");if(t.some((function(t){return!$m(t,i.bitSize)})))throw new g("Not all provided entries fit in ".concat(this.bitSize," bits."));this.NL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"explicitAuxInfoType",{get:function(){return this.Mk},set:function(t){if(void 0===t)this.flags=0;else{if(!$m(t.auxInfoType,32))throw new g("Provided auxInfoType does not fit in 32 bits.");if(!$m(t.auxInfoTypeParameter,32))throw new g("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.Mk=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(void 0===this.explicitAuxInfoType?0:8)+4+this.entries.length*this.bitSize/8},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),void 0!==this.explicitAuxInfoType&&(i.writer.writeUInt(this.explicitAuxInfoType.auxInfoType,32),i.writer.writeUInt(this.explicitAuxInfoType.auxInfoTypeParameter,32)),i.writer.writeUInt(this.entries.length,32),this.serializeSaioContent(i)},i}(At)),Cy=(function(t){function i(){return null!==t&&t.apply(this,arguments)||this}Yt(i,t),i.prototype.serializeSaioContent=function(t){for(var i=0,e=this.entries;i<e.length;i++){var s=e[i];t.writer.writeUInt(s,32)}}}(ky),function(t){function i(){return null!==t&&t.apply(this,arguments)||this}Yt(i,t),i.prototype.serializeSaioContent=function(t){for(var i=0,e=this.entries;i<e.length;i++){var s=e[i];t.writer.writeUInt(s.getHighBitsUnsigned(),32),t.writer.writeUInt(s.getLowBitsUnsigned(),32)}}}(ky),function(t){function i(i,e,s){var n=t.call(this,"saiz",0,void 0===s?0:1)||this;return n.defaultSampleInfoSize=i,n.sampleInfoSizes=e,n.explicitAuxInfoType=s,n}Yt(i,t),w.defineProperty(i.prototype,"defaultSampleInfoSize",{get:function(){return this.Tk},set:function(t){if(!$m(t,8))throw new g("Provided defaultSampleInfoSize does not fit in a single byte.");this.Tk=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"sampleInfoSizes",{get:function(){return this.Nk},set:function(t){if(!$m(t.length,32))throw new g("Number of sampleInfoSizes provided does not fit in 32 bits.");if(t.some((function(t){return!$m(t,8)})))throw new g("Not all provided sampleInfoSizes fit in a byte.");this.Nk=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"explicitAuxInfoType",{get:function(){return this.Mk},set:function(t){if(void 0===t)this.flags=0;else{if(!$m(t.auxInfoType,32))throw new g("Provided auxInfoType does not fit in 32 bits.");if(!$m(t.auxInfoTypeParameter,32))throw new g("Provided auxInfoTypeParameter does not fit in 32 bits.");this.flags=1}this.Mk=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(void 0===this.explicitAuxInfoType?0:8)+1+4+(0!==this.defaultSampleInfoSize?0:this.sampleInfoSizes.length)},i.prototype.serializeBoxContent=function(i){if(0!==this.defaultSampleInfoSize&&this.sampleInfoSizes.length>0)throw new g("Both a default size and specific sizes are provided. This is prohibited.");t.prototype.serializeBoxContent.call(this,i),void 0!==this.explicitAuxInfoType&&(i.writer.writeUInt(this.explicitAuxInfoType.auxInfoType,32),i.writer.writeUInt(this.explicitAuxInfoType.auxInfoTypeParameter,32)),i.writer.writeByte(this.defaultSampleInfoSize),i.writer.writeUInt(this.sampleInfoSizes.length,32);for(var e=0,s=this.sampleInfoSizes;e<s.length;e++){var n=s[e];i.writer.writeByte(n)}}}(At),function(t){function i(i){var e=t.call(this,"sdtp",0,0)||this;return e.samples=i,e}Yt(i,t),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.samples.length},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i);for(var e=0,s=this.samples;e<s.length;e++){ty(s[e],i)}}}(At),function(t){function i(i){return t.call(this,"stsd",i,0)||this}Yt(i,t),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(this.boxes.length,32)}}(Fu),function(t){function i(i,e,s){var n=t.call(this,"sgpd",i,0)||this;return n.entries=s,n.groupingType=e,n}return Yt(i,t),w.defineProperty(i.prototype,"groupingType",{get:function(){return this.Dk},set:function(t){if(4!==t.length)throw new g("The provided groupingType does not equal 4 characters.");this.Dk=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeString(this.groupingType),this.serializeVersionBoxContent(i),i.writer.writeUInt(this.entries.length,32);for(var e=0,s=this.entries;e<s.length;e++){var n=s[e];this.serializeEntryBoxContent(i,n)}},i.prototype.serializeEntryBoxContent=function(t,i){i.serializeBoxContent(t)},i}(At)),xy=(function(t){function i(i,e){return t.call(this,0,i,e)||this}Yt(i,t),i.prototype.serializeVersionBoxContent=function(t){}}(Cy),function(t){function i(i,e,s){var n=t.call(this,1,i,s)||this;return n.defaultLength=e,n}Yt(i,t),w.defineProperty(i.prototype,"defaultLength",{get:function(){return this.Sk},set:function(t){if(!$m(t,32))throw new g("The provided defaultLength does not fit in 32 bits.");this.Sk=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+this.entries.length*(this.defaultLength||4)},i.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.defaultLength,32)},i.prototype.serializeEntryBoxContent=function(t,i){0===this.defaultLength&&t.writer.writeUInt(i.getBoxContentSize(),32),i.serializeBoxContent(t)}}(Cy),function(t){function i(i,e,s,n){void 0===n&&(n=0);var r=this;if(i<2)throw new g("This constructor is only meant for versions 2 and up.");return(r=t.call(this,i,e,s)||this).defaultSampleDescriptionIndex=n,r}Yt(i,t),w.defineProperty(i.prototype,"defaultSampleDescriptionIndex",{get:function(){return this.HL},set:function(t){if(!$m(t,32))throw new g("The provided defaultSampleDescriptionIndex does not fit in 32 bits.");this.HL=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},i.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.defaultSampleDescriptionIndex,32)}}(Cy),function(t){function i(i){void 0===i&&(i=[]);var e=t.call(this,"stsz",0,0)||this;return e.sampleSizes=i,e}Yt(i,t),w.defineProperty(i.prototype,"sampleSizes",{get:function(){return this.Ik},set:function(t){if(!$m(t.length,32))throw new g("Number of allowed samples cannot fit in 32 bits.");if(t.some((function(t){return!$m(t,32)})))throw new g("Not all sampleSizes can be represented in 32 bits.");this.Ik=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4+4*this.sampleSizes.length},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(0,32),i.writer.writeUInt(this.sampleSizes.length,32);for(var e=0,s=this.sampleSizes;e<s.length;e++){var n=s[e];i.writer.writeUInt(n,32)}}}(At),function(t){function i(i,e){void 0===i&&(i=0),void 0===e&&(e=0);var s=t.call(this,"stsz",0,0)||this;return s.defaultSampleSize=i,s.samples=e,s}Yt(i,t),w.defineProperty(i.prototype,"defaultSampleSize",{get:function(){return this.XL},set:function(t){if(!$m(t,32))throw new g("Provided defaultSampleSize does not fit in 32 bits.");this.XL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"samples",{get:function(){return this.wk},set:function(t){if(!$m(t,32))throw new g("Number of allowed samples cannot fit in 32 bits.");this.wk=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(this.defaultSampleSize,32),i.writer.writeUInt(this.samples,32)}}(At),function(t){function i(){return t.call(this,"stbl")||this}Yt(i,t)}(Qe),function(t){function i(i){var e=t.call(this,"stsc",0,0)||this;return e.entries=i,e}Yt(i,t),w.defineProperty(i.prototype,"entries",{get:function(){return this.NL},set:function(t){if(!$m(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!$m(t.firstChunk,32)||!$m(t.sampleDescriptionIndex,32)||!$m(t.samplesPerChunk,32)})))throw new g("Not all entries can be represented in 96 bits.");this.NL=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+12*this.entries.length},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(this.entries.length,32);for(var e=0,s=this.entries;e<s.length;e++){var n=s[e];i.writer.writeUInt(n.firstChunk,32),i.writer.writeUInt(n.samplesPerChunk,32),i.writer.writeUInt(n.sampleDescriptionIndex,32)}}}(At),function(t){function i(){return t.call(this,"schi")||this}Yt(i,t)}(Qe),function(t){function i(i,e,s){var n=t.call(this,"schm",0,void 0===s?0:1)||this;return n.schemeType=i,n.schemeVersion=e,n.schemeUri=s,n}Yt(i,t),w.defineProperty(i.prototype,"schemeType",{get:function(){return this.Ek},set:function(t){if(4!==t.length)throw new g("The provided schemeType does not have a length of 4.");this.Ek=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"schemeVersion",{get:function(){return this.bk},set:function(t){if(!$m(t,32))throw new g("The provided schemeVersion does not fit in 23 bits.");this.bk=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"schemeUri",{get:function(){return this.Lk},set:function(t){if(t&&4!==t.length)throw new g("The provided schemeUri does not have a length of 4.");this.flags=void 0===t?0:1,this.Lk=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4+(void 0===this.schemeUri?0:this.schemeUri.length+1)},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeString(this.schemeType),i.writer.writeUInt(this.schemeVersion,32),this.schemeUri&&(i.writer.writeString(this.schemeUri),i.writer.writeByte(0))}}(At),function(t){function i(i,e,s,n,r,h,o){void 0===o&&(o=0);var a=t.call(this,"sidx",i,o)||this;return a.referenceId=e,a.timescale=s,a.earliestPresentationTime=n,a.firstOffset=r,a.references=h,a}return Yt(i,t),w.defineProperty(i.prototype,"bitSize",{get:function(){return 0===this.version?32:64},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"referenceId",{get:function(){return this.Ck},set:function(t){if(!$m(t,32))throw new g("Provided referenceId does not fit in 32 bits.");this.Ck=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"timescale",{get:function(){return this.RL},set:function(t){if(!$m(t,32))throw new g("Provided timescale does not fit in 32 bits.");this.RL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"earliestPresentationTime",{get:function(){return this.xk},set:function(t){if(!$m(t,this.bitSize))throw new g("Provided earliestPresentationTime does not fit in ".concat(this.bitSize," bits."));this.xk=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"firstOffset",{get:function(){return this.Ok},set:function(t){if(!$m(t,this.bitSize))throw new g("Provided timescale does not fit in ".concat(this.bitSize," bits."));this.Ok=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"references",{get:function(){return this.jk},set:function(t){if(!$m(t.length,16))throw new g("The number of provided reference items does not fit in 16 bits.");for(var i=0,e=t;i<e.length;i++){var s=e[i];if(!$m(s.referencedSize,31))throw new g("Provided referenced size does not fit in 31 bits.");if(!$m(s.subsegmentDuration,32))throw new g("Provided subsegment duration does not fit in 31 bits.");if(!$m(s.sapType,3))throw new g("Provided SAP type does not fit in 3 bits.");if(!$m(s.sapDeltaTime,28))throw new g("Provided SAP delta time does not fit in 28 bits.")}this.jk=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4+this.bitSize/8*2+2+2+12*this.references.length},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(this.referenceId,32),i.writer.writeUInt(this.timescale,32),this.serializeSidxBoxContent(i),i.writer.writeUInt(0,16),i.writer.writeUInt(this.references.length,16);for(var e=0,s=this.references;e<s.length;e++){var n=s[e];i.writer.writeBit(n.referenceType),i.writer.writeUInt(n.referencedSize,31),i.writer.writeUInt(n.subsegmentDuration,32),i.writer.writeBool(n.startsWithSap),i.writer.writeUInt(n.sapType,3),i.writer.writeUInt(n.sapDeltaTime,28)}},i}(At)),Oy=function(t){function i(i,e,s,n,r,h){return void 0===h&&(h=0),t.call(this,0,i,e,s,n,r,h)||this}return Yt(i,t),i.prototype.serializeSidxBoxContent=function(t){t.writer.writeUInt(this.earliestPresentationTime,32),t.writer.writeUInt(this.firstOffset,32)},i}(xy),jy=function(t){function i(i,e,s,n,r,h){return void 0===h&&(h=0),t.call(this,1,i,e,s,n,r,h)||this}return Yt(i,t),i.prototype.serializeSidxBoxContent=function(t){t.writer.writeUInt(this.earliestPresentationTime.getHighBitsUnsigned(),32),t.writer.writeUInt(this.earliestPresentationTime.getLowBitsUnsigned(),32),t.writer.writeUInt(this.firstOffset.getHighBitsUnsigned(),32),t.writer.writeUInt(this.firstOffset.getLowBitsUnsigned(),32)},i}(xy);var zy=function(t){function i(i,e,s){return t.call(this,"styp",i,e,s)||this}return Yt(i,t),i}(Pp);function Py(t){for(var i=t.data,e=i.nextChars(4),s=i.nextUint32(),n=[];i.cursor.offset<i.data.byteLength;)n.push(i.nextChars(4));return new zy(e,s,n)}(function(t){function i(i){void 0===i&&(i=0);var e=t.call(this,"smhd",0,0)||this;return e.balance=i,e}Yt(i,t),w.defineProperty(i.prototype,"balance",{get:function(){return this.zk},set:function(t){if(t<-1||t>1)throw new g("Provided balance does not fit in the allowed range [-1, 1].");if(!$m(rs(t,8),16))throw new g("Provided balance does not fit in 16 bits (fixed 8.8).");this.zk=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+2+2},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(rs(this.balance,8),16),i.writer.writeUInt(0,16)}})(At),function(t){function i(i){var e=t.call(this,"stss",0,0)||this;return e.entries=i,e}Yt(i,t),w.defineProperty(i.prototype,"entries",{get:function(){return this.NL},set:function(t){if(!$m(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!$m(t,32)})))throw new g("Not all entries can be represented in 32 bits.");this.NL=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+4*this.entries.length},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(this.entries.length,32);for(var e=0,s=this.entries;e<s.length;e++){var n=s[e];i.writer.writeUInt(n,32)}}}(At),function(t){function i(i){var e=t.call(this,"stts",0,0)||this;return e.entries=i,e}Yt(i,t),w.defineProperty(i.prototype,"entries",{get:function(){return this.NL},set:function(t){if(!$m(t.length,32))throw new g("Number of allowed entries cannot fit in 32 bits.");if(t.some((function(t){return!$m(t.sampleCount,32)||!$m(t.sampleDelta,32)})))throw new g("Not all entries can be represented in 64 bits.");this.NL=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4+8*this.entries.length},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(this.entries.length,32);for(var e=0,s=this.entries;e<s.length;e++){var n=s[e];i.writer.writeUInt(n.sampleCount,32),i.writer.writeUInt(n.sampleDelta,32)}}}(At),function(t){function i(i){var e=t.call(this,"trep",0,0)||this;return e.trackId=i,e}Yt(i,t),w.defineProperty(i.prototype,"trackId",{get:function(){return this.WL},set:function(t){if(!$m(t,32))throw new g("The provided trackId does not fit in 32 bits.");this.WL=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+4},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(this.trackId,32)}}(Fu),function(t){function i(){return t.call(this,"udta")||this}Yt(i,t)}(Qe);var By={red:0,green:0,blue:0},Ry=(function(t){function i(i,e){void 0===i&&(i=0),void 0===e&&(e=By);var s=t.call(this,"vmhd",0,1)||this;return s.graphicsMode=i,s.opColor=e,s}Yt(i,t),w.defineProperty(i.prototype,"opColor",{get:function(){return this.Pk},set:function(t){if(!$m(t.red,16)||!$m(t.green,16)||!$m(t.blue,16))throw new g("Not all colors could be represented in 16 bits.");this.Pk=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+2+6},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(this.graphicsMode,16),i.writer.writeUInt(this.opColor.red,16),i.writer.writeUInt(this.opColor.green,16),i.writer.writeUInt(this.opColor.blue,16)}}(At),function(t){function i(i,e,s,n,r){void 0===n&&(n={}),void 0===r&&(r=void 0);var h,o,a,u,c,d=this;return(d=t.call(this,i,e)||this).width=s.width,d.height=s.height,d.horizontalResolution=null!==(h=s.horizontal)&&void 0!==h?h:72,d.verticalResolution=null!==(o=s.vertical)&&void 0!==o?o:72,d.compressorName=null!==(a=n.compressorName)&&void 0!==a?a:"",d.frameCount=null!==(u=n.frameCount)&&void 0!==u?u:1,d.depth=null!==(c=n.depth)&&void 0!==c?c:24,d.clap=n.clap,d.pasp=n.pasp,d.extra=r,d}return Yt(i,t),w.defineProperty(i.prototype,"width",{get:function(){return this.nk},set:function(t){if(!$m(t,16))throw new g("Provided width does not fit in 16 bits.");this.nk=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"height",{get:function(){return this.rk},set:function(t){if(!$m(t,16))throw new g("Provided height does not fit in 16 bits.");this.rk=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"horizontalResolution",{get:function(){return this.Bk},set:function(t){if(!$m(rs(t,16),32))throw new g("Provided horizontalResolution does not fit in 32 bits (fixed 16.16).");this.Bk=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"verticalResolution",{get:function(){return this.Rk},set:function(t){if(!$m(rs(t,16),32))throw new g("Provided verticalResolution does not fit in 32 bits (fixed 16.16).");this.Rk=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"compressorName",{get:function(){return this.Uk},set:function(t){if(t.length>31)throw new g("The provided compressorName should at most be 31 characters long.");this.Uk=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"frameCount",{get:function(){return this.Qk},set:function(t){if(!$m(t,16))throw new g("Provided frameCount does not fit in 16 bits.");this.Qk=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"depth",{get:function(){return this.Fk},set:function(t){if(!$m(t,16))throw new g("Provided depth does not fit in 16 bits.");this.Fk=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){var i,e,s,n,r,h;return t.prototype.getBoxContentSize.call(this)+2+2+12+2+2+4+4+4+2+32+2+2+(null!==(e=null===(i=this.clap)||void 0===i?void 0:i.getSize())&&void 0!==e?e:0)+(null!==(n=null===(s=this.pasp)||void 0===s?void 0:s.getSize())&&void 0!==n?n:0)+(null!==(h=null===(r=this.extra)||void 0===r?void 0:r.length)&&void 0!==h?h:0)},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(0,16),i.writer.writeUInt(0,16),i.writer.writeUInt(0,32),i.writer.writeUInt(0,32),i.writer.writeUInt(0,32),i.writer.writeUInt(this.width,16),i.writer.writeUInt(this.height,16),i.writer.writeUInt(rs(this.horizontalResolution,16),32),i.writer.writeUInt(rs(this.verticalResolution,16),32),i.writer.writeUInt(0,32),i.writer.writeUInt(this.frameCount,16),i.writer.writeByte(this.compressorName.length),i.writer.writeString(this.compressorName);for(var e=0;e<31-this.compressorName.length;e++)i.writer.writeByte(0);i.writer.writeUInt(this.depth,16),i.writer.writeInt(-1,16),this.clap&&i.concat(this.clap.serialize()),this.pasp&&i.concat(this.pasp.serialize()),this.extra&&tp(i.writer,this.extra)},i}(bp)),Uy=(function(t){function i(i){var e=t.call(this,"esds",0,0)||this;return e.esDescriptor=i,e}Yt(i,t),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+(this.esDescriptor instanceof j?this.esDescriptor.length:this.esDescriptor.getSize())},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),this.esDescriptor instanceof j?i.concat(Ou.from(this.esDescriptor)):this.esDescriptor.serialize(i)}}(At),function(t){function i(i,e,s){var n=t.call(this,"mp4a",i,s)||this;return n.esd=e,n}Yt(i,t),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esd.getSize()},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.concat(this.esd.serialize())}}(Lp),function(t){function i(i,e,s,n){void 0===n&&(n={});var r=t.call(this,"mp4v",i,e,n)||this;return r.esDescriptor=s,r}Yt(i,t),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),this.esDescriptor.serialize(i)}}(Ry),function(t){function i(i,e){var s=t.call(this,"mp4s",i)||this;return s.esDescriptor=e,s}Yt(i,t),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.esDescriptor.getSize()},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),this.esDescriptor.serialize(i)}}(bp),function(t){function i(i){var e=t.call(this,"avcC")||this;return e.decoderConfig=i,e}Yt(i,t),i.prototype.getBoxContentSize=function(){return this.decoderConfig.getSize()},i.prototype.serializeBoxContent=function(t){this.decoderConfig.serialize(t)}}(Lr),function(){function t(t,i,e,s,n,r){void 0===r&&(r=1),this.lengthSizeMinusOne=e,this.version=r,this.profileIndication=t.indication,this.profileCompatibility=t.compatibility,this.levelIndication=i,this.spsSets=s,this.ppsSets=n}w.defineProperty(t.prototype,"version",{get:function(){return this.Yk},set:function(t){if(!$m(t,8))throw new g("Provided version does not fit in 8 bits.");this.Yk=t},enumerable:!1,configurable:!0}),w.defineProperty(t.prototype,"profileIndication",{get:function(){return this.Gk},set:function(t){if(!$m(t,8))throw new g("Provided profileIndication does not fit in 8 bits.");this.Gk=t},enumerable:!1,configurable:!0}),w.defineProperty(t.prototype,"profileCompatibility",{get:function(){return this.Vk},set:function(t){if(!$m(t,8))throw new g("Provided profileCompatibility does not fit in 8 bits.");this.Vk=t},enumerable:!1,configurable:!0}),w.defineProperty(t.prototype,"levelIndication",{get:function(){return this.Wk},set:function(t){if(!$m(t,8))throw new g("Provided levelIndication does not fit in 8 bits.");this.Wk=t},enumerable:!1,configurable:!0}),w.defineProperty(t.prototype,"spsSets",{get:function(){return this.Hk},set:function(t){if(!$m(t.length,5))throw new g("Provided number of spsSets exceeds the max (32)");this.Hk=t},enumerable:!1,configurable:!0}),w.defineProperty(t.prototype,"ppsSets",{get:function(){return this.qk},set:function(t){if(!$m(t.length,8))throw new g("Provided number of ppsSets exceeds the max (256)");this.qk=t},enumerable:!1,configurable:!0}),t.prototype.getSize=function(){return 7+2*this.spsSets.length+this.spsSets.reduce((function(t,i){return t+i.length}),0)+2*this.ppsSets.length+this.ppsSets.reduce((function(t,i){return t+i.length}),0)},t.prototype.serialize=function(t){t.writer.writeByte(this.version),t.writer.writeByte(this.profileIndication),t.writer.writeByte(this.profileCompatibility),t.writer.writeByte(this.levelIndication),t.writer.writeBits([1,1,1,1,1,1]),t.writer.writeUInt(this.lengthSizeMinusOne,2),t.writer.writeBits([1,1,1]),t.writer.writeUInt(this.spsSets.length,5);for(var i=0,e=this.spsSets;i<e.length;i++){var s=e[i];t.writer.writeUInt(s.length,16),t.concat(Ou.from(s))}t.writer.writeByte(this.ppsSets.length);for(var n=0,r=this.ppsSets;n<r.length;n++){var h=r[n];t.writer.writeUInt(h.length,16),t.concat(Ou.from(h))}}}(),function(t){function i(i,e,s,n,r){void 0===n&&(n={}),void 0===r&&(r=void 0);var h=t.call(this,"avc1",i,e,n)||this;return h.configurationBox=s,h.bitrateBox=r,h}Yt(i,t),i.prototype.getBoxContentSize=function(){var i,e;return t.prototype.getBoxContentSize.call(this)+this.configurationBox.getSize()+(null!==(e=null===(i=this.bitrateBox)||void 0===i?void 0:i.getSize())&&void 0!==e?e:0)},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.concat(this.configurationBox.serialize()),this.bitrateBox&&i.concat(this.bitrateBox.serialize())}}(Ry),function(t){function i(i,e,s){var n=t.call(this,"btrt")||this;return n.bufferSizeDb=i,n.max=e,n.avg=s,n}Yt(i,t),w.defineProperty(i.prototype,"bufferSizeDb",{get:function(){return this.fL},set:function(t){if(!$m(t,32))throw new g("Provided bufferSizeDb does not fit in 32 bits.");this.fL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"max",{get:function(){return this.Xk},set:function(t){if(!$m(t,32))throw new g("Provided max does not fit in 32 bits.");this.Xk=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"avg",{get:function(){return this.Zk},set:function(t){if(!$m(t,32))throw new g("Provided avg does not fit in 32 bits.");this.Zk=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return 12},i.prototype.serializeBoxContent=function(t){t.writer.writeUInt(this.bufferSizeDb,32),t.writer.writeUInt(this.max,32),t.writer.writeUInt(this.avg,32)}}(Lr),function(t){function i(i,e){var s,n,r,h,o=this;if(o=t.call(this,"tenc",i,0)||this,e.perSampleIvSize>0&&(null!==(n=null===(s=e.constantIv)||void 0===s?void 0:s.length)&&void 0!==n?n:0)>0)throw new g("Either perSampleSize should be > 0 or constantIv should be defined. Not both.");return o.kId=e.kId,o.isProtected=null!==(r=e.isProtected)&&void 0!==r?r:1,e.perSampleIvSize>0?o.perSampleIvSize=e.perSampleIvSize:o.constantIv=null!==(h=e.constantIv)&&void 0!==h?h:new j(0),o}return Yt(i,t),w.defineProperty(i.prototype,"isProtected",{get:function(){return this.Kk},set:function(t){if(!$m(t,8))throw new g("Provided isProtected does not fit in 1 byte.");this.Kk=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"perSampleIvSize",{get:function(){return this.Jk},set:function(t){if(![8,16].includes(t))throw new g("Provided perSampleIvSize does not match any allowed value [8, 16].");this.Jk=t,this.$k=new j(0)},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"kId",{get:function(){return this.tC},set:function(t){if(16!==t.length)throw new g("Provided kId length is not 16.");this.tC=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"constantIv",{get:function(){return this.$k},set:function(t){if(![8,16].includes(t.length))throw new g("Provided constant IV length does not match any allowed value [8, 16].");this.$k=t,this.Jk=0},enumerable:!1,configurable:!0}),i.prototype.getTencHeaderSize=function(){return 20+(this.constantIv.length>0?1+this.constantIv.length:0)},i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.getTencHeaderSize()},i.prototype.serializeVersionBoxContent=function(t){t.writer.writeByte(0)},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),this.serializeOwnContent(i)},i.prototype.serializeOwnContent=function(t){t.writer.writeByte(0),this.serializeVersionBoxContent(t),t.writer.writeByte(this.isProtected),t.writer.writeByte(this.perSampleIvSize),tp(t.writer,this.kId),0===this.perSampleIvSize&&(t.writer.writeByte(this.constantIv.length),tp(t.writer,this.constantIv))},i}(At)),Qy=(function(t){function i(i){return t.call(this,0,i)||this}Yt(i,t)}(Uy),function(t){function i(i){var e=t.call(this,1,i)||this;return e.cryptByteBlocks=i.cryptByteBlock,e.skipByteBlocks=i.skipByteBlock,e}return Yt(i,t),w.defineProperty(i.prototype,"cryptByteBlocks",{get:function(){return this.iC},set:function(t){if(!$m(t,4))throw new g("Provided cryptByteBlocks does not fit in 4 bits.");this.iC=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"skipByteBlocks",{get:function(){return this.eC},set:function(t){if(!$m(t,4))throw new g("Provided skipByteBlocks does not fit in 4 bits.");this.eC=t},enumerable:!1,configurable:!0}),i.prototype.serializeVersionBoxContent=function(t){t.writer.writeUInt(this.cryptByteBlocks,4),t.writer.writeUInt(this.skipByteBlocks,4)},i}(Uy));!function(t){function i(i){var e=t.call(this)||this;return e.tencBox=new Qy(i),e}Yt(i,t),i.prototype.serializeBoxContent=function(t){this.tencBox.serializeOwnContent(t)},i.prototype.getBoxContentSize=function(){return this.tencBox.getTencHeaderSize()}}(ey);function Fy(t){return void 0!==t.iv}function Yy(t){return void 0!==t.subsamples}(function(t){function i(i){var e=t.call(this,"senc",0,{useSubsampleEncryption:!1})||this;return e.samples=i,e}Yt(i,t),w.defineProperty(i.prototype,"samples",{get:function(){return this.wk},set:function(t){var i;if(!$m(t.length,32))throw new g("The number of samples provided does not fit in 32 bits.");for(var e=0,s=t;e<s.length;e++){var n=s[e];if(Fy(n)&&![8,16].includes(n.iv.length))throw new g("IV of one of the provided samples did not satisfy the required length constraints. [8, 16]");if(void 0===i&&(i=Yy(n)),!0===i&&!Yy(n)||!1===i&&Yy(n))throw new g("Mix of samples with and without subsamples detected.");if(Yy(n)){if(!$m(n.subsamples.length,16))throw new g("Subsample length of one of the provided samples does not fit in 16 bits.");for(var r=0,h=n.subsamples;r<h.length;r++){var o=h[r];if(!$m(o.clearData,16))throw new g("Subsample clearData of one of the provided samples does not fit in 16 bits.");if(!$m(o.protectedData,23))throw new g("Subsample protectedData of one of the provided samples does not fit in 23 bits.")}}}this.flags.useSubsampleEncryption=null!=i&&i,this.wk=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){for(var i=0,e=0,s=this.samples;e<s.length;e++){var n=s[e];Fy(n)&&(i+=n.iv.length),Yy(n)&&(i+=2+6*n.subsamples.length)}return t.prototype.getBoxContentSize.call(this)+4+i},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeUInt(this.samples.length,32);for(var e=0,s=this.samples;e<s.length;e++){var n=s[e];if(Fy(n)&&tp(i.writer,n.iv),Yy(n)){i.writer.writeUInt(n.subsamples.length,16);for(var r=0,h=n.subsamples;r<h.length;r++){var o=h[r];i.writer.writeUInt(o.clearData,16),i.writer.writeUInt(o.protectedData,32)}}}},i.prototype.serializeFlags=function(t){t.writer.writeUInt(this.flags.useSubsampleEncryption?2:0,24)}})(At),function(t){function i(i,e,s,n,r){var h=t.call(this,"emsg",0,0)||this;return h.schemeIdUri=i,h.value=e,h.data=r,h.id=s,h.timescale=n.timescale,h.presentationTimeDelta=n.presentationTimeDelta,h.eventDuration=n.eventDuration,h}Yt(i,t),w.defineProperty(i.prototype,"timescale",{get:function(){return this.RL},set:function(t){if(!$m(t,32))throw new g("The provided timescale does not fit in 32 bits.");this.RL=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"presentationTimeDelta",{get:function(){return this.sC},set:function(t){if(!$m(t,32))throw new g("The provided presentationTimeDelta does not fit in 32 bits.");this.sC=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"eventDuration",{get:function(){return this.nC},set:function(t){if(!$m(t,32))throw new g("The provided eventDuration does not fit in 32 bits.");this.nC=t},enumerable:!1,configurable:!0}),w.defineProperty(i.prototype,"id",{get:function(){return this.IT},set:function(t){if(!$m(t,32))throw new g("The provided id does not fit in 32 bits.");this.IT=t},enumerable:!1,configurable:!0}),i.prototype.getBoxContentSize=function(){return t.prototype.getBoxContentSize.call(this)+this.schemeIdUri.length+1+this.value.length+1+16+this.data.length},i.prototype.serializeBoxContent=function(i){t.prototype.serializeBoxContent.call(this,i),i.writer.writeString(this.schemeIdUri),i.writer.writeByte(0),i.writer.writeString(this.value),i.writer.writeByte(0),i.writer.writeUInt(this.timescale,32),i.writer.writeUInt(this.presentationTimeDelta,32),i.writer.writeUInt(this.eventDuration,32),i.writer.writeUInt(this.id,32),i.concat(Ou.from(this.data))}}(At);var Gy=function(){function t(){this.boxes=[]}return t.prototype.serialize=function(){for(var t=new Jm,i=0,e=this.boxes;i<e.length;i++){var s=e[i];t.concat(s.serialize())}return t.toRangedBuffer()},t}();function Vy(t,i){return function(e){var s=function(t,i){for(var e=t.data,s=t.cursor;s.offset<e.byteLength;){var n=yp(e,s);if(!n.complete)return;if(ks(n.box,i))return n.box}}(new mp(wp(e),new vp),t);if(!s)throw new g("".concat(t," box not found"));return i(s)}}var Wy=Vy("moov",yy),Hy=Vy("sidx",(function(t){var i,e,s=t.data,n=tu(s.nextUint32()),r=n.version,h=n.flags,o=s.nextUint32(),a=s.nextUint32();0===r?(i=s.nextUint32(),e=s.nextUint32()):(i=s.nextUint64(),e=s.nextUint64()),s.skip(2);for(var u=s.nextUint16(),c=[],d=0;d<u;d++){var l=new pc(Ou.from(s.nextUint8Array(12))),f=l.readBit(),_=l.readUInt(31),g=l.readUInt(32),w=Boolean(l.readBit()),A=l.readUInt(3),v=l.readUInt(28);c.push({referenceType:f,referencedSize:_,subsegmentDuration:g,startsWithSap:w,sapType:A,sapDeltaTime:v})}return 0===r?new Oy(o,a,i,e,c,h.raw):new jy(o,a,i,e,c,h.raw)})),qy=Vy("moof",by),Xy=Vy("pssh",an);function Zy(t){return function(t){for(var i=new Gy,e=0,s=Ro(t);e<s.length;e++){var n=s[e];ks(n,"ftyp")?i.boxes.push(Rp(n)):ks(n,"styp")?i.boxes.push(Py(n)):ks(n,"moov")?i.boxes.push(yy(n)):ks(n,"moof")?i.boxes.push(by(n)):ks(n,"mdat")?i.boxes.push(qp(n)):i.boxes.push(Lh(n))}return i}(new mp(wp(t),new vp))}var Ky=class extends Bo{get rC(){return this.hC}get oC(){return this.aC.expiration}get uC(){return this.cC}get dC(){return this.aC.sessionId}Ws(){if(this.lC)return this.hC;const t=[];return t.push(Promise.resolve(this.aC.close())),t.push(Di(1e3)),this.fC.Zd(Promise.race(t).catch(Jy)),this.lC=!0,this.hC}_C(t,i,e){if(fi.nE){const t=Xy(Oi(i));if(1===t.version){i=new ny(t.systemId,t.data).serialize().join()}}return Promise.resolve(this.aC.generateRequest(t,i)).catch(Jy)}$n(t){return Promise.resolve(this.aC.load(t)).catch(Jy)}TT(){return Promise.resolve(this.aC.remove()).catch(Jy)}Yn(t){return Promise.resolve(this.aC.update(t)).catch(Jy)}gC(){this.cC.Ub(),this.aC.keyStatuses.forEach(((t,i)=>{this.wC(i,t)})),this.Co(new to(this))}wC(t,i){if("string"==typeof t){const e=t;t=i,i=e}const e=Oi(t);if(this.KA===v_&&16===e.byteLength){let t=hl(e),i=t.getUint32(0,!0),s=t.getUint16(4,!0),n=t.getUint16(6,!0);t.setUint32(0,i,!1),t.setUint16(4,s,!1),t.setUint16(6,n,!1)}this.KA===v_&&"status-pending"===i&&(i="usable"),this.cC.Rb(e,i)}constructor(t,i){super(),this.aC=t,this.KA=i,this.lC=!1,this.AC=()=>{this.gC()},this.vC=t=>{this.Co(new Pn(this,t.messageType,Gm(this.KA,t.message)))},this.mC=()=>{this.lC=!0,this.cC.sp>0&&(this.cC.Ub(),this.Co(new to(this))),this.aC.removeEventListener("keystatuseschange",this.AC),this.aC.removeEventListener("message",this.vC)},this.aC.addEventListener("keystatuseschange",this.AC),this.aC.addEventListener("message",this.vC),this.cC=new ze;const e=[];this.aC.closed&&e.push(Promise.resolve(this.aC.closed)),this.fC=new Rs,e.push(this.fC.Vb),this.hC=Promise.race(e).then(this.mC,this.mC),this.gC()}};function Jy(t){let i;if(t.message){const e=t.message.match(/^SystemCode:0x([0-9a-fA-F]+)$/);e&&(i=0|x(e[1],16))}throw new bi(t.message,void 0,i,t)}var $y=class{async pC(t){return new Ky(this.yC.createSession(t),this.ZA)}MC(t){return Promise.resolve(this.yC.setServerCertificate(t))}bn(t){return Promise.resolve(t.setMediaKeys(this.yC))}TC(t){return Promise.resolve(t.setMediaKeys(null))}tr(){return Promise.resolve()}constructor(t,i,e){this.yC=t,this.ZA=i,this.wd=e}},tM=class{get ZA(){return this.NC.keySystem}async DC(){const t=await this.NC.createMediaKeys();return new $y(t,this.KA,this.SC)}IC(){return this.SC}constructor(t,i,e){this.NC=t,this.KA=i,this.SC=e}},iM=fi.dE&&fi.fE>=42||fi.PE&&fi.RE>=38||fi.bE||fi.xE||fi.VE&&fi.HE>=29;function eM(t,i){return It(t,"audio")?{initDataTypes:["cenc"],audioCapabilities:[Tt({contentType:t},i?{robustness:"SW_SECURE_CRYPTO"}:{})]}:{initDataTypes:["cenc"],videoCapabilities:[Tt({contentType:t},i?{robustness:"SW_SECURE_CRYPTO"}:{})]}}function sM(){return void 0!==ed&&"function"==typeof ed.requestMediaKeySystemAccess}function yr(){return"undefined"!=typeof HTMLMediaElement&&void 0!==HTMLMediaElement.prototype.webkitGenerateKeyRequest&&void 0!==HTMLMediaElement.prototype.webkitAddKey&&void 0!==HTMLMediaElement.prototype.webkitCancelKeyRequest}var nM=class{EC(){return this.bC(jm)}LC(){return this.bC(fr)}kC(){return this.bC(or)}xC(){return this.bC(on)}bC(t){const i=t.Db,e=this.OC.get(i);if(e)return e;const s=this.jC(t,'video/mp4; codecs="avc1.42000a"');return this.OC.set(i,s),s}async jC(t,i){try{return await this.BC.zC(t.Mb,[eM(i,!0)]),!0}catch(e){try{return await this.BC.zC(t.Mb,[eM(i,!1)]),!0}catch(t){return!1}}}RC(){return this.UC||(this.UC=this.QC()),this.UC}async QC(){return"https:"!==xm.protocol&&(!!iM&&!await this.LC())}constructor(t){this.OC=Cn(),this.UC=void 0,this.BC=t}};function rM(t,i,e,s){let n=!1;if(s.persistentState&&"optional"!==s.persistentState)return;if(s.distinctiveIdentifier&&"optional"!==s.distinctiveIdentifier)return;const r={audioCapabilities:[],videoCapabilities:[],persistentState:s.persistentState||"optional",distinctiveIdentifier:s.distinctiveIdentifier||"optional",initDataTypes:s.initDataTypes,sessionTypes:["temporary"],label:s.label,FC:s.FC};let h=!1;if(s.audioCapabilities){const o=s.audioCapabilities.filter((t=>Boolean(t.contentType)));o.length&&(r.audioCapabilities=o.filter((s=>hM(t,i,e,s))),h=!0,r.audioCapabilities.length&&(n=!0))}if(s.videoCapabilities){const o=s.videoCapabilities.filter((t=>Boolean(t.contentType)));o.length&&(r.videoCapabilities=o.filter((s=>hM(t,i,e,s))),h=!0,r.videoCapabilities.length&&(n=!0))}return h||(n=t(e,"video/mp4")),n?r:void 0}function hM(t,i,e,s){if(!s.contentType)return!1;if(s.encryptionScheme&&!ae(i,s.encryptionScheme))return!1;if(s.robustness)return!1;return t(e,Ne(s.contentType))}function oM(t){if(t.videoCapabilities)for(const i of t.videoCapabilities)if(i.contentType)return i.contentType;if(t.audioCapabilities)for(const i of t.audioCapabilities)if(i.contentType)return i.contentType}function aM(t){const i=[];for(const e of t)e.encryptionScheme&&i.push({contentType:e.contentType,robustness:e.robustness});return t.concat(i)}function uM(t){return!(!t.audioCapabilities||!t.audioCapabilities.some(cM))||!(!t.videoCapabilities||!t.videoCapabilities.some(cM))}function cM(t){return!t.robustness}function dM(t,i){const e=[];for(const s of t)s.robustness?e.push(s):e.push(Tt({},s,{robustness:i}));return e}var lM=class{async zC(t,i){i=i.filter((t=>!t.FC));for(const t of i)t.audioCapabilities&&(t.audioCapabilities=aM(t.audioCapabilities)),t.videoCapabilities&&(t.videoCapabilities=aM(t.videoCapabilities));if(t===p_&&i.some(uM)){const e=i.map((t=>function(t,i){return Tt({},t,{videoCapabilities:t.videoCapabilities?dM(t.videoCapabilities,i):void 0,audioCapabilities:t.audioCapabilities?dM(t.audioCapabilities,i):void 0})}(t,"SW_SECURE_CRYPTO")));try{const i=await ed.requestMediaKeySystemAccess(t,e),s=i.getConfiguration();return new tM(i,t,s)}catch(t){}}const e=await ed.requestMediaKeySystemAccess(t,i),s=e.getConfiguration();return new tM(e,t,s)}static YC(){return sM()}},fM=class extends Bo{get dC(){return this.GC&&this.GC.sessionId||""}get oC(){return NaN}get rC(){return this.VC.Vb}get uC(){return this.WC}async _C(t,i,e){this.HC(),this.qC=new Rs,this.pC(Oi(i),e),await this.qC.Vb}pC(t,i){if(!t)throw new b("Expected initData to be defined but was "+t+".");const e=i&&i.playready&&i.playready.XC;let s;return s=i?this.ZC.createSession(this.KC,t,e):this.ZC.createSession(this.KC,t),s.addEventListener("mskeyclose",this.mC),s.addEventListener("mskeymessage",this.JC),s.addEventListener("mskeyerror",this.Ss),s.addEventListener("mskeyadded",this.$C),this.GC=s,this.tx("status-pending"),s}async $n(t){return this.HC(),!0}async Yn(t){if(this.ix=new Rs,this.HC(),!this.GC)return Promise.resolve();const i=Oi(t);if(0===i.byteLength)throw new b("Cannot call update with an empty response.");this.GC.update(i),await this.ix.Vb}Ws(){return!this.lC&&this.GC&&(this.lC=!0,this.GC.close()),this.VC.Vb}async TT(){this.HC()}HC(){if(this.lC)throw new b("Already closing or closed.")}tx(t){this.WC.Ub(),this.WC.Rb(sn,t),this.Co(new to(this))}constructor(t,i){super(),this.ZC=t,this.KC=i,this.lC=!1,this.ix=void 0,this.qC=void 0,this.GC=void 0,this.mC=()=>{this.lC=!0,this.VC.Qb(void 0),this.GC&&(this.GC.removeEventListener("mskeyclose",this.mC),this.GC.removeEventListener("mskeymessage",this.JC),this.GC.removeEventListener("mskeyerror",this.Ss),this.GC.removeEventListener("mskeyadded",this.$C))},this.JC=t=>{this.qC&&(this.qC.Qb(void 0),this.qC=void 0),this.Co(new Pn(this,"license-request",_t(t.message).buffer,t.destinationURL||void 0))},this.Ss=()=>{const t=this.GC&&this.GC.error;if(!t)return;const i=new bi("Unknown CDM error",t.code,t.systemCode);if(this.qC)this.qC.Yb(i),this.qC=void 0;else if(this.ix)this.ix.Yb(i),this.ix=void 0;else switch(i.Wb){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:this.tx("output-not-allowed");break;default:this.tx("internal-error")}},this.$C=()=>{this.qC&&(this.tx("usable"),this.qC.Qb(void 0),this.qC=void 0),this.ix&&(this.tx("usable"),this.ix.Qb(void 0),this.ix=void 0)},this.VC=new Rs,this.WC=new ze}},_M=class{async pC(t){return new fM(this.ZC,this.KC)}MC(t){return Promise.resolve(!1)}bn(t){const i=()=>{t.msSetMediaKeys(this.ZC),t.removeEventListener("loadedmetadata",i)};return t.readyState>=1?t.msSetMediaKeys(this.ZC):t.addEventListener("loadedmetadata",i),Promise.resolve()}TC(t){return Promise.resolve()}tr(){return Promise.resolve()}constructor(t,i,e){this.ZC=t,this.ZA=i,this.wd=e;const s=oM(e)||"video/mp4";this.KC=Ne(s)}},gM=class{get ZA(){return this.KA}IC(){return this.sx}DC(){const t=new Qr.MSMediaKeys(this.KA);return Promise.resolve(new _M(t,this.KA,this.sx))}constructor(t,i){this.KA=t,this.sx=i}},wM=class{zC(t,i){try{return Promise.resolve(function(t,i){if(!AM())throw new b("Unsupported key system "+t);for(let e of i){let i=rM(vM,Rm,t,e);if(i)return new gM(t,i)}throw new b("Unsupported key system configuration for "+t)}(t,i))}catch(t){return Promise.reject(t)}}static YC(){return AM()}};function AM(){return void 0!==Qr.MSMediaKeys&&"function"==typeof Qr.MSMediaKeys.isTypeSupported}function vM(t,i){return Qr.MSMediaKeys.isTypeSupported(t,i)}var mM=class extends Bo{get dC(){return this.nx?this.nx.sessionId:""}get oC(){return NaN}get rC(){return this.VC.Vb}get uC(){return this.WC}_C(t,i,e){const s=e&&e.fairplay&&e.fairplay.hx;if(!s)throw new b("Expected FairPlay contentId to be defined but was "+s+".");const n=function(t,i,e){const s=$e(t),n=2*s.length,r=2*i.length;let h=new ArrayBuffer(4+n+4+r+4+e.byteLength),o=new DataView(h),a=new Ha;return sc(o,a,n,!0),Mg(o,a,s,!0),sc(o,a,r,!0),Mg(o,a,i,!0),sc(o,a,e.byteLength,!0),cg(o,a,e),new j(h)}(Oi(i),s,this.ox);return this.nx=this.ux.createSession(this.KC,n),this.nx.addEventListener("webkitkeymessage",this.JC,!1),this.nx.addEventListener("webkitkeyadded",this.$C,!1),this.nx.addEventListener("webkitkeyerror",this.Ss,!1),this.tx("status-pending"),this.lx.Qb(this.nx),this.lx=new Rs,Promise.resolve()}$n(t){return Promise.resolve(!0)}async Yn(t){const i=Oi(t);if(0===i.byteLength)throw new b("Cannot call update with an empty response.");this._x=new Rs;(this.nx||await this.lx.Vb).update(i),await this._x.Vb}Ws(){var t;const i=this.nx;return i&&(i.removeEventListener("webkitkeymessage",this.JC,!1),i.removeEventListener("webkitkeyadded",this.$C,!1),i.removeEventListener("webkitkeyerror",this.Ss,!1),i.close()),this.lx.Xd(),null==(t=this._x)||t.Xd(),this.VC.Qb(void 0),this.VC.Vb}TT(){return Promise.resolve(void 0)}tx(t){this.WC.Ub(),this.WC.Rb(sn,t),this.Co(new to(this))}constructor(t,i,e){super(),this.ux=t,this.KC=i,this.ox=e,this.VC=new Rs,this._x=void 0,this.WC=new ze,this.nx=void 0,this.lx=new Rs,this.Ss=()=>{const t=this.nx&&this.nx.error;if(!t)return;const i=new bi("Unknown CDM error",t.code,t.systemCode);this._x?(this._x.Yb(i),this._x=void 0):i.Wb===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?this.tx("output-not-allowed"):this.tx("internal-error"),this.Co(new Qm)},this.JC=t=>{this.Co(new Pn(this,"license-request",_t(t.message).buffer,"this is a test string"===t.destinationURL?void 0:t.destinationURL))},this.$C=()=>{this._x&&(this._x.Qb(void 0),this._x=void 0),this.tx("usable")}}};var pM=class{getInternalMediaKeys(){return this.ux}async pC(t){if(!this.ox)throw new $i(td.CONTENT_PROTECTION_CERTIFICATE_ERROR,"No valid certificate was provided.");return new mM(this.ux,this.KC,this.ox)}MC(t){return this.ox=Oi(t),Promise.resolve(!0)}bn(t){return t.webkitSetMediaKeys(this.ux),Promise.resolve()}TC(t){return t.webkitSetMediaKeys(null),Promise.resolve()}tr(){return Promise.resolve()}constructor(t,i,e){this.ux=t,this.ZA=i,this.wd=e,this.ox=void 0;const s=oM(e)||"video/mp4";this.KC=Ne(s)}},yM=class{get ZA(){return this.KA}IC(){return this.sx}DC(){const t=new Qr.WebKitMediaKeys(this.KA);return Promise.resolve(new pM(t,this.KA,this.sx))}constructor(t,i){this.KA=t,this.sx=i}},MM=class{zC(t,i){try{return Promise.resolve(function(t,i){if(t!==T_)throw new b(t+" is not supported with webkit-prefixed Encrypted Media Extensions.");if(!TM())throw new b("Unsupported key system "+t);for(let e of i){let i=rM(NM,Um,t,e);if(i)return new yM(t,i)}throw new b("Unsupported key system configuration for "+t)}(t,i))}catch(t){return Promise.reject(t)}}static YC(){return TM()}};function TM(){return void 0!==Qr.WebKitMediaKeys&&"function"==typeof Qr.WebKitMediaKeys.isTypeSupported}function NM(t,i){return Qr.WebKitMediaKeys.isTypeSupported(t,i)}var DM=class{async zC(t,i){for(let e of this.gx)try{return await e.zC(t,i)}catch(t){}throw new b("Unsupported key system configuration for "+t)}constructor(t){this.gx=t}},ls=class{wx(t,i){return new Promise((e=>{const s=new er;s.Zd(this.Ax.Hd),i&&s.Zd(i);const n=()=>{s.Qd()};this.vx.push((()=>{const i=SM(t,s.Hd);return e(i),i.then(n,n)})),this.mx||(this.mx=this.yx())}))}Xd(){return this.Mx(!0)}gn(){return this.Tx=void 0,this.Mx(!1)}Mx(t){const i=this.mx;return this.Ax.Xd(),t&&(this.Ax=new er),Promise.resolve(i)}constructor(t){this.vx=[],this.mx=void 0,this.Ax=new er,this.yx=()=>{if(0===this.vx.length)return this.Tx?SM(this.Tx,this.Ax.Hd).then(this.Nx,this.Nx):this.Nx();return this.vx.shift()().then(this.yx)},this.Nx=()=>{if(0!==this.vx.length)return this.yx();this.mx=void 0},this.Tx=t}};function SM(t,i){return new Promise((e=>e(t(i))))}var IM,EM=new ls,bM=class extends Bo{Dx(){this._x&&(this.tx("usable"),this._x.Qb(void 0),this._x=void 0)}Sx(t){const i=new bi("Unknown CDM error",t.errorCode,t.systemCode);this._x?(this._x.Yb(i),this._x=void 0):this.qC?(this.qC.Yb(i),this.qC=void 0):i.Wb===WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT?this.tx("output-restricted"):1===i.Hb?this.tx("expired"):this.tx("internal-error")}Ix(t){0!==t.message.byteLength?(this.qC&&(this.qC.Qb(void 0),this.qC=void 0),this.Co(new Pn(this,"license-request",Gm(this.KA,_t(t.message).buffer),t.defaultURL||void 0))):this.qC&&(this.qC.Yb("Empty key message"),this.qC=void 0)}Ex(t){this.bx||(this.bx=t,this.Lx.Qb(t))}get uC(){return this.kx}get dC(){return this.Cx}set dC(t){this.Cx=t}get rC(){return this.VC.Vb}get oC(){return NaN}async Ws(){this.throwIfClosed(),this._x&&(this._x.Yb(void 0),this._x=void 0),this.sL=!0,this.VC.Qb(void 0)}async _C(t,i){this.throwIfClosed(),this.qC=new Rs,this.xx=Oi(i);(this.bx||await this.Lx.Vb).webkitGenerateKeyRequest(this.KA,this.xx),await this.qC.Vb}async $n(t){return this.throwIfClosed(),!1}async TT(){this.throwIfClosed()}async Yn(t){if(this.throwIfClosed(),this._x=new Rs,fi.NE||fi.pE)return EM.wx((async()=>{await this.doUpdate(t)}));await this.doUpdate(t)}async doUpdate(t){if(void 0===this._x)return;(this.bx||await this.Lx.Vb).webkitAddKey(this.KA,Oi(t),this.xx,this.dC),await this._x.Vb,fi.pE&&await Di(500)}throwIfClosed(){if(this.sL)throw new b("Already closing or closed.")}tx(t){this.kx.Ub(),this.kx.Rb(sn,t),this.Co(new to(this))}async Ox(){const t=this.bx||await this.Lx.Vb;if(t.webkitCancelKeyRequest)try{t.webkitCancelKeyRequest(this.KA,this.Cx)}catch(t){}finally{await Di(500)}}constructor(t){super(),this.KA=t,this.qC=void 0,this._x=void 0,this.sL=!1,this.xx=void 0,this.bx=void 0,this.VC=new Rs,this.Cx="",this.Lx=new Rs,this.kx=new ze}},LM=class{bn(t){return this.bx=t,this.bx.addEventListener("webkitkeyadded",this.$C),this.bx.addEventListener("webkitkeyerror",this.jx),this.bx.addEventListener("webkitkeymessage",this.zx),this.Px.forEach(((i,e)=>i.Ex(t))),this.Bx.forEach((i=>i.Ex(t))),Promise.resolve()}TC(t){return t.removeEventListener("webkitkeyadded",this.$C),t.removeEventListener("webkitkeyerror",this.jx),t.removeEventListener("webkitkeymessage",this.zx),this.bx=void 0,Promise.resolve()}async tr(){let t=this.Px.entries(),i=t.next();for(;!i.done;)await i.value[1].Ox(),i=t.next();this.Px.clear()}async pC(t,i,e){const s=new bM(this.ZA);return this.bx&&s.Ex(this.bx),this.Bx.push(s),s}MC(t){return Promise.resolve(!1)}Rx(t){if(!t)return;let i=this.Px.get(t);return i||(i=this.Bx.shift(),i?(i.dC=t,this.Px.set(t,i),i):void 0)}constructor(t,i){this.ZA=t,this.wd=i,this.bx=void 0,this.Px=Cn(),this.Bx=[],this.$C=t=>{const i=this.Rx(t.sessionId);i&&i.Dx()},this.jx=t=>{const i=this.Rx(t.sessionId);i&&i.Sx(t)},this.zx=t=>{const i=this.Rx(t.sessionId);i&&i.Ix(t)}}},kM=class{DC(){return Promise.resolve(new LM(this.ZA,this.Ux))}IC(){return this.Ux}constructor(t,i){this.ZA=t,this.Ux=i}};function hs(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function O(t){let i;for(;Dd(i=t.firstChild);)t.removeChild(i)}function CM(t,i){t.insertBefore(i,t.firstChild)}function xM(t){const i=t.className;return"string"==typeof i?i:i&&"string"==typeof i.baseVal?i.baseVal:""}function OM(t,i){const e=t.className;"string"==typeof e?t.className=i:e&&"string"==typeof e.baseVal&&(e.baseVal=i)}function jM(t,i){return void 0!==t.classList?t.classList.contains(i):void 0!==t.className&&-1!==(" "+xM(t)+" ").indexOf(" "+i+" ")}function Kh(t,i){if(void 0!==t.classList)t.classList.add(i);else if(void 0!==t.className){const e=xM(t);-1===(" "+e+" ").indexOf(" "+i+" ")&&OM(t,(e+" "+i).trim())}}function zM(t,i){if(void 0!==t.classList)t.classList.remove(i);else if(void 0!==t.className){let e=" "+xM(t)+" ";const s=" "+i+" ";for(;-1!==e.indexOf(s);)e=e.replace(s," ");OM(t,e.trim())}}function PM(t,i,e){void 0===e&&(e=!jM(t,i)),e?Kh(t,i):zM(t,i)}function BM(t){t.stopPropagation()}function RM(t,i){fi.pE&&fi.ME<3?function(t,i){let e=i;switch(i){case"flex":e="-webkit-flex";break;case"inline-flex":e="-webkit-inline-flex"}t.display=e}(t,i):function(t,i){if(t.display=i,t.display!==i){let e=i;switch(i){case"flex":e="-ms-flexbox";break;case"inline-flex":e="-ms-inline-flexbox"}t.display=e}}(t,i)}function mt(t,i){const e=i.style;if(e)for(const i of w.keys(t)){const s=t[i];void 0!==s&&(e[i]=s)}}function ca(t){const i=t.style;i.position="absolute",i.left="0",i.right="0",i.top="0",i.bottom="0",i.width="100%",i.height="100%"}function UM(t){t.removeAttribute("title")}function QM(t){t.addEventListener("mouseover",(t=>{UM(t.target)}))}function FM(t){try{return Boolean(t)&&t===t.top}catch(t){return!1}}function tt(t){try{return Boolean(t)&&t.parent!==t}catch(t){return!1}}function hn(t){return"video"===function(t){return t&&t.nodeName&&t.nodeName.toLowerCase()||""}(t)}function YM(t){t.src&&(t.removeAttribute("src"),t.load()),t.srcObject&&(t.srcObject=null,t.load())}function GM(){return void 0!==h?h.createElement("video"):void 0}function U(){return IM||(IM=GM()),IM}var VM,I,Q=class{zC(t,i){try{return Promise.resolve(function(t,i){if(!Q.YC())throw new b("Unsupported key system "+t);for(let e of i){let i=rM(WM,Rm,t,e);if(i)return new kM(t,i)}throw new b("Unsupported key system configuration for "+t)}(t,i))}catch(t){return Promise.reject(t)}}static YC(){return yr()}};function WM(t,i){const e=U();return!(!e||!e.canPlayType||""===e.canPlayType(i,t))}function K(){return VM||(VM=function(){const t=[];MM.YC()&&t.push(new MM);lM.YC()&&t.push(new lM);wM.YC()&&t.push(new wM);Q.YC()&&t.push(new Q);return new DM(t)}()),VM}!function(t){t[t.Qx=0]="Qx",t[t.Fx=1]="Fx"}(I||(I={}));var qa=class extends Yi{constructor(t){super(Zt.Bw),this.currentTime=t}},_e=class extends Yi{constructor(t){super(Zt.Rw),this.currentTime=t}},HM=[Zt.H_,Zt.Rw,Co.jh,Co.Sh],Gu=class extends Bo{Yx(t){!this.Gx&&t>=oe.Xn&&(this.Gx=!0,this.Co(new ti(this.Vx.Mf,t)))}Wx(t){!this.Hx&&t>=oe.nT&&(this.Hx=!0,this.Co(new ki(this.Vx.Mf,t)))}qx(t){this.Xx||(t>=oe.rT&&this.Zx<oe.rT&&!this.Vx.Ff||this.Kx&&t>=oe.rT)&&this.Co(new _e(this.Vx.Mf))}Jx(t){!this.$x(t)||this.Vx.Sf||this.Vx.lt||this.Co(new qa(this.Vx.Mf))}tO(t){this.Zx<=oe.nT&&t>=oe.rT&&this.Co(new jw(this.Vx.Mf,t))}maybeDispatchCanPlayThroughEvent(t){t===oe.hT&&this.Co(new di(this.Vx.Mf,t))}$x(t){const i=!this.Vx.Ff&&t<=oe.nT,e=!this.iO&&this.Zx<=oe.nT;return i&&!e}get Kx(){return!this.Vx.Ff&&this.iO}tr(){this.Zx=oe.sT,this.iO=!0,this.Hx=!1,this.Gx=!1}gn(){this.Vo(),this.Xx&&this.Vx.fn(Zt.Rw,this.eO),this.Vx.fn(Co.jh,this.sO),this.Vx.fn(Co.Sh,this.nO),this.Vx.fn(Zt.H_,this.rO)}constructor(t,i=!1){super(),this.Vx=t,this.Xx=i,this.Zx=oe.sT,this.iO=!0,this.Hx=!1,this.Gx=!1,this.rO=t=>{const i=this.Vx.Jf;i!==this.Zx&&this.Co(new Bn(t.currentTime,i)),i===oe.sT&&(this.Hx=!1,this.Gx=!1),this.Yx(i),this.Wx(i),this.tO(i),this.maybeDispatchCanPlayThroughEvent(i),this.qx(i),this.Jx(i),this.Zx=i},this.sO=()=>{this.Jx(this.Zx),this.qx(this.Zx),this.iO=this.Vx.Ff},this.nO=()=>{this.iO=this.Vx.Ff},this.eO=t=>{this.Co(new _e(t.currentTime))},this.Vx.yn(Zt.H_,this.rO),this.Vx.yn(Co.jh,this.sO),this.Vx.yn(Co.Sh,this.nO),this.Xx&&this.Vx.yn(Zt.Rw,this.eO)}},X=class extends Bo{get Mf(){return this.Vx.Mf}get Sf(){return this.Vx.Sf}get lt(){return this.Vx.lt}get Ff(){return this.Vx.Ff}get Jf(){return this.Vx.Jf}Qd(){this.Vo(),this.Vx.fn(HM,this.Ds)}constructor(t){super(),this.Vx=t,this.Vx.yn(HM,this.Ds)}},yn=class{hO(){return this.oO}aO(t){this.oO=t}get uO(){return this.mI}get cO(){return!1}get dO(){const t=this.lO.certificate;if(t)return Qs(t)?Ae(t):Oi(t)}fO(){return this.lO.licenseAcquisitionURL||this.hO()}get _O(){return!1}gO(t){return Promise.resolve()}wO(t,i){return Promise.resolve(void 0)}get lI(){return Boolean(this.lO.useCredentials)}async AO(t,i,e,s){const n=this.vO(t,i,e,s);if(""===n.zu)throw new Or(td.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The license request URL has not been correctly configured.");try{const t=await this.uO.MS(n);return await t.mO(i)}catch(t){return Kc(t),void await this.pO(t,n.zu,s)}}vO(t,i,e,s){const n=this.yO().QS(),r=this.lI,h={zu:this.MO(),aI:i,hI:n,rI:t,lI:r,oI:G.POST,IS:0,Hd:s,Rg:N.HS,cI:e};return new Pc(h)}TO(t,i){return Promise.resolve(t)}DO(t,i,e,s){return Promise.resolve(t)}yO(){return new gs(this.lO.headers||{})}async pO(t,i,e){throw new Or(td.CONTENT_PROTECTION_LICENSE_ERROR,"Error during license server request",t)}MO(t,e){let s=e;const n=this.lO.queryParameters;if(!s){const t=this.fO();if(!t)return"";s=t}if(n||t){const e=i.Dh(s);t&&zf(e,t),n&&zf(e,n),s=e.href}return s}SO(t,i){return qM(t)}IO(t){return new j(t)}async EO(t,i,e){const s=await this.SO(t,e),n=await this.AO(s,this.bO,i,e);return this.IO(n)}gn(){}constructor(t,i,e,s,n){this.oO=void 0,this.ZA=t,this.LO=i,this.kO=e,this.mI=s,this.bO=n,this.lO=this.CO(i)}};function qM(t){return Promise.resolve(_t(t).buffer)}var uc,_h=class extends yn{CO(t){return t.widevine||{}}async xO(t,i){return this.dO?this.dO:this.OO(new j(t),i)}OO(t,i){return super.EO(t,aa.KS,i)}constructor(t,i,e,s){super(jm,t,i,e,s)}};!function(t){t.BA="Widevine",t.jO="PlayreadyV2",t.zO="PlayreadyV3",t.PA="PlayreadyV2",t.RA="Fairplay"}(uc||(uc={}));var XM={Widevine:{DRMProvider:"Google",DRMVersion:"1.4.8.86",DRMType:"Widevine"},PlayreadyV2:{DRMProvider:"Microsoft",DRMVersion:"2.9",DRMType:"Playready"},PlayreadyV3:{DRMProvider:"Microsoft",DRMVersion:"3",DRMType:"Playready"},Fairplay:{DRMProvider:"Apple",DRMType:"FairPlay",DRMVersion:"1.0"}};function ZM(t,e){var s,n,r,h;const o=XM[e],a=t.accountName;return{CustomerName:t.customerName,AccountName:a,PortalId:t.portalId,FriendlyName:t.friendlyName,DeviceInfo:{FormatVersion:"1",DeviceType:"PC",OSType:null==(s=i.PO)?void 0:s.Ys,OSVersion:null==(n=i.PO)?void 0:n.BO,DRMProvider:o.DRMProvider,DRMVersion:o.DRMVersion,DRMType:o.DRMType,DeviceVendor:null==(r=i.PO)?void 0:r.RO,DeviceModel:null==(h=i.PO)?void 0:h.UO}}}function KM(t,i){if(!t.accountName)throw new Or(td.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium "+i+" DRM configuration, accountName is not set.");if(!t.customerName)throw new Or(td.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium "+i+" DRM configuration, customerName is not set.");if(!t.portalId)throw new Or(td.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium "+i+" DRM configuration, portalId is not set.");throw new Or(td.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium "+i+" DRM configuration.")}function JM(t,i,e){let s;if(Wg(t))s={AuthToken:t.authToken,Payload:i};else{if(!Hg(t))throw KM(t,e);s={LatensRegistration:ZM(t,e),Payload:i}}return $a(JSON.stringify(s))}async function $M(t,i,e){const s=t.NS;if(!s)throw new Or(td.CONTENT_PROTECTION_LICENSE_ERROR,"Error during Titanium server request",t,i);const n=s;let r,h;try{r=await n.QO(e),h=function(t){if(t){if(t.WvProxyErr)return t.WvProxyErr.desc;if(t.DrmErr)return t.DrmErr.desc}return}(r)}catch(t){h=""}throw new Or(td.CONTENT_PROTECTION_LICENSE_ERROR,"Error during Titanium server request",t,n.MS.zu,n.SS,n.FO,h)}var tT=class extends _h{static YO(){return i.Ys.GO?"required":"optional"}pO(t,i,e){return $M(t,i,e)}gO(t){return this.VO?ji(this.VO.Vb,t):(this.VO=new Rs,Promise.resolve())}async SO(t,i){const e=this.LO;if(!e)throw new Or(td.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium Widevine DRM configuration.");return JM(e,jc(t),uc.BA)}IO(t){let i;if(!t.license)throw new Or(td.CONTENT_PROTECTION_LICENSE_INVALID,"Could not process the response from the Titanium Widevine license server");return i=Ae(t.license),i}WO(t){return Promise.resolve(new j(t))}async xO(t,i){this.HO();const e=await this.SO(t,i),s=await this.AO(e,dm.PS,aa.JS,i);return await this.WO(s)}async OO(t,i){const e=await super.OO(t,i);return this.HO(),e}HO(){this.VO||(this.VO=new Rs),this.VO.Qb()}gn(){this.VO&&this.VO.Xd(),super.gn()}constructor(t,i,e){super(t,i,e,dm.RS),this.VO=void 0}},iT=class extends _h{get qO(){if(qg(this.LO))return this.LO.token}async SO(t,i){const e=await qM(t),s=this.kO,n=bg(new j(e)),r=this.qO;if(!r)throw new Or(td.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The Widevine vuDRM token has not been correctly configured.");return JSON.stringify({token:r,drm_info:n,kid:s})}constructor(t,i,e){super(t,i,e,dm.PS),this.aO("https://widevine-proxy.drm.technology/proxy")}};function eT(t,i){let e=i||{};return t.ticket&&t.sessionId&&(e=Tt({},e,{SessionId:t.sessionId,Ticket:t.ticket})),Tt({},e,{CrmId:t.crmId,AccountId:t.accountId,ContentId:t.contentId})}var sT=class extends _h{MO(t,i){let e=t;return Yg(this.LO)&&(e=eT(this.LO,e)),super.MO(e,i)}constructor(t,i,e){super(t,i,e,dm.PS),this.aO("https://emeademo.dev.ott.irdeto.com/Widevine/getlicense")}},nT="Conax-Custom-Data";function nt(t,i,e){const s=t&&Fg(t)&&t;if(s&&!e.has(nT)){const t=u_(s)?s.token:void 0,n=u_(s)?s.deviceId:void 0,r=JSON.stringify({Version:"1.0.0",CxAuthenticationDataToken:t,CxClientInfo:{DeviceType:"Browser",DrmClientType:i+"-HTML5",DrmClientVersion:"1.0.0",CxDeviceId:n}});e.set(nT,r)}return e}var rT=class extends _h{yO(){const t=super.yO();return nt(this.LO,"Widevine",t)}constructor(t,i,e){super(t,i,e,dm.PS),this.aO("https://connect.conax.com:8094/license")}};function hT(t){const i=$s(new j(t));return Ae(JSON.parse(i).license)}function kt(t){return"string"==typeof t.token?t.token:$a(JSON.stringify({userId:t.userId,sessionId:t.sessionId,merchant:t.merchant}))}function st(t,i,e){let s;return s=e.token?"x-dt-auth-token":"dt-custom-data",t.set(s,i),t}var oT=class extends _h{get qO(){return kt(this.LO)}IO(t){return hT(t)}yO(){return st(super.yO(),this.qO,this.LO)}constructor(t,i,e){super(t,i,e,dm.PS),this.aO("https://lic.drmtoday.com/license-proxy-widevine/cenc/")}},aT=class extends _h{yO(){const t=super.yO(),i=this.LO.token;return t.set("Authorization","Bearer "+i),t}constructor(t,i,e){super(t,i,e,dm.PS)}};async function uT(t,i,e,s){if(!Xg(t))throw new Or(td.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Xstream DRM Configuration");const n=new gs;n.append("Cache-Control","no-cache"),n.append("Content-Type","application/json");const r=t.sessionId;r&&n.append("XSSESSION",r);const h=t.streamId;let o;o=t.fairplay?"persistent"===t.fairplay.licenseType?"persistent":"non-persistent":t.widevine&&"persistent"===t.widevine.licenseType?"persistent":"non-persistent";const a={drmType:i,licenseType:o,streamId:h},u={zu:t.ticketAcquisitionURL,aI:dm.RS,hI:n,oI:G.POST,rI:JSON.stringify(a),Hd:s},c=await e.MS(u);return await c.QO()}var cT=class extends _h{yO(){const t=super.yO();return t.set("Content-Type","application/json"),t}async SO(t,i){const e=P_(t.buffer),s=this.LO,n=await uT(s,"widevine_modular",this.uO,i);this.aO(n.licenseServerUrl);const r=fu(JSON.stringify({payload:e,ticket:n.ticket}));return super.SO(r,i)}IO(t){return Ae(t.license)}constructor(t,i,e){super(t,i,e,dm.RS)}},dT=class extends _h{yO(){if(!Yn(this.LO))throw new Or(td.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Axinom configuration");const t=super.yO();return t.set("X-AxDRM-Message",this.LO.token),t}constructor(t,i,e){super(t,i,e,dm.PS)}};function lT(t){const i=new j(2*t.length);for(let e=0;e<t.length;e+=1)i[2*e]=t.charCodeAt(e),i[2*e+1]=0;return i}var Nh=class extends yn{CO(t){return t.playready||{}}yO(){const t=new gs(this.XO);return t.YS(super.yO()),t}ZO(t){return t.length>=1&&t[0]._S.length>0}wO(t){const i=this.LO.playready.customData;if(i){const t=lT(i),e=lT('<PlayReadyCDMData type="LicenseAcquisition"><LicenseAcquisition version="1.0" Proactive="false"><CustomData encoding="base64encoded">'+jc(t)+"</CustomData></LicenseAcquisition></PlayReadyCDMData>");return Promise.resolve({playready:{XC:e}})}return super.wO(t)}async SO(t,i){const e=await qM(t);return this.KO(e)}async KO(t){var e,s;let n=null;const r=gu(new DataView(t),new Ha,!0);let h;try{h=i.cS(r)}catch(t){return n}const o=null==(e=h.oS("PlayReadyKeyMessage")[0])?void 0:e.oS("LicenseAcquisition")[0];var a;const u=null!=(a=null==o?void 0:o.oS("Challenge"))?a:[];this.ZO(u)&&(n=za(u[0].JO));const c=new gs;var d;const l=null!=(d=null==o||null==(s=o.oS("HttpHeaders")[0])?void 0:s.oS("HttpHeader"))?d:[];for(const t of l){const i=t.oS("name")[0].JO,e=t.oS("value")[0].JO;c.append(i,e)}return this.XO=c,n}xO(t,i){return Promise.resolve(t)}OO(t,i){return super.EO(t,aa.$S,i)}constructor(t,i,e){super(or,t,i,e,dm.PS),this.XO=void 0}},fT=class t{static $O(t){return"3"===t.version?uc.zO:uc.jO}tj(){const t={};if(this.Yk===uc.zO){const i={LatensRegistration:ZM(this.ij,uc.zO)};t["X-TITANIUM-DRM-CDATA"]=$a(JSON.stringify(i))}return t}get ej(){return this.Yk}get FC(){return this.Yk===uc.jO}constructor(i){this.ij=i,this.Yk=t.$O(i)}};var _T=class extends Nh{wO(t){const i=this.LO;if(!this.LO)throw new Or(td.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium PlayReady DRM configuration.");if(Hg(i)){const t={};return t.playready={XC:gT(i,this.sj.ej)},Promise.resolve(t)}return Promise.reject(KM(i,uc.PA))}yO(){const t=new gs(this.sj.tj());return t.YS(super.yO()),t}async pO(t,e,s){const n=t.NS;if(!n)throw new Or(td.CONTENT_PROTECTION_LICENSE_ERROR,"Error during Titanium PlayReady license request",t,e);let r,h;try{const t=await n.nj(s),e=$s(new j(t)),a=i.cS(e);if(a){const t=function(t,i){return function(t,i){const e=t.m.slice(),s=[];for(;e.length>0;){const t=e.shift();i(t)?s.push(t):e.push(...t.m)}return s}(t,(t=>t.rj===i))}(a,"CustomData");var o;if(t.length>0)r=JSON.parse(t[0].JO),h=null==(o=r.DrmErr)?void 0:o.desc}}catch(t){}throw new Or(td.CONTENT_PROTECTION_LICENSE_ERROR,"Error during Titanium PlayReady license request",t,e,n.SS,n.FO,h)}ZO(t){if(1!==t.length)throw new Or(td.CONTENT_PROTECTION_INITIALIZATION_INVALID,"PlayReady license message incorrectly formatted, Challenge not found.");return!0}constructor(t,i,e){super(t,i,e),this.sj=new fT(this.LO)}};function gT(t,i){const e=ZM(t,i),s=e.DeviceInfo.FormatVersion,n=function(t){return t.replace(/</g,"<").replace(/>/g,">")}(function(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}("<TitaniumCustomData>"+$a('<LatensRegistration formatversion="'+s+'"><AccountName>'+e.AccountName+"</AccountName><CustomerName>"+e.CustomerName+"</CustomerName><PortalID>"+e.PortalId+'</PortalID><DeviceInfo formatversion="'+s+'"><DeviceType>'+e.DeviceInfo.DeviceType+"</DeviceType><OSType>"+e.DeviceInfo.OSType+"</OSType><OSVersion>"+e.DeviceInfo.OSVersion+"</OSVersion><DRMProvider>"+e.DeviceInfo.DRMProvider+"</DRMProvider><DRMVersion>"+e.DeviceInfo.DRMVersion+"</DRMVersion><DRMType>"+e.DeviceInfo.DRMType+"</DRMType><DeviceVendor>"+e.DeviceInfo.DeviceVendor+"</DeviceVendor><DeviceModel>"+e.DeviceInfo.DeviceModel+"</DeviceModel></DeviceInfo></LatensRegistration>")+"</TitaniumCustomData>")),r=Ng(n,!0);return Ng('<PlayReadyCDMData type="LicenseAcquisition"><LicenseAcquisition version="1.0"><CustomData encoding="base64encoded">'+jc(r)+"</CustomData></LicenseAcquisition></PlayReadyCDMData>",!0)}var wT,AT=class extends Nh{get qO(){if(qg(this.LO))return this.LO.token}ZO(t){if(1!==t.length)throw new Or(td.CONTENT_PROTECTION_INITIALIZATION_INVALID,"Vudrm PlayReady license message incorrectly formatted, Challenge not found.");return!0}MO(t,i){const e=Tt({},t||{},{token:this.qO});return super.MO(e,i)}constructor(t,i,e){super(t,i,e),this.aO("https://playready-license.drm.technology/rightsmanager.asmx")}},vT=class extends Nh{MO(t,i){let e=t;return Yg(this.LO)&&(e=eT(this.LO,e)),super.MO(e,i)}constructor(t,i,e){super(t,i,e),this.aO("https://emeademo.dev.ott.irdeto.com/playready/rightsmanager.asmx")}},mT=class extends Nh{yO(){const t=super.yO();return nt(this.LO,"PlayReady",t)}constructor(t,i,e){super(t,i,e),this.aO("https://connect.conax.com:8010/cxplayready/rightsmanager.asmx")}},pT=class extends Nh{get qO(){return kt(this.LO)}IO(t){const i=function(t){const i=$s(new j(t));return D(i,"<?xml")?0:1}(t);return 1===i?hT(t):super.IO(new j(t))}yO(){return st(super.yO(),this.qO,this.LO)}constructor(t,i,e){super(t,i,e),this.aO("https://lic.drmtoday.com/license-proxy-headerauth/drmtoday/RightsManager.asmx")}};!function(t){t[t.hj=0]="hj",t[t.QO=1]="QO"}(wT||(wT={}));var Jh,yT=class extends Nh{yO(){const t=super.yO();return this.aj&&t.set("Ticket",this.aj),t.set("Content-Type","text/xml"),t}async SO(t,i){const e=this.LO,s=await uT(e,"playready",this.uO,i);return this.aO(s.licenseServerUrl),this.aj=s.ticket,super.SO(t,i)}constructor(t,i,e){super(t,i,e)}},MT=class extends Nh{yO(){if(!Yn(this.LO))throw new Or(td.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Axinom configuration");const t=super.yO();return t.set("X-AxDRM-Message",this.LO.token),t}};!function(t){t.RS="application/json",t.uj="application/x-www-form-urlencoded",t.cj="application/octet-stream",t.Ru="text/plain;charset=UTF-8"}(Jh||(Jh={}));var A=class extends yn{get _O(){return!0}dj(){return this.lO.certificateURL||this.lj}_j(t){this.lj=t}SO(t){return Promise.resolve(this.gj(t,this.wj))}gj(t,i){return"spc="+encodeURIComponent(jc(t))+"&assetId="+encodeURIComponent(i)}get Aj(){return Jh.uj}CO(t){return t.fairplay||{}}vj(t){const i=t.indexOf("?");if(i>=0)return Promise.resolve(t.substr(i+1));{const i=t.split("skd://").pop();if(i){if(/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/.test(i))return Promise.resolve(i)}const e=t.split("/");return Promise.resolve(e[e.length-1])}}async wO(t){var i;const e=null!=(i=this.mj)?i:$e(new j(t)),s=await this.vj(e);this.wj=s;const n={};return n.fairplay={hx:s},n}yO(){const t=super.yO();return t.set("Content-Type",this.Aj),t}async xO(t,i){return this.dO?this.dO:await this.pj(i)}OO(t,i){return super.EO(t,aa.XS,i)}yj(t){const i=this.dj(),e=this.yO(),s={zu:i,aI:dm.PS,hI:e,oI:G.GET,lI:!1,rI:null,IS:0,Hd:t,Rg:N.HS,cI:aa.ZS};return new Pc(s)}async pj(t){const i=this.yj(t),e=await this.uO.MS(i),s=await e.nj();return new j(s)}IO(t){let i;if("string"==typeof t){let e=t.trim();"<ckc>"===e.substr(0,5)&&"</ckc>"===e.substr(-6)&&(e=e.slice(5,-6)),i=Ae(e)}else i=new j(t);return i}MO(t,i){let e=super.MO(t,i);return D(e,"skd:")&&(e=e.substr(4)),e}constructor(t,i,e,s,n){super(t.ZA,i,e,s,n),this.wj="",this.lj=void 0,this.mj=t.Mj}};function TT(t){return!S(t.getTime())}function fa(){return Date.now()||(new Date).getTime()}function NT(t){return t/1e3}function Jt(t){return 1e3*t}var al=1/6,DT=Ce.fromNumber(Da);function ku(t,i){if(0===i)return t.isZero()?NaN:t.isNegative()?-1/0:1/0;if(t.lessThanOrEqual(DT))return t.toNumber()/i;const e=t.divide(i),s=t.subtract(e.multiply(i));return e.toNumber()+s.toNumber()/i}var ST=class extends A{get Aj(){return Jh.cj}vj(t){let i=t.split("://",1);return"skd"!==i[0].slice(-3).toLowerCase()?Promise.resolve(""):(i=t.split(";",2),i.length>1?Promise.resolve(i[1]):Promise.resolve(super.vj(t)))}async SO(t){return t}IO(t){return new j(t)}MO(t,i){const e=t||{};return e.p1=fa(),super.MO(e,i)}constructor(t,i,e,s){super(t,i,e,s,dm.PS)}},IT=class extends A{get Aj(){return Jh.RS}get qO(){if(!qg(this.LO))throw new Or(td.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Token is required for FairPlay VuDrm.");return this.LO.token}gj(t,i){const e={token:this.qO,contentId:i,payload:jc(t)};return JSON.stringify(e)}IO(t){return new j(t)}yO(){const t=super.yO();return t.set("x-vudrm-token",this.qO),t}constructor(t,i,e,s){super(t,i,e,s,dm.PS),this.aO("https://fairplay-license.drm.technology/license"),this._j("https://fairplay-license.drm.technology/certificate")}},ET="Verimatrix Fairplay license response incorrectly formatted. Invalid json.",bT="Verimatrix Fairplay license response incorrectly formatted. Ckc not found.",LT=class extends A{IO(t){const i=function(t){let i;try{i=JSON.parse(t).ckc}catch(t){throw new Or(td.CONTENT_PROTECTION_LICENSE_INVALID,ET)}if(!i)throw new Or(td.CONTENT_PROTECTION_LICENSE_ERROR,bT);return i}($s(new DataView(t)));return super.IO(i)}constructor(t,i,e,s){super(t,i,e,s,dm.PS)}};var kT=class extends A{get Aj(){return Jh.RS}async SO(t){const i=this.LO;if(!i)throw new Or(td.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Titanium Fairplay DRM configuration.");return JM(i,jc(t),uc.RA)}IO(t){try{let i;if(Qs(t)){const e=t.trim();i=JSON.parse(e)}else i=t;if(i.license){const t=za(i.license);return new j(t)}throw new Or(td.CONTENT_PROTECTION_LICENSE_ERROR,"No license received from the Titanium Fairplay license server")}catch(t){throw new Or(td.CONTENT_PROTECTION_LICENSE_INVALID,"Could not process the response from the Titanium Fairplay license server")}}pO(t,i,e){return $M(t,i,e)}constructor(t,i,e,s){super(t,i,e,s,dm.RS)}},CT=class extends A{dj(){const t=super.dj();if(!t)return t;const e=i.Dh(t),s=this.LO;return Yg(s)&&zf(e,{accountId:s.accountId,applicationId:s.applicationId||""}),e.href}vj(t){return Yg(this.LO)?Promise.resolve(this.LO.contentId):super.vj(t)}async SO(t){return t}IO(t){return new j(t)}get Aj(){return Jh.cj}MO(t,i){let e=t;return Yg(this.LO)&&(e=function(t,i){return Tt({},eT(t,i),{KeyId:t.keyId})}(this.LO,e)),super.MO(e,i)}constructor(t,i,e,s){super(t,i,e,s,dm.PS),this.aO("https://emeademo.dev.ott.irdeto.com/streaming/getckc"),this._j("https://emeademo.dev.ott.irdeto.com/streaming/getcertificate")}},xT=class extends A{yO(){const t=super.yO();return nt(this.LO,"FairPlay",t)}async pj(t){const i={zu:this.dj(),aI:dm.PS,hI:{},oI:G.GET,lI:!1,rI:null,IS:0,Hd:t,Rg:N.HS,cI:aa.ZS},e=await this.uO.MS(i),s=await e.nj();return new j(s)}async SO(t){return t}vj(t){const i=t.indexOf("?");if(0===t.indexOf("skd://")){let e;return e=i>=0?t.substring(6,i):t.substring(6),Promise.resolve(function(t){return $s(Ae(t))}(e))}return Promise.resolve("unknown")}IO(t){try{const i=JSON.parse(t);return new j(za(i.CkcMessage))}catch(t){throw new g("CFLRW-66")}}constructor(t,i,e,s){if(super(t,i,e,s,dm.Ru),!Fg(i))throw new Or(td.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Conax configuration");this.aO("https://connect.conax.com:8097/license")}},OT=class extends A{vj(t){return D(t,"skd://")?Promise.resolve(t.substring(6,40)):Promise.reject(new Or(td.CONTENT_PROTECTION_INITIALIZATION_INVALID,"Error while determining the KeyOS Content ID."))}gj(t,i){return"spc="+jc(t)+"&assetId="+i}constructor(t,i,e,s){super(t,i,e,s,dm.Ru),this.aO(jg[ge.RA])}},jT=class extends A{get qO(){return kt(this.LO)}gj(t,i){const e="spc="+encodeURIComponent(jc(t))+"&"+encodeURI(i);return"persistent"===this.lO.licenseType?e+"&offline=true":e}yO(){return st(super.yO(),this.qO,this.LO)}constructor(t,i,e,s){super(t,i,e,s,dm.Ru),this.aO("https://lic.drmtoday.com/license-server-fairplay/")}},zT=class extends A{vj(t){let e=t;return D(e,"skd:")&&(e="http:"+e.substring(4)),D(e,"http:")||D(e,"https:")?Promise.resolve(i.Dh(e).hostname):Promise.reject(new g("Could not parse ExpressPlay FairPlay content ID."))}async SO(t){return t}IO(t){return new j(t)}get Aj(){return Jh.cj}constructor(t,i,e,s){super(t,i,e,s,dm.PS)}},PT=class extends A{yO(){const t=super.yO(),i=this.LO.token;return t.set("Authorization","Bearer "+i),t}constructor(t,i,e,s){super(t,i,e,s,dm.Ru)}},BT=class extends A{async pj(t){const i=this.dj(),e=this.yO(),s={zu:i,aI:dm.RS,hI:e,oI:G.POST,Hd:t,Rg:N.HS,cI:aa.ZS},n=await this.uO.MS(s),r=await n.QO();return new j(Ae(r.certificate))}get Aj(){return Jh.RS}async OO(t,i,e){void 0===e&&(e=dm.Ru);const s=jc(t),n=this.LO,r=await uT(n,"fairplay",this.uO,i),h=fu(JSON.stringify({spc:s,ticket:r.ticket})),o={zu:this.fO(),aI:dm.RS,hI:this.yO(),oI:G.POST,rI:h,IS:0,Hd:i,Rg:N.HS,cI:aa.XS},a=await this.uO.MS(o);return Ae((await a.QO()).licence)}constructor(t,i,e,s){if(super(t,i,e,s,dm.RS),!Xg(i))throw new g("Invalid Xstream DRM configuration")}},RT=class extends A{gj(t,i){return jc(t)}IO(t){if(0===t.length)throw new Or(td.CONTENT_PROTECTION_LICENSE_ERROR,"Vimond license request error.");return super.IO(t)}yO(){const t=super.yO();return t.set("Content-Type","text/plain"),t}constructor(t,i,e,s){super(t,i,e,s,dm.Ru)}},UT=class extends A{get Aj(){return Jh.RS}gj(t,i){return t}IO(t){return new j(t)}yO(){if(!Yn(this.LO))throw new Or(td.CONTENT_PROTECTION_CONFIGURATION_INVALID,"Invalid Axinom configuration");const t=super.yO();return t.set("X-AxDRM-Message",this.LO.token),t}constructor(t,i,e,s){super(t,i,e,s,dm.PS)}},QT=class extends A{get Aj(){return Jh.Ru}gj(t,i){const e={spc:jc(t)};return JSON.stringify(e)}vj(t){const e=i.Dh(t);return this.Tj=t,e.searchParams.has("b")?Promise.resolve(e.searchParams.get("b")):Promise.reject(new Or(td.CONTENT_PROTECTION_INITIALIZATION_INVALID,"Error during license server request: Could not extract content id"))}MO(t,i){let e=this.fO();return!e&&this.Tj&&(e=this.Tj),e&&(e=e.replace("skd://","https://")),super.MO(t,i||e)}IO(t){try{let i;if(i=Qs(t)?JSON.parse(t.trim()):t,i.ckc)return Ae(i.ckc)}catch(t){throw new Or(td.CONTENT_PROTECTION_LICENSE_INVALID,"Could not process the response from the Uplynk Fairplay license server")}throw new Or(td.CONTENT_PROTECTION_LICENSE_ERROR,"No license received from the Uplynk Fairplay license server")}constructor(t,i,e,s){super(t,i,e,s,dm.RS),this.Tj=void 0}},eo=class{Nj(t){return this.Dj(t)}Sj(t,i){throw new b(i+" must be "+this.Ij+". (Received: "+t+")")}constructor(t,i){this.Dj=t,this.Ij=i}},sh=(new eo((function(t){return!0}),"any"),new eo(bd,"a number")),Ps=new eo(Qs,"a string"),FT=new eo(Sd,"a boolean"),ln=(new eo(Ed,"a date"),new eo(Sa,"undefined")),YT=new eo(Mo,"an object"),GT=new eo((function(t){return null===t}),"null");new eo((function(t){return null==t}),"null or undefined");function VT(t,i){throw new b(i+" has an incorrect type")}var WT=class{Nj(t){if(!Mo(t))return!1;for(const i of w.keys(this.Ej)){if(!this.Ej[i].Nj(t[i]))return!1}return!0}Sj(t,i){if(!Mo(t))throw new b(i+" must be an object.");for(const e of w.keys(this.Ej)){const s=this.Ej[e];if(!s.Nj(t[e]))return s.Sj(t[e],i+"."+String(e))}throw new b}constructor(t){this.Ej=t}};function Vr(t){return new WT(t)}function HT(t){return w.keys(t).map((i=>t[i]))}var qT=class{Nj(t){return ae(this.bj,t)}Sj(t,i){return VT(0,i)}constructor(t){this.bj=t}};function z(t){return new qT(t)}var XT=class{Nj(t){return this.Lj.some((i=>i.Nj(t)))}Sj(t,i){return VT(0,i)}constructor(t){this.Lj=t}};function ai(){for(var t=arguments.length,i=new Array(t),e=0;e<t;e++)i[e]=arguments[e];return new XT(i)}var ZT=class{Nj(t){return $(t)&&t.every((t=>this.Cj.Nj(t)))}Sj(t,i){if(!$(t))throw new b(i+" must be an array.");for(let e=0;e<t.length;e++){const s=t[e];this.Cj.Nj(s)||this.Cj.Sj(s,i+"["+e+"]")}return VT(0,i)}constructor(t){this.Cj=t}};function ht(t){return new ZT(t)}var KT=class{Nj(t){return Mo(t)&&w.keys(t).every((i=>this.Cj.Nj(t[i])))}Sj(t,i){if(!Mo(t))throw new b(i+" must be an object.");for(const e of w.keys(t))if(!this.Cj.Nj(t[e]))return this.Cj.Sj(t[e],i+"."+e);return VT(0,i)}constructor(t){this.Cj=t}};function mr(t){return new KT(t)}var JT=class{Nj(t){return this.Cj().Nj(t)}Sj(t,i){return this.Cj().Sj(t,i)}constructor(t){this.Cj=Ol(t)}};var $T=Vr({responseCode:sh,isException:FT,description:Ps,title:Ps,correlationId:Ps});async function tN(t,i,e,s,n){const r=function(t,i,e,s){const n={token:i.token,account:i.accountId,form:"json"},r=decodeURIComponent(Ra(e,n)),h=new gs({});h.append("Content-Type","application/json");const o=jc(t),a={getFairplayLicense:{releasePid:i.releasePid,spcMessage:o}};return{zu:r,aI:dm.Ru,hI:h,oI:G.POST,rI:JSON.stringify(a),Hd:s,Rg:N.HS,cI:aa.XS}}(t,i,e,n);return await async function(t,i){const e=await i.MS(t),s=await e.QO();if($T.Nj(s))throw new Or(td.CONTENT_PROTECTION_LICENSE_ERROR,s.description,void 0,t.zu,s.responseCode);return Ae(s.getFairplayLicenseResponse.ckcResponse)}(r,s)}var iN=class extends A{vj(t){const i=t.replace("FairPlay",this.xj.releasePid);return super.vj(i)}async OO(t,i){return await tN(t,this.xj,this.fO(),this.uO,i)}constructor(t,i,e,s){super(t,i,e,s,dm.PS),this.xj=i}},eN=class extends yn{CO(t){return t.clearkey||{}}async AO(t,i,e,s){const n=this.lO;if(this.fO())return super.AO(t,this.bO,e,s);if(n.keys&&n.keys.length){const t={keys:n.keys.map((t=>{let i=t;return i||(i={}),{kty:"oct",kid:i.id,k:i.value}}))};return bu(JSON.stringify(t)).buffer}throw new Or(td.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The clearkey license has not been configured correctly.")}xO(t,i){return Promise.resolve(new j(0))}async OO(t,i){const e=await super.EO(t,aa.tI,i),s=JSON.parse($e(e));if(s.keys)for(const t of s.keys)t.k&&(t.k=x_(t.k)),t.kid&&(t.kid=x_(t.kid));return bu(JSON.stringify(s))}constructor(t,i,e){super(fr,t,i,e,dm.PS)}},sN=class extends _h{},nN={url:"",method:"GET",headers:{},body:null,useCredentials:!1};async function rN(t,i,e){const s=lN(i),n=t.onCertificateRequest;if(!n||"function"!=typeof n)return Promise.resolve(i);const r=await ji(Promise.resolve(n.call(t,s)),e);return Eg(r)?Oi(r):dN(Tt({},nN,r))}async function hN(t,i,e,s,n){const r=t.onCertificateResponse,h=cN(i,e,s);if(!r||"function"!=typeof r)return Promise.resolve(i);return Oi(await ji(Promise.resolve(r.call(t,h)),n))}async function oN(t,i,e,s){const n=await async function(t,i,e,s){const n=null==t?void 0:t.onLicenseRequest,r=uN(i,e);if(!n||"function"!=typeof n)return Promise.resolve(r);0;const h=await ji(Promise.resolve(n.call(t,r)),s);if(Eg(h))return Oi(h).buffer;return Tt({fairplaySkdUrl:void 0},nN,h)}(t,i,e,s);return n instanceof ArrayBuffer?n:dN(n)}async function aN(t,i,e,s,n,r){const h=uN(e,n),o=await async function(t,i,e,s,n){const r=null==t?void 0:t.onLicenseResponse,h=cN(i,e,s);if(!r||"function"!=typeof r)return Promise.resolve(i);0;const o=await ji(Promise.resolve(r.call(t,h)),n);return Oi(o)}(t,new j(i),h,s,r);return Oi(o)}function uN(t,i){return Tt({},lN(t),{fairplaySkdUrl:i})}function cN(t,i,e){return{url:e.yI,status:e.SS,statusText:e.FO,headers:e.hI.QS(),body:t,request:i}}function dN(t){return new Pc({zu:t.url,oI:t.method,hI:t.headers,rI:t.body,lI:t.useCredentials})}function lN(t){var i;return{url:t.zu,body:null!=(i=fN(t.rI))?i:null,headers:t.hI.QS(),method:t.oI,useCredentials:t.lI}}function fN(t){if(t)return"string"==typeof t?bu(t):t instanceof ArrayBuffer?new j(t):Ja(t)?$t(t):void 0}var _N=class extends Nh{xO(t,i){return Promise.resolve(t)}async OO(t,i){const e=await this.KO(_t(t).buffer),s=this.vO(e,dm.PS,aa.$S,i),n=await oN(this.Oj,s,void 0,i);if(n instanceof ArrayBuffer)return new j(n);if(""===n.zu)throw new Or(td.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The license request URL has not been correctly configured.");try{const t=await this.uO.MS(n),e=await t.nj(i);return await aN(this.Oj,e,s,t,void 0,i)}catch(t){throw Kc(t),new Or(td.CONTENT_PROTECTION_LICENSE_ERROR,"Error during PlayReady license request",t)}}constructor(t,i,e,s){super(t,i,e),this.Oj=s}},gN=class extends sN{async xO(t,i){if(this.dO)return this.dO;const e=this.vO(t,dm.PS,aa.JS,i),s=await rN(this.Oj,e,i);if(s instanceof j)return s;if(""===s.zu)throw new Or(td.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The certificate request URL has not been correctly configured.");let n,r;try{n=await this.uO.MS(s),r=await n.nj(i)}catch(t){throw Kc(t),new Or(td.CONTENT_PROTECTION_CERTIFICATE_ERROR,"Error during Widevine certificate request",t)}const h=uN(e,void 0);return await hN(this.Oj,new j(r),h,n,i)}async OO(t,i){const e=this.vO(t,dm.PS,aa.KS,i),s=await oN(this.Oj,e,void 0,i);if(s instanceof ArrayBuffer)return new j(s);if(""===s.zu)throw new Or(td.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The license request URL has not been correctly configured.");try{const t=await this.uO.MS(s),n=await t.nj(i);return await aN(this.Oj,n,e,t,void 0,i)}catch(t){throw Kc(t),new Or(td.CONTENT_PROTECTION_LICENSE_ERROR,"Error during Widevine license request",t)}}constructor(t,i,e,s){super(t,i,e,dm.PS),this.Oj=s}},wN=class extends A{async xO(t,i){if(this.dO)return this.dO;const e=this.yj(i),s=await rN(this.Oj,e,i);if(Ja(s))return s;try{const t=await this.uO.MS(s),n=await t.nj(),r=uN(e,void 0);return await hN(this.Oj,new j(n),r,t,i)}catch(t){throw Kc(t),new Or(td.CONTENT_PROTECTION_CERTIFICATE_ERROR,"Error during FairPlay certificate request",t)}}async OO(t,i){const e=this.vO(t,dm.PS,aa.XS,i),s=await oN(this.Oj,e,this.jj,i);if(s instanceof ArrayBuffer)return new j(s);if(""===s.zu)throw new Or(td.CONTENT_PROTECTION_CONFIGURATION_INVALID,"The license request URL has not been correctly configured.");try{const t=await this.uO.MS(s),n=await t.nj(i);return await aN(this.Oj,n,e,t,this.jj,i)}catch(t){throw Kc(t),new Or(td.CONTENT_PROTECTION_LICENSE_ERROR,"Error during FairPlay license request",t)}}vj(t){var i;return this.jj=t,(null==(i=this.Oj)?void 0:i.extractFairplayContentId)?Promise.resolve(this.Oj.extractFairplayContentId(t)):super.vj(t)}constructor(t,i,e,s,n){super(t,i,e,s,dm.PS),this.Oj=n}},AN=class{zj(t,i,e,s){switch(t.ZA.Rg){case ge.BA:return this.Pj(i,e,s);case ge.PA:return this.Bj(i,e,s);case ge.RA:return this.Rj(t,i,e,s);case ge.UA:default:return this.Uj(i,e,s)}}Pj(t,i,e){const s=function(t){return t.integration===r_&&Qs(t.customIntegrationId)}(t)?t.customIntegrationId:t.integration;if(s&&_u._v.ov(s,Ht)){const n=_u._v.fv(s,Ht,t);return new gN(t,i,e,n)}switch(s){case Hf:return new tT(t,i,e);case Zf:return new iT(t,i,e);case Dn:return new sT(t,i,e);case qf:return new rT(t,i,e);case $f:return new oT(t,i,e);case Hs:return new aT(t,i,e);case On:return new cT(t,i,e);case e_:return new dT(t,i,e);default:return new sN(t,i,e,dm.PS)}}Bj(t,i,e){const s=t.integration;if(s&&_u._v.ov(s,Xs)){const n=_u._v.fv(s,Xs,t);return new _N(t,i,e,n)}switch(s){case Hf:return new _T(t,i,e);case Zf:return new AT(t,i,e);case Dn:return new vT(t,i,e);case qf:return new mT(t,i,e);case $f:return new pT(t,i,e);case On:return new yT(t,i,e);case e_:return new MT(t,i,e);default:return new Nh(t,i,e)}}Rj(t,i,e,s){const n=i.integration;if(n&&_u._v.ov(n,xa)){const r=_u._v.fv(n,xa,i);return new wN(t,i,e,s,r)}switch(n){case Xf:return new ST(t,i,e,s);case Zf:return new IT(t,i,e,s);case Kf:return new LT(t,i,e,s);case Hf:return new kT(t,i,e,s);case Dn:return new CT(t,i,e,s);case qf:return new xT(t,i,e,s);case Jf:return new OT(t,i,e,s);case $f:return new jT(t,i,e,s);case t_:return new zT(t,i,e,s);case Hs:return new PT(t,i,e,s);case On:return new BT(t,i,e,s);case i_:return new RT(t,i,e,s);case e_:return new UT(t,i,e,s);case s_:return new QT(t,i,e,s);case n_:return new iN(t,i,e,s);default:return new A(t,i,e,s,dm.Ru)}}Uj(t,i,e){return new eN(t,i,e)}Qj(t){return t.Rg===ge.PA||t.Rg===ge.BA||t.Rg===ge.RA||t.Rg===ge.UA}FC(t,i){var e;if(t.Rg!==ge.PA)return!1;if(Dd(null==(e=i.playready)?void 0:e.customData))return!0;const s=i.integration;return(!s||!_u._v.ov(s,xa))&&(s===Hf&&new fT(i).FC)}YO(t,i){if(t.Rg!==ge.BA)return;const e=i.integration;return e&&_u._v.ov(e,xa)?void 0:e===Hf?tT.YO():void 0}};var W,vN="default",mN="theoplayer-stored-network-info-v2",pN=25e5,xu=class{Fj(t){var e;const s=null==(e=i.Yj)?void 0:e.Pb(t);if(void 0===s)return;const n=JSON.parse(s);if(void 0!==n&&void 0!==n[this.Gj]){if(!this.Vj(n))return n[this.Gj].availableBandwidth;var r;null==(r=i.Yj)||r.Wj(t,JSON.stringify({}))}}Hj(){const t=this.Fj(mN);if(void 0!==t)return t;const i=this.Fj("theoplayer-stored-network-info");return i?8*i:void 0}Vj(t){const i=t[this.Gj].storedTimestamp;return!!i&&fa()-i>36e5}qj(t){this.Xj=t,this.Zj()}Kj(){var t;return null!=this.Xj||(this.Xj=null!=(t=this.Hj())?t:pN),this.Xj}constructor(){this.Gj=vN,this.Xj=void 0,this.Zj=Is((()=>{var t;const e={[this.Gj]:{availableBandwidth:this.Xj,storedTimestamp:fa()}};null==(t=i.Yj)||t.Wj(mN,JSON.stringify(e))}),1e4)}};xu.yb=new xu,function(t){t[t.Jj=0]="Jj",t[t.$j=1]="$j",t[t.tz=2]="tz",t[t.iz=3]="iz",t[t.ez=4]="ez",t[t.CA=5]="CA",t[t.sz=6]="sz",t[t.nz=7]="nz",t[t.zA=8]="zA",t[t.rz=9]="rz",t[t.oz=10]="oz"}(W||(W={}));var Qu=class{get cz(){return 0}get lz(){return 0}fz(t){}},yN=class{_z(t){this.ij=t}YO(t){const i=this.ij;if(void 0!==i)return this.gz.YO(t,i)}FC(t){const i=this.ij;return void 0!==i&&this.gz.FC(t,i)}wz(t){const i={ZA:t.ZA,Az:t.Az||[],vz:t.vz,Mj:t.Mj},e=this.gz.zj(i,this.ij||{},t.kO,this.mI);return i.vz&&e.aO(i.vz),new MN(e)}constructor(t,i=new AN){this.ij=void 0,this.mI=t,this.gz=i}},MN=class{gO(t){return this.mz.gO(t)}wO(t,i,e){return this.mz.wO(i,e)}_O(){return this.mz._O||void 0!==this.mz.dO}xO(t,i){return this.mz.xO(t,i)}OO(t,i,e){return i&&this.mz.aO(i),this.mz.OO(t,e)}Qd(){this.mz.gn()}constructor(t){this.mz=t}},zs=class extends me{pz(t){this.yz.push(t);for(const i of t.og)this.tt(i);this.Mz(t)}Tz(t){_s(this.yz,t),this.Nz(t);for(const i of t.og)this.Dz(i)||this.it(i)}Dz(t){for(const i of this.yz)if(i.dg(t))return!0;return!1}Mz(t){t.yn(Rl.L_,this.Sz),t.yn(Rl.C_,this.Iz)}Nz(t){t.fn(Rl.L_,this.Sz),t.fn(Rl.C_,this.Iz)}gn(){for(;this.yz.length>0;)this.Tz(this.yz[0]);super.gn()}fa(){return Ei(this)}constructor(t){super(),this.yz=[],this.Sz=t=>{this.tt(t.Lt)},this.Iz=t=>{const i=t.Lt;this.Dz(i)||this.it(i)};for(const i of t)this.pz(i)}};var TN,NN={forceSeekOffset:0,maximumOffset:0,maximumPlaybackRate:0,minimumOffset:0,minimumPlaybackRate:0,targetOffset:0},Ti=class{get va(){return null!=this.Xa||(this.Xa=function(t){return{get enabled(){return t.Rt},set enabled(i){t.Rt=Ks(i)},get monitoringLivePlayback(){return t.Ez},get currentLatency(){return t.cA},get currentConfiguration(){return function(t){if(void 0!==t)return{get minimumOffset(){return t.minimumOffset},get maximumOffset(){return t.maximumOffset},get targetOffset(){return t.targetOffset},get forceSeekOffset(){return t.forceSeekOffset},get minimumPlaybackRate(){return t.minimumPlaybackRate},get maximumPlaybackRate(){return t.maximumPlaybackRate}}}(t.wd)}}}(this)),this.Xa}get Rt(){var t,i;return null!=(i=this.Le)?i:Boolean(null==(t=this.bz)?void 0:t.Rt)}set Rt(t){this.Le=t,this.bz&&(this.bz.Rt=t)}get Ez(){var t,i;return null!=(i=null==(t=this.bz)?void 0:t.Ww)&&i}get cA(){var t;return null==(t=this.bz)?void 0:t.uA}get wd(){return this.bz?this.bz.Hw:NN}ka(t){this.bz=t,void 0!==this.Le&&(this.bz.Rt=this.Le)}tr(){this.bz=void 0,this.Le=!1}};function DN(){return TN||(TN=Qr&&Qr.document&&Qr.document.createElement("video")),TN}var SN=!(!Qr||!Qr.TextTrack),IN=class extends Ut{get cA(){}get Lz(){const t=this.sA.wf,i=this.Mf;return t.gr(i,.01)}get ht(){return this.oT}get wf(){return this.sA.wf.ks()}get vf(){return this.sA.vf}set vf(t){t&&this.sA.kz(t)}get bt(){return this.bc}get Mf(){return void 0!==this.Cz?this.Cz:this.sA.Mf}set Mf(t){this.xf&&(this.Cz=t),this.sA.Dm(t)}get ct(){return this.sA.ct}get Sf(){return this.sA.Sf}get lt(){return this.xz}get bf(){return this.Oz}get kf(){}get xf(){return this.sA.xf}get jf(){return Tt({},{dT:0,lT:0,fT:0,_T:0,gT:0,wT:{amountOfBufferedAudioSegments:0,amountOfBufferedVideoSegments:0}},this.sA.zf())}get Pf(){return this.sA.Pf}set Pf(t){this.sA.Pf=t}get Uf(){return!0}get Ff(){return this.sA.Ff}get Gf(){return this.sA.Gf}set Gf(t){this.sA.Gf=t}get Hf(){return this.sA.jz.played}get Xf(){return this.zz}set Xf(t){this.zz=t,this.Pz&&(this.Pz.Xf=t)}get Jf(){return this.sA.Jf}get t_(){return this.sA.t_.ks()}get e_(){return this.sA.e_}get Bz(){return this.sA.Bz}get nt(){return this.Dl}get rt(){return this.uT}get r_(){return this.sA.r_}get a_(){return this.sA.a_}get c_(){return this.sA.c_}set c_(t){this.sA.c_=t}get f_(){return this.Rz}get g_(){return this.sA.g_}set g_(t){this.sA.g_=t}get Uz(){return this.Qz}be(){this.sA.be()}ge(){this.sA.ge()}async ga(t,i,e){fo(e),this.bc=t;const s={Rg:I.Qx,Ug:t.src,Fz:t.type,Yz:this.Gz(t),Xf:this.zz,Vz:t.crossOrigin,Wz:i.metadata&&i.metadata.title};this.qz._z(t.contentProtection),this.Pz=await this.sA.$n(s),fo(e),i.textTracks&&this.Xz(i.textTracks),pm(this.nt)}Xz(t){for(let e of t)if(this.sA.Zz()&&fi.Ga&&SN&&!rm(e.kind,e.label)&&this.Kz(e)){var i;const t=null!=(i=e.kind)?i:hh.pm;this.sA.Jz(e.src,t,e.label,e.srclang,e.default)}else{if(void 0===e.src)continue;this.$z.gI(e)}}Kz(t){return!t.format||"webvtt"===t.format}async p_(){try{await this.sA.p_()}catch(t){}for(;!this.Lz;)await this.sA.df(Co.gw)}m_(){this.sA.m_()}M_(){return void 0!==this.sA.jz.webkitShowPlaybackTargetPicker}T_(){this.sA.jz.webkitShowPlaybackTargetPicker&&this.sA.jz.webkitShowPlaybackTargetPicker()}N_(){this.sA.jz.webkitShowPlaybackTargetPicker&&this.sA.jz.webkitShowPlaybackTargetPicker()}A_(){return this.sA.jz}w_(){return this.sA.ya}async tr(){this.bc=void 0,this.xz=void 0,this.Oz=void 0,this.Pz=void 0,await this.$z.tr(),this.sA.tP(),await this.sA.tr(),this.iP.tr(),this.Xf=this.zz,this.ht.tr(),this.rt.tr(),this.Cz=void 0}async gn(){await this.tr(),this.Vo(),this.eP(),this.sP(),this.iP.gn(),this.sA.nP=void 0,await this.hP.rP(this.sA),this.oT.gn(),this.uT.gn(),this.Dl.gn(),await this.$z.gn()}oP(){this.sA.yn(Co.jh,this.Ds),this.sA.yn(Co.Sh,this.Ds),this.sA.yn(Co.Iw,this.wc),this.sA.yn(Co.gw,this.Ds),this.sA.yn(Co.cw,this.Ds),this.sA.yn(Co.yw,this.Ds),this.sA.yn(Co.pw,this.aP),this.sA.yn(Co.Jg,this.Ds),this.sA.yn(Co.ww,this.Ds),this.sA.yn(Co.Ew,this.Ds),this.sA.yn(Co.Xg,this.Ds),this.sA.yn(Co.mw,this.uP),this.sA.yn(Zt.Rw,this.lA),this.sA.yn(ut.ha,this.cP),this.sA.yn(Co.Wg,this.Ds),this.sA.yn(Co.Vg,this.dP),this.sA.jz.addEventListener("webkitcurrentplaybacktargetiswirelesschanged",this.lP)}eP(){this.sA.fn(Co.jh,this.Ds),this.sA.fn(Co.Sh,this.Ds),this.sA.fn(Co.Iw,this.wc),this.sA.fn(Co.gw,this.Ds),this.sA.fn(Co.cw,this.Ds),this.sA.fn(Co.yw,this.Ds),this.sA.fn(Co.pw,this.aP),this.sA.fn(Co.Jg,this.Ds),this.sA.fn(Co.ww,this.Ds),this.sA.fn(Co.Ew,this.Ds),this.sA.fn(Co.Xg,this.Ds),this.sA.fn(Co.mw,this.uP),this.sA.fn(Zt.Rw,this.lA),this.sA.fn(ut.ha,this.cP),this.sA.fn(Co.Wg,this.Ds),this.sA.fn(Co.Vg,this.dP),this.sA.jz.removeEventListener("webkitcurrentplaybacktargetiswirelesschanged",this.lP)}Gz(t){if(!t.contentProtection||!t.contentProtection.fairplay)return[];return[{ZA:on,fP:[{initDataTypes:[on.Tb],videoCapabilities:[{contentType:"video/mp4",encryptionScheme:"cbcs"}]}]}]}_P(){let t=this.sA.jz.audioTracks,i=this.sA.jz.videoTracks;t&&(t.addEventListener("addtrack",this.gP),t.addEventListener("removetrack",this.wP),t.addEventListener("change",this.AP)),i&&(i.addEventListener("addtrack",this.vP),i.addEventListener("removetrack",this.mP),i.addEventListener("change",this.pP))}sP(){let t=this.sA.jz.audioTracks,i=this.sA.jz.videoTracks;t&&(t.removeEventListener("addtrack",this.gP),t.removeEventListener("removetrack",this.wP),t.removeEventListener("change",this.AP)),i&&(i.removeEventListener("addtrack",this.vP),i.removeEventListener("removetrack",this.mP),i.removeEventListener("change",this.pP))}nh(t){for(let i=0;i<t.U;i++){t.cg(i).CT()}}D_(){this.sA.D_()}S_(){}yP(t,i){this.xz||(this.xz=i,this.Oz=t,this.Co(new fh(t)))}constructor(t,i,e,s,n,r,h=new AN,o=K()){super(),this.Pz=void 0,this.bc=void 0,this.xz=void 0,this.Oz=void 0,this.Qz=new Qu,this.Rz=new Ti,this.cP=t=>{const i=t.lt,e=i.code,s=new $i(Ww(e),"Something went wrong during native playback.",i),n=new wc(e,s.message,i.message);this.yP(s,n)},this.wc=()=>{this.Co(new Dr(this.Mf,this.vf))},this.aP=t=>{this.Ff||(this.Cz=void 0),this.Co(t)},this.lA=t=>{this.Cz=void 0},this.lP=()=>{this.Co(new hA(this.xf))},this.uP=()=>{this.a_>0&&this.r_>0&&this.Co(new tc)},this.gP=t=>{this.oT.tt(new eA(t.track))},this.wP=t=>{const i=LN(this.oT,t.track);i&&this.oT.it(i)},this.AP=()=>{this.nh(this.oT)},this.vP=t=>{this.uT.tt(new rA(t.track))},this.mP=t=>{const i=LN(this.uT,t.track);i&&this.uT.it(i)},this.pP=()=>{this.nh(this.uT)},this.dP=t=>{this.Co(t),this.yP(t.errorObject,Zr(t.errorObject))},this.hP=i,this.mI=e,this.BC=o,this.sA=this.hP.MP(f.Am),this.zz=this.sA.jz.preload,this.iP=new Gu(this.sA,!0),this.iP.yn(Wn,this.Ds),this.qz=new yN(e,h),this.sA.nP=this.qz,this.oP(),this.oT=new Ur,this.uT=new Ur,this._P(),this.$z=new Tu(this.sA,this.mI),this.Dl=new zs([this.sA.nt]),this.ge()}};function EN(t){return!t.type||!(!DN().canPlayType||!DN().canPlayType(t.type))}var bN=class{JA(t,i,e,s,n,r,h){return new IN(t,i,e,s,n,r)}TP(t,i){return EN(t)}NP(){return!1}constructor(){this.DP=W.oz}};function LN(t,i){for(let e of t.og)if(e.LT===i)return e}var kN=class{static SP(){return this.yb}IP(t){this.EP.push(t)}get DP(){return this.bP.DP}JA(t,i,e,s,n,r,h){let o=this.bP.JA(t,i,e,s,n,r,h);for(const t of this.EP)o=t(o,e,s);return o}TP(t,i){return this.bP.TP(t,i)}NP(){return!1}constructor(){this.bP=new bN,this.EP=[]}};function CN(t,i){return Ta(t.DP,i.DP)}kN.yb=new kN;var xN=class{LP(t){this.kP.push(t),this.kP.sort(CN)}async CP(t,i){for(const e of this.kP){const s=e.TP(t,i);if(Id(s)?await s:Boolean(s))return e}}constructor(){this.kP=[]}};function ON(t){so.yb.LP(t)}var so=class extends xN{xP(t){this.OP=t}jP(){return this.OP}async zP(t,i){for(let e of t){let t=await this.CP(e,i);if(t)return{yc:e,t:t}}const e=this.OP;for(let s of t)if(e.TP(s,i))return{yc:s,t:e};return{yc:t[0],t:e}}constructor(...t){super(...t),this.OP=kN.SP()}};so.yb=new so;var pt,jN=class{gn(){hs(this.Us)}constructor(t){this.Us=Qr&&Qr.document&&Qr.document.createElement("div"),ca(this.Us),t.appendChild(this.Us)}};!function(t){t.oz="",t.PP="none",t.Mm="metadata",t.ZM="auto"}(pt||(pt={}));var zN=[ut.ha,Co.Zg,Co.Kg,Co.xw,Co.Qg,Co.$g,Co.ew,Co.fw,Co._w,Co.Tw,Co.Dw,Zt.Ow,Zt.jw,Zt.zw,Zt.Pw,Zt.H_,Zt.Bw,Zt.Rw,Co.Vg,Co.Wg,Co.Xg,Co.Jg,Co.cw,Co.dw,Co.jh,Co.gw,Co.Sh,Co.ww,Co.mw,Co.yw,Co.pw,Co.Iw,Co.Ew,Co.Aw,Co.lw,Co.Mw],PN=class extends Ut{get ht(){return this.oT}get wf(){return this.Qo.wf}get lt(){return this.Qo.lt}get bf(){return this.Qo.bf}get vf(){return this.Qo.vf}set vf(t){this.Qo.vf=t}get bt(){return this.BP}get Mf(){return this.Qo.Mf}set Mf(t){this.Qo.Mf=t}get ct(){return this.Qo.ct}get Sf(){return this.Qo.Sf}get kf(){return this.aT}get xf(){return this.Qo.xf}get jf(){return this.Qo.jf}get Pf(){return this.Qo.Pf}set Pf(t){this.Qo.Pf=t}get Uf(){return this.Qo.Uf}get Ff(){return this.Qo.Ff}get Gf(){return this.Qo.Gf}set Gf(t){this.Qo.Gf=t}get Hf(){return this.Qo.Hf}get Xf(){return this.zz}set Xf(t){this.zz=t,this.Qo&&(this.Qo.Xf=this.zz)}get Jf(){return this.Qo.Jf}get t_(){return this.Qo.t_}get e_(){return this.Qo.e_}get nt(){return this.Dl}get r_(){return this.Qo.r_}get rt(){return this.uT}get a_(){return this.Qo.a_}get c_(){return this.Qo.c_}set c_(t){this.Qo.c_=t}get f_(){return this.Qo.f_}get Uz(){return this.Qo.Uz}m_(){this.Qo.m_()}p_(){const t=this.Qo.p_();Id(t)&&Ys(t)}y_(){return this.ga(void 0)}v_(){}RP(){this.oT.fg=this.Qo.ht,this.uT.fg=this.Qo.rt,this.Dl.fg=this.Qo.nt,this.aT.fg=this.Qo.kf,this.Qo.yn(zN,this.Ds)}UP(){this.Qo.fn(zN,this.Ds),this.oT.fg=void 0,this.uT.fg=void 0,this.Dl.fg=void 0,this.aT.fg=void 0}Wa(){return this.QP}async ga(t,i){if(fo(i),this.QP=t,!t)return;const e=t.sources.filter(Cw);if(Ft(e))return;const s=await this.FP.zP(e,t);fo(i);const n=s.yc,r=s.t,h=this.w_(),o=Uw(this);(this.YP!==r||this.lt)&&(this.UP(),await this.Qo.gn(),fo(i),this.YP=r,this.Qo=this.GP(r,n),function(t,i){t.Pf!==i.Pf&&(t.Pf=i.Pf);t.c_!==i.c_&&(t.c_=i.c_);t.Gf!==i.Gf&&(t.Gf=i.Gf)}(this.Qo,o),ru(this,o,this),this.RP()),this.Qo.Xf=this.Xf,this.VP?this.Qo.ge():this.Qo.be(),await this.Qo.ga(n,t,i),fo(i),this.WP(n),this.w_()!==h&&this.Co(new Mu)}WP(t){this.BP!==t&&(this.BP=t,this.Co(new zt(t)))}M_(){return this.Qo.M_()}T_(){this.Qo.T_()}N_(){this.Qo.N_()}w_(){return this.Qo.w_()}D_(){this.Qo.D_()}S_(){this.Qo.S_()}async tr(){this.QP=void 0,this.WP(void 0),await this.Qo.tr()}async gn(){this.Vo(),await this.tr(),await this.Qo.gn(),this.oT.gn(),this.uT.gn(),this.Dl.gn(),this.aT.gn()}ge(){this.VP=!0,this.Qo.ge()}be(){this.VP=!1,this.Qo.be()}constructor(t,i){super(),this.YP=void 0,this.BP=void 0,this.zz=pt.PP,this.QP=void 0,this.VP=!0,this.oT=new ta,this.uT=new ta,this.Dl=new lc,this.aT=new Ia,this.FP=t,this.Qo=i,this.Qo.Xf=this.Xf,this.RP()}};function BN(t,i,e){return e?t<=i:t<i}var ye,ce=class t{get HP(){return this.qP.slice()}Cn(t){return this.qP[2*t]}jn(t){return this.qP[2*t+1]}XP(t){return this.ZP[2*t]}KP(t){return this.ZP[2*t+1]}ks(){const t=this;return{get length(){return t.U},start(i){const e=0|i;return t.JP(e),t.Cn(e)},end(i){const e=0|i;return t.JP(e),t.jn(e)}}}$P(){const i=new Array(2*this.U),e=new Array(2*this.U);for(let t=0;t<this.U;t++)i[2*t]=this.Cn(t),i[2*t+1]=this.jn(t),e[2*t]=!0,e[2*t+1]=!0;return new t(i,e)}JP(t){if(t<0)throw new g("The index provided ("+t+") must be non-negative");if(t>=this.U)throw new g("The index provided ("+t+") is greater than the maximum bound ("+this.U+")")}tB(t){if(0===this.U)return 0;if(this.gr(t))return t;if(t<=this.Cn(0))return this.Cn(0);if(t>=this.jn(this.U-1))return this.jn(this.U-1);{let i=0,e=1/0;for(let s=0;s<this.U;s++){const n=this.Cn(s),r=_.abs(n-t);r<e&&(i=n,e=r);const h=this.jn(s),o=_.abs(h-t);o<e&&(i=h,e=o)}return i}}Sn(i){let e=0,s=0;const n=[],r=[];for(;e<this.U&&s<i.U;){const t=this.Cn(e),h=this.jn(e),o=this.XP(e),a=this.KP(e),u=i.Cn(s),c=i.jn(s),d=i.XP(s),l=i.KP(s),f=_.max(t,u),g=_.min(h,c);let w,A;w=t===u?o&&d:f===t?o:d,A=h===c?a&&l:g===h?a:l,(f<g||w&&A&&f===g)&&(n.push(f,g),r.push(w,A)),h===c?(e+=1,s+=1):h<c?e+=1:s+=1}return new t(n,r)}iB(){const i=this.eB(),e=i.U;if(0===e)return new t([-1/0,1/0],[!1,!1]);const s=[],n=[],r=i.Cn(0);r!==-1/0&&(s.push(-1/0,r),n.push(!1,!i.XP(0)));for(let t=0;t<e-1;t++)s.push(i.jn(t),i.Cn(t+1)),n.push(!i.KP(t),!i.XP(t+1));const h=i.jn(e-1);return h!==1/0&&(s.push(h,1/0),n.push(!i.KP(e-1),!1)),new t(s,n)}sB(i){let e=0,s=0;const n=this.U,r=i.U,h=new Array(2*(n+r)),o=new Array(2*(n+r));let a=0;for(;e<n&&s<r;){const t=this.Cn(e),n=this.jn(e),r=i.Cn(s),u=i.jn(s);t<r||t===r&&n<u?(h[a]=t,h[a+1]=n,o[a]=this.XP(e),o[a+1]=this.KP(e),e++):(h[a]=r,h[a+1]=u,o[a]=i.XP(s),o[a+1]=i.KP(s),s++),a+=2}for(;e<n;)h[a]=this.Cn(e),h[a+1]=this.jn(e),o[a]=this.XP(e),o[a+1]=this.KP(e),e++,a+=2;for(;s<r;)h[a]=i.Cn(s),h[a+1]=i.jn(s),o[a]=i.XP(s),o[a+1]=i.KP(s),s++,a+=2;return new t(h,o)}nB(i){void 0===i&&(i=0);const e=this.U;if(e<2)return this;const s=[],n=[];let r=this.Cn(0),h=this.jn(0),o=this.XP(0),a=this.KP(0);for(let t=1;t<e;t++){const e=this.Cn(t),u=this.jn(t);let c=this.XP(t),d=this.KP(t);r<e&&h>u||(r===e&&(c=o||c,o=c),h===u&&(d=a||d,a=d),BN(e,h+i,a||c)?(h=u,a=d):(s.push(r,h),n.push(o,a),r=e,h=u,o=c,a=d))}return s.push(r,h),n.push(o,a),new t(s,n).eB()}eB(){const i=[],e=[];for(let t=0;t<this.U;t++){const s=this.Cn(t),n=this.jn(t),r=this.XP(t),h=this.KP(t);s===n?(r||h)&&(i.push(s,n),e.push(!0,!0)):(i.push(s,n),e.push(r,h))}return new t(i,e)}rB(t){if(0===this.U)return t;if(0===t.U)return this;return this.sB(t).nB()}hB(t){const i=this.eB(),e=t.eB(),s=i.iB(),n=e.iB(),r=s.Sn(e),h=n.Sn(i);return r.rB(h)}Nm(i){if(0===this.U||0===i)return this;const e=[],s=[];for(let t=0;t<this.U;t++){const n=this.Cn(t)+i,r=this.jn(t)+i;e.push(n,r),s.push(this.XP(t),this.KP(t))}return new t(e,s)}oB(t){return 0===this.U||0===t.U?this:this.eB().Sn(t.eB().iB())}gr(t,i){return this.aB(t,i)>=0}uB(t,i,e,s,n){return this.cB(t,i,e,s,n)>=0}dB(t,i,e,s,n){return this.lB(t,i,e,s,n)>=0}fB(t){if(t.U!==this.U)return!1;for(let i=0;i<this.U;i++)if(this.Cn(i)!==t.Cn(i)||this.jn(i)!==t.jn(i)||this.XP(i)!==t.XP(i)||this.KP(i)!==t.KP(i))return!1;return!0}_B(i){const e=[],s=[];for(let t=0;t<this.U;t++){const n=this.Cn(t),r=this.jn(t),h=this.XP(t),o=this.KP(t);i(n,r,h,o)&&(e.push(n,r),s.push(h,o))}return new t(e,s)}lB(t,i,e,s,n){void 0===e&&(e=!0),void 0===s&&(s=!0),void 0===n&&(n=0);const r=t-n,h=i+n;for(let t=0;t<this.U;t+=1)if(BN(this.Cn(t),h,!s||this.XP(t))&&BN(r,this.jn(t),!e||this.KP(t)))return t;return-1}cB(t,i,e,s,n){void 0===e&&(e=!0),void 0===s&&(s=!1),void 0===n&&(n=0);const r=t+n,h=i-n;for(let t=0;t<this.U;t+=1)if(BN(this.Cn(t),r,!e||this.XP(t))&&BN(h,this.jn(t),!s||this.KP(t)))return t;return-1}aB(t,i){return this.cB(t,t,!0,!0,i)}gB(t,i){void 0===i&&(i=0);const e=t+i;for(let t=this.U-1;t>=0;t-=1)if(BN(this.Cn(t),e,this.XP(t)))return t;return-1}wB(t,i){void 0===i&&(i=0);const e=t-i;for(let t=0;t<this.U;t+=1)if(BN(e,this.jn(t),this.KP(t)))return t;return-1}AB(t,i){void 0===i&&(i=0);const e=t+i;for(let t=0;t<this.U;t+=1)if(this.Cn(t)>e)return t;return-1}vB(i){return this.JP(i),new t([this.Cn(i),this.jn(i)],[this.XP(i),this.KP(i)])}dA(t,i){const e=this.aB(t,i);return e<0?void 0:this.vB(e)}get mB(){let t=0;for(let i=0;i<this.U;i++){t+=this.jn(i)-this.Cn(i)}return t}static xn(i){const e=[];for(let t=0;t<i.length;t++)e.push(i.start(t),i.end(t));return new t(e)}static pB(i){return new t([i,i],[!0,!0])}static yB(i,e){return i<=e?new t([i,e]):t.MB()}static MB(){return RN}constructor(t,i){this.U=t.length>>1,this.qP=t,this.ZP=i||function(t){const i=new Array(2*t);for(let e=0,s=0;e<t;e+=1,s+=2)i[s]=!0,i[s+1]=!1;return i}(this.U)}},RN=new ce([]);!function(t){t.ra="fullscreenchange",t.ca="fullscreensupportchange",t.ha="fullscreenerror"}(ye||(ye={}));var UN=class extends Yi{constructor(){super(ye.ha)}},ma=(ye.ra,ye.ca,ye.ha,class extends Bo{get cs(){return!1}get ta(){return!1}mo(){this.Co(new UN)}So(){}gn(){this.Vo()}}),QN=class extends Bo{get vf(){}set vf(t){}get bt(){}get Mf(){return this.TB}set Mf(t){this.TB!==t&&(this.TB=t,this.NB=!0,this.Co(new lo(this.Mf)))}get jf(){return{dT:0,lT:0,fT:0,_T:0,gT:0,wT:{amountOfBufferedAudioSegments:0,amountOfBufferedVideoSegments:0}}}get Pf(){return this.DB}set Pf(t){this.DB!==t&&(this.DB=t,this.Co(new Tc(this.Mf,this.c_)))}get Ff(){return this.SB}get Gf(){return this.IB}set Gf(t){this.IB!==t&&(this.IB=t,this.Co(new Kn(this.Mf,this.Gf)))}get e_(){return this.NB}get c_(){return this.$L}set c_(t){this.$L!==t&&(this.$L=t,this.Co(new Tc(this.Mf,this.c_)))}get g_(){return!1}set g_(t){}get Uz(){return this.Qz}get cA(){}ge(){}be(){}p_(){this.SB&&(this.SB=!1,this.Co(new Qn(this.Mf)),this.Co(new qa(this.Mf)))}m_(){this.SB||(this.SB=!0,this.Co(new Dr(this.Mf,this.vf)),this.Co(new iu(this.Mf)))}ga(t,i){return Promise.resolve()}M_(){return!1}T_(){}N_(){}w_(){return this.EB}D_(){}S_(){}async tr(){this.TB=0,this.NB=!1,this.m_(),this.Co(new Ow(this.TB))}async gn(){this.Vo(),this.ht.gn(),this.nt.gn(),this.rt.gn()}constructor(...t){super(...t),this.TB=0,this.DB=!1,this.SB=!0,this.IB=1,this.NB=!1,this.$L=1,this.ht=new Ur,this.wf=ce.MB().ks(),this.ct=NaN,this.Sf=!1,this.lt=void 0,this.bf=void 0,this.kf=void 0,this.xf=!1,this.Uf=!0,this.Hf=ce.MB().ks(),this.Xf=pt.PP,this.Jf=oe.sT,this.t_=ce.MB().ks(),this.Bz=void 0,this.nt=new Zi,this.r_=0,this.rt=new Ur,this.a_=0,this.f_=new Ti,this.Qz=new Qu,this.EB=new ma}},FN=class extends QN{set bB(t){this.hP=t,this.sA=t.MP(f.Am)}A_(){var t;return null==(t=this.sA)?void 0:t.jz}async gn(){await super.gn(),this.sA&&(await this.hP.rP(this.sA),this.sA=void 0)}constructor(...t){super(...t),this.hP=void 0,this.sA=void 0}},YN=class extends PN{get we(){return this.pu}get g_(){return this.Qo.g_}set g_(t){this.Qo.g_=t}v_(){super.v_(),this.kB.LB()}ur(t){Qw(this,t)}ar(){}I_(t){return!1}async ga(t,i){const e=this.w_(),s=this.A_();await super.ga(t,i),this.w_()!==e&&this.Co(new Mu),this.A_()!==s&&this.Co(new Ci)}GP(t,i){return t.JA(this.pu,this.kB,this.mI,this.sx,this.CB,this.xB,this.OB,i)}A_(){return this.Qo.A_()}gf(){return this.kB.jB.map((t=>t.jz))}async gn(){await super.gn(),this.kB.gn(),this.zB.gn()}constructor(t,i,e,s,n,r,h){const o=new FN;super(so.yb,o),this.pu=t,this.sx=i,this.mI=e,this.CB=s,this.xB=n,this.OB=h,this.kB=new km(r,this.OB),this.kB.PB(this.pu),o.bB=this.kB,this.zB=new jN(this.pu)}},GN=class extends Ut{get ht(){return this.BB}get wf(){return ce.MB().ks()}get vf(){return new Date(NaN)}set vf(t){}get bt(){}get Mf(){return 0}set Mf(t){}get ct(){return 0}get we(){return this.pu}get Sf(){return!0}get lt(){return this.RB}get bf(){return this.UB}get kf(){}get jf(){return{dT:0,lT:0,fT:0,_T:0,gT:0,wT:{amountOfBufferedAudioSegments:0,amountOfBufferedVideoSegments:0}}}get Pf(){return!1}set Pf(t){}get Uf(){return!0}get Ff(){return!0}get Gf(){return 0}set Gf(t){}get Hf(){return ce.MB().ks()}get Xf(){return pt.PP}set Xf(t){}get Jf(){return oe.sT}get t_(){return ce.MB().ks()}get e_(){return!1}get nt(){return this.QB}get r_(){return 0}get rt(){return this.BB}get a_(){return 0}get c_(){return 1}set c_(t){}get f_(){return this.Rz}get g_(){return!1}set g_(t){}I_(t){return!0}be(){}p_(){throw this.Co(new fh(this.UB)),this.RB}m_(){}Wa(){}async ga(t,i){throw fo(i),this.Co(new fh(this.UB)),this.RB}ge(){}y_(){return Promise.resolve()}A_(){}w_(){return this.EB}gf(){return[]}v_(){}ur(t){}ar(){}get xf(){return!1}M_(){return!1}T_(){}N_(){}D_(){}S_(){}tr(){return Promise.resolve()}gn(){return this.Vo(),this.BB.gn(),this.QB.gn(),Promise.resolve()}constructor(t,i,e){super(),this.EB=new ma,this.Rz=new Ti,this.pu=t,this.RB=i,this.BB=new Ur,this.QB=new Zi,this.UB=e}};function VN(t){if(t&&Mo(t))return Tt({},t,{integration:WN(t.integration),fairplay:JN(t.fairplay),widevine:HN(t.widevine),playready:qN(t.playready),clearkey:$N(t.clearkey),aes128:tD(t.aes128),integrationParameters:iD(t.integrationParameters),preferredKeySystems:eD(t.preferredKeySystems)})}function WN(t){if(Qs(t))return t}function HN(t){if(t&&Mo(t))return{persistentState:XN(t.persistentState),distinctiveIdentifier:XN(t.distinctiveIdentifier),audioRobustness:ZN(t.audioRobustness),videoRobustness:ZN(t.videoRobustness),licenseAcquisitionURL:Qs(t.licenseAcquisitionURL)?t.licenseAcquisitionURL:void 0,licenseType:KN(t.licenseType),headers:t.headers,useCredentials:!!Sd(t.useCredentials)&&t.useCredentials,queryParameters:t.queryParameters,certificate:Qs(t.certificate)||Eg(t.certificate)?t.certificate:void 0}}function qN(t){if(!t)return;const i=HN(t);if(!i)return;return Tt({},i,{customData:Qs(t.customData)?t.customData:void 0})}function XN(t){switch(null==t?void 0:t.toLowerCase()){case"required":return"required";case"optional":return"optional";case"not-allowed":return"not-allowed"}}function ZN(t){switch(t){case"HW_SECURE_ALL":return"HW_SECURE_ALL";case"HW_SECURE_DECODE":return"HW_SECURE_DECODE";case"HW_SECURE_CRYPTO":return"HW_SECURE_CRYPTO";case"SW_SECURE_DECODE":return"SW_SECURE_DECODE";case"SW_SECURE_CRYPTO":return"SW_SECURE_CRYPTO";case"":return""}}function KN(t){switch(null==t?void 0:t.toLowerCase()){case"temporary":return"temporary";case"persistent":return"persistent"}}function JN(t){if(!t)return;const i=HN(t);if(!i)return;return Tt({},i,{certificateURL:Qs(t.certificateURL)?t.certificateURL:void 0})}function $N(t){if(!t)return;const i=HN(t);if(!i)return;const e=$(t.keys)?t.keys.map((t=>function(t){if(!t||!Mo(t))return;const i=t.id,e=t.value;if(!Qs(i)||!Qs(e))return;return{id:i,value:e}}(t))).filter(Dd):void 0;return Tt({},i,{keys:e})}function tD(t){if(Mo(t))return{useCredentials:Sd(t.useCredentials)?t.useCredentials:void 0}}function iD(t){if(Mo(t))return t}function eD(t){return t&&$(t)?t.map((t=>Li(t))).filter(Dd):[Ht,Xs,xa]}var sD=class extends Yi{constructor(t){super("presentationmodechange"),this.presentationMode=t}};function jt(t,i,e){return new Promise(((s,n)=>{if(e&&e.Bd)return n(new is);const r=t=>{o(),s(t)},h=()=>{o(),n(new is)},o=()=>{t.removeEventListener(i,r),e&&e.Gd(h)};t.addEventListener(i,r),e&&e.Yd(h)}))}var nD,rD=class extends Bo{Qa(t){for(const i of this.FB)t.yn(i,this.YB);this.GB.push(t)}VB(t){for(const i of this.FB)t.fn(i,this.YB);this.GB.push(t)}gn(){this.Vo();for(const t of this.GB)this.VB(t);No(this.GB)}constructor(t,i=!1,e){super(e),this.GB=[],this.WB=t=>{Ac((()=>{this.Ds(t)}))},this.FB=t,this.YB=i?this.WB:this.Ds}},Eu=class extends Ut{Qa(t){t.sf(this.HB),this.GB.push(t)}VB(t){t.cf(this.HB),_s(this.GB,t)}gn(){this.Vo();for(const t of this.GB)t.cf(this.HB);No(this.GB)}constructor(t,i=!1){super(t),this.GB=[],this.WB=t=>{Ac((()=>{this.Ds(t)}))},this.HB=i?this.WB:this.Ds}};!function(t){t.INLINE="inline",t.FULLSCREEN="fullscreen",t.PICTURE_IN_PICTURE="picture-in-picture"}(nD||(nD={}));var Os,hD=class extends Ut{get va(){return this.Xa||(this.Xa=this.fa()),this.Xa}fa(){return function(t){let i,e={get currentMode(){return t.qo()},requestMode(i){const e=aD(i);e&&t.Zo(e)},supportsMode(i){const e=aD(i);return!!e&&t.Go(e)},addEventListener(t,e){i.yn(t,e)},removeEventListener(t,e){i.fn(t,e)}};return i=new Eu(e,!0),i.Qa(t),e}(this)}Zo(t){this.Xo(t,t)}Xo(t,i){this.qB!==i&&(this.XB=!0,this.ZB=t,this.Jo(i,this.qB),"fullscreen"!==t&&(this.KB=t),this.XB=!1,this.Yr())}qo(){return this.JB?"fullscreen":"inline"}Go(t){switch(t){case"fullscreen":return this.EB.ta;case"inline":return!0}return!1}Yr(){if(this.XB)return;const t=this.qB,i=this.qo();this.qB=i,"fullscreen"!==i&&(this.$B=i),t!==i&&this.Co(new sD(i))}Jo(t,i){const e="fullscreen"===t;this.JB=e,e!==this.EB.cs&&(e?this.EB.mo():this.EB.So())}wi(){if(this.XB)return;const t=this.EB.cs;this.JB=t,t?this.Xo("fullscreen","fullscreen"):t||"fullscreen"!==this.ZB?this.Yr():this.Xo(this.KB,this.$B)}tR(){this.wi(),this.Co(new fh(new $i(td.FULLSCREEN_ERROR,"Failed to enter fullscreen.")))}gn(){this.EB.gn(),this.Vo()}constructor(t){super(),this.ZB="inline",this.qB="inline",this.XB=!1,this.JB=!1,this.KB="inline",this.$B="inline",this.Xa=void 0,this.iR=()=>this.wi(),this.eR=()=>this.tR(),this.EB=t,this.EB.yn(ye.ra,this.iR),this.EB.yn(ye.ha,this.eR),this.Yr()}},oD={bt:void 0,Mf:0,ct:NaN,Sf:!1,lt:void 0,bf:void 0,Pf:!1,Ff:!0,Gf:1,Jf:oe.sT,e_:!1,r_:0,a_:0,c_:1};function aD(t){switch(t){case nD.INLINE:case nD.FULLSCREEN:case nD.PICTURE_IN_PICTURE:return t;default:return}}!function(t){t.DEFAULT="",t.THEO="theo",t.CSAI="csai",t.GOOGLE_IMA="google-ima",t.SPOTX="spotx",t.FREEWHEEL="freewheel",t.MEDIATAILOR="mediatailor",t.THEOADS="theoads"}(Os||(Os={}));var sl,Ua,Vo,uD,cD,He=class{get sR(){return this.nR}rR(t){const i=this.nR.filter((i=>i.hR(t)));if(i.length>1)0;else if(0===i.length)throw g("Unknown ad integration: "+t.integration);return i[0]||null}oR(t){this.nR.push(t)}constructor(){this.nR=[]}};He.yb=new He,function(t){t.Rw="PLAYING",t.Qw="PAUSED",t.aR="SEEK",t.uR="STALLED",t.cR="FAILED",t.dR="INITIAL_BUFFERING",t.lR="NO_ACCESS"}(sl||(sl={})),function(t){t.fR="HTTP_REQUEST_STATUS_CODE_1XX",t._R="HTTP_REQUEST_STATUS_CODE_2XX",t.gR="HTTP_REQUEST_STATUS_CODE_3XX",t.wR="HTTP_REQUEST_STATUS_CODE_4XX",t.AR="HTTP_REQUEST_STATUS_CODE_5XX",t.vR="BUFFER_LENGTH",t.mR="BYTES_RECEIVED",t.pR="SEGMENT_READ_BITRATE",t.yR="SEGMENT_PROFILE_BITRATE",t.MR="VIDEO_PROFILE_BITRATE",t.NR="NUMBER_OF_FRAMES_DROPPED",t.DR="PLAYBACK_POSITION",t.SR="NUMBER_OF_FRAMES_DECODED",t.IR="PLAYBACK_DELTA_TO_ORIGIN",t.ER="STREAM_DELTA_TO_ORIGIN",t.bR="ORIGIN_TIMESTAMP"}(Ua||(Ua={})),function(t){t.LR="MANIFEST_URI",t.kR="ASSET_DURATION",t.xR="NUMBER_OF_CONTENT_PROFILES",t.OR="CDN",t.jR="CONTENT_TITLE",t.zR="SERVICE_NAME",t.PR="CONTENT_TYPE",t.RR="CONTENT_DESCRIPTION"}(Vo||(Vo={})),(uD||(uD={})).UR="shutdown_normal_shutdown",function(t){t.QR="session/",t.FR="content/",t.YR="internalError/",t.GR="drmError/",t.WR="caError/",t.HR="networkError/"}(cD||(cD={}));var dD,lD=class{get code(){return this.category+this.statusCode}constructor(t,i){this.category=t,this.statusCode=i}};!function(t){t.qR="userAction",t.XR="endOfStreamReached"}(dD||(dD={}));var fD,_D=class extends Bo{};!function(t){t.PAUSE="ZR",t.RESUME="KR"}(fD||(fD={}));var gD=class extends Yi{constructor(){super("JR")}},ic=class extends Bo{$R(){this.tU=!0}iU(){}gn(){this.tU=!1,this.eU.fn(fD.PAUSE,this.sU),this.eU.fn(fD.RESUME,this.nU)}rU(){return isFinite(this.Qo.Td())}constructor(t,i){super(),this.Qo=t,this.eU=i,this.tU=!1,this.sU=()=>{this.iU(),this.tU=!1},this.nU=()=>{this.tU=!0},this.eU.yn(fD.PAUSE,this.sU),this.eU.yn(fD.RESUME,this.nU)}},wD=class extends ic{$R(){super.$R(),this.hU()}gn(){this.oU(),super.gn()}hU(){this.Qo.yn(Zt.Bw,this.aU),this.Qo.yn(Co.Sh,this.uU),this.Qo.yn(Zt.Rw,this.cU),this.Qo.yn(Co.yw,this.dU),this.Qo.yn(Co.pw,this.lU)}oU(){this.Qo.fn(Zt.Bw,this.aU),this.Qo.fn(Co.Sh,this.uU),this.Qo.fn(Zt.Rw,this.cU),this.Qo.fn(Co.yw,this.dU),this.Qo.fn(Co.pw,this.lU)}fU(){this._U=!0}gU(){const t=this.Qo.Ef(),i=new lD(cD.YR,String(t.code));this.wU(sl.cR,i,t.message)}AU(t){this.tU&&(this.eU.vU(t),this.Co(new gD))}wU(t,i,e){this.eU.mU(t,i,e),this.Co(new gD)}pU(t,i){this.eU.yU(t,i)}constructor(...t){super(...t),this._U=!1,this.MU=!1,this.TU=!1,this.aU=()=>{this.MU&&!this.TU&&this.AU(sl.uR)},this.cU=()=>{this.Qo.Ff||(this.MU||this.pU(new lD(cD.FR,"firstFrameDisplayed"),"now"),this.MU=!0,this.AU(sl.Rw))},this.uU=()=>{this.Qo.Ff&&(this.MU=!0,this.AU(sl.Qw))},this.dU=()=>{this._U&&(this.TU=!0,this._U=!1,this.AU(sl.aR))},this.lU=()=>{this.TU=!1,this.Qo.Ff&&this.AU(sl.Qw)}}},AD=class extends ic{$R(){super.$R(),this.NU(),this.hU()}gn(){this.oU(),super.gn()}hU(){this.Qo.rt.yn(na.ra,this.NU),this.Qo.SU.DU(this.IU),this.Qo.yn(Co.Xg,this.EU)}oU(){this.Qo.rt.fn(na.ra,this.NU),this.Qo.SU.bU(this.IU),this.Qo.fn(Co.Xg,this.EU)}LU(t){t.serviceName&&this.kU(Vo.zR,t.serviceName),t.cdn&&this.kU(Vo.OR,t.cdn),t.contentTitle&&this.kU(Vo.jR,t.contentTitle),t.contentType&&this.kU(Vo.PR,t.contentType),t.contentDescription&&this.kU(Vo.RR,t.contentDescription)}kU(t,i){this.tU&&this.eU.CU(t,i)}constructor(...t){super(...t),this.EU=()=>{this.rU()&&this.kU(Vo.kR,_.round(this.Qo.Td()))},this.IU=t=>{"manifest"===t.request.type&&this.kU(Vo.LR,t.url)},this.NU=()=>{const t=Po(this.Qo.rt.og,(t=>t.Rt));t&&this.kU(Vo.xR,t.Ng.U)}}},vD=class extends ic{$R(){super.$R(),this.xU=this.Qo.jf.dT,this.OU=this.Qo.jf.fT,this.hU(),this.jU.push(v(this.zU,1e3))}iU(){super.iU(),this.PU()}gn(){this.PU(),this.oU(),this.jU.forEach(m),No(this.jU),super.gn()}hU(){this.Qo.SU.DU(this.BU),this.Qo.yn(Co.Dw,this.RU)}oU(){this.Qo.SU.bU(this.BU),this.Qo.fn(Co.Dw,this.RU)}UU(){this.PU()}QU(t){this.FU+=t,this.YU(Ua.mR,this.FU)}GU(t,i){const e=this.VU.get(i)||0;this.YU(t,e)}WU(){const t=this.Qo.jf.dT-this.xU;this.YU(Ua.NR,t)}HU(){const t=this.Qo.jf.fT-this.OU;this.YU(Ua.SR,t)}qU(){const t=xu.yb.Kj();this.YU(Ua.pR,kg(t))}XU(t){this.YU(Ua.yR,kg(t)),this.YU(Ua.MR,kg(t))}PU(){if(!this.rU())return;const t=_.round(Jt(this.Qo.Tf()));this.YU(Ua.DR,t)}ZU(){const t=ce.xn(this.Qo.Af()),i=this.Qo.Tf(),e=t.dA(i),s=e?Jt(e.jn(0)-i):0;this.YU(Ua.vR,s)}YU(t,i){this.tU&&this.eU.KU(t,i)}constructor(...t){super(...t),this.VU=Cn(),this.FU=0,this.xU=0,this.OU=0,this.jU=[],this.zU=()=>{this.WU(),this.HU(),this.ZU()},this.RU=t=>{t.dI===f.Am&&(this.QU(t.gT),this.qU(),this.XU(t.JU),this.PU())},this.BU=t=>{const i=t.status.toString()[0],e=this.VU.get(i)||0;this.VU.set(i,e+1),this.GU(Ua.fR,"1"),this.GU(Ua._R,"2"),this.GU(Ua.gR,"3"),this.GU(Ua.wR,"4"),this.GU(Ua.AR,"5")}}},mD=class{Ub(t){this.$U.delete(t)}tQ(){this.$U.clear()}Pb(t){return this.$U.get(t)}Wj(t,i){this.$U.set(t,i)}constructor(){this.$U=Cn()}},at=class t{static iQ(){return t.yb||(t.yb=pD.YC()?new pD:new mD),t.yb}static Ub(i){t.iQ().Ub(i)}static tQ(){t.iQ().tQ()}static Pb(i){return t.iQ().Pb(i)}static Wj(i,e){t.iQ().Wj(i,e)}};at.yb=void 0;var zu,pD=class extends at{static YC(){const t="foobar";try{return self.sessionStorage.setItem(t,t),self.sessionStorage.removeItem(t),!0}catch(t){return!1}}Ub(t){self.sessionStorage.removeItem(t)}tQ(){self.sessionStorage.clear()}Pb(t){var i;return null!=(i=self.sessionStorage.getItem(t))?i:void 0}Wj(t,i){self.sessionStorage.setItem(t,i)}};function yD(t){return t&&t.integration===ID}function MD(t){if(!Qs(t.asset))throw new b("Agama source configuration: expected 'asset' to be a string");if(!function(t){return!!Qs(t)&&("live"===t||"vod"===t)}(t.streamType))throw new b("Agama source configuration: expected 'streamType' to be 'live' or 'vod'");if(void 0!==t.serviceName&&!function(t){return!!Qs(t)&&("live"===t||"svod"===t||"nvod"===t||"tvod"===t||"avod"===t||"catchuptv"===t)}(t.serviceName))throw new b("Agama source configuration: expected 'serviceName' to be 'live', 'svod', 'nvod','tvod', 'avod' or 'catchuptv'");if(void 0!==t.cdn&&!Qs(t.cdn))throw new b("Agama source configuration: expected 'cdn' to be a string");if(void 0!==t.contentTitle&&!Qs(t.contentTitle))throw new b("Agama source configuration: expected 'contentTitle' to be a string");if(void 0!==t.contentType&&!Qs(t.contentType))throw new b("Agama source configuration: expected 'contentType' to be a string");if(void 0!==t.contentDescription&&!Qs(t.contentDescription))throw new b("Agama source configuration: expected 'contentDescription' to be a string");return t}function TD(t){if(!Qs(t.config))throw new b("Agama player configuration: expected 'config' to be a string");if(void 0!==t.logLevel&&!function(t){return!!Qs(t)&&("info"===t||"debug"===t||"warning"===t||"error"===t||"fatal"===t)}(t.logLevel))throw new b("Agama player configuration: expected 'logLevel' to be 'info', 'debug', 'warning','error' or 'fatal'");if(void 0!==t.application&&!Qs(t.application))throw new b("Agama player configuration: expected 'application' to be a string");if(void 0!==t.applicationVersion&&!Qs(t.applicationVersion))throw new b("Agama player configuration: expected 'applicationVersion' to be a string");if(void 0!==t.userAccountID&&!Qs(t.userAccountID))throw new b("Agama player configuration: expected 'userAccountID' to be a string");if(void 0!==t.deviceID&&!Qs(t.deviceID))throw new b("Agama player configuration: expected 'deviceID' to be a string");return t}function ND(){let t="00000000-0000-0000-0000-000000000000",i=s.navigator,e=s.screen,n=""+i.mimeTypes.length;n+=i.userAgent.replace(/\D+/g,""),n+=i.plugins.length,n+=e.height||"",n+=e.width||"",n+=e.pixelDepth||"",n+=_.floor(1e3*_.random());let r=function(t){let i,e,s=0;if(0===t.length)return"0";for(i=0;i<t.length;i++)e=t.charCodeAt(i),s=(s<<5)-s+e,s|=0;return _.abs(s).toString().substring(0,12)}(n);return t=[t.slice(0,t.length-r.length),r].join(""),t}function DD(t,i,e){const s=i,n=function(t,i){return mw(i)?t.DsProtocol.APPLE_HLS:t.DsProtocol.MPEG_DASH}(t,s.type),r=function(t,i){let e=t.DsPlaylistType.VOD;"live"===i&&(e=t.DsPlaylistType.LIVE);return e}(t,e.streamType);return{asset:e.asset,playlistType:r,protocol:n,uri:s.src}}!function(t){t.UNAVAILABLE="unavailable",t.AVAILABLE="available",t.CONNECTING="connecting",t.CONNECTED="connected"}(zu||(zu={}));var Xa,rl,Pa,SD=class{eQ(){this.Qo.fn(ut.ha,this.sQ),this.nQ(),this.rQ(),this.eU.hQ()}oQ(){this.Qo.aQ.va.chromecast&&this.Qo.aQ.va.chromecast.addEventListener("statechange",this.uQ)}rQ(){this.Qo.aQ.va.chromecast&&this.Qo.aQ.va.chromecast.removeEventListener("statechange",this.uQ)}cQ(){return void 0!==this.Qo.aQ.va.chromecast&&this.Qo.aQ.va.chromecast.state===zu.CONNECTED}gn(){this.Qo.fn(Co.lo,this.do),this.Qo.fn(Co.jh,this.dQ),this.Qo.fn(Co.Jg,this.lQ),this.eQ(),this.eU.gn()}fQ(){this._Q||(this._Q=new wD(this.Qo,this.eU)),this.gQ||(this.gQ=new vD(this.Qo,this.eU)),this.wQ||(this.wQ=new AD(this.Qo,this.eU))}$R(){this._Q&&(this._Q.$R(),this._Q.yn("JR",this.AQ)),this.gQ&&this.gQ.$R(),this.wQ&&this.wQ.$R()}nQ(){this._Q&&(this._Q.fn("JR",this.AQ),this._Q.gn(),this._Q=void 0),this.gQ&&(this.gQ.gn(),this.gQ=void 0),this.wQ&&(this.wQ.gn(),this.wQ=void 0)}LU(t){this.wQ&&this.wQ.LU(t)}vQ(){this._Q&&this._Q.gU()}fU(){this._Q&&this._Q.fU()}constructor(t,i,e){this.Qo=t,this.eU=i,this.do=()=>{this.mQ(),this.lQ()},this.mQ=()=>{const t=this.Qo.Wa(),i=t&&t.analytics;this.pQ=function(t){void 0===t&&(t=[]);for(let i of t)if(yD(i))return MD(i)}(i)},this.lQ=()=>{this.eQ(),this.Qo.fn(Co.jh,this.dQ),!this.cQ()&&this.eU.yQ()&&this.Qo.bt&&this.pQ&&(this.fQ(),this.Qo.Ff||this.Qo.Sf?this.Qo.yn(Co.jh,this.dQ):this.dQ())},this.dQ=()=>{this.Qo.bt&&this.pQ&&(this.eU.MQ(this.Qo.bt,this.pQ),this.$R(),this.LU(this.pQ),this.oQ(),this.Qo.yn(ut.ha,this.sQ),this.Qo.fn(Co.jh,this.dQ))},this.uQ=()=>{this.cQ()&&this.eQ()},this.sQ=()=>{this.vQ(),this.eQ()},this.AQ=()=>{this.gQ&&this.gQ.UU()};const s=function(t){void 0===t&&(t=[]);for(const i of t)if(yD(i))return TD(i)}(e.analytics);s&&this.eU.TQ()&&(this.eU.v_(s),this.eU.yQ()?(this.eU.NQ(),this.Qo.yn(Co.lo,this.do),this.Qo.yn(Co.Jg,this.lQ)):console.warn("An error occurred while initializing an Agama EMP client. Please check your configuration"))}},ID="agama";function ED(t){switch(t){case"":return Xa.NONE;case"horizontal":return Xa.HORIZONTAL;case"vertical":return Xa.VERTICAL;default:throw new b}}function bD(t,i){if(i)return rl.PM360;if(null==t)return rl.NONE;switch(t){case"":return rl.NONE;case"360":return rl.PM360;case"180":return rl.PM180;default:throw new b("Provided panoramaMode value is not recognized. Expected '', '360' or '180' but value was "+t)}}!function(t){t.NONE="",t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(Xa||(Xa={})),function(t){t.NONE="",t.PM360="360",t.PM180="180"}(rl||(rl={})),function(t){t.ASSET="asset",t.CHANNEL="channel",t.EVENT="event"}(Pa||(Pa={}));var LD="https://content.uplynk.com";function Mn(t){if(!t)return!0;const i=!function(t){return Iw(t)||tn(t)&&Iw(t[0])}(t.sources)||Ft(t.sources),e=!t.ads||kD(t.ads),s=""!==t.poster&&!t.poster;return i&&e&&s}function kD(t){return!t||$(t)&&0===t.length}function CD(t){if(t&&t.sources)return xD(t.sources)}function xD(t){return Qs(t)?ww(t):Dw(t)?t.type||t.src&&ww(t.src):tn(t)&&t.length>0?xD(t[0]):void 0}function OD(t){if(t&&t.sources)return jD(t.sources)}function jD(t){return Qs(t)?t:Dw(t)?t.src:tn(t)&&t.length>0?jD(t[0]):void 0}function zD(t,i,e){return yw(t)?function(t,i,e){let s=Tt({},Ew(),{ping:{adImpressions:!1,freeWheelVideoViews:!1,linearAdData:!1},integration:te.VERIZON_MEDIA,id:"",prefix:LD,preplayParameters:{},playbackUrlParameters:{},assetType:Pa.ASSET,contentProtected:!1,assetInfo:!0});s.id=function(t){if(Qs(t))return t;if(tn(t)&&Qs(t[0]))return t;if(function(t){return Mo(t)&&Qs(t.userId)&&(tn(t.externalId)||Qs(t.externalId))}(t))return t;return""}(t.id),t.preplayParameters&&(s.preplayParameters=t.preplayParameters);t.playbackUrlParameters&&(s.playbackUrlParameters=t.playbackUrlParameters);t.assetType&&(s.assetType=function(t){switch(t){case"channel":return Pa.CHANNEL;case"event":return Pa.EVENT;default:return Pa.ASSET}}(t.assetType));t.contentProtected&&(s.contentProtected=Ks(t.contentProtected));t.assetInfo?s.assetInfo=Ks(t.assetInfo):s.assetInfo="asset"===s.assetType;t.prefix&&(s.prefix=jo(t.prefix)||LD);return s.ping=function(t,i){let e=!1,s=!1,n=!1;i?(e=!!Sd(i.adImpressions)&&i.adImpressions,s=!!Sd(i.freeWheelVideoViews)&&i.freeWheelVideoViews,n=Sd(i.linearAdData)?i.linearAdData:t!==Pa.ASSET):t!==Pa.ASSET&&(n=!0);return{adImpressions:e,freeWheelVideoViews:s,linearAdData:n}}(s.assetType,t.ping),s=BD(s,t),s=UD(s,i,e),s=RD(s,t,e),s}(t,i,e):Tw(t)?function(t,i,e){var s;return Tt({},PD(t,i,e),{integration:te.MEDIATAILOR,adParams:null!=(s=t.adParams)?s:{}})}(t,i,e):Mw(t)?function(t,i,e){return Tt({},PD(t,i,e),{integration:te.THEOLIVE})}(t,i,e):PD(t,i,e)}function PD(t,i,e){let s=bw();const n=i&&(i.contentProtection||i.drm);if(Qs(t)){if(s.src=t,s.type=ww(t),n){const t=VN(n);s.contentProtection=$g(t)}}else if(Dw(t)||pw(t)){s.src=t.src,s.type=t.type||ww(t.src),s.isAdvertisement=t.isAdvertisement;const i=Sw(t)?t.hesp:void 0;void 0!==i&&(s.hesp=i);Tw(t)&&(s.integration=t.integration);const e=VN(t.contentProtection||t.drm||n);s.contentProtection=$g(e),t.ssai&&(s.ssai=Wf(t.ssai)),s=BD(s,t)}return s=UD(s,i,e),s=RD(s,t,e),s}function BD(t,i){var e,s;i.useCredentials?t.crossOrigin=ms.LA:i.crossOrigin&&(t.crossOrigin=Aw(i.crossOrigin)),Qs(i.timeServer)&&(t.timeServer=i.timeServer),i.liveOffset&&(t.liveOffset=i.liveOffset),i.hlsDateRange&&(t.hlsDateRange=i.hlsDateRange),i.lowLatency&&(t.lowLatency=Ks(i.lowLatency)),i.useNativePlayback&&(t.useNativePlayback=Ks(i.useNativePlayback)),i.useManagedMediaSource&&(t.useManagedMediaSource=Ks(i.useManagedMediaSource)),i.dash&&(t.dash=tw(i.dash)),i.hls&&(t.hls=iw(i.hls)),i.lcevc&&(t.lcevc=Ks(i.lcevc)),i.ignoreEmbeddedTextTrackTypes&&(t.ignoreEmbeddedTextTrackTypes=xw(i.ignoreEmbeddedTextTrackTypes)),i.latencyConfiguration&&(t.latencyConfiguration=lw(i.latencyConfiguration)),t.seamlessSwitchStrategy=fw(null!=(s=i.seamlessSwitchStrategy)?s:null==(e=i.dash)?void 0:e.useSeamlessPeriodSwitch);const n=hu(i.experimentalRendering);void 0!==n&&(t.experimentalRendering=n);const r=hu(i.nativeUiRendering);return void 0!==r&&(t.nativeUiRendering=r),t}function RD(t,i,e){return t.abr=nw(Qs(i)?void 0:sw(i.abr),null==e?void 0:e.abr),t}function UD(t,i,e){var s;const n=i&&i.timeServer;return e&&e.liveOffset&&!Dd(t.liveOffset)&&(t.liveOffset=e.liveOffset),e&&e.hlsDateRange&&!Dd(t.hlsDateRange)&&(t.hlsDateRange=e.hlsDateRange),t.crossOrigin===ms.EA&&(null==i||null==(s=i.vr)?void 0:s[360])&&(t.crossOrigin=ms.bA),t.useCredentials=t.crossOrigin===ms.LA,Qs(n)&&!t.timeServer&&(t.timeServer=n),t}function QD(t){const i={src:""};if(t&&t.src){if(i.src=jo(t.src),"default"in t&&(i.default=Ks(t.default)),i.kind=function(t){const i=String(t||"").toLowerCase();return Zv(i)?i:i?"metadata":"subtitles"}(t.kind),_w(t.format)&&(i.format=t.format),"srclang"in t){const e=t.srclang;"string"==typeof e&&""!==e&&(i.srclang=e)}if("label"in t){const e=t.label;"string"==typeof e&&""!==e&&(i.label=e)}}return i}function FD(t,i){if(Mo(t))try{return i.rR(t).DQ(t)}catch(t){return}}function Ms(t,i,e){if(void 0===e&&(e=He.yb),Mn(t))return{sources:[bw()]};const s=ie(t);if(s.sources=function(t,i,e){if(Iw(t))return[zD(t,i,e)];if(tn(t)&&Iw(t[0])){const s=[];for(const n of t)s.push(zD(n,i,e));return s}return[bw()]}(s.sources,s,i),"contentProtection"in s&&delete s.contentProtection,"drm"in s&&delete s.drm,"ads"in s){const t=function(t,i){if(!tn(t))return[];const e=[];for(let s of t)s=FD(s,i),s&&e.push(s);return e}(s.ads,e);0===t.length?delete s.ads:s.ads=t}const n=!Ft(s.sources),r=s.ads&&s.ads.length>0;if(n&&!r?delete s.ads:r&&!n&&(s.sources=[]),"textTracks"in s){const t=function(t){if(!tn(t))return[];const i=[];for(let e of t)e=QD(e),""!==e.src&&i.push(e);return i}(s.textTracks);0===t.length?delete s.textTracks:s.textTracks=t}"poster"in s&&(s.poster=jo(s.poster)),"streamType"in s&&(s.streamType=function(t){switch(t){case"live":case"dvr":case"vod":return t}}(s.streamType)),"vr"in s&&(s.vr=function(t){const i=t||{};return i.stereoMode=function(t){return function(t){switch(t){case"":case"horizontal":case"vertical":return!0;default:return!1}}(t)?t:""}(i.stereoMode),{panoramaMode:bD(i.panoramaMode,Boolean(i[360])),stereoMode:i.stereoMode?ED(i.stereoMode):Xa.NONE,nativeVR:Boolean(i.nativeVR)}}(s.vr));if("analytics"in s||(null==i?void 0:i.analytics)){const t=kw(s.analytics),e=i&&i.analytics||[];s.analytics=function(t,i){const e=ie(t);for(const s of i){const i=!t.some((t=>t.integration===s.integration));i&&s.integration!==ID&&e.push(s)}return e}(t,e)}return"mutedAutoplay"in s&&(s.mutedAutoplay=Bw(s.mutedAutoplay)),"timeServer"in s&&delete s.timeServer,"playAdsAfterTime"in s&&(s.playAdsAfterTime=$h(s.playAdsAfterTime)),s.blockContentIfAdError=function(t){return void 0!==t&&"boolean"==typeof t&&Boolean(t)}(s.blockContentIfAdError),s}var YD=!(fi.kE&&!fi.xE),GD=self.console;function VD(t){if(Mo(t))try{return JSON.stringify(t)}catch(t){}return t}function WD(t){return t.map(VD).join(" ")}function HD(t){const i=GD&&GD[t];return i?i.bind&&YD?i.bind(GD):function(){for(var i=arguments.length,e=new Array(i),s=0;s<i;s++)e[s]=arguments[s];GD[t](WD(e))}:void 0}var qu=HD("log")||qo,Eo=HD("warn")||qu.bind(void 0,"WARNING:"),Hu=HD("error")||qu.bind(void 0,"ERROR:"),qD=(()=>{const t=GD&&GD.assert;return t?t.bind&&YD?t.bind(GD):function(t){for(var i=arguments.length,e=new Array(i>1?i-1:0),s=1;s<i;s++)e[s-1]=arguments[s];GD.assert(t,WD(e))}:function(t){for(var i=arguments.length,e=new Array(i>1?i-1:0),s=1;s<i;s++)e[s-1]=arguments[s];t||Hu("Assertion failed:",...e)}})();var XD=function(){function t(t){this.SQ=t}return t.prototype.IQ=function(t){var i,e,s,n,r,h,o,a=[];if(!t)return"";var u=t.length%4;if(u>0)for(;u++<4;)t+=this.SQ.charAt(64);for(i=0;i<t.length;i+=4)e=(o=this.SQ.indexOf(t.charAt(i))<<18|this.SQ.indexOf(t.charAt(i+1))<<12|(r=this.SQ.indexOf(t.charAt(i+2)))<<6|(h=this.SQ.indexOf(t.charAt(i+3))))>>>16&255,s=o>>>8&255,n=255&o,a[i/4]=String.fromCharCode(e,s,n),64===h&&(a[i/4]=String.fromCharCode(e,s)),64===r&&(a[i/4]=String.fromCharCode(e));return a.join("")},t.prototype.EQ=function(t,i){var e,s,n,r,h,o,a,u=[],c="";if((o=t.length%3)>0)for(;o++<3;)c+=this.SQ.charAt(64),t+="\0";for(o=0;o<t.length;o+=3)s=(e=t.charCodeAt(o)<<16|t.charCodeAt(o+1)<<8|t.charCodeAt(o+2))>>18&63,n=e>>12&63,r=e>>6&63,h=63&e,u[o/3]=this.SQ.charAt(s)+this.SQ.charAt(n)+this.SQ.charAt(r)+this.SQ.charAt(h);return a=(a=u.join("")).slice(0,a.length-c.length),i||(a+=c),a},t.lh=new t(function(){var t,i,e,s,n=[],r=["object","$","undefined","function","Cannot find module '","MODULE_NOT_FOUND","*","com.widevine.alpha","urn:mpeg:dash:mp4protection:2011","^","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","__proto__","@@iterator","getUTCHours","setUTCFullYear","25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?","SegmentBase","RateChangeEvent","Symbol(","Symbol.",'; codecs="'];for(t=0;t<r.length;t+=1)for(i=r[t],e=0;e<i.length;e+=1)s=i.charAt(e),-1===n.indexOf(s)&&n.push(s);return n.join("")}()),t.bQ=new t(function(t){return t.IQ("aDtm.Dd_DE.4DuN$CeaD $t?FUa0ac'NlYsgU]dU*|sMCON9NL.i'YU M:.LiEb5TLaTOu18F|'v*:s7C41nOMop")}(t.lh)),t}();function Zu(t){return"string"==typeof t}function ZD(t){return"number"==typeof t}var KD={}.toString;var q,JD=Array.isArray||function(t){return"[object Array]"===KD.call(t)};function $D(t,i){return JD(t)&&t.every(i)}!function(t){t.HTML5="html5",t.ANDROID="android",t.IOS="ios",t.TVOS="tvos",t.ANDROIDTV="androidtv",t.TIZEN="tizen",t.WEBOS="webos",t.CHROMECAST="chromecast",t.ROKU="roku",t.FIRETV="firetv",t.CHROMECASTCAF="chromecastcaf",t.THEOLIVEWEB="theoliveweb",t.KEPLER="kepler"}(q||(q={}));var zr,tS=w.keys(q).map((function(t){return q[t]}));function iS(t){return-1!==tS.indexOf(t)}!function(t){t.HESP="hesp",t.MULTIVIEW="multiview",t.THEOADS="theoads"}(zr||(zr={}));var eS,sS=w.keys(zr).map((function(t){return zr[t]}));function nS(t){return-1!==sS.indexOf(t)}function rS(t){try{var i=XD.bQ.IQ(t),e=JSON.parse(i);if(!function(t,i){var e,s=function(t){return"object"==typeof t&&null!==t}(t),n=Zu(t.key),r=Zu(t.customer_id),h=ZD(t.generation_date),o=ZD(t.expiration_date),a=$D(t.domains_page,Zu),u=$D(t.domains_source,Zu),c=$D(t.sdks,i?iS:Zu),d=function(t){return"boolean"==typeof t}(t.send_impression);t.features?e=$D(t.features,i?nS:Zu):(e=!0,t.features=[]);if(!(s&&n&&r&&h&&o&&a&&u&&c&&d&&e))return!1;return!0}(e,!1))throw new g("The provided license could not be decoded correctly.");return e}catch(t){throw new g("The provided license could not be decoded correctly.")}}function hS(){return eS||(eS={zu:xm.href,LQ:Qr.parent&&Qr.parent!==s,kQ:aS()}),eS}var Vn,oS=["http:","https:","ftp:","ws:","wss:"];function aS(){var t;try{if(null==Qr?void 0:Qr.top)return Qr.top.location.href}catch(t){}return null==Qr||null==(t=Qr.document)?void 0:t.referrer}!function(t){t[t.CQ=0]="CQ",t[t.xQ=1]="xQ",t[t.OQ=2]="OQ"}(Vn||(Vn={}));var uS,cS=class{constructor(t,i,e,s,n=[],r="",h=Date.now(),o=[],a=!0){this.jQ=t,this.zQ=i,this.BQ=e,this.RQ=s,this.UQ=n,this.QQ=r,this.FQ=h,this.YQ=o,this.GQ=a}};!function(t){t.xQ="expired",t.VQ="invaliddomain",t.WQ="invalidsource",t.HQ="invalidfeature",t.ha="error"}(uS||(uS={}));var dS=class t{qQ(t,i){let e=[];Iw(t.sources)?e=[t.sources]:tn(t.sources)&&(e=t.sources),this.XQ(t,e,i),this.ZQ(e,i)}XQ(t,i,e){if(Mn(t)||0===e.BQ.length||gS(e.BQ))return;if(!i.every((t=>this.KQ(t,e)))){const t="invalidsource",i=vt.JQ(t);throw new $i(fS(t),i)}}ZQ(t,i){for(const e of t)Dw(e)&&Sw(e)&&!e.bypassLicense&&this.$Q([zr.HESP],i)}tF(i){return this.iF(i.YQ)&&this.eF(i)?t.sF(i.RQ)?0:1:2}$Q(t,i){for(const e of t)if(!ae(i.UQ,e)){const t="invalidfeature",i=vt.nF(t,e);throw new $i(fS(t),i)}}iF(t){return 0===t.length||t.some((t=>this.rF(t)))}rF(t){return"web"===function(t){switch(t){case q.ANDROID:return Io.II;case q.ANDROIDTV:case q.FIRETV:return Io.EI;case q.IOS:return Io.bI;case q.TVOS:return Io.LI;case q.CHROMECAST:case q.CHROMECASTCAF:return Io.kI;case q.THEOLIVEWEB:return Io.CI;default:return Io.SI}}(t)}static sF(t){const i=Number(new Date);return!!t&&i<=t}eF(t){return!(this.hF&&0!==t.zQ.length&&!gS(t.zQ))||!!(this.hF&&this.oF(t.zQ)&&this.aF(t.zQ))}oF(t){return wS(this.xL.zu,t)}aF(t){if(!this.xL.LQ)return!0;if(this.uF)return!0;const i=this.cF();return!!i&&wS(i,t)}cF(){if(!this.xL.LQ)return;const t=id.ancestorOrigins;return t&&t.length>0?t[t.length-1]:this.xL.kQ?this.xL.kQ:void 0}KQ(i,e){return!!t.dF(i,e.BQ)}static dF(t,i){return wS(this.lF(t),i)}static lF(t){return Qs(t)?t:Dw(t)&&t.src||""}constructor(t,i,e){this.uF=t,this.fF=i,this.xL=e,this.hF=vS(this.xL)}},lS=class{tF(t){return 0}qQ(t,i){}$Q(t,i){}};function fS(t){switch(t){case"invaliddomain":return td.LICENSE_INVALID_DOMAIN;case"invalidsource":return td.LICENSE_INVALID_SOURCE;case"expired":return td.LICENSE_EXPIRED;case"invalidfeature":return td.LICENSE_INVALID_FEATURE;case"error":return td.LICENSE_ERROR}}function _S(t,i){let e=t,s=i;if(!e)return!1;if(s=s.trim(),"*"===s)return!0;if(e=e.replace(/\.+$/,""),s===e)return!0;const n="\\.",r="25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?",h="(\\*|"+r+")",o=new RegExp("ip-range\\("+h+n+h+n+h+n+h+"\\)"),a=s.match(o),u=t=>"*"===t?"("+r+")":t;if(null!==a&&5===a.length){const t=new RegExp("^"+a[1]+n+u(a[2])+n+u(a[3])+n+u(a[4])+"$");return null!==e.match(t)}return s="."+s,-1!==e.indexOf(s,e.length-s.length)}function gS(t){return t.some((t=>"*"===t))}function wS(t,e){const s=i.Dh(t);if(!AS(s))return!0;for(const i of e){if(_S(s.hostname,i))return!0;if(_S(Rf(t),i))return!0}return!1}function AS(t){return-1!==oS.indexOf(t.protocol)}function vS(t){const e=i.Dh(t.zu);return AS(e)&&!function(t){return _S(t.hostname,"localhost")}(e)&&!function(t){return _S(t.hostname,"theoplayer.doubleclick.net")}(e)}var _n,vt=class{static nF(t,i){return"The requested feature '"+i+"' is not available with the license for this player."}static JQ(t){return"invaliddomain"===t?this._F:"invalidsource"===t?this.gF:"expired"===t?this.wF:"invalidfeature"===t?this.AF:this.vF}};function mS(t){const i=[t.wM,t.mF,t.pF];switch(t.mF){case 1:i.push(t.Ug);break;case 4:i.push(t.Mf),i.push(t.lt);break;case 5:i.push(t.lt)}return i}vt.vF="The license for this player is invalid.",vt.wF="The usage license for this video player has expired.",vt._F="The current domain is incompatible with the license for this player.",vt.gF="The provided video source is incompatible with the license for this player.",vt.AF="The requested feature is not available with the license for this player.",function(t){t[t.yF=1]="yF",t[t.MF=4]="MF",t[t.TF=5]="TF"}(_n||(_n={}));var nl=new Array(256);for(let t=0;t<256;t+=1)nl[t]=(t<16?"0":"")+t.toString(16);function ar(){const t=fa(),i=(4294967296*_.random()|0)+t&3029421624,e=(4294967296*_.random()|0)+t&3595553209,s=(4294967296*_.random()|0)+t&1130486254,n=(4294967296*_.random()|0)+t&1284287105;return nl[255&i]+nl[i>>>8&255]+nl[i>>>16&255]+nl[i>>>24&255]+"-"+nl[255&e]+nl[e>>>8&255]+"-"+nl[e>>>16&15|64]+nl[e>>>24&255]+"-"+nl[63&s|128]+nl[s>>>8&255]+"-"+nl[s>>>16&255]+nl[s>>>24&255]+nl[255&n]+nl[n>>>8&255]+nl[n>>>16&255]+nl[n>>>24&255]}function pS(t){return Lg(t.replace(/-/g,""))}function Hr(){return i.Jd()}var yS,MS="theoplayer-session-id";function TS(){if(!yS){const t=at.Pb(MS);t?yS=t:(yS=ar(),at.Wj(MS,yS))}return yS}var NS=/[^\x00-\x7E]/g;function DS(t){return"\\u"+eu(t.charCodeAt(0).toString(16),4,"0")}var SS="https://license.theoplayer.com";function IS(t){const i=function(t){const i=[];return function(t,i,e){return JSON.stringify(t,i,e).replace(NS,DS)}(t,((t,e)=>{if(Mo(e)){if(-1!==i.indexOf(e))return null;i.push(e)}return e}))}(function(t){return[t.NF,t.dC,t.jQ,t.ap,t.DF,t.SF,t.IF.map(mS)]}(t));return XD.bQ.EQ(i)}var ES=class{get IF(){return this.FB}EF(){return Boolean(this.DF)}get DF(){return this.bF}async LF(t){if(!(await this.CF.kF()).GQ)return;const i={mF:_n.yF,pF:fa(),Ug:t};await this.pU(i)}async xF(t,i){const e={mF:_n.MF,pF:fa(),Mf:i,lt:t};await this.pU(e)}async OF(t){const i={mF:_n.TF,pF:fa(),lt:t};await this.pU(i)}async pU(t){const i=await this.CF.kF();"a:n[_O*[C4C-N$_@_MYY $D]iOp]N$_-_]th_:c|aen?C:pH"===this.jF.EQ(i.jQ)&&t.mF!==_n.TF||(t.mF===_n.yF?this.zF():this.EF()||this.zF(),t.wM=this.Ak++,this.FB.push(t),!function(t){return t===_n.yF||t===_n.TF}(t.mF)?this.FB.length>this.PF&&await this.BF():await this.RF())}async RF(t){for(void 0===t&&(t=!1);this.FB.length>0;)await this.BF(t)}async UF(t){const i=await this.CF.kF();return{NF:fa(),dC:TS(),jQ:this.jF.EQ(i.jQ)||"dev",ap:this.Yk,DF:this.bF,SF:this.QF,IF:t}}async BF(t){void 0===t&&(t=!1);const i=this.FB.splice(0,this.FF),e=await this.UF(i);t?this.YF(e):this.GF(e),this.VF=Hr()}async GF(t){const i=IS(t),e=new Pc({zu:SS,rI:i,lI:!1,aI:dm.Ru,hI:{"Content-Type":Jh.uj},IS:4e3,oI:G.POST});try{const t=await this.mI.MS(e);await t.nj()}catch(t){(new Image).src="https://licensing.theoplayer.com/t?"+i}}YF(t){const i=IS(t);this.mI.YF({zu:SS,rI:i,Fz:Jh.uj})}zF(){this.EF()&&this.RF(),this.bF=ar(),this.Ak=0}gn(){Vs.WF(this.HF),m(this.qF),this.RF()}constructor(t,i,e,s=XD.lh,n=0,r=1){this.Yk=t,this.mI=i,this.CF=e,this.jF=s,this.PF=n,this.FF=r,this.FB=[],this.bF=null,this.VF=0,this.QF="unknown",this.Ak=0,this.XF=()=>{Hr()-this.VF>6e4&&this.RF()},this.HF=()=>{this.RF(!0)},Vs.ZF(this.HF),this.qF=v(this.XF,6e4)}};var bS=0;var LS=c,ro=self.requestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame,we=self.cancelAnimationFrame||self.webkitCancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelRequestAnimationFrame;ro&&we||(ro=function(t){const i=Hr(),e=_.max(0,16-(i-bS)),s=u((()=>t(i+e)),e);return bS=i+e,s},we=LS),ro=ro.bind(self),we=we.bind(self);var kS=fi.kE||fi.Ga&&fi.YE<13;function CS(t,i,e){const s=t.getImageData(i,e,1,1).data;return 0===s[0]&&0===s[1]&&0===s[2]&&0===s[3]}var Tn,xS=class{get va(){var t;return null!=(t=this.Xa)?t:this.Xa=function(t){return{drawImage(i){for(var e=arguments.length,s=new Array(e>1?e-1:0),n=1;n<e;n++)s[n-1]=arguments[n];return t.KF(i,...s)},texImage2D:(i,e,s,n,r,h)=>t.JF(i,e,s,n,r,h),requestVideoFrameCallback:i=>t.tY(i),cancelVideoFrameCallback:i=>t.iY(i)}}(this)}KF(t){for(var i=arguments.length,e=new Array(i>1?i-1:0),s=1;s<i;s++)e[s-1]=arguments[s];const n=this.eY;return void 0!==n&&(t.drawImage(n,...e),!0)}JF(t,i,e,s,n,r){let h=this.eY;return void 0!==h&&(kS&&(h=this.sY(h)),t.texImage2D(i,e,s,n,r,h),!0)}tY(t){const i=this.nY++,e=this.rY(t,i);return this.hY.set(i,{oY:t,aY:e}),i}iY(t){const i=this.hY.get(t);void 0!==i&&(this.hY.delete(t),i.aY())}rY(t,i){const e=this.eY;if(void 0===e)return qo;if(e instanceof HTMLVideoElement&&e.requestVideoFrameCallback){const s=e.requestVideoFrameCallback(((e,s)=>{this.hY.delete(i),t(e,s)}));return()=>e.cancelVideoFrameCallback(s)}{let e;const s=n=>{this.uY()?(this.hY.delete(i),this.cY=!1,t(n,void 0)):e=ro(s)};return e=ro(s),()=>we(e)}}uY(){return(!this.t.Ff||this.cY)&&!this.t.e_&&this.t.Jf>=oe.nT}sY(t){let i=this.dY;void 0===i&&(i=h.createElement("canvas"),this.dY=i);const e=i.getContext("2d"),s=this.t,n=s.a_,r=s.r_,o=i.width,a=i.height;e.clearRect(0,0,i.width,i.height),o===n&&a===r||(i.width=n,i.height=r),e.drawImage(t,0,0,n,r);let u=!1;return n>0&&CS(e,n-1,0)&&(i.width=o,u=!0),r>0&&CS(e,0,r-1)&&(i.height=a,u=!0),u&&e.drawImage(t,0,0,n,r),i}gn(){this.hY.forEach((t=>t.aY())),this.hY.clear(),this.t.fn(Co.ew,this.lY),this.t.fn(Co.pw,this.fY),this.eY=void 0,this.dY=void 0}constructor(t){this.eY=void 0,this.Xa=void 0,this.dY=void 0,this.hY=Y(),this.nY=1,this.cY=!0,this.fY=()=>{this.cY=!0},this.lY=()=>{this.eY=this.t.A_(),this.hY.forEach(((t,i)=>{t.aY(),t.aY=this.rY(t.oY,i)}))},this.t=t,this.t.yn(Co.ew,this.lY),this.t.yn(Co.pw,this.fY),this.lY()}};(Tn||(Tn={})).pn="dimensionchange";var OS,jS=class extends Bo{get _u(){return 0}get ku(){return 0}},zS=class extends Yi{constructor(t,i){super(Tn.pn),this.width=t,this.height=i}},PS=class{constructor(t,i){this.we=t,this.oY=i}},BS=class extends PS{get _u(){return this._Y}get ku(){return this.gY}gn(){this.wY.disconnect()}constructor(t,i){super(t,i),this._Y=0,this.gY=0,this.AY=t=>{if(t.length>0){const i=t[t.length-1].contentRect;this.gY=i.width,this._Y=i.height,this.oY(this.gY,this._Y)}},this.wY=new Qr.ResizeObserver(this.AY),this.wY.observe(this.we)}};var RS=["Webkit","Moz","O","ms"],US=(()=>{let t=!1;try{if(void 0!==Qr&&"function"==typeof Qr.addEventListener){const i=w.defineProperty({},"passive",{get(){t=!0}});Qr.addEventListener("testPassiveEventSupport",qo,i),Qr.removeEventListener("testPassiveEventSupport",qo,i)}}catch(t){}return t})(),QS=Cn();function FS(t){return QS.has(t)||QS.set(t,function(t){const i=(OS||(OS=Qr&&Qr.document&&Qr.document.createElement("span")),OS);if(!i||!i.style)return t;if(void 0!==i.style[t])return t;const e=t.charAt(0).toUpperCase()+t.slice(1);for(const t of RS){const s=t+e;if(void 0!==i.style[s])return s}return t}(t)),QS.get(t)}function YS(t){const i=t.style;i.position="absolute",i.left="0",i.right="0",i.bottom="0",i.top="0",i.overflow="scroll",i.zIndex="-1",i.visibility="hidden"}function GS(t){const i=t.style;i.position="absolute",i.left="0",i.top="0",i[FS("transition")]="0s"}var VS=class extends PS{gn(){we(this.vY),this.vY=0,this.mY.removeEventListener("scroll",this.pY),this.yY.removeEventListener("scroll",this.pY),hs(this.MY),s&&s.removeEventListener("resize",this.TY)}get _u(){return this.we.getBoundingClientRect().height||this._Y||0}get ku(){return this.we.getBoundingClientRect().width||this.gY||0}constructor(t,i,e){super(t,i),this.vY=0,this.gY=NaN,this._Y=NaN,this.NY=void 0,this.tr=()=>{const t=1e5;this.DY.style.width=t+"px",this.DY.style.height=t+"px",this.mY.scrollLeft=t,this.mY.scrollTop=t,this.yY.scrollLeft=t,this.yY.scrollTop=t,0===this.yY.scrollTop&&ro(this.tr)},this.SY=()=>{const t=this.ku,i=this._u;this.oY(t,i),this.gY=t,this._Y=i,this.tr(),this.vY=0},this.pY=()=>{if(this.vY)return;const t=this.ku,i=this._u;t===this.gY&&i===this._Y||(this.vY=ro(this.SY))},this.TY=()=>{this.NY||(this.NY=u(this.IY,66))},this.IY=()=>{this.NY=void 0,this.EY()},this.EY=()=>{this.pY()};const n=function(t,i){return s.getComputedStyle(t,void 0).getPropertyValue(i)||t.style[i]}(t,"position");e||"static"!==n||(t.style.position="relative");const r=h.createElement("div");this.MY=r,this.mY=h.createElement("div"),this.DY=h.createElement("div"),this.yY=h.createElement("div"),this.bY=h.createElement("div"),YS(this.mY),YS(this.yY),GS(this.DY),function(t){GS(t),t.style.width="200%",t.style.height="200%"}(this.bY),r.appendChild(this.mY),r.appendChild(this.yY),this.mY.appendChild(this.DY),this.yY.appendChild(this.bY),t.appendChild(r),this.mY.addEventListener("scroll",this.pY),this.yY.addEventListener("scroll",this.pY),s&&s.addEventListener("resize",this.TY),this.pY()}},WS=class extends Bo{bn(t){this.wY||("function"==typeof Qr.ResizeObserver?this.wY=new BS(this.we,this.AY):this.wY=new VS(this.we,this.AY,t))}gn(){this.Vo(),this.wY&&(this.wY.gn(),this.wY=void 0)}get _u(){return this.wY?this.wY._u:0}get ku(){return this.wY?this.wY.ku:0}constructor(t){super(),this.wY=void 0,this.AY=(t,i)=>{this.Co(new zS(t,i))},this.we=t}},xr=class extends Yi{constructor(){super(ye.ra)}};var Oc=function(){if(!h)return;const t=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]];for(let i of t)if(i[1]in h)return{LY:i[0],kY:i[1],CY:i[2],xY:i[3],Qe:i[4],OY:i[5]}}(),HS=class extends Yi{constructor(){super(ye.ca)}},qS=class t extends Bo{static ia(t){return Boolean(Oc&&h[Oc.xY]&&Oc.LY in t)}mo(){const t=this.we[Oc.LY]();t&&t.then?t.then(this.jY,this.zY):(h.removeEventListener(Oc.OY,this.zY),h.addEventListener(Oc.OY,this.zY))}So(){const t=h[Oc.kY]();t&&t.then?t.then(this.jY,this.zY):(h.removeEventListener(Oc.OY,this.zY),h.addEventListener(Oc.OY,this.zY))}iR(){const t=this.cs,i=this.we===h[Oc.CY];this.cs=i,t!==i&&this.Co(new xr)}eR(){this.Co(new UN)}gn(){this.Vo(),h.removeEventListener(Oc.Qe,this.jY),h.removeEventListener(Oc.OY,this.zY)}constructor(i){super(),this.cs=!1,this.jY=()=>this.iR(),this.zY=()=>this.eR(),this.we=i,this.ta=t.ia(i),h.addEventListener(Oc.Qe,this.jY),this.iR()}},XS=class t extends Bo{static ia(t){return fi.Ga&&("webkitEnterFullscreen"in t||"webkitSupportsPresentationMode"in t)}mo(){this.we.webkitSupportsPresentationMode&&this.we.webkitSupportsPresentationMode("fullscreen")?fi.Ga?requestAnimationFrame((()=>this.we.webkitSetPresentationMode("fullscreen"))):this.we.webkitSetPresentationMode("fullscreen"):this.we.webkitEnterFullscreen()}So(){this.we.webkitSupportsPresentationMode&&this.we.webkitSupportsPresentationMode("inline")?this.we.webkitSetPresentationMode("inline"):this.we.webkitExitFullscreen()}iR(){const t=this.cs;let i;i=this.we.webkitPresentationMode?"fullscreen"===this.we.webkitPresentationMode:Boolean(this.we.webkitDisplayingFullscreen),this.cs=i,t!==i&&this.Co(new xr)}gn(){this.Vo(),this.we.removeEventListener("webkitbeginfullscreen",this.jY),this.we.removeEventListener("webkitendfullscreen",this.jY),this.we.removeEventListener("webkitpresentationmodechanged",this.jY)}constructor(i){super(),this.cs=!1,this.jY=()=>this.iR(),this.we=i,this.ta=t.ia(i),this.we.addEventListener("webkitbeginfullscreen",this.jY),this.we.addEventListener("webkitendfullscreen",this.jY),this.we.addEventListener("webkitpresentationmodechanged",this.jY),this.iR()}},ZS=class extends Bo{get ta(){return!!this.PY&&this.PY.ta}get cs(){return this.JB}mo(){this.PY?this.PY.mo():this.Co(new UN)}So(){for(const t of this.BY)t.cs&&t.So()}RY(t){this.PY=t}UY(t){this.BY.push(t),t.yn(ye.ra,this.iR),t.yn(ye.ha,this.Ds),this.iR()}QY(t){_s(this.BY,t),t.fn(ye.ra,this.iR),t.fn(ye.ha,this.Ds)}FY(){for(const t of this.BY)if(t.cs)return!0;return!1}tr(){this.PY=void 0,this.JB=!1;const t=this.BY.slice();for(const i of t)this.QY(i),i.gn();this.iR()}gn(){this.Vo(),this.tr()}constructor(...t){super(...t),this.BY=[],this.PY=void 0,this.JB=!1,this.iR=()=>{const t=this.JB,i=this.FY();t!==i&&(this.JB=i,this.Co(new xr))}}},KS=class extends Bo{get ta(){return!!this.YY&&this.GY.ta}get cs(){return this.GY.cs}mo(){this.YY&&this.GY.mo()}So(){this.GY.So()}VY(){this.GY.yn([ye.ra,ye.ca],this.iR),this.GY.yn(ye.ha,this.Ds)}WY(){this.GY.fn([ye.ra,ye.ca],this.iR),this.GY.fn(ye.ha,this.Ds)}Yn(){const t=this.GY,i=this.t.w_();if(t===i)return;this.oa=!0;const e=this.cs,s=this.ta;e&&this.So(),this.WY(),this.GY=i,this.VY(),e&&!this.cs&&this.ta?this.mo():this.So(),this.oa=!1,s!==this.ta&&this.Co(new HS),e!==this.cs&&this.Co(new xr)}gn(){this.Vo(),this.WY(),this.t.fn(Co.$g,this.HY)}constructor(t,i){super(),this.oa=!1,this.HY=()=>this.Yn(),this.iR=t=>{this.oa||this.Co(t)},this.t=t,this.YY=i,this.GY=new ma,this.VY(),this.t.yn(Co.$g,this.HY),this.Yn()}},JS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol:function(t){return"Symbol("+t+")"};function $S(){}var tI=Number.isNaN||function(t){return t!=t},iI=$S;function Ct(t){return"object"==typeof t&&null!==t||"function"==typeof t}function eI(t){return t.slice()}function sI(t,i,e,s,n){new j(t).set(new j(e,s,n),i)}function nI(t){return!1!==function(t){if("number"!=typeof t)return!1;if(tI(t))return!1;if(t<0)return!1;return!0}(t)&&t!==1/0}function rI(t,i,e){if("function"!=typeof t)throw new b("Argument is not a function");return Function.prototype.apply.call(t,i,e)}function eh(t,i,e,s){var n=t[i];if(void 0!==n){if("function"!=typeof n)throw new b(n+" is not a method");switch(e){case 0:return function(){return oI(n,t,s)};case 1:return function(i){var e=[i].concat(s);return oI(n,t,e)}}}return function(){return ee(void 0)}}function hI(t,i,e){var s=t[i];if(void 0!==s)return rI(s,t,e)}function oI(t,i,e){try{return ee(rI(t,i,e))}catch(t){return Kt(t)}}function aI(t){if(t=Number(t),tI(t)||t<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return t}function uI(t){if(void 0===t)return function(){return 1};if("function"!=typeof t)throw new b("size property of a queuing strategy must be a function");return function(i){return t(i)}}var cI=Promise,dI=Promise.prototype.then,lI=Promise.resolve.bind(cI),fI=Promise.reject.bind(cI);function pi(t){return new cI(t)}function ee(t){return lI(t)}function Kt(t){return fI(t)}function _I(t,i,e){return dI.call(t,i,e)}function ho(t,i,e){_I(_I(t,i,e),void 0,iI)}function gI(t,i){ho(t,i)}function wI(t,i){ho(t,void 0,i)}function AI(t,i,e){return _I(t,i,e)}function vI(t){_I(t,void 0,iI)}var gr=function(){function t(){this.qY=0,this.XY=0,this.ZY={KY:[],JY:void 0},this.$Y=this.ZY,this.qY=0,this.XY=0}return w.defineProperty(t.prototype,"length",{get:function(){return this.XY},enumerable:!0,configurable:!0}),t.prototype.push=function(t){var i=this.$Y,e=i;16383===i.KY.length&&(e={KY:[],JY:void 0}),i.KY.push(t),e!==i&&(this.$Y=e,i.JY=e),++this.XY},t.prototype.shift=function(){var t=this.ZY,i=t,e=this.qY,s=e+1,n=t.KY,r=n[e];return 16384===s&&(i=t.JY,s=0),--this.XY,this.qY=s,t!==i&&(this.ZY=i),n[e]=void 0,r},t.prototype.forEach=function(t){for(var i=this.qY,e=this.ZY,s=e.KY;!(i===s.length&&void 0===e.JY||i===s.length&&(i=0,0===(s=(e=e.JY).KY).length));)t(s[i]),++i},t.prototype.peek=function(){var t=this.ZY,i=this.qY;return t.KY[i]},t}();function qr(t,i,e){var s=null;!0===e&&(s=w.prototype);var n=w.create(s);return n.value=t,n.done=i,n}function mI(t,i){t.tG=!0,t.iG=i,i.eG=t,"readable"===i.ja?TI(t):"closed"===i.ja?function(t){TI(t),SI(t)}(t):NI(t,i.sG)}function pI(t,i){return yb(t.iG,i)}function yI(t){"readable"===t.iG.ja?DI(t,new b("Reader was released and can no longer be used to monitor the stream's closedness")):function(t,i){NI(t,i)}(t,new b("Reader was released and can no longer be used to monitor the stream's closedness")),t.iG.eG=void 0,t.iG=void 0}function MI(t){return new b("Cannot "+t+" a stream using a released reader")}function TI(t){t.hC=pi((function(i,e){t.nG=i,t.rG=e}))}function NI(t,i){TI(t),DI(t,i)}function DI(t,i){vI(t.hC),t.rG(i),t.nG=void 0,t.rG=void 0}function SI(t){t.nG(void 0),t.nG=void 0,t.rG=void 0}var II=JS("[[CancelSteps]]"),EI=JS("[[PullSteps]]");function bI(t,i){void 0===i&&(i=!1);var e=new zI(t);return e.tG=i,e}function LI(t){return pi((function(i,e){var s={Fb:i,Gb:e};t.eG.hG.push(s)}))}function kI(t,i,e){var s=t.eG;s.hG.shift().Fb(qr(i,e,s.tG))}function CI(t){return t.eG.hG.length}function xI(t){var i=t.eG;return void 0!==i&&!!Cr(i)}var OI,jI,zI=function(){function t(t){if(!1===En(t))throw new b("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===rh(t))throw new b("This stream has already been locked for exclusive reading by another reader");mI(this,t),this.hG=new gr}return w.defineProperty(t.prototype,"closed",{get:function(){return Cr(this)?this.hC:Kt(BI("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return Cr(this)?void 0===this.iG?Kt(MI("cancel")):pI(this,t):Kt(BI("cancel"))},t.prototype.read=function(){return Cr(this)?void 0===this.iG?Kt(MI("read from")):PI(this):Kt(BI("read"))},t.prototype.releaseLock=function(){if(!Cr(this))throw BI("releaseLock");if(void 0!==this.iG){if(this.hG.length>0)throw new b("Tried to release a reader lock when that reader has pending read() calls un-settled");yI(this)}},t}();function Cr(t){return!!Ct(t)&&!!w.prototype.hasOwnProperty.call(t,"hG")}function PI(t){var i=t.iG;return i.oG=!0,"closed"===i.ja?ee(qr(void 0,!0,t.tG)):"errored"===i.ja?Kt(i.sG):i.aG[EI]()}function BI(t){return new b("ReadableStreamDefaultReader.prototype."+t+" can only be used on a ReadableStreamDefaultReader")}"symbol"==typeof JS.asyncIterator&&((OI={})[JS.asyncIterator]=function(){return this},jI=OI,w.defineProperty(jI,JS.asyncIterator,{enumerable:!1}));var RI={next:function(){if(!1===UI(this))return Kt(QI("next"));var t=this.uG;return void 0===t.iG?Kt(MI("iterate")):AI(PI(t),(function(i){var e=i.done;return e&&yI(t),qr(i.value,e,!0)}))},return:function(t){if(!1===UI(this))return Kt(QI("next"));var i=this.uG;if(void 0===i.iG)return Kt(MI("finish iterating"));if(i.hG.length>0)return Kt(new b("Tried to release a reader lock when that reader has pending read() calls un-settled"));if(!1===this.cG){var e=pI(i,t);return yI(i),AI(e,(function(){return qr(t,!0,!0)}))}return yI(i),ee(qr(t,!0,!0))}};function UI(t){return!!Ct(t)&&!!w.prototype.hasOwnProperty.call(t,"uG")}function QI(t){return new b("ReadableStreamAsyncIterator."+t+" can only be used on a ReadableSteamAsyncIterator")}function FI(t){var i=t.dG.shift();return t.lG-=i.size,t.lG<0&&(t.lG=0),i.value}function YI(t,i,e){if(!nI(e=Number(e)))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");t.dG.push({value:i,size:e}),t.lG+=e}function kh(t){t.dG=new gr,t.lG=0}void 0!==jI&&w.setPrototypeOf(RI,jI),w.defineProperty(RI,"next",{enumerable:!1}),w.defineProperty(RI,"return",{enumerable:!1});var GI=JS("[[AbortSteps]]"),VI=JS("[[ErrorSteps]]"),WI=function(){function t(t,i){void 0===t&&(t={}),void 0===i&&(i={}),qI(this);var e=i.size,s=i.highWaterMark;if(void 0!==t.type)throw new RangeError("Invalid type is specified");var n=uI(e);void 0===s&&(s=1),function(t,i,e,s){var n=w.create(cE.prototype);function r(){return hI(i,"start",[n])}var h=eh(i,"write",1,[n]),o=eh(i,"close",0,[]),a=eh(i,"abort",1,[]);dE(t,n,r,h,o,a,e,s)}(this,t,s=aI(s),n)}return w.defineProperty(t.prototype,"locked",{get:function(){if(!1===Sr(this))throw vE("locked");return XI(this)},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===Sr(this)?Kt(vE("abort")):!0===XI(this)?Kt(new b("Cannot abort a stream that already has a writer")):ZI(this,t)},t.prototype.close=function(){return!1===Sr(this)?Kt(vE("close")):!0===XI(this)?Kt(new b("Cannot close a stream that already has a writer")):!0===Rn(this)?Kt(new b("Cannot close an already-closing stream")):KI(this)},t.prototype.getWriter=function(){if(!1===Sr(this))throw vE("getWriter");return HI(this)},t}();function HI(t){return new sE(t)}function qI(t){t.ja="writable",t.sG=void 0,t.oL=void 0,t.fG=void 0,t._G=new gr,t.gG=void 0,t.wG=void 0,t.AG=void 0,t.vG=void 0,t.mG=!1}function Sr(t){return!!Ct(t)&&!!w.prototype.hasOwnProperty.call(t,"fG")}function XI(t){return void 0!==t.oL}function ZI(t,i){var e=t.ja;if("closed"===e||"errored"===e)return ee(void 0);if(void 0!==t.vG)return t.vG.pG;var s=!1;"erroring"===e&&(s=!0,i=void 0);var n=pi((function(e,n){t.vG={pG:void 0,Fb:e,Gb:n,yG:i,MG:s}}));return t.vG.pG=n,!1===s&&$I(t,i),n}function KI(t){var i=t.ja;if("closed"===i||"errored"===i)return Kt(new b("The stream (in "+i+" state) is not in the writable state and cannot be closed"));var e=pi((function(i,e){var s={Fb:i,Gb:e};t.wG=s})),s=t.oL;return void 0!==s&&!0===t.mG&&"writable"===i&&bE(s),function(t){YI(t,"close",0),_E(t)}(t.fG),e}function JI(t,i){"writable"!==t.ja?tE(t):$I(t,i)}function $I(t,i){var e=t.fG;t.ja="erroring",t.sG=i;var s=t.oL;void 0!==s&&oE(s,i),!1===function(t){if(void 0===t.gG&&void 0===t.AG)return!1;return!0}(t)&&!0===e.TG&&tE(t)}function tE(t){t.ja="errored",t.fG[VI]();var i=t.sG;if(t._G.forEach((function(t){t.Gb(i)})),t._G=new gr,void 0!==t.vG){var e=t.vG;if(t.vG=void 0,!0===e.MG)return e.Gb(i),void iE(t);ho(t.fG[GI](e.yG),(function(){e.Fb(),iE(t)}),(function(i){e.Gb(i),iE(t)}))}else iE(t)}function Rn(t){return void 0!==t.wG||void 0!==t.AG}function iE(t){void 0!==t.wG&&(t.wG.Gb(t.sG),t.wG=void 0);var i=t.oL;void 0!==i&&TE(i,t.sG)}function eE(t,i){var e=t.oL;void 0!==e&&i!==t.mG&&(!0===i?function(t){DE(t)}(e):bE(e)),t.mG=i}var sE=function(){function t(t){if(!1===Sr(t))throw new b("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===XI(t))throw new b("This stream has already been locked for exclusive writing by another writer");this.NG=t,t.oL=this;var i=t.ja;if("writable"===i)!1===Rn(t)&&!0===t.mG?DE(this):IE(this),yE(this);else if("erroring"===i)SE(this,t.sG),yE(this);else if("closed"===i)IE(this),function(t){yE(t),NE(t)}(this);else{var e=t.sG;SE(this,e),ME(this,e)}}return w.defineProperty(t.prototype,"closed",{get:function(){return!1===nE(this)?Kt(mE("closed")):this.hC},enumerable:!0,configurable:!0}),w.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===nE(this))throw mE("desiredSize");if(void 0===this.NG)throw pE("desiredSize");return function(t){var i=t.NG,e=i.ja;if("errored"===e||"erroring"===e)return null;if("closed"===e)return 0;return fE(i.fG)}(this)},enumerable:!0,configurable:!0}),w.defineProperty(t.prototype,"ready",{get:function(){return!1===nE(this)?Kt(mE("ready")):this.DG},enumerable:!0,configurable:!0}),t.prototype.abort=function(t){return!1===nE(this)?Kt(mE("abort")):void 0===this.NG?Kt(pE("abort")):function(t,i){var e=t.NG;return ZI(e,i)}(this,t)},t.prototype.close=function(){if(!1===nE(this))return Kt(mE("close"));var t=this.NG;return void 0===t?Kt(pE("close")):!0===Rn(t)?Kt(new b("Cannot close an already-closing stream")):rE(this)},t.prototype.releaseLock=function(){if(!1===nE(this))throw mE("releaseLock");void 0!==this.NG&&aE(this)},t.prototype.write=function(t){return!1===nE(this)?Kt(mE("write")):void 0===this.NG?Kt(pE("write to")):uE(this,t)},t}();function nE(t){return!!Ct(t)&&!!w.prototype.hasOwnProperty.call(t,"NG")}function rE(t){return KI(t.NG)}function hE(t,i){"pending"===t.SG?TE(t,i):function(t,i){ME(t,i)}(t,i)}function oE(t,i){"pending"===t.IG?EE(t,i):function(t,i){SE(t,i)}(t,i)}function aE(t){var i=t.NG,e=new b("Writer was released and can no longer be used to monitor the stream's closedness");oE(t,e),hE(t,e),i.oL=void 0,t.NG=void 0}function uE(t,i){var e=t.NG,s=e.fG,n=function(t,i){try{return t.EG(i)}catch(i){return gE(t,i),1}}(s,i);if(e!==t.NG)return Kt(pE("write to"));var r=e.ja;if("errored"===r)return Kt(e.sG);if(!0===Rn(e)||"closed"===r)return Kt(new b("The stream is closing or closed and cannot be written to"));if("erroring"===r)return Kt(e.sG);var h=function(t){return pi((function(i,e){var s={Fb:i,Gb:e};t._G.push(s)}))}(e);return function(t,i,e){var s={chunk:i};try{YI(t,s,e)}catch(i){return void gE(t,i)}var n=t.bG;if(!1===Rn(n)&&"writable"===n.ja){eE(n,wE(t))}_E(t)}(s,i,n),h}var cE=function(){function t(){throw new b("WritableStreamDefaultController cannot be constructed explicitly")}return t.prototype.error=function(t){if(!1===function(t){if(!Ct(t))return!1;if(!w.prototype.hasOwnProperty.call(t,"bG"))return!1;return!0}(this))throw new b("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this.bG.ja&&AE(this,t)},t.prototype[GI]=function(t){var i=this.LG(t);return lE(this),i},t.prototype[VI]=function(){kh(this)},t}();function dE(t,i,e,s,n,r,h,o){i.bG=t,t.fG=i,i.dG=void 0,i.lG=void 0,kh(i),i.TG=!1,i.EG=o,i.kG=h,i.CG=s,i.xG=n,i.LG=r;var a=wE(i);eE(t,a),ho(ee(e()),(function(){i.TG=!0,_E(i)}),(function(e){i.TG=!0,JI(t,e)}))}function lE(t){t.CG=void 0,t.xG=void 0,t.LG=void 0,t.EG=void 0}function fE(t){return t.kG-t.lG}function _E(t){var i=t.bG;if(!1!==t.TG&&void 0===i.gG)if("erroring"!==i.ja){if(0!==t.dG.length){var e=function(t){return t.dG.peek().value}(t);"close"===e?function(t){var i=t.bG;(function(t){t.AG=t.wG,t.wG=void 0})(i),FI(t);var e=t.xG();lE(t),ho(e,(function(){!function(t){t.AG.Fb(void 0),t.AG=void 0,"erroring"===t.ja&&(t.sG=void 0,void 0!==t.vG&&(t.vG.Fb(),t.vG=void 0)),t.ja="closed";var i=t.oL;void 0!==i&&NE(i)}(i)}),(function(t){!function(t,i){t.AG.Gb(i),t.AG=void 0,void 0!==t.vG&&(t.vG.Gb(i),t.vG=void 0),JI(t,i)}(i,t)}))}(t):function(t,i){var e=t.bG;!function(t){t.gG=t._G.shift()}(e);var s=t.CG(i);ho(s,(function(){!function(t){t.gG.Fb(void 0),t.gG=void 0}(e);var i=e.ja;if(FI(t),!1===Rn(e)&&"writable"===i){var s=wE(t);eE(e,s)}_E(t)}),(function(i){"writable"===e.ja&&lE(t),function(t,i){t.gG.Gb(i),t.gG=void 0,JI(t,i)}(e,i)}))}(t,e.chunk)}}else tE(i)}function gE(t,i){"writable"===t.bG.ja&&AE(t,i)}function wE(t){return fE(t)<=0}function AE(t,i){var e=t.bG;lE(t),$I(e,i)}function vE(t){return new b("WritableStream.prototype."+t+" can only be used on a WritableStream")}function mE(t){return new b("WritableStreamDefaultWriter.prototype."+t+" can only be used on a WritableStreamDefaultWriter")}function pE(t){return new b("Cannot "+t+" a stream using a released writer")}function yE(t){t.hC=pi((function(i,e){t.nG=i,t.rG=e,t.SG="pending"}))}function ME(t,i){yE(t),TE(t,i)}function TE(t,i){vI(t.hC),t.rG(i),t.nG=void 0,t.rG=void 0,t.SG="rejected"}function NE(t){t.nG(void 0),t.nG=void 0,t.rG=void 0,t.SG="resolved"}function DE(t){t.DG=pi((function(i,e){t.OG=i,t.jG=e})),t.IG="pending"}function SE(t,i){DE(t),EE(t,i)}function IE(t){DE(t),bE(t)}function EE(t,i){vI(t.DG),t.jG(i),t.OG=void 0,t.jG=void 0,t.IG="rejected"}function bE(t){t.OG(void 0),t.OG=void 0,t.jG=void 0,t.IG="fulfilled"}function LE(t){if("object"!=typeof t||null===t)return!1;try{return"boolean"==typeof t.aborted}catch(t){return!1}}var kE="undefined"!=typeof DOMException?DOMException:void 0;var CE=function(t){if("function"!=typeof t&&"object"!=typeof t)return!1;try{return new t,!0}catch(t){return!1}}(kE)?kE:function(){var t=function(t,i){this.message=t||"",this.name=i||"Error",g.captureStackTrace&&g.captureStackTrace(this,this.constructor)};return t.prototype=w.create(g.prototype),w.defineProperty(t.prototype,"constructor",{value:t,writable:!0,configurable:!0}),t}();function xE(t,i,e,s,n,r){var h=bI(t),o=HI(i);t.oG=!0;var a=!1,u=ee(void 0);return pi((function(c,d){var l,f,_,g;if(void 0!==r){if(l=function(){var e=new CE("Aborted","AbortError"),r=[];!1===s&&r.push((function(){return"writable"===i.ja?ZI(i,e):ee(void 0)})),!1===n&&r.push((function(){return"readable"===t.ja?yb(t,e):ee(void 0)})),m((function(){return Promise.all(r.map((function(t){return t()})))}),!0,e)},!0===r.aborted)return void l();r.addEventListener("abort",l)}if(v(t,h.hC,(function(t){!1===s?m((function(){return ZI(i,t)}),!0,t):p(!0,t)})),v(i,o.hC,(function(i){!1===n?m((function(){return yb(t,i)}),!0,i):p(!0,i)})),f=t,_=h.hC,g=function(){!1===e?m((function(){return function(t){var i=t.NG,e=i.ja;return!0===Rn(i)||"closed"===e?ee(void 0):"errored"===e?Kt(i.sG):rE(t)}(o)})):p()},"closed"===f.ja?g():gI(_,g),!0===Rn(i)||"closed"===i.ja){var w=new b("the destination writable stream closed before all data could be piped to it");!1===n?m((function(){return yb(t,w)}),!0,w):p(!0,w)}function A(){var t=u;return _I(u,(function(){return t!==u?A():void 0}))}function v(t,i,e){"errored"===t.ja?e(t.sG):wI(i,e)}function m(t,e,s){function n(){ho(t(),(function(){return y(e,s)}),(function(t){return y(!0,t)}))}!0!==a&&(a=!0,"writable"===i.ja&&!1===Rn(i)?gI(A(),n):n())}function p(t,e){!0!==a&&(a=!0,"writable"===i.ja&&!1===Rn(i)?gI(A(),(function(){return y(t,e)})):y(t,e))}function y(t,i){aE(o),yI(h),void 0!==r&&r.removeEventListener("abort",l),t?d(i):c(void 0)}vI(pi((function(t,i){!function e(s){s?t():_I(!0===a?ee(!0):_I(o.DG,(function(){return _I(PI(h),(function(t){return!0===t.done||(u=_I(uE(o,t.value),void 0,$S),!1)}))})),e,i)}(!1)})))}))}var OE=function(){function t(){throw new b}return w.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===jE(this))throw GE("desiredSize");return QE(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===jE(this))throw GE("close");if(!1===FE(this))throw new b("The stream is not in a state that permits close");RE(this)},t.prototype.enqueue=function(t){if(!1===jE(this))throw GE("enqueue");if(!1===FE(this))throw new b("The stream is not in a state that permits enqueue");return UE(this,t)},t.prototype.error=function(t){if(!1===jE(this))throw GE("error");bh(this,t)},t.prototype[II]=function(t){kh(this);var i=this.zG(t);return BE(this),i},t.prototype[EI]=function(){var t=this.BG;if(this.dG.length>0){var i=FI(this);return!0===this.UG&&0===this.dG.length?(BE(this),Mb(t)):zE(this),ee(qr(i,!1,t.eG.tG))}var e=LI(t);return zE(this),e},t}();function jE(t){return!!Ct(t)&&!!w.prototype.hasOwnProperty.call(t,"BG")}function zE(t){!1!==PE(t)&&(!0!==t.QG?(t.QG=!0,ho(t.FG(),(function(){t.QG=!1,!0===t.YG&&(t.YG=!1,zE(t))}),(function(i){bh(t,i)}))):t.YG=!0)}function PE(t){var i=t.BG;return!1!==FE(t)&&(!1!==t.TG&&(!0===rh(i)&&CI(i)>0||QE(t)>0))}function BE(t){t.FG=void 0,t.zG=void 0,t.EG=void 0}function RE(t){var i=t.BG;t.UG=!0,0===t.dG.length&&(BE(t),Mb(i))}function UE(t,i){var e=t.BG;if(!0===rh(e)&&CI(e)>0)kI(e,i,!1);else{var s=void 0;try{s=t.EG(i)}catch(i){throw bh(t,i),i}try{YI(t,i,s)}catch(i){throw bh(t,i),i}}zE(t)}function bh(t,i){var e=t.BG;"readable"===e.ja&&(kh(t),BE(t),Tb(e,i))}function QE(t){var i=t.BG.ja;return"errored"===i?null:"closed"===i?0:t.kG-t.lG}function FE(t){var i=t.BG.ja;return!1===t.UG&&"readable"===i}function YE(t,i,e,s,n,r,h){i.BG=t,i.dG=void 0,i.lG=void 0,kh(i),i.TG=!1,i.UG=!1,i.YG=!1,i.QG=!1,i.EG=h,i.kG=r,i.FG=s,i.zG=n,t.aG=i,ho(ee(e()),(function(){i.TG=!0,zE(i)}),(function(t){bh(i,t)}))}function GE(t){return new b("ReadableStreamDefaultController.prototype."+t+" can only be used on a ReadableStreamDefaultController")}var VE=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&_.floor(t)===t},WE=function(){function t(){throw new b("ReadableStreamBYOBRequest cannot be used directly")}return w.defineProperty(t.prototype,"view",{get:function(){if(!1===XE(this))throw db("view");return this.tS},enumerable:!0,configurable:!0}),t.prototype.respond=function(t){if(!1===XE(this))throw db("respond");if(void 0===this.GG)throw new b("This BYOB request has been invalidated");this.tS.buffer,function(t,i){if(i=Number(i),!1===nI(i))throw new RangeError("bytesWritten must be a finite");rb(t,i)}(this.GG,t)},t.prototype.respondWithNewView=function(t){if(!1===XE(this))throw db("respond");if(void 0===this.GG)throw new b("This BYOB request has been invalidated");if(!ArrayBuffer.isView(t))throw new b("You can only respond with array buffer views");t.buffer,function(t,i){var e=t.VG.peek();if(e.byteOffset+e.bytesFilled!==i.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(e.byteLength!==i.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");e.buffer=i.buffer,rb(t,i.byteLength)}(this.GG,t)},t}(),HE=function(){function t(){throw new b("ReadableByteStreamController constructor cannot be used directly")}return w.defineProperty(t.prototype,"byobRequest",{get:function(){if(!1===qE(this))throw lb("byobRequest");if(void 0===this.WG&&this.VG.length>0){var t=this.VG.peek(),i=new j(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),e=w.create(WE.prototype);!function(t,i,e){t.GG=i,t.tS=e}(e,this,i),this.WG=e}return this.WG},enumerable:!0,configurable:!0}),w.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===qE(this))throw lb("desiredSize");return ub(this)},enumerable:!0,configurable:!0}),t.prototype.close=function(){if(!1===qE(this))throw lb("close");if(!0===this.UG)throw new b("The stream has already been closed; do not close it again!");var t=this.HG.ja;if("readable"!==t)throw new b("The stream (in "+t+" state) is not in the readable state and cannot be closed");!function(t){var i=t.HG;if(t.lG>0)return void(t.UG=!0);if(t.VG.length>0){if(t.VG.peek().bytesFilled>0){var e=new b("Insufficient bytes to fill elements in the given buffer");throw ab(t,e),e}}ob(t),Mb(i)}(this)},t.prototype.enqueue=function(t){if(!1===qE(this))throw lb("enqueue");if(!0===this.UG)throw new b("stream is closed or draining");var i=this.HG.ja;if("readable"!==i)throw new b("The stream (in "+i+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(t))throw new b("You can only enqueue array buffer views when using a ReadableByteStreamController");t.buffer,function(t,i){var e=t.HG,s=i.buffer,n=i.byteOffset,r=i.byteLength,h=s;if(!0===xI(e)){if(0===CI(e))$E(t,h,n,r);else kI(e,new j(h,n,r),!1)}else!0===gb(e)?($E(t,h,n,r),nb(t)):$E(t,h,n,r);ZE(t)}(this,t)},t.prototype.error=function(t){if(!1===qE(this))throw lb("error");ab(this,t)},t.prototype[II]=function(t){this.VG.length>0&&(this.VG.peek().bytesFilled=0);kh(this);var i=this.zG(t);return ob(this),i},t.prototype[EI]=function(){var t=this.HG;if(this.lG>0){var i=this.dG.shift();this.lG-=i.byteLength,eb(this);var e=void 0;try{e=new j(i.buffer,i.byteOffset,i.byteLength)}catch(t){return Kt(t)}return ee(qr(e,!1,t.eG.tG))}var s=this.qG;if(void 0!==s){var n=void 0;try{n=new ArrayBuffer(s)}catch(t){return Kt(t)}var r={buffer:n,byteOffset:0,byteLength:s,bytesFilled:0,elementSize:1,ctor:j,readerType:"default"};this.VG.push(r)}var h=LI(t);return ZE(this),h},t}();function qE(t){return!!Ct(t)&&!!w.prototype.hasOwnProperty.call(t,"HG")}function XE(t){return!!Ct(t)&&!!w.prototype.hasOwnProperty.call(t,"GG")}function ZE(t){var i=function(t){var i=t.HG;if("readable"!==i.ja)return!1;if(!0===t.UG)return!1;if(!1===t.TG)return!1;if(!0===xI(i)&&CI(i)>0)return!0;if(!0===gb(i)&&_b(i)>0)return!0;var e=ub(t);if(e>0)return!0;return!1}(t);!1!==i&&(!0!==t.QG?(t.QG=!0,ho(t.FG(),(function(){t.QG=!1,!0===t.YG&&(t.YG=!1,ZE(t))}),(function(i){ab(t,i)}))):t.YG=!0)}function KE(t,i){var e=!1;"closed"===t.ja&&(e=!0);var s=JE(i);"default"===i.readerType?kI(t,s,e):function(t,i,e){var s=t.eG,n=s.XG.shift();n.Fb(qr(i,e,s.tG))}(t,s,e)}function JE(t){var i=t.bytesFilled,e=t.elementSize;return new t.ctor(t.buffer,t.byteOffset,i/e)}function $E(t,i,e,s){t.dG.push({buffer:i,byteOffset:e,byteLength:s}),t.lG+=s}function tb(t,i){var e=i.elementSize,s=i.bytesFilled-i.bytesFilled%e,n=_.min(t.lG,i.byteLength-i.bytesFilled),r=i.bytesFilled+n,h=r-r%e,o=n,a=!1;h>s&&(o=h-i.bytesFilled,a=!0);for(var u=t.dG;o>0;){var c=u.peek(),d=_.min(o,c.byteLength),l=i.byteOffset+i.bytesFilled;sI(i.buffer,l,c.buffer,c.byteOffset,d),c.byteLength===d?u.shift():(c.byteOffset+=d,c.byteLength-=d),t.lG-=d,ib(t,d,i),o-=d}return a}function ib(t,i,e){sb(t),e.bytesFilled+=i}function eb(t){0===t.lG&&!0===t.UG?(ob(t),Mb(t.HG)):ZE(t)}function sb(t){void 0!==t.WG&&(t.WG.GG=void 0,t.WG.tS=void 0,t.WG=void 0)}function nb(t){for(;t.VG.length>0;){if(0===t.lG)return;var i=t.VG.peek();!0===tb(t,i)&&(hb(t),KE(t.HG,i))}}function rb(t,i){var e=t.VG.peek();if("closed"===t.HG.ja){if(0!==i)throw new b("bytesWritten must be 0 when calling respond() on a closed stream");!function(t,i){i.buffer=i.buffer;var e=t.HG;if(!0===gb(e))for(;_b(e)>0;)KE(e,hb(t))}(t,e)}else!function(t,i,e){if(e.bytesFilled+i>e.byteLength)throw new RangeError("bytesWritten out of range");if(ib(t,i,e),!(e.bytesFilled<e.elementSize)){hb(t);var s=e.bytesFilled%e.elementSize;if(s>0){var n=e.byteOffset+e.bytesFilled,r=e.buffer.slice(n-s,n);$E(t,r,0,r.byteLength)}e.buffer=e.buffer,e.bytesFilled-=s,KE(t.HG,e),nb(t)}}(t,i,e);ZE(t)}function hb(t){var i=t.VG.shift();return sb(t),i}function ob(t){t.FG=void 0,t.zG=void 0}function ab(t,i){var e=t.HG;"readable"===e.ja&&(!function(t){sb(t),t.VG=new gr}(t),kh(t),ob(t),Tb(e,i))}function ub(t){var i=t.HG.ja;return"errored"===i?null:"closed"===i?0:t.kG-t.lG}function cb(t,i,e){var s=w.create(HE.prototype);var n=eh(i,"pull",0,[s]),r=eh(i,"cancel",1,[]),h=i.autoAllocateChunkSize;if(void 0!==h&&(h=Number(h),!1===VE(h)||h<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");!function(t,i,e,s,n,r,h){i.HG=t,i.YG=!1,i.QG=!1,i.WG=void 0,i.dG=i.lG=void 0,kh(i),i.UG=!1,i.TG=!1,i.kG=aI(r),i.FG=s,i.zG=n,i.qG=h,i.VG=new gr,t.aG=i,ho(ee(e()),(function(){i.TG=!0,ZE(i)}),(function(t){ab(i,t)}))}(t,s,(function(){return hI(i,"start",[s])}),n,r,e,h)}function db(t){return new b("ReadableStreamBYOBRequest.prototype."+t+" can only be used on a ReadableStreamBYOBRequest")}function lb(t){return new b("ReadableByteStreamController.prototype."+t+" can only be used on a ReadableByteStreamController")}function fb(t){return pi((function(i,e){var s={Fb:i,Gb:e};t.eG.XG.push(s)}))}function _b(t){return t.eG.XG.length}function gb(t){var i=t.eG;return void 0!==i&&!!Ab(i)}var wb=function(){function t(t){if(!En(t))throw new b("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===qE(t.aG))throw new b("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(rh(t))throw new b("This stream has already been locked for exclusive reading by another reader");mI(this,t),this.XG=new gr}return w.defineProperty(t.prototype,"closed",{get:function(){return Ab(this)?this.hC:Kt(vb("closed"))},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return Ab(this)?void 0===this.iG?Kt(MI("cancel")):pI(this,t):Kt(vb("cancel"))},t.prototype.read=function(t){return Ab(this)?void 0===this.iG?Kt(MI("read from")):ArrayBuffer.isView(t)?(t.buffer,0===t.byteLength?Kt(new b("view must have non-zero byteLength")):function(t,i){var e=t.iG;if(e.oG=!0,"errored"===e.ja)return Kt(e.sG);return function(t,i){var e=t.HG,s=1;i.constructor!==DataView&&(s=i.constructor.BYTES_PER_ELEMENT);var n=i.constructor,r={buffer:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength,bytesFilled:0,elementSize:s,ctor:n,readerType:"byob"};if(t.VG.length>0)return t.VG.push(r),fb(e);if("closed"===e.ja)return ee(qr(new n(r.buffer,r.byteOffset,0),!0,e.eG.tG));if(t.lG>0){if(!0===tb(t,r)){var h=JE(r);return eb(t),ee(qr(h,!1,e.eG.tG))}if(!0===t.UG){var o=new b("Insufficient bytes to fill elements in the given buffer");return ab(t,o),Kt(o)}}t.VG.push(r);var a=fb(e);return ZE(t),a}(e.aG,i)}(this,t)):Kt(new b("view must be an array buffer view")):Kt(vb("read"))},t.prototype.releaseLock=function(){if(!Ab(this))throw vb("releaseLock");if(void 0!==this.iG){if(this.XG.length>0)throw new b("Tried to release a reader lock when that reader has pending read() calls un-settled");yI(this)}},t}();function Ab(t){return!!Ct(t)&&!!w.prototype.hasOwnProperty.call(t,"XG")}function vb(t){return new b("ReadableStreamBYOBReader.prototype."+t+" can only be used on a ReadableStreamBYOBReader")}var xi=function(){function t(t,i){void 0===t&&(t={}),void 0===i&&(i={}),pb(this);var e=i.size,s=i.highWaterMark,n=t.type;if("bytes"===String(n)){if(void 0!==e)throw new RangeError("The strategy for a byte stream cannot have a size function");void 0===s&&(s=0),cb(this,t,s=aI(s))}else{if(void 0!==n)throw new RangeError("Invalid type is specified");var r=uI(e);void 0===s&&(s=1),function(t,i,e,s){var n=w.create(OE.prototype),r=eh(i,"pull",0,[n]),h=eh(i,"cancel",1,[]);YE(t,n,(function(){return hI(i,"start",[n])}),r,h,e,s)}(this,t,s=aI(s),r)}}return w.defineProperty(t.prototype,"locked",{get:function(){if(!1===En(this))throw Nb("locked");return rh(this)},enumerable:!0,configurable:!0}),t.prototype.cancel=function(t){return!1===En(this)?Kt(Nb("cancel")):!0===rh(this)?Kt(new b("Cannot cancel a stream that already has a reader")):yb(this,t)},t.prototype.getReader=function(t){var i=(void 0===t?{}:t).mode;if(!1===En(this))throw Nb("getReader");if(void 0===i)return bI(this,!0);if("byob"===(i=String(i)))return function(t,i){void 0===i&&(i=!1);var e=new wb(t);return e.tG=i,e}(this,!0);throw new RangeError("Invalid mode is specified")},t.prototype.pipeThrough=function(t,i){var e=t.writable,s=t.readable,n=void 0===i?{}:i,r=n.preventClose,h=n.preventAbort,o=n.preventCancel,a=n.signal;if(!1===En(this))throw Nb("pipeThrough");if(!1===Sr(e))throw new b("writable argument to pipeThrough must be a WritableStream");if(!1===En(s))throw new b("readable argument to pipeThrough must be a ReadableStream");if(r=Boolean(r),h=Boolean(h),o=Boolean(o),void 0!==a&&!LE(a))throw new b("ReadableStream.prototype.pipeThrough's signal option must be an AbortSignal");if(!0===rh(this))throw new b("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(!0===XI(e))throw new b("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return vI(xE(this,e,r,h,o,a)),s},t.prototype.pipeTo=function(t,i){var e=void 0===i?{}:i,s=e.preventClose,n=e.preventAbort,r=e.preventCancel,h=e.signal;return!1===En(this)?Kt(Nb("pipeTo")):!1===Sr(t)?Kt(new b("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")):(s=Boolean(s),n=Boolean(n),r=Boolean(r),void 0===h||LE(h)?!0===rh(this)?Kt(new b("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):!0===XI(t)?Kt(new b("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):xE(this,t,s,n,r,h):Kt(new b("ReadableStream.prototype.pipeTo's signal option must be an AbortSignal")))},t.prototype.tee=function(){if(!1===En(this))throw Nb("tee");var t=function(t,i){var e,s,n,r,h,o=bI(t),a=!1,u=!1,c=!1,d=pi((function(t){h=t}));function l(){return!0===a||(a=!0,vI(AI(PI(o),(function(t){if(a=!1,!0===t.done)return!1===u&&RE(n.aG),void(!1===c&&RE(r.aG));var i=t.value,e=i,s=i;!1===u&&UE(n.aG,e),!1===c&&UE(r.aG,s)})))),ee(void 0)}function f(){}return n=mb(f,l,(function(i){if(u=!0,e=i,!0===c){var n=eI([e,s]),r=yb(t,n);h(r)}return d})),r=mb(f,l,(function(i){if(c=!0,s=i,!0===u){var n=eI([e,s]),r=yb(t,n);h(r)}return d})),wI(o.hC,(function(t){bh(n.aG,t),bh(r.aG,t)})),[n,r]}(this);return eI(t)},t.prototype.getIterator=function(t){var i=(void 0===t?{}:t).preventCancel,e=void 0!==i&&i;if(!1===En(this))throw Nb("getIterator");return function(t,i){void 0===i&&(i=!1);var e=bI(t),s=w.create(RI);return s.uG=e,s.cG=Boolean(i),s}(this,e)},t}();function mb(t,i,e,s,n){void 0===s&&(s=1),void 0===n&&(n=function(){return 1});var r=w.create(xi.prototype);return pb(r),YE(r,w.create(OE.prototype),t,i,e,s,n),r}function pb(t){t.ja="readable",t.eG=void 0,t.sG=void 0,t.oG=!1}function En(t){return!!Ct(t)&&!!w.prototype.hasOwnProperty.call(t,"aG")}function rh(t){return void 0!==t.eG}function yb(t,i){return t.oG=!0,"closed"===t.ja?ee(void 0):"errored"===t.ja?Kt(t.sG):(Mb(t),AI(t.aG[II](i),$S))}function Mb(t){t.ja="closed";var i=t.eG;void 0!==i&&(Cr(i)&&(i.hG.forEach((function(t){t.Fb(qr(void 0,!0,i.tG))})),i.hG=new gr),SI(i))}function Tb(t,i){t.ja="errored",t.sG=i;var e=t.eG;void 0!==e&&(Cr(e)?(e.hG.forEach((function(t){t.Gb(i)})),e.hG=new gr):(e.XG.forEach((function(t){t.Gb(i)})),e.XG=new gr),DI(e,i))}function Nb(t){return new b("ReadableStream.prototype."+t+" can only be used on a ReadableStream")}"symbol"==typeof JS.asyncIterator&&w.defineProperty(xi.prototype,JS.asyncIterator,{value:xi.prototype.getIterator,enumerable:!1,writable:!0,configurable:!0});!function(){function t(t){var i=t.highWaterMark;this.highWaterMark=i}t.prototype.size=function(t){return t.byteLength}}();var Db=function(){function t(t){var i=t.highWaterMark;this.highWaterMark=i}return t.prototype.size=function(){return 1},t}(),De=function(){function t(t,i,e){void 0===t&&(t={}),void 0===i&&(i={}),void 0===e&&(e={});var s=i.size,n=i.highWaterMark,r=e.size,h=e.highWaterMark;if(void 0!==t.writableType)throw new RangeError("Invalid writable type specified");var o=uI(s);if(void 0===n&&(n=1),n=aI(n),void 0!==t.readableType)throw new RangeError("Invalid readable type specified");var a,u=uI(r);void 0===h&&(h=0),h=aI(h),function(t,i,e,s,n,r){function h(){return i}function o(i){return function(t,i){var e=t.ZG;if(!0===t.mG){return AI(t.KG,(function(){var s=t.JG;if("erroring"===s.ja)throw s.sG;return Ob(e,i)}))}return Ob(e,i)}(t,i)}function a(i){return function(t,i){return Ib(t,i),ee(void 0)}(t,i)}function u(){return function(t){var i=t.$G,e=t.ZG,s=e.tV();return Cb(e),AI(s,(function(){if("errored"===i.ja)throw i.sG;var t=i.aG;!0===FE(t)&&RE(t)}),(function(e){throw Ib(t,e),i.sG}))}(t)}function c(){return function(t){return bb(t,!1),t.KG}(t)}function d(i){return Eb(t,i),ee(void 0)}t.JG=function(t,i,e,s,n,r){void 0===n&&(n=1),void 0===r&&(r=function(){return 1});var h=w.create(WI.prototype);return qI(h),dE(h,w.create(cE.prototype),t,i,e,s,n,r),h}(h,o,u,a,e,s),t.$G=mb(h,c,d,n,r),t.mG=void 0,t.KG=void 0,t.iV=void 0,bb(t,!0),t.ZG=void 0}(this,pi((function(t){a=t})),n,o,h,u),function(t,i){var e=w.create(Lb.prototype),s=function(t){try{return xb(e,t),ee(void 0)}catch(t){return Kt(t)}},n=i.transform;if(void 0!==n){if("function"!=typeof n)throw new b("transform is not a method");s=function(t){return oI(n,i,[t,e])}}var r=eh(i,"flush",0,[e]);!function(t,i,e,s){i.eV=t,t.ZG=i,i.sV=e,i.tV=s}(t,e,s,r)}(this,t);var c=hI(t,"start",[this.ZG]);a(c)}return w.defineProperty(t.prototype,"readable",{get:function(){if(!1===Sb(this))throw zb("readable");return this.$G},enumerable:!0,configurable:!0}),w.defineProperty(t.prototype,"writable",{get:function(){if(!1===Sb(this))throw zb("writable");return this.JG},enumerable:!0,configurable:!0}),t}();function Sb(t){return!!Ct(t)&&!!w.prototype.hasOwnProperty.call(t,"ZG")}function Ib(t,i){bh(t.$G.aG,i),Eb(t,i)}function Eb(t,i){Cb(t.ZG),gE(t.JG.fG,i),!0===t.mG&&bb(t,!1)}function bb(t,i){void 0!==t.KG&&t.iV(),t.KG=pi((function(i){t.iV=i})),t.mG=i}var Lb=function(){function t(){throw new b("TransformStreamDefaultController instances cannot be created directly")}return w.defineProperty(t.prototype,"desiredSize",{get:function(){if(!1===kb(this))throw jb("desiredSize");return QE(this.eV.$G.aG)},enumerable:!0,configurable:!0}),t.prototype.enqueue=function(t){if(!1===kb(this))throw jb("enqueue");xb(this,t)},t.prototype.error=function(t){if(!1===kb(this))throw jb("error");!function(t,i){Ib(t.eV,i)}(this,t)},t.prototype.terminate=function(){if(!1===kb(this))throw jb("terminate");!function(t){var i=t.eV,e=i.$G.aG;!0===FE(e)&&RE(e);var s=new b("TransformStream terminated");Eb(i,s)}(this)},t}();function kb(t){return!!Ct(t)&&!!w.prototype.hasOwnProperty.call(t,"eV")}function Cb(t){t.sV=void 0,t.tV=void 0}function xb(t,i){var e=t.eV,s=e.$G.aG;if(!1===FE(s))throw new b("Readable side is not in a state that permits enqueue");try{UE(s,i)}catch(t){throw Eb(e,t),e.$G.sG}var n=function(t){return!0!==PE(t)}(s);n!==e.mG&&bb(e,!0)}function Ob(t,i){return AI(t.sV(i),void 0,(function(i){throw Ib(t.eV,i),i}))}function jb(t){return new b("TransformStreamDefaultController.prototype."+t+" can only be used on a TransformStreamDefaultController")}function zb(t){return new b("TransformStream.prototype."+t+" can only be used on a TransformStream")}var Pb,Bb=class extends Jo{get name(){return"AggregateError"}constructor(t){super(""+t.join("\n"),t[0]),this.causes=t}};function Rb(t){return function(t){return new xi({start(i){for(const e of t)i.enqueue(e);i.close()}})}([t])}function Ub(t){return Rb(function(t){return new j(t)}(t))}function Qb(t,i){let e=i;const s=t.getReader(),n=new Rs,r=()=>{h();const t=new is;s.cancel(t).catch(qo),n.Yb(t)},h=()=>{e&&(e.Gd(r),e=void 0)};e&&(e.Bd?r():e.Yd(r));const o=[],a=t=>t.done?(h(),Promise.resolve(o)):(o.push(t.value),Promise.resolve(s.read()).then(a));return Promise.resolve(s.read()).then(a).then((t=>{h(),n.Qb(t)}),(t=>{h(),n.Yb(t)})),n.Vb}function bt(t,i){return Qb(t,i).then((t=>Qt(t).buffer))}function Fb(t,i){let e=i;const{readable:s,writable:n}=new De,r=n.getWriter(),h=()=>{e&&e.Xd()};return r.closed.then(h,h),t.then((t=>(e=void 0,r.releaseLock(),t.pipeTo(n).catch(qo))),(t=>(e=void 0,r.releaseLock(),n.abort(t).catch(qo)))),s}function Yb(t){const{readable:i,writable:e}=new De;return t.pipeTo(e,{preventCancel:!0}).catch((i=>{let e;e=$(i)?i[0]===i[1]||Mi(i[0])&&Mi(i[1])?i[0]:new Bb(i):i,t.cancel(e).catch(qo)})),i.tee()}function Gb(t){return $e(new j(t))}function Vb(t){return bu(t).buffer}!function(t){t[t.US=0]="US",t[t.nV=1]="nV"}(Pb||(Pb={}));var Wb="content-type",Hb="text/plain;charset=UTF-8",xh=class{QO(t){return this.pI(t).then(JSON.parse)}mO(t,i){switch(t){case dm.PS:return this.nj(i);case dm.RS:return this.QO(i);case dm.US:return this.rV();case dm.Ru:return this.pI(i);default:throw new b}}};function qb(t,i,e){if(t instanceof xh)return t;if(t instanceof xi)return function(t,i){return new Zb({Rg:0,rV:t,Fz:Xb(i)})}(t,e);const s=Xb(e),n=Promise.resolve(t).then((t=>function(t,i){if(t){if("string"==typeof t)return{Rg:dm.Ru,rI:t,Fz:i||Hb};if(t instanceof ArrayBuffer||Ja(t))return{Rg:dm.PS,rI:sL(t),Fz:i};if(Nn(t)||$(t))return{Rg:dm.RS,rI:t,Fz:i};throw new b("Unsupported BodyInit type")}return{Rg:dm.Ru,rI:null,Fz:i}}(t,s)));return new Zb({Rg:1,Vb:n,hV:i})}function Xb(t){return(t.get(Wb)||"").toLowerCase()}var Zb=class t extends xh{get oV(){return this.aV}get uV(){return 0===this.cV.Rg}dV(){return this.lV.Vb}pI(t){return this.fV(Kb,t)}QO(t){return this.fV($b,t)}nj(t){return this.fV(iL,t)}rV(){return this._V(function(t){return 0===t.Rg?t.rV:Fb(t.Vb.then(eL).then(Ub),t.hV)}(this.cV))}fV(t,i){if(this.aV)return Promise.reject(new b("Already used"));this.aV=!0;const e=t(this.cV,i);return this.lV.Zd(e.then(qo)),e}_V(t){if(this.aV)throw new b("Already used");if(t.locked)throw new b("Body stream is locked");this.aV=!0;const i=new De,e=Promise.resolve(t.pipeTo(i.writable));return this.lV.Zd(e),i.readable}gV(t){this.cV=t,1===t.Rg&&t.Vb.catch(qo)}wV(){if(this.aV)throw new b("Already used");const i=function(t){if(0===t.Rg){const[i,e]=t.rV.tee();return[{Rg:t.Rg,rV:i,Fz:t.Fz},{Rg:t.Rg,rV:e,Fz:t.Fz}]}{const[i,e]=t.hV.Kd();return[{Rg:t.Rg,Vb:t.Vb,hV:i},{Rg:t.Rg,Vb:t.Vb,hV:e}]}}(this.cV),e=i[0],s=i[1];return this.gV(e),new t(s)}constructor(t){super(),this.aV=!1,this.lV=new Rs,this.lV.Vb.catch(qo),this.gV(t)}};function Kb(t,i){return 0===t.Rg?bt(t.rV,i).then(Gb):(i&&t.hV.Zd(i),dn(t.Vb.then(Jb),t.hV))}function Jb(t){switch(t.Rg){case dm.Ru:return Promise.resolve(t.rI||"");case dm.PS:return Promise.resolve(t.rI).then(Gb);case dm.RS:return Promise.resolve(t.rI).then(JSON.stringify)}}function $b(t,i){return 0===t.Rg?Kb(t,i).then(JSON.parse):(i&&t.hV.Zd(i),dn(t.Vb.then(tL),t.hV))}function tL(t){return t.Rg===dm.RS?Promise.resolve(t.rI):Jb(t).then(JSON.parse)}function iL(t,i){return 0===t.Rg?bt(t.rV,i):(i&&t.hV.Zd(i),dn(t.Vb.then(eL),t.hV))}function eL(t){switch(t.Rg){case dm.PS:return Promise.resolve(t.rI);case dm.Ru:case dm.RS:return Jb(t).then(Vb)}}function sL(t){return t instanceof ArrayBuffer?t:_t($t(t)).buffer}var nL=class extends xh{get oV(){return this.AV.oV}get uV(){return this.AV.uV}dV(){return this.AV.dV()}pI(t){return this.AV.pI(t)}QO(t){return this.AV.QO(t)}nj(t){return this.AV.nj(t)}rV(t){return this.AV.rV(t)}wV(){return this.AV.wV()}constructor(t){super(),this.AV=t}};function Mr(t){return t.SS>=200&&t.SS<=299||304===t.SS}var jh=class t extends nL{Om(t){return this.mO(this.aI,t)}Sm(){return new t({Om:this.wV(),MS:this.MS},this)}constructor(t,i){let e,s,n,r,h;i?(e=i.hI,s=i.aI,n=i.SS,r=i.FO,h=i.vV):(e=[],s=dm.Ru,n=200,r="OK",h=!1);const o=t.MS,a=new gs(t.hI||e),u=t.aI||s,c=t.yI||(i&&i.MS===o?i.yI:o.zu),d=i?i.AV:null;super(qb(void 0!==t.Om?t.Om:d,t.hV||new er,a)),this.hI=a,this.MS=o,this.yI=c,this.aI=u,this.SS=void 0!==t.SS?t.SS:n,this.FO=void 0!==t.FO?String(t.FO):r,this.vV=t.vV||h}},rL=class{MS(t){const i=function(t){return new jh({Om:null,hI:{},MS:t,yI:t.zu,aI:t.aI,SS:0,FO:Co.fw})}(new Pc(t));return Promise.resolve(i)}YF(t){}gn(){}};var hL=class t{static get mV(){return t.pV||(t.pV=new t(new rL)),t.pV}MS(t){const i=this.yV(t);return this.MV.MS(i)}YF(t){return this.MV.YF(this.TV(t))}yV(i){let e=new Pc(i);if(!this.NV){const i=t.DV(e.zu);e=new Pc({zu:i},e)}return e}TV(i){let e=i.zu;return this.NV||(e=t.DV(e)),{zu:e,rI:i.rI}}static DV(t){return i.SV&&D(t,"http://")?t.replace(":","s:"):t}gn(){this.MV.gn()}constructor(t,i=!0){this.MV=t,this.NV=i}};function oL(t){let i;return{get url(){return t.zu},get method(){return t.oI},get headers(){return i||(i=t.hI.QS()),i},get body(){return t.rI},get useCredentials(){return t.lI},get type(){return t.Rg},get subType(){return t.cI},get mediaType(){return t.dI},get responseType(){return t.aI}}}function aL(t){switch(t.toLowerCase()){case"arraybuffer":return dm.PS;case"json":return dm.RS;case"stream":return dm.US;default:return dm.Ru}}function uL(t){switch(t.toUpperCase()){case"POST":return G.POST;case"PUT":return G.PUT;case"DELETE":return G.DELETE;case"HEAD":return G.HEAD;case"OPTIONS":return G.OPTIONS;default:return G.GET}}function cL(t){switch(t.toLowerCase()){case"manifest":return N.GS;case"segment":return N.VS;case"preload-hint":return N.WS;case"content-protection":return N.HS;default:return N.tT}}function dL(t){switch(t.toLowerCase()){case"initialization-segment":return aa.qS;case"fairplay-license":return aa.XS;case"fairplay-certificate":return aa.ZS;case"widevine-license":return aa.KS;case"widevine-certificate":return aa.JS;case"playready-license":return aa.$S;case"clearkey-license":return aa.tI;case"aes128-key":return aa.iI;default:return aa.tT}}function lL(t){switch(t.toLowerCase()){case"audio":return Ws.vm;case"video":return Ws.Am;case"text":return Ws.Ru;case"image":return Ws.$M;default:return Ws.tT}}hL.pV=void 0;var fL=class{get EV(){return this.bV.Vb}get va(){return this.Xa||(this.Xa=this.LV()),this.Xa}get kV(){return this.CV}get xV(){return!this.CV}get OV(){return this.jV>0}get NS(){return this.DS}Zm(){this.CV=!0,this.bV.Qb(null)}zV(){this.bV.Yb(new Bb(this.PV))}BV(t){if(!this.xV)throw new b("Cannot respond more than once");if(!Mo(t))throw new b("Expected valid response");this.DS=this.RV(t),this.Zm()}QV(){try{const t=this.FV(this.va);t?this.YV(t):this.OV||this.kV||this.Zm()}catch(t){this.PV.push(t),this.zV()}}YV(t){if(this.kV)throw new g("Request has been redirected or a response already exists");if(Id(t))this.GV(t);else{if("function"!=typeof t)throw new b("Expected promise or function");{const i=new Rs,e=t=>{t?i.Yb(t):i.Qb(void 0)};try{const s=t(e);Id(s)&&i.Zd(s)}catch(t){i.Yb(t)}this.GV(i.Vb)}}}async GV(t){try{this.jV++,await t,this.jV--,this.OV||this.kV||(this.PV.length?this.zV():this.Zm())}catch(t){this.jV--,this.PV.push(t),this.OV||this.kV||this.zV()}}constructor(t,i){this.VV=t,this.FV=i,this.bV=new Rs,this.PV=[],this.Xa=void 0,this.CV=!1,this.DS=void 0,this.jV=0}},_L=class t extends fL{get rI(){return this.WV}get hI(){return this.VV.hI}get MS(){return this.VV.MS}get NS(){return this.DS}get SS(){return this.VV.SS}get FO(){return this.VV.FO}get zu(){return this.VV.yI}static HV(t,i,e){const s=void 0===t.body?e:t.body;return new jh({Om:s,MS:i.MS,aI:i.MS.aI,hI:t.headers,SS:t.status,FO:t.statusText,yI:t.url,vV:!0},i)}LV(){return function(t){let i;const e=oL(t.MS);return{get closed(){return!t.xV},get request(){return e},get url(){return t.zu},get status(){return t.SS},get statusText(){return t.FO},get headers(){return i||(i=t.hI.QS()),i},get body(){return t.rI},respondWith:i=>t.BV(i),waitUntil:i=>t.YV(i)}}(this)}RV(i){return t.HV(i,this.VV,this.WV)}constructor(t,i,e){super(t,i),this.WV=e,this.QV()}},gL=class extends fL{get rI(){return this.VV.rI}get xV(){return this.qV&&!this.CV}get hI(){return this.VV.hI}get oI(){return this.VV.oI}get XV(){return this.ZV}get NS(){return this.DS}get aI(){return this.VV.aI}get IS(){return this.VV.IS}get uI(){return this.VV.uI}get Hd(){return this.VV.Hd}get Rg(){return this.VV.Rg}get cI(){return this.VV.cI}get dI(){return this.VV.dI}get zu(){return this.VV.zu}get lI(){return this.VV.lI}get _I(){return this.VV._I}get fI(){return this.VV.fI}get jg(){return this.VV.jg}LV(){return function(t){let i;return{get url(){return t.zu},get method(){return t.oI},get headers(){return i||(i=t.hI.QS()),i},get body(){return t.rI},get closed(){return!t.xV},get useCredentials(){return t.lI},get type(){return t.Rg},get subType(){return t.cI},get mediaType(){return t.dI},get responseType(){return t.aI},redirect:i=>t.KV(i),respondWith:i=>t.BV(i),waitUntil:i=>t.YV(i)}}(this)}RV(t){const i=this.VV.rI,e=new jh({Om:i,hI:{},MS:this.VV,yI:this.VV.zu,aI:this.VV.aI,SS:200,FO:"OK"});return _L.HV(t,e,i)}KV(t){if(!this.xV)throw new b("Cannot redirect, already redirected or has a response");let i;i=Qs(t)?{url:t}:t,this.ZV=function(t,i){return new Pc({zu:void 0===t.url?i.zu:t.url,oI:void 0!==t.method?uL(t.method):void 0,hI:t.headers,rI:t.body,lI:t.useCredentials,Rg:void 0!==t.type?cL(t.type):void 0,cI:void 0!==t.subType?dL(t.subType):void 0,dI:void 0!==t.mediaType?lL(t.mediaType):void 0,aI:void 0!==t.responseType?aL(t.responseType):void 0},i)}(i,this.VV),this.Zm()}constructor(t,i,e){super(t,i),this.ZV=void 0,this.qV=e,this.QV()}};var da,wL=class extends hL{JV(t){this.$V.JV(t)}tW(t){this.$V.tW(t)}iW(t){this.$V.iW(t)}DU(t){this.$V.DU(t)}bU(t){this.$V.bU(t)}constructor(t,i=!0){const e=new AL(t);super(e,i),this.$V=e}},AL=class{async MS(t){let i;try{i=await this.eW(t,t.Hd)}catch(i){if(i instanceof R)return await this.sW(i,t.Hd);throw i}if(i=await this.nW(i,t.Hd),Mr(i))return i;throw new li(i)}YF(t){return this.MV.YF(t)}async eW(t,i){fo(i);let e,s=t;for(const t of this.rW.slice()){fo(i);const n=new gL(s,t,!e);if(!n.kV)try{await n.EV}catch(t){0;continue}n.XV&&!e?s=n.XV:n.NS&&!e&&(e=n.NS)}return e||this.MV.MS(s)}async sW(t,i){let e;if(t instanceof li)e=t.NS;else{const i=t.MS;e=new jh({Om:null,MS:i,aI:i.aI,SS:0,FO:""})}const s=await this.nW(e,i);if(s===e)throw t;if(Mr(s))return s;throw new li(s)}async nW(t,i){let e=t;for(const t of this.hW.slice()){fo(i);const s=await Promise.resolve(e.Sm().Om(i)),n=new _L(e,t,s);if(!n.kV)try{await n.EV}catch(t){0;continue}e=n.NS||e}return e}JV(t){this.rW.unshift(t)}tW(t){this.rW.push(t)}iW(t){_s(this.rW,t)}DU(t){this.hW.unshift(t)}bU(t){_s(this.hW,t)}gn(){this.MV.gn(),No(this.rW),No(this.hW)}constructor(t){this.rW=[],this.hW=[],this.MV=t}},vL=class{get va(){return this.Xa||(this.Xa=function(t){return{addRequestInterceptor(i){t.JV(i)},removeRequestInterceptor(i){t.iW(i)},addResponseInterceptor(i){t.DU(i)},removeResponseInterceptor(i){t.bU(i)}}}(this)),this.Xa}JV(t){this.mI.JV(t)}iW(t){this.mI.iW(t)}DU(t){this.mI.DU(t)}bU(t){this.mI.bU(t)}constructor(t){this.mI=t}},mL=class extends Bo{get va(){return this.Xa||(this.Xa=function(t){return{get online(){return t.Uf},get estimator(){return function(t){return{get bandwidth(){return t.cz},get roundTripTime(){return t.lz}}}(t.oW)},setEstimator(i){t.aW(function(t){if(!t)return;return{get cz(){return tf(t.bandwidth)},get lz(){return tf(t.roundTripTime)},fz:i=>function(t){if(!t)return;return{uW(i){t.markRequestStart(i)},cW(i){t.markResponseStart(i)},dW(i,e){t.markResponseData(i,e)},lW(i){t.markResponseEnd(i)}}}(t.createMeasurer(oL(i)))}}(i))},addRequestInterceptor(i){t.JV(i)},removeRequestInterceptor(i){t.iW(i)},addResponseInterceptor(i){t.DU(i)},removeResponseInterceptor(i){t.bU(i)},addEventListener(i,e){t.yn(i,e)},removeEventListener(i,e){t.fn(i,e)}}}(this)),this.Xa}get Uf(){return this.fW.Uf}get oW(){return this.CB.oW}aW(t){this.CB.aW(t)}JV(t){this.mI.JV(t)}iW(t){this.mI.iW(t)}DU(t){this.mI.DU(t)}bU(t){this.mI.bU(t)}gn(){this.Vo(),this.fW.fn(Co._w,this._W),this.fW.fn(Co.fw,this.gW)}constructor(t,i,e){super(i),this.fW=t,this.mI=i,this.CB=e,this._W=t=>{this.Co(t)},this.gW=t=>{this.Co(t)},this.fW.yn(Co._w,this._W),this.fW.yn(Co.fw,this.gW)}};!function(t){t.PERFORMANCE="performance",t.QUALITY="quality",t.BANDWIDTH="bandwidth"}(da||(da={}));function pL(t,i,e,s,n,r){const h=[];let o=t-_.max(r,1),a=t+n;if(i&&e){const t=Pe(e,1,5),s=i-t;o=_.min(o,s);const n=i+e+t;a=_.max(a,n)}0!==o&&s.dB(0,o)&&h.push([0,o]);return s.dB(a,1/0)&&h.push([a,1/0]),h}function Ar(t){return t instanceof g&&"QuotaExceededError"===t.name}var yL={type:da.BANDWIDTH};function ML(t){const i=ie(yL);return Qs(t)?i.type=TL(t):Mo(t)&&function(t){switch(t){case da.PERFORMANCE:case da.QUALITY:case da.BANDWIDTH:return!0;default:return!1}}(t.type)&&(i.type=TL(t.type)),Mo(t)&&Mo(t.metadata)&&(i.metadata=function(t){const i={},e=$h(t.bitrate);return S(e)||(i.bitrate=e),i}(t.metadata)),i}function TL(t){switch(t){case"bandwidth":return da.BANDWIDTH;case"performance":return da.PERFORMANCE;case"quality":return da.QUALITY}}var NL=class extends Yi{constructor(t){super("wW"),this.AW=t}},DL=class extends Yi{constructor(t){super("vW"),this.mW=t}},SL=class extends Yi{constructor(t){super("pW"),this.yW=t}},IL=class extends Bo{MW(t){this.TW=t}get NW(){switch(this.DW.type){case da.PERFORMANCE:return 0;case da.QUALITY:return 1/0;case da.BANDWIDTH:return this.DW.metadata&&void 0!==this.DW.metadata.bitrate?this.DW.metadata.bitrate:xu.yb.Kj();default:return xu.yb.Kj()}}get va(){return this.Xa}get mW(){return this.DW}set mW(t){this.DW=t,this.Co(new DL(t))}get AW(){return this.SW}set AW(t){this.SW=t,this.Co(new NL(t))}get IW(){return _.min(this.SW,this.EW)}get yW(){return this.bW}set yW(t){this.bW=t,this.Co(new SL(t))}get LW(){return this.EW}get oW(){var t;return null!=(t=this.kW)?t:this.TW.Uz}aW(t){this.kW=t}xW(t){let i=_.min(t,.8*this.EW);if(i=_.max(10,i),this.EW===i)return!1;const e=this.IW;this.EW=i;const s=this.IW;return s!==e&&this.Co(new NL(s)),!0}get OW(){return this.jW}set OW(t){this.jW=t}constructor(...t){super(...t),this.Xa=function(t){return{get strategy(){return function(t){return{metadata:t.metadata,type:t.type}}(t.mW)},set strategy(i){t.mW=ML(i)},get targetBuffer(){return t.AW},set targetBuffer(i){const e=$h(i);S(e)||(t.AW=e)},get bufferLookbackWindow(){return t.yW},set bufferLookbackWindow(i){const e=$h(i);S(e)||(t.yW=e<=0?30:e)},get maxBufferLength(){return t.LW},get clearBufferWhenSettingTargetQuality(){return t.OW},set clearBufferWhenSettingTargetQuality(i){t.OW=Ks(i)}}}(this),this.DW=yL,this.SW=20,this.bW=30,this.EW=1/0,this.jW=!1,this.kW=void 0}},EL=class extends Ao{fa(){return new bL}constructor(){super("W_")}},bL=class extends Yi{constructor(){super("change")}},qh=class extends Bo{gn(){this.Vo();for(const t of this.FB)this.zW.fn(t,this.PW)}constructor(t,i,e){super(e),this.PW=t=>{Ql(t)&&Ac((()=>{this.Co(t.va)}))},this.zW=t,this.FB=i;for(const t of this.FB)this.zW.yn(t,this.PW)}},ka=class extends Ut{gn(){this.Vo(),this.zW.cf(this.PW)}constructor(t,i){super(i),this.PW=t=>{Ql(t)&&Ac((()=>{this.Co(t.va)}))},this.zW=t,this.zW.sf(this.PW)}};var LL=class extends Ut{get RT(){return this.XT}set RT(t){if(this.UT<=t)throw new g("Start time of a clip should be smaller than the end time.");this.XT!==t&&(this.XT=t,this.Co(new EL))}get UT(){return this.JT}set UT(t){if(t<=this.RT)throw new g("End time of a clip should be larger than the start time.");this.JT!==t&&(this.JT=t,this.Co(new EL))}get va(){return this.Xa||(this.Xa=function(t){let i,e={get startTime(){return t.RT},set startTime(i){t.RT=i},get endTime(){return t.UT},set endTime(i){t.UT=i},addEventListener(t,e){i.yn(t,e)},removeEventListener(t,e){i.fn(t,e)}};return i=new ka(t,e),e}(this)),this.Xa}tr(){0===this.XT&&this.JT===1/0||(this.XT=0,this.JT=1/0,this.Co(new EL))}BW(){return new ce([this.RT,this.UT],[!0,!0])}constructor(...t){super(...t),this.XT=0,this.JT=1/0}},kL=class t extends _a{Nf(t){const i=this.RW.BW().tB(t);super.Nf(i),this.UW()}If(){return super.If()||this.QW}get FW(){return this.i_().length?this.i_():this.RW.BW().ks()}i_(){return ce.xn(super.i_()).Sn(this.RW.BW()).ks()}p_(){this.If()?this.Nf(this.FW.start(0)):this.YW(),super.p_(),this.UW()}async ga(t,i){fo(i),this.QW=!1,this.RW.tr(),await super.ga(t,i)}gn(){return this.RW.fn("W_",this.GW),this._f.fn(Co.Iw,this.wc),this.VW(),super.gn()}E_(t){switch(t.type){case Co.yw:return this.Co(t),this.WW(),!0;case Co.pw:case Co.Zg:return this.Co(t),this.HW(),!0;case Co.Jg:if(this.qW)return!0}return super.E_(t)}get qW(){return this.RW.UT<this.ct}VW(){this.XW&&(we(this.XW),this.XW=void 0)}UW(){const i=this.Mf,e=this.qW&&i>=this.RW.UT-t.Zl;this.QW&&!e?(this.QW=!1,this.Ff&&this.p_()):this.QW||!e||this.e_||this.ZW||(this.QW=!0,this.Co(new ve(i)),this.m_())}YW(){if(this.ct===1/0)return;const i=this.FW,e=ce.xn(i).tB(this.Mf);be(this.Mf,e,t.Zl)||this.Nf(e)}constructor(i,e){super(i),this.QW=!1,this.XW=void 0,this.ZW=!1,this.GW=()=>{this.YW(),this.UW()},this.wc=()=>{this.VW(),this.UW();this.qW&&this.Mf>=this.RW.UT-t.KW&&!this.Sf&&(this.XW=ro(this.wc))},this.WW=()=>{this.ZW=!0},this.HW=()=>{this.ZW&&(this.ZW=!1,this.UW())},this.RW=e,this.RW.yn("W_",this.GW),this._f.yn(Co.Iw,this.wc)}};kL.KW=1,kL.Zl=.001;var CL=class{get JW(){return this.$W}set JW(t){this.$W=t}constructor(){this.$W=!1}},xL=class extends _a{If(){return!this.$W.JW&&super.If()}m_(){this.tH=!0,super.m_()}p_(){this.tH=!1,super.p_()}E_(t){if(this.$W.JW)switch(t.type){case Co.Jg:return this.Mf=0,this.tH||(this.e_?this.iH=!0:this.p_()),!0;case Co.pw:this.iH&&(this.iH=!1,this.p_());break;case Co.Sh:if(this.iH||super.If())return!0}return super.E_(t)}constructor(t,i){super(t),this.iH=!1,this.tH=!1,this.$W=i}};var OL=class{get va(){return this.Xa}get lT(){return this.Qo.jf.lT}get _T(){return this.Qo.jf._T}get dT(){return this.Qo.jf.dT}get eH(){throw new g("Not implemented")}get sH(){throw new g("Not implemented")}get gT(){return this.Qo.jf.gT}get fT(){return this.Qo.jf.fT}get wT(){return this.Qo.jf.wT}constructor(t){this.Qo=t,this.Xa=function(t){return{get currentBandwidthEstimate(){return t._T},get corruptedVideoFrames(){return t.lT},get droppedVideoFrames(){return t.dT},get totalBytesLoaded(){return t.gT},get bufferedSegments(){return t.wT}}}(this)}};function jL(t){if(!t||!hn(t))return{dT:0,lT:0,fT:0,_T:0,gT:0,wT:{amountOfBufferedAudioSegments:0,amountOfBufferedVideoSegments:0}};if("function"==typeof t.getVideoPlaybackQuality){const i=t.getVideoPlaybackQuality();return{dT:i.droppedVideoFrames,lT:i.corruptedVideoFrames||0,fT:i.totalVideoFrames}}return{dT:t.webkitDroppedFrameCount||0,lT:0,fT:t.webkitDecodedFrameCount||0}}var zL=class extends Ao{fa(){return new PL}constructor(){super("nH")}},PL=class extends Yi{constructor(){super("castingchange")}};var BL=class extends Bo{get rH(){var t,i;return(null==(t=this.hH)?void 0:t.rH)||(null==(i=this.oH)?void 0:i.rH)||!1}get aH(){return this.hH}get uH(){return this.oH}cH(t){this.hH=t,this.dH(t)}lH(t){this.oH=t,this.dH(t)}dH(t){t.yn("statechange",this.fH)}_H(t){t.fn("statechange",this.fH)}get va(){return this.Xa||(this.Xa=function(t){let i;const e={get casting(){return t.rH},get airplay(){var i;return null==(i=t.aH)?void 0:i.va},get chromecast(){var i;return null==(i=t.uH)?void 0:i.va},addEventListener(t,e){i.yn(t,e)},removeEventListener(t,e){i.fn(t,e)}};return i=new qh(t,["nH"],e),e}(this)),this.Xa}gn(){this.Vo(),this.hH&&(this._H(this.hH),this.hH=void 0),this.oH&&(this._H(this.oH),this.oH=void 0)}constructor(...t){super(...t),this.hH=void 0,this.oH=void 0,this.gH=!1,this.Xa=void 0,this.fH=()=>{const t=this.gH,i=this.rH;t!==i&&(this.gH=i,this.Co(new zL))}}},uo=class{static async wH(t,i){try{const e=new Pc({zu:t,aI:dm.Ru,oI:G.GET}),s=await i.MS(e);return(await s.Om()).trim()}catch(t){return void Mi(t)}}static AH(t){try{const i=rS(t);return new cS(i.key,i.domains_page,i.domains_source,i.expiration_date,i.features,i.customer_id,i.generation_date,i.sdks,i.send_impression)}catch(t){throw new $i(td.LICENSE_ERROR,"Invalid license. No valid license was configured.")}}static vH(t){void 0===t&&(t=XD.lh),i.IA("The baked-in license is used. Please update the configuration with your license.");const e=t.IQ("F2b-iL'[FL[S"),s=JSON.parse('["F$(:_L50F|aY"]').map((i=>t.IQ(i))),n=JSON.parse('[".$hsF|b9_Ess*rS:F]Y\\""]').map((i=>t.IQ(i))),r=Number(new Date(Number(t.IQ('COD|aHpHa:p3Ceo3Co""')))),h=JSON.parse("[]").map((i=>t.IQ(i)));return new cS(e,s,n,r,h)}static convertLicenseToDummyLicense(t){return new cS(t.jQ,t.zQ,t.BQ,864e13,t.UQ,t.QQ,Date.now(),t.YQ,t.GQ)}},wo=class t{static iQ(){return t.yb||(t.yb=RL.YC()?new RL:new mD),t.yb}static Ub(i){t.iQ().Ub(i)}static tQ(){t.iQ().tQ()}static Pb(i){return t.iQ().Pb(i)}static Wj(i,e){t.iQ().Wj(i,e)}static mH(i){const e=t.Pb(i);if(void 0!==e)return C(e)}static pH(i){return"true"===t.Pb(i)}};wo.yb=void 0;var RL=class extends wo{static YC(){const t="foobar";try{return self.localStorage.setItem(t,t),self.localStorage.removeItem(t),!0}catch(t){}return!1}Ub(t){self.localStorage.removeItem(t)}tQ(){self.localStorage.clear()}Pb(t){var i;return null!=(i=self.localStorage.getItem(t))?i:void 0}Wj(t,i){self.localStorage.setItem(t,i)}},UL="https://validate.theoplayer.com/1/",QL=72e5,FL=_.floor(14399999*_.random()-QL),YL="THEOplayer.license",GL=class{async yH(){const t=await this.MH(this.TH.license,this.TH.licenseUrl);this.CF.NH(t)}async MH(t,i){let e,s=i;t?e=uo.AH(t):s||(e=uo.vH()),s||(s=UL+e.jQ);const n=this.DH();let r;if(e&&(r=this.SH.tF(e),r===Vn.CQ)){if(this.IH(e.RQ)&&this.IH(null==n?void 0:n.RQ)){const t=await this.EH(s);if(t)return t}return e}if(n){if(this.SH.tF(n)===Vn.CQ){if(this.IH(null==n?void 0:n.RQ)){const t=await this.EH(s);if(t)return t}return n}wo.Ub(YL)}const h=await uo.wH(s,this.mI);let o;if(h){o=uo.AH(h);if(this.SH.tF(o)===Vn.CQ)return wo.Wj(YL,h),o;wo.Ub(YL)}else if(!this.hF&&e&&r===Vn.xQ&&s===UL+e.jQ)return uo.convertLicenseToDummyLicense(e);if(!e&&!o)throw new $i(td.LICENSE_ERROR,"The given license is invalid!");this.bH(null!=e?e:o,new $i(td.LICENSE_ERROR,"The given license is invalid!"))}async qQ(t){let i=await this.CF.kF();if(this.IH(i.RQ)){var e;const t=null!=(e=this.TH.licenseUrl)?e:UL+i.jQ,s=await this.EH(t);s&&(this.CF.NH(s),i=s)}try{const e=this.SH.tF(i);if(e===Vn.OQ){const t=uS.VQ;throw new $i(fS(t),vt.JQ(t))}if(e===Vn.xQ){const t=uS.xQ;throw new $i(fS(t),vt.JQ(t))}this.SH.qQ(t,i)}catch(t){this.LH(t)}}async $Q(t){const i=await this.CF.kF();try{this.SH.$Q(t,i)}catch(t){this.LH(t)}}async EH(t){try{const i=await uo.wH(t,this.mI);if(void 0===i)return;const e=uo.AH(i);return this.SH.tF(e)===Vn.CQ?(wo.Wj(YL,i),e):void 0}catch(t){return}}IH(t){return!t||Number(new Date)+2592e5+FL>=t}DH(){const t=wo.Pb(YL);if(t)return uo.AH(t)}bH(t,i){this.CF.NH(t),this.LH(i)}LH(t){throw Hu(t.message),this.kH.OF(t.message),t}constructor(t,i,e,s,n,r){this.mI=t,this.SH=i,this.kH=e,this.CF=s,this.TH=n,this.xL=r,this.hF=vS(r)}},VL=class{NH(t){this.CH=t,this.xH.Qb()}get OH(){return this.CH}async kF(){return this.CH?Promise.resolve(this.CH):(await this.xH.Vb,this.CH)}constructor(){this.xH=new Rs}},WL=class extends Ao{fa(){return new HL}constructor(){super("W_")}},HL=class extends Yi{constructor(){super("change")}};function qL(t){let i;const e={get fontFamily(){return t.jH},set fontFamily(i){t.jH=i},get fontColor(){return t.zH},set fontColor(i){t.zH=i},get fontSize(){return t.PH},set fontSize(i){t.PH=i},get backgroundColor(){return t.BH},set backgroundColor(i){t.BH=i},get windowColor(){return t.RH},set windowColor(i){t.RH=i},get edgeStyle(){return t.UH},set edgeStyle(i){t.UH=i},get marginTop(){return t.QH},set marginTop(i){t.QH=i},get marginBottom(){return t.FH},set marginBottom(i){t.FH=i},get marginLeft(){return t.YH},set marginLeft(i){t.YH=i},get marginRight(){return t.GH},set marginRight(i){t.GH=i},addEventListener(t,e){const s=Fr(t,jo);i.yn(s,e)},removeEventListener(t,e){const s=Fr(t,jo);i.fn(s,e)}};return i=new Mt(e),t.yn(["W_"],(t=>i.Co(t.va))),e}var XL={jH:void 0,zH:void 0,PH:void 0,BH:void 0,RH:void 0,UH:void 0,VH:void 0,QH:void 0,FH:void 0,YH:void 0,GH:void 0},ct="THEOplayer.textTrackStyle.",ZL=class t extends Bo{get WH(){return this.HH}get jH(){return this.HH.jH}set jH(t){this.Yn({jH:t})}get zH(){return this.HH.zH}set zH(t){this.Yn({zH:t})}get PH(){return this.HH.PH}set PH(t){this.Yn({PH:t})}get BH(){return this.HH.BH}set BH(t){this.Yn({BH:t})}get RH(){return this.HH.RH}set RH(t){this.Yn({RH:t})}get UH(){return this.HH.UH}set UH(t){this.Yn({UH:t})}get VH(){return this.HH.VH}get QH(){return this.HH.QH}set QH(t){this.Yn({QH:t})}get FH(){return this.HH.FH}set FH(t){this.Yn({FH:t})}get GH(){return this.HH.GH}set GH(t){this.Yn({GH:t})}get YH(){return this.HH.YH}set YH(t){this.Yn({YH:t})}get va(){return this.Xa||(this.Xa=qL(this)),this.Xa}Yn(i){this.HH=Tt({},this.HH,i),t.qH(this.HH),this.Co(new WL)}static XH(){let t=Tt({},XL);return t.jH=wo.Pb(ct+"fontFamily")||t.jH,t.zH=wo.Pb(ct+"fontColor")||t.zH,t.PH=wo.Pb(ct+"fontSize")||t.PH,t.BH=wo.Pb(ct+"backgroundColor")||t.BH,t.RH=wo.Pb(ct+"windowColor")||t.RH,t.UH=wo.Pb(ct+"edgeStyle")||t.UH,t}static qH(t){wo.Wj(ct+"fontFamily",t.jH||""),wo.Wj(ct+"fontColor",t.zH||""),wo.Wj(ct+"fontSize",t.PH||""),wo.Wj(ct+"backgroundColor",t.BH||""),wo.Wj(ct+"windowColor",t.RH||""),wo.Wj(ct+"edgeStyle",t.UH||"")}constructor(){super(),this.Xa=void 0,this.HH=t.XH()}};function KL(t,i){var e,s;t.style.marginLeft=(null!=(e=i.YH)?e:0)+"px",t.style.marginRight=(null!=(s=i.GH)?s:0)+"px",t.style.width="calc(100% - "+t.style.marginLeft+" - "+t.style.marginRight+")"}var Je,JL=[Co.jh,Co.Sh,Zt.Rw,Co.Iw,Co.gw,Co.cw,Co.yw,Co.pw,Co.Jg,Co.ww,Co.Ew,Co.Xg,Zt.H_,Co.mw,ut.ha,Zh.Kg,Zh.xb,Co.Wg,Co.Vg,Co.Lw,Co.hw,Co.aw,Co.ew,Co.$g],$L={ZH:!1};function tk(t){return t.wd.Rg===I.Fx}(Je||(Je={})).KH="JH";var dt,qn=["JH"];!function(t){t[t.$H=0]="$H",t[t.US=1]="US",t[t.tq=2]="tq"}(dt||(dt={}));var pr,ik=["loadstart","encrypted","waitingforkey","webkitneedkey","msneedkey"];!function(t){t.XR="iq",t.nq="rq"}(pr||(pr={}));var ek=class extends Bo{get ht(){throw new g("Not implemented")}get wd(){return this.sx}get jz(){return this.bx}get rt(){throw new g("Not implemented")}async hq(t,i){const e=await this.BC.zC(t.Mb,i),s=await e.DC();return await this.oq(s),s}aq(t){const i=this.yC;return i?0!==t.Yz.length&&t.Yz.some((t=>t.ZA.Mb===i.ZA)):0!==this.sx.Yz.length?t.Yz.some((t=>this.sx.Yz.some((i=>t.ZA===i.ZA)))):0===t.Yz.length||!this.uq}cq(t){return this.dq.cq(t),this.sx=t,Promise.resolve()}lq(t){return!1}async Qd(){this.Vo(),this.bx.removeEventListener("loadedmetadata",this.fq);for(const t of ik)this.bx.removeEventListener(t,this._q);await this.gq.gn(),this.wq(),await this.dq.tr(),await this.Aq(void 0)}vq(t){t!==this.mq&&(this.mq=t,t?this.pq.Qb(void 0):this.pq=new Rs)}oq(t){return this.gq.wx((()=>this.Aq(t)))}async Aq(t){if(t&&!this.bx.src&&!this.bx.srcObject)throw new Or(td.CONTENT_PROTECTION_ERROR,"Attempted to attach MediaKeys to a sourceless MediaElement");if(!t&&(this.bx.src||this.bx.srcObject))throw new Or(td.CONTENT_PROTECTION_ERROR,"Attempted to remove MediaKeys from a non-empty MediaElement");t&&!this.mq&&await this.pq.Vb;const i=this.yC;i&&(await i.TC(this.bx),this.yC=void 0),t&&(await t.bn(this.bx),this.yC=t)}ga(t){return this.gq.wx((()=>this.yq(t)))}yq(t){this.vq(!1);const i=this.sA.Gf;if(function(t){if(void 0!==s.ManagedMediaSource&&t instanceof s.ManagedMediaSource)return!0;if("undefined"!=typeof MediaSource&&t instanceof MediaSource)return!0;return!1}(t))if(function(t){return"srcObject"in t&&fi.Ga&&fi.YE>=17}(this.bx))try{this.bx.srcObject=t}catch(i){this.bx.src=URL.createObjectURL(t)}else this.bx.src=URL.createObjectURL(t);else this.bx.src=t;this.sA.Gf=i}Mq(t){return this.gq.wx((()=>this.Tq(t)))}Tq(t){this.yq(t),this.bx.load()}wq(){this.vq(!1),YM(this.bx)}async Nq(){this.yC&&await this.yC.tr()}constructor(t,i,e,s){super(),this.mq=!1,this.pq=new Rs,this.uq=!1,this.gq=new ls,this.yC=void 0,this.fq=()=>{this.uq=!0},this._q=()=>{this.vq(!0)},this.sx=t,this.sA=i,this.bx=i.jz,this.dq=e,this.BC=s,this.bx.addEventListener("loadedmetadata",this.fq);for(const t of ik)this.bx.addEventListener(t,this._q)}};var sk,nk=class extends ek{get wf(){return ce.xn(this.bx.buffered)}get ct(){return this.bx.duration}get Dq(){const t=this.ct;if(!isFinite(t))return!1;const i=this.wf;if(0===i.U)return!1;return t-i.jn(i.U-1)<al}get Xf(){return this.bx.preload}set Xf(t){this.bx.preload=t}get t_(){return ce.xn(this.bx.seekable)}get Sq(){return this.wf}get Iq(){if(hn(this.bx)&&(this.bx.videoWidth>0||this.bx.videoHeight>0))return this.wf}async MW(){const t=this.wd;switch(t.Vz){case ms.bA:case ms.LA:this.bx.setAttribute("crossorigin",t.Vz);break;case ms.EA:default:this.bx.removeAttribute("crossorigin")}void 0!==t.Xf?this.bx.preload=t.Xf:this.bx.preload=pt.oz,void 0!==t.Wz?this.bx.title=t.Wz:UM(this.bx),await this.ga(t.Ug),this.dq.$n(this,t)}aq(t){return!1}cq(t){return Promise.resolve(void 0)}async Qd(){UM(this.bx),await super.Qd()}static Eq(t,i){return!!i.canPlayType&&Boolean(i.canPlayType(t.Fz))}},oa=class extends Yi{constructor(t){super(Co.gw),this.currentTime=t}},rk=class extends Yi{constructor(){super(Co.cw)}};(sk||(sk={})).bq="Lq";var hk=class extends Yi{constructor(t){super("Lq"),this.kq=t}},Tr=class extends Bo{get Cq(){return this.xq}Oq(t,i){const e=new ce([t,i]);this.xq=this.xq.rB(e),this.Co(new hk(e))}jq(t,i){this.xq=this.xq.oB(new ce([t,i]))}tr(){this.xq=ce.MB()}gn(){this.Vo()}constructor(...t){super(...t),this.xq=ce.MB()}};var ok,ak=class{start(t){this.xH=t,this.zq()&&this.Pq()}pull(){this.dG.length>0?this.Bq():this.Rq=!0,this.zq()&&this.Pq()}cancel(t){return No(this.dG),this.lG=0,this.Rq=!1,this.eG.cancel(t)}Bq(){if(0===this.dG.length)return;const t=this.dG;this.dG=[],this.lG=0,this.Rq=!1,this.xH.enqueue(t)}zq(){if(this.Rq)return!0;return this.Uq-this.lG>0}Pq(){if(this.Qq)return;const t=this.eG.read().then(this.Fq).catch(this.Yq);this.Qq=t;const i=()=>{this.Qq===t&&(this.Qq=void 0)};t.then(i,i)}constructor(t,{size:i=(()=>1),highWaterMark:e=1}){this.dG=[],this.lG=0,this.xH=void 0,this.Rq=!1,this.Qq=void 0,this.Fq=t=>t.done?(this.Bq(),void this.xH.close()):(this.dG.push(t.value),this.lG+=this.Gq(t.value),this.Rq&&this.Bq(),this.zq()?this.eG.read().then(this.Fq):void 0),this.Yq=t=>{this.Bq(),this.xH.error(t)},this.eG=t.getReader(),this.Gq=i,this.Uq=e}},uk=class{Vq(t){this.Wq.push(t),this.sp+=t.byteLength}Hq(t){if(this.sp<=t)return this.qq();const i=this.Wq;let e=0,s=0;for(;s<i.length&&e+i[s].byteLength<=t;)e+=i[s].byteLength,s++;const n=i.slice(0,s);if(s<i.length&&e<t){const r=t-e;0,n.push(Ig(i[s],0,r)),e+=r}return{Wq:n,sp:e}}Xq(t){const i=this.Hq(t);return 1===i.Wq.length?i.Wq[0]:j_(i.Wq,i.sp)}qq(){return{Wq:this.Wq,sp:this.sp}}Zq(t){if(this.sp<=t)return this.Kq();const i=this.Wq;let e=0,s=0;for(;s<i.length&&e+i[s].byteLength<=t;)e+=i[s].byteLength,s++;const n=i.splice(0,s);if(i.length>0&&e<t){const s=t-e;0,n.push(Ig(i[0],0,s)),i[0]=Ig(i[0],s),e+=s}return this.sp-=e,{Wq:n,sp:e}}Jq(t){const i=this.Zq(t);return 1===i.Wq.length?i.Wq[0]:j_(i.Wq,i.sp)}Kq(){const t=this.qq();return this.Wq=[],this.sp=0,t}$q(){const t=1===this.Wq.length?this.Wq[0]:j_(this.Wq,this.sp);return this.Wq=[],this.sp=0,t}constructor(){this.Wq=[],this.sp=0}};!function(t){t[t.tX=0]="tX",t[t.iX=1]="iX",t[t.eX=2]="eX"}(ok||(ok={}));var Br=class{sX(t,i){}nX(){}rX(t){this.dG.Vq(t),this.hX(!1)}oX(){this.hX(!0)}aX(){return 0!==this.ja||0!==this.dG.sp}hX(t){for(;0!==this.dG.sp;){if(!t&&this.uX>this.dG.sp)return;switch(this.ja){case 0:this.cX(t);break;case 1:this.dX(t);break;case 2:this.lX(t)}}}fX(){this.ja=0,this.uX=8}cX(t){const i=hl(this.dG.Xq(this.uX)),e=new Ha,s=Nt.ip(i,e);if(!s.Zm)return this.uX=s.np,void(t&&this.uX>this.dG.sp&&this._X(this.dG.sp));const n=s.ep.Rg;let r=s.ep.sp;0===r&&(r=1/0),this.sX(n,r),this.gX(n)?this.wX(r):this._X(r)}wX(t){this.ja=1,this.uX=t}dX(t){const i=hl(this.dG.Jq(this.uX)),e=new Ha,s=Nt.Km(i,e,!t);if(!s.Zm)throw new Se(e.Ku);this.nX(),this.AX(s.Jm),this.fX()}_X(t){this.ja=2,this.uX=0,this.vX=t}lX(t){const i=this.dG.Zq(this.vX);this.vX-=i.sp;for(const t of i.Wq)this.mX(t);(0===this.vX||t&&this.vX===1/0)&&(this.nX(),this.fX())}constructor(){this.dG=new uk,this.ja=0,this.uX=0,this.vX=0,this.fX()}};function ck(t){return t instanceof py}function dk(t){return t instanceof vy}function lk(t){return t instanceof Ue||t instanceof kr}function fk(t){return t instanceof un}function _k(t){return t instanceof Np}function gk(t){return t instanceof Ju}function wk(t){return t instanceof Ru}function Ak(t){return t instanceof Ey}function vk(t){return t instanceof Ls}function mk(t){return t instanceof Ny}function pk(t){return t instanceof br}function yk(t,i){const e=Po(t.boxes,mk);if(e&&e.flags.baseDataOffsetPresent)e.baseDataOffset=e.baseDataOffset.add(i);else for(const e of t.boxes)e instanceof br&&e.flags.dataOffsetPresent&&(e.dataOffset=e.dataOffset+i)}var Mk=class extends Br{start(t){this.xH=t}transform(t){this.rX(t)}flush(){this.oX()}gX(t){return t===he.Av||t===he.Zv||t===he.lm}AX(t){const i=this.pX(t);this.xH.enqueue(i)}mX(t){this.xH.enqueue(t)}pX(t){const i=$t(t.Om.Om);switch(t.Rg){case"moov":return this.yX(i);case"sidx":return this.MX(i);case"moof":return this.TX(i)}return i}get NX(){if(void 0===this.DX)throw new g("Expected to have found a movie header timescale.");return this.DX}SX(t){const i=this.IX.get(t);if(void 0===i)throw new g("Expected to have found a media header timescale for track ID "+t+".");return i}yX(t){const i=Wy(t);for(let t=0;t<i.boxes.length;t++){const e=i.boxes[t];e instanceof fy?i.boxes[t]=this.EX(e):e instanceof _y?i.boxes[t]=this.bX(e):e instanceof vy&&this.LX(e)}for(const t of i.boxes)t instanceof Ju&&this.kX(t);return i.serialize().join()}EX(t){this.DX=t.timescale;const i=$c(Ce.fromNumber(t.duration,!0),this.NX,this.CX);return 0!==i.getHighBits()?this.bX(function(t){return new _y({creation:Ce.fromNumber(t.creationTime,!0),modification:Ce.fromNumber(t.modificationTime,!0),scale:t.timescale,duration:Ce.fromNumber(t.duration,!0)},t.nextTrackId,{rate:t.rate,volume:t.volume,matrix:t.matrix},t.flags)}(t)):(t.timescale=this.CX,t.duration=i.toInt(),t)}bX(t){return this.DX=t.timescale,t.timescale=this.CX,t.duration=$c(t.duration,this.NX,this.CX),t}LX(t){let i;for(let e=0;e<t.boxes.length;e++){const s=t.boxes[e];s instanceof Ue?(i=s.trackId,t.boxes[e]=this.xX(s)):s instanceof kr?(i=s.trackId,t.boxes[e]=this.OX(s)):s instanceof un?this.jX(s,i):s instanceof jp&&this.zX(s)}}xX(t){const i=$c(Ce.fromNumber(t.duration,!0),this.NX,this.CX);return 0!==i.getHighBits()?this.OX(function(t){return new kr({creation:Ce.fromNumber(t.creationTime,!0),modification:Ce.fromNumber(t.modificationTime,!0),duration:Ce.fromNumber(t.duration,!0)},t.trackId,t.volume,t.width,t.height,{layer:t.layer,alternateGroup:t.alternateGroup,matrix:t.matrix})}(t)):(t.duration=i.toInt(),t)}OX(t){return t.duration=$c(t.duration,this.NX,this.CX),t}jX(t,i){for(let e=0;e<t.boxes.length;e++){const s=t.boxes[e];s instanceof Fp?t.boxes[e]=this.PX(s,i):s instanceof Yp&&(t.boxes[e]=this.BX(s,i))}}PX(t,i){this.IX.set(i,t.timescale);const e=$c(Ce.fromNumber(t.duration,!0),t.timescale,this.CX);return 0!==e.getHighBits()?this.BX(function(t){return new Yp({creation:Ce.fromNumber(t.creationTime,!0),modification:Ce.fromNumber(t.modificationTime,!0),scale:t.timescale,duration:Ce.fromNumber(t.duration,!0)},t.language,t.flags)}(t),i):(t.timescale=this.CX,t.duration=e.toInt(),t)}BX(t,i){return this.IX.set(i,t.timescale),t.timescale=this.CX,t.duration=$c(t.duration,t.timescale,this.CX),t}zX(t){for(const i of t.boxes)i instanceof Cp?this.RX(i):i instanceof xp&&this.UX(i)}RX(t){for(const i of t.entries)i.mediaTime=Nk(i.mediaTime,this.NX,this.CX),i.segmentDuration=Nk(i.segmentDuration,this.NX,this.CX)}UX(t){for(const i of t.entries)i.mediaTime=$c(i.mediaTime,this.NX,this.CX),i.segmentDuration=$c(i.segmentDuration,this.NX,this.CX)}kX(t){for(let i=0;i<t.boxes.length;i++){const e=t.boxes[i];e instanceof Ru?this.QX(e):e instanceof oy?t.boxes[i]=this.FX(e):e instanceof ay&&(t.boxes[i]=this.YX(e))}}QX(t){const i=this.SX(t.trackId);t.defaultSampleDuration=Nk(t.defaultSampleDuration,i,this.CX)}FX(t){const i=$c(Ce.fromNumber(t.fragmentDuration,!0),this.NX,this.CX);return 0!==i.getHighBits()?this.YX(function(t){return new ay(Ce.fromNumber(t.fragmentDuration,!0),t.flags)}(t)):(t.fragmentDuration=i.toInt(),t)}YX(t){return t.fragmentDuration=$c(t.fragmentDuration,this.NX,this.CX),t}MX(t){let i=Hy(t);return i=i instanceof Oy?this.GX(i):this.VX(i),i.serialize().join()}GX(t){const i=t.timescale,e=$c(Ce.fromNumber(t.earliestPresentationTime,!0),i,this.CX);if(0!==e.getHighBits())return this.VX(function(t){return new jy(t.referenceId,t.timescale,Ce.fromNumber(t.earliestPresentationTime,!0),Ce.fromNumber(t.firstOffset,!0),t.references,t.flags)}(t));t.timescale=this.CX,t.earliestPresentationTime=e.toInt();for(const e of t.references)e.subsegmentDuration=Nk(e.subsegmentDuration,i,this.CX);return t}VX(t){const i=t.timescale;t.timescale=this.CX,t.earliestPresentationTime=$c(t.earliestPresentationTime,i,this.CX);for(const e of t.references)e.subsegmentDuration=Nk(e.subsegmentDuration,i,this.CX);return t}TX(t){const i=qy(t),e=i.getSize();for(const t of i.boxes)t instanceof Ls&&this.WX(t);const s=i.getSize();if(s!==e){const t=s-e;for(const e of i.boxes)e instanceof Ls&&yk(e,t)}return i.serialize().join()}WX(t){let i;for(let e=0;e<t.boxes.length;e++){const s=t.boxes[e];s instanceof Ny?(i=this.SX(s.trackId),this.HX(s,i)):s instanceof vr?t.boxes[e]=this.qX(s,i):s instanceof Lu?t.boxes[e]=this.XX(s,i):s instanceof br&&this.ZX(s,i)}}HX(t,i){void 0!==t.defaultSampleDuration&&(t.defaultSampleDuration=Nk(t.defaultSampleDuration,i,this.CX))}qX(t,i){const e=$c(Ce.fromNumber(t.baseMediaDecodeTime,!0),i,this.CX);return 0!==e.getHighBits()?this.XX(function(t){return new Lu(Ce.fromNumber(t.baseMediaDecodeTime,!0),t.flags)}(t),i):(t.baseMediaDecodeTime=e.toInt(),t)}XX(t,i){return t.baseMediaDecodeTime=$c(t.baseMediaDecodeTime,i,this.CX),t}ZX(t,i){let e=0,s=0;for(const n of t.samples){if(void 0!==n.duration){s+=n.duration;const t=Nk(s,i,this.CX);n.duration=t-e,e=t}void 0!==n.compositionTimeOffset&&(n.compositionTimeOffset=Tk(n.compositionTimeOffset,i,this.CX))}}constructor(t){super(),this.IX=Y(),this.CX=t}};function Tk(t,i,e){return Ce.fromInt(t,!1).multiply(e).divide(i).toNumber()}function Nk(t,i,e){return Ce.fromInt(t,!0).multiply(e).divide(i).toNumber()}function $c(t,i,e){return ts.EN(t).JN(ts.bN(e,!0)).eD(ts.bN(i,!0)).QN()}var Dk,Sk,Ik,Ek=class{KX(t){return t.pipeThrough(new De(this.JX))}constructor(t){this.JX=new Mk(t)}};function bk(t,i,e){const s=ha(t,i);if(s!==e)throw new b("Expected descriptor with tag "+e+", but found "+s)}function Lk(t,i){bk(t,i,3);const e=kk(t,i),s=i.Ku+e,n=lg(t,i),r=ha(t,i),h=0!=(64&r),o=0!=(32&r),a=31&r;let u,c,d;if(0!=(128&r)&&(u=lg(t,i)),h){c=ia(t,i,ha(t,i))}o&&(d=ia(t,i,2));const l=function(t,i){bk(t,i,4);const e=kk(t,i),s=i.Ku+e,n=ha(t,i),r=ha(t,i),h=r>>2,o=0!=(2&r),a=As(t,i,3),u=cs(t,i),c=cs(t,i);let d;if(i.Ku<s){const e=function(t,i){return t.getUint8(i.Ku)}(t,i);5===e&&(d=function(t,i){bk(t,i,5);const e=kk(t,i),s=Jc(t,i,e);return{$X:5,tZ:s}}(t,i))}return i.Dm(s),{$X:4,iZ:n,eZ:h,sZ:o,nZ:a,rZ:u,hZ:c,oZ:d}}(t,i);return i.Dm(s),{$X:3,o:n,aZ:u,zu:c,uZ:a,cZ:d,dZ:l}}function kk(t,i){let e=0;for(let s=0;s<4;s++){const s=ha(t,i);if(e=e<<7|127&s,!(128&s))break}return e}function Ck(t,i){const e=ha(t,i),s=ha(t,i),n=ha(t,i),r=ha(t,i),h=3&ha(t,i),o=31&ha(t,i),a=[];for(let e=0;e<o;e++){const e=lg(t,i);a.push(Jc(t,i,e))}const u=ha(t,i),c=[];for(let e=0;e<u;e++){const e=lg(t,i);c.push(Jc(t,i,e))}return{lZ:e,fZ:s,_Z:n,gZ:r,wZ:h,AZ:a,vZ:c}}function Fi(t,i,e){if(e&&i.byte>=e)return;const s=t.Pb(i.byte);return i.byte+=1,s}function xk(t,i){return function(t,i,e){let s=0,n=e;for(;n>0;)n-=1,s=256*s+Fi(t,i);return s}(t,i,2)}!function(t){t[t.mZ=3]="mZ",t[t.pZ=4]="pZ",t[t.yZ=5]="yZ"}(Dk||(Dk={})),function(t){t[t.MZ=64]="MZ",t[t.TZ=103]="TZ",t[t.NZ=107]="NZ"}(Sk||(Sk={})),function(t){t[t.DZ=0]="DZ",t[t.SZ=1]="SZ",t[t.TZ=2]="TZ",t[t.IZ=5]="IZ",t[t.EZ=34]="EZ"}(Ik||(Ik={}));var Ok,Uh=class t{bZ(t){this.LZ=this.LZ.concat(t.LZ),this.kZ+=t.U}CZ(t,i,e){const s=this.kZ,n=e-i;n>0&&(this.LZ.push({xZ:i,OZ:e,jZ:n,zZ:s,PZ:t}),this.kZ+=n)}Pb(t){for(const i of this.LZ)if(i.zZ<=t&&t<i.zZ+i.jZ)return i.PZ[t+i.xZ-i.zZ]}BZ(t,i){let e=i;for(const i of this.LZ){const s=i.OZ;for(let n=i.xZ;n<s;n+=1,e+=1)t[e]=i.PZ[n]}return e}get U(){return this.kZ}set U(t){const i=this.LZ;let e=this.kZ-t;if(!(t>=this.kZ))if(this.kZ=t,0!==t)for(let t=i.length-1;t>=0;t-=1){const s=i[t];if(e<=s.jZ)return s.OZ-=e,s.jZ-=e,void(i.length!==t+1&&(i.length=t+1));e-=s.jZ}else i.length=0}get Om(){const t=new Array(this.kZ);let i=0;for(const e of this.LZ){const s=e.OZ;for(let n=e.xZ;n<s;n+=1,i+=1)t[i]=e.PZ[n]}return t}RZ(){const t=new j(this.kZ);let i=0;for(const e of this.LZ){const s=e.OZ;for(let n=e.xZ;n<s;n+=1,i+=1)t[i]=e.PZ[n]}return t}Sm(i){const e=new t;for(const t of this.LZ)e.CZ(t.PZ,t.xZ,t.OZ);return e.GD=i||Tt({},this.GD),e}constructor(){this.kZ=0,this.LZ=[],this.GD={}}},jk=[128,64,32,16,8,4,2,1];function js(t,i){const e=_.floor(i.bit/8),s=0==(t.Pb(e)&jk[i.bit%8])?0:1;return i.bit+=1,s}function wr(t,i,e){let s=0,n=e;for(;n>0;)n-=1,s=2*s+js(t,i);return s}function Ku(t,i){let e=0;for(;0===js(t,i)&&e<32;)e+=1;return wr(t,i,e)+2**e-1}function zk(t,i){const e=Ku(t,i);return 1&e?_.floor((e+1)/2):-_.floor(e/2)}function Pk(t,i){const e=[],s={byte:1};let n;do{e.push(Rk(t,i,s)),n=i.Pb(s.byte)}while(void 0!==n&&128!==n);return e}function Bk(t,i){let e,s=0;do{e=Fi(t,i),s+=e}while(255===e);return s}function Rk(t,i,e){const s=Bk(i,e),n=Bk(i,e),r=e.byte,h=r+n;return e.byte=h,{UZ:t,QZ:s,FZ:n,YZ:r,GZ:h,VZ:i}}!function(t){t[t.WZ=1]="WZ",t[t.HZ=2]="HZ",t[t.qZ=3]="qZ",t[t.XZ=4]="XZ",t[t.ZZ=5]="ZZ",t[t.KZ=6]="KZ",t[t.JZ=7]="JZ",t[t.$Z=8]="$Z",t[t.tK=9]="tK"}(Ok||(Ok={}));var Uk=[void 0,[1,1],[12,11],[10,11],[16,11],[40,33],[24,11],[20,11],[32,11],[80,33],[18,11],[15,11],[64,33],[160,99],[4,3],[3,2],[2,1]];function Qk(t,i,e){let s=8,n=8;for(let r=0;r<e;r+=1){if(0!==n){n=(s+zk(t,i)+256)%256}s=0===n?s:n}}var Fk=class{iK(){const t=this.eK;let i=_.max(0,this.sK+t.length-2);const e=this.nK,s=e.U;let n=0;for(;i<s;i+=1){const s=e.Pb(i);0===s?n+=1:(3===s&&n>=2&&t.push(i),n=0)}this.sK=i-t.length}rK(t){const i=this.eK;let e=t;for(const t of i){if(!(t<=e))return e;e+=1}return e}Pb(t){if(!(t>this.nK.U))return t>this.sK&&this.iK(),this.nK.Pb(this.rK(t))}constructor(t){this.eK=[],this.sK=0,this.nK=t}};function Yk(t){const i=new Fk(t);let e,s,n,r,h,o,a=0,u=0,c=0,d=0;const l=i.Pb(1),f={bit:32};if(Ku(i,f),100===l||110===l||122===l||144===l){const t=Ku(i,f);3===t&&(e=js(i,f)),Ku(i,f),Ku(i,f),js(i,f);if(1===js(i,f))for(let e=0;e<(3!==t?8:12);e+=1){1===js(i,f)&&Qk(i,f,e<6?16:64)}}const g=Ku(i,f),w=Ku(i,f);if(0===w)Ku(i,f);else if(1===w){js(i,f),zk(i,f),zk(i,f);const t=Ku(i,f);for(let e=0;e<t;e+=1)zk(i,f)}Ku(i,f),js(i,f);const A=Ku(i,f),v=Ku(i,f),m=js(i,f);0===m&&js(i,f),js(i,f);1===js(i,f)&&(a=Ku(i,f),u=Ku(i,f),c=Ku(i,f),d=Ku(i,f));if(1===js(i,f)){if(1===js(i,f)){const t=wr(i,f,8);if(255===t)s=wr(i,f,16),n=wr(i,f,16);else{const i=Uk[t];i&&(s=i[0],n=i[1])}}1===js(i,f)&&js(i,f);if(1===js(i,f)){wr(i,f,3),js(i,f);1===js(i,f)&&(wr(i,f,8),wr(i,f,8),wr(i,f,8))}1===js(i,f)&&(Ku(i,f),Ku(i,f)),r=js(i,f),1===r&&(h=wr(i,f,32),o=wr(i,f,32),js(i,f))}return{width:_.floor(16*(A+1)-2*a-2*u),height:_.floor((2-m)*(v+1)*16-2*c-2*d),hM:s,oM:n,hK:r?o/(2*h):void 0,oK:e,aK:g}}function Gk(t,i,e){void 0===e&&(e=1);const s=xg(Eh.dp(t),he.Zv);if(s&&0!==s.Z.length)return function(t,i,e){void 0===e&&(e=1);var s;let n;n=void 0!==i?Po(t.Z,(t=>t.ep.Rp===i)):t.Z[0];const r=null==n||null==(s=n.yM)?void 0:s.yM;return r?ku(r,e):void 0}(s,i,e)}function Vk(t){const i=xg(Eh.dp(t),he.Av);if(!i)return;const e=i.ep.bp,s=[];for(const t of i.Z){const i=t.ep.Rp,e=t.jp.ep.bp;let o,a,u;for(const i of t.jp.Wp.Xp.Kp.$p){const t=Wk(i);var n,r,h;if(t)o=null!=(n=t.uK)?n:o,a=null!=(r=t.cK)?r:a,u=null!=(h=t.dK)?h:u}s.push({Rp:i,bp:e,uK:o,cK:a,dK:u})}return{bp:e,Z:s}}function Wk(t){let i,e,s;if(t.Rg===he.Lv){var n;const e=Ck(hl(t.Py.Om),new Ha);i=function(t){return"avc1."+Hk(t.fZ,2)+Hk(t._Z,2)+Hk(t.gZ,2)}(e),s=null==(n=function(t){if(0===t.AZ.length)return;const i=t.AZ[0],e=new Uh;return e.CZ(i,0,i.byteLength),Yk(e)}(e))?void 0:n.hK}else if(t.Rg===he.xv||t.Rg===he.Ov){const e=function(t,i){const e=i.Cm(),s=Ri(t,e,8),n=Ri(t,e,2),r=Ri(t,e,1),h=Ri(t,e,5),o=Ri(t,e,32),a=[];for(let i=0;i<6;i++)a.push(Ri(t,e,8));const u=Ri(t,e,8);e.Nm(4);const c=Ri(t,e,12);e.Nm(6);const d=Ri(t,e,2);e.Nm(6);const l=Ri(t,e,2);e.Nm(5);const f=Ri(t,e,3);e.Nm(5);const _=Ri(t,e,3),g=Ri(t,e,16),w=Ri(t,e,2),A=Ri(t,e,3),v=Ri(t,e,1),m=Ri(t,e,2),p=Ri(t,e,8),y=[];for(let i=0;i<p;i++){const i=Ri(t,e,1);e.Nm(1);const s=Ri(t,e,6),n=Ri(t,e,16),r=[];for(let i=0;i<n;i++){const i=Ri(t,e,16),s=Jc(t,new Ha(e.Ku>>3),i);e.Nm(8*i),r.push({lK:i,fK:s})}y.push({_K:i,gK:s,wK:n,AK:r})}return{lZ:s,vK:n,mK:r,pK:h,yK:a,MK:u,TK:c,NK:d,DK:o,SK:l,IK:f,EK:_,bK:g,LK:A,kK:v,CK:w,wZ:m,xK:p,jK:y}}(hl(t.Qy.Om),new Ha);i=function(t,i){let e=t.toString()+".";switch(i.vK){case 0:break;case 1:e+="A";break;case 2:e+="B";break;case 3:e+="C";break;default:return}switch(e+=i.pK.toString()+".",e+=function(t){let i=t;return i=i>>>1&1431655765|(1431655765&i)<<1,i=i>>>2&858993459|(858993459&i)<<2,i=i>>>4&252645135|(252645135&i)<<4,i=i>>>8&16711935|(16711935&i)<<8,i=i>>>16|i<<16,i}(i.DK).toString(16)+".",i.mK){case 0:e+="L";break;case 1:e+="H";break;default:return}e+=i.MK.toString();const s=i.yK.reduce(((t,i)=>0===t?i:i+1),0);for(let t=0;t<s;t++)e+="."+i.yK[t].toString(16).toUpperCase();return e}(t.Rg,e)}else if(t.Rg===he.Pv){const e=function(t,i){const e=i.Cm(),s=Ri(t,e,8);e.Nm(24);const n=Ri(t,e,8),r=Ri(t,e,8),h=Ri(t,e,4),o=Ri(t,e,3),a=Qh(t,e),u=Ri(t,e,8),c=Ri(t,e,8),d=Ri(t,e,8),l=Ri(t,e,16),f=new Array(8);for(let i=0;i<l;i++)f[i]=Ri(t,e,8);return{lZ:s,zK:n,PK:r,BK:h,RK:o,UK:a,eM:u,sM:c,nM:d,QK:l,FK:f}}(hl(t.Yy.Om),new Ha);i=function(t,i){let e=t.toString()+".";return e+="0"+i.zK+".",e+=eu(""+i.PK,2,"0")+".",e+=eu(""+i.BK,2,"0")+".",e+=eu(""+i.RK,2,"0")+".",e+=eu(""+i.eM,2,"0")+".",e+=eu(""+i.sM,2,"0")+".",e+=eu(""+i.nM,2,"0")+".",e+="0"+i.UK,e}(t.Rg,e)}else if(t.Rg===he.Rv){const e=function(t,i){const e=i.Cm();e.Nm(1);const s=Ri(t,e,7),n=Ri(t,e,3),r=Ri(t,e,5),h=Qh(t,e),o=Qh(t,e),a=Qh(t,e),u=Qh(t,e),c=Qh(t,e),d=Qh(t,e),l=Ri(t,e,2);e.Nm(3);const f=Qh(t,e);let _;return f?_=Ri(t,e,4):e.Nm(4),{ap:s,YK:n,GK:r,VK:h,WK:o,HK:a,qK:u,XK:c,ZK:d,KK:l,JK:f,$K:_}}(hl(t.Wy.Om),new Ha);i=function(t,i,e){let s=t.toString()+".";if(s+=i.YK+".",s+=""+eu(""+i.GK,2,"0"),s+=(0===i.VK?"M":"H")+".",s+=(1===i.HK?12:10)+".",s+=(1===i.YK?0:i.qK)+".",s+=""+i.XK+i.ZK+(1===i.XK&&1===i.ZK?i.KK:"0"),e&&e.iM===au.ON_SCREEN_COLOURS){const t=e;s+="."+eu(""+t.eM,2,"0")+"."+eu(""+t.sM,2,"0")+"."+eu(""+t.nM,2,"0")+"."+(t.rM?1:0)}return s}(t.Rg,e,t.Hy)}else{if(t.Rg!==he.Yv)return(t.Rg===he.Xv||t.Rg===he.qv)&&t.Zy?Wk(t.Zy):void 0;e=function(t){const i=t.dZ;switch(i.iZ){case Sk.MZ:return function(t){var i;if(!(null==(i=t.oZ)?void 0:i.tZ))return"mp4a.40";const e=function(t,i){let e=Ri(t,i,5);31===e&&(e=32+Ri(t,i,6));const s=Ri(t,i,4);let n;return 15===s&&(n=Ri(t,i,24)),{tJ:e,iJ:s,eJ:n,sJ:Ri(t,i,4)}}(hl(t.oZ.tZ),new B_);return"mp4a.40."+e.tJ}(i);case Sk.TZ:return"mp4a.40.2";case Sk.NZ:return"mp4a.40.34"}}(Lk(hl(t.Ly.Om),new Ha))}return{uK:i,cK:e,dK:s}}function Hk(t,i){const e=t.toString(16);return eu(e,i,"0")}function qk(t,i){const e=Eh.dp(hl(t)),s=function(t,i){let e;for(const n of t.Z){var s;const t=null==(s=n.yM)?void 0:s.yM;if(t){const s=n.ep.Rp,r=Po(i.Z,(t=>t.Rp===s)),h=Sn.EN(t,r.bp);e&&!h.pN(e)||(e=h)}}return e}(xg(e,he.Zv),i),n=xg(e,he.hm);return{RT:s.fN(),nJ:n.Om}}var Xk=fi.QE,Zk=class extends Bo{get AW(){return this.SW}set AW(t){this.SW=t}get yW(){return this.bW}set yW(t){this.bW=t}get oa(){return this.rJ||this.hJ.updating}oJ(t,i,e){switch(t.Rg){case dt.$H:case dt.US:return this.aJ((e=>this.uJ(t,i,e)),e);case dt.tq:throw new g("Opaque segments are not supported on web.")}}cJ(t,i){switch(t.Rg){case dt.$H:return this.aJ((i=>this.dJ(t,i)),i);case dt.US:throw new g("Streaming initialization segments are not supported on web.");case dt.tq:throw new g("Opaque initialization segments are not supported on web.")}}async dJ(t,i){this.lJ?this.fJ=Vk(hl(t.Om)):(await this._J(t,void 0,i),Xk&&(this.gJ=!1,this.wJ=t))}async uJ(t,i,e){Xk&&this.gJ&&this.wJ&&await this.dJ(this.wJ,e);try{if(fo(e),this.lJ&&this.fJ){const n=await async function(t,i){switch(t.Rg){case dt.$H:return t;case dt.US:{const e=await bt(t.Om,i);return fo(i),{Rg:dt.$H,Om:new j(e)}}case dt.tq:throw new g("MediaBufferWrapper - Cannot convert opaque SegmentData to ArraySegmentData.")}}(t,e),r=qk(n.Om,this.fJ);var s;t={Rg:dt.$H,Om:r.nJ},i=Tt({},i,{jD:r.RT+(null!=(s=i.jD)?s:0)})}await this._J(t,i,e),this.Co(new Yi(Je.KH))}finally{t.Rg===dt.US&&t.Om.cancel(new is).catch(qo)}}async _J(t,i,e){switch(fo(e),i&&await this.AJ(i),t.Rg){case dt.$H:if(this.vJ){const i=this.vJ.KX(Rb(t.Om));return await this.mJ(i,e)}return await this.pJ(t.Om);case dt.US:if(this.vJ){const i=this.vJ.KX(t.Om);return await this.mJ(i,e)}return await this.mJ(t.Om,e)}}async mJ(t,i){const e=this.yJ.wf,s=function(t,i){return void 0===i&&(i=new Db({highWaterMark:1/0})),new xi(new ak(t,i),{highWaterMark:0})}(t),n=s.getReader();let r=!1;try{for(;;){const t=await ji(n.read(),i);if(t.done){r=!1;break}fo(i);const e=Qt(t.value);r=!0,await this.pJ(e)}}catch(t){if(n.cancel(t).catch(qo),r){await this.MJ();const t=this.yJ.wf.Sn(e.iB());for(let i=0;i<t.U;i++)await this.TJ(t.Cn(i),t.jn(i))}throw t}}NJ(t,i){return this.aJ((()=>this.DJ(t,i)))}async DJ(t,i){this.hJ.appendWindowStart===t&&this.hJ.appendWindowEnd===i||(await this.MJ(),this.hJ.appendWindowStart=0,this.hJ.appendWindowEnd=i,this.hJ.appendWindowStart=t)}async AJ(t){if(this.hJ.timestampOffset!==t.jD)try{this.hJ.timestampOffset=t.jD}catch(i){await this.MJ(),this.hJ.timestampOffset=t.jD}}async pJ(t){this.hJ.appendBuffer(t),this.SJ=!0,await this.IJ()}EJ(t,i,e){return this.aJ((e=>this.TJ(t,i,e)),e)}async TJ(t,i,e){fo(e),this.hJ.remove(t,i),await this.IJ()}IJ(){const t=this.yJ.wf;return new Promise(((i,e)=>{let s,n=!1,r=()=>{n=!0},h=()=>{n=!1,s="error"},o=()=>{n=!1,s="aborted"},a=()=>{n=!1,s="sourceclose",u()},u=()=>{c(),n&&!s?(t.fB(this.yJ.wf)||this.Co(new Yi(Je.KH)),i()):e(new g(s))},c=()=>{this.hJ.removeEventListener("update",r),this.hJ.removeEventListener("error",h),this.hJ.removeEventListener("abort",o),this.hJ.removeEventListener("updateend",u),this.bJ.fn(pr.nq,a)};this.hJ.addEventListener("update",r),this.hJ.addEventListener("error",h),this.hJ.addEventListener("abort",o),this.hJ.addEventListener("updateend",u),fi.pE&&fi.ME<3&&this.bJ.yn(pr.nq,a)}))}LJ(){return this.aJ((()=>this.MJ()))}async MJ(){if(this.bJ.Jf===Er.mS){Xk&&(this.gJ=!0),this.hJ.updating&&(this.rJ=!0);try{this.hJ.abort()}catch(t){0,this.rJ=!1}this.oa&&await this.IJ().catch(qo)}}kJ(){return"function"==typeof this.hJ.changeType}cq(t){if(this.CJ(),this.bJ.Jf===Er.xJ)return;var i;this.OJ=t;const e=null!=(i=this.bJ.jJ(t.Fz))?i:t.Fz;this.lJ=Kk(t.Fz,this.zJ),this.kJ()&&!Ts(this.zJ,e)&&(this.zJ=e,this.hJ.changeType(this.zJ))}PJ(){this.bJ.Jf!==Er.Jg||this.BJ||this.oa||(this.hJ.timestampOffset=this.hJ.timestampOffset,this.bJ.RJ())}async aJ(t,i){this.CJ();const e=new er;e.Zd(this.UJ.Hd),i&&e.Zd(i);try{this.BJ=t(e.Hd),await this.BJ,this.bJ.RJ(),this.oa&&await this.IJ()}finally{this.BJ=void 0,e.Qd()}}CJ(){if(this.BJ)throw new g("Internal error")}async Qd(){this.Vo(),this.UJ.Xd(),this.BJ&&(await this.BJ.catch(qo),this.BJ=void 0),this.hJ.removeEventListener("updateend",this.QJ),this.hJ.removeEventListener("bufferedchange",this.FJ)}constructor(t,i,e,s,n){var r;if(super(),this.SW=20,this.bW=30,this.rJ=!1,this.SJ=!1,this.BJ=void 0,this.UJ=new er,this.gJ=!1,this.wJ=void 0,this.lJ=!1,this.fJ=void 0,this.QJ=()=>{this.rJ=!1},this.FJ=t=>{t.removedRanges&&this.Co(new Yi(Je.KH))},this.bJ=i,this.yJ=t,this.hJ=e,this.hJ.addEventListener("updateend",this.QJ),this.hJ.addEventListener("bufferedchange",this.FJ),this.OJ=s,this.zJ=n,this.lJ=Kk(s.Fz,n),null==(r=i.wd)?void 0:r.YJ){var h;const t=null!=(h=i.wd.GJ)?h:1e5;this.vJ=new Ek(t)}}};function Kk(t,i){return D(t,"audio/mp4")&&D(i,"audio/mpeg")}var Jk=class{get wf(){if(this.VJ.Jf===Er.xJ)return ce.MB();let t=ce.xn(this.hJ.buffered).Sn(new ce([0,1/0]));const i=this.WJ;return void 0!==i&&t.U>0&&t.jn(t.U-1)===i&&(t=t.rB(ce.pB(i))),t}Dq(){return!!this.WJ&&this.wf.$P().gr(this.WJ)}HJ(){const t=this.wf;this.WJ=t.U>0?t.jn(t.U-1):0,this.VJ.qJ()}PJ(){this.WJ=void 0}constructor(t,i){this.WJ=void 0,this.VJ=i,this.hJ=t}};function $k(t){const i=t.nS("codecs");return i?i.split(",").map((t=>t.trim())):[]}function tC(t,i){return!("opus"===t)&&!("opus"===i)||t===i}function iC(t,i){const e=eC(t)||sC(t),s=eC(i)||sC(i);return!e&&!s||t===i}function eC(t){return/^(ac-3|dac3|ec-3|dec3|ec\+3|ac-4|dac4)/.test(t)}function sC(t){return/^(dvav|dva1|dvhe|dvh1)/.test(t)}function ot(t,i){if(t===i)return!0;const e=t.split("."),s=i.split("."),n=e[0];if(n!==s[0])return!1;if("mp4a"===n){const[,t,i]=e,[,n,r]=s;if(t!==n)return!1;if(Number(i)!==Number(r))return!1}return!0}function nC(t,i,e,s,n,r,h){const o=new Jk(n,t),a=new Zk(o,t,n,e,r);return new rC(t,i,e,s,o,a,h)}var rC=class extends Bo{get wf(){return this.yJ.wf}get wd(){return this.sx}get Fz(){return this.KC}get XJ(){return this.ZJ}get KJ(){return this.JJ.Cq}get AW(){return this.$J.AW}set AW(t){this.$J.AW=t}get yW(){return this.$J.yW}set yW(t){this.$J.yW=t}get oa(){return this.$J.oa}Dq(){return this.yJ.Dq()}HJ(){this.yJ.HJ()}PJ(){this.yJ.PJ(),this.$J.PJ()}t$(t,i){this.JJ.Oq(t,i)}i$(t,i){this.JJ.jq(t,i)}e$(){return this.$J.LJ()}oJ(t,i,e){return this.$J.oJ(t,i,e)}cJ(t,i,e){return this.$J.cJ(t,e)}NJ(t,i){return fi.pE&&fi.ME<3?this.$J.NJ(t,1/0):this.$J.NJ(t,i)}async TT(t,i,e){this.i$(t,i);const s=this.wf;await this.$J.EJ(t,i,e);const n=0!==s.U&&0===this.wf.U;(fi.XE||fi.NE)&&n&&this.sA.Dm(this.sA.Mf)}aq(t){const i=t.Fz;if(this.KC===i)return!0;const e=this.s$.get(i);if(void 0!==e)return e;const s=this.n$(t);return this.s$.set(i,s),s}n$(t){const i=this.bJ.jJ(t.Fz);if(void 0===i)return!1;const e=An(this.KC),s=An(i),n=$k(e),r=$k(s);if(this.$J.kJ()){if(!function(t,i){return Zd(t,i,iC)}(n,r))return!1;if(fi.KE&&!function(t,i){return Zd(t,i,tC)}(n,r))return!1}else{if(e.Rg!==s.Rg)return!1;if(!function(t,i){return Zd(t,i,ot)}(n,r))return!1}return!0}async cq(t){const i=t.Fz;this.KC!==i&&(this.s$.clear(),this.$J.cq(t),this.KC=i),this.sx=t,this.bJ.r$()}async Qd(){this.s$.clear(),this.Vo(),this.JJ.gn();try{this.$J.fn(Je.KH,this.Ds),await this.$J.Qd()}catch(t){}}constructor(t,i,e,s,n,r,h){super(),this.s$=Cn(),this.bJ=t,this.sx=e,this.KC=e.Fz,this.ZJ=s,this.sA=i,this.yJ=n,this.$J=r,this.JJ=h,this.$J.yn(Je.KH,this.Ds)}},hC=class{h$(){let t=this.Cn,e=this.jn;if(this.o$||this.a$){const s=.001*(i.Jd()-this.u$);this.o$&&(t+=s),this.a$&&(e+=s)}return ce.yB(t,e)}constructor(t,e,s=!1,n=!1){this.Cn=t,this.jn=e,this.o$=s,this.a$=n,this.u$=i.Jd()}},oC=.5,aC=[Co.jh,Co.Sh,Co.yw,Co.pw,Co.hw,Co.aw,Co.Jg,Co.ww,Zt.H_,ut.ha],uC=class{c$(t){this.d$.push(t),t.yn(sk.bq,this.l$)}get Cq(){return this.d$.reduce(((t,i)=>t.rB(i.Cq)),ce.MB())}gn(){this.f$(),this._$.fn(Zt.H_,this.g$),this.sA.fn(Co.gw,this.g$),this.sA.fn(aC,this.w$),this.d$.forEach((t=>t.fn(sk.bq,this.l$))),0!==this.A$&&(i.$d(this.A$),this.A$=0),this.v$=!0}lq(t){if(this.sA.Sf)return!1;if(0!==this.A$)return!1;const e=this.yJ.wf,s=e.aB(t);if(s>=0&&t+oC<e.jn(s))return!1;const n=s>=0?s+1:e.AB(t);if(n<0||n>=e.U)return!1;const r=e.Cn(n);if(ce.yB(t,r).oB(this.Cq).mB>1)return!1;if(i.m$)return this.p$=this.sA.Mf,this.A$=i.ul((()=>{this.p$===this.sA.Mf&&this.y$(r),this.A$=0}),250),!0;return!(_.abs(r-t)<=.001)&&(this.y$(r),!0)}y$(t){this.sA.Dm(t,!1,!0)}M$(){0!==this.T$&&(i.$d(this.T$),this.T$=0),this.sA.fn(Co.Iw,this.Jl)}N$(){this.v$||0===this.D$&&(this.M$(),this.D$=i.S$(this.I$,250))}f$(){0!==this.D$&&(i.E$(this.D$),this.D$=0),this.M$(),this.sA.e_||(this.b$=0)}L$(){return!this.sA.Ff&&!this.sA.e_&&0!==this.sA.Gf&&!this.sA.Sf&&!this.sA.lt&&(this.k$()||this._$.Jf>=oe.rT)}k$(){const t=this.sA.Mf,i=this.yJ.wf,e=i.aB(t);return-1!==e&&i.jn(e)>t+oC}C$(t,i){const e=i.aB(t);return e>-1?i.jn(e):t}constructor(t,e,s,n){this.yJ=t,this._$=e,this.sA=s,this.v$=!1,this.d$=[],this.A$=0,this.T$=0,this.x$=0,this.p$=0,this.b$=0,this.D$=0,this.O$=1,this.l$=t=>{const i=this.sA.Mf,e=t.kq.gr(i),s=t.kq.gr(i,oC)&&this.sA.Jf<=oe.nT;(e||s)&&this.lq(i)},this.g$=Un((t=>{if(this.v$)return;if(this._$.Jf<=oe.nT){const t=this.sA.Mf;this.lq(t)||this.I$()}}),100),this.Jl=Un((t=>{this.N$()}),100),this.w$=()=>{this.L$()?0===this.D$&&(this.sA.yn(Co.Iw,this.Jl),this.T$=i.ul((()=>{this.N$()}),3500)):this.f$()},this.I$=()=>{const t=this.x$,e=this.b$,s=this.sA.Mf,n=i.Jd(),r=this.yJ.wf;if(t!==s)return this.x$=s,this.b$=n,this.O$=1,void(this.j$=i.z$?2e3:1e3);if(this.L$()&&0!==r.U&&e>0&&n>e+this.j$){let t;const i=this.Cq.$P().oB(r),e=i.wB(s);if(-1!==e){const n=i.Cn(e);if(n-s<1){const s=i.jn(e);0,t=s}}var h;if(!t)t=null==(h=this.P$)?void 0:h.determineStallJumpTarget(),t||(t=s+.01*this.O$,r.gr(t)||(t=this.C$(s,r)));0,this.x$=t,this.O$++,this.j$=_.min(2*this.j$,1e4),this.y$(t)}},this._$.yn(Zt.H_,this.g$),this.sA.yn(Co.gw,this.g$),this.sA.yn(aC,this.w$),this.P$=n,this.j$=i.z$?2e3:1e3}};function cC(t){const i=[];if(t.B$&&i.push(t.B$.wf),t.R$&&i.push(t.R$.wf),0===i.length)return ce.MB();let e=0;for(const t of i)t.U>0&&(e=_.max(e,t.jn(t.U-1)));const s=t.Dq;let n=new ce([0,e],[!0,s]);for(let t of i)s&&t.U>0&&(t=t.rB(new ce([t.jn(t.U-1),e],[!0,!0]))),n=n.Sn(t);return n}function dC(t,i,e){const s=t.wf;let n,r=s.aB(i);if(r>=0){if(!(r+1<s.U))return Promise.resolve();n=s.Cn(r+1)}else{if(r=s.AB(i),!(r>=0))return Promise.resolve();n=s.Cn(r)}return t.TT(n,1/0,e)}function lC(t,i,e){if(!t.gr(i)){const s=t.aB(i,e);if(s>=0){const e=t.Cn(s);if(i<e)return e}}return i}var fC=class{U$(){return new this.Q$}F$(t){return this.Q$.isTypeSupported(t)}constructor(t){this.Q$=_C(t)}};function _C(t){return t&&Us(Qr.ManagedMediaSource)?Qr.ManagedMediaSource:Us(Qr.MediaSource)?Qr.MediaSource:void 0}var Er,gC=fi.bE||fi.kE,wC=fi.PE||fi.QE&&fi.YE>=17;!function(t){t.xJ="closed",t.mS="open",t.Jg="ended"}(Er||(Er={}));var AC=class extends ek{get B$(){return this.Y$}get R$(){return this.G$}get ct(){if(this.V$)return this.V$;const t=this.Pz.duration;return t===Da?1/0:t}W$(t){if(S(t)||t<0)throw new g("Invalid duration");this.H$()?this.q$(t):this.V$=t}q$(t){const i=t===1/0;if(i&&this.Pz.setLiveSeekableRange){const t=2**39;this.Pz.setLiveSeekableRange(0,t)}this.Pz.duration=i?wC?1/0:Da:t,this.V$=void 0}get wf(){return gC?cC(this):function(t,i){let e=i;return e.U>0&&t.Dq&&(e=e.rB(ce.pB(e.jn(e.U-1)))),e}(this,ce.xn(this.bx.buffered))}get Sq(){var t;return null==(t=this.Y$)?void 0:t.wf}get Iq(){var t;return null==(t=this.G$)?void 0:t.wf}get t_(){return this.X$.h$().Sn(new ce([0,this.ct],[!0,!0]))}Z$(t,i,e,s){this.X$=new hC(t,i,!!e,!!s)}get Dq(){return(!this.Y$||this.Y$.Dq())&&(!this.G$||this.G$.Dq())}get Jf(){return this.Pz.readyState}async MW(){const t=this.sx,i=Po(t.K$,(t=>D(t.Fz,"audio"))),e=Po(t.K$,(t=>D(t.Fz,"video")));if(this.bx.disableRemotePlayback=!0,await this.J$(),i){const t=new Tr;var s;this.t0.c$(t);const e=null!=(s=this.jJ(i.Fz))?s:i.Fz;this.i0=this.Pz.addSourceBuffer(e),this.Y$=nC(this,this.sA,i,f.vm,this.i0,e,t),this.Y$.yn(Je.KH,this.FJ)}if(e){const t=new Tr;var n;this.t0.c$(t);const i=null!=(n=this.jJ(e.Fz))?n:e.Fz;this.e0=this.Pz.addSourceBuffer(i),this.G$=nC(this,this.sA,e,f.Am,this.e0,i,t),this.G$.yn(Je.KH,this.FJ)}this.dq.$n(this,t)}async J$(){await super.Mq(this.Pz),"open"!==this.Jf&&await jt(this.Pz,"sourceopen")}H$(){if("open"!==this.Jf)return!1;const t=this.Y$&&this.Y$.oa,i=this.G$&&this.G$.oa;return!(t||i)}HJ(){this.s0=!0,this.Y$&&this.Y$.HJ(),this.G$&&this.G$.HJ(),this.s0=!1,this.n0()}PJ(){this.Y$&&this.Y$.PJ(),this.G$&&this.G$.PJ()}aq(t){const i=Po(t.K$,(t=>D(t.Fz,"audio"))),e=Po(t.K$,(t=>D(t.Fz,"video")));if(this.Y$){if(!i)return!1;if(!this.Y$.aq(i))return!1}else if(i)return!1;if(this.G$){if(!e)return!1;if(!this.G$.aq(e))return!1}else if(e)return!1;return!!super.aq(t)}async cq(t){const i=Po(t.K$,(t=>D(t.Fz,"audio"))),e=Po(t.K$,(t=>D(t.Fz,"video"))),s=[];this.Y$&&s.push(this.Y$.cq(i)),this.G$&&s.push(this.G$.cq(e)),await Promise.all(s),await super.cq(t)}async Qd(){if(this.Pz.removeEventListener("sourceclose",this.r0),fi.NE&&await this.Nq(),this.Y$){if(await this.Y$.Qd(),this.Y$=void 0,yr()&&(fi.NE||fi.pE))try{this.Pz.removeSourceBuffer(this.i0)}catch(t){}this.i0=void 0}if(this.G$){if(await this.G$.Qd(),this.G$=void 0,yr()&&(fi.NE||fi.pE))try{this.Pz.removeSourceBuffer(this.e0)}catch(t){}this.e0=void 0}this.bx.src&&URL.revokeObjectURL(this.bx.src),this.bx.disableRemotePlayback=!1,this.sA.fn([Co.yw,Co.hw],this.h0),this.t0.gn(),fi.pE&&await this.Nq(),await super.Qd()}r$(){const t=this.sx,i=t.K$.map((t=>D(t.Fz,"audio")&&this.Y$?this.Y$.wd:D(t.Fz,"video")&&this.G$?this.G$.wd:t));this.sx=Tt({},t,{K$:i})}qJ(){this.s0||this.n0()}get o0(){if(!this.Dq)return!1;const t=this.wf;return 0!==t.U&&t.Cn(t.U-1)<=this.sA.Mf}n0(){this.o0&&this.H$()&&(this.Pz.endOfStream(),this.V$=void 0,this.Co(new Yi(pr.XR)),this.sA.FJ())}RJ(){this.H$()&&(this.Dq?this.n0():void 0!==this.V$&&this.q$(this.V$))}lq(t){return this.t0.lq(t)}jJ(t){return vC(this.a0,t)}static Eq(t){const i=_C(t.u0);if(void 0===i)return!1;if("function"!=typeof i.isTypeSupported)return!1;const e=new fC(t.u0);for(const i of t.K$)if(void 0===vC(e,i.Fz))return!1;return!0}constructor(t,i,e,s,n,r=new fC(t.u0),h){super(t,i,s,n),this.Y$=void 0,this.i0=void 0,this.G$=void 0,this.e0=void 0,this.X$=new hC(0,1/0),this.V$=void 0,this.s0=!1,this.r0=()=>{this.Co(new Yi(pr.nq))},this.h0=()=>{this.n0()},this.FJ=()=>{this.sA.FJ()},this.a0=r,this.Pz=this.a0.U$(),this.Pz.addEventListener("sourceclose",this.r0),this.sA.yn([Co.yw,Co.hw],this.h0),this.t0=new uC(this,e,this.sA,h)}};function vC(t,i){const e=An(i),s="audio/mp4"===e.Rg&&function(t,i){return Wd(t,i,((t,i)=>t===i))}($k(e),["mp4a.40.34"]);if(t.F$(i)&&(!s||!fi.QE))return i;if(s){const i=Po(['audio/mp4; codecs="mp3"',"audio/mpeg"],(i=>t.F$(i)));return void 0!==i?i:void 0}}var Pi=class extends Yi{constructor(t){super(Co.hw),this.currentTime=t}},mC=[Co.Ew,Co.ww,Co.yw,Co.hw,Co.jh,Co.Sh],pC=class extends Bo{get Mf(){return this.TB}get c0(){return this.d0}get l0(){return this.f0}get ct(){return this.UL}get Sf(){return this._0}get Ff(){return this.SB}get Jf(){return this.g0}get e_(){return this.NB}get Pf(){return this.DB}set Pf(t){this.Pf!==t&&(this.DB=t,this.Co(new Tc(this.Mf,this.c_)))}get Gf(){return this.IB}set Gf(t){this.Gf!==t&&(this.IB=t,this.Co(new Kn(this.Mf,this.Gf)))}get c_(){return this.$L}set c_(t){this.c_!==t&&(this.$L=t,this.Co(new Tc(this.Mf,this.c_)))}Dm(t,i,e){this.TB!==t&&(this.TB=t,this.d0=i,e&&!this.NB?(this.f0=!0,this.Co(new Pi(this.Mf))):(this.f0=!1,this.NB=!0,this.Co(new lo(this.Mf))))}m_(){this.SB||(this.SB=!0,this.Co(new iu(this.Mf)))}p_(){this.SB&&(this.SB=!1,this.Co(new Qn(this.Mf)))}Qd(){this.Vo()}constructor(t,i,e,s,n,r,h,o,a,u,c){super(),this.TB=t,this.UL=i,this._0=e,this.SB=s,this.NB=n,this.DB=r,this.IB=h,this.$L=o,this.g0=a,this.d0=u,this.f0=c}};function yC(t){return new pC(t.Mf,t.ct,t.Sf,t.Ff,t.e_,t.Pf,t.Gf,t.c_,t.Jf,!1,t.l0)}function MC(t,i){i.ct===t.ct||S(i.ct)&&S(t.ct)||t.Co(new os(t.ct)),t.Pf=i.Pf,t.c_=i.c_,t.Gf=i.Gf,i.Ff?t.m_():t.p_().catch(qo),i.Mf!==t.Mf||i.Jf>oe.sT&&t.Jf===oe.sT?t.Dm(i.Mf,i.c0,i.l0):!i.e_&&t.e_?t.Co(new lo(t.Mf)):i.e_&&!t.e_&&t.Jf>=oe.nT&&t.Co(new _r(t.Mf)),!i.Sf&&t.Sf&&t.Co(new ve(t.Mf))}var TC=class extends Bo{get Jf(){return this.$f()}w0(t){this.Zx!==t&&(this.Zx=t,this.Co(new Bn(this.sA.Mf,t)))}A0(){this.w0(this.$f())}tr(){this.w0(oe.sT)}Qd(){this.Vo()}constructor(t){super(),this.Zx=oe.sT,this.v0=()=>{this.A0()},this.sA=t}},NC=["emptied","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","timeupdate","progress","seeking","seeked"],Sh=class extends TC{$f(){let t=this.sA.jz.readyState;return t>oe.nT&&this.sA.m0?oe.nT:(this.sA.jz.seeking&&t>oe.Xn&&(t=oe.Xn),t)}Qd(){for(const t of NC)this.sA.jz.removeEventListener(t,this.v0);super.Qd()}constructor(t){super(t);for(const t of NC)this.sA.jz.addEventListener(t,this.v0)}},DC=class extends TC{$f(){if(this.sA.jz.readyState===oe.sT)return oe.sT;const t=this.p0(),i=t?t.jn-t.Cn:0;if(!t)return oe.Xn;const e=this.sA.Gf;return this.y0()||i>=3*e?oe.hT:i>=3?oe.rT:oe.nT}p0(){const t=this.sA.Mf,i=this.sA.wf.nB(.04),e=i.aB(t);if(!(e<0))return{Cn:t,jn:i.jn(e)}}y0(){if(this.sA.Sf)return!0;const t=this.sA.ct,i=this.p0();return!!i&&t-i.jn<=.16666666666666666}Qd(){this.sA.fn([Co.yw,Co.hw],this.v0);for(const t of NC)this.sA.jz.removeEventListener(t,this.v0);super.Qd()}constructor(t){super(t),this.sA.yn([Co.yw,Co.hw],this.v0);for(const t of NC)this.sA.jz.addEventListener(t,this.v0)}},SC=[Zt.H_,Co.jh,Co.Sh,Co.yw,Co.pw,Co.hw,Co.aw,Co.Jg,ut.ha],IC=class extends Bo{M0(){return(!this.Vx.l0||!this.Vx.T0)&&this.Vx.Jf<oe.rT}N0(){return!this.Vx.e_&&!(this.Vx.Ff||this.Vx.Sf||this.Vx.lt||this.M0())}Yn(){const t=this.D0;this.D0=this.N0(),!t&&this.D0&&this.Co(new _e(this.Vx.Mf))}tr(){this.D0=!1}Qd(){this.Vo(),this.Vx.fn(SC,this.HY)}constructor(t){super(),this.D0=!1,this.HY=()=>{this.Yn()},this.Vx=t,this.Vx.yn(SC,this.HY)}},EC=class extends IC{N0(){return this.S0&&super.N0()}Yn(){this.S0&&(this.bx.paused||this.bx.ended||this.bx.error)&&(this.S0=!1),super.Yn()}tr(){super.tr(),this.S0=!1}Qd(){this.bx.removeEventListener(Zt.Rw,this.eO),super.Qd()}constructor(t){super(t),this.S0=!1,this.eO=()=>{this.S0=!0,this.Yn()},this.bx=t.jz,this.bx.addEventListener(Zt.Rw,this.eO)}},bC=class extends Yi{constructor(t){super(ut.ha),this.lt=t}};function LC(t,i){return t.RT<=i&&t.UT>i}function kC(t,i){return function(t,i){return Bd(t.RT,i.RT,sr)}(t,i)||function(t,i){return Bd(t.UT,i.UT,sr)}(t,i)}function CC(t,i){return function(t,i){return Bd(t.HT,i.HT,sr)}(t,i)||function(t,i){return Bd(t.qT,i.qT,sr)}(t,i)}function Fh(t,i,e){let s=function(t,i,e,s,n,r,h){void 0===n&&(n=!1),void 0===r&&(r=0),void 0===h&&(h=t.length);let o=r,a=h-1;for(;o<=a;){const h=o+(a-o>>1),u=s(e(t[h]),i);if(u<0)o=h+1;else if(u>0)a=h-1;else{if(!(n&&h>r&&0===s(e(t[h-1]),i)))return h;a=h-1}}return~o}(t,i,Ll,e,!0);if(s<0)return s;for(;s<t.length&&e(i,t[s])===pe.Zr;s++)if(t[s].eN(i))return s;return-(s+1)}function xC(t,i,e){const s=Fh(t,i,e);return s>=0?s:-(s+1)}function OC(t){const i=t.Lt;if(!i)return-1;if(t instanceof dh)return i.I0(t);const e=i.L;if(!e)return-1;const s=Fh(e.og,t,kC);return s>=0?s:-1}function jC(t,i){const e=function(t,i,e){const s=t.length,n=i.length;let r=0,h=0;const o=[],a=[];for(;r<s&&h<n;){const s=t[r],n=i[h];s===n?(r++,h++):e(n,s)<=0?(o.push(n),h++):(a.push(s),r++)}for(;r<s;)a.push(t[r]),r++;for(;h<n;)o.push(i[h]),h++;return{E0:o,b0:a}}(t,i,kC);return function(t,i){const e=i.length;for(let s=0;s<e;s++)t[s]=i[s];t.length=e}(t,i),e}var qi=class{get og(){return this.L0}get U(){return this.L0.length}get va(){if(this.Xa){const t=this.L0;this.Xa.length=t.length;for(let i=0;i<t.length;i++)this.Xa[i]=t[i].va}else this.Xa=this.fa();return this.Xa}fa(){return function(t){const i=[];for(let e=0;e<t.U;e++)i[e]=t.Pb(e).va;return i.item=i=>{const e=0|i,s=t.Pb(e);return s&&s.va||void 0},w.defineProperty(i,"constructor",{value:lA}),i}(this)}NT(t){const i=this.L0;for(let e=i.length-1;e>=0;e-=1){const s=i[e];if(t.eN(s))return!0}return!1}Pb(t){return this.L0[t]}constructor(t){this.Xa=void 0,this.L0=t}},zC=class extends Oe{fa(){return new PC(this.Lt.va,this.Jf)}constructor(t,i){super(na.H_),this.Lt=t,this.Jf=i}},PC=class extends Zs{constructor(t,i){super("readystatechange"),this.track=t,this.readyState=i}},BC=class extends Oe{fa(){return new RC(this.Lt.va)}constructor(t){super(na.X_),this.Lt=t}},RC=class extends Zs{constructor(t){super("typechange"),this.track=t}},Oh=class extends Oe{fa(){return new UC(this.BT.va)}constructor(t){super(na.O_),this.BT=t}},UC=class extends Zs{constructor(t){super("addcue"),this.cue=t}},QC=class extends Oe{fa(){return new FC(this.BT.va)}constructor(t){super(na.z_),this.BT=t}},FC=class extends Zs{constructor(t){super("removecue"),this.cue=t}},Pr=class extends Bo{get q(){return this.k0}get L(){return this.C0}x0(t){return Po(this.C0.og,(i=>i.o===t))}get DI(){return this.O0}set DI(t){this.O0=t}get Bg(){return this.j0}get va(){return this.Xa||(this.Xa=this.fa()),this.Xa}fa(){return cf(this)}get o(){return this.IT}get Mg(){return this.ET}get Og(){return this.z0}set Og(t){this.z0=t}get zt(){return this.P0}get kh(){return this.bT}set kh(t){t!==this.bT&&(this.bT=t,this.Co(new gh(this)))}get gs(){return this.QL}get Tg(){return this.B0}get jg(){return this.ZB}set jg(t){this.Xo(t)}Xo(t){const i=$r(t);i!==this.jg&&(this.ZB=i,i===L.Ch&&(this.R0.forEach((t=>{t.ro=!1})),No(this.R0),this.U0=0),this.Co(new Ji(this)))}get Jf(){return this.g0}set Jf(t){this.g0!==t&&(this.g0=t,this.Co(new zC(this,this.g0)))}get Ug(){return this.Q0}set Ug(t){this.Q0=t}get Rg(){return this.F0}set Rg(t){this.F0!==t&&(this.F0=t,this.Co(new BC(this)))}MI(t){if(!t||t.Lt)return;const i=Fh(this.Y0,t,CC);if(i>=0)return;t.Lt=this;const e=-(i+1);this.Y0.splice(e,0,t);const s=xC(this.L.og,t,kC);this.G0(t,s),this.Co(new Oh(t))}G0(t,i){this.L0.splice(i,0,t),this.V0(i),t.rN=i,i<this.U0&&(this.U0=i)}ES(t){if(!t||t.Lt!==this)return;const i=this.I0(t);if(i<0)return;t.ro=!1;const e=this.R0,s=Fh(e,t,kC);s>=0&&si(e,s);const n=Fh(this.Y0,t,CC);n>=0&&si(this.Y0,n),this.W0(t,i),this.Co(new QC(t))}W0(t,i){si(this.L0,i),this.V0(i),t.rN=-1,this.U0>i&&--this.U0}KT(t){if(!t||t.Lt!==this)return;const i=this.I0(t);if(i<0)return;this.W0(t,i);const e=xC(this.L.og,t,kC);this.G0(t,e);const s=Yd(this.R0,(i=>i===t));if(s>=0){si(this.R0,s);const i=xC(this.R0,t,kC);this.R0.splice(i,0,t)}}H0(t,i){const e=this.R0,s=this.L0;let n=this.U0,r=!1;i&&(n=0);for(let i=e.length-1;i>=0;i--){LC(e[i],t)||(r=!0,si(e,i))}for(;n<s.length&&s[n].RT<=t;){const i=s[n];if(0===t)break;LC(i,t)&&!ae(e,i)&&(r=!0,e.push(i)),n++}r&&Md(e,kC),this.U0=n}I0(t){return(-1===t.rN||t.rN>=this.q0)&&this.X0(),t.rN}X0(){const t=this.L0;for(let i=this.q0;i<t.length;i++)t[i].rN=i;this.q0=t.length}V0(t){t<this.q0&&(this.q0=_.max(t,0))}Pg(t){this.Bg||(this.jg=t)}gn(){this.Vo();const t=this.L0.slice();for(const i of t)i.gn();No(this.L0),No(this.Y0),No(this.R0)}constructor(t,i,e,s,n,r,h,o,a){super(),this.ET=Xw(),this.O0=!1,this.ZB=L.Ch,this.g0=Rt.NONE,this.Q0=void 0,this.L0=[],this.Y0=[],this.R0=[],this.q0=0,this.U0=0,this.IT=i||"",this.z0=o||"",this.P0=t,this.QL=s||"",this.O0=Boolean(n),this.j0=Boolean(h),this.F0=r||Wt.DEFAULT,this.bT=e||"",this.B0=a||[],this.C0=new qi(this.L0),this.k0=new qi(this.R0)}},YC=class extends Su{fa(){return new GC(this.BT.va)}constructor(t,i){super(sa.zT,t),this.nD=i}},GC=class extends lu{constructor(t){super("enter",t)}},VC=class extends Su{fa(){return new WC(this.BT.va)}constructor(t,i){super(sa.PT,t),this.nD=i}},WC=class extends lu{constructor(t){super("exit",t)}},HC=class extends Oe{fa(){return new qC(this.BT.va)}constructor(t){super(na.U_),this.BT=t}},qC=class extends Zs{constructor(t){super("entercue"),this.cue=t}},XC=class extends Oe{fa(){return new ZC(this.BT.va)}constructor(t){super(na.F_),this.BT=t}},ZC=class extends Zs{constructor(t){super("exitcue"),this.cue=t}},Bh=class extends Ut{get Mg(){return this.ET}get RT(){return this.Z0.startTime}set RT(t){this.Z0.startTime=t}get UT(){return this.Z0.endTime}set UT(t){this.Z0.endTime=t}get O(){return this.$T}set O(t){this.$T=t}get tN(){return!!this.Z0.pauseOnExit}set tN(t){this.Z0.pauseOnExit=!!t}get Lt(){return this.ZT}set Lt(t){this.ZT=t}get o(){return this.Z0.id||""}get va(){return this.Xa||(this.Xa=this.fa()),this.Xa}fa(){return dA(this)}get ro(){return this.ho}set ro(t){this.ro!==t&&(this.ho=t,t?(this.Co(new YC(this,this.RT)),this.ZT&&this.ZT.Co(new HC(this))):(this.Co(new VC(this,this.UT)),this.ZT&&this.ZT.Co(new XC(this))))}eN(t){return this===t||Kl(this,t)&&AA(this,t)&&this.sN(t)}sN(t){return Dh(this.O,t.O)}gn(){this.Vo(),this.Z0.removeEventListener("enter",this.K0),this.Z0.removeEventListener("exit",this.J0)}constructor(t){super(),this.$T=void 0,this.ZT=void 0,this.Xa=void 0,this.ho=!1,this.K0=()=>{this.ro=!0},this.J0=()=>{this.ro=!1},this.ET=tA(),this.Z0=t,this.HT=t.startTime,this.qT=t.endTime,this.Z0.addEventListener("enter",this.K0),this.Z0.addEventListener("exit",this.J0)}},KC=class extends Oe{fa(){return new JC(this.Lt.va)}constructor(t){super(na.G_),this.Lt=t}},JC=class extends Zs{constructor(t){super("cuechange"),this.track=t}};function $C(t){if(!t)return;let i=t.THEOplayerVTTRegion;return i||(i=new tx(t),t.THEOplayerVTTRegion=i),i}var tx=class{get $0(){return this.t1}get o(){return this.t1.id||""}get ji(){return+this.t1.width||0}set ji(t){this.t1.width=t||0}get hN(){return+this.t1.lines||0}set hN(t){this.t1.lines=t||0}get oN(){return+this.t1.regionAnchorX||0}set oN(t){this.t1.regionAnchorX=t||0}get aN(){return+this.t1.regionAnchorY||0}set aN(t){this.t1.regionAnchorY=t||0}get cN(){return+this.t1.viewportAnchorX||0}set cN(t){this.t1.viewportAnchorX=t||0}get dN(){return+this.t1.viewportAnchorY||0}set dN(t){this.t1.viewportAnchorY=t||0}get uN(){return this.t1.scroll||""}get va(){return this.Xa||(this.Xa=NA(this)),this.Xa}constructor(t){this.Xa=void 0,this.t1=t}};var ix=class extends Bh{get O(){return this.Z0.text}set O(t){this.Z0.text=t}get Pt(){return this.Z0.vertical||""}set Pt(t){this.Z0.vertical=t||""}get WT(){return this.Z0.snapToLines}set WT(t){this.Z0.snapToLines=t}get FT(){return this.Z0.line}set FT(t){this.Z0.line=t}get sp(){return+this.Z0.size}set sp(t){this.Z0.size=Pe(t,0,100)}get va(){return this.Xa||(this.Xa=this.fa()),this.Xa}fa(){return fA(this)}sN(t){return vA(this,t)}constructor(t){super(t)}},ex=class extends ix{get VT(){return $C(this.Z0.region)}get YT(){return this.Z0.lineAlign||"start"}set YT(t){this.Z0.lineAlign=t||"start"}get po(){return this.Z0.position}set po(t){this.Z0.position=t}get GT(){return this.Z0.positionAlign||"auto"}set GT(t){this.Z0.positionAlign=t||"auto"}get QT(){return this.Z0.align||"center"}set QT(t){this.Z0.align=t||"center"}constructor(t){super(t)}},sx=class extends ix{get VT(){return $C(this.$0)}get $0(){return function(t,i){if(void 0===i)return;let e=t&&t.regions;return e&&e.getRegionById(i)||void 0}(this.Z0.track,this.Z0.regionId)}get YT(){return function(t){return"middle"===t?"center":t}(this.Z0.lineAlign||"start")}set YT(t){this.Z0.lineAlign=function(t){return"center"===t?"middle":t}(t||"start")}get po(){return this.Z0.position}set po(t){this.Z0.position=function(t,i){return cA(t,i)}(t,this.QT)}get GT(){return function(t){return aA[t]}(this.Z0.positionAlign||"middle")}set GT(t){this.Z0.positionAlign=function(t,i){return oA[uA(t,i)]}(t||"center",this.QT)}get QT(){return function(t){return"middle"===t?"center":t}(this.Z0.align||"middle")}set QT(t){this.Z0.align=function(t){return"center"===t?"middle":t}(t||"center")}constructor(t){super(t)}};function nx(t,i){return t.O===i.O}function rx(t,i){if(0===i.length)return;const e=i.length-1;if(i[e].RT<t.RT)return void hx(i,e,t.RT);const s=i[0];if(s.RT>t.RT)return void(t.UT=s.RT);const n=Fh(i,t,kC);if(n>=0)return;const r=-(n+1),h=r-1;if(h>=0){i[h].RT<t.RT&&hx(i,h,t.RT)}if(r<i.length){const e=i[r];t.UT=e.RT}}function hx(t,i,e){const s=t[i].RT;for(let n=i;n>=0&&t[n].RT===s;n--)t[n].UT=e}function ox(t){return dA(t)}var ax,ux,cx=class extends Bh{get O(){return this.i1}get va(){return this.Xa||(this.Xa=this.fa()),this.Xa}fa(){return ox(this)}sN(t){return nx(this,t)}constructor(t,i){super(t),this.i1=i}};function Si(t){switch(t){case 0:case 1:case 2:case 3:return!0}return!1}function Hi(t){switch(t){case 0:return Vu;case 1:return pg;case 2:return gu;case 3:return Ya}}function dx(t,i){const e=i.Ku,s=t.byteLength,n=$t(t);return i.Nm(s-e),Yo(n,e,s).buffer}function lx(t,i){return{id:t||"",data:i instanceof ArrayBuffer?i:void 0}}function fx(t,i,e){const s=ha(t,i);if(!Si(s))return;const n=Hi(s);return{id:e,language:ia(t,i,3),description:n(t,i),text:n(t,i)}}function _x(t,i,e){const s=ha(t,i);if(!Si(s))return;const n=Hi(s);return{id:e,mimeType:Vu(t,i),fileName:n(t,i),description:n(t,i),data:dx(t,i)}}function gx(t,i,e){const s=ha(t,i);if(!Si(s))return;const n=Hi(s),r=[];for(;i.Ku<t.byteLength;)r.push({involvement:n(t,i),involvee:n(t,i)});return{id:e,entries:r}}function wx(t,i,e){const s=ha(t,i);if(!Si(s))return;const n=Hi(s),r=ia(t,i,3),h=ha(t,i),o=ha(t,i),a=n(t,i);let u=!1;const c=[];for(;i.Ku<t.byteLength;){let e;if(1===s){let s=mg(t,i);void 0===s?s=u:u=s,e=gu(t,i,s)}else e=n(t,i);if(!e||i.Ku+4>t.byteLength)break;c.push({text:e,timestamp:cs(t,i)})}return{id:e,language:r,format:h,contentType:o,description:a,entries:c}}function Ax(t,i,e){return{id:e,ownerIdentifier:Vu(t,i),identifier:dx(t,i)}}function vx(t,i,e){const s=ha(t,i);if(!Si(s))return;const n=Hi(s);return{id:e,language:ia(t,i,3),description:n(t,i),text:n(t,i)}}function mx(t,i,e){const s=ha(t,i);if(!Si(s))return;return{id:e,text:Hi(s)(t,i)}}function px(t,i,e){return{id:e,url:Vu(t,i)}}function yx(t,i,e){const s=ha(t,i);if(!Si(s))return;const n=Hi(s);return{id:e,description:n(t,i),text:n(t,i)}}function Mx(t,i,e){const s=ha(t,i);if(!Si(s))return;return{id:e,description:Hi(s)(t,i),url:Vu(t,i)}}function Tx(t,i,e){switch(e){case"COM":return fx(t,i,e);case"GEO":return _x(t,i,e);case"IPL":return gx(t,i,e);case"PIC":return function(t,i,e){const s=ha(t,i);if(!Si(s))return;const n=Hi(s),r=ia(t,i,3),h=ha(t,i),o=n(t,i);let a,u;return"--\x3e"===r?(a=r,u=Vu(t,i)):(a="image/"+r.toLowerCase(),u=dx(t,i)),{id:e,mimeType:a,pictureType:h,description:o,data:u}}(t,i,e);case"SLT":return wx(t,i,e);case"TXX":return yx(t,i,e);case"UFI":return Ax(t,i,e);case"ULT":return vx(t,i,e);case"WXX":return Mx(t,i,e);default:if("T"===e.charAt(0))return mx(t,i,e);if("W"===e.charAt(0))return px(t,i,e)}}function Nx(t,i,e){switch(e){case"APIC":return function(t,i,e){const s=ha(t,i);if(!Si(s))return;const n=Hi(s),r=Vu(t,i),h=ha(t,i),o=n(t,i);let a;return a="--\x3e"===r?Vu(t,i):dx(t,i),{id:e,mimeType:r,pictureType:h,description:o,data:a}}(t,i,e);case"COMM":return fx(t,i,e);case"COMR":return function(t,i,e){const s=ha(t,i);if(!Si(s))return;const n=Hi(s),r=Vu(t,i),h=ia(t,i,8),o=Vu(t,i),a=ha(t,i),u=n(t,i),c=n(t,i);let d,l;return i.Ku<t.byteLength&&(d=Vu(t,i)||"image/",l=dx(t,i)),{id:e,price:r,validUntil:h,contactURL:o,receivedAs:a,nameOfSeller:u,description:c,pictureMimeType:d,sellerLogo:l}}(t,i,e);case"GEOB":return _x(t,i,e);case"IPLS":return gx(t,i,e);case"PRIV":return function(t,i,e){return{id:e,ownerIdentifier:Vu(t,i),data:dx(t,i)}}(t,i,e);case"POSS":return function(t,i,e){return{id:e,format:ha(t,i),position:cs(t,i)}}(t,i,e);case"SYLT":return wx(t,i,e);case"TXXX":return yx(t,i,e);case"UFID":return Ax(t,i,e);case"USER":return function(t,i,e){const s=ha(t,i);if(!Si(s))return;const n=Hi(s);return{id:e,language:ia(t,i,3),text:n(t,i)}}(t,i,e);case"USLT":return vx(t,i,e);case"WXXX":return Mx(t,i,e);case"YMID":case"YTYP":case"YSEQ":case"YDUR":case"YCSP":return mx(t,i,e);default:{const s=e.charAt(0);if("T"===s)return mx(t,i,e);if("W"===s)return px(t,i,e)}}}!function(t){t[t.ISO_8859_1=0]="ISO_8859_1",t[t.UTF16_BOM=1]="UTF16_BOM",t[t.UTF16=2]="UTF16",t[t.UTF8=3]="UTF8"}(ax||(ax={})),function(t){t[t.V22=2]="V22",t[t.V23=3]="V23",t[t.V24=4]="V24"}(ux||(ux={}));var Dx=10;function Sx(t,i){return(127&ha(t,i))<<21|(127&ha(t,i))<<14|(127&ha(t,i))<<7|127&ha(t,i)}function Ix(t,i){switch(t){case 4:return{e1:Xu(i,0),s1:Xu(i,1),n1:Xu(i,2),o1:Xu(i,3)};case 3:return{e1:Xu(i,0),s1:Xu(i,1),n1:Xu(i,2)};case 2:return{e1:Xu(i,0),a1:Xu(i,1)}}}function Ex(t,i,e){switch(e.ap){case 3:e.cp.s1&&function(t,i){const e=i.Ku,s=cs(t,i)+4,n=32768&lg(t,i);i.Dm(e+s),n&&cs(t,i)}(t,i);break;case 4:e.cp.s1&&function(t,i){const e=i.Ku,s=Sx(t,i);i.Dm(e+s)}(t,i)}}function bx(t,i){if(t.byteLength-i.Ku<Dx)return null;if(73!==ha(t,i)||68!==ha(t,i)||51!==ha(t,i))return null;const e=ha(t,i),s=ha(t,i);if(!function(t){switch(t){case 2:case 3:case 4:return!0}return!1}(e))return null;const n=ha(t,i),r=Sx(t,i);return{ap:e,u1:s,cp:Ix(e,n),c1:r}}function Lx(t,i,e){switch(e){case 2:return function(t,i){if(i.Ku+6>t.byteLength)return;return{o:ia(t,i,3),sp:As(t,i,3)}}(t,i);case 3:return function(t,i){if(i.Ku+10>t.byteLength)return;const e=ia(t,i,4),s=cs(t,i);ha(t,i);const n=ha(t,i);return{o:e,sp:s,cp:{a1:Xu(n,0),d1:Xu(n,1),groupingIdentity:Xu(n,2)}}}(t,i);case 4:return function(t,i){if(i.Ku+10>t.byteLength)return;const e=ia(t,i,4),s=Sx(t,i);ha(t,i);const n=ha(t,i);return{o:e,sp:s,cp:{groupingIdentity:Xu(n,1),a1:Xu(n,4),d1:Xu(n,5),e1:Xu(n,6),l1:Xu(n,7)}}}(t,i)}}function kx(t){const i=$t(t),e=new j(i.byteLength);let s=0;for(let t=0;t<i.byteLength;t++){const n=i[t];255===n&&t++,e[s]=n,s++}return hl(Yo(e,0,s))}function Cx(t,i){const e=i||new Ha,s=bx(t,e);if(!s)return null;const n=function(t,i,e){const s=[],n=i.Ku;let r=Yh(t,n,n+e.c1);const h=new Ha;switch(i.Nm(e.c1),e.ap){case 2:case 3:e.cp.e1&&(r=kx(r))}Ex(t,i,e);for(;h.Ku<r.byteLength;){const t=xx(r,h,e);if(void 0===t)break;s.push(t)}return s}(t,e,s);return{ep:s,f1:n}}function xx(t,i,e){const s=Lx(t,i,e.ap);if(void 0===s)return;if(0===s.o.charCodeAt(0)||0===s.sp)return;const n=i.Ku;let r,h,o=Yh(t,n,n+s.sp);switch(i.Nm(s.sp),e.ap){case 2:{const t=s;h=o,r=Tx(h,new Ha,t.o);break}case 3:{const t=s,i=new Ha;!function(t,i,e){const s=e.cp;let n,r,h;s.a1&&(n=cs(t,i)),s.d1&&(r=ha(t,i)),s.groupingIdentity&&(h=ha(t,i))}(o,i,t);h=Yh(o,i.Ku,o.byteLength),r=Nx(h,new Ha,t.o);break}case 4:{const t=s,i=new Ha;t.cp.e1&&(o=kx(o)),function(t,i,e){const s=e.cp;let n,r,h,o;s.groupingIdentity&&(n=ha(t,i)),s.a1&&(r=cs(t,i)),s.d1&&(h=ha(t,i)),s.l1&&(o=Sx(t,i))}(o,i,t);h=Yh(o,i.Ku,o.byteLength),r=Nx(h,new Ha,t.o);break}}if(!r){const t=_t($t(h));r=lx(s.o,t.buffer)}return r}function Ox(t){return function(t,i,e){return mx(t,i,e)}(new DataView(t.data),new Ha,t.key)}function jx(t){switch(t.key){case"APIC":case"PIC":return function(t){return{id:t.key,mimeType:t.type,pictureType:16,description:t.info,data:t.data}}(t);case"GEOB":case"GEO":return function(t){return{id:t.key,mimeType:t.type,fileName:t.name,description:t.info,data:t.data}}(t);case"PRIV":return function(t){return{id:t.key,ownerIdentifier:t.info,data:t.data}}(t);case"TXXX":case"TXX":return function(t){return{id:t.key,description:t.info,text:t.data}}(t);case"WXXX":case"WXX":return function(t){return{id:t.key,description:t.info,url:t.data}}(t);case"YMID":case"YTYP":case"YSEQ":case"YDUR":case"YCSP":return Ox(t);default:let i=t.key.charAt(0);if("T"===i)return function(t){return{id:t.key,text:t.data}}(t);if("W"===i)return function(t){return{id:t.key,url:t.data}}(t)}return function(t){return lx(t.key,t.data)}(t)}var jr=class t extends Bo{get q(){return this.k0}get DI(){return this._1?this._1.default:void 0}get L(){return this.C0}get va(){return this.Xa||(this.Xa=this.fa()),this.Xa}fa(){return cf(this)}get o(){return this.ST.id||this._1&&this._1.id||""}get Mg(){return this.ET}get Og(){return this.ST.inBandMetadataTrackDispatchType||""}get zt(){return this.ST.kind||hh.pm}get kh(){return this.bT}set kh(t){t!==this.bT&&(this.bT=t,void 0!==this._1&&(this._1.label=t),this.Co(new gh(this)))}get gs(){return this.ST.language||""}get jg(){return this.ZB}set jg(t){let i=this.jg;this.ZB=$r(t),this.g1();let e=this.jg;i!==e&&this.Co(new Ji(this)),e!==L.Ch&&this.w1(Rt.LOADING)}get A1(){return $r(this.ST.mode)}set A1(t){this.ST.mode=t}get LT(){return this.ST}get Jf(){return this.g0}get v1(){return this._1?+this._1.readyState||Rt.NONE:Rt.LOADED}get Ug(){return this.Q0}get Rg(){return this.F0}set Rg(t){this.F0!==t&&(this.F0=t,this.Co(new BC(this)))}get m1(){return this.M1}set m1(t){this.M1=t,t&&(this.T1=!0,u((()=>{this.T1=!1}),50)),this.g1()}g1(){let t=this.jg;this.m1||t!==L.Jn?this.A1=t:this.A1=L.zg}N1(){let t=this.jg,i=this.A1;t!==i&&(this.m1||t!==L.Jn||i!==L.zg)&&("metadata"===this.zt&&i===L.Ch?this.jg=t:this.T1&&i===L.Ch&&t===L.Jn?this.A1=t:this.jg=i)}A0(t){this.g0!==t&&(this.g0=t,this.Co(new zC(this,t)))}w1(t){let i=_.max(this.g0,this.v1,t);this.A0(i)}static D1(t){return t&&t.THEOplayerTextTrackCue||void 0}S1(i){let e=t.D1(i);if(e)return e;if(e=this.I1(i),tn(e))for(let t of e)t.Lt=this;else e.Lt=this;return i.THEOplayerTextTrackCue=e,e}I1(t){return function(t){return!(!t||"org.id3"!==t.type||!t.value)}(t)?(this.Rg=Wt.ID3,function(t){let i;try{i=jx(t.value)}catch(t){i=lx("")}return new cx(t,i)}(t)):function(t){return t&&t.data instanceof ArrayBuffer}(t)?(this.Rg=Wt.ID3,function(t){let i=[];try{let e=Cx(new DataView(t.data));if(e)for(let s of e.f1)i.push(new cx(t,s))}catch(t){}return i}(t)):function(t){return"text"in t}(t)?(this.Rg=Wt.WEBVTT,function(t){return"regionId"in t}(t)?new sx(t):new ex(t)):new Bh(t)}E1(t){let i=[];if(!t)return i;let e=t.length;for(let s=0;s<e;s++){let e=this.S1(t[s]||t.item(s));if(tn(e))for(let t of e)i.push(t);else i.push(e)}return i}b1(){let t=this.E1(this.ST.cues),i=jC(this.L0,t);for(let t of i.b0)t.fn(sa.PT,this.L1),t.fn(sa.zT,this.L1),this.Co(new QC(t));for(let t of i.E0)t.yn(sa.zT,this.L1),t.yn(sa.PT,this.L1),this.Co(new Oh(t))}H0(){let t=this.E1(this.ST.activeCues),i=jC(this.R0,t);for(let t of i.b0)t.ro=!1;for(let t of i.E0)t.ro=!0;(i.E0.length||i.b0.length)&&this.Co(new KC(this))}Pg(t){this.jg=t}gn(){this.Vo();const t=this.L0.slice();for(let i of t)i.gn();No(this.L0),No(this.R0),this.ST.removeEventListener("cuechange",this.C1),this.ST.removeEventListener("cuechange",this.L1),this._1&&(this._1.removeEventListener("load",this.O1),this._1.removeEventListener("error",this.j1),hs(this._1))}constructor(t,i,e=!0){super(),this.L0=[],this.R0=[],this.ZB=L.Ch,this.g0=Rt.NONE,this.Q0=void 0,this.F0=Wt.DEFAULT,this.T1=!1,this.C1=()=>{this.g1(),this.ST.removeEventListener("cuechange",this.C1)},this.L1=()=>{this.jg!==L.Ch&&(this.b1(),this.H0(),this.L0.length&&this.w1(Rt.LOADING))},this.O1=()=>{this.w1(Rt.LOADED)},this.j1=()=>{this.w1(Rt.ERROR)},this.ST=t,this.M1=e,this.ST.addEventListener("cuechange",this.C1),this.ST.addEventListener("cuechange",this.L1),this._1=i,this._1&&(this.Q0=Wa(this._1.src),this._1.addEventListener("load",this.O1),this._1.addEventListener("error",this.j1)),this.ET=Xw(),this.bT=t.label||"",this.C0=new qi(this.L0),this.k0=new qi(this.R0),this.jg=this.A1,Ac((()=>{this.L1(),this.w1(Rt.NONE)}))}};function zx(t,i){return Pd(t.nD,i.nD)||function(t,i){return t.Lt===i.Lt?Ta(OC(t),OC(i)):om(t.Lt,i.Lt)}(t.BT,i.BT)||function(t,i){return t===i?pe.Zr:t===sa.zT?pe.Nd:pe.hd}(t.type,i.type)}var Px=class{tr(){No(this.z1);for(const t of this.Dl.slice())this.it(t);this.P1(),this.B1=0,this.An=0,this.R1=!1,this.U1=!1,this.Q1=void 0}tt(t){if(!ae(this.Dl,t)){if(this.Dl.push(t),t.yn(na.O_,this.F1),t.yn(na.z_,this.Y1),t.yn(na.B_,this.G1),t.yn(na.ra,this.V1),t.L.U>0){for(const i of t.L.og)this.W1.push(i);this.H1()}this.q1()}}it(t){if(_s(this.Dl,t)){if(t.fn(na.O_,this.F1),t.fn(na.z_,this.Y1),t.fn(na.B_,this.G1),t.fn(na.ra,this.V1),t.L.U>0){for(const i of t.L.og)_s(this.z1,i),_s(this.W1,i);this.H1()}this.q1()}}q1(){this.R1=this.Dl.some((t=>t.jg!==L.Ch))}X1(){this.Qo.e_||this.Qo.Ff?this.P1():this.H1()}H1(){this.R1&&(this.B1||(this.B1=this.K1.Z1(this.J1)))}P1(){this.B1&&(this.K1.t4(this.B1),this.B1=0)}i4(){if(!this.R1)return;if(this.Qo.e_)return;const t=this.Dl,i=this.An;var e;const s=null!=(e=this.Q1)?e:this.Qo.Mf,n=s-i<-.1;let r=this.U1||n;r&&s>i&&s-i<.1&&(r=!1),this.U1=!1,this.Q1=void 0;const h=[];for(const i of t)if(i.jg!==L.Ch){i.H0(s,r);for(const t of i.q.og)h.push(t)}const o=this.z1.slice();if(r);else for(const e of t)e.jg!==L.Ch&&hm(e,i-al,s,o);for(let t=o.length-1;t>=0;t--)ae(h,o[t])&&si(o,t);const a=[];if(!r)for(let t=o.length-1;t>=0;t--){const e=o[t];e.RT>i&&e.UT<=s&&(a.push(e),si(o,t))}for(const t of this.W1)_s(a,t);No(this.W1);const u=[],c=[];for(const t of a)t.ro||u.push(new YC(t,t.RT)),u.push(new VC(t,_.max(t.RT,t.UT))),t.ro=!1;for(const t of o)t.ro&&(u.push(new VC(t,_.max(t.RT,t.UT))),t.ro=!1);for(const t of h)t.ro||(u.push(new YC(t,t.RT)),t.ro=!0);u.sort(zx);for(const t of u){const i=t.BT;i.Co(t);const e=i.Lt;e&&(t.type===sa.zT?e.Co(new HC(i)):e.Co(new XC(i)),ae(c,e)||c.push(e))}c.sort(om);for(const t of c)t.Co(new KC(t));this.An=s,this.z1=h}gn(){this.tr(),this.Qo.fn(Co.Iw,this.e4),this.Qo.fn(Co.jh,this.e4),this.Qo.fn(Zt.Rw,this.e4),this.Qo.fn(Co.Sh,this.e4),this.Qo.fn(Co.yw,this.s4),this.Qo.fn(Co.pw,this.n4)}constructor(t,i){this.Dl=[],this.B1=0,this.An=0,this.z1=[],this.W1=[],this.R1=!1,this.U1=!1,this.Q1=void 0,this.J1=()=>{this.B1=0,this.i4(),this.X1()},this.e4=()=>{this.i4(),this.X1()},this.s4=()=>{this.U1=!0,this.Q1=this.Qo.Mf,this.P1()},this.n4=()=>{this.i4(),this.X1()},this.V1=()=>{this.q1(),this.i4(),this.X1()},this.F1=t=>{const i=t.BT;ae(this.W1,i)||this.W1.push(i),this.H1()},this.Y1=t=>{const i=t.BT;_s(this.z1,i),_s(this.W1,i),this.H1()},this.G1=t=>{this.H1()},this.K1=i,this.Qo=t,t.yn(Co.Iw,this.e4),t.yn(Co.jh,this.e4),t.yn(Zt.Rw,this.e4),t.yn(Co.Sh,this.e4),t.yn(Co.yw,this.s4),t.yn(Co.pw,this.n4),this.H1()}},Bx=class{Z1(t){return ro(t)}t4(t){we(t)}},Rx=new Bx,Hh=class extends Px{constructor(t,i=Rx){super(t,i)}},Ux=class extends dh{get va(){return this.Xa||(this.Xa=ox(this)),this.Xa}sN(t){return nx(this,t)}constructor(t,i,e){super(t,1/0,i,!1,e)}},Qx=class extends Pr{constructor(t,i,e=Wt.DEFAULT){super(hh.Mm,"",i||"","",!1,e,!1,t)}},Fx=class extends Qx{MI(t){rx(t,this.L0),super.MI(t)}fa(){return cf(this)}constructor(t,i){super(t,i),this.Rg=Wt.ID3}};function Yx(t){const i=t&&t.THEOplayerTextTrackCue||void 0;if(i)return i;const e=t.startTime,s=jx(t.value);return t.THEOplayerTextTrackCue=new Ux(e,s),t.THEOplayerTextTrackCue}var Gx=class extends Fx{get o(){return this.ST.id||""}get Og(){return this.ST.inBandMetadataTrackDispatchType||""}get gs(){return this.ST.language||""}Xo(t){super.Xo(t),this.A1=this.jg}get A1(){return $r(this.ST.mode)}set A1(t){this.ST.mode=t}get LT(){return this.ST}w1(t){this.Jf=_.max(this.Jf,t)}b1(){let t=this.ST.cues;if(!t)return;let i=function(t){const i=t.length,e=[];for(let s=0;s<i;s++)e.push(Yx(t[s]||t.item(s)));return Md(e,kC),e}(t),e=jC(this.L.og.slice(),i);for(let t of e.b0)this.ES(t);for(let t of e.E0)this.MI(t)}gn(){this.ST.removeEventListener("cuechange",this.L1),super.gn()}constructor(t){super(t.inBandMetadataTrackDispatchType,t.label),this.L1=()=>{this.jg!==L.Ch&&(this.b1(),this.w1(Rt.LOADED))},this.ST=t,this.ST.addEventListener("cuechange",this.L1),this.jg=this.A1,Ac((()=>{this.L1()}))}},Vx=class extends F{r4(){this.h4.yn(Rl.L_,this.Sz),this.h4.yn(Rl.C_,this.Iz)}o4(){this.h4.fn(Rl.L_,this.Sz),this.h4.fn(Rl.C_,this.Iz)}a4(t){const i=t.L.og[0];if(!Wx(i))return;const e=function(t){const i=t.match(Hx);if(!i)return;return{Lt:i[1],gs:i[2]}}(i.O.description),s=e.Lt,n=e.gs;if(this.u4(s,n))return;const r=this.AI.wI(hh.pm,t.o,s,n,!1,Wt.TTML);this.tt(r),this.c4.set(t.Mg,r);for(let i of t.L.og)Wx(i)&&this.d4(i);t.yn(na.O_,this.l4)}u4(t,i){return this.Z.og.some((e=>e.kh===t&&e.gs===i))}d4(t){if(!t.Lt)return;const i=this.c4.get(t.Lt.Mg),e=jv(t.O.text,i,{xD:0,OD:1/0,jD:t.RT});for(let t of e)i.MI(t)}async tr(){for(let t of this.h4.og)t.fn(na.O_,this.l4);for(let t of this.Z.og)this.AI.NI(t);this.c4.clear(),await super.tr()}async gn(){this.o4(),await super.gn()}constructor(t,i){super(),this.AI=t,this.h4=i,this.c4=Y(),this.Sz=async t=>{const i=t.Lt;if(i.Rg||await i.df(na.X_),i.Rg===Wt.ID3){for(;0===i.L.U;)await i.df(na.O_);this.a4(i)}},this.Iz=t=>{const i=t.Lt;if(i.Rg!==Wt.ID3||!this.c4.has(i.Mg))return;const e=this.c4.get(i.Mg);this.it(e),this.AI.NI(e),i.fn(na.O_,this.l4)},this.l4=t=>{Wx(t.BT)&&this.d4(t.BT)},this.r4()}};function Wx(t){return function(t){return function(t){return"TXXX"===t.id||"TXX"===t.id}(t)&&Hx.test(t.description)}(t.O)}var Hx=/^Track:(.+),Lang:(.+)$/;var qx=class extends Yi{get error(){return this.errorObject.message}get licenseAcquisitionURL(){return this.errorObject.url}get status(){return this.errorObject.status}get statusText(){return this.errorObject.statusText}get licenseAcquisitionMessage(){return this.errorObject.response}get systemCode(){return this.errorObject.systemCode}constructor(t){super(Co.Vg),this.errorObject=t}},Xx=class extends Yi{constructor(){super(Co.Wg)}},Zx=class extends Yi{constructor(t){super("Cw"),this.f4=t}},Kx=new ls,Jx=class extends Yi{constructor(t){super("Ws"),this.session=t}},$x=class extends Bo{_C(){return this._4=!0,Kx.wx((t=>this.g4(t)),this.Ax.Hd)}async g4(t){try{fo(t),await this.w4.gO(t);const i=await this.w4.wO(this.A4.Tb,this.A4.jb,t);await this.v4._C(this.A4.Tb,this.A4.jb,i)}catch(t){Kc(t);const i=t instanceof bi?t.Hb:void 0,e=new Or(td.CONTENT_PROTECTION_INTERNAL_ERROR,"Error while performing the CDM request",t,void 0,void 0,void 0,void 0,i);throw this.Ss(e),e}}async TO(t,i){let e;try{e=function(t){return yu(t,Ym())}(t)?await this.w4.xO(new j(t),this.Ax.Hd):await this.w4.OO(new j(t),i,this.Ax.Hd)}catch(t){if(Mi(t))return;throw t}if(this.Ax.Hd.Bd)return;const s=this.m4,n=new Rs;this.m4=n;try{await this.v4.Yn(e),await Di(100)}catch(t){const i=t instanceof bi?t.Hb:void 0;throw new Or(td.CONTENT_PROTECTION_INTERNAL_ERROR,"Error while applying license response",t,void 0,void 0,void 0,void 0,i)}finally{void 0!==s&&await s.Vb,n.Qb(),this.m4===n&&(this.m4=void 0)}}Ss(t){const i=t instanceof Or?t:new Or(td.CONTENT_PROTECTION_ERROR,t.message,t);this.Co(new qx(i)),this.Ws()}y4(){this.v4.fn("bb",this.vC),this.v4.fn("Ib",this.M4),this.v4.fn("lt",this.T4),this.N4=!1,this.Ax.Xd(),this.Co(new Jx(this))}async Ws(){let t;this.Vo();do{t=this.m4,void 0!==t&&await t.Vb}while(this.m4!==t);this.y4(),await this.v4.Ws().catch(qo)}constructor(t,e,s){super(),this.v4=t,this.w4=e,this.A4=s,this._4=!1,this.N4=!1,this.Ax=new er,this.vC=t=>{if(!this.Ax.Hd.Bd)switch(t.Lb){case"license-request":case"license-renewal":this.TO(t.bb,t.kb).catch((t=>this.Ss(t)));break;default:this.Ss(new Or(td.CONTENT_PROTECTION_NOT_SUPPORTED,"Unsupported CDM message type: "+t.Lb))}},this.M4=t=>{this.v4.uC.Bb(((t,e)=>{switch(t){case"usable":i.ul((()=>{this.N4=!0,this.Co(new Xx)}),100);break;case"expired":case"status-pending":default:break;case"output-restricted":case"internal-error":this.Co(new Zx(e))}}))},this.T4=t=>{this.Ss(new Or(td.CONTENT_PROTECTION_INTERNAL_ERROR,"Unknown CDM error"))},t.yn("bb",this.vC),t.yn("Ib",this.M4),t.yn("lt",this.T4),t.rC.then((()=>this.y4()),(t=>this.Ss(t)))}},tO=[Co.Wg,Co.Vg,Co.Lw],iO=class extends Bo{get ZA(){return this.KA}_O(){return this.D4._O()}S4(t){return this.I4||(this.I4=this.E4(t)),this.I4}async E4(t){fo(t);const i=await this.D4.xO(new j(Ym()),t);if(fo(t),!this.yC)throw new g("Invalid MediaKeys when setting ServerCertificate");await this.yC.MC(i.buffer)}async b4(t){if(!this.yC)throw new g("Invalid MediaKeys when creating KeySession");try{this.L4.push(t);const i=await this.yC.pC("temporary"),e=new $x(i,this.D4,t);return this.C4.push(e),e.yn(tO,this.Ds),e.yn("Ws",this.x4),e}finally{_s(this.L4,t)}}O4(t){if(t.j4)return!1;for(const i of this.C4)if(eO(i.A4,t))return!0;for(const i of this.L4)if(eO(i,t))return!0;return!1}async gn(){this.yC=void 0,this.Vo();const t=this.C4.slice();No(this.C4),await Promise.all(t.map((t=>t.Ws()))),this.D4.Qd()}constructor(t,i,e){super(),this.C4=[],this.I4=void 0,this.L4=[],this.x4=t=>{t.session.fn(tO,this.Ds),t.session.fn("Ws",this.x4),_s(this.C4,t.session)},this.KA=t,this.yC=i,this.D4=e}};function eO(t,i){return!t.j4&&t.Tb===i.Tb&&yu(t.jb,i.jb)}var sO=class extends Bo{get z4(){var t;return null==(t=this.KA)?void 0:t.ZA}get nP(){return this.D4}set nP(t){this.D4=t}$n(t,i){this.Pz=t,this.cq(i)}cq(t){this.sx=t,this.P4(this.Ax.Hd).catch(Ah)}async P4(t){if(!i.Ys.B4||!await this.R4(t))return this.sx&&this.sx.U4?await this.Q4(t):void 0}async R4(t){var i,e;if(!(null==(i=this.sx)?void 0:i.Yz))return!1;let s=!1;var n;for(const i of null!=(n=null==(e=this.sx)?void 0:e.Yz)?n:[]){var r;for(const e of null!=(r=i.Az)?r:[])try{await this.F4(i.ZA.Tb,e,t),s=!0}catch(t){Kc(t)}if(s)return!0}return!1}async F4(t,e,s){if(fo(s),!e.byteLength)return;if(!this.sx||!this.sx.Yz.length)throw new Or(td.CONTENT_PROTECTION_CONFIGURATION_MISSING,"Missing configuration for encrypted content");if(t!==nr&&t!==zn&&t!==w_)return void 0;const n=Kg(t,e),r=this.sx.Yz;let h;for(const i of r){fo(s);const e=n[i.ZA.Nb];if(e&&i.ZA.Tb===t)try{const t=await this.Y4(i,s);t._O()&&await t.S4();const n=this.sA.xf,r={Tb:i.ZA.Tb,jb:e,j4:n};if(this.G4(t,r)){const i=await t.b4(r);await i._C()}return}catch(t){Kc(t),h=t}}throw await i.RC()?new Or(td.CONTENT_PROTECTION_NOT_SUPPORTED,"Encrypted content over an insecure connection is not supported",h):new Or(td.CONTENT_PROTECTION_NOT_SUPPORTED,"Cannot create content decryption session",h)}async Q4(t){var i;const e=null==(i=this.sx)?void 0:i.Yz;if(e)for(const i of e){fo(t);try{const e=await this.Y4(i,t);return void(e._O()&&await e.S4())}catch(t){Kc(t)}}}G4(t,e){return i.Ys.V4||this.sA.W4.ZH||!t.O4(e)}Y4(t,i){return this.gq.wx((i=>this.H4(t,i)),i)}async H4(t,i){if(fo(i),!this.sx||!this.D4||!this.Pz)throw new g("Not initialized");if(this.KA){if(this.KA.ZA!==t.ZA)throw new g("Internal key system error");return this.KA}const e=this.D4,s=Tt({},t,{fP:t.fP.map((i=>{var s;return Tt({},i,{persistentState:null!=(s=i.persistentState)?s:e.YO(t.ZA),FC:i.FC||e.FC(t.ZA)})}))}),n=await this.Pz.hq(s.ZA,s.fP),r=e.wz(s),h=new iO(s.ZA,n,r);return h.yn([Co.Wg,Co.Vg,Co.Lw],this.Ds),this.KA=h,h}Ss(t){if(Mi(t))return;const i=t instanceof Or?t:new Or(td.CONTENT_PROTECTION_ERROR,t.message,t);this.Co(new qx(i))}async tr(){this.Pz=void 0,this.sx=void 0,this.Ax.Xd(),this.Ax=new er,await this.q4()}async q4(){await this.gq.Xd();const t=this.KA;t&&(t.fn(Co.Lw,this.Ds),this.KA=void 0,await t.gn())}async Qd(){this.Vo(),this.sA.fn(Zh.Kg,this.X4),await this.tr(),await this.gq.gn()}constructor(t){super(),this.Ax=new er,this.gq=new ls,this.sx=void 0,this.D4=void 0,this.Pz=void 0,this.KA=void 0,this.X4=t=>{this.F4(t.Tb,t.jb,this.Ax.Hd).catch((t=>this.Ss(t)))},this.sA=t,this.sA.yn(Zh.Kg,this.X4)}},Gh=class extends Yi{constructor(t){super(Co.aw),this.currentTime=t}},nO=class extends Bo{get Jf(){return void 0!==this.Z4?this.Z4.Jf:oe.sT}A0(){var t;null==(t=this.Z4)||t.A0()}tr(){var t;null==(t=this.Z4)||t.tr()}Qd(){this.Vo(),void 0!==this.Z4&&(this.Z4.Qd(),this.Z4=void 0)}K4(t){if(this.Z4===t)return;const i=this.Jf;void 0!==this.Z4&&this.Z4.Qd(),this.Z4=t,void 0!==t&&(t.yn(Zt.H_,this.Ds),t.A0());const e=this.Jf;i!==e&&this.Co(new Bn(this.J4.Mf,e))}constructor(t){super(),this.J4=t}},rO=fi.bE||fi.kE,hO=fi.mb,oO=fi.QE,aO=fi.QE&&fi.Ga,uO=class extends Bo{t2(){this.jz.ended||this.Mf===this.ct||(this.i2=!1)}get m0(){return this.e2}get wf(){return this.Pz?this.Pz.wf:ce.MB()}get vf(){const t=this.Bz;if(!t||S(t.getTime()))return;const i=1e3*this.Mf;return new Date(t.getTime()+i)}get Bz(){if(this.jz.getStartDate)return this.NB&&this.s2||(this.s2=this.jz.getStartDate()),this.s2}get Mf(){return this.n2?this.n2.Mf:void 0!==this.h2?this.h2:this.bx.currentTime}get Iu(){return this.Wu}get ct(){return this.n2?this.n2.ct:this.Pz?this.Pz.ct:this.bx.duration}get Sf(){return this.e_?this.o2():this.n2?this.n2.Sf:this.bx.ended||this.i2}o2(){return void 0!==this.h2&&this.ct===this.h2}get lt(){return this.xz}get jz(){return this.bx}get Ff(){return this.a2?this.u2:this.n2?this.n2.Ff:this.bx.paused}get Hf(){return this.Uo.rB(ce.xn(this.bx.played))}get Ti(){return this.bx.offsetHeight*i.Ys.c2}get ji(){return this.bx.offsetWidth*i.Ys.c2}get ya(){return this.EB}get Jf(){return this.d2.Jf}get t_(){return this.Pz?this.Pz.t_:ce.MB()}get e_(){return this.n2?this.n2.e_:this.NB}get l0(){return this.n2?this.n2.l0:this.f0}get T0(){return 0!==this.l2}get Pf(){return this.n2?this.n2.Pf:this.bx.muted}set Pf(t){this.n2?this.n2.Pf=t:(this.bx.muted=t,this.f2())}get Gf(){return this.n2?this.n2.Gf:void 0!==this._2?this._2:this.bx.playbackRate}set Gf(t){this.n2?this.n2.Gf=t:this.Ff||this.e2?(this._2=t,this.g2()):(this._2=void 0,this.bx.playbackRate=t,this.g2())}g2(){const t=this.Gf;this.w2!==t&&(this.w2=t,this.Co(new Kn(this.Mf,t)))}get A2(){return this.VP}get c_(){return this.n2?this.n2.c_:this.bx.volume}set c_(t){this.n2?this.n2.c_=t:(this.bx.volume=t,this.f2())}f2(){const t=this.c_,i=this.Pf;this.m2===t&&this.M2===i||(this.m2=t,this.M2=i,this.Co(new Tc(this.Mf,this.c_)))}zf(){return jL(this.bx)}p_(){this.T2||(this.T2=!0);const t=this.N2();return this.D2(),t}D2(){this.a2?this.u2&&(this.u2=!1,this.Co(new Qn(this.Mf))):this.S2()}S2(){if(this.n2)this.n2.p_();else{fi.QE&&!fi.Ga&&this.bx.preload===pt.PP&&(this.bx.preload=pt.Mm);const t=this.Gf,i=this.bx.play();t!==this.jz.playbackRate&&(this.Gf=t),Id(i)?i.then(this.I2,this.E2):this.b2.N0()&&this.L2()}}m_(){this.a2?this.u2||(this.u2=!0,this.Co(new iu(this.Mf))):this.C2()}C2(){this.n2?this.n2.m_():(this.bx.pause(),this.b2.Yn()),this.O2(new is)}N2(){const t=new Rs;return this.j2.push(t),t.Vb}z2(){for(const t of this.j2)t.Qb(void 0);No(this.j2)}O2(t){for(const i of this.j2)i.Yb(t);No(this.j2)}L2(){this.a2||this.n2||this.z2()}P2(t){this.a2||this.n2||this.O2(t)}Dm(t,i,e){void 0===i&&(i=!1),void 0===e&&(e=!1),this.n2?this.n2.Dm(t,i,e):(this.B2.Xd(),this.B2=new er,this.R2=this.U2(t,i,e,this.R2,this.B2.Hd).catch(qo))}kz(t){const i=this.Bz;if(!i||S(i.getTime()))return;const e=(t.getTime()-i.getTime())/1e3;this.Dm(e)}async U2(t,e,s,n,r){try{for(this.h2=t,this.Q2=t,this.F2=i.Jd(),s&&!this.NB?this.f0=!0:(this.NB=!0,this.f0=!1),this.i2&&!this.o2()&&(this.i2=!1),this.f0?this.Co(new Pi(this.Mf)):this.Co(new lo(t)),await n.catch(qo),fo(r),this.Y2&&this.G2(),this.d2.Jf===oe.sT&&await this.d2.df(Zt.H_,r);0===this.bx.seekable.length||aO&&!this.T2;)await Promise.race([jt(this.bx,"timeupdate",r),Di(100,r)]),fo(r);let h=lC(this.wf,t,.05),o=this.t_,a=!0,u=!1;for(;;){if(o=this.t_,o.U>0&&!o.gr(h)&&(h=o.tB(h),a=!0),e&&!this.bx.fastSeek){const t=this.wf;if(!t.gr(h)){const i=lC(t,h,1);i!==h&&(h=i,a=!0)}}if(oO){const t=this.V2();void 0!==t&&h>t&&(h=t,a=!0)}if(!u){const t=this.W2();void 0!==t&&h>t&&(u=!0,await this.H2(t,!1,r),await jt(this.bx,"seeked",r),fo(r),a=!0)}if(a){a=!1,await this.H2(h,e,r),fo(r);let t=this.Mf;o=this.t_,h=o.tB(h);let i=1;for(;_.abs(h-t)>=al;)o=this.t_,h=dO(h,o,i),await this.H2(h,e,r),fo(r),t=this.Mf,i++}if(!(this.bx.seeking||this.d2.Jf<oe.nT))break;await Ph((t=>{var i;return Promise.race([jt(this.bx,"seeked",t),this.df([Co.gw,Co.Xg],t),this.d2.df(Zt.H_,t),null==(i=this.Pz)?void 0:i.df(pr.XR,t)].filter(Dd))}),r),fo(r)}this.q2()}catch(t){if(Mi(t))return;0}}async H2(t,i,e){fo(e);let s=this.t_;if(t=s.tB(t),this.Y2){let i=!0;for(;i||this.d2.Jf<oe.rT;)s=this.t_,s.gr(t)||(t=s.tB(t),i=!0),i?(i=!1,this.h2=t,this.X2(this.Mf)):await Ph((t=>Promise.race([this.df(Co.Xg,t),this.d2.df(Zt.H_,t)])),e);fo(e)}const n=jt(this.bx,"seeking",e);i&&this.bx.fastSeek?this.bx.fastSeek(t):this.bx.currentTime=t,this.h2=void 0,this.X2(this.Mf),this.bx.seeking&&await n}V2(){if(!this.Pz||!this.Pz.Dq)return;const t=this.Pz.Sq,i=this.Pz.Iq,e=t&&i?t.Sn(i):t||i;if(!e||0===e.U)return;const s=e.Cn(e.U-1),n=e.jn(e.U-1);return _.max(s,n-.001)}W2(){if(!this.Pz||!this.Pz.Dq)return;const t=this.Pz.Iq;if(!t||0===t.U)return;const i=t.Cn(t.U-1);let e=t.jn(t.U-1)-.02;return e-=.001,_.max(i,e)}X2(t){this.Q2!==t&&(this.Q2=t,this.f0?this.Co(new Pi(t)):this.Co(new lo(t)))}q2(){const t=this.f0;this.NB=!1,this.f0=!1,this.F2=0,this.Q2=NaN,this.Y2&&this.Z2(),t?(this.Co(new Gh(this.Mf)),this.K2()):this.Co(new _r(this.Mf))}G2(){this.a2||(this.u2=this.Ff,this.a2=!0,this.C2())}Z2(){this.a2&&(this.a2=!1,this.u2||this.D2())}Eq(t){for(const i of t){if(i.Rg===I.Qx&&nk.Eq(i,this.bx))return i;if(i.Rg===I.Fx&&AC.Eq(i))return i}}be(){this.VP=!1,hn(this.bx)&&(this.bx.style.display="none")}ge(){this.VP=!0,hn(this.bx)&&(this.bx.style.display="block")}get nt(){return this.J2}get Ol(){return this.OB}wI(t,i,e,s,n,r,h,o,a){const u=new Pr(t,i,e,s,n,r,h,a,o);return this.Dl.tt(u),this.t3.tt(u),u}Zz(){return!0}Jz(t,i,e,s,n){const r=h.createElement("track");r.src=Wa(t),r.kind=i,r.label=null!=e?e:"",s&&(r.srclang=s),r.default=!!n,r.id=ar(),this.bx.appendChild(r);const o=this.bx.textTracks.getTrackById(r.id),a=new jr(o,r);return this.i3.tt(a),this.e3.push(a),a}NI(t){this.Dl.it(t),this.t3.it(t)}tP(){for(const t of this.Dl.og.slice())t.gn();this.Dl.tr();for(const t of this.e3.slice())this.i3.it(t),t.gn();No(this.e3)}_P(){let t=this.bx.textTracks;t&&t.addEventListener&&(t.addEventListener("addtrack",this.s3),t.addEventListener("removetrack",this.n3),t.addEventListener("change",this.r3))}sP(){let t=this.bx.textTracks;t&&t.removeEventListener&&(t.removeEventListener("addtrack",this.s3),t.removeEventListener("removetrack",this.n3),t.removeEventListener("change",this.r3))}h3(t,i){if(fi.QE){if(t.kind===hh.Mm)return void this.o3(t);if(t.kind===hh.wS&&""===t.label&&""===t.language&&!fO(t))return void this.a3(t,i)}lO(this.i3,t)||this.i3.tt(new jr(t,i))}o3(t){t.mode=L.zg;const i=new Gx(t);this.i3.tt(i),this.t3.tt(i)}a3(t,i){const e=()=>{fO(t)&&(t.removeEventListener("cuechange",e),this.i3.tt(new jr(t,i)))};t.addEventListener("cuechange",e),t.mode=L.zg}u3(t){let i=this.bx.getElementsByTagName("track");for(let e=0;e<i.length;e++){let s=i[e]||i.item(e);if(s.track===t)return s}}$n(t){return this.d3.wx((async i=>{if(fo(i),this.Pz)throw new g("Already loaded a media source");let e;if(t.Rg===I.Qx)e=new nk(t,this,this.dq,this.BC),this.Y2=!1,this.d2.K4(this.l3());else{if(t.Rg!==I.Fx)throw new g("Unsupported configuration");{this.Y2=rO;const i=this.l3();e=new AC(t,this,i,this.dq,this.BC,void 0,this.P$),this.d2.K4(i),hO&&(this.yn(Co.Iw,this.f3),this.d2.yn(Zt.H_,this._3))}}return this.Pz=e,await e.MW(),e}))}l3(){return this.Y2?new DC(this):new Sh(this)}g3(){if(this.e2)return;const t=this.Gf;this.e2=!0,this.Gf=t,this.bx.playbackRate=0,this.d2&&this.d2.A0()}w3(){if(!this.e2)return;const t=this.Gf;this.e2=!1,this.Gf=t,this.A3()}A3(){this.bx.currentTime=this.bx.currentTime,this.d2&&this.d2.A0()}async tr(){this.NB=!1,this.f0=!1,i.$d(this.l2),this.l2=0,this.Uo=ce.MB(),this.B2.Xd(),this.h2=void 0,this.Q2=NaN,this.s2=void 0,this.Y2=!1,this.a2=!1,this.xz=void 0,this.i2=!1,this.v3=void 0,this.m3=!1,this.T2=!1,this.y3&&(this.M3(),this.y3=!1),this.O2(new is),this.d2.K4(new Sh(this)),this.b2.tr(),this.i3.tr(),this.w3(),hO&&(we(this.T3),this.T3=0,this.fn(Co.Iw,this.f3)),await this.d3.Xd(),await this.d3.wx((async()=>{this.Pz&&(await this.Pz.Qd(),this.Pz=void 0,fi.pE&&fi.ME<3&&this.N3())}))}N3(){this.D3();const t=this.bx,i=t.parentElement,e=t.tagName.toLowerCase();Fj(t),this.bx=Qj(e),null==i||i.replaceChild(this.bx,t),this.M3(),this.d2.K4(this.l3()),this.b2.fn(Zt.Rw,this.S3),this.b2.Qd(),this.b2=new EC(this),this.b2.yn(Zt.Rw,this.S3),this.VP?this.ge():this.be(),this.Co(new Mu),this.Co(new Ci)}async Qd(){this.y3=!1,this.D3(),this.sP(),await this.tr(),await this.d3.gn(),this.b2.Qd(),this.d2.Qd(),await this.dq.Qd(),this.tP(),this.Dl.gn(),this.i3.gn(),await this.I3.gn(),this.E3.gn(),this.J2.gn(),this.Vo()}M3(){this.jz.addEventListener("play",this.b3),this.jz.addEventListener("pause",this.L3),this.jz.addEventListener("timeupdate",this.C3),this.jz.addEventListener("progress",this.x3),this.jz.addEventListener("loadstart",this.O3),this.jz.addEventListener("ended",this.j3),this.jz.addEventListener("ratechange",this.z3),this.jz.addEventListener("volumechange",this.P3),this.jz.addEventListener("durationchange",this.B3),this.jz.addEventListener("resize",this.R3),this.jz.addEventListener("loadedmetadata",this.R3),this.jz.addEventListener("error",this.U3),this.jz.addEventListener("emptied",this.Q3),sM()?(this.bx.addEventListener("encrypted",this.F3),this.bx.addEventListener("waitingforkey",this.Y3)):void 0!==Qr.WebKitMediaKeys&&"function"==typeof Qr.WebKitMediaKeys.isTypeSupported?this.bx.addEventListener("webkitneedkey",this.G3):yr()?this.bx.addEventListener("webkitneedkey",this.V3):void 0!==Qr.MSMediaKeys&&"function"==typeof Qr.MSMediaKeys.isTypeSupported&&this.bx.addEventListener("msneedkey",this.W3)}D3(){this.jz.removeEventListener("play",this.b3),this.jz.removeEventListener("pause",this.L3),this.jz.removeEventListener("timeupdate",this.C3),this.jz.removeEventListener("progress",this.x3),this.jz.removeEventListener("loadstart",this.O3),this.jz.removeEventListener("ended",this.j3),this.jz.removeEventListener("ratechange",this.z3),this.jz.removeEventListener("volumechange",this.P3),this.jz.removeEventListener("durationchange",this.B3),this.jz.removeEventListener("resize",this.R3),this.jz.removeEventListener("loadedmetadata",this.R3),this.jz.removeEventListener("error",this.U3),this.jz.removeEventListener("encrypted",this.F3),this.jz.removeEventListener("waitingforkey",this.Y3),this.jz.removeEventListener("webkitneedkey",this.G3),this.jz.removeEventListener("webkitneedkey",this.V3),this.jz.removeEventListener("msneedkey",this.W3),this.jz.removeEventListener("emptied",this.Q3)}H3(){this.n2||(this.Uo=this.Hf,this.n2=yC(this),this.D3(),this.n2.yn(mC,this.Ds))}q3(){if(!this.n2)return;const t=this.n2;this.n2=void 0,this.d2.A0(),MC(this,t),t.Qd(),this.M3()}K2(){const t=this.Mf;this.Co(new Dr(t,void 0)),this.v3=t}yP(t){this.xz=t,this.O2(this.xz),this.Co(new bC(this.xz))}get xf(){return!!this.bx.webkitCurrentPlaybackTargetIsWireless}get X3(){return this.Z3}get W4(){return Tt({},$L)}K3(){this.X3||(Gj(this.bx,i.Ys),this.Z3=!0)}J3(t){t.appendChild(this.bx)}FJ(){hO&&this.f3(),this.d2.A0()}get nP(){return this.dq.nP}set nP(t){this.dq.nP=t}get t5(){return this.P$}set t5(t){this.P$=t}get z4(){return this.dq.z4}D_(){this.dq.q4().catch(qo),this.i3.tr()}get g_(){return this.m3}set g_(t){this.m3=t,this.y3&&!this.m3&&(this.y3=!1,this.M3())}constructor(t,e,s,n){super(),this.xz=void 0,this.VP=!0,this.Pz=void 0,this.d3=new ls,this.n2=void 0,this.EB=new ma,this.e3=[],this.h2=void 0,this.F2=0,this.Q2=NaN,this.s2=void 0,this.v3=void 0,this.NB=!1,this.f0=!1,this.i5=oe.sT,this.l2=0,this.R2=Promise.resolve(),this.B2=new er,this.j2=[],this.Uo=ce.MB(),this._2=void 0,this.w2=1,this.M2=!1,this.m2=1,this.i2=!1,this.m3=!1,this.y3=!1,this.Y2=!1,this.a2=!1,this.u2=!1,this.e2=!1,this.Z3=!1,this.T3=0,this.T2=!1,this.s3=t=>{const i=t.track,e=this.u3(i);this.h3(i,e)},this.n3=t=>{const i=lO(this.i3,t.track);i&&this.i3.it(i)},this.r3=()=>{for(let t=0;t<this.i3.U;t++){let i=this.i3.cg(t);i instanceof jr&&i.N1()}},this.f3=()=>{if(void 0===this.Pz||!tk(this.Pz))return;const t=this.Pz,i=t.B$,e=t.R$;if(!i||!e)return;if(t.Dq)return void this.w3();if(t.Jf===Er.xJ)return;const s=i.wf,n=e.wf;if(0===s.U&&0===n.U)return void this.w3();const r=this.Mf;if(r<s.Cn(0)||r<n.Cn(0))return void this.w3();if(s.gr(r)!==n.gr(r)){if(t.lq(r))return;this.g3()}else if(this.w3(),!this.T3&&this.b2.N0()){s.hB(n).dB(r,r+.5)&&(this.T3=ro(this.e5))}},this.e5=()=>{this.T3=0,this.f3()},this._3=()=>{if(this.e_||this.l0)return;if(this.d2.Jf>=oe.rT)return;if(void 0===this.Pz||!tk(this.Pz))return;const t=this.Pz,i=t.B$,e=t.R$;if(!i||!e)return;const s=this.Mf,n=i.wf,r=e.wf;if(!n.gr(s)||!r.gr(s))return;n.hB(r).dB(s-5,s)&&(this.e2?this.w3():this.A3())},this.b3=()=>{this.Co(new Qn(this.Mf))},this.L3=()=>{this.P2(new is),this.Co(new iu(this.Mf))},this.S3=()=>{this.L2(),this.Co(new _e(this.Mf))},this.z3=()=>{this.g2()},this.B3=()=>{this.Co(new os(this.ct))},this.x3=()=>{this.Co(new oa(this.Mf))},this.O3=()=>{this.Co(new rk)},this.C3=()=>{const t=this.Mf,i=this.e_,e=this.d2.Jf<oe.rT&&!this.Sf,s=void 0!==this.v3,n=s&&this.v3!==t;(i||!s||n&&!e)&&this.K2()},this.j3=()=>{!this.i2&&this.Sf&&(this.i2=!0,this.Co(new ve(this.Mf)))},this.U3=()=>{if(null!==this.bx.error){const i=this.bx.error;var t;this.yP(new wc(null!=(t=i.code)?t:oi.DECODE,i.message||"Error decoding media",void 0,i.msExtendedCode))}},this.Q3=()=>{this.m3&&(this.D3(),this.y3=!0)},this.s5=t=>{if(i.$d(this.l2),this.l2=0,t.readyState<=oe.nT)if(this.NB||this.f0){const e=i.Jd()-this.F2;if(e<250)return void(this.l2=i.ul((()=>this.s5(t)),250-e))}else if(void 0!==this.Pz&&this.Pz.lq(this.Mf))return void(this.l2=i.ul((()=>this.s5(t)),250));this.i5!==t.readyState&&(this.i5=t.readyState,this.Co(t))},this.P3=()=>{this.f2()},this.R3=()=>{this.a_>0&&this.r_>0&&this.Co(new tc)},this.F3=t=>{this.Co(new V(t.initDataType,t.initData||new ArrayBuffer(0)))},this.Y3=()=>{this.Co(new Fm)},this.W3=t=>{const i=t.initData,e=i?_t(i).buffer:new ArrayBuffer(0);this.Co(new V(nr,e))},this.G3=t=>{if(t.initData){const i=function(t){try{const i=hl(t),e=new Ha,s=Jc(i,e,cs(i,e,!0));return fu(Tg(s,!0))}catch(t){return}}(t.initData);if(!i)return;this.Co(new V(zn,i))}else this.Co(new V(zn,new ArrayBuffer(0)))},this.V3=t=>{const i=t.initData,e=i?_t(i).buffer:new ArrayBuffer(0);this.Co(new V(nr,e))},this.I2=()=>{this.L2()},this.E2=t=>{this.P2(t)},this.n5=t=>{this.Co(t),t.type===Co.Vg&&this.yP(Zr(t.errorObject))},this.bx=t,this.BC=e,this.Wu=s,this.OB=n,this.d2=new nO(this),this.d2.yn(Zt.H_,this.s5),this.d2.K4(new Sh(this)),this.b2=new EC(this),this.b2.yn(Zt.Rw,this.S3),this.dq=new sO(this),this.dq.yn([Co.Wg,Co.Vg,Co.Lw],this.n5),this.Dl=new Zi,this.i3=new Zi,this.E3=new zs([this.Dl,this.i3]),this.I3=new Vx(this,this.E3),this.J2=new zs([this.E3,this.I3.Z]),this.t3=new Hh(this),this.M3(),this._P()}};var cO=.01;function dO(t,i,e){if(void 0===e&&(e=0),!i.U)return 0;let s=i.tB(t);const n=cO*e;return s===i.Cn(0)?s+=n:s===i.jn(i.U-1)&&(s-=n),s}function lO(t,i){for(let e of t.og)if(e.LT===i)return e}function fO(t){return!!t.cues&&t.cues.length>0}var _O={jH:void 0,zH:void 0,PH:void 0,BH:void 0,RH:void 0,UH:void 0,VH:void 0,QH:void 0,FH:void 0,YH:void 0,GH:void 0},gO=class extends Bo{get va(){return this.Xa||(this.Xa=qL(this)),this.Xa}get jH(){}get zH(){}get PH(){}get BH(){}get RH(){}get UH(){}get VH(){}get QH(){}get FH(){}get YH(){}get GH(){}constructor(...t){super(...t),this.Xa=void 0}},wO=class extends uO{A_(){}get r_(){return 0}get a_(){return 0}constructor(t,i,e){super(t,i,e,new gO)}},zh=class{get we(){return this.r5}be(){this.r5.style.display="none"}ge(){this.r5.style.display="block"}J3(t){t.appendChild(this.r5)}gn(){hs(this.r5)}constructor(t=5){let i=Qr.document.createElement("div");i.className="theoplayer-texttracks",i.style.position="absolute",i.style.display="none",i.style.overflow="hidden",i.style.pointerEvents="none",i.style.left="0",i.style.right="0",i.style.top="0",i.style.bottom="0",i.style.width="100%",i.style.height="100%",i.style.lineHeight="1.3em",i.style.zIndex=""+t,this.r5=i,this.ge()}};function AO(t,i){return Tt({},i,Jl(function(t){return{jH:t.jH,zH:t.zH,PH:t.PH,BH:t.BH,RH:t.RH,UH:t.UH,VH:t.VH,QH:t.QH,FH:t.FH,YH:t.YH,GH:t.GH}}(t)))}function vO(t){return t.PH&&Rh(t.PH,"%")?Number(t.PH.replace("%",""))/100:t.PH&&Rh(t.PH,"em")?Number(t.PH.replace("em","")):1}var mO,Va,ao=class{h5(t){const i=this.o5(t);if(!i)return!1;for(const t of i)hs(t);return this.a5(t),!0}get Lt(){return this.ZT}get jz(){return this.bx}get Iu(){return this.Wu}get u5(){return this.c5}get d5(){return this.l5}MW(){this.f5(),this.ZT.L.og.forEach((t=>this.MI(t))),this.Iu.yn(Tn.pn,this._5),this.g5(this.Iu.ku,this.Iu._u)}w5(t){this.l5=t,this.c5=AO(this.l5,this.A5),this.c5.jH&&(this.jz.style.fontFamily=this.c5.jH),this.c5.VH&&(this.jz.style.visibility=this.c5.VH),this.g5(this.Iu.ku,this.Iu._u),this.v5(!0)}m5(){return this.c5}p5(t){return this.y5.has(t.Mg)}f5(){this.ZT.yn(na.O_,this.M5),this.ZT.yn(na.z_,this.T5),this.ZT.yn(na.ra,this.N5)}D5(){this.ZT.fn(na.O_,this.M5),this.ZT.fn(na.z_,this.T5),this.ZT.fn(na.ra,this.N5)}S5(t){t.yn(sa.zT,this.I5),t.yn(sa.PT,this.E5),t.yn(sa.K_,this.b5)}L5(t){t.fn(sa.zT,this.I5),t.fn(sa.PT,this.E5),t.fn(sa.K_,this.b5)}MI(t){this.S5(t),t.ro&&this.k5(t)}ES(t){this.L5(t),this.C5(t)}x5(){this.ZT.jg===L.Jn?this.O5():this.j5()}O5(){if(!this.z5)return;this.z5=!1;const t=this.Iu.ku,i=this.Iu._u;this.g5(t,i),this.v5(!1)}j5(){this.z5||(this.z5=!0,this.v5(!0))}k5(t){this.z5||t.ro&&!this.p5(t)&&this.v5(!1)}C5(t){this.p5(t)&&this.v5(!0)}P5(t){(t.ro||this.p5(t))&&this.v5(!0)}v5(t){const i=this.B5,e=this.z5?[]:this.ZT.q.og.slice();this.R5(e,i,t),this.B5=e}o5(t){return this.y5.get(t.Mg)}U5(t,i){this.y5.set(t.Mg,i)}a5(t){this.y5.delete(t.Mg)}Q5(){return this.B5.slice()}gn(){hs(this.jz),this.y5.clear(),this.D5(),this.ZT.L.og.forEach((t=>this.L5(t))),this.Iu.fn(Tn.pn,this._5)}constructor(t,i,e,s,n){this.y5=Y(),this.z5=!0,this.l5=Tt({},_O),this.B5=[],this.M5=t=>this.MI(t.BT),this.T5=t=>this.ES(t.BT),this.N5=()=>this.x5(),this.I5=t=>this.k5(t.BT),this.E5=t=>this.C5(t.BT),this.b5=t=>this.P5(t.BT),this._5=t=>{this.g5(t.width,t.height)},this.ZT=t,this.A5=this.c5=n,this.bx=this.F5(e),this.Wu=s,i.appendChild(this.bx)}};function pO(t,i){return t?{Y5:t.Y5,G5:t.G5,V5:t.V5,Ml:i}:null}function yO(t){const i=t?t.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i):null;return i?{Y5:x(i[1],16),G5:x(i[2],16),V5:x(i[3],16)}:null}function MO(t){return("0"+t.toString(16)).slice(-2)}function TO(t){return"#"+MO(t.Y5)+MO(t.G5)+MO(t.V5)}function NO(t){const i=t?t.match(/^rgba\(([0-9]+),\s*([0-9]+),\s*([0-9]+),\s*([0-9.]+)\)$/i):null;return i?{Y5:x(i[1],10),G5:x(i[2],10),V5:x(i[3],10),Ml:C(i[4])}:null}function DO(t,i){return function(t){return t?"rgba("+t.Y5+", "+t.G5+", "+t.V5+", "+t.Ml+")":void 0}(pO(yO(t),i/100))}function SO(t){return IO[t||"none"]}!function(t){t.qc='"Courier New", Courier, "Nimbus Mono L", "Cutive Mono", monospace',t.Wc='"Times New Roman", Times, Georgia, Cambria, "PT Serif Caption", serif',t.Gc='"Deja Vu Sans Mono", "Lucida Console", Monaco, Consolas, "PT Mono", monospace',t.Xc='Arial, Helvetica, Verdana, "PT Sans Caption", sans-serif'}(mO||(mO={})),function(t){t.BLACK="#000000",t.WHITE="#FFFFFF",t.GREEN="#00ff00",t.BLUE="#0000ff",t.CYAN="#00ffff",t.RED="#ff0000",t.YELLOW="#ffff00",t.MAGENTA="#ff00ff",t.TRANSPARENT="transparent"}(Va||(Va={}));var IO={none:"",dropshadow:"#222 2px 2px 3px, #222 2px 2px 4px, #222 2px 2px 5px",raised:"#222 1px 1px, #222 2px 2px, #222 3px 3px",depressed:"#ccc 1px 1px, #ccc 0px 1px, #222 -1px -1px, #222 0px -1px",uniform:"#222 -1px -1px 0, #222 1px -1px 0, #222 -1px 1px 0, #222 1px 1px 0"},EO=Jd({monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:"monospace, sans-serif",monospaceSerif:"monospace, serif",proportionalSansSerif:"Arial",proportionalSerif:"Times New Roman",default:"monospace, sans-serif"}),bO={zH:Va.WHITE,jH:"Arial, Helvetica, Sans-Serif",PH:"100%",BH:Va.TRANSPARENT,RH:Va.TRANSPARENT,UH:"none",VH:"visible",QH:void 0,FH:void 0,YH:void 0,GH:void 0},LO=class extends ao{F5(t){let i=h.createElement("div");i.className="theoplayer-ttml-texttrack-"+t;const e=i.style;return e.position="absolute",RM(e,"flex"),e.overflow="hidden",e.pointerEvents="none",e.top="0",e.left="0",e.width="100%",e.height="100%",i}g5(t,i){let e=_.min(t,i)/15;this.jz.style.fontSize=e+"px"}R5(t,i,e){for(const t of i)!e&&t.ro||this.h5(t);for(const i of t)this.W5(i)}W5(t){let i=this.o5(t);i||(i=this.H5(t),this.U5(t,i));for(const t of i)this.jz.appendChild(t)}H5(t){let i=[],e=t.QD,s=t.zD,n=t.O;if(0===w.keys(s).length){const s=h.createElement("div");UO(s),kO(n,e,t.GD,s,s),s.firstChild&&i.push(s)}else for(let r of w.keys(s)){let o=h.createElement("div");o.id=r,UO(o),OO(o,"region",s[r],e),kO(n,e,t.GD,o,o),o.firstChild&&i.push(o)}return i}w5(t){!function(t,i){var e,s;t.style.marginTop=(null!=(e=i.QH)?e:0)+"px",t.style.marginBottom=(null!=(s=i.FH)?s:0)+"px",t.style.height="calc(100% - "+t.style.marginTop+" - "+t.style.marginBottom+")"}(this.jz,t),KL(this.jz,t)}constructor(t,i,e,s){super(t,i,e,s,bO)}};function kO(t,i,e,s,n){if(re(t)&&function(t){return"SPAN"===t.uS.toUpperCase()||"P"===t.uS.toUpperCase()||"BR"===t.uS.toUpperCase()||"DIV"===t.uS.toUpperCase()||"BODY"===t.uS.toUpperCase()}(t)){let r=CO(t);if(!r||(null==n?void 0:n.id)===r){let r;if("BODY"===t.uS.toUpperCase())r=n;else{if(r=function(t){let i;switch(t.uS.toUpperCase()){case"BR":i=h.createElement("br");break;case"SPAN":i=h.createElement("span"),xO(i,t);break;case"P":i=h.createElement("p"),function(t){const i=t.style;i.fontFamily="inherit",i.color="inherit",i.textAlign="inherit",i.padding="0",i.margin="0",i.lineHeight="inherit"}(i),xO(i,t);break;case"DIV":i=h.createElement("div"),xO(i,t)}return i}(t),!r)return;s.appendChild(r)}!function(t,i,e,s){let n=i.fS("style");PO(t,i.uS,n,e,s),function(t,i,e){for(const s of i.aS)BO(t,i.uS,s.uS,s.LM,e)}(t,i,s)}(r,t,i,n),function(t,i,e){let s=null==i?void 0:i.fS("smpte:backgroundImage");if(s){s=s.replace("#","");let n=e&&jO(e,(t=>t.aS.some((t=>"id"===t.uS&&t.LM===s))));n&&zO(t,n,i,!0)}!function(t,i){const[e]=i.m;if(!e||"metadata"!==e.uS.toLowerCase())return;const[s]=e.m;zO(t,s,i)}(t,i)}(r,t,e);for(const s of t._S)kO(s,i,e,r,n)}}else if(Tv(t)){const i=h.createTextNode(t.Om);s.appendChild(i)}}function CO(t){const i=t.fS("region");if("p"===t.uS.toLowerCase())return i;const e=[];for(const i of t.m)e.push(CO(i));return pl(e),0===e.length?i:1===e.length?null!=(s=e[0])?s:i:void 0;var s}function xO(t,i){let e=i.lS(bv,"id");e&&(t.id=e)}function OO(t,i,e,s){PO(t,i,e.style,s,t);for(const s of w.keys(e))BO(t,i,s,e[s],t)}function jO(t,i){if(i(t))return t;for(let e of t.m){const t=jO(e,i);if(t)return t}return null}function zO(t,i,e,s){void 0===s&&(s=!1),s&&(t.style.width=t.style.height="100%");const n=h.createElement("img");n.src=function(t){const i=t&&t._S.length>0?t._S[0]:null;return i&&Tv(i)?"data:image/png;base64,"+i.Om:""}(i),n.id=t.id,n.style.height="100%",n.style.maxWidth="100%",function(t,i){const e=t.style;RM(e,"flex");let s=i.fS("smpte:backgroundImageVertical");if(s)switch(s.toLowerCase()){case"left":e.alignItems="flex-start";break;case"center":e.alignItems="center";break;case"right":e.alignItems="flex-end";break;case"inherit":e.alignItems="inherit"}else e.alignItems="center";let n=i.fS("smpte:backgroundImageHorizontal");if(n)switch(n.toLowerCase()){case"left":e.justifyContent="flex-start";break;case"center":e.justifyContent="center";break;case"right":e.justifyContent="flex-end";break;case"inherit":e.justifyContent="inherit"}else e.justifyContent="center"}(t,e),t.appendChild(n)}function PO(t,i,e,s,n){if(e)for(const r of e.split(" "))if(s[r])for(const e of w.keys(s[r]))"style"===e.toLowerCase()?PO(t,i,s[r][e],s,n):BO(t,i,e,s[r][e],n)}function BO(t,i,e,s,n){const r=t.style;switch(e){case"backgroundColor":r.backgroundColor=s;break;case"color":r.color=s;break;case"direction":r.direction=s;break;case"display":"none"===s&&(r.display="none");break;case"fontFamily":{const t=EO.get(s);r.fontFamily=t||s;break}case"fontSize":Rh(s,"px")?s=x(s)/24+"em":Rh(s,"c")&&(s=s.replace("c","em")),r.fontSize=s;break;case"fontStyle":r.fontStyle=s;break;case"fontWeight":r.fontWeight=s;break;case"lineHeight":r.lineHeight=s;break;case"opacity":r.opacity=s;break;case"overflow":r.overflow=s;break;case"padding":r.padding=s;break;case"textAlign":"right"===s?(r.textAlign="right",r.justifyContent="flex-end"):"start"===s?(r.textAlign="start",r.justifyContent="flex-start"):"center"===s?(r.textAlign="center",r.justifyContent="center"):"end"===s?(r.textAlign="end",r.justifyContent="flex-end"):"left"===s&&(r.textAlign="left",r.justifyContent="flex-start");break;case"textDecoration":{let t=s;t=t.replace("lineThrough","line-through"),t=t.replace("noUnderline","none"),t=t.replace("noLineThrough","none"),t=t.replace("noOverline","none"),r.textDecoration=t;break}case"unicodeBidi":r.unicodeBidi=s.replace("bidiOverride","bidi-override");break;case"visibility":r.visibility=s;break;case"zIndex":r.zIndex=s;break;case"displayAlign":{let t;if("before"===s.toLowerCase())t="flex-start";else if("center"===s.toLowerCase())t="center";else{if("after"!==s.toLowerCase())return;t="flex-end"}r.alignItems=t;break}case"extent":{const e=RO(i.toLowerCase())?n:t;let r,h,o=s.split(" ");o.length>=2?(r=o[0],h=o[1]):r=h="100%",e&&(e.style.height=h,e.style.width=r);break}case"origin":{const e=RO(i.toLowerCase())?n:t,[r,h]=s.split(" ");e&&(r||h)&&(r&&(e.style.left=r),h&&(e.style.top=h));break}case"showBackground":case"textOutline":break;case"wrapOption":r.whiteSpace=s.replace("noWrap","nowrp").replace("wrap","normal").replace("nowrp","nowrap");break;case"writingMode":{let t,i,e,n;switch(s){case"lrtb":case"lr":t="horizontal-tb";break;case"rltb":t="horizontal-tb",i="rtl",n="bidi-override";break;case"tbrl":case"tb":t="vertical-rl",e="upright";break;case"tblr":t="vertical-lr",e="upright";break;case"rl":t="horizontal-tb",i="rtl";break;default:return}r.writingMode=t,r.setProperty("-webkit-writing-mode",t),i&&(r.direction=i),e&&(r.textOrientation=e,r.setProperty("-webkit-text-orientation",e)),n&&(r.unicodeBidi=n);break}case"linePadding":if(Rh(s,"c")){let t=s.replace("c","em");r.paddingLeft=r.paddingRight=t}break;case"multiRowAlign":"auto"===s.toLowerCase()?r.textAlign="":r.textAlign=s}}function RO(t){return"div"===t||"p"===t||"span"===t}function UO(t){const i=t.style;RM(i,"flex"),i.top="auto",i.left="5%",i.width="90%",i.height="100%",i.maxHeight="100%",i.maxWidth="100%",i.alignItems="flex-start",i.overflow="visible",i.position="absolute",i.fontFamily="Arial, Helvetica, Sans-Serif",i.color="white",i.textShadow="rgb(0, 0, 0) -1px -1px 0px, rgb(0, 0, 0) 1px -1px 0px, rgb(0, 0, 0) -1px 1px 0px, rgb(0, 0, 0) 1px 1px 0px",i.textAlign="start",i.writingMode="horizontal-tb",i.setProperty("-webkit-writing-mode","horizontal-tb"),i.padding="0",i.margin="0",i.lineHeight="1.3em"}var QO,Yr,FO=void 0;function YO(t){return FO||(FO=Qr.document.createElement("textarea")),FO.innerHTML=t,FO.value}function GO(t,i){let e="Data",s="",n=[],r=t.charAt(i.Ku),h="",o={Rg:"starttag",rj:"",q5:[]};for(;i.Ku<t.length+1;){switch(r=i.Ku<t.length?t.charAt(i.Ku):"EOF",e){case"Data":switch(r){case"&":let n=t.substring(i.Ku).match(/&#?[0-9a-zA-Z]+;/);n?(s+=YO(n[0]),i.Nm(n[0].length-1)):s+="&";break;case"<":if(s)return{Rg:"string",O:s};e="Tag";break;case"EOF":return{Rg:"string",O:s};default:s+=r}break;case"Tag":switch(r){case"\t":case"\n":case"\f":case" ":e="StartTagAnnotation";break;case".":e="StartTagClass";break;case"/":e="EndTag";break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":s=r,e="TimestampTag";break;case">":return i.Nm(1),o;case"EOF":return o;default:s=r,e="StartTag"}break;case"StartTag":switch(r){case"\t":case"\f":case" ":e="StartTagAnnotation";break;case"\n":h=r,e="StartTagAnnotation";break;case".":e="StartTagClass";break;case">":return i.Nm(1),{Rg:"starttag",rj:s,q5:[]};case"EOF":return{Rg:"starttag",rj:s,q5:[]};default:s+=r}break;case"StartTagClass":switch(r){case"\t":case"\f":case" ":n.push(h),h="",e="StartTagAnnotation";break;case"\n":n.push(h),h=r,e="StartTagAnnotation";break;case".":n.push(h),h="";break;case">":return i.Nm(1),n.push(h),{Rg:"starttag",rj:s,q5:n};case"EOF":return n.push(h),{Rg:"starttag",rj:s,q5:n};default:h+=r}break;case"StartTagAnnotation":switch(r){case"&":e="CharRefInAnnotation";break;case">":i.Nm(1);let t=h.trim();return t=t.replace(/\s/," "),{Rg:"starttag",rj:s,q5:n,X5:t};default:h+=r}break;case"CharRefInAnnotation":let a="";for(let e=i.Ku;">"===t.charAt(e);e++)a+=t.charAt(e);h+=a||"&",e="StartTagAnnotation";break;case"EndTag":switch(r){case">":return i.Nm(1),{Rg:"endtag",rj:s};case"EOF":return{Rg:"endtag",rj:s};default:s+=r}break;case"TimestampTag":switch(r){case">":return i.Nm(1),{Rg:"timestamp",Z5:s};case"EOF":return{Rg:"timestamp",Z5:s};default:s+=r}}i.Nm(1)}return o}function VO(t){let i;if(t.getBoundingClientRect&&t.parentNode&&(i=t.getBoundingClientRect()),!i)return{left:0,top:0};const e=h.documentElement,n=h.body,r=e.clientLeft||n.clientLeft||0,o=s.pageXOffset||n.scrollLeft,a=i.left+o-r,u=e.clientTop||n.clientTop||0,c=s.pageYOffset||n.scrollTop,d=i.top+c-u;return{left:_.round(a),top:_.round(d)}}function WO(t,i,e,s){if(void 0===s&&(s=0),!t||!i)return;t.style.left="0px";let n=t.getClientRects(),r=i.getClientRects();if(0===n.length||0===r.length)return;let h=n[0],o=r[0],a=h.width/2+h.left;HO(t,o.width/2+o.left-a,e,s)}function HO(t,i,e,s){void 0===s&&(s=0),XO(t,i,"left","right",e,s)}function qO(t,i,e,s){void 0===s&&(s=0),XO(t,i,"top","bottom",e,s)}function XO(t,i,e,s,n,r){void 0===r&&(r=0);const h=t.getClientRects();if(n&&h.length>0){const t=h[0];i=Pe(i,n[e]+r-t[e],n[s]-r-t[s])}t.style[e]=i+"px"}function Gi(t,i){void 0===t.textContent?t.innerText=i:t.textContent=i}!function(t){t.K5="Data",t.J5="Tag",t.t6="StartTag",t.i6="StartTagClass",t.e6="StartTagAnnotation",t.s6="CharRefInAnnotation",t.n6="EndTag",t.r6="TimestampTag"}(QO||(QO={})),function(t){t.h6="string",t.o6="starttag",t.a6="endtag",t.u6="timestamp"}(Yr||(Yr={}));var ZO=class t{get c6(){return this.d6+this.ji}set c6(t){this.d6=t-this.ji}get l6(){return this.f6+this.Ti}set l6(t){this.f6=t-this.Ti}_6(t){return this.d6<t.c6&&this.c6>t.d6&&this.f6<t.l6&&this.l6>t.f6}NT(t){return this.d6<=t.d6&&t.c6<=this.c6&&this.f6<=t.f6&&t.l6<=this.l6}Sm(){return new t(this.d6,this.f6,this.ji,this.Ti)}g6(i){const e=this.d6+i,s=this.f6+i,n=_.max(0,this.ji-2*i),r=_.max(0,this.Ti-2*i);return new t(e,s,n,r)}constructor(t,i,e,s){this.d6=t,this.f6=i,this.ji=e,this.Ti=s}},KO={zH:Va.WHITE,jH:"sans-serif",PH:"100%",BH:"rgba(0,0,0,0.8)",RH:Va.TRANSPARENT,UH:"none",VH:"visible",QH:void 0,FH:void 0,YH:void 0,GH:void 0},JO="theoplayer-webvtt-region-",$O="theoplayer-webvtt-styling-",tj="theoplayer-webvtt-default-style",ij=5.23,ej=1.14,sj=class extends ao{F5(t){let i=h.createElement("div");i.className="theoplayer-webvtt-texttrack-"+t,ca(i),i.style.overflow="hidden",i.style.pointerEvents="none";const e=this.u5.jH;return e&&(i.style.fontFamily=e),i.style.whiteSpace="pre-line",function(){if(h.getElementById(tj))return;const t=[];for(const[i,e]of vj)t.push("."+$O+i+" { color: "+e+" !important; }"),t.push("."+$O+"w6"+i+" { background-color: "+e+" !important; }"),t.push("video::cue(."+i+") { color: "+e+"; }"),t.push("A6"+i+") { background-color: "+e+"; }");const i=h.createElement("style");i.id=tj,i.innerHTML=t.join("\n"),h.body.appendChild(i)}(),i}MW(){this.jz.appendChild(this.v6),super.MW()}g5(t,i){const e=_.min(t/100,i/100),s=vO(this.u5);this.m6.forEach((t=>{let{VT:i,p6:n}=t;this.y6(n,e,s,i)})),this.y6(this.v6,e,s)}w5(t){KL(this.jz,t),super.w5(t)}R5(t,i,e){const s=this.jz,n=this.Iu._u/100;let r=[];for(const i of t)void 0!==i.VT&&(ae(r,i.VT)||r.push(i.VT));this.m6.forEach(((t,i)=>{let{VT:s,p6:n}=t;!e&&ae(r,s)||(hs(n),this.m6.delete(i))}));for(const t of i)!e&&t.ro||this.h5(t);let h=[];const o=fj(this.v6.getBoundingClientRect());h.push(...this.M6(o));for(const t of r){let i;this.m6.has(t.o)?i=this.m6.get(t.o).p6:(i=cj(t,n),s.appendChild(i),this.m6.set(t.o,{VT:t,p6:i})),h.push(fj(i.getBoundingClientRect()))}t.sort(mj);for(const i of t){const t=this.W5(i,h,o);void 0!==t&&h.push(t.g6(.1))}}M6(t){const i=[],e=this.u5;if(void 0!==e.QH){const s=t.Sm();s.Ti=e.QH,i.push(s)}if(void 0!==e.FH){const s=t.Sm();s.Ti=e.FH,s.l6=t.l6,i.push(s)}return i}W5(t,i,e){var s;let n;t.VT?(n=this.m6.get(t.VT.o).p6,"up"===t.VT.uN&&n.children.length>=1&&(n.style.transitionProperty="top",n.style.transitionDuration="0.433s")):n=this.v6;let r=null==(s=this.o5(t))?void 0:s[0];if(r||(r=this.T6(t),this.U5(t,[r])),n.appendChild(r),t.VT||(nj(r,t),t.WT?function(t,i,e,s){const n=dj(t),r=n?e.Ti:e.ji;let h=C(getComputedStyle(i).lineHeight);if(0===h||S(h))return;let o=fj(i.getBoundingClientRect()),a=_.round(pA(t));"rl"===t.Pt&&(a=-(a+1));let u=h*a;"rl"===t.Pt&&(u=u-o.ji+h);a<0&&(u+=r,h=-h);n?o.f6+=u:o.d6+=u;const c=o.Sm();let d=!1;for(;!e.NT(o)||lj(o,s);)if(n)if(h<0&&o.f6<e.f6||h>0&&o.l6>e.l6){if(o.f6=c.f6,d)break;h=-h,d=!0}else o.f6+=h;else if(h<0&&o.d6<e.d6||h>0&&o.c6>e.c6){if(o.d6=c.d6,d)break;h=-h,d=!0}else o.d6+=h;n?i.style.top=(o.f6-e.f6)/e.Ti*100+"%":i.style.left=(o.d6-e.d6)/e.ji*100+"%"}(t,r,e,i):function(t,i,e,s){let n=fj(i.getBoundingClientRect());if(0===n.ji||0===n.Ti)return;dj(t)?"center"===t.YT?n.f6-=n.Ti/2:"end"===t.YT&&(n.f6-=n.Ti):"center"===t.YT?n.d6-=n.ji/2:"end"===t.YT&&(n.d6-=n.ji);let r,h=n.Sm(),o=h,a=1,u=!1;r=""===t.Pt?[2,3,0,1]:"lr"===t.Pt?[0,1,2,3]:[1,0,2,3];const c=4,d=C(getComputedStyle(i).lineHeight)/c;if(!S(d)&&d>0){for(let t=0;t<r.length&&!u;t++){for(;!gj(n,e,r[t],.01)&&(!e.NT(n)||lj(n,s));)_j(n,r[t],d);if(e.NT(n)){o=n.Sm(),u=!0;break}let i=wj(n,e);a>i&&(o=n.Sm(),a=i),n=h.Sm()}e.NT(n)||(o=h.Sm())}i.style.left=(o.d6-e.d6)/e.ji*100+"%",i.style.top=(o.f6-e.f6)/e.Ti*100+"%"}(t,r,e,i)),!t.VT)return fj(r.getBoundingClientRect())}T6(t){let i=new Ha,e=t.O,s=this.N6(t),n={D6:void 0,we:s},r=n,o="",a="",u=[n],c=[],d=[];for(;i.Ku<e.length;){let t=GO(e,i);if(t.Rg===Yr.h6){const i=h.createElement("span");Gi(i,t.O),rj(i,u),""!==o&&(i.lang=o),this.S6(i,a),r.we.appendChild(i)}else if(t.Rg===Yr.o6){const i=t.rj.toLowerCase();switch(i){case"i":case"b":case"u":case"ruby":{let e=h.createElement(i);r.we.appendChild(e),r={D6:t,we:e},u.push(r);break}case"rt":var l;if("ruby"===(null==(l=r.D6)?void 0:l.rj.toLowerCase())){let i=h.createElement("rt");r.we.appendChild(i),r={D6:t,we:i},u.push(r)}break;case"c":case"v":r={D6:t,we:r.we},u.push(r);break;case"font":{var f;const i=null==(f=t.X5)?void 0:f.match(/(?:^| )color=["']([^"']+)/i);i&&(a=i[1],d.push(a),r={D6:t,we:r.we},u.push(r));break}case"lang":var _;o=null!=(_=t.X5)?_:"",c.push(o)}}else if(t.Rg===Yr.a6){var g;const i=t.rj.toLowerCase(),e=null==(g=r.D6)?void 0:g.rj.toLowerCase();e===i?(u.pop(),r=u[u.length-1],"font"===i&&(d.pop(),a=d.length>0?d[d.length-1]:"")):"rt"===e&&"ruby"===i?(u.pop(),u.pop(),r=u[u.length-1]):"lang"===i&&(c.pop(),o=c.length>0?c[c.length-1]:"")}else if(t.Rg===Yr.u6){let i=t.Z5,e=new Ha;try{nv(i,e)}catch(t){Hu("ERROR collecting timestamp",t)}}}return s}S6(t,i){const e=this.u5,s=this.d5;e.BH&&(t.style.background=e.BH);const n=s.zH||i||e.zH;n&&(t.style.color=n)}y6(t,i,e,s){if(s){let n=hj(s,i);t.style.height=n*e+"px",t.style.left=oj(s)+"%",t.style.top=aj(s,i)+"px"}t.style.fontSize=ij*i*e+"px"}N6(t){const i=h.createElement("div");i.style.position="absolute",i.style.margin="0",i.style.padding="0",i.style.unicodeBidi="plaintext",i.style.wordWrap="break-word",i.style.overflowWrap="break-word",i.style.width="auto",i.style.textAlign=t.QT,function(t,i){"rl"===i.Pt?t.style.writingMode="vertical-rl":"lr"===i.Pt?t.style.writingMode="vertical-lr":t.style.writingMode="horizontal-tb"}(i,t),function(t,i){let e=TA(i);dj(i)?(t.style.width=e+"%",t.style.height="auto"):(t.style.height=e+"%",t.style.width="auto")}(i,t),nj(i,t);const e=this.u5.RH;e&&(i.style.background=e);const s=this.u5.zH;return s&&(i.style.color=s),i.style.textShadow=SO(this.u5.UH),i}constructor(t,i,e,s){super(t,i,e,s,KO),this.m6=Cn(),this.v6=uj(3)}};function nj(t,i){let e,s,n=MA(i),r=yA(i),h=TA(i);if(dj(i)){switch(n){case"line-left":e=r;break;case"center":e=r-h/2;break;case"line-right":e=r-h}s=i.WT?0:pA(i)}else{switch(n){case"line-left":s=r;break;case"center":s=r-h/2;break;case"line-right":s=r-h}e=i.WT?0:pA(i)}t.style.left=e+"%",t.style.top=s+"%"}function rj(t,i){for(const e of i)if(e.D6){for(const i of e.D6.q5)Kh(t,$O+i);"v"===e.D6.rj.toLowerCase()&&e.D6.X5&&Kh(t,"theoplayer-webvtt-voice-"+e.D6.X5)}}function hj(t,i){return t.hN*(ij*i)*ej}function oj(t){return t.cN-t.oN*t.ji/100}function aj(t,i){let e=t.dN,s=t.aN*hj(t,i)/100;return _.max(0,e-s)}function uj(t){let i=h.createElement("div");return i.className=JO+"default",ca(i),i.style.wordWrap="break-word",i.style.writingMode="horizontal-tb",i.style.pointerEvents="none",i.style.width="auto",i.style.height="auto",i.style.maxHeight="100%",i.style.minHeight="0px",i.style.padding="0",i.style.boxSizing="border-box",i.style.fontSize=ij*t+"px",i.style.lineHeight=ej+"em",i}function cj(t,i){let e=uj(i);e.className=JO+t.o;let s=t.ji,n=hj(t,i);return e.style.width=s+"%",e.style.height=n+"px",e.style.left=oj(t)+"%",e.style.right="",e.style.top=aj(t,i)+"px",e.style.bottom="",e.style.boxSizing="border-box",e}function dj(t){return""===t.Pt}function lj(t,i){return i.some((i=>t._6(i)))}function fj(t){return new ZO(t.left,t.top,t.width,t.height)}function _j(t,i,e){switch(i){case 0:t.d6+=e;break;case 1:t.d6-=e;break;case 2:t.f6+=e;break;case 3:t.f6-=e}}function gj(t,i,e,s){switch(e){case 0:return t.c6>i.c6+s;case 1:return t.d6<i.d6-s;case 2:return t.l6>i.l6+s;case 3:return t.f6<i.f6-s}}function wj(t,i){return _.max(0,_.min(t.c6,i.c6)-_.max(t.d6,i.d6))*_.max(0,_.min(t.l6,i.l6)-_.max(t.f6,i.f6))/(t.ji*t.Ti)}var Aj,vj=[["white","#fff"],["lime","#0f0"],["cyan","#0ff"],["red","#f00"],["yellow","#ff0"],["magenta","#f0f"],["blue","#00f"],["black","#000"]];function mj(t,i){const e=pA(t),s=pA(i),n=pj(e,t.WT),r=pj(s,i.WT);return n&&r?e-s||kC(i,t)||i.Mg-t.Mg:kC(t,i)||t.Mg-i.Mg}function pj(t,i){return i?t<0?t>-8:t>8:t>50}!function(t){t.FONT_REGULAR="regular",t.FONT_UNDERLINE="underline",t.FONT_ITALICS="italics",t.FONT_UNDERLINE_ITALICS="underline-italics"}(Aj||(Aj={}));var yj={zH:Va.WHITE,jH:mO.Gc,PH:"100%",BH:Va.BLACK,RH:"transparent",UH:"none",I6:"regular",VH:"visible",QH:void 0,FH:void 0,YH:void 0,GH:void 0},Mj=[{E6:Va.WHITE,I6:"regular",b6:0},{E6:Va.WHITE,I6:"underline",b6:0},{E6:Va.GREEN,I6:"regular",b6:0},{E6:Va.GREEN,I6:"underline",b6:0},{E6:Va.BLUE,I6:"regular",b6:0},{E6:Va.BLUE,I6:"underline",b6:0},{E6:Va.CYAN,I6:"regular",b6:0},{E6:Va.CYAN,I6:"underline",b6:0},{E6:Va.RED,I6:"regular",b6:0},{E6:Va.RED,I6:"underline",b6:0},{E6:Va.YELLOW,I6:"regular",b6:0},{E6:Va.YELLOW,I6:"underline",b6:0},{E6:Va.MAGENTA,I6:"regular",b6:0},{E6:Va.MAGENTA,I6:"underline",b6:0},{E6:Va.WHITE,I6:"italics",b6:0},{E6:Va.WHITE,I6:"underline-italics",b6:0},{E6:Va.WHITE,I6:"regular",b6:0},{E6:Va.WHITE,I6:"underline",b6:0},{E6:Va.WHITE,I6:"regular",b6:4},{E6:Va.WHITE,I6:"underline",b6:4},{E6:Va.WHITE,I6:"regular",b6:8},{E6:Va.WHITE,I6:"underline",b6:8},{E6:Va.WHITE,I6:"regular",b6:12},{E6:Va.WHITE,I6:"underline",b6:12},{E6:Va.WHITE,I6:"regular",b6:16},{E6:Va.WHITE,I6:"underline",b6:16},{E6:Va.WHITE,I6:"regular",b6:20},{E6:Va.WHITE,I6:"underline",b6:20},{E6:Va.WHITE,I6:"regular",b6:24},{E6:Va.WHITE,I6:"underline",b6:24},{E6:Va.WHITE,I6:"regular",b6:28},{E6:Va.WHITE,I6:"underline",b6:28}],Tj=[11,-1,1,2,3,4,12,13,14,15,5,6,7,8,9,10];function Nj(t,i){return CA(t.L6,i.L6)||Ta(t.wM,i.wM)}var el=32,Dj=/CC([1-4])=(.*)/;function Sj(t){if(!t)return[];const i=[],e=t.trim().split(";");if(e.every((t=>t.match(Dj))))for(const t of e){const[,e,s]=t.match(Dj);i.push({k6:Number(e),C6:s})}else for(let t=0;t<e.length;t++)i.push({k6:t+1,C6:e[t]});return i}var Ij=class t{get x6(){return this.j6.O6}get z6(){return this.j6.P6}get B6(){return this.j6.P6.b6-this.j6.O6.b6+1}get R6(){return this.j6.P6.U6-this.j6.O6.U6+1}pr(){return this.Q6=this.F6(),this.Y6(),this.G6(),this.Q6}F6(){let t=h.createElement("div");t.style.position="absolute",t.style.margin="0",t.style.padding="0",t.style.whiteSpace="pre",t.style.width=this.B6/el*this.W6.V6*100+"%",t.style.height=1.2*this.R6+"em",t.style.lineHeight="1.2em",t.style.letterSpacing=this.W6.H6?"calc(1em - 1ch)":"";const i=this.c5.jH;i&&(t.style.fontFamily=i);const e=this.c5.RH;return e&&(t.style.backgroundColor=e),t}Y6(){if(!this.Q6)return;let t=this.x6.U6/15*100,i=this.x6.b6/el*100,e=(el-this.z6.b6-1)/el*100,s=(15-this.z6.U6-1)/15*100;this.W6.q6||(i=e=1,this.Q6.style.width="98%"),s<t?this.Q6.style.bottom=s*this.W6.V6+"%":this.Q6.style.top=t*this.W6.V6+"%",e<i?this.Q6.style.right=e+"%":this.Q6.style.left=i+"%"}G6(){const t=this.j6.X6.sort(Ej);for(let i=0;i<t.length;i++)this.Z6(t[i-1],t[i]),this.K6(t[i]);this.Z6(t[t.length-1],void 0)}K6(i){var e;const s=AO(this.c5,i.J6),n=t.t8(s);Gi(n,i.i8),null==(e=this.Q6)||e.appendChild(n)}static t8(t){const i=h.createElement("span");i.style.display="inline-block",t.I6!==Aj.FONT_ITALICS&&t.I6!==Aj.FONT_UNDERLINE_ITALICS||(i.style.fontStyle="italic"),t.I6!==Aj.FONT_UNDERLINE&&t.I6!==Aj.FONT_UNDERLINE_ITALICS||(i.style.textDecoration="underline");const e=t.zH;e&&(i.style.color=e);const s=t.BH;return s&&(i.style.backgroundColor=s),i.style.textShadow=SO(t.UH),i.style.height="1.2em",i}Z6(t,i){let e=t?t.P6.U6:this.j6.O6.U6;const s=i?i.O6.U6:this.j6.P6.U6;let n=t?t.P6.b6:this.j6.O6.b6;const r=i?i.O6.b6:this.j6.P6.b6;e<s&&(!i||t&&t.O6.U6!==i.O6.U6?this.e8():this.s8(this.j6.P6.b6-n),n=this.j6.O6.b6),n<r&&(i?this.s8(r-n):this.e8())}e8(){var t;const i=h.createElement("br");null==(t=this.Q6)||t.appendChild(i)}s8(t){var i;if(t<=0)return;const e=h.createElement("span");e.style.display="inline-block",Gi(e,Lf(" ",t)),null==(i=this.Q6)||i.appendChild(e)}constructor(t,i,e){this.j6=t,this.W6=i,this.c5=e}};function Ej(t,i){return function(t,i){if(t.U6!==i.U6)return t.U6-i.U6;return t.b6-i.b6}(t.O6,i.O6)}var bj=class extends ao{F5(t){let i=h.createElement("div");return i.className="theoplayer-cea608-texttrack-"+t,i.style.position="absolute",i.style.overflow="hidden",i.style.pointerEvents="none",i.style.top="10%",i.style.bottom="10%",this.u5.jH&&(i.style.fontFamily=this.u5.jH),i}g5(t,i){this.ll()}ll(){let t=vO(this.u5);this.n8=function(t){return{V6:t/100,H6:t<=100,q6:t<=150}}(100*t);const i=this.r8/el;this.h8=i*t,this.jz.style.fontSize=this.h8+"px"}get r8(){let t=this.jz.offsetWidth;return this.n8&&this.n8.q6||(t*=.8),t}R5(t,i,e){for(const t of i)!e&&t.ro||this.h5(t);for(const i of t)this.W5(i)}W5(t){this.n8&&this.n8.q6?this.o8(80):this.o8(100),this.ll();let i=this.o5(t);i||(i=this.H5(t),this.U5(t,i));for(const t of i)this.jz.appendChild(t)}H5(t){return t.O.map((t=>new Ij(t,this.n8,this.u5).pr()))}o8(t){const i=(100-t)/2;this.jz.style.left=i+"%",this.jz.style.width=t+"%"}constructor(t,i,e,s){super(t,i,e,s,yj)}},Lj=class t{a8(t){for(let i of this.u8)if(i.Lt===t)return i}static c8(t){switch(t.Rg){case Wt.TTML:case Wt.SRT:case Wt.WEBVTT:case Wt.CEA608:return!0}return!1}d8(t){switch(t.Rg){case Wt.TTML:return new LO(t,this.l8,t.kh,this.Wu);case Wt.SRT:case Wt.WEBVTT:return new sj(t,this.l8,t.kh,this.Wu);case Wt.CEA608:return new bj(t,this.l8,t.kh,this.Wu)}}f8(t){let i=this.a8(t);i||(i=this.d8(t),i&&(i.MW(),i.w5(this.OB),this.u8.push(i),t.jg===L.Jn&&i.O5()))}_8(t){let i=this.u8;for(let e=i.length-1;e>=0;e-=1){let s=i[e];s.Lt===t&&(s.gn(),si(i,e))}}g8(i){tm(i.zt)&&t.c8(i)&&(i.Jf===Rt.ERROR?this._8(i):this.f8(i))}get m1(){return this.w8.cs}tr(){for(let t of this.u8)t.Lt.fn(na.H_,this.A8),t.Lt.fn(na.X_,this.A8),t.gn();No(this.u8)}gn(){this.tr();for(let t of this.u8)t.gn();this.Dl.fn(Rl.L_,this.v8),this.Dl.fn(Rl.C_,this.m8),this.Dl.fn(na.ra,this.A8),this.w8.fn(ye.ra,this.p8),this.OB.fn("W_",this.y8)}constructor(t,i,e,s,n){this.u8=[],this.v8=t=>{let i=t.Lt;i.yn(na.H_,this.A8),i.yn(na.X_,this.A8),i instanceof jr&&(i.m1=this.m1),this.g8(i)},this.A8=t=>{let i=t.Lt;this.g8(i)},this.m8=t=>{let i=t.Lt;i.fn(na.H_,this.A8),i.fn(na.X_,this.A8),this._8(i)},this.p8=()=>{let t=this.m1;for(let i of this.Dl.og)i instanceof jr&&(i.m1=t)},this.y8=()=>{for(let t of this.u8)t.w5(this.OB)},this.M8=()=>{for(let t of this.u8)t.w5(Tt({},t.m5(),{VH:"hidden"}))},this.T8=()=>{for(let t of this.u8)t.w5(Tt({},t.m5(),{VH:"visible"}))},this.l8=t,this.Wu=i,this.Dl=e,this.w8=n,this.OB=s,this.Dl.yn(Rl.L_,this.v8),this.Dl.yn(Rl.C_,this.m8),this.Dl.yn(na.ra,this.A8),this.w8.yn(ye.ra,this.p8),this.OB.yn("W_",this.y8),this.p8()}};function kj(t){const i=new ZS,e=function(t){const i=[];return qS.ia(t)&&i.push(new qS(t)),XS.ia(t)&&i.push(new XS(t)),i}(t);if(e.length>0){for(const t of e)i.UY(t);i.RY(e[0])}return i}var Cj,xj=class extends uO{get jz(){return this.bx}get r_(){return this.bx.videoHeight}get a_(){return this.bx.videoWidth}get ya(){return this.N8}A_(){return this.bx}async Qd(){this.N8.gn(),this.D8.gn(),this.S8.gn(),await super.Qd()}be(){super.be(),this.D8.be()}ge(){super.ge(),this.D8.ge()}J3(t){super.J3(t),this.D8.J3(t)}constructor(t,i,e,s){super(t,i,e,s),this.N8=kj(t),this.D8=new zh,this.S8=new Lj(this.D8.we,this.Iu,this.nt,this.Ol,this.ya)}};!function(t){t.I8="HELLO",t.E8="HI_THERE",t.b8="INITIALIZE",t.L8="APPEND_INIT",t.k8="APPEND_DATA",t.C8="ACK",t.x8="REMOVE",t.O8="DESTROY_SESSION"}(Cj||(Cj={}));var Ga,Oj=class{j8(t){return this.gq.wx((async t=>{fo(t);const i=new MessageChannel,e=i.port1,s=i.port2;ed.serviceWorker.controller||await jt(ed.serviceWorker,"install",t),"activated"!==ed.serviceWorker.controller.state&&await jt(ed.serviceWorker.controller,"activate",t);const n={kind:"HELLO",port:s};ed.serviceWorker.controller.postMessage(n,[s]),e.start(),this.z8=e;try{const i=await jt(e,"message",t),s=i.data;if("HI_THERE"!==s.kind)throw new g("Could not set up message channel");this.Cx=s.sessionId}catch(t){throw Mi(t)&&this.P8(),t}}),t)}B8(t,i){return this.z8,this.gq.wx((async()=>{if(!this.z8)throw new g("MessageSession not set up yet or already closed.");i||(i=[]),this.z8.postMessage(t,i);const e=await jt(this.z8,"message");return e.data}))}U8(){return this.gq.wx((()=>this.P8()))}P8(){if(!ed.serviceWorker.controller)return;if("activated"!==ed.serviceWorker.controller.state)return;if(!this.z8)return;const t={kind:"DESTROY_SESSION"};this.z8.postMessage(t),this.z8.close(),this.z8=void 0}constructor(){this.gq=new ls}},jj=class{get Q8(){return this.F8}Y8(t,i){const e=t-i;this.F8=e>this.Q8?this.F8:e}G8(t){this.F8=t}constructor(){this.F8=1/0}};!function(t){t.vm="audio",t.Am="video",t.Mm="metadata"}(Ga||(Ga={}));var zj=class extends Bo{get wf(){return void 0===this.V8||void 0===this.W8?ce.MB():new ce([this.V8,this.W8])}get wd(){return{Fz:this.QF}}get XJ(){return f.tT}get SF(){return this.QF}get KJ(){return ce.MB()}get AW(){return 30}set AW(t){}get yW(){return 30}set yW(t){}t$(t,i){}i$(t,i){}Dq(){return this.H8}get oa(){return this.q8}get X8(){return this.V8}get UT(){return this.W8}async e$(){}async NJ(t,i){}async oJ(t,i,e){if(t.Rg!==dt.$H)throw new g("Streaming or opaque segments are not supported yet.");const s=t.Om,n=async()=>{const t=s.buffer,e={kind:Cj.k8,mediaType:Pj(this.QF),segment:s,startPts:i.Z8,totalDuration:i.ct};if(await this.K8.B8(e,[t]),void 0===this.V8){const t=i.Z8+i.jD;this.V8=t,this.W8=t}this.W8=this.W8+i.ct,this.Co(new Yi(Je.KH))};return this.gq.wx((async t=>{fo(t);try{this.q8=!0,await n()}finally{this.q8=!1}}),e)}async cJ(t,i,e){if(t.Rg!==dt.$H)throw new g("Streaming or opaque initialization segments are not supported yet.");const s=t.Om,n=async()=>{const t={kind:Cj.L8,mediaType:Pj(this.QF),segment:s};await this.K8.B8(t,[])};return this.gq.wx((async t=>{fo(t);try{this.q8=!0,await n()}finally{this.q8=!1}}),e)}HJ(){this.H8=!0}PJ(){this.H8=!1}async TT(t,i,e){const s=async()=>{const t={kind:Cj.x8,mediaType:Pj(this.QF),endTime:i};await this.K8.B8(t),this.V8=void 0,this.W8=void 0,this.Co(new Yi(Je.KH))};return this.gq.wx((async t=>{fo(t);try{this.q8=!0,await s()}finally{this.q8=!1}}),e)}aq(t){return this.QF===t.Fz}cq(t){return this.QF=t.Fz,Promise.resolve()}async Qd(){this.Vo(),await this.gq.gn()}constructor(t,i){super(),this.QF=t,this.K8=i,this.V8=void 0,this.W8=void 0,this.gq=new ls,this.q8=!1,this.H8=!1}};function Pj(t){return t.match(/video/)?Ga.Am:Ga.vm}var Bj=class t{static J8(i,e,s,n){const r=[];for(let t=0;t<i.K$.length;t++){const s=i.K$[t].Fz;r.push(new zj(s,e))}return new t(i,r,s,n)}t9(){}get i9(){return[this.Y$,this.G$].filter(Dd)}get B$(){return this.Y$}get wf(){return cC(this)}get wd(){return this.sx}get ct(){return 0}get Dq(){var t,i,e;const s=null==(e=null==(t=this.Y$)?void 0:t.Dq())||e;var n;const r=null==(n=null==(i=this.G$)?void 0:i.Dq())||n;return s&&r}get t_(){return new ce([0,1/0])}get R$(){return this.G$}get rt(){throw new g("Not implemented")}async Qd(){await Promise.all([this.Y$,this.G$].filter(Dd).map((t=>t.Qd())))}W$(t){}Z$(t,i,e,s){}HJ(){var t,i;null==(t=this.Y$)||t.HJ(),null==(i=this.G$)||i.HJ()}PJ(){var t,i;null==(t=this.Y$)||t.PJ(),null==(i=this.G$)||i.PJ()}aq(t){return!0}cq(t){return this.sx=t,Promise.resolve()}async hq(t,i){const e=await this.BC.zC(t.Mb,i),s=await e.DC();return await this.oq(s),s}async oq(t){if(t&&!this.bx.src)throw new Or(td.CONTENT_PROTECTION_ERROR,"Attempted to attach MediaKeys to a sourceless MediaElement");if(!t&&this.bx.src)throw new Or(td.CONTENT_PROTECTION_ERROR,"Attempted to remove MediaKeys from a non-empty MediaElement");const i=this.yC;i&&(await i.TC(this.bx),this.yC=void 0),t&&(await t.bn(this.bx),this.yC=t)}constructor(t,i,e,s){this.yC=void 0,this.sx=t,this.G$=Po(i,(t=>Boolean(t.SF.match(/video/)))),this.Y$=Po(i,(t=>Boolean(t.SF.match(/audio/)))),this.BC=e,this.bx=s,this.t9()}},Rj=class extends Bo{e9(){this.s9.addEventListener("timeupdate",this.n9),this.s9.addEventListener("ended",this.r9),this.s9.addEventListener("timeupdate",this.h9),this.s9.addEventListener("ratechange",this.o9),this.s9.addEventListener("volumechange",this.a9),this.s9.addEventListener("durationchange",this.u9),this.s9.addEventListener("playing",this.c9),this.s9.addEventListener("seeking",this.d9),this.s9.addEventListener("play",this.l9),this.s9.addEventListener("pause",this.f9),this.s9.addEventListener("encrypted",this.F3)}_9(){this.s9.removeEventListener("timeupdate",this.n9),this.s9.removeEventListener("ended",this.r9),this.s9.removeEventListener("timeupdate",this.h9),this.s9.removeEventListener("ratechange",this.o9),this.s9.removeEventListener("volumechange",this.a9),this.s9.removeEventListener("durationchange",this.u9),this.s9.removeEventListener("playing",this.c9),this.s9.removeEventListener("seeking",this.d9),this.s9.removeEventListener("play",this.l9),this.s9.removeEventListener("pause",this.f9)}g9(){this.d2.yn(Zt.H_,this.Ds)}w9(){this.d2.fn(Zt.H_,this.Ds)}get jz(){return this.s9}get m0(){return!1}get Mf(){return this.s9.currentTime+this.A9.Q8}get Ff(){return this.s9.paused}get c_(){return this.s9.volume}set c_(t){this.s9.volume=t}get Gf(){return this.s9.playbackRate}set Gf(t){this.s9.playbackRate=t}get v9(){return this.s9.defaultPlaybackRate}get wf(){var t,i;return null!=(i=null==(t=this.Pz)?void 0:t.wf)?i:ce.MB()}get m9(){return ce.xn(this.s9.buffered)}get Hf(){const t=this.p9;return this.Uo.rB(t.Nm(this.A9.Q8))}get p9(){return ce.xn(this.s9.played)}get e_(){return this.NB}get l0(){return!1}get T0(){return!1}get ct(){return this.s9.duration}get Pf(){return this.s9.muted}set Pf(t){this.s9.muted=t}get J6(){return this.s9.style}get W4(){return Tt({},$L,{ZH:!0})}Dm(t,i,e){this.B2.Xd(),this.B2=new er,this.R2=this.U2(t,this.R2,this.B2.Hd).catch(qo)}async U2(t,i,e){var s;this.Uo=this.Hf;const n=null==(s=this.Pz)?void 0:s.i9;if(!n)return;const r=_.max(...n.map((t=>t.X8?t.X8:1/0)));this.NB=!0,this.Co(new lo(t)),await i.catch(qo),fo(e);try{for(this.y9||this.M9(),this.s9.load(),this.T9||(this.N9=!1,await ji(this.s9.play(),e));this.Jf<oe.nT;)await this.d2.df(Zt.H_,e);this.D9.Qb(),this.y9=!1,this.NB=!1,this.Co(new _r(this.Mf))}catch(t){throw this.D9.Yb(t),t}finally{this.S9(),this.A9.G8(r)}}m_(){this.T9=!0,this.s9.pause()}async p_(){this.T9&&(this.s9.src||this.K3(),await this.D9.Vb,await this.s9.play())}async Qd(){this.K8&&this.K8.U8().catch(qo),this.B2.Xd(),this._9(),this.w9(),this.d2.Qd(),this.Vo(),this.Dl.gn()}async tr(){this.K8&&this.K8.U8().catch(qo),this.B2.Xd(),this.s9.removeAttribute("src"),this.s9.removeAttribute("x-webkit-wirelessvideoplaybackdisabled"),this.s9.removeAttribute("x-airplay-deny"),this.s9.disableRemotePlayback=!1,this.s9.load(),this.d2.tr(),this.Uo=ce.MB()}K3(){this.X3||(Gj(this.s9,i.Ys),this.Z3=!0)}get Jf(){return this.d2.Jf}M9(){const t=this.s9.getClientRects();let i;if(!(t.length>0))return;i=t[0];const e=i.width,s=this.s9.videoWidth/this.s9.videoHeight,n=i.height;let r,h;e/n>s?(r=n*s,h=n):(h=e/s,r=e),this.s9.style.width=r+"px",this.s9.style.height=h+"px",this.s9.style.marginLeft=(e-r)/2+"px",this.s9.style.marginTop=(n-h)/2+"px",this.s9.style.backgroundColor="black"}S9(){this.s9.style.width="100%",this.s9.style.height="100%",this.s9.style.marginLeft="",this.s9.style.marginTop="",this.s9.style.backgroundColor=""}get r_(){return this.s9.videoHeight}get a_(){return this.s9.videoWidth}get Sf(){return this.s9.ended}get Ti(){return this.s9.offsetHeight*i.Ys.c2}get ji(){return this.s9.offsetWidth*i.Ys.c2}get xf(){return!1}get X3(){return this.Z3}get vf(){}get Iu(){}get lt(){}get ya(){return this.N8}get t_(){return this.Pz?this.Pz.t_:ce.MB()}get Bz(){}get nt(){return this.Dl}get Ol(){}get g_(){return!1}set g_(t){}Jz(t,i,e,s,n){}wI(t,i,e,s,n,r,h,o,a){const u=new Pr(t,i,e,s,n,r,h,a,o);return this.Dl.tt(u),this.t3.tt(u),u}Eq(t){}zf(){return jL(this.s9)}get A2(){return"block"===this.s9.style.display}ge(){this.s9.style.display="block"}be(){this.s9.style.display="none"}H3(){}async $n(t){if(t.Rg===I.Qx)throw new g("Not yet implemented");await this.K8.j8();const i=Po(t.Yz,(t=>t.ZA.Rg===ge.RA)),e={kind:Cj.b8,mediaBufferConfigs:t.K$.map((t=>t.Fz)),fairPlaySdkUri:null==i?void 0:i.Mj};return await this.K8.B8(e),this.Pz=Bj.J8(t,this.K8,this.BC,this.s9),this.dq.$n(this.Pz,t),this.s9.setAttribute("x-webkit-airplay","deny"),this.s9.setAttribute("x-webkit-wirelessvideoplaybackdisabled",""),this.s9.disableRemotePlayback=!0,this.s9.preload="none",this.s9.src="https://theo.proxy/"+this.K8.Cx+"/master.m3u8",this.Pz}q3(){}NI(t){this.Dl.it(t),this.t3.it(t)}tP(){for(const t of this.Dl.og.slice())t.gn();this.Dl.tr()}kz(t){}Zz(){return!1}J3(t){t.appendChild(this.s9)}A_(){return this.s9}t2(){}get nP(){return this.dq.nP}set nP(t){this.dq.nP=t}get t5(){}set t5(t){}get z4(){}D_(){}constructor(t,i){super(),this.y9=!0,this.K8=new Oj,this.A9=new jj,this.T9=!0,this.D9=new Rs,this.NB=!1,this.R2=Promise.resolve(),this.B2=new er,this.N9=!0,this.Uo=ce.MB(),this.Z3=!1,this.n9=()=>{this.Ff||this.m9.U<=0||this.wf.U<=0||this.A9.Y8(this.wf.jn(this.wf.U-1),this.m9.jn(this.m9.U-1))},this.r9=()=>{this.Co(new ve(this.Mf))},this.h9=()=>{this.Co(new Dr(this.Mf,this.vf))},this.o9=()=>{this.Co(new Kn(this.Mf,this.Gf))},this.a9=()=>{this.Co(new Tc(this.Mf,this.c_))},this.u9=()=>{this.Co(new os(this.ct))},this.c9=()=>{this.Co(new _e(this.Mf))},this.d9=()=>{this.Dm(this.Mf)},this.l9=async()=>{this.N9&&this.Co(new Qn(this.Mf)),this.T9=!1,this.N9=!0},this.f9=()=>{this.T9=!0,this.Co(new iu(this.Mf))},this.F3=t=>{const i=t.initDataType;var e;const s=null!=(e=t.initData)?e:new ArrayBuffer(0);this.Co(new V(i,s))},this.s9=t,this.d2=new Sh(this),this.s9.playsInline=!0,this.s9.style.width="100%",this.s9.style.height="100%",this.e9(),this.g9(),this.N8=kj(this.s9),this.dq=new sO(this),this.BC=i,this.Dl=new Zi,this.t3=new Hh(this)}},Uj=[f.vm,f.Am];function Qj(t){const i=h.createElement(t);return hn(i)&&i.addEventListener("contextmenu",Vj),Yj(i),i}function Fj(t){Yj(t),t.removeEventListener("contextmenu",Vj)}function Yj(t){t.removeAttribute("id"),t.removeAttribute("class"),t.removeAttribute("style"),O(t),YM(t),t.pause(),t.playbackRate=1,t.disableRemotePlayback=!1,t.preload=pt.ZM,t.controls=!1,t.style.display="none",hn(t)&&(t.style.width="100%",t.style.height="100%",t.style.pointerEvents="none",t.playsInline=!0,t.setAttribute("webkit-playsinline",""))}function Gj(t,i){if(i.I9){const i=t.muted;t.muted=!0,t.muted=!1,t.muted=i}else if(t.paused){const i=t.play();Id(i)&&Ys(i),t.pause()}}function Vj(t){t.preventDefault()}var Wj=class{MS(t){return this.mI.MS(t)}YF(t){this.mI.YF(t)}gn(){this.mI.gn()}constructor(t){this.mI=t}},Hj=class extends Wj{MS(t){const i=new Pc(t),e=this.CB.oW.fz(i);return e?this.E9(i,e):this.mI.MS(i)}async E9(t,e){e.uW(i.Jd()/1e3);const s=await this.mI.MS(t);let n;e.cW(i.Jd()/1e3),n=s.uV?s.rV().pipeThrough(new De(new qj(e))):s.nj().then((t=>{const s=i.Jd()/1e3;return e.dW(s,new j(t)),e.lW(s),t}));const r={Om:n,MS:s.MS};return new jh(r,s)}constructor(t,i){super(t),this.CB=i}},qj=class{start(t){this.xH=t}transform(t){this.b9.dW(i.Jd()/1e3,t),this.xH.enqueue(t)}flush(){this.b9.lW(i.Jd()/1e3)}constructor(t){this.b9=t}};function Xj(t){return{get ratio(){return t.Lo},get thresholds(){return t.L9.slice()}}}function Zj(t){const i=[],e=_.floor(1/t);if(S(e))return[];for(let s=0;s<=e;s++){const e=Pe(s*t,0,1);i.push(e)}return i}var Kj=class{get Lo(){return this.k9}get L9(){return this.C9}x9(t){return i=>{const e=i[i.length-1];this.k9=e.intersectionRatio,t(e.intersectionRatio)}}get va(){return this.Xa||(this.Xa=Xj(this)),this.Xa}y_(){this.O9.disconnect()}constructor(t,i,e){this.k9=1,this.Xa=void 0,this.C9=Zj(i);const n=this.x9(e);this.O9=new s.IntersectionObserver(n,{root:null,threshold:this.C9}),this.O9.observe(t)}},Jj=class{get Lo(){return this.k9}get L9(){return this.C9}get va(){return this.Xa||(this.Xa=Xj(this)),this.Xa}j9(t){this.k9=t;const i=this.C9;let e=0;if(t>0)for(;e<i.length&&i[e]<=t;)++e;this.z9!==e&&(this.z9=e,this.P9(t))}constructor(t,i){this.k9=1,this.z9=-1,this.Xa=void 0,this.C9=Zj(t),this.P9=i}},$j=class extends Jj{B9(){const t=this.yo.getBoundingClientRect();return Pe(_.max(0,_.min(s.innerWidth,t.right)-_.max(0,t.left))*_.max(0,_.min(s.innerHeight,t.bottom)-_.max(0,t.top))/(t.width*t.height),0,1)}y_(){s.removeEventListener("scroll",this.R9)}constructor(t,i,e){super(i,e),this.R9=Is((()=>this.j9(this.B9())),50),this.yo=t,s.addEventListener("scroll",this.R9,!!US&&{passive:!0}),Ac((()=>this.j9(this.B9())))}},tz=.1,iz=class{get U9(){return this.Q9}get zo(){return this.F9}set zo(t){if(S(t)||t<0||t>1)throw new RangeError("The threshold must be a value between 0 and 1");this.F9=t}get va(){return this.Xa||(this.Xa=function(t){return{get ratio(){return t.U9},get visible(){return t.U9>t.zo},get visibleThreshold(){return t.zo},set visibleThreshold(i){i=$h(i),t.zo=i},addObserver:(i,e)=>(i=$h(i),t.Fo(i,e).va),removeObserver(i){let e=t.Y9(i);e&&t.Ro(e)}}}(this)),this.Xa}G9(t){return i=>{this.Q9=i,null==t||t(this.Q9)}}Fo(t,i){if(S(t))throw new b("step is not of the right type");if(t>1||t<=0)throw new RangeError("The step must be a number greater than 0 and smaller than or equal to 1");let e;return e="function"==typeof s.IntersectionObserver?new Kj(this.yo,t,this.G9(i)):new $j(this.yo,t,this.G9(i)),this.V9.push(e),e}Ro(t){t.y_(),_s(this.V9,t)}Y9(t){for(const i of this.V9)if(i.va===t)return i}gn(){for(const t of this.V9)t.y_();No(this.V9)}constructor(t){this.Q9=1,this.F9=0,this.V9=[],this.Xa=void 0,this.yo=t,this.Fo(.1,this.G9())}},ez=class extends Yi{constructor(){super(Co.qg)}},sz=class{get W9(){return this.H9}set W9(t){this.H9=t}get va(){var t;return null!=(t=this.Xa)?t:this.Xa=function(t){return{get conviva(){var i;return null==(i=t.W9)?void 0:i.va}}}(this)}gn(){this.H9=void 0}};var nz=class extends Ut{get q9(){return this.CB}get pT(){return this.X9}set pT(t){this.X9=t,this.Z9.pT=t}get K9(){return this.J9}get ht(){return this.Z9.ht}get aQ(){return this.t7}get Iu(){return this.i7}get kf(){return this.Z9.kf}get jf(){return this.e7}get SU(){return this.s7}get nt(){return this.Z9.nt}get Ol(){return this.OB}get rt(){return this.Z9.rt}get wf(){return this.Af()}Af(){return this.Z9.wf}get n7(){return this.RW}get JW(){return this.$W}get Mf(){return this.Tf()}set Mf(t){this.Nf(t)}Tf(){return this.Z9.Mf}Nf(t){this.Z9.Mf=t}r7(){return this.Tf()}get vf(){return this.Z9.vf}set vf(t){this.Z9.vf=t}get bt(){return this.Z9.bt}get ct(){return this.Td()}Td(){return this.Z9.ct}get we(){return this.Z9.we}get Sf(){return this.Z9.Sf}get lt(){return this.Ef()}Ef(){return this.Z9.lt}get bf(){return this.Lf()}Lf(){return this.Z9.bf}get ya(){return this.Z9.w_()}get g_(){return this.Z9.g_}set g_(t){this.Z9.g_=t}get Pf(){return this.Z9.Pf}set Pf(t){const i=Boolean(t);this.Rf(i)}Rf(t){this.Z9.Pf=t,t||this.Ff||this.v_()}get Ff(){return this.Z9.Ff}get Gf(){return this.Z9.Gf}set Gf(t){this.Z9.Gf=t}get Hf(){return this.qf()}qf(){return this.Z9.Hf}get Xf(){return this.Z9.Xf}set Xf(t){this.Z9.Xf=t}get Jf(){return this.Z9.Jf}get t_(){return this.i_()}i_(){return this.Z9.t_}get e_(){return this.Z9.e_}get Mg(){return this.ET}get r_(){return this.Z9.r_}get a_(){return this.Z9.a_}get c_(){return this.Z9.c_}set c_(t){const i=Pe(Number(t),0,1)||0;this.l_(i)}get f_(){return this.xB}l_(t){this.Z9.c_=t}ka(){ru(this,oD,this)}p_(){this.Z9.p_()}m_(){this.Z9.m_()}Wa(){return this.QP}async ga(t,i){if(this.QP=t,t){this.h7.qQ(t).catch(this.o7);const e=function(t){t.sources;const i=t.sources.filter((t=>Sa(t.integration)));0;return t.sources=i,t}(t);await this.Z9.ga(e,i)}}v_(){if(this.bo)return;this.Z9.v_(),this.J9.v_();const t=this.we.getElementsByTagName("video");for(let e=0;e<t.length;e++){const s=t[e];"Advertisement"===s.title&&Gj(s,i.Ys)}this.bo=!0}cs(){return this.a7.qo()===nD.FULLSCREEN}ge(){this.Z9.ge()}be(){this.Z9.be()}A_(){return this.Z9.A_()}D_(){this.Z9.D_()}S_(){this.Z9.S_()}async y_(){this.QP=void 0,await this.Z9.y_(),await this.Z9.tr()}async gn(){this.Co(new ez),this.Vo(),this.t7.gn(),this.uO.gn(),this.s7.gn(),this.u7.gn(),this.d7.gn(),this.a7.gn(),this.i7.gn(),this.l7.gn(),this.f7.gn(),this.J9.gn(),this.kB.gn(),await this.Z9.gn()}constructor(t,e,s){super(),this.X9=!1,this.bo=!1,this.QP=void 0,this._7=!1,this.l7=new sz,this.ba=void 0,this.o7=t=>{if(this._7)return;this._7=!0;const i=this.g7,e=Zr(t);this.Z9.fg=new GN(this.we,e,t),Ys(i.gn())},this.w7=t=>{t.type!==Co._w&&t.type!==Co.fw&&this.Co(t)};const n=$h(e.uid);S(n)?this.ET=Zw++:this.ET=n,this.wd=e;const r=i.uO,h=new VL;this.f7=new ES("7.10.0",r,h),this.CB=new IL,this.xB=new Ti;const o=new Hj(r,this.CB);this.uO=new wL(o,e.allowMixedContent),this.SH=null!=s?s:new dS(e.isEmbeddable,"7.10.0",hS()),this.h7=new GL(r,this.SH,this.f7,h,e,hS()),this.h7.yH().catch(this.o7),this.i7=new WS(t),this.i7.yn(Tn.pn,this.Ds),this.OB=new ZL,this.RW=new LL,this.$W=new CL;const a=new YN(t,e,this.uO,this.CB,this.xB,this.i7,this.OB);this.CB.MW(a);let u=a;u=new kL(u,this.n7),u=new xL(u,this.JW),this.g7=u,this.Z9=new Yw(this.g7),this.Z9.sf(this.w7),this.e7=new OL(this.Z9),this.s7=new mL(this.Z9,this.uO,this.CB),this.u7=new xS(this),this.d7=new KS(this.Z9,e.allowNativeFullscreen),this.a7=new hD(this.d7),this.i7.bn(),this.Bo=new iz(t),this.kB=new km(this.i7,this.OB,1,[f.Am]),this.J9=new Cm(this.kB),this.t7=new BL}};var Zo,rz=class extends Ut{get q9(){return this.A7()}A7(){return this.Qo.q9}get Oc(){return this.v7()}v7(){return this.Qo.Oc}get l7(){return this.Qo.l7}get f7(){return this.Qo.f7}get K9(){return this.m7()}m7(){return this.Qo.K9}get pT(){return this.Qo.pT}set pT(t){this.Qo.pT=t}get u7(){return this.Qo.u7}get aQ(){return this.Qo.aQ}get n7(){return this.Qo.n7}get wd(){return this.Qo.wd}get Iu(){return this.Qo.Iu}get ya(){return this.w_()}w_(){return this.Qo.ya}get uO(){return this.Qo.uO}get f_(){return this.Qo.f_}get h7(){return this.Qo.h7}get JW(){return this.Qo.JW}get SU(){return this.Qo.SU}get a7(){return this.Qo.a7}get i7(){return this.Qo.i7}get Z9(){return this.Qo.Z9}get Ol(){return this.Qo.Ol}get p7(){return this.y7()}y7(){return this.Qo.p7}get Mg(){return this.Qo.Mg}get Bo(){return this.Qo.Bo}get ht(){return this.lf()}lf(){return this.Qo.ht}Af(){return this.Qo.Af()}get vf(){return this.mf()}set vf(t){this.pf(t)}mf(){return this.Qo.vf}pf(t){this.Qo.vf=t}get bt(){return this.yf()}yf(){return this.Qo.bt}Tf(){return this.Qo.Tf()}Nf(t){this.Qo.Nf(t)}r7(){return this.Qo.r7()}Td(){return this.Qo.Td()}get we(){return this.Df()}Df(){return this.Qo.we}get Sf(){return this.If()}If(){return this.Qo.Sf}Ef(){return this.Qo.Ef()}Lf(){return this.Qo.Lf()}get kf(){return this.Cf()}Cf(){return this.Qo.kf}get g_(){return this.Qo.g_}set g_(t){this.Qo.g_=t}get jf(){return this.zf()}zf(){return this.Qo.jf}get Pf(){return this.Bf()}set Pf(t){this.Rf(t)}Bf(){return this.Qo.Pf}Rf(t){this.Qo.Rf(t)}get Ff(){return this.Yf()}Yf(){return this.Qo.Ff}get Gf(){return this.Vf()}set Gf(t){this.Wf(t)}Vf(){return this.Qo.Gf}Wf(t){this.Qo.Gf=t}qf(){return this.Qo.qf()}get Xf(){return this.Zf()}set Xf(t){this.Kf(t)}Zf(){return this.Qo.Xf}Kf(t){this.Qo.Xf=t}get Jf(){return this.$f()}$f(){return this.Qo.Jf}get ba(){return this.Qo.ba}set ba(t){this.Qo.ba=t}i_(){return this.Qo.i_()}get e_(){return this.s_()}s_(){return this.Qo.e_}get nt(){return this.n_()}n_(){return this.Qo.nt}get r_(){return this.h_()}h_(){return this.Qo.r_}get rt(){return this.o_()}o_(){return this.Qo.rt}get a_(){return this.u_()}u_(){return this.Qo.a_}get c_(){return this.d_()}set c_(t){this.l_(t)}d_(){return this.Qo.c_}l_(t){this.Qo.l_(t)}v_(){this.Qo.v_()}m_(){this.Qo.m_()}p_(){this.Qo.p_()}ge(){this.Qo.ge()}be(){this.Qo.be()}cs(){return this.Qo.cs()}A_(){return this.Qo.A_()}D_(){this.Qo.D_()}S_(){this.Qo.S_()}ka(){this.Qo.ka()}Wa(){return this.Qo.Wa()}ga(t,i){return this.Qo.ga(t,i)}y_(){return this.Qo.y_()}E_(t){return!1}RP(){this.M7&&this.Qo.sf(this.b_)}UP(){this.M7&&this.Qo.cf(this.b_)}async gn(t){this.Vo(),t||await this.Qo.gn(),this.UP()}constructor(t,i){super(),this.b_=t=>{this.E_(t)||this.Co(t)},this.Qo=t,this.M7=!i,this.RP()}};!function(t){t[t.Za=0]="Za",t[t.T7=1]="T7",t[t.N7=2]="N7",t[t.D7=3]="D7",t[t.S7=4]="S7"}(Zo||(Zo={}));var hz=[0,1,2,3,4],oz={};function Z(t,i){(oz[i]||(oz[i]=[])).push(t)}var az={};function go(t,i){(az[i]||(az[i]=[])).push(t)}var uz=[];function cz(t){for(const i of uz)i(t)}var dz=self.CustomEvent;var lz=function(){try{const t=new dz("cat",{detail:{foo:"bar"}});return"cat"===t.type&&"bar"===t.detail.foo}catch(t){}return!1}()?function(t,i){return new CustomEvent(t,i)}:function(t,i){const e=h.createEvent("CustomEvent");return e.initCustomEvent(t,(null==i?void 0:i.bubbles)||!1,(null==i?void 0:i.cancelable)||!1,null==i?void 0:i.detail),e};var fz=new class{get U(){return this.AT.length}get va(){var t;return null!=(t=this.Xa)?t:this.Xa=function(t){const i=[];for(let e=0;e<t.U;e++)i[e]=t.cg(e).va;return i.getPlayerByUID=i=>{const e=t.I7(i);return e&&e.va},i}(this)}cg(t){return this.AT[t]}Vq(t){this.AT.push(t),this.va.push(t.va)}TT(t){const i=this.AT.indexOf(t);i<0||(si(this.AT,i),this.Xa&&si(this.Xa,i))}I7(t){for(const i of this.AT)if(i.Mg===t)return i}constructor(){this.AT=[],this.Xa=void 0}};var Ki,_z=class extends Yi{constructor(t){super(Co.lo),this.source=t}},gz=class extends Ut{get vf(){}set vf(t){}get Mf(){return this.Tf()}set Mf(t){this.Nf(t)}Tf(){return this.TB}r7(){return this.Tf()}Nf(t){this.NB&&this.TB===t||(this.TB=t,this.NB=!0,this.Co(new lo(this.TB)))}get Ff(){return this.SB}get Gf(){return this.IB}set Gf(t){this.IB!==t&&(this.IB=t,this.Co(new Kn(this.TB,this.Gf)))}get Jf(){return oe.sT}get e_(){return this.NB}p_(){this.SB&&(this.SB=!1,this.Co(new Qn(this.TB)),this.Co(new qa(this.TB)))}m_(){this.SB||(this.SB=!0,this.Co(new Dr(this.TB,this.vf)),this.Co(new iu(this.TB)))}tr(){this.TB=0,this.NB=!1,this.IB=1,this.m_()}gn(){this.Vo()}be(){}ge(){}constructor(){super(),this.TB=0,this.SB=!0,this.NB=!1,this.IB=1}},wz={zIndex:"1",display:"inline-block",verticalAlign:"middle",backgroundRepeat:"no-repeat",backgroundPosition:"50% 50%",backgroundSize:"contain",cursor:"pointer",margin:"0",padding:"0",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",height:"100%"},Az={visibility:"hidden"},vz={visibility:"visible"},mz=class{get zu(){return void 0!==this.E7?this.E7:void 0!==this.b7?this.b7:void 0}set L7(t){this.b7=t,this.Yn()}Yn(){const t=this.Qo.Ff,i=this.k7;this.zu?this.Us.style.backgroundImage='url("'+jf(this.zu)+'")':this.Us.style.backgroundImage="",t&&this.zu&&!i?this.ge():this.be()}ge(){mt(Az,this.Qo.we),mt(vz,this.Us)}be(){mt(Az,this.Us),mt(vz,this.Qo.we)}RP(){this.Qo.yn(Co.lo,this.C7),this.Qo.yn(Co.jh,this.sO)}gn(){this.Qo.fn(Co.lo,this.C7),this.Qo.fn(Co.jh,this.sO),hs(this.Us)}constructor(t){this.k7=!1,this.C7=t=>{var i;this.k7=!this.Qo.Ff,this.E7=null==(i=t.source)?void 0:i.poster,this.Yn()},this.sO=()=>{this.k7=!0,this.be()},this.Qo=t,this.RP(),this.Us=function(){let t=Qr&&Qr.document&&Qr.document.createElement("div");return t.className="theoplayer-poster",mt(wz,t),t}(),t.we.appendChild(this.Us)}};function Xh(t){let i;const e={get playing(){return t.Fc},get currentAds(){return t.x7.map((t=>t.O7()))},get currentAdBreak(){var i,e;return null!=(e=null==(i=t.j7)?void 0:i.O7())?e:null},get scheduledAds(){return t.z7.map((t=>t.O7()))},get scheduledAdBreaks(){return t.P7.map((t=>t.O7()))},skip(){t.Vm()},schedule(i){let e=FD(i,He.yb);e?t.Z1(e,Ki.B7,!1):console.error("Invalid ad description")},registerServerSideIntegration(i,e){t.R7(i,e)},addEventListener(t,e){i.yn(t,e)},removeEventListener(t,e){i.fn(t,e)}};return i=new ka(t,e),e}!function(t){t[t.B7=0]="B7",t[t.U7=1]="U7"}(Ki||(Ki={}));var zc=class extends Ao{constructor(t,i){super(t),this.Xl=i}},qc=class extends Yi{get ad(){return this.adBreak}constructor(t,i){super(t),this.adBreak=i}},pz=class extends zc{fa(){return new yz(this.Xl.O7())}constructor(t){super("Q7",t)}},yz=class extends qc{constructor(t){super("removeadbreak",t)}},cr=class extends zc{fa(){return new Mz(this.Xl.O7())}constructor(t){super("F7",t)}},Mz=class extends qc{constructor(t){super("addadbreak",t)}},Gs=class extends Ao{constructor(t,i){super(t),this.Y7=i}},Xn=class extends Yi{constructor(t,i){super(t),this.ad=i}},Tz=class extends Gs{fa(){return new Nz(this.Y7.O7())}constructor(t){super("G7",t)}},Nz=class extends Xn{constructor(t){super("addad",t)}},Vi=class extends zc{fa(){return new Dz(this.Xl.O7())}constructor(t){super("V7",t)}},Dz=class extends qc{constructor(t){super("adbreakend",t)}},Ko=class extends zc{fa(){return new Sz(this.Xl.O7())}constructor(t){super("W7",t)}},Sz=class extends qc{constructor(t){super("adbreakbegin",t)}},Re=class extends Gs{fa(){return new Iz(this.Y7.O7(),this.currentTime)}constructor(t,i){super("H7",t),this.currentTime=i}},Iz=class extends Xn{constructor(t,i){super("adbegin",t),this.currentTime=i}},vo=class extends Gs{fa(){return new Ez(this.Y7.O7(),this.currentTime)}constructor(t,i){super("q7",t),this.currentTime=i}},Ez=class extends Xn{constructor(t,i){super("adend",t),this.currentTime=i}},Uo=class extends Ao{fa(){return new bz}constructor(){super("X7")}},bz=class extends Yi{constructor(){super("adadded")}},la=class extends Ut{get Fc(){return!!this.Ic&&this.Ic.Fc}get x7(){return this.Ic?this.Ic.x7:[]}get j7(){return this.Ic?this.Ic.j7:null}get z7(){return this.Ic?this.Ic.z7:[]}get P7(){return this.Ic?this.Ic.P7:[]}Z1(t,i,e){var s;null==(s=this.Ic)||s.Z1(t,i,e)}Z7(t){var i;null==(i=this.Ic)||i.Z7(t)}Vm(){var t;null==(t=this.Ic)||t.Vm()}K7(t){var i;null==(i=this.Ic)||i.K7(t)}R7(t,i){var e;null==(e=this.Ic)||e.R7(t,i)}get va(){var t;return null!=(t=this.Xa)?t:this.Xa=Xh(this)}get fg(){return this.Ic}set fg(t){const i=this.Ic;if(i===t)return;const e=this.x7,s=this.j7,n=this.z7,r=this.P7;null==i||i.cf(this.Ds),this.Ic=t,null==t||t.sf(this.Ds);const h=this.x7,o=this.j7,a=this.z7,u=this.P7,c=[];let d=!1;for(const t of r)ae(u,t)||c.push(new pz(t));for(const t of u)ae(r,t)||c.push(new cr(t));for(const t of a)ae(n,t)||(c.push(new Tz(t)),d=!0);d&&c.push(new Uo),s!==o&&(s&&c.push(new Vi(s)),o&&c.push(new Ko(o)));for(const t of e)ae(h,t)||c.push(new vo(t,this.Qo.Tf()));for(const t of h)ae(e,t)||c.push(new Re(t,this.Qo.Tf()));for(const t of c)this.Co(t)}gn(){var t;return this.Vo(),null==(t=this.Ic)||t.cf(this.Ds),this.Ic=void 0,Promise.resolve()}constructor(t){super(),this.Xa=void 0,this.Qo=t}},Lz=class extends Ut{get Fc(){return!1}get x7(){return[]}get j7(){return null}get z7(){return[]}get P7(){return[]}Z1(t,i,e){this.J7.push({ttt:t,itt:i,ett:e})}Vm(){}K7(t){}R7(t,i){this.stt.push({qA:t,ntt:i})}get va(){var t;return null!=(t=this.Xa)?t:this.Xa=Xh(this)}Z7(t){const i=this.stt.slice(),e=this.J7.slice();this.tr();for(const e of i)t.R7(e.qA,e.ntt);for(const i of e)t.Z1(i.ttt,i.itt,i.ett)}htt(){const t=this.J7.map((t=>t.ttt));return this.tr(),t}tr(){No(this.stt),No(this.J7)}gn(){return this.Vo(),this.tr(),Promise.resolve()}constructor(...t){super(...t),this.Xa=void 0,this.stt=[],this.J7=[]}};function kz(t){return class extends Ut{get f7(){return this.ott.f7}get Oc(){return this.Ic}get l7(){return this.ott.l7}get u7(){return this.ott.u7}get wd(){return this.ott.wd}get uO(){return this.ott.uO}get ya(){return this.ott.ya}get a7(){return this.ott.a7}get i7(){return this.ott.i7}get Z9(){return this.ott.Z9}get q9(){return this.ott.q9}get pT(){return this.ott.pT}set pT(t){this.ott.pT=t,this.att()}get K9(){return this.ott.K9}get ht(){return this.ott.ht}get aQ(){return this.ott.aQ}get Iu(){return this.ott.i7}get va(){return this.Xa||(this.Xa=this.fa()),this.Xa}get kf(){return this.ott.kf}get g_(){return this.ott.g_}set g_(t){this.ott.g_=t}get jf(){return this.ott.jf}get SU(){return this.ott.SU}get nt(){return this.ott.nt}get Ol(){return this.ott.Ol}get rt(){return this.ott.rt}get n7(){return this.ott.n7}get JW(){return this.ott.JW}get vf(){return this.Qo.vf}set vf(t){this.Qo.vf=t}get bt(){return this.ott.bt}get we(){return this.ott.we}get Sf(){return this.ott.Sf}get Pf(){return this.ott.Pf}set Pf(t){this.Rf(t)}get Ff(){return this.Qo.Ff}get mi(){return this.utt.zu||""}set mi(t){this.utt.L7=t}get Gf(){return this.ott.Gf}set Gf(t){this.Qo.Gf=t}get Xf(){return this.ott.Xf}set Xf(t){this.ott.Xf=t}get Jf(){return this.Qo.Jf}get ba(){return this.ott.ba}set ba(t){this.ott.ba=t}get e_(){return this.Qo.e_}get p7(){return this.ott.p7}get Mg(){return this.ott.Mg}get r_(){return this.ott.r_}get a_(){return this.ott.a_}get c_(){return this.ott.c_}set c_(t){this.l_(t)}get f_(){return this.ott.f_}get h7(){return this.ott.h7}get Bo(){return this.ott.Bo}async wx(t,i){return this.gq.wx(t,i).catch(Ah)}async ctt(t,i){fo(i),this.ott.sf(this.dtt);try{await this.ott.ga(t,i)}finally{this.ott.cf(this.dtt)}}async att(){const t=await this.ltt();this.ftt(t)}async ltt(){const t=this.Wa();return t&&!Mn(t)&&this.pT&&this.Ff?this.K9._tt(this.Pf):"none"}ftt(t){var i;const e=(null==(i=this.Wa())?void 0:i.mutedAutoplay)||this.wd.mutedAutoplay;switch(t){case"all":this.gtt();break;case"muted":(this.Pf||e===zw.ALL)&&(this.Pf=!0,this.p_())}}ga(t){Mn(this.QP)||this.Co(new Ow(0,oe.sT)),this.tr(),this.QP=t,Ys(this.wx((async i=>{fo(i);try{await this.ctt(t,i)}catch(t){return Kc(t),this.QP=void 0,void this.yP(c_(t,td.SOURCE_NOT_SUPPORTED))}finally{this.wtt(this.ott)}const e=await this.ltt();this.Co(new _z(this.Wa())),this.ftt(e)})))}Nf(t){this.Qo.Nf(t)}Ef(){var t;return null!=(t=this.RB)?t:this.ott.Ef()}Lf(){var t;return null!=(t=this.xz)?t:this.ott.Lf()}yP(t){void 0===this.Lf()&&(this.xz=t,this.RB=Zr(t),this.Co(new fh(t)))}p_(){this.Qo.p_()}gtt(){this.Pf||this.v_(),this.p_()}v_(){this.ott.v_()}m_(){this.Qo.m_()}y_(){this.ga(void 0)}ge(){this.VP=!0,this.Qo.ge()}be(){this.VP=!1,this.Qo.be()}ka(){this.ott.ka()}l_(t){this.ott.l_(t)}Rf(t){this.ott.Rf(t)}wa(t){this.Att=t,t.Vq(this)}cs(){return this.ott.cs()}Wa(){return this.QP}A_(){return this.ott.A_()}Tf(){return this.Qo.Tf()}r7(){return this.Qo.r7()}Td(){return this.ott.Td()}Af(){return this.ott.Af()}qf(){return this.ott.qf()}i_(){return this.ott.i_()}D_(){this.ott.D_()}S_(){this.ott.S_()}tr(){this.QP=void 0,this.xz=void 0,this.RB=void 0,this.mtt=!0,No(this.ptt),this.ytt.tr(),this.wtt(this.ytt),this.gq.Xd(),Ys(this.gq.wx((async t=>{fo(t),await this.ott.y_()})))}gn(){this.Co(new ez),this.utt.gn(),this.UP(),this.tr(),Ys(this.wx((async()=>{await this.ott.gn(),this.Att&&(this.Att.TT(this),this.Att=void 0),this.gq.gn()}))),this.Vo()}wtt(t){if(this.Qo===t)return;const i=this.Qo.Ff,e=this.Qo.Tf(),s=this.Qo.Gf,n=this.Qo.Jf,r=this.Qo.e_;this.Mtt=i,this.i5=n,this.UP(),t.sf(this.Ttt),t===this.ott?(void 0!==this.Ic&&(this.Ic.fg=t.Oc,this.Ntt.Z7(this.Ic)),(r||t.Tf()!==e)&&t.Nf(e),t.Gf!==s&&(t.Gf=s),i?t.m_():t.p_()):(void 0!==this.Ic&&(this.Ic.fg=this.Ntt,this.Ntt.tr()),this.wd.retainPlaybackRateOnSourceChange?t.Gf=s:1!==s&&this.Co(new Kn(this.Tf(),1))),t.cf(this.Ttt),this.Qo=t,this.RP();for(const t of this.ptt)this.Co(t);No(this.ptt),this.VP?t.ge():t.be()}RP(){this.Qo.sf(this.I_)}UP(){this.Qo.cf(this.I_)}fa(){return function(t){let i,e;const s=i=>{e=i;const s=Ms(i,t.wd);t.ga(s)};let n={get abr(){return t.q9.va},get ads(){var i;return null==(i=t.Oc)?void 0:i.va},get analytics(){return t.l7.va},get audioTracks(){return t.ht.va},get autoplay(){return t.pT},set autoplay(i){t.pT=Boolean(i)},get buffered(){return t.Af()},get canvas(){return t.u7.va},get cast(){var i;return null==(i=t.aQ)?void 0:i.va},get clip(){return t.n7.va},get currentProgramDateTime(){var i;return null!=(i=t.vf)?i:null},set currentProgramDateTime(i){t.vf=null!=i?i:void 0},get currentTime(){return t.Tf()},set currentTime(i){t.Nf(Number(i))},get duration(){return t.Td()},get element(){return t.we},get ended(){return t.Sf},get error(){return t.Ef()},get errorObject(){return t.Lf()},get loop(){return t.JW.JW},set loop(i){t.JW.JW=Boolean(i)},get metrics(){return t.jf.va},get muted(){return t.Pf},set muted(i){t.Rf(i)},get network(){return t.SU.va},get paused(){return t.Ff},get playbackRate(){return t.Gf},set playbackRate(i){const e=Number(i);if(e<0)throw new RangeError("playbackRate must be a positive number");t.Gf=e},get played(){return t.qf()},get poster(){return t.mi},set poster(i){t.mi=jo(i)},get preload(){return t.Xf},set preload(i){t.Xf=function(t){switch(t){case"auto":case"":return"auto";case"metadata":return"metadata";default:return"none"}}(i)},get presentation(){return t.a7.va},get readyState(){return t.Jf},get seekable(){return t.i_()},get seeking(){return t.e_},get source(){return e},set source(t){s(t)},get src(){return OD(t.Wa())},set src(t){s({sources:t})},get textTracks(){return t.nt.va},get textTrackStyle(){return t.Ol.va},get theoLive(){return t.p7},get uid(){return t.Mg},get videoHeight(){return t.r_},get videoTracks(){return t.rt.va},get videoWidth(){return t.a_},get visibility(){return t.Bo.va},get volume(){return t.c_},set volume(i){t.l_(Number(i))},get latency(){return t.f_.va},destroy(){t.gn(),t=null,e=void 0},play(){t.gtt()},pause(){t.m_()},stop(){e=void 0,t.y_()},prepareWithUserAction(){t.v_()},addEventListener(t,e){i.yn(t,e)},removeEventListener(t,e){i.fn(t,e)},setSource(t){s(t)}};return i=new Eu(n,!0),i.Qa(t),i.yn("destroy",(()=>{i.gn()})),n}(this)}constructor(i,e){super(),this.Mtt=!0,this.i5=oe.sT,this.mtt=!1,this.QP=void 0,this.xz=void 0,this.RB=void 0,this.dtt=t=>{t.type!==Co.ww&&this.ptt.push(t)},this.Ttt=t=>{(t.type!==Co.jh||this.Qo.Ff)&&(t.type===Co.Sh&&this.Qo.Ff||t.type===Co.yw&&this.Qo.e_&&this.Qo.Tf()===t.currentTime||t.type===Co.ww&&this.Qo.Gf===t.playbackRate||this.Co(t))},this.I_=t=>{if(this.mtt){if(t.type===Zt.Bw)return;t.type!==Zt.Ow&&t.type!==Zt.Rw||(this.mtt=!1)}if(t.type===Co.jh){if(!this.Mtt)return;this.Mtt=!1}else if(t.type===Co.Sh){if(this.Mtt)return;this.Mtt=!0}else if(t.type===Zt.H_){if(this.i5===t.readyState)return;this.i5=t.readyState}else if(t.type===Co.qg)return;this.Co(t)},this.ott=new t(i,e),this.ytt=new gz,this.Qo=this.ott,this.utt=new mz(this),this.ott.Oc&&(this.Ic=new la(this),this.Ic.fg=this.ott.Oc,this.Ntt=new Lz),this.gq=new ls,this.ptt=[],this.VP=!0,this.RP()}}}var Cz,xz=class extends Yi{constructor(t){super("tizen2retry"),this.originalErrorEvent=t}};function Oz(){if(!Cz){let t=nz;t=function(t){return class extends rz{constructor(i,e){let s=new t(i,e);for(const t of hz)if(az[t])for(const i of az[t])s=i(s);super(s)}}}(t);let i=kz(t);fi.pE&&fi.ME<3&&(i=function(t){return class extends t{ga(t){this.Dtt=0,super.ga(t)}Co(t){if(t.type===ut.ha&&this.Dtt<3)return this.Dtt++,super.Co(new xz(t)),void super.ga(this.Wa());super.Co(t)}constructor(...t){super(...t),this.Dtt=0}}}(i)),i=function(t){let i=t;for(const t of hz)if(oz[t])for(const e of oz[t])i=e(i);return i}(i),Cz=i}return Cz}function jz(t,i){const e=Rw(i),s=new(Oz())(t,e);s.ba=s;let n=s.va;return s.ka(),s.wa(fz),w.defineProperty(n,"constructor",{value:jz}),n=ql(n),cz(s),n}Ac((()=>{self.dispatchEvent&&self.dispatchEvent(lz("theoplayerready"))}));var zz={base64:new class{encode(t){return jc(t)}decode(t){return Ae(t)}}},Pz=JSON.parse('["dash","hls","chromecast","ads","theoads","airplay","yospace","spotx","vr","vr-webxr","conviva","cache","webaudio","youbora","mediamelon","moat","google-dai","streamone","lcevc","freewheel","agama","verizonmedia","mediatailor","ui","relatedcontent","social","upnext","contextmenu","texttrackstyle-ui","activequalitylabel","upcomingadnotification"]');function Bz(t,i){for(var e=0;e<i.length;e++){var s=i[e];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),w.defineProperty(t,s.key,s)}}function Rz(t,i){var e=function(t,i){var e=t.length;if(e<=1)return t;for(var s=new Array(e),n=1;n<e;n*=2){Uz(t,i,n,s);var r=t;t=s,s=r}return t}(t,i);return e!==t&&Uz(e,null,t.length,t),t}function Uz(t,i,e,s){var n,r,h,o,a,u=t.length,c=0,d=2*e;for(n=0;n<u;n+=d)for(h=(r=n+e)+e,r>u&&(r=u),h>u&&(h=u),o=n,a=r;;)if(o<r&&a<h)i(t[o],t[a])<=0?s[c++]=t[o++]:s[c++]=t[a++];else if(o<r)s[c++]=t[o++];else{if(!(a<h))break;s[c++]=t[a++]}}var Qz=/[a-zA-Z]/,Fz=/[0-9]/,Yz=/[0-9a-fA-F]/,Gz=/^0x/i,Vz=/^[0-9]+$/,Wz=/^[0-9a-fA-F]+$/,Hz=/^[0-7]+$/,qz=w.prototype.toString,Xz=Array.isArray||function(t){return"[object Array]"===qz.call(t)},Zz="undefined"!=typeof Symbol&&"symbol"==typeof Symbol.iterator;function Kz(t){return Xz(t)?t:Array.from(t)}function Jz(t,i,e){var s=t[i];t[i]=t[e],t[e]=s}function $z(t){return t>=65&&t<=90}function tP(t){return $z(t)||function(t){return t>=97&&t<=122}(t)}function iP(t){return t>=48&&t<=57}function eP(t){return iP(t)||tP(t)}function sP(t){return iP(t)||t>=65&&t<=70||t>=97&&t<=102}function nP(t){return $z(t)?t+32:t}function rP(t){return iP(t)?t-48:t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:-1}function hP(t,i){return void 0===i&&(i=!1),0<=t&&t<=9?t+48:10<=t&&t<=15?t+(i?87:55):-1}var oP=_.min,aP=String.fromCharCode,uP=16384;function cP(t){for(var i=t.length,e=[],s=0;s<i;s+=uP){var n=oP(s+uP,i);e.push(aP.apply(null,t.slice(s,n)))}return e.join("")}var dP=2147483647,lP=/[^\0-\x7E]/,fP=/[\x2E\u3002\uFF0E\uFF61]/g,_P={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},gP=_.floor,wP=String.fromCharCode;function AP(t){throw new RangeError(_P[t])}function vP(t){for(var i=[],e=0,s=t.length;e<s;){var n=t.charCodeAt(e++);if(n>=55296&&n<=56319&&e<s){var r=t.charCodeAt(e++);56320==(64512&r)?i.push(((1023&n)<<10)+(1023&r)+65536):(i.push(n),e--)}else i.push(n)}return i}var mP,pP,Lo,yP=function(t,i){return t+22+75*(t<26)-((0!=i)<<5)},MP=function(t,i,e){var s=0;for(t=e?gP(t/700):t>>1,t+=gP(t/i);t>455;s+=36)t=gP(t/35);return gP(s+36*t/(t+38))},TP=function(t){return function(t,i){var e=t.split("@"),s="";e.length>1&&(s=e[0]+"@",t=e[1]);var n=function(t,i){for(var e=[],s=t.length;s--;)e[s]=i(t[s]);return e}((t=t.replace(fP,".")).split("."),i).join(".");return s+n}(t,(function(t){return lP.test(t)?"xn--"+function(t){for(var i=[],e=(t=vP(t)).length,s=128,n=0,r=72,h=0,o=t;h<o.length;h++){var a=o[h];a<128&&i.push(wP(a))}var u=i.length,c=u;for(u&&i.push("-");c<e;){for(var d=dP,l=0,f=t;l<f.length;l++){var _=f[l];_>=s&&_<d&&(d=_)}var g=c+1;d-s>gP((dP-n)/g)&&AP("overflow"),n+=(d-s)*g,s=d;for(var w=0,A=t;w<A.length;w++){var v=A[w];if(v<s&&++n>dP&&AP("overflow"),v==s){for(var m=n,p=36;;p+=36){var y=p<=r?1:p>=r+26?26:p-r;if(m<y)break;var M=m-y,T=36-y;i.push(wP(yP(y+M%T,0))),m=gP(M/T)}i.push(wP(yP(m,0))),r=MP(n,g,c==u),n=0,++c}}++n,++s}return i.join("")}(t):t}))};function wt(t){for(var i=[],e=0;e<t.length;e++){var s=t[e];s>65535&&(s-=65536,i.push(s>>>10&1023|55296),s=56320|1023&s),i.push(s)}return cP(i)}function NP(t){if(t>=55296&&t<=57343)throw new g("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function DP(t,i){return t>>i&63|128}function SP(t,i){0!=(4294967168&t)?(0==(4294965248&t)?i.push(t>>6&31|192):0==(4294901760&t)?(NP(t),i.push(t>>12&15|224),i.push(DP(t,6))):0==(4292870144&t)&&(i.push(t>>18&7|240),i.push(DP(t,12)),i.push(DP(t,6))),i.push(63&t|128)):i.push(t)}function IP(t){for(var i=[],e=0;e<t.length;e++){SP(t[e],i)}return i}function EP(){if(Lo>=pP)throw new g("Invalid byte index");var t=255&mP[Lo];if(Lo++,128==(192&t))return 63&t;throw new g("Invalid continuation byte")}function bP(){var t,i;if(Lo>pP)throw new g("Invalid byte index");if(Lo===pP)return!1;if(t=255&mP[Lo],Lo++,0==(128&t))return t;if(192==(224&t)){if((i=(31&t)<<6|EP())>=128)return i;throw new g("Invalid continuation byte")}if(224==(240&t)){if((i=(15&t)<<12|EP()<<6|EP())>=2048)return NP(i),i;throw new g("Invalid continuation byte")}if(240==(248&t)&&(i=(7&t)<<18|EP()<<12|EP()<<6|EP())>=65536&&i<=1114111)return i;throw new g("Invalid UTF-8 detected")}function LP(t){return[37,hP(t>>4),hP(15&t)]}function kP(t){return function(t){return t>=0&&t<=31}(t)||t>126}function CP(t){return kP(t)||32===t||34===t||60===t||62===t||96===t}function xP(t){return CP(t)||35===t||63===t||123===t||125===t}function OP(t){return xP(t)||47===t||58===t||59===t||61===t||64===t||t>=91&&t<=94||124===t}function jP(t){return t<33||t>126||34===t||35===t||60===t||62===t}function zP(t){return jP(t)||39===t}function PP(t,i){if(!i(t))return[t];for(var e=IP([t]),s=[],n=0;n<e.length;n++){var r=e[n];s.push.apply(s,LP(r))}return s}function BP(t,i){for(var e=[],s=0,n=vP(t);s<n.length;s++){var r=n[s];e.push.apply(e,PP(r,i))}return wt(e)}function RP(t){return function(t){for(var i=[],e=t.length,s=0;s<e;s++){var n=t[s];if(37===n&&s+2<e&&sP(t[s+1])&&sP(t[s+2])){var r=rP(t[s+1])<<4|rP(t[s+2]);i.push(r),s+=2}else i.push(n)}return i}(IP(t))}function UP(t){return wt(function(t){mP=t.slice(),pP=mP.length,Lo=0;for(var i,e=[];!1!==(i=bP());)e.push(i);return e}(RP(vP(t))))}function QP(t){var i=t.length,e=[0,0,0,0,0,0,0,0],s=0,n=null,r=0;if(r<i&&":"===t[r]){if(!(r+1<i&&":"===t[r+1]))throw new b;r+=2,n=s+=1}for(;r<i;){if(8===s)throw new b("Too many groups");if(":"!==t[r]){for(var h=0,o=0;o<4&&r<i&&Yz.test(t[r]);)h=h<<4|x(t[r],16),r+=1,o+=1;if("."===t[r]){if(0===o)throw new b;if(r-=o,s>6)throw new b;for(var a=0;r<i;){var u=null;if(a>0){if(!("."===t[r]&&a<4))throw new b;r+=1}if(!Fz.test(t[r]))throw new b;for(;r<i&&Fz.test(t[r]);){var c=x(t[r],10);if(null===u)u=c;else{if(0===u)throw new b;if((u=10*u+c)>255)throw new b}r+=1}e[s]=e[s]<<8|u,2!==(a+=1)&&4!==a||(s+=1)}if(4!==a)throw new b;break}if(":"===t[r]){if((r+=1)===i)throw new b}else if(r<i)throw new b;e[s]=h,s+=1}else{if(null!==n)throw new b("Too many :: groups");r+=1,n=s+=1}}if(null!==n){var d=s-n;for(s=7;0!==s&&d>0;)Jz(e,s,n+d-1),s-=1,d-=1}else if(8!==s)throw new b;return e}function FP(t){var i=10,e=Vz;return Gz.test(t)?(t=t.slice(2),i=16,e=Wz):t.length>=2&&"0"===t[0]&&(t=t.slice(1),i=8,e=Hz),""===t?0:e.test(t)?x(t,i):void 0}var Qa={F0:4},YP=/[\0\t\n\r #%/:?@\[\\\]]/,GP=/[\0\t\n\r #/:?@\[\\\]]/;function VP(t,i){if("["===t[0]){if("]"!==t[t.length-1])throw new b("Invalid IPv6 address");return{F0:2,Stt:QP(t.slice(1,-1))}}if(!i)return function(t){if(GP.test(t))throw new b("Invalid code point in opaque host");var i=BP(t,kP);return""===i?Qa:{F0:3,YL:i}}(t);var e=function(t){var i=function(t){return TP(t.toLowerCase())}(t);return i}(UP(t));if(YP.test(e))throw new b("Invalid code point in host");var s=function(t){var i=t.split(".");if(""===i[i.length-1]&&i.pop(),!(i.length>4)){for(var e=[],s=0;s<i.length;s++){var n=i[s];if(""===n)return;var r=FP(n);if(void 0===r)return;e.push(r)}for(var h=0;h<e.length-1;h++)if(e[h]>255)throw new b;if(e[e.length-1]>=_.pow(256,5-e.length))throw new b;for(var o=e.pop(),a=0;a<e.length;a++)o+=e[a]*_.pow(256,3-a);return o}}(e);return void 0!==s?{F0:1,Stt:s}:""===e?Qa:{F0:0,Itt:e}}function WP(t){switch(t.F0){case 0:return t.Itt;case 1:return function(t){for(var i=[],e=t,s=1;s<=4;s++)i.push(""+(255&e)),4!==s&&i.push("."),e>>>=8;return i.reverse().join("")}(t.Stt);case 2:return"["+function(t){for(var i="",e=function(t){for(var i=0,e=0,s=0,n=0,r=0;r<8;r++)0===t[r]?(0===n&&(s=r),n++):(n>e&&(i=s,e=n),n=0);return n>e&&(i=s,e=n),e>1?i:null}(t),s=!1,n=0;n<8;n++){if(s){if(0===t[n])continue;s=!1}e!==n?(i+=t[n].toString(16),7!==n&&(i+=":")):(i+=0===n?"::":":",s=!0)}return i}(t.Stt)+"]";case 3:return t.YL;case 4:return""}}var HP=/\+/g;function qP(t){return 42===t||45===t||46===t||95===t||eP(t)}function XP(t){for(var i=t.split("&"),e=[],s=0;s<i.length;s++){var n=i[s];if(""!==n){var r=n.indexOf("="),h=void 0,o=void 0;-1!==r?(h=n.slice(0,r),o=n.slice(r+1)):(h=n,o=""),h=h.replace(HP," "),o=o.replace(HP," ");var a=UP(h),u=UP(o);e.push([a,u])}}return e}function ZP(t){for(var i="",e=0;e<t.length;e++){var s=t[e];e>0&&(i+="&"),i+=KP(IP(vP(s[0])))+"="+KP(IP(vP(s[1])))}return i}function KP(t){for(var i=[],e=0;e<t.length;e++){var s=t[e];32===s?i.push(43):qP(s)?i.push(s):i.push.apply(i,LP(s))}return cP(i)}var JP=/(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])/;function Zc(t){var i=""+t,e=JP.exec(i);return e?function(t,i){for(var e=t.length,s=[],n=i;n<e;n++){var r=t.charCodeAt(n);if(tB(r))if(iB(r)||n===e-1)s.push($P);else{var h=t.charCodeAt(n+1);iB(h)?(s.push(r,h),n++):s.push($P)}else s.push(r)}return t.slice(0,i)+cP(s)}(i,e.index):i}var $P=65533,tB=function(t){return 55296==(63488&t)},iB=function(t){return 0!=(1024&t)};function eB(t,i){var e=t[0],s=i[0];return e===s?0:e<s?-1:1}function sB(t){t.Ett.length=0}function nB(t,i){!function(t,i){for(var e=0;e<i.length;e++)t[e]=i[e];t.length=i.length}(t.Ett,XP(i))}function rB(t){if(t.Ju){var i=ZP(t.Ett);""===i&&(i=null),t.Ju.Ju.btt=i}}var hB=function(){function t(t){if(void 0===t&&(t=void 0),this.Ju=null,null==t)this.Ett=[];else if("object"==typeof t||"function"==typeof t)if(function(t){return t instanceof hB&&!!Xz(t.Ett)&&(!Zz||t[Symbol.iterator]===oB)}(t))this.Ett=t.Ett.slice();else if(function(t){return null!=t&&(!!Xz(t)||!!Zz&&"function"==typeof t[Symbol.iterator])}(t)){this.Ett=[];for(var i=0,e=Kz(t);i<e.length;i++){var s=Kz(e[i]);if(2!==s.length)throw new b("Invalid name-value pair");this.Ett.push([Zc(s[0]),Zc(s[1])])}}else for(var n in this.Ett=[],t)w.prototype.hasOwnProperty.call(t,n)&&this.Ett.push([Zc(n),Zc(t[n])]);else(t=Zc(t)).length>0&&"?"===t[0]&&(t=t.slice(1)),this.Ett=XP(t)}var i=t.prototype;return i.append=function(t,i){t=Zc(t),i=Zc(i),this.Ett.push([t,i]),rB(this)},i.delete=function(t){t=Zc(t);for(var i=this.Ett,e=0;e<i.length;){i[e][0]===t?i.splice(e,1):e++}rB(this)},i.get=function(t){t=Zc(t);for(var i=this.Ett,e=0;e<i.length;e++){var s=i[e];if(s[0]===t)return s[1]}return null},i.getAll=function(t){t=Zc(t);for(var i=this.Ett,e=[],s=0;s<i.length;s++){var n=i[s];n[0]===t&&e.push(n[1])}return e},i.has=function(t){t=Zc(t);for(var i=this.Ett,e=0;e<i.length;e++){if(i[e][0]===t)return!0}return!1},i.set=function(t,i){t=Zc(t),i=Zc(i);for(var e=this.Ett,s=!1,n=0;n<e.length;){var r=e[n];r[0]===t?s?e.splice(n,1):(r[1]=i,s=!0,n++):n++}s||e.push([t,i]),rB(this)},i.sort=function(){Rz(this.Ett,eB),rB(this)},i.toString=function(){return ZP(this.Ett)},i.entries=function(){return new dB(this.Ett,aB)},i.keys=function(){return new dB(this.Ett,uB)},i.values=function(){return new dB(this.Ett,cB)},i.forEach=function(t){var i=this;this.Ett.forEach((function(e){return t(e[1],e[0],i)}))},t}(),oB=hB.prototype.entries;Zz&&(hB.prototype[Symbol.iterator]=oB);var aB=function(t){return[t[0],t[1]]},uB=function(t){return t[0]},cB=function(t){return t[1]},dB=function(){function t(t,i){this.Ltt=0,this.Ett=t,this.ktt=i}return t.prototype.next=function(){return this.Ltt<this.Ett.length?{done:!1,value:this.ktt(this.Ett[this.Ltt++])}:{done:!0,value:void 0}},t}(),lB="null";var fB=w.create(null);fB.ftp=21,fB.file=0,fB.gopher=70,fB.http=80,fB.https=443,fB.ws=80,fB.wss=443;var _B=/^(?:\.|%2e)$/i,gB=/^(?:\.|%2e){2}$/i;function wB(t){return _B.test(t)}function AB(t){return gB.test(t)}function vB(t){return void 0!==fB[t]}function fl(t){return vB(t.Ej)}function mB(t){return""!==t.Ctt||""!==t.xtt}function pB(t){var i=t.length;if(!(i>=2))return!1;if(!MB(t.slice(0,2)))return!1;if(2!==i){var e=t[2];if(47!==e&&92!==e&&63!==e&&35!==e)return!1}return!0}function yB(t){return 2===t.length&&Qz.test(t[0])&&(":"===t[1]||"|"===t[1])}function MB(t){return 2===t.length&&yB(cP(t))}function TB(t){return yB(t)&&":"===t[1]}function NB(t){var i=t.Ott;0!==i.length&&("file"===t.Ej&&1===i.length&&TB(i[0])||i.pop())}function DB(t){return null===t.jtt||Qa===t.jtt||t.ztt||"file"===t.Ej}var ei=-1,SB=/\t|\n|\r/g,IB=/^[\x00-\x1f ]+|[\x00-\x1f ]+$/g;function EB(t,i,e,s){void 0===e&&(e=null),void 0===s&&(s=null),e||(e=new bB,t=t.replace(IB,""));var n=null!==s?s:0;i=i||null;for(var r=[],h=!1,o=!1,a=!1,u=vP(t=t.replace(SB,"")),c=u.length,d=0;d<=c;){var l=d<c?u[d]:ei;switch(n){case 0:if(!tP(l)){if(null===s){r.length=0,n=2;continue}throw new b("Invalid scheme")}r.push(nP(l)),n=1;break;case 1:if(eP(l)||43===l||45===l||46===l)r.push(nP(l));else{if(58!==l){if(null===s){r.length=0,n=2,d=0;continue}throw new b("Invalid scheme")}var f=wt(r);if(null!==s){if(vB(e.Ej)&&!vB(f))return;if(!vB(e.Ej)&&vB(f))return;if((mB(e)||null!==e.z8)&&"file"===f)return;if("file"===e.Ej&&(e.jtt===Qa||null===e.jtt))return}if(e.Ej=f,null!==s)return void(fl(e)&&e.z8===fB[e.Ej]&&(e.z8=null));r.length=0,"file"===e.Ej?n=13:fl(e)&&i&&i.Ej===e.Ej?n=3:fl(e)?n=7:47===u[d+1]?(n=4,d+=1):(e.ztt=!0,e.Ott.push(""),n=18)}break;case 2:if(!i||i.ztt&&35!==l)throw new b("Invalid scheme");i.ztt&&35===l?(e.Ej=i.Ej,e.Ott=i.Ott.slice(),e.btt=i.btt,e.Ptt="",e.ztt=!0,n=20):"file"!==i.Ej?(n=5,d-=1):(n=13,d-=1);break;case 3:47===l&&47===u[d+1]?n=8:(n=5,d-=1);break;case 4:47===l?n=9:(n=17,d-=1);break;case 5:e.Ej=i.Ej,ei===l?(e.Ctt=i.Ctt,e.xtt=i.xtt,e.jtt=i.jtt,e.z8=i.z8,e.Ott=i.Ott.slice(),e.btt=i.btt):47===l?n=6:63===l?(e.Ctt=i.Ctt,e.xtt=i.xtt,e.jtt=i.jtt,e.z8=i.z8,e.Ott=i.Ott.slice(),e.btt="",n=19):35===l?(e.Ctt=i.Ctt,e.xtt=i.xtt,e.jtt=i.jtt,e.z8=i.z8,e.Ott=i.Ott.slice(),e.btt=i.btt,e.Ptt="",n=20):92===l&&fl(e)?n=6:(e.Ctt=i.Ctt,e.xtt=i.xtt,e.jtt=i.jtt,e.z8=i.z8,e.Ott=i.Ott.slice(),e.Ott.pop(),n=17,d-=1);break;case 6:!fl(e)||47!==l&&92!==l?47===l?n=9:(e.Ctt=i.Ctt,e.xtt=i.xtt,e.jtt=i.jtt,e.z8=i.z8,n=17,d-=1):n=8;break;case 7:if(47!==l||47!==u[d+1]){n=8;continue}n=8,d+=1;break;case 8:47!==l&&92!==l&&(n=9,d-=1);break;case 9:if(64===l){h&&r.unshift(37,52,48),h=!0;for(var _=0;_<r.length;_++){var g=r[_];if(58!==g||a){var w=wt(PP(g,OP));a?e.xtt+=w:e.Ctt+=w}else a=!0}r.length=0}else if(ei===l||47===l||63===l||35===l||fl(e)&&92===l){if(h&&0===r.length)throw new b("Invalid host");d-=r.length+1,r.length=0,n=10}else r.push(l);break;case 10:case 11:if(null!==s&&"file"===e.Ej)d-=1,n=15;else if(58!==l||o)if(ei===l||47===l||63===l||35===l||fl(e)&&92===l){if(d-=1,fl(e)&&0===r.length)throw new b("Invalid host");if(null!==s&&0===r.length&&(mB(e)||null!==e.z8))return;var A=VP(wt(r),fl(e));if(e.jtt=A,r.length=0,n=16,null!==s)return}else 91===l?o=!0:93===l&&(o=!1),r.push(l);else{if(0===r.length)throw new b("Invalid host");var v=VP(wt(r),fl(e));if(e.jtt=v,r.length=0,n=12,11===s)return}break;case 12:if(iP(l))r.push(l);else{if(!(ei===l||47===l||63===l||35===l||fl(e)&&92===l||null!==s))throw new b("Invalid port");if(0!==r.length){var m=x(wt(r),10);if(m>65535)throw new b("Invalid port");e.z8=m===fB[e.Ej]?null:m,r.length=0}if(null!==s)return;n=16,d-=1}break;case 13:e.Ej="file",47===l||92===l?n=14:i&&"file"===i.Ej?ei===l?(e.jtt=i.jtt,e.Ott=i.Ott.slice(),e.btt=i.btt):63===l?(e.jtt=i.jtt,e.Ott=i.Ott.slice(),e.btt="",n=19):35===l?(e.jtt=i.jtt,e.Ott=i.Ott.slice(),e.btt=i.btt,e.Ptt="",n=20):(pB(u.slice(d))||(e.jtt=i.jtt,e.Ott=i.Ott.slice(),NB(e)),n=17,d-=1):(n=17,d-=1);break;case 14:47===l||92===l?n=15:(i&&"file"===i.Ej&&!pB(u.slice(d))&&(TB(i.Ott[0])?e.Ott.push(i.Ott[0]):e.jtt=i.jtt),n=17,d-=1);break;case 15:if(ei===l||47===l||92===l||63===l||35===l)if(d-=1,null===s&&MB(r))n=17;else if(0===r.length){if(e.jtt=Qa,null!==s)return;n=16}else{var p=VP(wt(r),fl(e));if(0===p.F0&&"localhost"===p.Itt&&(p=Qa),e.jtt=p,null!==s)return;r.length=0,n=16}else r.push(l);break;case 16:fl(e)?(n=17,47!==l&&92!==l&&(d-=1)):null===s&&63===l?(e.btt="",n=19):null===s&&35===l?(e.Ptt="",n=20):ei!==l&&(n=17,47!==l&&(d-=1));break;case 17:if(ei===l||47===l||fl(e)&&92===l||null===s&&(63===l||35===l)){var y=wt(r);if(AB(y)?(NB(e),47===l||fl(e)&&92===l||e.Ott.push("")):!wB(y)||47===l||fl(e)&&92===l?wB(y)||("file"===e.Ej&&0===e.Ott.length&&MB(r)&&(Qa!==e.jtt&&null!==e.jtt&&(e.jtt=Qa),r[1]=58,y=wt(r)),e.Ott.push(y)):e.Ott.push(""),r.length=0,"file"===e.Ej&&(ei===l||63===l||35===l))for(;e.Ott.length>1&&""===e.Ott[0];)e.Ott.shift();63===l?(e.btt="",n=19):35===l&&(e.Ptt="",n=20)}else r.push.apply(r,PP(l,xP));break;case 18:63===l?(e.btt="",n=19):35===l?(e.Ptt="",n=20):ei!==l&&(e.Ott[0]+=wt(PP(l,kP)));break;case 19:null===s&&35===l?(e.Ptt="",n=20):ei!==l&&(e.btt+=wt(PP(l,fl(e)?zP:jP)));break;case 20:ei===l||0===l||(e.Ptt+=wt(PP(l,CP)))}d++}return e}function Rr(t,i,e,s){try{EB(t,i,e,s)}catch(t){}}var bB=function(){this.Ej="",this.Ctt="",this.xtt="",this.jtt=null,this.z8=null,this.Ott=[],this.btt=null,this.Ptt=null,this.ztt=!1};function LB(t){switch(t.Ej){case"blob":var i;try{i=EB(t.Ott[0],null)}catch(t){return lB}return LB(i);case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t,i,e){return t+"://"+WP(i)+(null===e?"":":"+e)}(t.Ej,t.jtt,t.z8);default:return lB}}var kB=function(){function t(t,i){var e,s=null;if(null!=i)if(function(t){return null!=t&&t instanceof kB&&"object"==typeof t.Ju}(i))s=i.Ju;else try{s=EB(String(i),null)}catch(t){throw new b("Invalid base URL: "+t.message)}try{e=EB(String(t),s)}catch(t){throw new b("Invalid URL: "+t.message)}var n=e.btt;this.Ju=e,this.btt=function(t){var i=new hB;return null!==t&&nB(i,t),i}(n),this.btt.Ju=this}var i=t.prototype;return i.toString=function(){return this.href},i.toJSON=function(){return this.href},function(t,i,e){i&&Bz(t.prototype,i),e&&Bz(t,e)}(t,[{key:"href",get:function(){return function(t,i){void 0===i&&(i=!1);var e=t.Ej+":";if(null!==t.jtt?(e+="//",mB(t)&&(e+=t.Ctt,""!==t.xtt&&(e+=":"+t.xtt),e+="@"),e+=WP(t.jtt),null!==t.z8&&(e+=":"+t.z8)):null===t.jtt&&"file"===t.Ej&&(e+="//"),t.ztt)e+=t.Ott[0];else for(var s=0,n=t.Ott;s<n.length;s++)e+="/"+n[s];return null!==t.btt&&(e+="?"+t.btt),i||null===t.Ptt||(e+="#"+t.Ptt),e}(this.Ju)},set:function(t){var i;try{i=EB(String(t),null)}catch(t){throw new b("Invalid URL: "+t.message)}this.Ju=i,sB(this.btt);var e=this.Ju.btt;null!==e&&nB(this.btt,e)}},{key:"origin",get:function(){return LB(this.Ju)}},{key:"protocol",get:function(){return this.Ju.Ej+":"},set:function(t){Rr(t+":",null,this.Ju,0)}},{key:"username",get:function(){return this.Ju.Ctt},set:function(t){DB(this.Ju)||(this.Ju.Ctt=BP(t,OP))}},{key:"password",get:function(){return this.Ju.xtt},set:function(t){DB(this.Ju)||(this.Ju.xtt=BP(t,OP))}},{key:"host",get:function(){var t=this.Ju,i=t.jtt;if(null===i)return"";var e=t.z8,s=WP(i);return null!==e&&(s+=":"+e),s},set:function(t){this.Ju.ztt||Rr(t,null,this.Ju,10)}},{key:"hostname",get:function(){var t=this.Ju.jtt;return null===t?"":WP(t)},set:function(t){this.Ju.ztt||Rr(t,null,this.Ju,11)}},{key:"port",get:function(){var t=this.Ju.z8;return null===t?"":""+t},set:function(t){DB(this.Ju)||(""===t?this.Ju.z8=null:Rr(t,null,this.Ju,12))}},{key:"pathname",get:function(){var t=this.Ju.Ott;return this.Ju.ztt?t[0]:0===t.length?"":"/"+t.join("/")},set:function(t){this.Ju.ztt||(this.Ju.Ott.length=0,Rr(t,null,this.Ju,16))}},{key:"search",get:function(){var t=this.Ju.btt;return null===t||""===t?"":"?"+t},set:function(t){t=Zc(t);var i=this.Ju;if(""===t)return i.btt=null,void sB(this.btt);"?"===t[0]&&(t=t.slice(1)),i.btt="",Rr(t,null,i,19),nB(this.btt,t)}},{key:"searchParams",get:function(){return this.btt}},{key:"hash",get:function(){var t=this.Ju.Ptt;return null===t||""===t?"":"#"+t},set:function(t){""!==t?("#"===t[0]&&(t=t.slice(1)),this.Ju.Ptt="",Rr(t,null,this.Ju,20)):this.Ju.Ptt=null}}]),t}();function CB(t){return t.document&&t.document.baseURI||t.location.href||""}function xB(){let t=Qr,i=t.location.href;for(;t!==s.top;){t=t.parent;try{i=t.location.href}catch(t){}}return i}var OB=!!("ontouchstart"in self||self.DocumentTouch&&h instanceof self.DocumentTouch)||!(!ed||!ed.msMaxTouchPoints),jB=U(),zB=!(!jB||!jB.webkitShowPlaybackTargetPicker),PB=class{get Btt(){return void 0===this.Rtt&&(this.Rtt=this.Utt()),this.Rtt}Utt(){return 0}get Qtt(){return!fi.KE}get Ftt(){if(s.screen)return{width:s.screen.width,height:s.screen.height}}get c2(){return s.devicePixelRatio||1}get Ytt(){return zB}get V4(){return!1}get B4(){return!0}get _A(){return fi.QE||fi.Ga}get Gtt(){return!fi.Ga}get GO(){return!0}get wA(){return!0}get gA(){return!1}get Vtt(){}get Wtt(){return!0}get YJ(){return!1}get Htt(){return fi.SE}qtt(t,i){return!0}Xtt(t){return t>=2*al}constructor(){this.Rtt=void 0,this.Ztt=!1,this.Je=OB,this.Qs=!1,this.I9=!0}},BB=function(){const t=GM();if(!t)return!1;const i=t.muted;return t.muted=!i,t.muted!==i}(),RB=function(){if(fi.KI)return!1;const t=GM();if(!t)return!1;const i=t.volume;return t.volume=i/2+.1,i!==t.volume}();var xe=class extends PB{Utt(){return this.Ktt?this.Ktt.Btt:super.Utt()}get Vtt(){var t;return null==(t=this.Ktt)?void 0:t.Vtt}get Wtt(){var t,i;return null==(i=null==(t=this.Ktt)?void 0:t.Wtt)||i}qtt(t,i){return this.Ktt?this.Ktt.qtt(t,i):super.qtt(t,i)}Xtt(t){return this.Ktt?this.Ktt.Xtt(t):super.Xtt(t)}constructor(t){super(),this.Ktt=t,this.Ktt&&(this.Ztt=this.Ktt.Ztt,this.Je=this.Ktt.Je,this.I9=BB&&this.Ktt.I9)}},UB=class extends xe{get gA(){return fi.Ga}constructor(t){super(t),this.Ztt=!0,this.Qs=!0}},QB=class extends UB{get gA(){return!0}Utt(){return _C(!0)?super.Utt():1}},FB=class extends xe{get V4(){return fi.ME<3}get B4(){return fi.ME>=3}get Ftt(){return s.tizen&&!this.Jtt&&s.tizen.systeminfo.getPropertyValue("DISPLAY",(t=>{const i=t.resolutionWidth,e=t.resolutionHeight;1===i&&1===e||(this.Jtt={width:i,height:e})})),this.Jtt}get YJ(){return fi.ME<3}qtt(t,i){return super.qtt(t,i)}},xs=class extends PB{constructor(){super()}},YB=class extends xs{get Vtt(){if(fi.OI)return 4096}qtt(t,i){if(t&&t.$tt&&i&&i.$tt){let e=Ge(t.$tt,"mp4a.40.2")&&Ge(i.$tt,"mp4a.40.5"),s=Ge(t.$tt,"mp4a.40.5")&&Ge(i.$tt,"mp4a.40.2"),n=Ge(t.$tt,"mp4a.40.2")&&Ge(i.$tt,"mp4a.40.34"),r=Ge(t.$tt,"mp4a.40.34")&&Ge(i.$tt,"mp4a.40.2"),h=Ge(t.$tt,"mp4a.40.5")&&Ge(i.$tt,"mp4a.40.34"),o=Ge(t.$tt,"mp4a.40.34")&&Ge(i.$tt,"mp4a.40.5");return!(e||s||n||r||h||o)}return!0}};function Ge(t,i){return t.indexOf(i)>-1}var GB=class extends xs{Xtt(t){return t>=2}},VB=class extends xs{constructor(){super(),this.Ztt=fi.YE>=11,this.I9=fi.QE&&!(fi.Ga&&fi.YE<10)}},WB=class extends xe{get Ftt(){return s.webOS&&!this.Jtt&&s.webOS.deviceInfo((t=>{this.Jtt={width:t.screenWidth,height:t.screenHeight}})),this.Jtt}get GO(){return!1}},HB=class extends xs{get Wtt(){return!fi.zI||(fi.wE?92!==fi.vE:fi.fE>=100)}},qB=class extends xe{get gA(){return!0}},XB=class{tit(){for(var t=arguments.length,i=new Array(t),e=0;e<t;e++)i[e]=arguments[e];qu(...i)}IA(){for(var t=arguments.length,i=new Array(t),e=0;e<t;e++)i[e]=arguments[e];Eo(...i)}iit(){for(var t=arguments.length,i=new Array(t),e=0;e<t;e++)i[e]=arguments[e];Hu(...i)}eit(t){for(var i=arguments.length,e=new Array(i>1?i-1:0),s=1;s<i;s++)e[s-1]=arguments[s];qD(t,...e)}ul(t,i){return u(t,i)}S$(t,i){return v(t,i)}$d(t){c(t)}E$(t){m(t)}RC(){return this.sit.RC()}LC(){return this.sit.LC()}xC(){return this.sit.xC()}kC(){return this.sit.kC()}EC(){return this.sit.EC()}jC(t,i){return this.sit.jC(t,i)}bC(t){return this.sit.bC(t)}get PO(){return this.nit}Dh(t,i){let e;return void 0===i&&(i=CB(Qr)),e="object"!=typeof i||i instanceof kB?i:i.href,new kB(t,e)}SA(t,i){if(void 0===i&&(i=CB(Qr)),this.rit){const e=Qs(i)?i:i.toString();return new self.URL(t,e).href}return this.Dh(t,i).href}get Ys(){return this.hit}get vA(){return{AA:ed&&ed.userAgent.match(/Android /i)?"Android":"other",mA:Boolean(ed&&ed.userAgent.match(/Android 8.0.0/i))}}get SV(){return self&&self.location&&"https:"===self.location.protocol}get oit(){return"languages"in ed?ed.languages.slice():[ed.language]}constructor(){this.nit=new ZB,this.hit=function(){const t=function(){if(fi.PE)return new YB;if(fi.bE||fi.kE)return new GB;if(fi.QE)return new VB;if(fi.dE)return new HB;return new xs}();return fi.Ga?new QB(t):fi.Qs?new UB(t):fi.pE?new FB(t):fi.NE?new WB(t):fi.OI?new qB(t):new xe(t)}(),this.rit=KB(),self.performance&&self.performance.now?this.Jd=()=>self.performance.now():this.Jd=fa}},ZB=class{get BO(){return ed.oscpu}get Ys(){return ed.platform}get RO(){return ed.vendor}get UO(){return ed.vendorSub}};function KB(){if(self.URL)try{const t=new self.URL("b","http://a");return t.pathname="c d","http://a/c%20d"===t.href}catch(t){}return!1}var ih=(()=>{const t=self.Blob;if(t)try{new t;return function(t){return(i,e)=>new t(i,e)}(t)}catch(t){}const i=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder;if(i)return function(t){return(i,e)=>{const s=new t;if(i)for(const t of i)s.append(t);return s.getBlob(e&&e.type||"")}}(i)})();function JB(t,i,e){const s=ih([i],{type:"application/octet-stream"}),n=URL.createObjectURL(s),r=function(t,i){let e=t;const s=e.indexOf("?");if(s>=0&&(e=e.substr(0,s)),e=e.substr(e.lastIndexOf("/")+1),i){let t=e.indexOf(".");t<0&&(t=e.length),e=e.substr(0,t)+i+e.substr(t)}return e}(t,e),o=h.createElement("a");o.href=n,o.download=r,h.body.appendChild(o),o.click(),h.body.removeChild(o),URL.revokeObjectURL(n)}var oh=class extends R{get name(){return kn.mS}constructor(t,i){super(t,function(t){return"Error while opening "+t+". Invalid URL."}(t.zu),i)}},$B=self.fetch,tR=self.Request,iR=self.Response,eR=self.Headers,sR=self.ReadableStream,nR=self.AbortSignal,rR=self.AbortController,hR=Ol((()=>{try{return Ld($B)&&Us(tR)&&Us(iR)&&Us(eR)&&"forEach"in eR.prototype&&KB()}catch(t){return!1}})),oR=["http:","https:"];var aR=Ol((()=>{try{return hR()&&Us(nR)&&Us(rR)&&"signal"in tR.prototype}catch(t){return!1}})),uR=Ol((()=>{try{return hR()&&Us(sR)&&"body"in iR.prototype&&!fi.nE}catch(t){return!1}}));function cR(t,i){const e=t.hI.has("content-length")?Number(t.hI.get("content-length")):void 0;let s;return s=t.uV?function(t,i,e){return t.pipeThrough(new De(new dR(i,e)))}(t.rV(),i,e):async function(t,i,e){await Promise.resolve(),i(0,e);const s=await t,n=s.byteLength;return i(n,null!=e?e:n),s}(t.nj(),i,e),new jh({Om:s,MS:t.MS},t)}var dR=class{transform(t,i){this.ait+=t.byteLength,this.uit(this.ait,this.cit),i.enqueue(t)}flush(t){var i;this.uit(this.ait,null!=(i=this.cit)?i:this.ait)}constructor(t,i){this.uit=t,this.cit=i,this.ait=0}};var lR=class{async dit(){const t=this.TS;let e,s;t.IS&&u((()=>{this.fit=!0,this.Ax.Xd()}),t.IS);try{e=$B(t.zu,{method:t.oI,headers:t.hI.QS(),body:t.rI,credentials:t.lI?"include":"same-origin",signal:gR(this.Ax.Hd),mode:t.jg})}catch(i){throw new oh(t,i)}try{s=await e}catch(t){const i=this._it(t);throw Mi(i)&&this.Ax.Xd(),i}const n=s.url||t.zu,r=0===s.status&&"file:"===function(t){return i.Dh(t).protocol}(n)?200:s.status,h=new fR(this,s,this.Ax);let o=new jh({Om:h,MS:t,aI:t.aI,hI:wR(s.headers),SS:r,FO:s.statusText,yI:n});if(!Mr(o))throw new li(o);return t.fI&&(o=cR(o,t.fI)),o}_it(t){return Cc(t)?t:Mi(t)?this.fit?new Uu(this.TS):new is(t.message,t):this.DS?new li(this.DS,t):new oh(this.TS,t)}constructor(t){this.Ax=new er,this.DS=void 0,this.fit=!1,this.TS=t,this.Ax.Zd(t.Hd),this.NS=this.dit()}},fR=class t extends xh{get oV(){return this.git.bodyUsed}get uV(){return Dd(this.git.body)}dV(){return this.lV.Vb}pI(t){return this.fV(this.git.text(),t)}nj(t){return this.fV(this.git.arrayBuffer(),t)}rV(){const t=this.git.body;return t?this._V(t):Fb(this.nj().then(Ub),this.Ax)}wV(){const i=this.git.clone(),[e,s]=this.Ax.Kd();return this.Ax=e,new t(this.wit,i,s)}fV(t,i){i&&this.Ax.Zd(i);let e=ji(Promise.resolve(t),this.Ax.Hd).catch((t=>{throw this.wit._it(t)}));return e=dn(e,this.Ax),this.lV.Zd(e.then(qo)),e}_V(t){return new xi(new vR(t,(t=>this.wit._it(t)),this.Ax,this.lV),{highWaterMark:0})}constructor(t,i,e){super(),this.lV=new Rs,this.wit=t,this.git=i,this.Ax=e,this.lV.Vb.catch(qo)}},_R="abort";function gR(t){if(!aR())return;const i=new rR;if(t.Bd)i.abort();else if(!t.Rd){const e=()=>{s(),i.abort()},s=()=>{i.signal.removeEventListener(_R,e),t.Gd(e),t.Wd(s)};i.signal.addEventListener(_R,e),t.Yd(e),t.Vd(s)}return i.signal}function wR(t){if(function(t){return Mo(t)&&"function"==typeof t.forEach}(t)){const i=new gs;return t.forEach(((t,e)=>{Array.isArray(t)&&2===t.length?i.append(t[0],t[1]):i.append(e,t)})),i}return new gs(t)}var AR,vR=class{start(t){this.eG=this.Ait.getReader()}async pull(t){let i;try{i=await ji(this.eG.read(),this.Ax.Hd)}catch(i){const e=this.vit(i);return this.lV.Yb(e),this.Ax.Xd(),this.eG.cancel(e).catch(qo),void t.error(e)}i.done?(this.lV.Qb(),this.Ax.Xd(),t.close()):t.enqueue(i.value)}cancel(t){return this.Ax.Xd(),this.lV.Yb(t),this.eG.cancel(t)}constructor(t,i,e,s){this.Ait=t,this.vit=i,this.Ax=e,this.lV=s}};!function(t){t[t.UNSENT=0]="UNSENT",t[t.OPENED=1]="OPENED",t[t.HEADERS_RECEIVED=2]="HEADERS_RECEIVED",t[t.LOADING=3]="LOADING",t[t.DONE=4]="DONE"}(AR||(AR={}));var mR=class{get NS(){return this.mit.Vb}dit(){const t=this.pit,i=this.TS;if(i.Hd.Bd)return this.yit();t.onreadystatechange=()=>this.Mit(),t.onprogress=t=>this.uit(t),t.onload=()=>this.Tit(),t.onloadend=()=>this.Nit(),t.onerror=()=>this.Yq(),t.ontimeout=()=>this.Dit(),t.onabort=()=>this.yit(),t.open(i.oI,i.zu,!0),t.withCredentials=Boolean(i.lI),"responseType"in t&&i.aI&&(i.aI===dm.Ru?t.responseType="text":t.responseType="arraybuffer"),i.hI.forEach(((i,e)=>{t.setRequestHeader(e,i)})),i.IS&&(t.timeout=i.IS),this.Ax.Hd.Yd(this.Sit);const e=i.rI;e?t.send(e):t.send()}Mit(){const t=this.pit;void 0!==t&&t.readyState>=2&&!this.Iit&&(this.Iit=!0,this.Eit())}Eit(){var t;const i=this.pit,e=function(t){const i=new gs,e=t.replace(/\r?\n[\t ]+/g," ");return e.split(/\r?\n/).forEach((t=>{const e=t.split(":"),s=e.shift().trim();if(s){const t=e.join(":").trim();i.append(s,t)}})),i}(i.getAllResponseHeaders()||""),s=this.TS;var n;this.Lit=new Rs,this.DS=new jh({MS:s,aI:s.aI,Om:this.Lit.Vb,SS:i.status,FO:i.statusText,hI:e,yI:null!=(n=i.responseURL)?n:e.get("X-Request-URL")}),null==(t=this.mit)||t.Qb(this.DS)}Tit(){var t;const i=this.pit;if(void 0===i)return;let e=i.response;if(!Dd(e)){const t=this.TS.aI;e=t===dm.Ru?i.responseText:t===dm.PS?new ArrayBuffer(0):{}}null==(t=this.Lit)||t.Qb(e)}Nit(){this.gn()}uit(t){void 0!==this.pit&&(null==this.TS.fI||this.TS.fI.call(this.TS,t.loaded,t.lengthComputable?t.total:void 0))}Yq(){const t=new g("Network request failed");this.DS?this.Ss(new li(this.DS,t)):this.Ss(new oh(this.TS,t))}Dit(){this.Ss(new Uu(this.TS))}yit(){this.Ss(new is),this.gn()}Ss(t){var i,e;null==(i=null!=(e=this.Lit)?e:this.mit)||i.Yb(t)}gn(){this.pit=void 0,this.DS=void 0,this.mit=void 0,this.Lit=void 0,this.Ax.Qd()}constructor(t){this.Ax=new er,this.DS=void 0,this.mit=new Rs,this.Iit=!1,this.Sit=()=>{var t;this.yit(),null==(t=this.pit)||t.abort()},this.TS=t,this.Ax.Zd(t.Hd),this.pit=new nd,this.dit()}};var pR=class{MS(t){return function(t){if(!hR()||!function(t){try{return oR.indexOf(new self.URL(t,self.location.href).protocol)>=0}catch(t){return!1}}(t.zu))return!1;if(!uR()&&t.fI)return!1;if(!t._I){if(fi.NE&&fi.fE<=68)return!1;if(fi.pE)return!1}return!0}(t)?new lR(t).NS:new mR(t).NS}YF(t){if(Om&&Om.sendBeacon)Om.sendBeacon(t.zu,ih([t.rI],{type:t.Fz}));else{const i=t.Fz?{"Content-type":t.Fz}:void 0;this.MS(new Pc({oI:G.POST,zu:t.zu,rI:t.rI,hI:i,jg:lm.EA})).then((t=>{Ys(t.nj())}),qo)}}gn(){}};var yR=class extends Jo{constructor(t){super("Invalid XML",t)}},MR=class{cS(t){const i=new DOMParser;let e;try{e=i.parseFromString(t,"text/xml")}catch(t){throw new yR(t)}if(!e||e.getElementsByTagName("parsererror").length>0)throw new yR;return new bR(e)}},TR=class t{get HD(){return Ot.XD}get uS(){var t;return null!=(t=this.kit.localName)?t:CR(this.kit.nodeName)}get l(){return this.kit.nodeName}get Cit(){var t;return null!=(t=this.kit.namespaceURI)?t:void 0}get xit(){var t;return null!=(t=this.kit.prefix)?t:void 0}get LM(){return this.kit.nodeValue}WD(t){return this.kit.isEqualNode(t.kit)}$D(i){return new t(this.kit.cloneNode(i))}constructor(t){this.kit=t}},NR=class{get _S(){return void 0===this.Oit&&(this.Oit=function(t){const i=[];for(let e=0;e<t.length;e++){const s=kR(t.item(e));s&&i.push(s)}return i}(this.jit.childNodes)),this.Oit}get m(){return this._S.filter(LR)}oS(t){return this._S.filter((i=>LR(i)&&i.rj===t))}hS(t,i){return this._S.filter((e=>LR(e)&&e.uS===i&&e.Cit===t))}get UD(){return this.jit}gS(t){this.jit.appendChild(t.UD),this.Oit&&this.Oit.push(t)}WD(t){return this.jit.isEqualNode(t.UD)}constructor(t){this.Oit=void 0,this.jit=t}},DR=class t extends NR{get HD(){return Ot.qD}get uS(){var t;return null!=(t=this.jit.localName)?t:CR(this.jit.nodeName)}get Cit(){var t;return null!=(t=this.jit.namespaceURI)?t:void 0}get xit(){var t;return null!=(t=this.jit.prefix)?t:void 0}get rj(){return this.jit.nodeName}get aS(){return function(t){const i=[];for(let e=0;e<t.length;e++)i.push(new TR(t.item(e)));return i}(this.jit.attributes)}get JO(){return this.jit.textContent}fS(t){if(this.jit.hasAttribute(t))return this.jit.getAttribute(t)}lS(t,i){if(this.jit.hasAttributeNS(t,i))return this.jit.getAttributeNS(t,i)}sS(t){this.jit.removeAttribute(t)}zit(t,i){this.jit.removeAttributeNS(t,i)}Pit(t,i){this.jit.setAttribute(t,i)}Bit(t,i,e){this.jit.setAttributeNS(t,i,e)}$D(i){return new t(this.jit.cloneNode(i))}constructor(t){super(t)}},SR=class{get Om(){return this.jit.nodeValue}get UD(){return this.jit}WD(t){return this.Om===t.Om}constructor(t){this.jit=t}},IR=class t extends SR{get HD(){return Ot.Ru}$D(i){return new t(this.jit.cloneNode(i))}constructor(t){super(t)}},ER=class t extends SR{get HD(){return Ot.ZD}$D(i){return new t(this.jit.cloneNode(i))}constructor(t){super(t)}},bR=class t extends NR{get HD(){return Ot.KD}get dS(){return new DR(this.jit.documentElement)}$D(i){return new t(this.jit.cloneNode(i))}constructor(t){super(t)}};function LR(t){return re(t)}function kR(t){switch(t.nodeType){case Ot.qD:return new DR(t);case Ot.Ru:return new IR(t);case Ot.ZD:return new ER(t)}}function CR(t){const i=t.indexOf(":");return i<0?t:t.substr(i+1)}!function(t){i=t}(new class extends XB{get sit(){return this.Rit||(this.Rit=new nM(K())),this.Rit}get Uit(){return this.Qit}get m$(){return this.Fit}get z$(){return this.Yit}get Git(){return!1}get Yj(){return at.iQ()}get Vit(){return{Wit:JB}}get Hit(){return ed.connection&&ed.connection.effectiveType||vN}get qit(){return ed.connection&&ed.connection.type||"unknown"}get uO(){return this.Xit||(this.Xit=new hL(new pR)),this.Xit}cS(t){return this.Zit.cS(t)}constructor(...t){super(...t),this.Rit=void 0,this.Qit=uR(),this.Fit=fi.$E||fi.nE,this.Yit=(fi.$E||fi.NE&&fi.fE<=68||fi.nE)&&!(fi.pE&&fi.ME<3),this.Xit=void 0,this.Zit=new MR}});var xR=class{get Mf(){const t=this.Qo.currentTime;return"number"==typeof t&&isFinite(t)?t:"now"}get Kit(){return this.Qo.src||""}tr(){}constructor(t,i){this.Jit=!1,this.$it=t=>{this.tet.xF(t.error,this.Mf)},this.iet=()=>{this.tet.LF(this.Kit),this.Qo.removeEventListener("playing",this.iet),this.Jit=!1},this.js=()=>{this.Jit||(this.Qo.addEventListener("playing",this.iet),this.Jit=!0)},this.tet=i,this.Qo=t,this.Qo.addEventListener("error",this.$it),this.Qo.addEventListener("sourcechange",this.js),this.js()}};!function(t){uz.push(t)}((function(t){new xR(t.va,t.f7)}));var OR="theoplayer-stored-volume",jR="theoplayer-stored-mutedstate";Z((function(t){return class extends t{Rf(t){this.wd.persistVolume&&wo.Wj(jR,""+Boolean(t)),super.Rf(t)}l_(t){this.wd.persistVolume&&wo.Wj(OR,""+Number(t)),super.l_(t)}constructor(t,i){if(super(t,i),i.persistVolume){let t=wo.mH(OR);(void 0===t||S(t))&&(t=1);const i=wo.pH(jR)||!1;this.c_=t,this.Pf=i}}}}),Zo.Za);var zR="7.10.0",PR="2024.3.3",BR=fz.va,RR=_u._v.registerContentProtectionIntegration.bind(_u._v),UR={ZF(t){Qr.addEventListener("beforeunload",t)},WF(t){Qr.removeEventListener("beforeunload",t)}};!function(t){km=t.eet,Cm=t.net,Vs=t.ret,Qr=t.het,xm=Qr&&Qr.location,Om=Qr&&Qr.navigator}({eet:class{get jB(){const t=[];for(const i of this.oet){const e=this.aet.get(i);if(e){const i=e.map((t=>t.uet));t.push(...i)}}return this.cet&&t.push(this.cet),t}PB(t){for(const i of this.jB)i.J3(t)}MP(t){const i=Po(this.aet.get(t),(t=>t.det));if(i)return i.det=!1,i.uet}let(t){if(!this.cet){var i;const t=null==(i=this.aet.get(f.Am))?void 0:i[0].uet.jz;if(!t)throw new g("Error creating iOS Safari MediaController");this.cet=new Rj(t,this.BC)}return this.cet}async rP(t){const i=t.jz,e=i.tagName.toLowerCase();await t.tr(),Yj(i);const s=Po(this.aet.get(e)||[],(i=>t===i.uet));s&&(s.det=!0)}LB(){for(const t of this.jB)t.K3()}gn(){for(const t of this.jB){const i=t.jz;t.Qd(),Fj(i),hs(i)}this.aet.clear(),this.cet=void 0}fet(){for(const t of this.oet){const i=[];this.aet.set(t,i);for(let e=0;e<this._et;e++){const e=Qj(t),s=t===f.vm?new wO(e,this.BC,this.Wu):new xj(e,this.BC,this.Wu,this.OB);i.push({uet:s,det:!0})}}}constructor(t,i,e=2,s=Uj,n=K()){this._et=e,this.oet=[...s],this.BC=n,this.Wu=t,this.OB=i,this.aet=Cn(),this.fet()}},net:class t{_tt(t){return this.wet.wx((()=>this.Aet(t)))}v_(){this.kB.LB()}async Aet(i){const e=this.kB.MP(f.Am),s=e.jz,n=await t.vet(s,i);return await this.kB.rP(e),n}static async vet(i,e){return fi.NE||fi.pE?"all":(i.src||(i.src="data:video/mp4;base64,AAAAHGZ0eXBNNFYgAAACAGlzb21pc28yYXZjMQAAAAhmcmVlAAAGF21kYXTeBAAAbGliZmFhYyAxLjI4AABCAJMgBDIARwAAArEGBf//rdxF6b3m2Ui3lizYINkj7u94MjY0IC0gY29yZSAxNDIgcjIgOTU2YzhkOCAtIEguMjY0L01QRUctNCBBVkMgY29kZWMgLSBDb3B5bGVmdCAyMDAzLTIwMTQgLSBodHRwOi8vd3d3LnZpZGVvbGFuLm9yZy94MjY0Lmh0bWwgLSBvcHRpb25zOiBjYWJhYz0wIHJlZj0zIGRlYmxvY2s9MTowOjAgYW5hbHlzZT0weDE6MHgxMTEgbWU9aGV4IHN1Ym1lPTcgcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0xNiBjaHJvbWFfbWU9MSB0cmVsbGlzPTEgOHg4ZGN0PTAgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz02IGxvb2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTI1MCBrZXlpbnRfbWluPTI1IHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NDAgcmM9Y3JmIG1idHJlZT0xIGNyZj0yMy4wIHFjb21wPTAuNjAgcXBtaW49MCBxcG1heD02OSBxcHN0ZXA9NCB2YnZfbWF4cmF0ZT03NjggdmJ2X2J1ZnNpemU9MzAwMCBjcmZfbWF4PTAuMCBuYWxfaHJkPW5vbmUgZmlsbGVyPTAgaXBfcmF0aW89MS40MCBhcT0xOjEuMDAAgAAAAFZliIQL8mKAAKvMnJycnJycnJycnXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXiEASZACGQAjgCEASZACGQAjgAAAAAdBmjgX4GSAIQBJkAIZACOAAAAAB0GaVAX4GSAhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGagC/AySEASZACGQAjgAAAAAZBmqAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZrAL8DJIQBJkAIZACOAAAAABkGa4C/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmwAvwMkhAEmQAhkAI4AAAAAGQZsgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGbQC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm2AvwMkhAEmQAhkAI4AAAAAGQZuAL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGboC/AySEASZACGQAjgAAAAAZBm8AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZvgL8DJIQBJkAIZACOAAAAABkGaAC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmiAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpAL8DJIQBJkAIZACOAAAAABkGaYC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmoAvwMkhAEmQAhkAI4AAAAAGQZqgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGawC/AySEASZACGQAjgAAAAAZBmuAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZsAL8DJIQBJkAIZACOAAAAABkGbIC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm0AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZtgL8DJIQBJkAIZACOAAAAABkGbgCvAySEASZACGQAjgCEASZACGQAjgAAAAAZBm6AnwMkhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AAAAhubW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAD6AAABDcAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAzB0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAA+kAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAALAAAACQAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAPpAAAAAAABAAAAAAKobWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAB1MAAAdU5VxAAAAAAALWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAABWaWRlb0hhbmRsZXIAAAACU21pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAhNzdGJsAAAAr3N0c2QAAAAAAAAAAQAAAJ9hdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAALAAkABIAAAASAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGP//AAAALWF2Y0MBQsAN/+EAFWdCwA3ZAsTsBEAAAPpAADqYA8UKkgEABWjLg8sgAAAAHHV1aWRraEDyXyRPxbo5pRvPAyPzAAAAAAAAABhzdHRzAAAAAAAAAAEAAAAeAAAD6QAAABRzdHNzAAAAAAAAAAEAAAABAAAAHHN0c2MAAAAAAAAAAQAAAAEAAAABAAAAAQAAAIxzdHN6AAAAAAAAAAAAAAAeAAADDwAAAAsAAAALAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAAiHN0Y28AAAAAAAAAHgAAAEYAAANnAAADewAAA5gAAAO0AAADxwAAA+MAAAP2AAAEEgAABCUAAARBAAAEXQAABHAAAASMAAAEnwAABLsAAATOAAAE6gAABQYAAAUZAAAFNQAABUgAAAVkAAAFdwAABZMAAAWmAAAFwgAABd4AAAXxAAAGDQAABGh0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAACAAAAAAAABDcAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAQkAAADcAABAAAAAAPgbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAC7gAAAykBVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAADi21pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAADT3N0YmwAAABnc3RzZAAAAAAAAAABAAAAV21wNGEAAAAAAAAAAQAAAAAAAAAAAAIAEAAAAAC7gAAAAAAAM2VzZHMAAAAAA4CAgCIAAgAEgICAFEAVBbjYAAu4AAAADcoFgICAAhGQBoCAgAECAAAAIHN0dHMAAAAAAAAAAgAAADIAAAQAAAAAAQAAAkAAAAFUc3RzYwAAAAAAAAAbAAAAAQAAAAEAAAABAAAAAgAAAAIAAAABAAAAAwAAAAEAAAABAAAABAAAAAIAAAABAAAABgAAAAEAAAABAAAABwAAAAIAAAABAAAACAAAAAEAAAABAAAACQAAAAIAAAABAAAACgAAAAEAAAABAAAACwAAAAIAAAABAAAADQAAAAEAAAABAAAADgAAAAIAAAABAAAADwAAAAEAAAABAAAAEAAAAAIAAAABAAAAEQAAAAEAAAABAAAAEgAAAAIAAAABAAAAFAAAAAEAAAABAAAAFQAAAAIAAAABAAAAFgAAAAEAAAABAAAAFwAAAAIAAAABAAAAGAAAAAEAAAABAAAAGQAAAAIAAAABAAAAGgAAAAEAAAABAAAAGwAAAAIAAAABAAAAHQAAAAEAAAABAAAAHgAAAAIAAAABAAAAHwAAAAQAAAABAAAA4HN0c3oAAAAAAAAAAAAAADMAAAAaAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw"),await t.met(),!e&&await t.pet(i,!1)?"all":await t.pet(i,!0)?"muted":"none")}static async pet(t,i){t.muted=i;const e=t.play();try{if(!Id(e))return!fi.Qs;const t=Di(250);return await Promise.race([e,t]),!0}catch(t){return!1}finally{t.pause(),t.muted=!0}}static met(){return new Promise((t=>{if("function"==typeof MessageChannel){const i=new MessageChannel;i.port1.onmessage=()=>t(),i.port2.postMessage("")}else u(t,0)}))}gn(){this.wet.gn()}constructor(t){this.kB=t,this.wet=new ls}},ret:UR,het:s});var QR=class t{async TP(i){if(!vw(i.type))return!1;const e=i.contentProtection;if(e&&!Qg(e)){if(!Gg(e))return!1;if(!await t.yet(e))return!1}return!0}static async yet(t){return!(!t.playready||!await i.kC())||(!(!t.widevine||!await i.EC())||(!(!t.clearkey||!await i.LC())||!!await i.RC()))}},FR=class extends QR{async TP(t){return!!_C(t.useManagedMediaSource)&&super.TP(t)}};function Wi(t){return Wa(t)}function La(t,i){const e=Wa(t);return i?""+e+i:""+e}var M,zi=class{async Met(t){return(await this.Net.Tet(t.map(Wi))).shift()}Det(t,i){const e=La(t,i);return this.Iet.zb(e)}async Eet(t,i){var e;const s=La(t,i);return null==(e=await this.bet.Pb(s))?void 0:e.data}DH(t){return this.Let.Pb(t)}constructor(t,i,e,s){this.Net=t,this.Iet=i,this.bet=e,this.Let=s}},YR=class{ket(t){return Promise.resolve(!1)}Cet(t){return Promise.reject(GR)}xet(t){return Promise.reject(GR)}zb(t){return Promise.resolve(!1)}Pb(t){return Promise.resolve(void 0)}Oet(t,i){return Promise.resolve(void 0)}Tet(t){return Promise.resolve([])}jet(){return Promise.resolve([])}zet(t){return Promise.resolve([])}Pet(t,i){return Promise.resolve([])}TT(t){return Promise.reject(GR)}Bet(t){return Promise.reject(GR)}Ret(){return Promise.reject(GR)}},GR="Storage disabled",VR="Storage disabled",cu=class{get Uet(){return this.qd.Vb}async ket(t){return(this.Qet||await this.Uet).ket(t)}async Cet(t,i){return(this.Qet||await this.Uet).Cet(t,i)}async xet(t,i){return(this.Qet||await this.Uet).xet(t,i)}async zb(t){return(this.Qet||await this.Uet).zb(t)}async Pb(t){return(this.Qet||await this.Uet).Pb(t)}async Oet(t,i){return(this.Qet||await this.Uet).Oet(t,i)}async Tet(t){return(this.Qet||await this.Uet).Tet(t)}async jet(){return(this.Qet||await this.Uet).jet()}async zet(t){return(this.Qet||await this.Uet).zet(t)}async Pet(t,i){return(this.Qet||await this.Uet).Pet(t,i)}async TT(t){return(this.Qet||await this.Uet).TT(t)}async Bet(t){return(this.Qet||await this.Uet).Bet(t)}async Ret(){return(this.Qet||await this.Uet).Ret()}constructor(t){this.qd=new Rs,this.Qet=void 0,this.qd.Zd(t),this.qd.Vb.then((t=>{this.Qet=t}))}},WR=class{get Fet(){return this.qd.Vb}async Yet(t){const i=this.Get||await this.Fet;return await i.Yet(t)}constructor(t){this.qd=new Rs,this.Get=void 0,this.qd.Zd(t);const i=this.qd.Vb;i.then((t=>{this.Get=t})),this.Vet=new cu(i.then((t=>t.Vet))),this.Wet=new cu(i.then((t=>t.Wet))),this.Het=new cu(i.then((t=>t.Het))),this.qet=new cu(i.then((t=>t.qet))),this.Xet=new cu(i.then((t=>t.Xet)))}};function Ee(t){return new g("This storage cannot handle persistency type "+t)}!function(t){t.Zet="readonly",t.Ket="readwrite"}(M||(M={}));var HR=class{ket(t){return Promise.resolve("temporary"===t)}Cet(t,i){return void 0===i&&(i="temporary"),"temporary"!==i?Promise.reject(Ee(i)):(this.Jet(t.key),this.NL.push(t),Promise.resolve())}xet(t,i){if(void 0===i&&(i="temporary"),"temporary"!==i)return Promise.reject(Ee(i));for(const i of t)this.Jet(i.key);for(const i of t)this.NL.push(i);return Promise.resolve()}zb(t){return Promise.resolve(Boolean(this.$et(t)))}Pb(t){return Promise.resolve(this.$et(t))}Oet(t,i){return Promise.resolve(this.tst(t,i))}Tet(t){const i=t?t.map((t=>this.$et(t))):this.NL;return Promise.resolve(i.filter(Dd))}jet(){return Promise.resolve([...this.NL])}zet(t){return this.Pet(t,"key")}Pet(t,i){const e=this.NL.filter((e=>e[i]===t));return Promise.resolve(e)}TT(t){return this.Jet(t),Promise.resolve()}Bet(t){for(const i of t)this.Jet(i);return Promise.resolve()}Ret(){return No(this.NL),Promise.resolve()}$et(t){return this.tst(t,"key")}tst(t,i){for(const e of this.NL)if(e[i]===t)return e}Jet(t){const i=this.$et(t);i&&_s(this.NL,i)}constructor(){this.NL=[]}},Gr=class t{static J8(){return Promise.resolve(new t)}Yet(t){return t(this)}constructor(){this.Wet=new HR,this.Vet=new HR,this.Het=new HR,this.qet=new HR,this.Xet=new HR}},Fo=class{async ket(t){for(let i of this.ist)if(await i.ket(t))return!0;return!1}async Cet(t,i){void 0===i&&(i="persistent");for(let e of this.ist)if(await e.ket(i))return e.Cet(t);throw Ee(i)}async xet(t,i){void 0===i&&(i="persistent");for(let e of this.ist)if(await e.ket(i))return e.xet(t);throw Ee(i)}async zb(t){for(let i of this.ist)if(await i.zb(t))return!0;return!1}async Pb(t){for(let i of this.ist){const e=await i.Pb(t);if(e)return e}}async Oet(t,i){for(let e of this.ist){const s=await e.Oet(t,i);if(s)return s}}async Tet(t){const i=[];for(let e of this.ist)i.push(...await e.Tet(t));return i}async jet(){const t=[];for(let i of this.ist)t.push(...await i.jet());return t}async zet(t){const i=[];for(let e of this.ist)i.push(...await e.zet(t));return i}async Pet(t,i){const e=[];for(let s of this.ist)e.push(...await s.Pet(t,i));return e}async TT(t){for(let i of this.ist)await i.TT(t)}async Bet(t){for(let i of this.ist)await i.Bet(t)}async Ret(){for(let t of this.ist)await t.Ret()}constructor(t){this.ist=t}};function qR(t){return async()=>{const i=await Promise.all(t.map((t=>t())));return XR.J8(i)}}var XR=class t{static J8(i){return Promise.resolve(new t(i))}get qet(){return this.sst}get Xet(){return this.nst}get Het(){return this.rst}get Wet(){return this.hst}get Vet(){return this.ost}Yet(i){if(0===this.ast.length)return i(this);const e=[];let s=0;const n=r=>(e.push(r),s++,s<this.ast.length?this.ast[s].Yet(n):i(new t(e)));return this.ast[s].Yet(n)}constructor(t){this.ast=t,this.sst=new Fo(t.map((t=>t.qet))),this.nst=new Fo(t.map((t=>t.Xet))),this.rst=new Fo(t.map((t=>t.Het))),this.hst=new Fo(t.map((t=>t.Wet))),this.ost=new Fo(t.map((t=>t.Vet)))}},Al=class t{static wa(i){t.gz.wa(i)}static get yb(){return t.ust||(t.ust=t.gz.J8()),t.ust}};function ZR(t){return void 0!==t.r_}function KR(t){const e=fi.NE||fi.pE,s=void 0!==t&&void 0!==t.preferredAudioCodecs&&t.preferredAudioCodecs.some((t=>"ac-3"===t||"ec-3"===t)),n=e&&!s,r=new fC(!0);return async t=>{const e=t.Fz;if(!r.F$(e)&&!function(t,i){return!!t&&(Bt(t)?im(i)||sm(i):It(t,Dt.APPLICATION_TTML_XML)||It(t,Dt.TEXT_VTT)||It(t,Dt.IMAGE_JPEG))}(t.SF,t.cst))return!1;const s=t.cst.some((t=>"ac-3"===t||"ec-3"===t));if(n&&s)return!1;if(t.dst){const s=t.dst,n=xl(s,(t=>Bm(t.lst))).filter(Dd),r=await async function(t,i){for(const e of t)if(await i(e))return!0;return!1}(n,(t=>i.jC(t,e)));if(!r)return!1}return!0}}Al.gz=new class{J8(){return new WR(this.fst())}async fst(){this._st&&(await Promise.resolve(),this._st=!1);for(const t of this.gst)try{return await qR([Gr.J8,t])()}catch(t){}return await qR([Gr.J8,this.wst])()}wa(t){if(!this._st)throw new g("Registration overdue");this.gst.push(t)}constructor(t){this.gst=[],this._st=!0,this.wst=t}}(class t{static J8(){return Promise.resolve(new t)}Yet(t){return Promise.reject(VR)}constructor(){this.Wet=new YR,this.Vet=new YR,this.Het=new YR,this.qet=new YR,this.Xet=new YR}}.J8),Al.ust=void 0;var Es,JR=class{get Ti(){return this.Ast.offsetHeight*i.Ys.c2}get ji(){return this.Ast.offsetWidth*i.Ys.c2}constructor(t){this.Ast=t}},$R=class{get nt(){return this.Dl}wI(t,i,e,s,n,r,h,o){const a=new Pr(t,i,e,s,n,r,h,void 0,o);return this.Dl.tt(a),this.t3.tt(a),a}NI(t){this.Dl.it(t),this.t3.it(t),t.gn()}tr(){for(const t of this.Dl.og.slice())t.gn();this.Dl.tr(),this.t3.tr()}gn(){this.tr(),this.Dl.gn(),this.t3.gn()}constructor(t,i){this.Dl=new Zi,this.t3=new Px(t,i)}},rn=class{MP(t){return this.gz.MP(t)}let(t){return this.gz.let(t)}rP(t){return this.gz.rP(t)}constructor(t){this.gz=t}},Bu=class extends Bo{get vst(){return this.sA}get wf(){return this.Af()}Af(){return this.sA.wf}get vf(){return this.mf()}mf(){return this.sA.vf}get Mf(){return this.Tf()}Tf(){return this.sA.Mf}get Iu(){return this.sA.Iu}get ct(){return this.Td()}Td(){return this.sA.ct}get Bz(){return this.mst()}mst(){return this.sA.Bz}get Sf(){return this.pst()}pst(){return this.sA.Sf}get lt(){return this.sA.lt}get Ti(){return this.sA.Ti}get ji(){return this.sA.ji}get ya(){return this.w_()}w_(){return this.sA.ya}get Pf(){return this.sA.Pf}set Pf(t){this.sA.Pf=t}get Ff(){return this.yst()}yst(){return this.sA.Ff}get Gf(){return this.sA.Gf}set Gf(t){this.sA.Gf=t}get Hf(){return this.qf()}qf(){return this.sA.Hf}get Jf(){return this.$f()}$f(){return this.sA.Jf}get t_(){return this.i_()}i_(){return this.sA.t_}get e_(){return this.s_()}s_(){return this.sA.e_}get l0(){return this.Mst()}Mst(){return this.sA.l0}get T0(){return this.Tst()}Tst(){return this.sA.T0}get nt(){return this.n_()}n_(){return this.Nst}get Ol(){return this.m5()}m5(){return this.sA.Ol}get A2(){return this.sA.A2}get c_(){return this.sA.c_}set c_(t){this.sA.c_=t}get X3(){return this.sA.X3}get xf(){return this.sA.xf}get W4(){return this.sA.W4}get nP(){return this.Dst()}set nP(t){this.Sst(t)}Dst(){return this.sA.nP}Sst(t){this.sA.nP=t}get t5(){return this.sA.t5}set t5(t){this.Ist(t)}Ist(t){this.sA.t5=t}get z4(){return this.Est()}Est(){return this.sA.z4}zf(){return this.sA.zf()}p_(){return this.sA.p_()}m_(){this.sA.m_()}Dm(t,i,e){this.sA.Dm(t,i,e)}kz(t){this.sA.kz(t)}ge(){this.sA.ge()}be(){this.sA.be()}wI(t,i,e,s,n,r,h,o){return this.sA.wI(t,i,e,s,n,r,h,o)}Zz(){return this.sA.Zz()}Jz(t,i,e,s,n){return this.sA.Jz(t,i,e,s,n)}NI(t){this.sA.NI(t)}tP(){this.sA.tP()}Eq(t){return this.sA.Eq(t)}async $n(t){const i=await this.sA.$n(t);let e;return e=t.Rg===I.Qx?this.bst(i):this.Lst(i),this.Pz=e,e}async tr(){this.Pz&&(await this.Pz.Qd(),this.Pz=void 0),await this.sA.tr()}H3(){this.sA.H3()}q3(){this.sA.q3()}async Qd(){this.Vo(),this.sA.fn(JL,this.kst),this.Nst.fg=void 0,this.Nst.gn(),this.Pz&&(await this.Pz.Qd(),this.Pz=void 0)}K3(){this.sA.K3()}Cst(t){this.sA.fn(JL,this.kst),this.sA=t,this.Nst.fg=t.nt,this.sA.yn(JL,this.kst)}I_(t){this.Co(t)}constructor(t){super(),this.Pz=void 0,this.Nst=new lc,this.kst=t=>this.I_(t),this.sA=t,this.Nst.fg=t.nt,this.sA.yn(JL,this.kst)}},tU=class extends Bu{get jz(){return this.sA.jz}get m0(){return this.sA.m0}get g_(){return this.sA.g_}set g_(t){this.sA.g_=t}J3(t){this.sA.J3(t)}t2(){this.sA.t2()}D_(){this.sA.D_()}constructor(t){super(t)}},iU=class{get wd(){return this.IC()}IC(){return this.Pz.wd}get t_(){return this.i_()}i_(){return this.Pz.t_}get rt(){return this.Pz.rt}aq(t){return this.Pz.aq(t)}cq(t){return this.Pz.cq(t)}Qd(){return Promise.resolve()}constructor(t){this.Pz=t}},qs=class extends iU{get B$(){return this.Y$}get R$(){return this.G$}get wf(){return this.Af()}Af(){return this.Pz.wf}get ct(){return this.Td()}Td(){return this.Pz.ct}get Dq(){return this.xst()}xst(){return this.Pz.Dq}W$(t){this.Pz.W$(t)}Z$(t,i,e,s){this.Pz.Z$(t,i,e,s)}HJ(){this.Pz.HJ()}PJ(){this.Pz.PJ()}Qd(){return this.Y$&&(this.Y$.Qd(),this.Y$=void 0),this.G$&&(this.G$.Qd(),this.G$=void 0),super.Qd()}Ost(t){this.Pz=t,this.Y$?t.B$?this.Y$.jst(t.B$):(this.Y$.Qd(),this.Y$=void 0):t.B$&&(this.Y$=this.zst(t.B$),this.Y$.yn(qn,this.Pst)),this.G$?t.R$?this.G$.jst(t.R$):(this.G$.Qd(),this.G$=void 0):t.R$&&(this.G$=this.zst(t.R$),this.G$.yn(qn,this.Pst))}Bst(t){}constructor(t){super(t),this.Y$=void 0,this.G$=void 0,this.Pst=t=>this.Bst(t)}},eU=class extends Bo{get yW(){return this.bW}set yW(t){this.bW=t}get wf(){return ce.MB()}get wd(){return this.sx}get XJ(){return f.tT}get KJ(){return ce.MB()}get Rst(){return!1}get AW(){return this.SW}set AW(t){this.SW=t}oJ(t,i,e){return Promise.reject(new g("Invalid media buffer"))}e$(){return Promise.reject(new g("Invalid media buffer"))}cJ(t,i,e){return Promise.reject(new g("Invalid media buffer"))}Dq(){return!1}HJ(){}t$(t,i){}i$(t,i){}TT(t,i,e){return Promise.resolve()}NJ(t,i){return Promise.reject(new g("Invalid media buffer"))}kT(t,i){return Promise.reject(new g("Invalid media buffer"))}aq(t){return!1}cq(t){return Promise.reject(new g("Invalid media buffer"))}Qd(){this.Vo()}constructor(t){super(),this.SW=0,this.bW=0,this.sx=t}},Xe=class extends Bo{get yW(){return this.Ust()}set yW(t){this.Qst(t)}Ust(){return this.Fst.yW}Qst(t){this.Fst.yW=t}get wf(){return this.Af()}Af(){return this.Fst.wf}get wd(){return this.IC()}IC(){return this.Fst.wd}get XJ(){return this.Fst.XJ}get KJ(){return this.Yst()}Yst(){return this.Fst.KJ}get AW(){return this.Gst()}set AW(t){this.Vst(t)}Gst(){return this.Fst.AW}Vst(t){this.Fst.AW=t}oJ(t,i,e){return this.Fst.oJ(t,i,e)}e$(){return this.Fst.e$()}cJ(t,i,e){return this.Fst.cJ(t,i,e)}Dq(){return this.Fst.Dq()}HJ(){this.Fst.HJ()}t$(t,i){this.Fst.t$(t,i)}i$(t,i){this.Fst.i$(t,i)}TT(t,i,e){return this.Fst.TT(t,i,e)}NJ(t,i){return this.Fst.NJ(t,i)}aq(t){return this.Fst.aq(t)}cq(t){return this.Fst.cq(t)}I_(t){this.Co(t)}Qd(){this.Vo(),this.jst(new eU(this.wd))}jst(t){this.Fst.fn(qn,this.Wst),this.Fst=t,this.Fst.yn(qn,this.Wst)}constructor(t){super(),this.Wst=t=>this.I_(t),this.Fst=t,this.Fst.yn(qn,this.Wst)}},sU=class extends Xe{get uet(){return this.sA}set uet(t){this.sA=t}async oJ(t,i,e){return fo(e),await this.Hst(this.sA.Mf,null==i?void 0:i.Z8,null==i?void 0:i.ct),fo(e),t.Rg===dt.US?await this.qst(t,i,e):await this.Xst(t,i,e)}async qst(t,i,e){let s=t;for(;;){const[t,n]=Yb(s.Om);s={Rg:dt.US,Om:t};try{return await this.Zst(s,i,e),void n.cancel(new is).catch(qo)}catch(t){if(Ar(t)){if(await this.Hst(this.sA.Mf,i.Z8,i.ct,e)){s={Rg:dt.US,Om:n};continue}}throw n.cancel(t).catch(qo),t}}}async Xst(t,i,e){for(;;)try{return fo(e),await this.Zst(t,i,e)}catch(t){if(Ar(t)){if(await this.Hst(this.sA.Mf,i.Z8,i.ct,e))continue}throw t}}async Hst(t,i,e,s){const n=pL(t,i,e,this.wf,this.AW,this.yW);for(const[t,i]of n)await this.Kst(t,i,s);return n.length>0}Zst(t,i,e){return super.oJ(t,i,e)}Kst(t,i,e){return super.TT(t,i,e)}constructor(t){super(t),this.sA=void 0}},ch=class extends qs{get uet(){return this.sA}set uet(t){this.sA=t,this.Y$&&(this.Y$.uet=t),this.G$&&(this.G$.uet=t)}zst(t){const i=new sU(t);return i.uet=this.sA,i}constructor(t){super(t),this.sA=void 0,this.Ost(t)}},et=class extends iU{get Xf(){return this.Pz.Xf}set Xf(t){this.Pz.Xf=t}},nU=class extends Bu{get jz(){return this.sA.jz}get m0(){return this.sA.m0}get a_(){return this.sA.a_}get r_(){return this.sA.r_}get g_(){return this.sA.g_}set g_(t){this.sA.g_=t}J3(t){this.sA.J3(t)}t2(){this.sA.t2()}D_(){this.sA.D_()}A_(){return this.sA.A_()}constructor(t){super(t)}},rU=class extends tU{get vst(){return this.sA}Lst(t){const i=new ch(t);return i.uet=this,i}bst(t){return new et(t)}},hU=class extends nU{get vst(){return this.sA}Lst(t){const i=new ch(t);return i.uet=this,i}bst(t){return new et(t)}},Xc=class extends rn{MP(t){return t===f.Am?new hU(super.MP(t)):t===f.vm?new rU(super.MP(t)):void 0}async rP(t){const i=t;await i.Qd(),await super.rP(i.vst)}},oU=class{Jst(){this.Qo.S_()}gn(){s.removeEventListener("pageshow",this.$st)}constructor(t){this.$st=t=>{t.persisted&&this.Jst()},this.Qo=t,s.addEventListener("pageshow",this.$st)}},aU=class{tnt(t,i,e){return Promise.resolve()}int(t,i,e,s){let n=[];if(s){const r={xD:i.RT,OD:i.UT,jD:e.ent.jD};s.Rg===Wt.TTML?n=Ov(t,s,r,e.SF):s.Rg===Wt.WEBVTT&&(n=VA(t,r).L)}return n}tr(){}};!function(t){t.Wv="vttc",t.snt="vsid",t.nnt="iden",t.rnt="ctim",t.hnt="sttg",t.ont="payl",t.ant="vtte",t.unt="vtta"}(Es||(Es={}));var nu=class t{static cnt(i){return Boolean(t.dnt[i])}static dp(i){const e=[],s=Nt.qm(new Ea(i,new Ha));for(const i of s)t.cnt(i.Rg)&&e.push(t.dnt[i.Rg](i.Om));return e}static lnt(i){const e=Nt.qm(i),s=Et(e,Es.snt),n=Et(e,Es.nnt),r=Et(e,Es.rnt),h=Et(e,Es.hnt),o=Et(e,Es.ont);return{Rg:Es.Wv,fnt:s?t._nt(s):void 0,gnt:n?t.wnt(n):void 0,Ant:r?t.vnt(r):void 0,mnt:h?t.pnt(h):void 0,ynt:o?t.Mnt(o):void 0}}static _nt(t){return{Rg:Es.snt,Tnt:t.Rm()}}static wnt(t){return{Rg:Es.nnt,gnt:t.Gm()}}static vnt(t){return{Rg:Es.rnt,Nnt:t.Gm()}}static pnt(t){return{Rg:Es.hnt,Dnt:t.Gm()}}static Mnt(t){return{Rg:Es.ont,Snt:t.Gm()}}static Int(t){return{Rg:Es.ant}}static Ent(t){return{Rg:Es.unt,bnt:t.Gm()}}};nu.dnt={[Es.Wv]:nu.lnt,[Es.ant]:nu.Int,[Es.unt]:nu.Ent};var uU=class{tnt(t,i,e){const s=new DataView(t.Lnt),n=Eh.dp(s),r=Po(n,(t=>t.Rg===he.Av));return r&&(this.knt=r.Z[0].jp.ep.bp),Promise.resolve()}int(t,i,e){if(S(this.knt))return[];const s=hl(t),n=Eh.dp(s),r=xg(n,he.Zv),h=xg(n,he.hm);if(!r||0===r.Z.length||!h)return[];const o=function(t,i,e){const s=t.Z[0],n=s.yM?s.yM.yM.toNumber()/e:i.RT,r=[];for(const t of s.pM)r.push(...t.IM);return{Cnt:n,IM:r}}(r,i,this.knt),a=e.ent.jD;return function(t,i,e,s){const n=nu.dp(hl(i.Om)),r=t.IM,h=t.Cnt+s,o=[];let a=0;for(let t=0;t<r.length;t++){const i=r[t],s=n[t];var u;const c=(null!=(u=i.ct)?u:0)/e;let d;s.Rg===Es.Wv&&(d=cU(s,a,c,h)),d&&o.push(d),a+=c}return o}(o,h,this.knt,a)}tr(){this.knt=NaN}constructor(){this.knt=NaN}};function cU(t,i,e,s){if(!t.ynt)return void 0;const n=t.Ant?function(t){return nv(t.Nnt,new Ha(0))}(t.Ant):i,r=s+n,h=r+e,o=t.ynt.Snt;return new mA(r,h,o,!1)}var Zn,ri,dU=class t extends F{get xnt(){return this.Ont}set xnt(t){this.Ont=t}get Rt(){for(const t of this.Z.og)if(t.jg!==L.Ch)return!0;return!1}async $n(t){await this.tr(),this.jnt=t,this.znt(t)}znt(t){for(const i of t.Pnt){const t=this.Bnt(i);this.Rnt(t,i),t.Jf=Rt.LOADED,this.tt(t)}}it(t){this.Unt(t),super.it(t)}OS(t){const i=this.Qnt(t);if(i&&this.xnt!==i){this.xnt=i;for(const t of this.Z.og)t!==i&&(t.jg=L.Ch)}}jS(t){const i=this.Qnt(t);i&&this.xnt===i&&(this.xnt=void 0)}Qnt(t){return Po(this.Z.og,(i=>t.Mg===i.Mg))}Rnt(t,i){this.Fnt.set(t.Mg,i)}Ynt(t){return this.Fnt.get(t.Mg)}Unt(t){this.Fnt.delete(t.Mg)}Gnt(){if(!this.xnt)return;const i=this.Ynt(this.xnt);return i?t.Vnt(i):void 0}static Vnt(t){return t.Wnt&&t.Wnt.length>0?t.Wnt[0]:void 0}constructor(...t){super(...t),this.Fnt=Y()}};function lU(t,i){const e=i._B(((i,e)=>t.dB(i,e,!1,!1)));return t.rB(e)}function fU(t,i){const e=i.Sn(t.iB())._B(((i,e)=>t.gr(e)));return t.rB(e)}!function(t){t[t.cR=0]="cR",t[t.Hnt=1]="Hnt",t[t.qnt=10]="qnt",t[t.Xnt=11]="Xnt",t[t.Znt=12]="Znt",t[t.Knt=13]="Knt",t[t.Jnt=14]="Jnt",t[t.$nt=15]="$nt",t[t.trt=20]="trt",t[t.irt=21]="irt",t[t.ert=22]="ert",t[t.nrt=23]="nrt",t[t.rrt=24]="rrt",t[t.hrt=30]="hrt",t[t.ort=31]="ort",t[t.art=32]="art",t[t.urt=33]="urt",t[t.crt=34]="crt",t[t.drt=35]="drt",t[t.lrt=40]="lrt",t[t.frt=41]="frt",t[t._rt=42]="_rt",t[t.grt=43]="grt",t[t.wrt=44]="wrt",t[t.Art=50]="Art",t[t.vrt=51]="vrt",t[t.mrt=60]="mrt",t[t.prt=61]="prt",t[t.yrt=62]="yrt",t[t.Mrt=63]="Mrt",t[t.Trt=70]="Trt",t[t.Nrt=71]="Nrt",t[t.Drt=72]="Drt",t[t.Srt=73]="Srt",t[t.Irt=74]="Irt",t[t.Ert=75]="Ert",t[t.brt=76]="brt",t[t.Lrt=77]="Lrt",t[t.krt=90]="krt",t[t.Crt=91]="Crt"}(Zn||(Zn={})),function(t){t.xrt="Ort",t.jrt="zrt"}(ri||(ri={}));var _U,gU=class extends Jo{constructor(t,i,e){super("Prt"),this.Cn=t,this.jn=i,this.Brt=e}},wU=class extends Yi{constructor(){super("Rrt")}};!function(t){t.Urt="Qrt",t.Frt="Yrt",t.Grt="Vrt",t.cR="Wrt"}(_U||(_U={}));var AU=[Co.Tw,Co.Dw,Co.Mw,Co.Yg],vU=class extends Bo{get Hrt(){var t,i;return(null==(t=this.Xrt.qrt)?void 0:t.Brt)||(null==(i=this.Xrt.Zrt)?void 0:i.Brt)}get Krt(){return this.Jrt}set $rt(t){this.Xrt.$rt=t}get $rt(){return this.Xrt.$rt}get SS(){return this.tht}iht(t){this.tht!==t&&(this.tht=t,this.Co(new wU))}get eht(){return this.Jrt.Lt.eht}get lt(){return this.xz}async Cn(t){if(!this.sht&&!this.nht)return;const i=this.df("Rrt");this.sht?(this.rht.Xd(),this.rht=new er,this.hht(this.rht.Hd)):(this.oht.Qb(void 0),this.oht=new Rs),await i}get sht(){return"Qrt"===this.tht}get nht(){return"Yrt"===this.tht}get aht(){return"Vrt"===this.tht}get uht(){return"Wrt"===this.tht}async y_(t){if(this.aht||this.nht)for(0,this.rht.Xd();!this.sht&&!this.uht;)await this.df("Rrt")}async tr(t){this.uht?(this.xz=void 0,this.iht("Qrt")):await this.y_(t),this.Xrt.tr(),this.Jrt.tr()}yP(t){this.xz=t,this.iht("Wrt"),this.Co(new fh(t))}cht(){this.J4.yn(Co.Iw,this.od),this.J4.yn([Co.yw,Co.hw],this.We),this.Xrt.yn(AU,this.Ds),this.dht.yn(ri.xrt,this.od)}fht(){this.J4.fn(Co.Iw,this.od),this.J4.fn([Co.yw,Co.hw],this.We),this.Xrt.fn(AU,this.Ds),this.dht.fn(ri.xrt,this.od)}async _ht(t){this.fht(),this.ght.Xd(),await this.y_(null!=t?t:Zn.grt),this.Xrt.tr()}async wht(t){this.cht(),await this.Cn(null!=t?t:Zn.$nt)}async gn(){this.Vo(),this.fht(),this.ght.Xd(),await this.y_(Zn.wrt),this.Xrt.gn()}async hht(t){for(;;)try{fo(t),this.iht("Vrt"),await this.Xrt.Aht(t),fo(t),this.iht("Yrt"),await ji(this.oht.Vb,t)}catch(t){if(Mi(t))this.iht("Qrt");else{const i=t instanceof $i?t:new $i(td.MEDIA_LOAD_ERROR,t.message,t);this.yP(i)}break}}async vht(t){fo(t),await this.y_(Zn._rt),this.Xrt.tr(),fo(t),await this.Cn(Zn.Knt)}constructor(t,e,s,n,r){super(),this.mht=t,this.dht=e,this.Jrt=s,this.Xrt=n,this.J4=r,this.tht="Qrt",this.xz=void 0,this.oht=new Rs,this.ght=new er,this.rht=new er,this.We=t=>{this.sht||this.uht||!i.Git&&this.Xrt.pht(t.currentTime)||(this.ght.Xd(),this.ght=new er,this.vht(this.ght.Hd).catch(Ah))},this.od=Is((()=>{if(this.nht){try{this.Xrt.yht();if(this.Xrt.Mht())return}catch(t){if(!(t instanceof gU))throw t}this.Cn(Zn.Jnt)}}),250),this.cht()}},mU=class t{Tht(t,i){return this.Nht(t,!1,i)}Dht(t,i){return this.Nht(t,!0,i)}async Nht(i,e,s){fo(s.Hd);const n=await this.Sht(i,e,s);return n.uV?t.Iht(n):this.Eht(n)}Eht(t){return t}static Iht(t){return t}Sht(t,i,e){var s;const n=new Pc({zu:t.zu,aI:dm.PS,hI:t.bht?{Range:"bytes="+t.bht[0]+"-"+(null!=(s=t.bht[1])?s:"")}:void 0,lI:t.lI,oI:G.GET,Rg:N.VS,cI:i?aa.qS:aa.tT,dI:this.Lht,IS:e.kht,uI:e.uI,Hd:e.Hd,_I:e._I});return this.mI.MS(n)}constructor(t,i){this.mI=t,this.Lht=i}},pU=class{Cht(t,i){const e=this.xht**t,s=i*(1-e)+e*this.Y8;S(s)||(this.Y8=s,this.Oht+=t)}jht(){const t=1-this.xht**this.Oht;return this.Y8/t}constructor(t){this.Y8=0,this.Oht=0,this.xht=_.exp(_.log(.5)/t)}},yU=class{Cht(t,i){const e=8e3*i/t,s=t/1e3;this.zht+=i,this.Pht.Cht(s,e),this.Bht.Cht(s,e)}jht(){return this.Rht()?_.min(this.Pht.jht(),this.Bht.jht()):this.Uht}Rht(){return this.zht>=this.Qht}constructor(t=2,i=5,e=128e3){this.zht=0,this.Uht=pN,this.Pht=new pU(t),this.Bht=new pU(i),this.Qht=e}},MU=class{get Fht(){return this.Yht.jht()}get Rht(){return this.Yht.Rht()}Ght(t){const i=t.Vht,e=this.Wht?t.Hht-t.qht:t.Hht-t.Xht,s=t.Zht;!s&&i<this.Kht||(s?this.Yht.Cht(2*e,i):this.Yht.Cht(e,i))}constructor(t,i){this.Wht=i,!i||t!==f.Am&&t!==f.vm?(this.Kht=16e3,this.Yht=new yU):t===f.Am?(this.Kht=5e3,this.Yht=new yU(.05,1,0)):(this.Kht=0,this.Yht=new yU(.005,.1,0))}},TU=["Nw","Sw"],NU=class extends Bo{async Jht(t,i){let e;for(const s of this.$ht)try{return await s.Jht(t,i)}catch(t){Kc(t),e=t}throw e}async tot(t,i){let e;for(const s of this.$ht)try{return await s.tot(t,i)}catch(t){Kc(t),e=t}throw e}gn(){for(const t of this.$ht)t.fn(TU,this.Ds),t.gn()}constructor(t){super(),this.$ht=t;for(const t of this.$ht)t.yn(TU,this.Ds)}};var DU=class{transform(t,i){this.oL.write(t).catch(qo),i.enqueue(t)}flush(){this.oL.close().catch(qo)}constructor(t){this.oL=t}},Za=class{iot(){return new SU(Ub(this.Lnt),this.eot,this.rot)}constructor(t,i,e){this.Lnt=t,this.eot=i,this.rot=e}},SU=class t{get rV(){return this.hot}nj(t){return bt(this.hot,t)}Sm(){const[i,e]=Yb(this.hot);return this.hot=i,new t(e,this.eot,this.rot)}oot(){const[i,e]=function(t){const i=new De,e=i.writable.getWriter(),s=new De(new DU(e));return t.pipeTo(s.writable).catch((t=>{e.abort(t).catch(qo)})),[s.readable,i.readable]}(this.hot);return this.hot=i,new t(e,this.eot,this.rot)}aot(t){return this.nj(t).then((t=>new Za(t,this.eot,this.rot)))}constructor(t,i,e){this.hot=t,this.eot=i,this.rot=e}},nh=class extends Jo{constructor(t,i,e){super(i,e),this.uot=t}},IU="Cache lookup failed.",EU=class extends Bo{async Jht(t,i){fo(i);const e=await this.cot.Eet(t.zu.zu,t.zu.bht);if(fo(i),!e)throw new nh(t,IU);const s=new Za(e.buffer,e.byteLength,e.reference);return{uot:t.uot,lot:{Rg:dt.$H,Om:s},Brt:t.Brt,zu:t.zu}}async tot(t,i){fo(i);const e=await this.cot.Eet(t.zu,t.bht);if(fo(i),!e)throw new nh(t,IU);const s=new Za(e.buffer,e.byteLength,e.reference);return{Rg:dt.$H,Om:s}}gn(){this.Vo()}constructor(t){super(),this.cot=t}};function ui(t){return bd(t.fot)}function bU(t){return ui(t)?t.fot:t._ot}var LU=class extends Yi{constructor(t,i,e,s,n,r){super(t),this.got=i,this.JU=e,this.wM=s,this.Rp=n,this.dI=r}},kU=class extends LU{constructor(t,i,e,s,n){super(Co.Tw,t,i,e,s,n)}},CU=class{constructor(t,i){this.wot=t,this.Aot=i}},xU=class extends CU{get Vht(){return this.vot}start(){}transform(t,i){this.vot+=t.byteLength,i.enqueue(t)}flush(){this.mot(!1)}Xd(){this.mot(!0)}mot(t){this.wot(this.Aot,i.Jd(),this.Vht,t)}constructor(...t){super(...t),this.vot=0}},OU=class extends CU{get Vht(){return this.vot}start(){this.Aot=i.Jd()}transform(t,i){this.vot+=t.byteLength,this.pot||this.yot(t)&&this.mot(!1),i.enqueue(t)}flush(){}Xd(){this.mot(!0)}yot(t){const i=this.Mot(t),e=this.Tot(i);return Boolean(Po(e,jU))}Mot(t){return this.Not&&void 0!==this.Dot?(this.Not=Qt([this.Not,t]),new Ea(hl(this.Not),new Ha(this.Dot))):(this.Not=t,new Ea(hl(t),new Ha))}Tot(t){const i=Nt.Xm(t.Om,t.jm,!0);return i.Zm?(this.Not=void 0,this.Dot=void 0):this.Dot=t.jm.Ku,i.m}mot(t){this.pot||(this.wot(this.Aot,i.Jd(),this.Vht,t),this.pot=!0)}constructor(...t){super(...t),this.vot=0,this.pot=!1}};function jU(t){return t.Rg===he.hm}var zU=class{Sot(t){const e=t.vV?this.Iot:i.Jd(),s=this.Eot(e),n=new De(s),r=t.rV().pipeTo(n.writable).then((()=>({jf:{Vht:s.Vht}})),(t=>{throw s.Xd(),t}));return this.bot.Zd(r),n.readable}Lot(t){const e=t.vV?this.Iot:i.Jd(),s=t.nj(),n=s.then((t=>{const s=i.Jd();return this.Ght(e,s,t.byteLength,!1),{jf:{Vht:t.byteLength}}}),(t=>{const s=i.Jd();throw this.Ght(e,s,0,!0),t}));return this.bot.Zd(n),s}get kot(){return this.bot.Vb}constructor(t){this.Cot=t,this.bot=new Rs,this.Ght=(t,i,e,s)=>{const n={Xht:this.Iot,qht:t,Hht:i,Vht:e,Zht:s};this.Cot.Ght(n),this.Cot.Rht&&xu.yb.qj(this.Cot.Fht)},this.bot.Vb.catch(qo),this.Iot=i.Jd()}},PU=class extends zU{Eot(t){return new xU(this.Ght,t)}},BU=class extends zU{Eot(t){return new OU(this.Ght,t)}},RU=class extends LU{constructor(t,i,e,s,n,r,h){super(Co.Dw,t,i,e,s,n),this.xot=r,this.gT=h}},ou=class extends Jo{constructor(t,i,e){super("Error downloading segment "+bU(i),t),this.Oot=i.RT,this.jot=i.UT,this.zot=e}},UU=class extends Bo{Pot(){return this.Wht?new BU(this.Cot):new PU(this.Cot)}async Jht(t,i){fo(i);const e=t.Brt,s=t.zu,n=t.uot,r=bU(n),h=e.Brt?e.Brt.Mg:-1,o=function(t){const i=t.Brt;let e;e=i===function(t){return t.Wnt.reduce(((t,i)=>t.cz<i.cz?t:i))}(i.Bot)?Jt(5*t.uot.ct):Jt(1.2*t.uot.ct);return Pe(e,1e3,18e3)}(t);this.Co(new kU(s,e.cz,r,h,e.Rg));try{const t=this.Pot(),a=await this.Rot.Tht(s,{_I:this.Wht,kht:o,Hd:i}),u=await this.Uot(a,a.uV,i,t);return Ys(this.Qot(t.kot,e,s,r,h,a)),{lot:u,Brt:e,uot:n,zu:s}}catch(t){throw Kc(t),new ou(t,n,e)}}async tot(t,i){fo(i);const e=await this.Rot.Dht(t,{_I:false,kht:1e4,Hd:i});return await this.Uot(e,false,i)}async Uot(t,i,e,s){if(i){const i=s?s.Sot(t):t.rV();return{Rg:dt.US,Om:new SU(i)}}{const i=s?await s.Lot(t):await t.nj(e);return{Rg:dt.$H,Om:new Za(i)}}}async Qot(t,i,e,s,n,r){try{const h=await t;this.Co(new RU(e,i.cz,s,n,i.Rg,r.SS,h.jf.Vht))}catch(t){}}gn(){this.Vo()}constructor(t,i,e){super(),this.Rot=t,this.Cot=i,this.Wht=e}};var QU=class{Fot(t,i,e,s,n){const r=new EU(n),h=this.Yot(t,e,s);return new NU([r,h])}Yot(t,i,e){return new UU(t,i,e)}},FU=.001,YU=class{get wf(){return this.Got.wf}get Vot(){return this.Got.Vot}get Cq(){return this.Got.Cq}get Wot(){if(this._$.Jf<oe.Xn)return!1;if(this.Got.jn<=this.Hot&&this.Got.qot())return!0;const t=this.Got.Lz;if(!t||0===t.U)return!1;const i=ce.yB(this.J4.Mf,1/0);return t.Sn(i).oB(this.Got.Cq).mB>=this.CB.IW}get Hot(){const t=this.Got.Lz;let i;if(t&&t.U>0)i=t.jn(0);else{i=this.J4.Mf;const t=this.Got.Cq,e=t.aB(i);e>=0&&(i=t.jn(e))}const e=this.Got.t_.Cn(0);if(e>i){if(this.Got.Cn<=i&&this.Got.jn>=i&&e>i+FU)throw new gU(i,e);i=e}return i=this.Got.Xot.tB(i),i}constructor(t,i,e,s){this.Got=t,this.J4=i,this._$=e,this.CB=s}};var GU=class{get Zot(){if(0===this.Od.size)return ce.MB();let t=ce.yB(0,1/0);return this.Od.forEach((i=>{t=t.Sn(i)})),t}Kot(){let t=ce.MB();return this.Od.forEach((i=>{t=t.rB(i)})),t}Jot(t){let i=!1;return this.Od.forEach((e=>{i=i||e.gr(t)})),i}$ot(t,i){const e=this.Od.get(i.o);return!!e&&e.gr(t)}uB(t,i){let e=!1;return this.Od.forEach((s=>{e=e||s.uB(t,i)})),e}iat(t,i){const e=this.Od.get(i.o).rB(t);this.Od.set(i.o,e)}eat(t){this.Od.forEach(((i,e)=>{const s=i.rB(t);this.Od.set(e,s)}))}sat(t){this.Od.forEach(((i,e)=>{this.Od.set(e,i.Sn(t))}))}tr(){this.Od.forEach(((t,i)=>{this.Od.set(i,ce.MB())}))}constructor(t){this.Od=function(t){const i=Cn();for(const e of t)i.set(e.o,ce.MB());return i}(t)}},VU=class{get nat(){return this.rat}get Cq(){return this.xq}oat(t){for(const i of this.Vet){if(i.aat>t)break;if(i.uat>t)return i}}dat(t){for(const i of this.Vet){if(i.fat>t)break;if(i._at>=t)return i}}gat(t,i){const e=[];for(const s of this.Vet){if(s.aat>t)break;s.uat>=i&&e.push(s)}return e}wat(){return this.Vet}Aat(t,i){const e=ce.yB(t.fat,t._at),s=e.iB();this.rat.sat(s),this.rat.iat(e,i),this.vat(s);const n=Yd(this.Vet,(i=>t.aat<=i.aat));if(n<0)this.Vet.push(t);else{this.Vet[n].uat<=t.uat?this.Vet.splice(n,1,t):this.Vet.splice(n,0,t)}}Oq(t,i){this.xq.iat(t,i)}mat(t){this.xq.eat(t)}sat(t){this.rat.sat(t),this.xq.sat(t);const i=this.rat.Kot();this.vat(i)}vat(t){this.Vet=this.Vet.filter((i=>t.dB(i.fat,i._at))).map((i=>i.pat&&!t.uB(i.fat,i._at)?function(t,i){return{aat:t.aat,uat:t.uat,fat:t.fat,_at:t._at,pat:i}}(i,!1):i))}tr(){this.rat.tr(),this.xq.tr(),this.Vet=[]}gn(){this.tr()}constructor(t){this.Vet=[],this.Lt=t,this.rat=new GU(t.Wnt),this.xq=new GU(t.Wnt)}},WU=class{get $rt(){return this.yat}set $rt(t){this.yat=t}get eht(){return this.Jrt.Lt.eht}async Mat(t,i,e){let s;fo(e);const n=this.Jrt.dat(t);s=n&&be(n._at,t,1e-5)?_.max(n.uat,t):t;const r=this.Tat(s),h=function(t){return HU.bind(void 0,t)}(s);let o=await this.ktt.Nat(h,r,i,e);for(fo(e);o&&this.Dat(o.uot);){const t=KU(o.uot),s=o.Brt;o=await this.ktt.Nat(t,[s],i,e),fo(e)}if(!o)return void 0;if(!this.Sat(o.uot))return o;const a=this.Iat(o.uot);if(t<a.Cn)return await this.findFirstNonAppendedSegmentBeforeSegment(o,i,e,a);if(t>=a.jn)return await this.findFirstNonAppendedSegmentAfterSegment(o,i,e);if(!o.Brt.Eat(o.uot))throw new g("Fatal buffering error")}async findFirstNonAppendedSegmentAfterSegment(t,i,e){let s=t;do{const n=KU(s.uot),r=t.Brt;s=await this.ktt.Nat(n,[r],i,e),fo(e)}while(s&&this.Sat(s.uot));if(s)return s}async findFirstNonAppendedSegmentBeforeSegment(t,i,e,s){let n=t;do{const s=ZU(n.uot),r=t.Brt;n=await this.ktt.Nat(s,[r],i,e),fo(e)}while(n&&this.Sat(n.uot));if(!n){0;const i=t.Brt.bat.Cn;throw new gU(i,s.Cn,t.Brt)}return n}Lat(t){return this.Jrt.nat.Jot(t)}Cat(t){return this.Jrt.gat(t.RT,t.UT)}Sat(t){const i=this.Cat(t);return i.length>0&&function(t,i){return function(t){let i=ce.MB();for(const e of t)i=i.rB(ce.yB(e.aat,e.uat));return i}(t).uB(i.RT,i.UT)}(i,t)&&i.every(JU)}Dat(t){return this.Jrt.Cq.uB(t.RT,t.UT)}Iat(t){const i=this.Cat(t);return{Cn:i[0].fat,jn:i[i.length-1]._at}}Tat(t){const i=this.xat(t);if(0===i.length){const t=this.yat?this.yat:this.Jrt.Lt.Wnt;return[t[t.length-1]]}const e=i.filter((t=>!t.Oat));return e.length>0?e:[i[i.length-1]]}xat(t){return(this.yat?this.yat:this.Jrt.Lt.Wnt).filter((i=>!this.Jrt.Cq.$ot(t,i)))}constructor(t,i,e){this.mht=t,this.Jrt=i,this.ktt=e}};async function HU(t,i,e,s){const n=i.ent.jat(t);if(n){if(i.zat(n)){return(await i.Bat(n,e,s)).Pat(t)}return n}}async function qU(t,i,e,s){if(ui(t)){if(0===t.fot)return;const n=i.ent.Rat(t);if(!n)return;return(await i.Bat(n,e,s)).Uat(t.fot-1)}return i.ent.Qat(t)}async function XU(t,i,e,s){if(ui(t)){const n=i.ent.Rat(t);if(!n)return;const r=await i.Bat(n,e,s);if(t.fot+1===r.U)return;return r.Uat(t.fot+1)}return i.ent.Fat(t)}function ZU(t){return qU.bind(void 0,t)}function KU(t){return XU.bind(void 0,t)}function JU(t){return t.pat}var $U=class{async Nat(t,i,e,s){fo(s);const n=this.Yat(i,e);if(!n)return;const r=await t(n,this.Gat,s);if(!r)return;const h=n.Vat(r);return{Brt:n,uot:r,zu:h}}Yat(t,i){if(0===t.length)return;const e=this.Hat.Wat(t,this.qat?i:void 0,this.Got,this.CB.NW);return this.qat||(this.qat=!0),e}constructor(t,i,e,s){this.Hat=t,this.Got=i,this.CB=e,this.Gat=s,this.qat=!1}},tQ=class{async Nat(t,i,e,s){fo(s);const n=this.Hat.Xat(i,e,this.Got);if(!n.length)return;let r;for(const i of n)try{fo(s);const e=await t(i,this.Gat,s);if(e){const t=i.Vat(e);if(await this.cot.Det(t.zu,t.bht))return{uot:e,Brt:i,zu:t}}}catch(t){Kc(t),r=t}if(r)throw r}constructor(t,i,e,s){this.Hat=t,this.Got=i,this.cot=e,this.Gat=s}};function iQ(t){return void 0!==t.Gf}function eQ(t,i){const e=t.ji&&i.ji,s=t.Ti&&i.Ti;if(e||s){if(e&&s)return t.ji*t.Ti-i.ji*i.Ti;if(e)return t.ji-i.ji;if(s)return t.Ti-i.Ti;return(t.ji||1)*(t.Ti||1)-(i.ji||1)*(i.Ti||1)}return 0}function sQ(t,i){return eQ(t,i)||function(t,i){return t.cz-i.cz}(t,i)}var nQ=class t{Wat(i,e,s,n){let r=t.sortByQuality(i);if(void 0!==this.Zat&&void 0===e&&i.length>1){const i=t.Kat(r,this.Zat);i&&(r=i)}const h=this.Xat(r,e,s,n);return h.length?h[h.length-1]:r[0]}Xat(i,e,s,n){var r;const h=t.sortByQuality(i),o={Fht:void 0===n||this.Jat.Rht?this.Jat.Fht:n,Gf:iQ(s)&&s.Gf?s.Gf:1,$at:s.ji,tut:s.Ti,iut:null==(r=this.eut)?void 0:r.restrictToPlayerSize};let a=h;for(const t of this.sut)a=t(a,e,o,this.hit,this.nut);return a}static rut(i){return t.sortByQuality(i)[0]}static hut(i,e){var s;return e?t.rut(null!=(s=t.Kat(i,e))?s:i):t.rut(i)}static Kat(t,i){for(const e of i){const i=t.filter((t=>ot(t.$tt,e)));if(i.length>0)return i}}static sortByQuality(t){const i=[...t];return i.sort(sQ),i}constructor(t,i,e,s,n,r){this.sut=t,this.Jat=i,this.hit=e,this.eut=s,this.Zat=n,this.nut=r}},rQ=(t,i,e,s,n)=>t.filter((t=>n.aq(t)&&s.qtt(i,t))),hQ=(t,i,e)=>t.filter((t=>function(t,i,e){const s=e.Fht;if(s<=0)return!1;return.8*s>t.cz*e.Gf}(t,0,e)));var oQ=(t,i,e,s,n)=>{const r=e.iut;if(void 0===r&&!s.Qs)return t;if(!1===r)return t;if(t.length>0&&t[0].Rg!==f.Am)return t;for(let i=t.length-1;i>=0;i--){const s=t[i];if(s.Ti===e.tut&&s.ji===e.$at)return t.slice(0,i+1);if(s.Ti<e.tut||s.ji<e.$at)return t.slice(0,i+2)}return[]},aQ=class{async Nat(t,i,e,s){let n;for(const r of this.out)try{const n=await r.Nat(t,i,e,s);if(n)return n}catch(t){n=t}if(n)throw n}constructor(t){this.out=t}},uQ=class{async aut(t,i,e,s){let n;for(const r of this.uut)try{return await r.aut(t,i,e,s)}catch(t){Kc(t),n=t}throw n}constructor(t){this.uut=t}},cQ=class{async aut(t,i,e,s){var n;const r=await this.mI.MS({zu:t,aI:dm.PS,hI:i?{Range:"bytes="+i[0]+"-"+(null!=(n=i[1])?n:"")}:void 0,lI:e,oI:G.GET,Rg:N.tT,Hd:s});return await r.nj()}constructor(t){this.mI=t}},dQ=class{async aut(t,i,e,s){const n=await this.cot.Eet(t,i);if(n)return n.buffer;if(i){const e=await this.cot.Eet(t);if(e)return Yo(new j(e.buffer),i[0],i[1])}throw new nh({zu:t,bht:i,lI:!1})}constructor(t){this.cot=t}};var lQ=1.05,fQ=(t,i,e,s)=>{if(!1===e.iut)return t;if(s.Qtt)return t;const n=s.Ftt;var r;const h=(null!=(r=null==n?void 0:n.width)?r:e.$at)*lQ;var o;const a=(null!=(o=null==n?void 0:n.height)?o:e.tut)*lQ;for(let i=t.length-1;i>=0;i--){const e=t[i];if(e.Ti<=a&&e.ji<=h)return t.slice(0,i+1)}return[]},_Q=class{static J8(t,e,s,n,r,h,o,a,u,c){const d=function(t,i){return new uQ([new dQ(i),new cQ(t)])}(h,o),l=new nQ([rQ],r,i.Ys,a,u,c),f=new tQ(l,e,o,d),_=new nQ([hQ,rQ,oQ,fQ],r,i.Ys,a,u,c),g=new $U(_,e,n,d),w=new aQ([f,g]);return new WU(t,s,w)}},gQ=class{cut(t,i,e,s){return this.Got.cut(t,i,e,s)}lut(t,i,e){return this.Got.tnt(t,i,e)}fut(t,i,e){return this.Got.fut(t,i,e)}Oq(t,i){this.Got.Oq(t,i)}jq(t,i){this.Got.jq(t,i)}HJ(){this.Got.HJ()}xW(){return this.Got.xW()}constructor(t){this.Got=t}},wQ=class extends Yi{constructor(t,i,e,s,n,r=0){super(Co.Mw),this.segmentStartTime=t,this.error=i,this.trackType=e,this.track=s,this.quality=n,this.retryCount=r}},AQ=class extends Yi{constructor(t,i){super(Co.Yg),this.track=t,this.segments=i}},vQ=class extends Jo{constructor(t,i){super(i),this._ut=t}},mQ=[Co.Tw,Co.Dw],pQ=class extends Bo{get qrt(){return this.gut}get Zrt(){return this.wut}set $rt(t){this.Aut.$rt=t}get $rt(){return this.Aut.$rt}get eht(){return this.Jrt.Lt.eht}vut(t){return!this.wJ||!t||!yu(this.wJ.Lnt,t.Lnt)}pht(t){if(!this.gut)return!1;const i=this.gut.uot,e=ce.yB(i.RT,i.UT),s=this.mut.Vot,n=s.aB(t);return n<0?e.gr(t,FU):e.dB(t,s.jn(n),!0,!0,FU)}async Aht(t){const i=this.Jrt.Lt.Wnt;for(;;)try{fo(t),this.yht();if(this.Mht())break;const e=this.yut(),s=await this.Nat(e,t);if(void 0===s)break;if(this.gut=s,!yQ(this.gut)){await this.Mut(this.gut,t);continue}this.wut&&!ot(this.wut.Brt.Fz,this.gut.Brt.Fz)&&await this.nut.cq(this.gut.Brt),await this.Tut(e,this.gut.uot,t),this.wJ=await this.Nut(this.gut.Brt,t);const n=await this.Jht(this.gut,t),r=this.mut.wf,h=this.wut;this.wut=await this.Dut(n,t);const o=this.mut.wf;this.Sut(h,this.gut,r,o),i.forEach((t=>t.Oat=!1)),this.Iut=0,this.Eut=0}catch(e){if(e instanceof gU){this.t$(e.Cn,e.jn,e.Brt);continue}if(e instanceof vQ){let s=500;if(i.every((t=>t.Oat))){if(2===this.Iut){const t=this.mut.wf;if(this.but(this.gut),this.Sut(this.wut,this.gut,t,t),i.forEach((t=>t.Oat=!1)),this.Eut+=1,this.Iut=0,this.Eut===this.Lut.maxRetries)throw new $i(td.MEDIA_LOAD_ERROR,"The segments could not be loaded.",e);continue}this.Iut++;const t=this.Lut.minimumBackoff*2**(this.Iut-1);s=_.min(t,this.Lut.maximumBackoff)}await Di(s,t);continue}throw this.kut=ce.MB(),e}finally{this.gut=void 0}}Sut(t,i,e,s){const n=s.oB(e),r=i.Brt.Cut(i.uot),h=i.Brt.Eat(i.uot);let o=i.uot.RT,a=i.uot.UT;r&&(o=_.min(o,_.max(0,i.Brt.bat.Cn-.05))),h&&(a=_.max(a,i.Brt.bat.jn));const u=ce.yB(o,a).oB(s);if(0===n.U)return 0===this.kut.U&&this.kut.rB(ce.yB(e.jn(e.U-1),o)),this.kut=this.kut.rB(u),void this.Jrt.mat(this.kut);if(r||this.kut.U>0){const t=u.Sn(ce.yB(o,n.Cn(0)));this.xut(t)}const c=n.iB().Sn(ce.yB(n.Cn(0),n.jn(n.U-1)));if(this.xut(c),h){const t=u.Sn(ce.yB(n.jn(n.U-1),a));this.xut(t)}if(this.kut.U>0){const t=this.kut.oB(n);this.xut(t),this.kut=ce.MB()}const d=i.Brt.ent,l=ui(i.uot)?void 0:d.Qat(i.uot);var f;const g=null!=(f=null==t?void 0:t.uot)?f:this.Out(l)?l:void 0;if(g){const t=this.Jrt.gat(g.RT,g.UT);if(t.length>0){const i=ce.yB(t[t.length-1]._at,n.Cn(0));this.xut(i)}}const w=ui(i.uot)?void 0:d.Fat(i.uot);if(w&&this.Out(w)){const t=this.Jrt.gat(w.RT,w.UT);if(t.length>0){const i=ce.yB(n.jn(n.U-1),t[0].fat);this.xut(i)}}}Out(t){return!!t&&this.Jrt.gat(t.RT,t.UT).length>0}xut(t){const i=t.oB(this.mut.wf);for(let t=0;t<i.U;t++)i.Cn(t)!==i.jn(t)&&this.jut.Oq(i.Cn(t),i.jn(t))}zut(t,i){throw new vQ(t,i)}yht(){if(this.kut.U>0)return;var t;const i=this.mut.Vot.rB(null!=(t=this.mut.Cq.$P().dA(this.mut.Hot))?t:ce.MB());this.Jrt.sat(i),this.Put&&!this.But(this.Put)&&(this.Put=void 0),this.Co(new AQ(this.Jrt.Lt.eht,this.Jrt.wat()))}Mht(){return this.wut&&this.wut.Brt.Eat(this.wut.uot)?(this.jut.HJ(),!0):(this.Put&&this.Put.Brt.Eat(this.Put.uot)&&this.But(this.Put)&&this.jut.HJ(),!!this.mut.Wot)}But(t){return this.Jrt.nat.uB(t.Rut,t.Uut)}Qut(t,i,e){(!this.Put||this.Put.uot.UT<t.uot.UT)&&(this.Put=Tt({},t,{Rut:i,Uut:e}))}yut(){const t=this.mut.Hot;return t}async Nat(t,i){fo(i);const e=this.wut?this.wut.Brt:void 0,s=await this.Aut.Mat(t,e,i);if(s)return s}async Mut(t,i){const e=t.Brt,s=e.ent,n=ui(t.uot)?s.Rat(t.uot):t.uot,r=e.Yut.Fut(),h=s.Gut(n);if(h&&h.getTime()<=r.getTime())return this.zut(Zn.ert,"Segment is not available.");const o=s.Vut(n).getTime()-r.getTime();await Ph((t=>Promise.race([Di(o,t),e.df(ri.xrt,t)])),i)}async Nut(t,i,e){void 0===e&&(e=0),fo(i);const s=t.Wut;if(!s)return this.wJ;try{if(!t.Hut){const e=await this.qut.tot(s,i);t.Hut=e.Om}}catch(s){if(Kc(s),Cc(s)){if(2===e)return t.Oat=!0,this.zut(Zn.drt,"Could not fetch the initializer.");const s=_.min(this.Lut.minimumBackoff*2**e,this.Lut.maximumBackoff);return await Di(s,i),this.Nut(t,i,e+1)}throw new $i(td.MEDIA_LOAD_ERROR,s.message,s)}fo(i);try{this.vut(t.Hut)&&await this.jut.lut(t.Hut,t,i)}catch(t){if(Kc(t),Cc(t))return this.zut(Zn.drt,"Could not append the initializer.");throw new $i(td.MEDIA_DECODE_ERROR,t.message,t)}return t.Hut}async Jht(t,i,e){void 0===e&&(e=0);try{return fo(i),await this.qut.Jht(t,i)}catch(s){if(Kc(s),s instanceof ou){if(function(t){return t instanceof Uu}(s.cause))return this.Xut(new ou(s,t.uot,t.Brt),e),this.zut(Zn.ert,"Could not append the segment.");if(2===e)return t.Brt.Oat=!0,this.Xut(s,e),this.zut(Zn.ert,"Could not fetch the segment.");const n=_.min(this.Lut.minimumBackoff*2**e,this.Lut.maximumBackoff);return await Di(n,i),await this.Jht(t,i,e+1)}throw new $i(td.MEDIA_LOAD_ERROR,s.message,s)}}async Tut(t,i,e){const s=this.Jrt.gat(i.RT,i.UT),n=this.mut.Vot.dA(t);let r=ce.MB();for(const t of s){fo(e);const i=t.fat,s=t._at,h=n&&n.dB(i,s)?_.max(i,n.jn(0)):i,o=s;h<o&&(r=r.rB(ce.yB(h,o)))}for(let t=0;t<r.U;t++)await this.jut.fut(r.Cn(t),r.jn(t),e);this.yht()}async Dut(t,i){try{fo(i);const e=await this.jut.cut(t.lot,t.uot,t.Brt,i);return this.Zut(t,e.Rut,e.Uut),this.Qut(t,e.Rut,e.Uut),t}catch(i){if(Kc(i),Cc(i))return this.Xut(new ou(i,t.uot,t.Brt),0),this.zut(Zn.ert,"Could not append the segment.");if(Ar(i)&&this.jut.xW())return this.zut(Zn.rrt,"Buffer is full. Could not reduce the buffer.");throw new $i(td.MEDIA_DECODE_ERROR,i.message,i)}}Zut(t,i,e){const s=t.Brt,n=t.uot;this.Aat(n,s,i,e)}Aat(t,i,e,s){this.Jrt.Aat({aat:t.RT,uat:t.UT,fat:e,_at:s,pat:!0},i),this.jut.jq(e,s)}t$(t,i,e){const s=ce.yB(t,i);e?this.Jrt.Oq(s,e):this.Jrt.mat(s),this.jut.Oq(t,i)}but(t){const i=ce.yB(t.uot.RT,t.uot.UT);t.Brt?this.Jrt.Oq(i,t.Brt):this.Jrt.mat(i)}Xut(t,i){const e=t.Oot,s=this.Jrt.Lt.eht,n=this.Jrt.Lt.va,r=t.zot.Brt&&t.zot.Brt.va,h=new wQ(e,t.message,s,n,r,i);this.Co(h)}tr(){this.wJ=void 0,this.wut=void 0}gn(){this.tr(),this.Put=void 0,this.qut.fn(mQ,this.Ds),this.qut.gn()}constructor(t,i,e,s,n,r,h,o){super(),this.mht=t,this.Jrt=i,this.mut=e,this.Aut=s,this.qut=n,this.jut=r,this.nut=h,this.Lut=o,this.gut=void 0,this.wJ=void 0,this.wut=void 0,this.Put=void 0,this.Iut=0,this.Eut=0,this.kut=ce.MB(),this.qut.yn(mQ,this.Ds)}};function yQ(t){const i=t.Brt,e=i.ent,s=ui(t.uot)?e.Rat(t.uot):t.uot;return e.Kut(s,i.Yut.Fut())}var MQ=0,TQ=class{J8(t){const i=MQ++,e=this.Got.XJ,s=new VU(t),n=new MU(e,this.Jut),r=new YU(this.Got,this.J4,this._$,this.CB),h=_Q.J8(i,this.Got,s,this.CB,n,this.mI,this.cot,this.eut,this.Zat,this.nut),o=function(t){switch(t){case f.vm:return Ws.vm;case f.Am:return Ws.Am;case f.Ru:return Ws.Ru;case f.$M:return Ws.$M;default:return Ws.tT}}(e),a=new mU(this.mI,o),u=this.Fot(a,n,this.Jut),c=new gQ(this.Got),d=new pQ(i,s,r,h,u,c,this.nut,this.Lut);return new vU(i,t.Bot,s,d,this.J4)}constructor(t,i,e,s,n,r,h,o,a,u,c){this.Got=t,this.J4=i,this._$=e,this.mI=s,this.CB=n,this.Jut=r,this.cot=h,this.eut=o,this.Zat=a,this.nut=u,this.Lut=c}},NQ=class extends TQ{Fot(t,i,e){return(new QU).Fot(t,this.Got,i,e,this.cot)}},DQ=class extends TQ{$ut(t,i){const e={eht:f.Ru,Bot:i,Wnt:i.Wnt,va:t.va};return super.J8(e)}Fot(t,i){return(new QU).Fot(t,this.Got,i,!1,this.cot)}};var SQ=class{aq(t){return this.Fst.aq(t)}cq(t){return this.Fst.cq(t)}constructor(t){this.Fst=t}},IQ=class{aq(t){return!0}cq(t){return Promise.resolve(void 0)}},ju=class extends Ao{fa(){return new EQ(this.Ng.map((t=>t.va)))}constructor(t,i){super(na.rg),this.Ng=t||[],this.Lt=i}},EQ=class extends Yi{constructor(t){super("targetqualitychanged"),this.qualities=t,this.quality=this.qualities.length>0?this.qualities[0]:void 0}},bQ=class extends Oe{fa(){return new LQ(this.quality.va)}constructor(t){super(na.QUALITY_UNAVAILABLE),this.quality=t}},LQ=class extends Zs{constructor(t){super("qualityunavailable"),this.quality=t}},kQ=class extends Yi{constructor(){super(na.NO_QUALITY)}};function CQ(t){return{cz:t.cz,$tt:t.cst,Ti:xQ(t)?t.Ti:0,Rg:xQ(t)?f.Am:f.vm,ji:xQ(t)?t.ji:0}}function xQ(t){const i=t;return void 0!==i.Ti&&void 0!==i.ji}var OQ=0,jQ=class extends Bo{get Tg(){return this.dht.tct.map(zQ).filter(Dd)}ict(t){for(const i of t)i.yn("update",this.ect),this.yT.MT(i)}sct(t){if(!this.yT.NT(t))return;t.jS();const i=this.nct();if(this.rct&&ae(this.rct,t)){const t=this.rct.filter((t=>t.det));0===t.length&&i.length>0?this.Dg=i:this.Dg=t}else this.Dg=i;this.Co(new bQ(t))}nct(){const t=[];for(const i of this.yT.og)i.det&&t.push(i);return t}get yg(){return this.hct}act(t){this.hct=t.Brt,this.Co(t)}get Bot(){return this.dht}get Rt(){return this.Le}set Rt(t){this.kT(t)}get va(){return this.Xa||(this.Xa=Bs(this)),this.Xa}get uct(){return this.cct}set uct(t){this.cct=t}get o(){return this.IT}get Mg(){return this.ET}get zt(){return this.P0}get gs(){return this.QL}get kh(){return this.bT}set kh(t){t!==this.bT&&(this.bT=t,this.Co(new gh(this)))}get jg(){return this.Rt?"enabled":"disabled"}get Dg(){return this.rct}set Dg(t){let e=[];if(t){const s=(null!=t?t:[]).filter((t=>{const e=this.yg?CQ(this.yg):void 0;return i.Ys.qtt(e,CQ(t))}));if(0===s.length)return;e=s.filter((t=>t.det))}else e=this.nct();0===e.length&&this.Co(new kQ),this.rct=t&&this.yT.NT(t)?t:void 0,this.dct=this.lct(this.rct),this.Co(new ju(t,this))}get fct(){return this.dct}lct(t){if(!t||0===t.length)return;const i=[];for(const e of this.Wnt)for(const s of t)s===e.Brt&&s.det&&i.push(e);return i}get Ng(){return this.yT}get Wnt(){return this._ct}gct(t){this.wct.push(t),this._ct.push(...t.Wnt);const i=t.Wnt.map((t=>t.Brt));this.ict(i)}get eht(){return this.Act}get vct(){return this.wct}kT(t){this.Le=t,this.cct&&(t?this.cct.OS(this):this.cct.jS(this))}mct(t){this.Le=t,this.pct!==t&&(this.pct=t,this.Co(new Ji(this)))}gn(){for(const t of this.yT.og)t.fn("update",this.ect);this.yT.tr()}constructor(t,i,e="alternative"){super(),this.hct=void 0,this.Le=!1,this.Xa=void 0,this.cct=void 0,this.IT="",this.pct=!1,this.yT=new Lt,this._ct=[],this.rct=void 0,this.dct=void 0,this.ect=()=>this.Co(new gh(this)),this.wct=[],this.dht=t,this.IT=String(OQ++),this.ET=Xw(),this.P0=e,this.QL=t.C6,this.bT=t.kh,this.Act=t.Rg,this._ct=t.Wnt,this.ict(i)}};function zQ(t){if("urn:mpeg:dash:role:2011"===t.lst)return PQ(t);if("urn:tva:metadata:cs:AudioPurposeCS:2007"===t.lst){if("1"===t.LM)return cc.Ig;if("2"===t.LM)return cc.Lg}}function PQ(t){if(void 0!==(null==t?void 0:t.LM))switch(t.LM){case"caption":return cc.Sg;case"sign":return cc.Eg;case"description":return cc.Ig;case"enhanced-audio-intelligibility":return cc.Lg;default:return}}var bo,ah,BQ=class extends dU{get Lz(){const t=this.J4.Mf;return this.Vot.dA(t,.01)}get yct(){return this.xnt&&this.Mct[this.xnt.Mg]?this.Mct[this.xnt.Mg]:ce.MB()}get Tct(){return this.xnt&&this.Nct[this.xnt.Mg]?this.Nct[this.xnt.Mg]:ce.MB()}get Xot(){return new ce([0,1/0])}get wf(){return this.yct}get Cq(){return this.Dct?this.Dct.Krt.Cq.Zot:ce.MB()}get Vot(){return lU(this.wf,this.Cq).nB(2*this.Sct)}get Cn(){return this.jnt?this.jnt.bat.Cn:NaN}get jn(){return this.jnt?this.jnt.bat.jn:NaN}get Sf(){const t=this.jn;return!!t&&this.J4.Mf>=t}get Sct(){var t;const i=this.Gnt();if(!i)return.04;var e;return 1/(null!=(e=this.xnt&&(null==i||null==(t=i.Ict)?void 0:t.fN()))?e:25)}get Ti(){return this.rk}get XJ(){return f.Ru}get Gf(){return this.IB}set Gf(t){this.IB=t}get Hf(){return this.Tct}get t_(){if(!this.xnt)return ce.pB(0);const t=this.Ynt(this.xnt),i=null==t?void 0:t.Ect,e=null==t?void 0:t.bct;if(void 0===e||void 0===i)return ce.pB(0);const s=_.max(i,this.J4.Mf);return new ce([e,s]).$P()}get ji(){return this.nk}HJ(){}qot(){return this.Vot.gr(this.jn)}async cut(t,i,e,s){const n=t.Rg===dt.$H?t.Om.Lnt:await t.Om.nj(s),r=this.findTrackForRepresentation(e),h=this.Mct[r.Mg],o=i.RT,a=i.UT,u=new ce([o,a]);h||(this.Mct[r.Mg]=ce.MB(),this.Nct[r.Mg]=ce.MB()),this.Hst(s);const c=this.int(new j(n),i,e,r);for(const t of c)r.MI(t);return this.Mct[r.Mg]=this.Mct[r.Mg].rB(u),{Rut:o,Uut:a}}Hst(t){const i=pL(this.J4.Mf,void 0,void 0,this.wf,this.CB.IW,this.CB.yW);for(const[e,s]of i)Ys(this.fut(e,s,t))}tnt(t,i,e){return this.Lct.tnt(t,i,e)}int(t,i,e,s){return this.Lct.int(t,i,e,s)}fut(t,i,e){const s=t,n=i;let r=new ce([t,i]);for(const t of this.Z.og){const i=[];for(const e of t.L.og)e.RT>=s&&e.UT<=n?i.push(e):r=r.oB(new ce([e.RT,e.UT]));for(const e of i)t.ES(e);const e=this.Mct[t.Mg];e&&(this.Mct[t.Mg]=e.oB(r))}return Promise.resolve()}Oq(t,i){}jq(t,i){}xW(){return!1}OS(t){if(super.OS(t),this.Lct.tr(),this.Dct&&(this.Dct.gn(),this.Dct=void 0),this.xnt){const t=this.Ynt(this.xnt);this.Dct=new DQ(this,this.J4,this.J4,this.mI,this.CB,!1,this.cot,void 0,void 0,new IQ,Pw).$ut(this.xnt,t),this.Dct.yn(ut.ha,this.kct),this.Dct.Cn(Zn.Xnt)}}jS(t){this.xnt===t&&(super.jS(t),this.Dct&&(this.Dct.gn(),this.Dct=void 0))}Bnt(t){const i=function(t){const i=t.Wnt&&t.Wnt.length>0&&t.Wnt[0],e=i&&im(i.cst),s=im(t.cst),n=t.SF===Dt.APPLICATION_TTML_XML;return e||s||n?Wt.TTML:t.SF===Dt.TEXT_VTT||hr(t.SF,t.cst)?Wt.WEBVTT:Wt.DEFAULT}(t);if(!i)throw new g("Unknown TextTrack type for Representation");const e=t.Cct.concat(t.tct);return this.xct(function(t){return ae(t.filter((t=>"urn:mpeg:dash:role:2011"===t.lst)).map((t=>t.LM)).filter(Dd),"caption")?hh.wS:hh.pm}(e),t.kh,t.C6,!1,i,t,function(t){return t.filter((t=>"urn:mpeg:dash:role:2011"===t.lst)).some((t=>function(t){return"forced-subtitle"===t||"forced_subtitle"===t}(t.LM)))}(t.Cct),t.tct.map(PQ).filter(Dd))}async tr(){await super.tr(),this.Dct&&(await this.Dct.tr(Zn.vrt),this.Dct.fn(ut.ha,this.kct),this.Dct=void 0),this.jnt=void 0,this.Mct={},this.Nct={}}Oct(){this.Mct={},this.Nct={}}findTrackForRepresentation(t){for(const i of this.Z.og){const e=this.Ynt(i);if(e&&dU.Vnt(e)===t)return i}}constructor(t,i,e,s,n){super(),this.rk=0,this.IB=1,this.Dct=void 0,this.Mct={},this.Nct={},this.nk=0,this.kct=t=>{0},this.J4=t,this.mI=i,this.CB=e,this.Lct=s,this.cot=n}},RQ=class extends BQ{xct(t,i,e,s,n,r,h,o){var a;const u=r.Wnt.reduce(((t,i)=>t||i.o),void 0);var c;const d=null!=(c=null!=u?u:null==(a=r.o)?void 0:a.toString())?c:"";return this.AI.wI(t,d,i,e,s,n,h,o)}gn(){for(const t of this.Z.og)this.AI.NI(t);return super.gn()}constructor(t,i,e,s,n,r){super(t,i,e,s,n),this.AI=r}},UQ=class{get nt(){return this.Dl}async vI(t){if(t.Rg!==f.Ru)return;const i=function(t,i){return im(i)||t===Dt.APPLICATION_TTML_XML||t===Dt.TEXT_VTT?new aU:hr(t,i)?new uU:void 0}(t.SF,t.cst);if(i){const e=this.jct(i);return this.zct(e),await e.$n(t),e}}jct(t){return new RQ(this.J4,this.mI,this.CB,t,this.cot,this.AI)}zct(t){this.Pct.push(t),this.Dl.pz(t.Z)}async tr(){for(const t of this.Pct.slice())await t.tr();No(this.Pct),this.Dl.tr()}async gn(){for(const t of this.Pct)await t.gn();No(this.Pct),this.Dl.gn()}constructor(t,i,e,s,n){this.Pct=[],this.Dl=new zs([]),this.J4=t,this.mI=i,this.CB=e,this.cot=s,this.AI=n}},QQ=class extends Yi{constructor(t){super(Co.lw),this.error=t}};!function(t){t.Qx="static",t.Fx="dynamic"}(bo||(bo={})),(ah||(ah={})).Bct="Rct";var FQ=class extends Yi{constructor(){super(ah.Bct)}},YQ=0;var Fe,J,GQ,VQ=class extends Yi{constructor(t,i){super(Co.Aw),this.representation=t,this.previousRepresentation=i}};function WQ(t,i,e){return e===Fe.Uct?e:i!==J.Qct&&i!==J.Fct||e!==Fe.Yct&&e!==Fe.Gct?t?i===J.Vct?Fe.Wct:i===J.Hct?Fe.qct:Fe.Uct:Fe.Xct:Fe.Gct}function HQ(t,i,e,s){const n={byte:e};let r=Fe.Yct;const h=[],o=31&Fi(i,n,s);n.byte+=1;for(let e=0;e<o;e+=1){const o=Fi(i,n,s),a=4&o,u=3&o;r=WQ(Boolean(a),u,r);const c=Fi(i,n,s),d=Fi(i,n,s);h.push({Zct:t,wM:-1,Kct:!e,Jct:Boolean(a),Rg:u,$ct:r,tdt:c,idt:d})}return h}function qQ(t,i,e){const s=Fi(t,i,e);if(!S(s))return String.fromCharCode(s)}function XQ(t){const i=t.VZ,e={byte:t.YZ},s=t.GZ,n=Fi(i,e,s);if(255===n&&(e.byte+=1),181!==n)return;const r=xk(i,e);if(47!==r&&49!==r)return;if(49===r){const t=function(t,i,e){let s="",n=e;for(;n>0;)n-=1,s+=qQ(t,i);return s}(i,e,4);if("GA94"!==t)return}if(3!==Fi(i,e,s))return;47===r&&(e.byte+=1);const h=t;return h.edt=e.byte,h}function ZQ(t){return 4===t.QZ}function KQ(t){const i=t.filter(ZQ).map(XQ).filter(Dd),e=[];for(const t of i)e.push(...HQ(t.UZ,t.VZ,t.edt,t.GZ));return e}!function(t){t[t.Uct=0]="Uct",t[t.Yct=1]="Yct",t[t.Gct=2]="Gct",t[t.qct=3]="qct",t[t.Wct=4]="Wct",t[t.Xct=5]="Xct"}(Fe||(Fe={})),function(t){t[t.Qct=0]="Qct",t[t.Fct=1]="Fct",t[t.Vct=2]="Vct",t[t.Hct=3]="Hct"}(J||(J={})),function(t){t[t.sdt=47]="sdt",t[t.ndt=49]="ndt"}(GQ||(GQ={}));var JQ="und";function $Q(t){if(t===JQ)return;const i=t.toLowerCase();for(const t of tF)if(t[1]===i||t[2]===i||t["2T"]===i||t["2B"]===i||t[3]===i)return t}var tF=[{l:"Abkhaz",lh:"\u0410\u04a7\u0441\u0443\u0430",1:"ab",2:"abk","2T":"abk","2B":"abk",3:"abk"},{l:"Afar",lh:"Afaraf",1:"aa",2:"aar","2T":"aar","2B":"aar",3:"aar"},{l:"Afrikaans",lh:"Afrikaans",1:"af",2:"afr","2T":"afr","2B":"afr",3:"afr"},{l:"Akan",lh:"Akan",1:"ak",2:"aka","2T":"aka","2B":"aka",3:"aka"},{l:"Albanian",lh:"Shqip",1:"sq",2:"sqi","2T":"sqi","2B":"alb",3:"sqi"},{l:"Amharic",lh:"\u12a0\u121b\u122d\u129b",1:"am",2:"amh","2T":"amh","2B":"amh",3:"amh"},{l:"Arabic",lh:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",1:"ar",2:"ara","2T":"ara","2B":"ara",3:"ara"},{l:"Aragonese",lh:"Aragon\xe9s",1:"an",2:"arg","2T":"arg","2B":"arg",3:"arg"},{l:"Armenian",lh:"\u0540\u0561\u0575\u0565\u0580\u0565\u0576",1:"hy",2:"hye","2T":"hye","2B":"arm",3:"hye"},{l:"Assamese",lh:"\u0985\u09b8\u09ae\u09c0\u09af\u09bc\u09be",1:"as",2:"asm","2T":"asm","2B":"asm",3:"asm"},{l:"Avaric",lh:"\u0410\u0432\u0430\u0440",1:"av",2:"ava","2T":"ava","2B":"ava",3:"ava"},{l:"Avestan",lh:"avesta",1:"ae",2:"ave","2T":"ave","2B":"ave",3:"ave"},{l:"Aymara",lh:"Aymar",1:"ay",2:"aym","2T":"aym","2B":"aym",3:"aym"},{l:"Azerbaijani",lh:"Az\u0259rbaycanca",1:"az",2:"aze","2T":"aze","2B":"aze",3:"aze"},{l:"Bambara",lh:"Bamanankan",1:"bm",2:"bam","2T":"bam","2B":"bam",3:"bam"},{l:"Bashkir",lh:"\u0411\u0430\u0448\u04a1\u043e\u0440\u0442\u0441\u0430",1:"ba",2:"bak","2T":"bak","2B":"bak",3:"bak"},{l:"Basque",lh:"Euskara",1:"eu",2:"eus","2T":"eus","2B":"baq",3:"eus"},{l:"Belarusian",lh:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",1:"be",2:"bel","2T":"bel","2B":"bel",3:"bel"},{l:"Bengali",lh:"\u09ac\u09be\u0982\u09b2\u09be",1:"bn",2:"ben","2T":"ben","2B":"ben",3:"ben"},{l:"Bihari",lh:"\u092d\u094b\u091c\u092a\u0941\u0930\u0940",1:"bh",2:"bih","2T":"bih","2B":"bih",3:"bih"},{l:"Bislama",lh:"Bislama",1:"bi",2:"bis","2T":"bis","2B":"bis",3:"bis"},{l:"Bosnian",lh:"Bosanski",1:"bs",2:"bos","2T":"bos","2B":"bos",3:"bos"},{l:"Breton",lh:"Brezhoneg",1:"br",2:"bre","2T":"bre","2B":"bre",3:"bre"},{l:"Bulgarian",lh:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",1:"bg",2:"bul","2T":"bul","2B":"bul",3:"bul"},{l:"Burmese",lh:"\u1019\u103c\u1014\u103a\u1019\u102c\u1018\u102c\u101e\u102c",1:"my",2:"mya","2T":"mya","2B":"bur",3:"mya"},{l:"Catalan",lh:"Catal\xe0",1:"ca",2:"cat","2T":"cat","2B":"cat",3:"cat"},{l:"Chamorro",lh:"Chamoru",1:"ch",2:"cha","2T":"cha","2B":"cha",3:"cha"},{l:"Chechen",lh:"\u041d\u043e\u0445\u0447\u0438\u0439\u043d",1:"ce",2:"che","2T":"che","2B":"che",3:"che"},{l:"Chichewa",lh:"Chichewa",1:"ny",2:"nya","2T":"nya","2B":"nya",3:"nya"},{l:"Chinese",lh:"\u4e2d\u6587",1:"zh",2:"zho","2T":"zho","2B":"chi",3:"zho"},{l:"Chuvash",lh:"\u0427\u04d1\u0432\u0430\u0448\u043b\u0430",1:"cv",2:"chv","2T":"chv","2B":"chv",3:"chv"},{l:"Cornish",lh:"Kernewek",1:"kw",2:"cor","2T":"cor","2B":"cor",3:"cor"},{l:"Corsican",lh:"Corsu",1:"co",2:"cos","2T":"cos","2B":"cos",3:"cos"},{l:"Cree",lh:"\u14c0\u1426\u1403\u152d\u140d\u140f\u1423",1:"cr",2:"cre","2T":"cre","2B":"cre",3:"cre"},{l:"Croatian",lh:"Hrvatski",1:"hr",2:"hrv","2T":"hrv","2B":"hrv",3:"hrv"},{l:"Czech",lh:"\u010ce\u0161tina",1:"cs",2:"ces","2T":"ces","2B":"cze",3:"ces"},{l:"Danish",lh:"Dansk",1:"da",2:"dan","2T":"dan","2B":"dan",3:"dan"},{l:"Divehi",lh:"Divehi",1:"dv",2:"div","2T":"div","2B":"div",3:"div"},{l:"Dutch",lh:"Nederlands",1:"nl",2:"nld","2T":"nld","2B":"dut",3:"nld"},{l:"Dzongkha",lh:"\u0f62\u0fab\u0f7c\u0f44\u0f0b\u0f41",1:"dz",2:"dzo","2T":"dzo","2B":"dzo",3:"dzo"},{l:"English",lh:"English",1:"en",2:"eng","2T":"eng","2B":"eng",3:"eng"},{l:"Esperanto",lh:"Esperanto",1:"eo",2:"epo","2T":"epo","2B":"epo",3:"epo"},{l:"Estonian",lh:"Eesti",1:"et",2:"est","2T":"est","2B":"est",3:"est"},{l:"Ewe",lh:"E\u028begbe",1:"ee",2:"ewe","2T":"ewe","2B":"ewe",3:"ewe"},{l:"Faroese",lh:"F\xf8royskt",1:"fo",2:"fao","2T":"fao","2B":"fao",3:"fao"},{l:"Fijian",lh:"Na Vosa Vaka-Viti",1:"fj",2:"fij","2T":"fij","2B":"fij",3:"fij"},{l:"Finnish",lh:"Suomi",1:"fi",2:"fin","2T":"fin","2B":"fin",3:"fin"},{l:"French",lh:"Fran\xe7ais",1:"fr",2:"fra","2T":"fra","2B":"fre",3:"fra"},{l:"Fula",lh:"Fulfulde",1:"ff",2:"ful","2T":"ful","2B":"ful",3:"ful"},{l:"Galician",lh:"Galego",1:"gl",2:"glg","2T":"glg","2B":"glg",3:"glg"},{l:"Georgian",lh:"\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8",1:"ka",2:"kat","2T":"kat","2B":"geo",3:"kat"},{l:"German",lh:"Deutsch",1:"de",2:"deu","2T":"deu","2B":"ger",3:"deu"},{l:"Greek",lh:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",1:"el",2:"ell","2T":"ell","2B":"gre",3:"ell"},{l:"Guaran\xed",lh:"Ava\xf1e'\u1ebd",1:"gn",2:"grn","2T":"grn","2B":"grn",3:"grn"},{l:"Gujarati",lh:"\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0",1:"gu",2:"guj","2T":"guj","2B":"guj",3:"guj"},{l:"Haitian",lh:"Krey\xf2l Ayisyen",1:"ht",2:"hat","2T":"hat","2B":"hat",3:"hat"},{l:"Hausa",lh:"\u0647\u064e\u0648\u064f\u0633\u064e",1:"ha",2:"hau","2T":"hau","2B":"hau",3:"hau"},{l:"Hebrew",lh:"\u05e2\u05d1\u05e8\u05d9\u05ea",1:"he",2:"heb","2T":"heb","2B":"heb",3:"heb"},{l:"Herero",lh:"Otjiherero",1:"hz",2:"her","2T":"her","2B":"her",3:"her"},{l:"Hindi",lh:"\u0939\u093f\u0928\u094d\u0926\u0940",1:"hi",2:"hin","2T":"hin","2B":"hin",3:"hin"},{l:"Hiri Motu",lh:"Hiri Motu",1:"ho",2:"hmo","2T":"hmo","2B":"hmo",3:"hmo"},{l:"Hungarian",lh:"Magyar",1:"hu",2:"hun","2T":"hun","2B":"hun",3:"hun"},{l:"Interlingua",lh:"Interlingua",1:"ia",2:"ina","2T":"ina","2B":"ina",3:"ina"},{l:"Indonesian",lh:"Bahasa Indonesia",1:"id",2:"ind","2T":"ind","2B":"ind",3:"ind"},{l:"Interlingue",lh:"Interlingue",1:"ie",2:"ile","2T":"ile","2B":"ile",3:"ile"},{l:"Irish",lh:"Gaeilge",1:"ga",2:"gle","2T":"gle","2B":"gle",3:"gle"},{l:"Igbo",lh:"Igbo",1:"ig",2:"ibo","2T":"ibo","2B":"ibo",3:"ibo"},{l:"Inupiaq",lh:"I\xf1upiak",1:"ik",2:"ipk","2T":"ipk","2B":"ipk",3:"ipk"},{l:"Ido",lh:"Ido",1:"io",2:"ido","2T":"ido","2B":"ido",3:"ido"},{l:"Icelandic",lh:"\xcdslenska",1:"is",2:"isl","2T":"isl","2B":"ice",3:"isl"},{l:"Italian",lh:"Italiano",1:"it",2:"ita","2T":"ita","2B":"ita",3:"ita"},{l:"Inuktitut",lh:"\u1403\u14c4\u1483\u144e\u1450\u1466",1:"iu",2:"iku","2T":"iku","2B":"iku",3:"iku"},{l:"Japanese",lh:"\u65e5\u672c\u8a9e",1:"ja",2:"jpn","2T":"jpn","2B":"jpn",3:"jpn"},{l:"Javanese",lh:"Basa Jawa",1:"jv",2:"jav","2T":"jav","2B":"jav",3:"jav"},{l:"Kalaallisut",lh:"Kalaallisut",1:"kl",2:"kal","2T":"kal","2B":"kal",3:"kal"},{l:"Kannada",lh:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1",1:"kn",2:"kan","2T":"kan","2B":"kan",3:"kan"},{l:"Kanuri",lh:"Kanuri",1:"kr",2:"kau","2T":"kau","2B":"kau",3:"kau"},{l:"Kashmiri",lh:"\u0643\u0634\u0645\u064a\u0631\u064a",1:"ks",2:"kas","2T":"kas","2B":"kas",3:"kas"},{l:"Kazakh",lh:"\u049a\u0430\u0437\u0430\u049b\u0448\u0430",1:"kk",2:"kaz","2T":"kaz","2B":"kaz",3:"kaz"},{l:"Khmer",lh:"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a",1:"km",2:"khm","2T":"khm","2B":"khm",3:"khm"},{l:"Kikuyu",lh:"G\u0129k\u0169y\u0169",1:"ki",2:"kik","2T":"kik","2B":"kik",3:"kik"},{l:"Kinyarwanda",lh:"Kinyarwanda",1:"rw",2:"kin","2T":"kin","2B":"kin",3:"kin"},{l:"Kyrgyz",lh:"\u041a\u044b\u0440\u0433\u044b\u0437\u0447\u0430",1:"ky",2:"kir","2T":"kir","2B":"kir",3:"kir"},{l:"Komi",lh:"\u041a\u043e\u043c\u0438",1:"kv",2:"kom","2T":"kom","2B":"kom",3:"kom"},{l:"Kongo",lh:"Kongo",1:"kg",2:"kon","2T":"kon","2B":"kon",3:"kon"},{l:"Korean",lh:"\ud55c\uad6d\uc5b4",1:"ko",2:"kor","2T":"kor","2B":"kor",3:"kor"},{l:"Kurdish",lh:"Kurd\xee",1:"ku",2:"kur","2T":"kur","2B":"kur",3:"kur"},{l:"Kwanyama",lh:"Kuanyama",1:"kj",2:"kua","2T":"kua","2B":"kua",3:"kua"},{l:"Latin",lh:"Latina",1:"la",2:"lat","2T":"lat","2B":"lat",3:"lat"},{l:"Luxembourgish",lh:"L\xebtzebuergesch",1:"lb",2:"ltz","2T":"ltz","2B":"ltz",3:"ltz"},{l:"Ganda",lh:"Luganda",1:"lg",2:"lug","2T":"lug","2B":"lug",3:"lug"},{l:"Limburgish",lh:"Limburgs",1:"li",2:"lim","2T":"lim","2B":"lim",3:"lim"},{l:"Lingala",lh:"Ling\xe1la",1:"ln",2:"lin","2T":"lin","2B":"lin",3:"lin"},{l:"Lao",lh:"\u0e9e\u0eb2\u0eaa\u0eb2\u0ea5\u0eb2\u0ea7",1:"lo",2:"lao","2T":"lao","2B":"lao",3:"lao"},{l:"Lithuanian",lh:"Lietuvi\u0173",1:"lt",2:"lit","2T":"lit","2B":"lit",3:"lit"},{l:"Luba-Katanga",lh:"Tshiluba",1:"lu",2:"lub","2T":"lub","2B":"lub",3:"lub"},{l:"Latvian",lh:"Latvie\u0161u",1:"lv",2:"lav","2T":"lav","2B":"lav",3:"lav"},{l:"Manx",lh:"Gaelg",1:"gv",2:"glv","2T":"glv","2B":"glv",3:"glv"},{l:"Macedonian",lh:"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438",1:"mk",2:"mkd","2T":"mkd","2B":"mac",3:"mkd"},{l:"Malagasy",lh:"Malagasy",1:"mg",2:"mlg","2T":"mlg","2B":"mlg",3:"mlg"},{l:"Malay",lh:"Bahasa Melayu",1:"ms",2:"msa","2T":"msa","2B":"may",3:"msa"},{l:"Malayalam",lh:"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02",1:"ml",2:"mal","2T":"mal","2B":"mal",3:"mal"},{l:"Maltese",lh:"Malti",1:"mt",2:"mlt","2T":"mlt","2B":"mlt",3:"mlt"},{l:"M\u0101ori",lh:"M\u0101ori",1:"mi",2:"mri","2T":"mri","2B":"mao",3:"mri"},{l:"Marathi",lh:"\u092e\u0930\u093e\u0920\u0940",1:"mr",2:"mar","2T":"mar","2B":"mar",3:"mar"},{l:"Marshallese",lh:"Kajin M\u0327aje\u013c",1:"mh",2:"mah","2T":"mah","2B":"mah",3:"mah"},{l:"Mongolian",lh:"\u041c\u043e\u043d\u0433\u043e\u043b",1:"mn",2:"mon","2T":"mon","2B":"mon",3:"mon"},{l:"Nauru",lh:"Dorerin Naoero",1:"na",2:"nau","2T":"nau","2B":"nau",3:"nau"},{l:"Navajo",lh:"Din\xe9 Bizaad",1:"nv",2:"nav","2T":"nav","2B":"nav",3:"nav"},{l:"Northern Ndebele",lh:"isiNdebele",1:"nd",2:"nde","2T":"nde","2B":"nde",3:"nde"},{l:"Nepali",lh:"\u0928\u0947\u092a\u093e\u0932\u0940",1:"ne",2:"nep","2T":"nep","2B":"nep",3:"nep"},{l:"Ndonga",lh:"Owambo",1:"ng",2:"ndo","2T":"ndo","2B":"ndo",3:"ndo"},{l:"Norwegian Bokm\xe5l",lh:"Norsk (Bokm\xe5l)",1:"nb",2:"nob","2T":"nob","2B":"nob",3:"nob"},{l:"Norwegian Nynorsk",lh:"Norsk (Nynorsk)",1:"nn",2:"nno","2T":"nno","2B":"nno",3:"nno"},{l:"Norwegian",lh:"Norsk",1:"no",2:"nor","2T":"nor","2B":"nor",3:"nor"},{l:"Nuosu",lh:"\ua188\ua320\ua4bf Nuosuhxop",1:"ii",2:"iii","2T":"iii","2B":"iii",3:"iii"},{l:"Southern Ndebele",lh:"isiNdebele",1:"nr",2:"nbl","2T":"nbl","2B":"nbl",3:"nbl"},{l:"Occitan",lh:"Occitan",1:"oc",2:"oci","2T":"oci","2B":"oci",3:"oci"},{l:"Ojibwe",lh:"\u140a\u14c2\u1511\u14c8\u142f\u14a7\u140e\u14d0",1:"oj",2:"oji","2T":"oji","2B":"oji",3:"oji"},{l:"Old Church Slavonic",lh:"\u0421\u043b\u043e\u0432\u0463\u0301\u043d\u044c\u0441\u043a\u044a",1:"cu",2:"chu","2T":"chu","2B":"chu",3:"chu"},{l:"Oromo",lh:"Afaan Oromoo",1:"om",2:"orm","2T":"orm","2B":"orm",3:"orm"},{l:"Oriya",lh:"\u0b13\u0b21\u0b3f\u0b3c\u0b06",1:"or",2:"ori","2T":"ori","2B":"ori",3:"ori"},{l:"Ossetian",lh:"\u0418\u0440\u043e\u043d \xe6\u0432\u0437\u0430\u0433",1:"os",2:"oss","2T":"oss","2B":"oss",3:"oss"},{l:"Panjabi",lh:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40",1:"pa",2:"pan","2T":"pan","2B":"pan",3:"pan"},{l:"P\u0101li",lh:"\u092a\u093e\u0934\u093f",1:"pi",2:"pli","2T":"pli","2B":"pli",3:"pli"},{l:"Persian",lh:"\u0641\u0627\u0631\u0633\u06cc",1:"fa",2:"fas","2T":"fas","2B":"per",3:"fas"},{l:"Polish",lh:"Polski",1:"pl",2:"pol","2T":"pol","2B":"pol",3:"pol"},{l:"Pashto",lh:"\u067e\u069a\u062a\u0648",1:"ps",2:"pus","2T":"pus","2B":"pus",3:"pus"},{l:"Portuguese",lh:"Portugu\xeas",1:"pt",2:"por","2T":"por","2B":"por",3:"por"},{l:"Quechua",lh:"Runa Simi",1:"qu",2:"que","2T":"que","2B":"que",3:"que"},{l:"Romansh",lh:"Rumantsch",1:"rm",2:"roh","2T":"roh","2B":"roh",3:"roh"},{l:"Kirundi",lh:"Kirundi",1:"rn",2:"run","2T":"run","2B":"run",3:"run"},{l:"Romanian",lh:"Rom\xe2n\u0103",1:"ro",2:"ron","2T":"ron","2B":"rum",3:"ron"},{l:"Russian",lh:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439",1:"ru",2:"rus","2T":"rus","2B":"rus",3:"rus"},{l:"Sanskrit",lh:"\u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d",1:"sa",2:"san","2T":"san","2B":"san",3:"san"},{l:"Sardinian",lh:"Sardu",1:"sc",2:"srd","2T":"srd","2B":"srd",3:"srd"},{l:"Sindhi",lh:"\u0633\u0646\u068c\u064a\u200e",1:"sd",2:"snd","2T":"snd","2B":"snd",3:"snd"},{l:"Northern Sami",lh:"S\xe1megiella",1:"se",2:"sme","2T":"sme","2B":"sme",3:"sme"},{l:"Samoan",lh:"Gagana S\u0101moa",1:"sm",2:"smo","2T":"smo","2B":"smo",3:"smo"},{l:"Sango",lh:"S\xe4ng\xf6",1:"sg",2:"sag","2T":"sag","2B":"sag",3:"sag"},{l:"Serbian",lh:"\u0421\u0440\u043f\u0441\u043a\u0438",1:"sr",2:"srp","2T":"srp","2B":"srp",3:"srp"},{l:"Gaelic",lh:"G\xe0idhlig",1:"gd",2:"gla","2T":"gla","2B":"gla",3:"gla"},{l:"Shona",lh:"ChiShona",1:"sn",2:"sna","2T":"sna","2B":"sna",3:"sna"},{l:"Sinhala",lh:"\u0dc3\u0dd2\u0d82\u0dc4\u0dbd",1:"si",2:"sin","2T":"sin","2B":"sin",3:"sin"},{l:"Slovak",lh:"Sloven\u010dina",1:"sk",2:"slk","2T":"slk","2B":"slo",3:"slk"},{l:"Slovene",lh:"Sloven\u0161\u010dina",1:"sl",2:"slv","2T":"slv","2B":"slv",3:"slv"},{l:"Somali",lh:"Soomaaliga",1:"so",2:"som","2T":"som","2B":"som",3:"som"},{l:"Southern Sotho",lh:"Sesotho",1:"st",2:"sot","2T":"sot","2B":"sot",3:"sot"},{l:"Spanish",lh:"Espa\xf1ol",1:"es",2:"spa","2T":"spa","2B":"spa",3:"spa"},{l:"Sundanese",lh:"Basa Sunda",1:"su",2:"sun","2T":"sun","2B":"sun",3:"sun"},{l:"Swahili",lh:"Kiswahili",1:"sw",2:"swa","2T":"swa","2B":"swa",3:"swa"},{l:"Swati",lh:"SiSwati",1:"ss",2:"ssw","2T":"ssw","2B":"ssw",3:"ssw"},{l:"Swedish",lh:"Svenska",1:"sv",2:"swe","2T":"swe","2B":"swe",3:"swe"},{l:"Tamil",lh:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",1:"ta",2:"tam","2T":"tam","2B":"tam",3:"tam"},{l:"Telugu",lh:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",1:"te",2:"tel","2T":"tel","2B":"tel",3:"tel"},{l:"Tajik",lh:"\u0422\u043e\u04b7\u0438\u043a\u04e3",1:"tg",2:"tgk","2T":"tgk","2B":"tgk",3:"tgk"},{l:"Thai",lh:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",1:"th",2:"tha","2T":"tha","2B":"tha",3:"tha"},{l:"Tigrinya",lh:"\u1275\u130d\u122d\u129b",1:"ti",2:"tir","2T":"tir","2B":"tir",3:"tir"},{l:"Tibetan Standard",lh:"\u0f56\u0f7c\u0f51\u0f0b\u0f61\u0f72\u0f42",1:"bo",2:"bod","2T":"bod","2B":"tib",3:"bod"},{l:"Turkmen",lh:"T\xfcrkmen\xe7e",1:"tk",2:"tuk","2T":"tuk","2B":"tuk",3:"tuk"},{l:"Tagalog",lh:"Tagalog",1:"tl",2:"tgl","2T":"tgl","2B":"tgl",3:"tgl"},{l:"Tswana",lh:"Setswana",1:"tn",2:"tsn","2T":"tsn","2B":"tsn",3:"tsn"},{l:"Tonga",lh:"faka Tonga",1:"to",2:"ton","2T":"ton","2B":"ton",3:"ton"},{l:"Turkish",lh:"T\xfcrk\xe7e",1:"tr",2:"tur","2T":"tur","2B":"tur",3:"tur"},{l:"Tsonga",lh:"Xitsonga",1:"ts",2:"tso","2T":"tso","2B":"tso",3:"tso"},{l:"Tatar",lh:"\u0422\u0430\u0442\u0430\u0440\u0447\u0430",1:"tt",2:"tat","2T":"tat","2B":"tat",3:"tat"},{l:"Twi",lh:"Twi",1:"tw",2:"twi","2T":"twi","2B":"twi",3:"twi"},{l:"Tahitian",lh:"Reo M\u0101\u2019ohi",1:"ty",2:"tah","2T":"tah","2B":"tah",3:"tah"},{l:"Uyghur",lh:"\u0626\u06c7\u064a\u063a\u06c7\u0631\u0686\u0647",1:"ug",2:"uig","2T":"uig","2B":"uig",3:"uig"},{l:"Ukrainian",lh:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",1:"uk",2:"ukr","2T":"ukr","2B":"ukr",3:"ukr"},{l:"Urdu",lh:"\u0627\u0631\u062f\u0648",1:"ur",2:"urd","2T":"urd","2B":"urd",3:"urd"},{l:"Uzbek",lh:"O\u2018zbek",1:"uz",2:"uzb","2T":"uzb","2B":"uzb",3:"uzb"},{l:"Venda",lh:"Tshiven\u1e13a",1:"ve",2:"ven","2T":"ven","2B":"ven",3:"ven"},{l:"Vietnamese",lh:"Ti\u1ebfng Vi\u1ec7t",1:"vi",2:"vie","2T":"vie","2B":"vie",3:"vie"},{l:"Volap\xfck",lh:"Volap\xfck",1:"vo",2:"vol","2T":"vol","2B":"vol",3:"vol"},{l:"Walloon",lh:"Walon",1:"wa",2:"wln","2T":"wln","2B":"wln",3:"wln"},{l:"Welsh",lh:"Cymraeg",1:"cy",2:"cym","2T":"cym","2B":"wel",3:"cym"},{l:"Wolof",lh:"Wolof",1:"wo",2:"wol","2T":"wol","2B":"wol",3:"wol"},{l:"Western Frisian",lh:"Frysk",1:"fy",2:"fry","2T":"fry","2B":"fry",3:"fry"},{l:"Xhosa",lh:"isiXhosa",1:"xh",2:"xho","2T":"xho","2B":"xho",3:"xho"},{l:"Yiddish",lh:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",1:"yi",2:"yid","2T":"yid","2B":"yid",3:"yid"},{l:"Yoruba",lh:"Yor\xf9b\xe1",1:"yo",2:"yor","2T":"yor","2B":"yor",3:"yor"},{l:"Zhuang",lh:"Cuengh",1:"za",2:"zha","2T":"zha","2B":"zha",3:"zha"},{l:"Zulu",lh:"isiZulu",1:"zu",2:"zul","2T":"zul","2B":"zul",3:"zul"}];function iF(t){var i;const e=null!=(i=function(t){const i=t.AZ,e=new Uh;return e.CZ(i,0,i.byteLength),Yk(e).hK}(t))?i:24;return t.rdt/e}function eF(t){return t.Rg===he.Zv}var sF;function nF(t,i,e,s,n){const r=function(t,i,e,s){const n=e.rdt,r=Ce.fromNumber(t.EM||0),h=s.MT(Sn.EN(r,n));return{hdt:s.fN(),odt:s,adt:h,udt:s}}(t,0,e,s),h=Sn.bN(t.ct||0,e.rdt),o=t.cp||0,a=!(65536&o)&&1!==(o>>24&3);let u;const c=hl(n),d=new Ha;for(;d.Ku<c.byteLength;){const t=cs(c,d);if((31&As(c,d,1))===Ok.KZ){const i=new Uh;i.CZ(n,d.Ku-1,d.Ku+t-1);const e=new Fk(i),s=Pk(r.adt,e);u=u||[],u.push(...KQ(s))}d.Nm(t-1)}return Tt({},r,{ct:h.fN(),cdt:h,ddt:r.adt.fN(),ldt:r.hdt,fdt:a,_dt:u,gdt:!1,wdt:!1})}function rF(t){return{Rp:t.ep.Rp,rdt:t.jp.ep.bp}}function hF(t){return t.Rg===he.Av}!function(t){t[t.SAMPLE_DEPENDS_ON_UNKNOWN=0]="SAMPLE_DEPENDS_ON_UNKNOWN",t[t.SAMPLE_DEPENDS_ON_OTHERS=1]="SAMPLE_DEPENDS_ON_OTHERS",t[t.SAMPLE_DEPENDS_ON_NO_OTHER=2]="SAMPLE_DEPENDS_ON_NO_OTHER",t[t.SAMPLE_DEPENDS_ON_RESERVED=3]="SAMPLE_DEPENDS_ON_RESERVED"}(sF||(sF={}));var Wh=class{eN(t){return this.U6===t.U6&&this.b6===t.b6}constructor(t,i){this.U6=t,this.b6=i}},oF=class{get i8(){return this.Adt}get X6(){return[this]}get J6(){return this.HH}get O6(){return this.vdt}get P6(){return new Wh(this.O6.U6,this.O6.b6+this.i8.length-1)}mdt(t){this.Adt+=t}pdt(t){for(const i of t)this.mdt(i)}constructor(t,i){this.HH=t,this.vdt=i,this.Adt=""}};function aF(t,i){return t===i||t.i8===i.i8&&t.O6.eN(i.O6)&&Dh(t.J6,i.J6)}function uF(t,i){return t===i||t.O6.eN(i.O6)&&t.P6.eN(i.P6)&&Wd(t.X6,i.X6,aF)}var cF=class extends dh{sN(t){return Wd(this.O,t.O,uF)}constructor(t,i,e){super(t,i,e,!1)}},dF=class{ydt(t){return t.SD(this)}Mdt(t){return xl(t,((t,i)=>t.SD(this,i)))}Tdt(t,i){return new lF(t,i).Ndt()}},lF=class{Ndt(){if(this.Ddt)return[];for(let t=0;t<this.U6.length;t++)this.Sdt(t);return this.Idt(),this.Edt}bdt(t){this.Ldt=new oF(yj,new Wh(this.kdt,t))}Idt(){this.Ldt&&(this.Edt.push(this.Ldt),this.Ldt=null)}Sdt(t){const i=this.U6[t];fF(i)?this.Ldt&&this.Idt():(this.Ldt||this.bdt(t),this.Ldt.mdt(i))}get Ddt(){return this.U6.every(fF)}constructor(t,i){this.U6=t,this.kdt=i,this.Edt=[],this.Ldt=null}};function fF(t){return null==t}var _F=class{static Cdt(t,i,e){if(i>=e)return;const s=xl(t,((t,i)=>new lF(t.map((t=>t?t.xdt():null)),i).Ndt()));return 0!==s.length?new cF(i,e,s):void 0}},Du="black",gF="white",wF=[[42,225],[92,233],[94,237],[95,243],[96,250],[123,231],[124,247],[125,209],[126,241],[127,9608],[128,174],[129,176],[130,189],[131,191],[132,8482],[133,162],[134,163],[135,9834],[136,224],[137,32],[138,232],[139,226],[140,234],[141,238],[142,244],[143,251],[144,193],[145,201],[146,211],[147,218],[148,220],[149,252],[150,8216],[151,161],[152,42],[153,8217],[154,9473],[155,169],[156,8480],[157,8226],[158,8220],[159,8221],[160,192],[161,194],[162,199],[163,200],[164,202],[165,203],[166,235],[167,206],[168,207],[169,239],[170,212],[171,217],[172,249],[173,219],[174,171],[175,187],[176,195],[177,227],[178,205],[179,204],[180,236],[181,210],[182,242],[183,213],[184,245],[185,123],[186,125],[187,92],[188,94],[189,95],[190,124],[191,8764],[192,196],[193,228],[194,214],[195,246],[196,223],[197,165],[198,164],[199,9475],[200,197],[201,229],[202,216],[203,248],[204,9487],[205,9491],[206,9495],[207,9499]].reduce(((t,i)=>(t[i[0]]=i[1],t)),{}),AF=class{Odt(t){for(let i=0;i<el;i++)t&&(this.jdt[i]=t.jdt[i])}eN(t){for(let i=0;i<el;i++)if(this.jdt[i]!==t.jdt[i])return!1;return!0}zdt(){for(let t=0;t<el;t++)if(null!==this.jdt[t])return!1;return!0}Pdt(t){this.Bdt!==t&&(this.Bdt=t),this.Bdt<0?this.Bdt=0:this.Bdt>el&&(this.Bdt=31)}Rdt(t){const i=this.Bdt+t;this.Pdt(i)}Udt(){this.Rdt(-1),this.jdt[this.Bdt]=null}mdt(t){t>=144&&this.Udt();const i=function(t){return wF[t]?String.fromCharCode(wF[t]):String.fromCharCode(t)}(t);this.addParsedChar(i)}addParsedChar(t){this.Bdt>=el||(32===Number(t)?(this.jdt[this.Bdt]=this.Qdt?"</i>":"<i>",this.Qdt=!this.Qdt):this.jdt[this.Bdt]=t,this.Rdt(1))}Fdt(t){for(let i=t;i<el;i++)this.jdt[i]=null}Ub(){this.Fdt(0),this.Bdt=0}Ydt(){this.Fdt(this.Bdt)}Gdt(t,i){const e=this.jdt;let s=null;for(let n=0;n<el;n++){const r=e[n];null===r?s=null:(s||(s={Gh:n,Xh:t,ji:0,Ti:1,jdt:[[]]},i.push(s)),s.jdt[0].push(r),s.ji++)}}SD(t,i){return t.Tdt(this.jdt,i)}constructor(){this.jdt=[],this.Bdt=0;for(let t=0;t<el;t++)this.jdt.push(null);this.Qdt=!1}};var vF,mF=class{Vdt(t,i){const e="CC"+(this.Wdt<<1|this.Hdt+1);if(t>=i)return null;const s=(new dF).Mdt(this.qdt.slice(1));return 0===s.length?null:{BT:new cF(t,i,s),rV:e,Xdt:this.Wdt<<1|this.Hdt+1}}tr(){this.Zdt(),this.Kdt=1}Jdt(){return this.Kdt}$dt(t){this.Kdt=t}Pdt(t){this.qdt[this.Kdt].Pdt(t)}Rdt(t){this.qdt[this.Kdt].Rdt(t)}tlt(){return this.ilt}elt(t){this.ilt=t}mdt(t,i){if(i<32||i>127)return;let e="";switch(t){case 0:e=void 0!==yF[i]?yF[i]:String.fromCharCode(i);break;case 1:e=MF[i];break;case 2:this.slt(),e=TF[i];break;case 3:this.slt(),e=NF[i]}e&&this.qdt[this.Kdt].addParsedChar(e)}slt(){this.qdt[this.Kdt].Udt()}nlt(t,i,e){if(t>=i)for(let s=e-1;s>=0;s--)this.qdt[t+s]=this.qdt[i+s];else for(let s=0;s<e;s++)this.qdt[t+s]=this.qdt[i+s]}rlt(t,i){for(let e=0;e<=i;e++)this.qdt[t+e]=new AF}Zdt(){this.rlt(0,mh)}hlt(){this.Kdt=this.ilt>0?this.ilt:0,this.Zdt()}olt(t){this.ult=t}clt(t){this.dlt=t}llt(t){this.flt=t}_lt(t){this.glt=t}constructor(t,i){this.qdt=new Array(mh+1);for(let t=0;t<=mh;t++)this.qdt[t]=new AF;this.Kdt=1,this.ilt=0,this.Wdt=t,this.Hdt=i,this.ult=!1,this.dlt=!1,this.flt=gF,this.glt=Du,this.tr()}},mh=15;!function(t){t[t.wlt=0]="wlt",t[t.Alt=1]="Alt",t[t.vlt=2]="vlt",t[t.plt=3]="plt"}(vF||(vF={}));var pF,yF={39:"\u2019",42:"\xe1",92:"\xe9",94:"\xed",95:"\xf3",96:"\xfa",123:"\xe7",124:"\xf7",125:"\xd1",126:"\xf1",127:"\u2588"},MF={48:"\xae",49:"\xb0",50:"\xbd",51:"\xbf",52:"\u2122",53:"\xa2",54:"\xa3",55:"\u266a",56:"\xe0",57:"\u2800",58:"\xe8",59:"\xe2",60:"\xea",61:"\xee",62:"\xf4",63:"\xfb"},TF={32:"\xc1",33:"\xc9",34:"\xd3",35:"\xda",36:"\xdc",37:"\xfc",38:"\u2018",39:"\xa1",40:"*",41:"'",42:"\u2500",43:"\xa9",44:"\u2120",45:"\xb7",46:"\u201c",47:"\u201d",48:"\xc0",49:"\xc2",50:"\xc7",51:"\xc8",52:"\xca",53:"\xcb",54:"\xeb",55:"\xce",56:"\xcf",57:"\xef",58:"\xd4",59:"\xd9",60:"\xf9",61:"\xdb",62:"\xab",63:"\xbb"},NF={32:"\xc3",33:"\xe3",34:"\xcd",35:"\xcc",36:"\xec",37:"\xd2",38:"\xf2",39:"\xd5",40:"\xf5",41:"{",42:"}",43:"\\",44:"^",45:"_",46:"|",47:"~",48:"\xc4",49:"\xe4",50:"\xd6",51:"\xf6",52:"\xdf",53:"\xa5",54:"\xa4",55:"\u2502",56:"\xc5",57:"\xe5",58:"\xd8",59:"\xf8",60:"\u250c",61:"\u2510",62:"\u2514",63:"\u2518"},DF=class{tr(){this.ylt=!0,this.Mlt=0,this.F0=0,this.Tlt=this.Nlt,this.Dlt=void 0,this.Nlt.tr(),this.Slt.tr(),this.Ilt.tr()}Elt(t,i){return[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(7&t)<<1|i>>5&1]}blt(t,i){const e=this.Elt(t,i),s=(30&i)>>1;let n=gF,r=!1;s<7?n=bF[s]:7===s&&(r=!0);const h=1==(1&i);if(4===this.F0)return;const o=this.Tlt;if(3===this.F0&&e!==o.Jdt()){const t=1+o.Jdt()-o.tlt(),i=1+e-o.tlt();o.nlt(i,t,o.tlt()),o.rlt(0,i-1),o.rlt(e+1,mh-e)}o.$dt(e);const a=Tj[t<<1&14|i>>5&1]-1;if(a<0)return;const u=function(t,i){const e=i>95?i-96:i-64;return{E6:Mj[e].E6,I6:Mj[e].I6,b6:Mj[e].b6,U6:t}}(a,i);o.Pdt(u.b6),this.Tlt.olt(h),this.Tlt.clt(r),this.Tlt.llt(n),this.Tlt._lt(Du)}Llt(t,i){this.Tlt.olt(!1),this.Tlt.clt(!1),this.Tlt.llt(gF);const e=this.klt(t,vF.wlt," ".charCodeAt(0));let s=gF,n=!1;const r=1==(1&i);return s=bF[(14&i)>>1],"white_italics"===s&&(s="white",n=!0),this.Tlt.olt(r),this.Tlt.clt(n),this.Tlt.llt(s),e}klt(t,i,e){if(this.Tlt.mdt(i,e),2===this.F0||3===this.F0){const i=this.Clt(this.Tlt,this.Mlt,t);return this.Mlt=t,i}return null}Clt(t,i,e){return this.ylt?null:2===this.F0||3===this.F0?t.Vdt(e,e+10):t.Vdt(i,e)}xlt(t,i){let e=Du;0==(7&t)&&(e=EF[(14&i)>>1]),this.Tlt._lt(e)}Olt(t){const i=SF,e=t.jlt,s=t.zlt;let n=null;switch(e){case i.RCL:this.Plt();break;case i.BS:this.Blt();break;case i.AOD:case i.AON:case i.DER:break;case i.RU2:n=this.Rlt(2,s);break;case i.RU3:n=this.Rlt(3,s);break;case i.RU4:n=this.Rlt(4,s);break;case i.FON:n=this.Ult(s);break;case i.RDC:this.Qlt(s);break;case i.TR:this.Flt();break;case i.RTD:this.Ylt();break;case i.EDM:n=this.Glt(s);break;case i.CR:n=this.Vlt(s);break;case i.ENM:this.Wlt();break;case i.EOC:n=this.Hlt(s)}return n}Vlt(t){const i=this.Tlt;if(3!==this.F0)return null;const e=this.Clt(i,this.Mlt,t),s=i.Jdt()-i.tlt()+1;return i.nlt(s-1,s,i.tlt()),i.rlt(0,s-1),i.rlt(i.Jdt(),mh-i.Jdt()),this.Mlt=t,e}Rlt(t,i){this.Tlt=this.Nlt;const e=this.Tlt;let s=null;return 3!==this.F0&&4!==this.F0&&(s=this.Clt(e,this.Mlt,i),this.Nlt.hlt(),this.Slt.hlt(),this.ylt=!1,e.$dt(mh)),this.F0=3,e.elt(t),s}Ult(t){return this.klt(t,vF.wlt," ".charCodeAt(0))}Glt(t){const i=this.Nlt;let e=null;return 4!==this.F0&&(e=this.Clt(i,this.Mlt,t)),i.Zdt(),this.ylt=!1,e}Qlt(t){this.F0=2,this.Tlt=this.Nlt,this.Tlt.elt(0),this.Mlt=t}Wlt(){this.Slt.Zdt()}Hlt(t){let i=null;4!==this.F0&&(i=this.Clt(this.Nlt,this.Mlt,t));const e=this.Slt;return this.Slt=this.Nlt,this.Nlt=e,this.Plt(),this.Mlt=t,i}Plt(){this.F0=1,this.Tlt=this.Slt,this.Tlt.elt(0)}Blt(){this.Tlt.slt()}Flt(){this.Ilt.tr(),this.ylt=!1,this.Ylt()}Ylt(){this.Tlt=this.Ilt,this.F0=4}qlt(t,i,e){return this.Tlt.mdt(vF.wlt,i),this.klt(t,vF.wlt,e)}Xlt(t,i,e){const s=1&i?vF.plt:vF.vlt;return this.klt(t,s,e)}Zlt(t){const i=t.Klt,e=t.jlt,s=t.zlt;if(this.Dlt===(i<<8|e))return this.Dlt=void 0,null;if(this.Dlt=i<<8|e,this.Jlt(i,e))this.blt(i,e);else{if(this.$lt(i,e))return this.Llt(s,e);if(this.tft(i,e))this.xlt(i,e);else{if(this.ift(i,e))return this.klt(s,vF.Alt,e);if(this.eft(i,e))return this.Xlt(s,i,e);if(this.sft(i,e))return this.Olt(t);this.isTabOffset(i)&&this.Tlt.Rdt(e-32)}}return null}isTabOffset(t){return 23===t||31===t}sft(t,i){return 20==(246&t)&&32==(240&i)}Jlt(t,i){return 16==(240&t)&&64==(192&i)}$lt(t,i){return 17==(247&t)&&32==(240&i)}tft(t,i){return 16==(247&t)&&32==(240&i)||23==(247&t)&&45==(255&i)}ift(t,i){return 17==(247&t)&&48==(240&i)}eft(t,i){return 18==(246&t)&&32==(224&i)}static nft(t){return 16==(112&t)}constructor(t,i){this.F0=0,this.Ilt=new mF(t,i),this.Nlt=new mF(t,i),this.Slt=new mF(t,i),this.Tlt=this.Nlt,this.Mlt=0,this.Dlt=void 0,this.ylt=!1}},SF={RCL:32,BS:33,AOD:34,AON:35,DER:36,RU2:37,RU3:38,RU4:39,FON:40,RDC:41,TR:42,RTD:43,EDM:44,CR:45,ENM:46,EOC:47};!function(t){t[t.PP=0]="PP",t[t.rft=1]="rft",t[t.hft=2]="hft",t[t.oft=3]="oft",t[t.Ru=4]="Ru"}(pF||(pF={}));var IF,EF=["black","green","blue","cyan","red","yellow","magenta","black"],bF=["white","green","blue","cyan","red","yellow","magenta","white_italics"],LF=class{xdt(){return this.aft}uft(){return this.ult}cft(){return this.dlt}dft(){return this.glt}lft(){return this.flt}constructor(t,i,e,s,n){this.aft=t,this.ult=i,this.dlt=e,this.glt=s,this.flt=n}},kF=class{fft(t,i,e,s,n,r,h){this.VP=t,this._ft=i,this.gft=e,this.wft=s,this.Aft=n,this.vft=r,this.mft=h}pft(){this.yft=[];for(let t=0;t<xF;t++)this.yft.push(this.Mft())}Mft(){const t=[];for(let i=0;i<CF;i++)t.push(null);return t}Tft(t){this.Nft()&&(this.yft[this.Kdt][this.Dft]=new LF(t,this.ult,this.dlt,this.glt,this.flt),this.Dft++)}Sft(){this.Nft()&&(this.Dft<=0&&this.Kdt<=0||(this.Dft<=0?(this.Dft=this.mft-1,this.Kdt--):this.Dft--,this.yft[this.Kdt][this.Dft]=null))}Nft(){const t=this.Kdt<this.vft&&this.Kdt>=0,i=this.Dft<this.mft&&this.Dft>=0;return t&&i}Ift(){return this.VP}Eft(t){let i=0;for(let e=t;e<xF;e++,i++)this.yft[i]=this.yft[e];for(let e=0;e<t;e++,i++)this.yft[i]=this.Mft()}bft(){if(this.Kdt+1>=this.vft)return this.Eft(1),void(this.Dft=0);this.Kdt++,this.Dft=0}Lft(){this.yft[this.Kdt]=this.Mft(),this.Dft=0}Vdt(t,i){if(this.XT>=t)return null;const e=_F.Cdt(this.yft,this.XT,t);return e?(this.kft(t),{BT:e,rV:"svc"+i,Xdt:i}):null}Cft(t,i){this.Kdt=t,this.Dft=i}xft(t){this.glt=t}Oft(t){this.flt=t}jft(t){this.ult=t}zft(t){this.dlt=t}Pft(){this.Kdt=0,this.Dft=0,this.ult=!1,this.dlt=!1,this.flt=gF,this.glt=Du}Bft(t){this.Rft=t}Uft(){this.VP=!0}be(){this.VP=!1}wh(){this.VP=!this.VP}kft(t){this.XT=t}constructor(t){this.Qft=t,this.VP=!1,this.Aft=!1,this.gft=0,this._ft=0,this.wft=0,this.vft=0,this.mft=0,this.Rft=2,this.yft=[],this.XT=0,this.Kdt=0,this.Dft=0,this.dlt=!1,this.ult=!1,this.flt=gF,this.glt=Du,this.pft()}};!function(t){t[t.Fft=0]="Fft",t[t.Yft=1]="Yft",t[t.Gft=2]="Gft",t[t.Vft=3]="Vft"}(IF||(IF={}));var CF=42,xF=15,OF=class{Wft(t){const i=t.Hft();let e=i.LM;const s=i.zlt;if(e===RF){e=e<<16|t.Hft().LM}return e>=0&&e<=31?this.qft(e,s):e>=128&&e<=159?this.Xft(t,e,s):(e>=4096&&e<=4127?this.Zft(t,255&e):e>=4224&&e<=4255?this.Kft(t,255&e):e>=32&&e<=127?this.Jft(e):e>=160&&e<=255?this.$ft(e):e>=4128&&e<=4223?this.t_t(255&e):e>=4256&&e<=4351&&this.i_t(255&e),null)}Jft(t){this.e_t&&(127!==t?this.e_t.Tft(String.fromCharCode(t)):this.e_t.Tft("\u266a"))}$ft(t){this.e_t&&this.e_t.Tft(String.fromCharCode(t))}t_t(t){if(!this.e_t)return;if(void 0===UF[t])return void this.e_t.Tft("_");const i=UF[t];this.e_t.Tft(i)}i_t(t){this.e_t&&(160===t?this.e_t.Tft("[CC]"):this.e_t.Tft("_"))}qft(t,i){if(!this.e_t)return null;const e=this.e_t;let s=null;switch(t){case jF:e.Sft();break;case PF:e.Ift()&&(s=e.Vdt(i,this.s_t)),e.bft();break;case BF:e.Ift()&&(s=e.Vdt(i,this.s_t)),e.Lft();break;case zF:e.Ift()&&(s=e.Vdt(i,this.s_t)),e.pft(),e.Cft(0,0)}return s}Xft(t,i,e){if(i>=128&&i<=135){const t=7&i;this.n_t(t)}else{if(136===i){const i=t.Hft().LM;return this.r_t(i,e)}if(137===i){const i=t.Hft().LM;this.h_t(i,e)}else{if(138===i){const i=t.Hft().LM;return this.o_t(i,e)}if(139===i){const i=t.Hft().LM;return this.a_t(i,e)}if(140===i){const i=t.Hft().LM;return this.u_t(i,e)}if(143===i)return this.tr(e);if(144===i)this.c_t(t);else if(145===i)this.d_t(t);else if(146===i)this.Cft(t);else if(151===i)this.l_t(t);else if(i>=152&&i<=159){const s=(15&i)-8;this.fft(t,s,e)}}}return null}Zft(t,i){i>=8&&i<=15?t.Vm(1):i>=16&&i<=23?t.Vm(2):i>=24&&i<=31&&t.Vm(3)}Kft(t,i){i>=128&&i<=135?t.Vm(4):i>=136&&i<=143&&t.Vm(5)}n_t(t){this.f_t[t]&&(this.e_t=this.f_t[t])}*__t(t){for(let i=0;i<8;i++){1==(1&t)&&this.f_t[i]&&(yield i),t>>=1}}r_t(t,i){let e=null;for(const s of this.__t(t)){const t=this.f_t[s];t.Ift()&&(e=t.Vdt(i,this.s_t)),t.pft()}return e}h_t(t,i){for(const e of this.__t(t)){const t=this.f_t[e];t.Ift()||t.kft(i),t.Uft()}}o_t(t,i){let e=null;for(const s of this.__t(t)){const t=this.f_t[s];t.Ift()&&(e=t.Vdt(i,this.s_t)),t.be()}return e}a_t(t,i){let e=null;for(const s of this.__t(t)){const t=this.f_t[s];t.Ift()?e=t.Vdt(i,this.s_t):t.kft(i),t.wh()}return e}u_t(t,i){let e=null;for(const s of this.__t(t)){const t=this.f_t[s];t.Ift()&&(e=t.Vdt(i,this.s_t)),this.f_t[s]=void 0}return e}tr(t){const i=this.u_t(255,t);return this.Ub(),i}Ub(){this.e_t=void 0,this.f_t=[void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0]}c_t(t){t.Vm(1);const i=t.Hft().LM;if(!this.e_t)return;const e=(128&i)>0,s=(64&i)>0;this.e_t.zft(e),this.e_t.jft(s)}d_t(t){const i=t.Hft().LM,e=t.Hft().LM;if(t.Vm(1),!this.e_t)return;const s=3&i,n=(12&i)>>2,r=(48&i)>>4,h=3&e,o=(12&e)>>2,a=(48&e)>>4,u=this.g_t(r,n,s),c=this.g_t(a,o,h);this.e_t.Oft(u),this.e_t.xft(c)}Cft(t){const i=t.Hft().LM,e=t.Hft().LM;if(!this.e_t)return;const s=15&i,n=63&e;this.e_t.Cft(s,n)}l_t(t){t.Vm(1),t.Vm(1);const i=t.Hft().LM;if(t.Vm(1),!this.e_t)return;const e=3&i;this.e_t.Bft(e)}fft(t,i,e){const s=void 0!==this.f_t[i];if(!s){const t=new kF(i);t.kft(e),this.f_t[i]=t}const n=t.Hft().LM,r=t.Hft().LM,h=t.Hft().LM,o=t.Hft().LM,a=t.Hft().LM,u=t.Hft().LM,c=(32&n)>0,d=127&r,l=(128&r)>0,f=h,_=1+(15&o),g=(240&o)>>4,w=1+(63&a);s&&0===(7&u)||this.f_t[i].Pft(),this.f_t[i].fft(c,d,f,g,l,_,w),this.e_t=this.f_t[i]}g_t(t,i,e){const s={0:0,1:0,2:1,3:1};return QF[s[t]<<2|s[i]<<1|s[e]]}constructor(t){this.s_t=t,this.f_t=[void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0],this.e_t=void 0}},jF=8,zF=12,PF=13,BF=14,RF=16,UF={32:" ",33:"\xa0",37:"\u2026",42:"\u0160",44:"\u0152",48:"\u2588",49:"\u2018",50:"\u2019",51:"\u201c",52:"\u201d",53:"\u2022",57:"\u2122",58:"\u0161",60:"\u0153",61:"\u2120",63:"\u0178",118:"\u215b",119:"\u215c",120:"\u215d",121:"\u215e",122:"\u2502",123:"\u2510",124:"\u2514",125:"\u2500",126:"\u2518",127:"\u250c"},QF=["black","blue","green","cyan","red","magenta","yellow","white"],FF=class{w_t(t){if(t.Rg===J.Hct){const i=63&t.LM;return this.A_t=2*i-1,void(this.v_t=[])}if(this.v_t&&(this.A_t>0&&(this.v_t.push(t),this.A_t--),0===this.A_t)){const t=new YF(this.v_t);this.m_t.push(t),this.v_t=null,this.A_t=0}}p_t(){return this.m_t}y_t(){this.m_t=[]}Ub(){this.m_t=[],this.v_t=[],this.A_t=0}constructor(){this.m_t=[],this.v_t=null,this.A_t=0}},YF=class{M_t(){return this.T_t<this.N_t.length}D_t(){return this.T_t}Hft(){if(!this.M_t())throw new $i(td.SUBTITLE_PARSE_ERROR,"Buffer read out of bounds / invalid CEA-708 Data.");return this.N_t[this.T_t++]}Vm(t){if(this.T_t+t>this.N_t.length)throw new $i(td.SUBTITLE_PARSE_ERROR,"Buffer read out of bounds / invalid CEA-708 Data.");this.T_t+=t}constructor(t){this.T_t=0,this.N_t=t}},GF=class{Ub(){this.S_t=0,this.I_t=[],this.E_t=[],this.b_t.Ub(),this.tr(),this.L_t.forEach((t=>{t.Ub()}))}tr(){this.k_t=0,this.C_t=0,this.x_t.forEach((t=>{t.tr()}))}O_t(t,i){if(t.Jct){const e=t.tdt,s=t.idt,n=t.Rg;n===J.Qct||n===J.Fct?this.I_t.push({zlt:i,Rg:n,Klt:e,jlt:s,j_t:this.I_t.length}):this.z_t&&(this.E_t.push({zlt:i,Rg:n,LM:e,j_t:this.E_t.length}),this.E_t.push({zlt:i,Rg:J.Vct,LM:s,j_t:this.E_t.length}))}}IQ(){const t=[];this.I_t.sort(((t,i)=>t.zlt-i.zlt||t.j_t-i.j_t)),this.E_t.sort(((t,i)=>t.zlt-i.zlt||t.j_t-i.j_t));for(const i of this.I_t){const e=this.P_t(i);e&&t.push(e)}for(const t of this.E_t)this.b_t.w_t(t);const i=this.b_t.p_t();for(const e of i){const i=this.B_t(e);t.push(...i)}return this.b_t.y_t(),this.I_t=[],this.E_t=[],t}P_t(t){const i=t.Rg;if(DF.nft(t.Klt)){const e=t.Klt>>3&1;0===i?this.k_t=e:this.C_t=e}const e="CC"+(i<<1|(i?this.C_t:this.k_t)+1),s=this.x_t.get(e);return 255===t.Klt&&255===t.jlt||!t.Klt&&!t.jlt||!this.R_t(t.Klt)||!this.R_t(t.jlt)?(++this.S_t>=45&&this.tr(),null):(this.S_t=0,t.Klt&=127,t.jlt&=127,t.Klt||t.jlt?DF.nft(t.Klt)?s.Zlt(t):s.qlt(t.zlt,t.Klt,t.jlt):null)}B_t(t){const i=[];try{for(;t.M_t();){const e=t.Hft().LM;let s=(224&e)>>5;const n=31&e;if(7===s&&0!==n){s=63&t.Hft().LM}if(0!==s){if(!this.L_t.has(s)){const t=new OF(s);this.L_t.set(s,t)}const e=this.L_t.get(s),r=t.D_t();for(;t.D_t()-r<n;){const s=e.Wft(t);s&&i.push(s)}}}}catch(t){if(!(t instanceof $i&&t.code===td.SUBTITLE_PARSE_ERROR))throw t}return i}R_t(t){let i=0;for(;t;)i^=1&t,t>>=1;return 1===i}constructor(){this.z_t=!1,this.I_t=[],this.E_t=[],this.b_t=new FF,this.S_t=0,this.x_t=Jd({CC1:new DF(0,0),CC2:new DF(0,1),CC3:new DF(1,0),CC4:new DF(1,1)}),this.k_t=0,this.C_t=0,this.L_t=Y(),this.tr()}},VF=class extends Yi{constructor(t,i){super("U_t"),this.Xdt=t,this.BT=i}},WF=Sn.fD(.1),HF=class extends Bo{Q_t(t,i){this.F_t.O_t(t,i)}IQ(){const t=this.F_t.IQ();for(const i of t)this.Co(new VF(i.Xdt,i.BT))}tr(){this.F_t.Ub()}gn(){this.Vo(),this.F_t.Ub()}constructor(){super(),this.F_t=new GF}},qF=class extends HF{Y_t(t,i,e,s){const n=this.G_t(t,s);this.V_t(n,i,e),this.IQ()}G_t(t,i){const e=t.slice().sort(Nj),s=this.W_t;if(0===s.length)return e;if(0===e.length)return s;let n;const r=s[0].L6,h=s[s.length-1].L6,o=e[0].L6,a=s[0].Brt===e[0].Brt;if(h.NN(o).yN().pN(Sn.fD(2.5*i))&&a)n=s.concat(e).sort(Nj);else if(o.wN(r)){let t=0;for(;t<s.length&&s[t].L6.pN(o);)t++;let i=!1,r=!1;for(let n=t,h=0;n<s.length&&h<e.length;n++,h++)XF(s[n],e[h])?i=!0:r=!0;const h=i&&!r,a=i&&r;!i&&r?n=s.concat(e).sort(Nj):h?n=s.slice(0,t).concat(e):(n=e,a&&this.tr())}else n=e,this.tr();return n}V_t(t,i,e){for(let s=0;s<t.length;s++){const n=t[s],r=n.L6.fN();if(!e&&i-r<WF.fN())return void(this.W_t=t.slice(s));this.Q_t(n,r)}this.W_t=[]}constructor(...t){super(...t),this.W_t=[]}};function XF(t,i){return t.L6.eN(i.L6)&&t.Rg===i.Rg&&t.tdt===i.tdt&&t.idt===i.idt}var ZF=class extends F{H_t(t){return this.q_t.get(t)}X_t(t){let i=this.q_t.get(t.k6);return i||(i=this.Z_t(t),this.q_t.set(t.k6,i)),i}Z_t(t){const i=[cc.Sg],e=$Q(t.C6);let s,n=e?e.l:"";t.K_t&&(n="easy "+n,i.push(cc.Cg)),s=t.kh?"CC "+t.kh:n?"CC "+n:"CC"+t.k6;const r=this.AI.wI(hh.wS,s,s,t.C6,!1,Wt.CEA608,void 0,i);return this.tt(r),r}tnt(t){const i=Eh.dp(hl(t));this.J_t=function(t){for(const i of t.Z){const t=rF(i),e=i.jp.Wp.Xp.Kp.$p;let s=Po(e,(t=>t.Rg===he.Lv));if(!s){const t=e.filter((t=>t.Rg===he.Xv)),i=Po(t,(t=>{var i;return(null==(i=t.Zy)?void 0:i.Rg)===he.Lv}));i&&(s=i.Zy)}if(!s)continue;const n=Ck(hl(s.Py.Om),new Ha),r=s.Ry;return Tt({},t,{Rp:i.ep.Rp,Py:bg(s.Py.Om),ji:s.ji,Ti:s.Ti,oM:r&&r.oM,hM:r&&r.hM,zK:n.fZ,$_t:n._Z,PK:n.gZ,AZ:n.AZ[0],vZ:n.vZ[0]})}}(Po(i,hF))}cut(t,i,e,s,n,r){var h;if(!this.J_t)return;if(!S(this.tgt)&&be(this.tgt,i,1e-5))return;S(this.igt)||be(this.igt,i,.1)||this.egt.tr();const o=function(t,i,e,s,n){const r=[],h=i.filter(eF),o=s(e);for(const i of h){const s=Po(i.Z,(t=>t.ep.Rp===e.Rp));if(!s)continue;const h=s.ep.cM||0,u=s.ep.dM||0;let c=s.yM?s.yM.yM:Ce.ZERO;var a;const d=i.gM+(null!=(a=s.ep.MM)?a:Ce.ZERO).toNumber();for(const a of s.pM){let s=d+(a.gM||0);for(const d of a.IM){const a=d.sp||u,l=new Uh;l.CZ(t,s,s+a);const f=Sn.EN(c,e.rdt);l.GD=n(d,i,e,f,Yo(t,s,s+a)),r.push(l),s+=a,c=c.add(d.ct||h||o)}}}return r}(t,Eh.dp(hl(t)),this.J_t,iF,nF);var a;const u=null!=(a=null==(h=qd(o,(t=>t.GD.ct)))?void 0:h.GD.ct)?a:0,c=function(t){const i=[];for(const e of t)e.GD._dt&&i.push(...e.GD._dt),delete e.GD._dt;for(let t=0;t<i.length;t+=1)i[t].wM=t;return i}(o),d=Sn.fD(s),l=[];for(const t of c)l.push(Tt({},t,{Brt:n,L6:t.Zct.MT(d)}));this.egt.Y_t(l,e,r,u),this.tgt=i,this.igt=e}tr(){return this.egt.tr(),this.q_t.forEach((t=>{t.gn(),this.it(t),this.AI.NI(t)})),this.q_t.clear(),this.J_t=void 0,this.tgt=NaN,this.igt=NaN,super.tr()}gn(){return this.egt.fn("U_t",this.sgt),this.egt.gn(),super.gn()}constructor(t){super(),this.J_t=void 0,this.tgt=NaN,this.igt=NaN,this.sgt=t=>{const i=this.X_t({k6:t.Xdt,C6:""}),e=t.BT;for(const t of i.L.og)e.RT<t.RT&&e.UT>t.RT?e.UT=t.RT:e.RT>t.RT&&t.UT>e.RT?t.UT=e.RT:e.RT===t.RT&&(e.UT=t.UT);i.MI(e)},this.AI=t,this.q_t=Y(),this.egt=new qF,this.egt.yn("U_t",this.sgt)}},KF=/(.*)=(.*)/,JF=/(.*):(.*)/;function $F(t){if(!t)return[];const i=[],e=t.trim().split(";");for(const t of e){const e=t.match(KF);if(e){const[,t,s]=e;let n="",r=!1;for(const t of s.trim().split(","))if(t.match(JF)){const[,i,e]=t.match(JF);switch(i){case"lang":n=e;break;case"er":r=Boolean(Number(e))}}i.push({k6:Number(t),C6:n,K_t:r})}}return i}var tY={1:1,2:3,3:2,4:4},iY="urn:scte:dash:cc:cea-608:2015",eY="urn:scte:dash:cc:cea-708:2015";var sY=class extends Ao{fa(){return new nY(this.Brt&&this.Brt.va)}constructor(t,i,e){super(na.J_),this.Brt=t,this.zot=i,this.ngt=e}},nY=class extends Yi{constructor(t){super("activequalitychanged"),this.quality=t}},rY=[Co.jh,Zt.H_,Co.Iw],hY=class extends Bo{rgt(t){const i=this.Dct.Krt;for(const e of i.Lt.Wnt)if(i.nat.$ot(t,e))return e}gn(){this.Vo(),this.sA.fn(rY,this.hgt)}constructor(t,i){super(),this.hgt=t=>{const i=this.ogt,e=this.rgt(t.currentTime)||this.Dct.Hrt;e&&i!==e&&(this.ogt=e,e.Brt&&this.Co(new sY(e.Brt,null==e?void 0:e.va,null==i?void 0:i.va)))},this.sA=t,this.sA.yn(rY,this.hgt),this.Dct=i}};function oY(t,i,e){const s=new Ea(hl(t),new Ha),n=Nt.tp(s,he.Av);if(!n)return;const r=Nt.qm(n.Om),h=Po(r,(t=>t.Rg===he.mv)),o=Po(r,(t=>t.Rg===he.um));if(!h)return;const a=Nt.tp(h.Om,he.yv);if(!a)return;const u=Nt.tp(a.Om,he.Nv);if(!u)return;const c=Nt.tp(u.Om,he.Dv);if(!c)return;const d=Nt.qm(c.Om),l=Po(d,(t=>t.Rg===he.Sv));if(!l)return;const f=Nt.op(l.Om,he.Sv,!1),_=new Ea(hl(f.Om),new Ha);_.Vm(4);const g=Nt.qm(_),w=[];for(const t of g){if(t.Rg===he.qv||t.Rg===he.Xv)return;t.Rg===he.Lv?w.push({agt:t,ugt:he.Xv}):t.Rg===he.Yv&&w.push({agt:t,ugt:he.qv})}if(!function(t,i){return void 0===t&&void 0!==i&&i.length>0}(o,i)&&0===w.length)return;let A=_t(t);const v=Po(r,(t=>t.Rg===he.Ev)),m=v?Nt.tp(v.Om,he.bv):void 0,p=m?function(t){const i=t.Om.Sm();return i.Vm(4),i.Vm(4),i.Bm()}(m):1,y=Po(d,(t=>t.Rg===he.Iv));y&&function(t,i,e){const s=Jr(hl(t),i),n=Nt.$m(s,new Ha),r=n.Om;r.Vm(4);const h=r.Bm();for(let t=0;t<h;t++){r.Vm(4),r.Vm(4);const t=r.jm.Sm(),i=r.Bm();sc(r.Om,t,i+e)}}(A,y,w.length),m&&function(t,i,e){const s=Jr(hl(t),i),n=Nt.$m(s,new Ha),r=n.Om;r.Vm(4),r.Vm(4),sc(r.Om,r.jm,e)}(A,m,1),A=function(t,i,e,s){if(e||!s)return t;let n=t;for(const t of s)n=aY(n,i,new j(t));return n}(A,n,o,i);const M=[n,h,a,u,c,l];for(let t=w.length-1;t>=0;t--){const i=w[t];A=uY(A,i.agt,l,M,i.ugt,e)}return{cgt:A,dgt:{lgt:w.length,uM:p}}}function aY(t,i,e){const s=z_(t,e,i.Om.Om.byteOffset+i.Om.Om.byteLength);return cY(Jr(hl(s),i),e.byteLength),s}function uY(t,i,e,s,n,r){const h=function(t,i,e){0;const s=t.Om.Om,n=gY(),r=new j(s.byteLength+n.byteLength),h=hl(r);r.set($t(s),0),cY(h,n.byteLength),vg(h,new Ha(vY),i),r.set(n,s.byteLength),vg(h,new Ha(s.byteLength+wY),t.Rg),e&&cg(h,new Ha(s.byteLength+AY),e);return r}(i,n,r),o=z_(t,h,i.Om.Om.byteOffset),a=hl(o);!function(t,i){const e=Nt.$m(t,new Ha),s=Nt.op(e.Om,he.Sv,!1),n=hl(s.Om),r=n.getUint32(0);n.setUint32(0,r+i)}(Jr(a,e),1);for(const t of s)cY(Jr(a,t),h.byteLength);return o}function Jr(t,i){const e=i.Om.Om.byteOffset;return Yh(t,e,e+i.Om.Om.byteLength)}function cY(t,i){const e=new Ha,s=cs(t,e);if(0===s);else if(1===s){e.Nm(4);const s=io(t,e.Sm());_g(t,e,s.add(i))}else e.Dm(0),sc(t,e,s+i)}var dY=class extends Br{start(t){this.xH=t}transform(t){this.rX(t),this.fgt()}flush(){this.oX(),this.fgt()}gX(t){return t===he.Zv}AX(t){let i=_t($t(t.Om.Om));const e=Nt.$m(hl(i),new Ha);i=lY(i,e,this._gt),this.ggt.push(i)}mX(t){this.ggt.push(t)}fgt(){for(const t of function(t){if(t.length<2)return t;const i=[];let{buffer:e,byteOffset:s,byteLength:n}=t[0];for(let r=1;r<t.length;r++){const h=t[r];e===h.buffer&&s+n===h.byteOffset?n+=h.byteLength:(i.push(new j(e,s,n)),({buffer:e,byteOffset:s,byteLength:n}=h))}return i.push(new j(e,s,n)),i}(this.ggt))this.xH.enqueue(t);No(this.ggt)}constructor(t){super(),this.ggt=[],this._gt=t}};function lY(t,i,e){let s=t;const n=Nt.qm(i.Om);for(let t=n.length-1;t>=0;t--){const r=n[t];r.Rg===he.Jv&&(s=fY(s,r,i,e))}return s}function fY(t,i,e,s){const n=Jr(hl(t),i),r=Nt.$m(n,new Ha),h=Nt.qm(r.Om),o=Po(h,(t=>t.Rg===he.$v));if(!o)return t;const a=o.Om,u=a.jm.Sm(),c=a.Bm(),{flags:d}=ac(c);a.Vm(4),d.Em(ci.BASE_DATA_OFFSET_PRESENT)&&a.Vm(8);const l=a.jm.Sm();if(d.Em(ci.SAMPLE_DESCRIPTION_INDEX_PRESENT)){const i=cs(a.Om,l);return sc(a.Om,a.jm,i+s.lgt),t}{sc(a.Om,u,c|ci.SAMPLE_DESCRIPTION_INDEX_PRESENT);const n=new j(4);hl(n).setUint32(0,s.uM+s.lgt);const r=a.Om.byteOffset+l.Ku;for(const t of h.filter((t=>t.Rg===he.tm)))_Y(t,n.byteLength);for(const s of[o,i,e])cY(Jr(hl(t),s),n.byteLength);return z_(t,n,r)}}function _Y(t,i){const e=t.Om,s=e.Bm(),{flags:n}=ac(s);if(e.Vm(4),n.Em(rr.DATA_OFFSET_PRESENT)){const t=e.Sm().Bm();sc(e.Om,e.jm,t+i)}}var gY=Ol((()=>new j([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]))),wY=16,AY=64,vY=4,mY=[ut.ha,Co.Mw,Co.Tw,Co.Dw,Co.Yg],pY=class extends Bo{get xnt(){return this.Ont}get o(){return this.IT}get XJ(){return this.ZJ}get nt(){return this.wgt}get Ict(){return function(t){const i=29.97,e=1024,s=44100;return t===f.vm?s/e:i}(this.ZJ)}get Sct(){return 1/this.Ict}get Rt(){return Boolean(this.Ont&&this.Ont.Rt)}get Cq(){const t=this.Dct?this.Dct.Krt.Cq.Zot:ce.MB();return this.Agt().rB(t)}get wf(){let t=this.vgt();const i=this.mgt;return void 0!==i&&t.$P().gr(i)&&(t=t.rB(ce.pB(i))),t}get Vot(){return lU(this.vgt(),this.Cq.rB(this.pgt)).nB(2*this.Sct)}get pgt(){const t=this.mgt;if(t&&isFinite(t)){const i=this.ygt.jn;if(isFinite(i)&&t<i)return new ce([t,i],[!1,!0])}return ce.MB()}get t_(){const t=this.Ont;if(!t)return ce.pB(0);const i=t.Bot.Ect,e=t.Bot.bct;if(void 0===e||void 0===i)return ce.pB(0);const s=e;let n=i>=t.Bot.bat.jn?_.max(i,this.jn):i;return n=_.max(s,n),ce.yB(s,n).$P()}get Lz(){return this.Vot.dA(this.Mf)}get Xot(){return this.ygt.Xot}get Mf(){return this.sA.Mf}get Cn(){return this.Ont?this.Ont.Bot.bat.Cn:NaN}get jn(){const t=this.Mgt(),i=this.mgt;return void 0===t?NaN:void 0!==i?i:t}Mgt(){var t;return null==(t=this.Ont)?void 0:t.Bot.bat.jn}get Ti(){return this.ygt.Ti}get ji(){return this.ygt.ji}get Tgt(){return this.mgt}aht(){return void 0!==this.Dct&&this.Dct.aht}qot(){if(void 0===this.mgt)return!1;const t=this.vgt().$P(),i=t.aB(this.mgt);return!(i<0)&&t.Cn(i)!==this.mgt}HJ(){const t=this.ygt.Xot,i=this.vgt().Sn(t);this.mgt=i.U>0?i.jn(i.U-1):0;const e=t.jn(0);isFinite(e)&&this.mgt<e&&this.Oq(this.mgt,e),this.Ngt()}async cut(t,i,e,s){const n=e.ent.jD,r=this.Dgt(t,i,e,n,s),h=this.Sgt(t,i,e,n,s),[o]=await Pl([h,r]);return o}async Dgt(t,i,e,s,n){if(!Bt(e.SF))return;let r;if(t.Rg===dt.US){const i=t.Om.oot(),e=await i.nj(n);r=new j(e)}else r=new j(t.Om.Lnt);const h=[];if(void 0!==this.Igt&&(this.Igt.cut(r,i.RT,s),h.push(this.Igt)),void 0!==this.Egt){const t=e.Eat(i);this.Egt.cut(r,i.RT,i.UT,s,e.Brt,t),h.push(this.Egt)}cm(this.wf,h)}async Sgt(t,i,e,s,n){var r;let h;if(fo(n),t.Rg===dt.US){let i=t.Om.rV;this.bgt&&(i=function(t,i){return t.pipeThrough(new De(new dY(i)))}(i,this.bgt)),h={Rg:dt.US,Om:i}}else{let i=new j(t.Om.Lnt);this.bgt&&(i=function(t,i){let e=_t(t);const s=new Ea(hl(e),new Ha),n=Nt.qm(s);for(let t=n.length-1;t>=0;t--){const s=n[t];s.Rg===he.Zv&&(e=lY(e,s,i))}return e}(i,this.bgt)),h={Rg:dt.$H,Om:i}}const o={Z8:i.RT,ct:i.ct,jD:s,PK:null==(r=e.Brt)?void 0:r.Mg},a=this.Fst.wf;await this.Lgt(),await this.Fst.oJ(h,o,n);return function(t,i,e,s){let n,r,h=i.oB(t.$P());h=h.oB(e.oB(i)),!1;0===h.U?(n=s.UT,r=n):(n=h.Cn(0),r=h.jn(0));return{Rut:n,Uut:r}}(a,this.Fst.wf,this.Fst.KJ,i)}async tnt(t,i,e){var s;fo(e),this.Egt&&this.Egt.tnt(new j(t.Lnt));let n=new j(t.Lnt);if(this.kgt(i)){const t=this.ygt.Cgt;let i,e=[];t&&(e=xl(t.xgt,(t=>t.Az)),i=t.Ogt.kO?pS(t.Ogt.kO):void 0);const s=oY(n,e,i);s?(this.bgt=s.dgt,n=s.cgt):this.bgt=void 0}const r={Rg:dt.$H,Om:n};await this.Lgt(),await this.Fst.cJ(r,{PK:null==(s=i.Brt)?void 0:s.Mg},e)}fut(t,i,e){return this.Fst.TT(t,i,e)}Oq(t,i){this.Fst.t$(t,i)}jq(t,i){this.Fst.i$(t,i)}vgt(){return this.Fst?this.Fst.wf:ce.MB()}Agt(){return this.Fst?this.Fst.KJ:ce.MB()}jgt(){return this.Fst?this.Fst.TT(0,1/0):Promise.resolve()}zgt(){return this.Fst&&(this.Fst.fn(Je.KH,this.Ds),this.Fst=void 0),Promise.resolve()}async Pgt(t){var i;const e=nQ.hut(null!=(i=t.fct)?i:t.Wnt,this.Zat).SF;this.Fst||(this.Fst=this.ygt.Bgt(e),this.Fst.yn(Je.KH,this.Ds),this.nut=new SQ(this.Fst)),await this.Lgt()}$n(t,i){const e=new er;i&&e.Zd(i),this.TI.Xd(),this.TI=e;const s=this.Rgt(t,this.Ugt,e.Hd);return this.Ugt=s,s}Qgt(t){if(ae(this.Fgt,Wt.CEA608))return;const i=t.Bot.tct;if(function(t){return t.some((t=>t.lst===iY||t.lst===eY))}(i)){this.Egt=new ZF(this.AI);const t=function(t){const i=[];for(const e of t)if(e.lst===iY){const t=Sj(e.LM);for(const e of t)i.push(e)}else if(e.lst===eY){const t=$F(e.LM);for(const e of t)if(e.k6<=4){const t=tY[e.k6];i.push(Tt({},e,{k6:t}))}}return i}(i);for(const i of t)this.Egt.X_t(i);this.wgt.pz(this.Egt.Z)}}async Rgt(t,i,e){fo(e),i&&await i.catch(qo),this.Ont===t&&this.Ygt||(await this.Ggt(),fo(e),await this.jgt(),fo(e),t&&await this.vI(t))}async Ggt(){const t=this.Ont;this.Ont=void 0,this.Ygt=!1,this.mgt=void 0,t&&(t.fn(na.rg,this.Vgt),t.mct(!1),t.fn(na.NO_QUALITY,this.Ds)),this.Wgt&&(this.Wgt.gn(),this.Wgt=void 0),this.Dct&&(await this.Dct.gn(),this.Dct=void 0),this.Egt&&(this.wgt.Tz(this.Egt.Z),await this.Egt.gn())}async vI(t){this.Ont=t,this.Qgt(t),t.yn(na.rg,this.Vgt),t.yn(na.NO_QUALITY,this.Ds),await this.Pgt(t),this.Dct=this.Hgt(t),this.Dct.yn(mY,this.Ds),this.Dct.yn("Rrt",this.Ngt),this.Dct.$rt=t.fct,this.Wgt=new hY(this.sA,this.Dct),this.Wgt.yn(na.J_,this.act),t.mct(!0),this.Ygt=!0}Hgt(t){return new NQ(this,this.sA,this.sA,this.mI,this.CB,this.Jut,this.cot,this.eut,this.Zat,this.nut,this.Lut).J8(t)}async tr(t){this.TI.Xd(),this.Ugt&&(await this.Ugt.catch(qo),this.Ugt=void 0),await this.Ggt(),t||await this.jgt(),await this.zgt()}async qgt(){await this.Ggt()}Xgt(t){const i=t.Lt.fct;if(void 0===i)return this.Zgt(t);if(i.some((t=>this.nut.aq(t))))return this.Zgt(t);this.Co(new Yi("Kgt"))}Zgt(t){this.Dct&&this.Ont&&this.Ont===t.Lt&&(this.Dct.$rt=this.Ont.fct)}async _ht(t){this.Dct&&await this.Dct._ht(t)}async wht(t){this.Dct&&await this.Dct.wht(t)}xW(){const t=this.wf.mB;return this.CB.xW(t)}Lgt(){const t=this.ygt.Xot,i=_.max(0,t.Cn(0)-.1),e=t.jn(0)+.01;return this.Fst.NJ(i,e)}kgt(t){if(!Bt(t.SF))return!1;if(this.ygt.z4)return!0;return void 0!==this.ygt.Cgt}async gn(t){this.Vo();try{await this.tr(t),await this.qgt()}catch(t){}}constructor(t,i,e,s,n,r,h,o,a,u,c,d){super(),this.Ont=void 0,this.Dct=void 0,this.Ygt=!1,this.TI=new er,this.Ugt=void 0,this.mgt=void 0,this.Fst=void 0,this.nut=new IQ,this.bgt=void 0,this.Egt=void 0,this.wgt=new zs([]),this.Ngt=()=>{!this.aht()&&this.qot()&&this.ygt.Ngt()},this.act=t=>{this.Ont.act(t),this.Co(new VQ(t.zot,t.ngt))},this.Vgt=t=>{this.Xgt(t)},this.IT=function(){const t=YQ;return YQ+=1,t}(),this.ZJ=t,this.mI=s,this.CB=n,this.ygt=i,this.sA=e,this.cot=r,this.AI=h,this.Igt=o,this.eut=a,this.Zat=a?ow(t,a):void 0,this.Lut=u,this.Fgt=c,this.Jut=d}};var yY,MY=class extends Bo{MW(t,i){return this.Jgt(t,i)}async Jgt(t,i){for(const i of t)this.$gt(i);await this.$n(i);for(const t of this.iwt.twt)t.Rg===f.Ru&&(t.Wnt&&0!==t.Wnt.length?await this.ewt.vI(t):this.Co(new QQ("No supported representation found in the AdaptationSet with mimetype : "+t.Rg)))}get Mg(){return this.ET}get ct(){return this.sA.ct}swt(t){return new pY(t,this,this.sA,this.mI,this.CB,this.cot,this.AI,this.Igt,this.nwt,this.Lut,this.Fgt,this.Jut)}aht(){return this.Pct.some((t=>t.aht()))}qot(){return 0!==this.Pct.length&&this.Pct.every((t=>t.qot()))}Ngt(){this.rwt()&&this.Co(new FQ)}Bgt(t){if(D(t,"audio")){if(this.bJ.B$)return this.bJ.B$}else if(D(t,"video")&&this.bJ.R$)return this.bJ.R$;throw new g("Cannot allocate source buffer for mime type "+t)}hwt(t){t.yn([ut.ha,Co.Aw,Co.Mw,Co.Tw,Co.Dw,Co.Yg],this.Ds),t.yn(Je.KH,this.owt),t.yn("Kgt",this.Ds)}get Rt(){return this.Pct.some((t=>t.Rt))}async awt(t){await Promise.all(this.Pct.map((i=>i.gn(t)))),No(this.Pct)}get ht(){return this.oT}get wf(){if(0===this.Pct.length)return ce.MB();const t=this.Pct.map((t=>t.wf));let i=ce.yB(0,1/0);for(const e of t)i=i.Sn(e);if(0===i.U)return i;if(this.qot()){const t=i.Sn(this.Xot);if(0===t.U)return i;const e=t.jn(t.U-1);let s=0;for(const t of this.Pct)s=_.max(s,t.Tgt);e<=s&&(i=i.rB(new ce([e,s],[!0,!0])))}return i}get z4(){return this.sA.z4}get Mf(){return this.sA.Mf}get Cgt(){return this.uwt}get jn(){if(this.cwt){const t=this.ct;if(!S(t)&&t!==Da)return t}if(!this.Pct.length)return NaN;let t=0;for(const i of this.Pct)t=_.max(t,i.jn);return t}get cwt(){const t=this.iwt.Yut;if(t.Rg===bo.Fx)return!1;const i=t.dwt;return 0!==i.length&&this.iwt===i[i.length-1]}get t_(){if(!this.Pct.length)return ce.MB();let t=new ce([0,1/0]);for(const i of this.Pct)t=t.Sn(i.t_);if(t.U>0&&this.cwt&&isFinite(this.ct)){const i=this.ct,e=t.jn(t.U-1);i>e&&(t=t.rB(ce.yB(e,i).$P()))}return t}get yc(){return this.iwt}get nt(){return this.Dl}get rt(){return this.uT}get ji(){return this.vu.ji}get Ti(){return this.vu.Ti}get Lz(){const t=this.Mf,i=this.wf,e=i.aB(t);if(-1!==e)return{Cn:i.Cn(e),jn:i.jn(e)}}get Xot(){const t=this.iwt.Cn,i=this.cwt?1/0:this.iwt.jn;return ce.yB(t,i)}rwt(){if(this.aht())return!1;if(!this.qot())return!1;const t=this.wf;if(0===t.U)return!1;const i=this.Mf;if(this.cwt)return t.Cn(t.U-1)<=i;{const e=t.Sn(this.Xot);if(0===e.U)return!0;const s=e.Cn(e.U-1),n=e.jn(e.U-1)+.1;return s<=i&&i<=n}}get lwt(){return this.fwt}async _ht(t){this.fwt||(this.fwt=!0,await Promise.all(this.Pct.map((i=>i._ht(t)))))}async wht(t){this.fwt&&(this.fwt=!1,await Promise.all(this.Pct.map((i=>i.wht(t)))))}async gn(t){this.sA.fn(Co.Lw,this._wt),this.Vo(),this.iwt.fn(ri.jrt,this.Ds),this.gwt.Xd(),this.Ugt&&(await this.Ugt.catch(qo),this.Ugt=void 0),await this.awt(t),await this.ewt.gn(),this.oT.gn(),this.uT.gn(),this.Dl.gn(),this.wwt()}$gt(t){this.Awt.push(t),t.yn("vwt",this.mwt);const i=t.Rg===f.vm?this.oT:this.uT;for(const e of t.Z)i.tt(e)}pwt(t){const i=t.Rg===f.vm?this.oT:this.uT;for(const e of t.Z)i.it(e),e.gn();t.gn(),_s(this.Awt,t)}wwt(){for(let t=this.Awt.length-1;t>=0;t--)this.pwt(this.Awt[t])}get ywt(){return this.Awt.map((t=>t.xnt)).filter(Dd)}get Mwt(){return this.Pct.map((t=>t.xnt)).filter(Dd)}$n(t,i){return this.gwt.Xd(),this.gwt=new er,i&&this.gwt.Zd(i),this.Ugt=dn(this.dit(t,this.Ugt,this.gwt.Hd),this.gwt).catch(this.Twt),this.Ugt}async dit(t,i,e){i&&await i.catch(qo),fo(e);const s=[],n=this.Pct.slice(),r=t.slice();No(this.Pct);for(const t of n){const i=t.xnt;i&&ae(r,i)?(this.Pct.push(t),s.push(t.$n(i,e)),_s(r,i)):(this.Dl.Tz(t.nt),await t.gn(),fo(e))}for(const t of r){const i=this.swt(t.eht);this.Dl.pz(i.nt),this.Pct.push(i),this.hwt(i),s.push(i.$n(t,e))}await Promise.all(s)}async cq(t,i,e){this.bJ!==e&&(this.bJ=e,await this.awt(!1)),await this.$n(t),this.uwt=i}constructor(t,i,e,s,n,r,h,o,a,u,c,d,l){super(),this.oT=new Ur,this.uT=new Ur,this.Awt=[],this.gwt=new er,this.fwt=!0,this.Pct=[],this.Ugt=void 0,this.owt=Is((()=>{this.Co(new oa(this.Mf))}),350),this.mwt=t=>{const i=t.Nwt.xnt;if(i)for(const t of this.Awt){var e;t.xnt&&t.xnt!==i&&t.Rg===(null==(e=i.uct)?void 0:e.Rg)&&(t.fn("vwt",this.mwt),t.xnt.Rt=!1,t.yn("vwt",this.mwt))}this.Ds(t)},this.Twt=t=>{Mi(t)||this.Co(new fh(new $i(td.MEDIA_LOAD_ERROR,t.message,t)))},this._wt=t=>{const i=t.f4;if(i)for(const t of this.Mwt){if((t.Bot.dst||[]).some((t=>t.kO&&ne(Oi(i),pS(t.kO)))))return void this.Co(new qx(new Or(td.CONTENT_PROTECTION_OUTPUT_RESTRICTED,"Content unavailable due to DRM restrictions")))}},this.mI=e,this.CB=s,this.cot=n,this.sA=t,this.ET=Xw(),this.Awt=[],this.iwt=h,this.uwt=o,this.AI=u,this.ewt=new UQ(t,e,s,n,u),this.Dl=new zs([this.ewt.nt]),this.Lut=d,this.Fgt=l,this.iwt.yn(ri.jrt,this.Ds),this.vu=a,this.bJ=i,this.Jut=r.lowLatency,this.Igt=c,this.nwt=r.abr,this.sA.yn(Co.Lw,this._wt)}},TY=/^P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d*\.?\d*)S)?)?$/,NY=class t{static dp(i){const e=i.match(TY);if(!e)throw new g("The given value could not be parsed as a valid DateTimeInterval");const s=Number(e[1])||0,n=Number(e[2])||0,r=Number(e[3])||0,h=Number(e[4])||0,o=Number(e[5])||0,a=Number(e[6])||0;return new t(31536e3*s+2592e3*n+86400*r+3600*h+60*o+a)}get hdt(){return Sn.fD(this.Dwt,1e3)}Swt(){return this.Dwt}Iwt(){return 1e3*this.Dwt}constructor(t){this.Dwt=t}};!function(t){t.Ewt="progressive",t.bwt="interlaced",t.tT="unknown"}(yY||(yY={}));var DY=class{fN(){return this.Lwt/this.kwt}constructor(t,i){this.Lwt=t,this.kwt=i}},SY=/^(?:true|false)$/i,IY=/^(-?)(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(?:Z|([+-])(\d{2}):(\d{2}))?$/;function EY(t){if(void 0!==t)return NY.dp(t)}function bY(t){if(void 0===t)return;const i=t.match(IY);if(!i)throw new g("The given value could not be parsed as a valid Date");const[,e,s,n,r,h,o,a,u,c,d,l]=i,f=("-"===e?-1:1)*Number(s),w=Number(n)-1,A=Number(r),v=Number(h);let m=Number(o);const p=Number(a),y=Number("0."+(u||"")),M=_.round(1e3*y);if(c){m-=("-"===c?-1:1)*(60*Number(d)+Number(l))}const T=new Date(Date.UTC(f,w,A,v,m,p,M));if(S(T.getTime()))throw new g("The given value could not be parsed as a valid Date");return T}function LY(t){if(!t)return;const i=/(\d+)-(\d+)/.exec(t);return i?[Xi(i[1]),Xi(i[2])]:void 0}function kY(t){if(void 0!==t){if(!S(Number(t)))try{return Ce.fromString(t,!0)}catch(t){}throw new g("The given value could not be parsed as a valid unsigned long")}}function Xi(t){if(void 0===t)return;const i=Number(t);if(!S(i))return i;throw new g("The given value could not be parsed as a valid Number")}function CY(t){if(void 0===t)return;const i=t.split("/"),e=Number(i[0]),s=Number(i[1]||1);if(!S(e)&&!S(s))return new DY(e,s);throw new g("The given value could not be parsed as a valid frame rate")}function Oa(t){if(void 0!==t){if(SY.test(t))return"true"===t.toLowerCase();if(!S(x(t)))return Boolean(x(t));throw new g("The given value could not be parsed as a valid Boolean.")}}function xY(t){return{zu:t.JO,Cwt:Oa(t.fS("availabilityTimeComplete")),xwt:Xi(t.fS("availabilityTimeOffset"))}}function OY(t){return t.map(xY)}function jY(t){const i=VY(t),e=function(t,i,e,s){let n=t.lS(e,i);return void 0===n&&(n=t.fS(s+":"+i)),n}(t,"default_KID","urn:mpeg:cenc:2013","cenc");let s;const n=Lv(t,"pssh","urn:mpeg:cenc:2013","cenc")[0];if(void 0!==n&&(s=za(n.JO)),!s){const i=Lv(t,"pro","urn:microsoft:playready","mspr")[0];void 0!==i&&(s=function(t){const i=Ae(t.JO),e=new j([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),s=i.length,n=12+e.length+4+s,r=new ArrayBuffer(n),h=new j(r),o=new DataView(r),a=new Ha;sc(o,a,n),sc(o,a,1886614376),sc(o,a,0),cg(o,a,e),sc(o,a,s),cg(o,a,i),!1;return h.buffer}(i))}return{kO:e,Owt:s,lst:i.lst,LM:i.LM}}function zY(t){return{jwt:t.fS("sourceURL"),bht:LY(t.fS("range"))}}function PY(t,i){const e=t.fS("d"),s=t.fS("t"),n=Xi(t.fS("r"));i.push({ct:e,RT:s,zwt:n})}function BY(t){return{_ot:t.fS("index"),Pwt:LY(t.fS("indexRange")),jp:t.fS("media"),Bwt:LY(t.fS("mediaRange"))}}function RY(t){const i=QY(t),e=function(t){const i=t.map(BY);return i.length>0?i:void 0}(t.oS("SegmentURL"));return Tt({},i,{Rwt:e,Uwt:t.fS("xlink:href"),Qwt:t.fS("xlink:actuate")})}function UY(t){const i=Oa(t.fS("availabilityTimeComplete")),e=Xi(t.fS("availabilityTimeOffset")),s=LY(t.fS("indexRange")),n=Oa(t.fS("indexRangeExact")),r=t.oS("Initialization");if(r.length>1)throw new g("The provided MPEG-DASH document's "+t.rj+" element can not have more than one Initialization element.");const h=1===r.length?zY(r[0]):void 0,o=kY(t.fS("presentationTimeOffset")),a=t.oS("RepresentationIndex");if(a.length>1)throw new g("The provided MPEG-DASH document's "+t.rj+" element can not have more than one RepresentationIndex element.");return{Cwt:i,xwt:e,Pwt:s,Fwt:n,Ywt:h,Gwt:o,Vwt:1===a.length?zY(a[0]):void 0,Wwt:EY(t.fS("timeShiftBufferDepth")),bp:Xi(t.fS("timescale"))}}function QY(t){const i=UY(t),e=t.oS("BitstreamSwitching"),s=e.length>0?zY(e[0]):void 0,n=Xi(t.fS("duration")),r=t.oS("SegmentTimeline");if(r.length>1)throw new g("The provided MPEG-DASH document's "+t.rj+" element can not have more than one SegmentTimeline element.");const h=1===r.length?function(t){const i=[],e=t.oS("S");for(const t of e)PY(t,i);return i}(r[0]):void 0;return Tt({},i,{Hwt:s,ct:n,ent:h,qwt:Xi(t.fS("startNumber")),Xwt:Xi(t.fS("endNumber"))})}function FY(t){return{Zwt:function(t){if(!t)return;const i=t.split(/\s/);return i.length>1?(i.length=2,i.map(Xi)):1===i.length?i.map(Xi)[0]:void 0}(t.fS("audioSamplingRate")),cst:t.fS("codecs"),Kwt:Oa(t.fS("codingDependency")),dst:function(t){if(0!==t.length)return t.map(jY)}(t.oS("ContentProtection")),Jwt:function(t){return t.map(WY)}(t.oS("EssentialProperty")),Ict:CY(t.fS("frameRate")),Ti:Xi(t.fS("height")),$wt:Xi(t.fS("maxPlayoutRate")),tAt:Xi(t.fS("maximumSAPPeriod")),SF:t.fS("mimeType"),iAt:t.fS("profiles"),eAt:t.fS("sar"),sAt:function(t){switch(t){case yY.Ewt:case yY.bwt:case yY.tT:return t;default:return}}(t.fS("scanType")),nAt:t.fS("segmentProfiles"),rAt:Xi(t.fS("startWithSAP")),ji:Xi(t.fS("width"))}}function YY(t){const i=OY(t.oS("BaseURL")),e=t.oS("SegmentBase");if(e.length>1)throw new g("The provided MPEG-DASH document's "+t.uS+" element can not have more than one SegmentBase element.");const s=1===e.length?UY(e[0]):void 0,n=function(t){const i=t.map(RY);return i.length>0?i:void 0}(t.oS("SegmentList")),r=t.oS("SegmentTemplate");if(r.length>1)throw new g("The provided MPEG-DASH document's "+t.uS+" element can not have more than one SegmentTemplate element.");const h=1===r.length?function(t){return Tt({},QY(t),{hAt:t.fS("bitstreamSwitching"),oAt:t.fS("index"),aAt:t.fS("initialization"),uAt:t.fS("media")})}(r[0]):void 0;return{cAt:i,dAt:s,lAt:n,fAt:h}}function GY(t){const i=FY(t),e=YY(t),s=Xi(t.fS("bandwidth")),n=t.fS("dependencyId"),r=t.fS("id"),h=t.fS("mediaStreamStructureId"),o=Xi(t.fS("qualityRanking"));if(t.oS("SegmentBase").length>1)throw new g("The provided MPEG-DASH document's Representation element can not have more than one SegmentBase element.");return Tt({},i,e,{cz:s,_At:n,o:r,gAt:h,wAt:o})}function VY(t){return{lst:t.fS("schemeIdUri"),LM:t.fS("value")}}function WY(t){return VY(t)}function HY(t){return VY(t)}function qY(t){return VY(t)}function XY(t){var i;const e=FY(t),s=YY(t),n=function(t){return t.map(qY)}(t.oS("Accessibility")),r=Oa(t.fS("bitstreamSwitching")),h=t.fS("contentType"),o=Xi(t.fS("group")),a=Xi(t.fS("id")),u=(null==(i=t.oS("Label")[0])?void 0:i.JO)||"",c=t.fS("lang"),d=Xi(t.fS("maxBandwidth")),l=CY(t.fS("maxFrameRate")),f=Xi(t.fS("maxHeight")),_=Xi(t.fS("maxWidth")),w=Xi(t.fS("minBandwidth")),A=CY(t.fS("minFrameRate")),v=Xi(t.fS("minHeight")),m=Xi(t.fS("minWidth")),p=t.fS("par"),y=function(t){return t.map(GY)}(t.oS("Representation"));if(0===y.length)throw new g("The provided MPEG-DASH document has an AdaptationSet with no valid Representation's");const M=function(t){return t.map(HY)}(t.oS("Role")),T=Oa(t.fS("segmentAlignment"))||!1,N=Xi(t.fS("selectionPriority")),D=N||1,S=Oa(t.fS("subsegmentAlignment"))||!1;let I;try{I=Xi(t.fS("subsegmentStartsWithSAP"))}catch(t){}return Tt({},e,s,{tct:n,Hwt:r,Fz:h,uct:o,o:a,kh:u,gs:c,AAt:d,vAt:l,mAt:f,pAt:_,yAt:w,MAt:A,TAt:v,NAt:m,DAt:p,Wnt:y,Cct:M,SAt:T,DP:D,IAt:S,EAt:I,bAt:t.fS("xlink:actuate")||"onRequest",LAt:t.fS("xlink:href")})}function ZY(t){const i=kY(t.fS("presentationTime"))||Ce.ZERO,e=kY(t.fS("duration")),s=Xi(t.fS("id")),n=function(t){const i=t.aS,e={};for(let t=0;t<i.length;t++)e[i[t].l]=i[t].LM;return e}(t),r=t.JO;return{kM:i,ct:e,o:s,aS:n,Om:""!==r.trim()?r:t.fS("messageData")||""}}function KY(t){return{LAt:t.fS("xlink:href"),bAt:t.fS("xlink:actuate"),lst:t.fS("schemeIdUri"),LM:t.fS("value"),bp:Xi(t.fS("timescale")),Gwt:kY(t.fS("presentationTimeOffset")),IF:t.oS("Event").map(ZY)}}function JY(t){const i=YY(t),e=t.oS("AssetIdentifier");if(e.length>1)throw new g("The provided MPEG-DASH document's Period element can not have more than one AssetIdentifier element.");const s=1===e.length?function(t){return VY(t)}(e[0]):void 0,n=function(t){return t.map(XY)}(t.oS("AdaptationSet")),r=Oa(t.fS("bitstreamSwitching")),h=EY(t.fS("duration")),o=function(t){return t.map(KY)}(t.oS("EventStream")),a=t.fS("id"),u=EY(t.fS("start")),c=(t.oS("Subset"),t.fS("xlink:href"));return Tt({},i,{Pnt:n,kAt:s,Hwt:r,ct:h,CAt:o,o:a,Cn:u,bAt:t.fS("xlink:actuate"),LAt:c})}function $Y(t){const i=t.fS("schemeIdUri");if(!i)return;return{lst:i,LM:t.fS("value")}}function tG(t,i){const e=bY(t.fS("availabilityEndTime")),s=bY(t.fS("availabilityStartTime")),n=OY(t.oS("BaseURL")),r=t.fS("id"),h=function(t){return t.map((t=>""+t.JO))}(t.oS("Location")),o=EY(t.fS("maxSegmentDuration")),a=EY(t.fS("maxSubsegmentDuration")),u=EY(t.fS("mediaPresentationDuration")),c=(t.oS("Metrics"),EY(t.fS("minBufferTime")));if(!c)throw new g("The provided MPEG-DASH document's MPD element does not have the required 'minimumBufferTime' attribute.");const d=EY(t.fS("minimumUpdatePeriod")),l=function(t){return t.map((t=>JY(t)))}(t.oS("Period"));if(!l.length)throw new g("The provided MPEG-DASH document's MPD element does not have the required 'Period' element.");const f=t.fS("profiles");if(!f)throw new g("The provided MPEG-DASH document's MPD element does not have the required 'profiles' attribute.");const _=bY(t.fS("publishTime")),w=EY(t.fS("suggestedPresentationDelay")),A=EY(t.fS("timeShiftBufferDepth")),v=function(t){switch(t){case bo.Qx:case bo.Fx:return t;default:return}}(t.fS("type")),m=function(t){const i=[];for(const e of t){const t=$Y(e);t&&i.push(t)}return i}(t.oS("UTCTiming")),p=function(t){if(0===t.length)return;const i=t[0],e=i.oS("Latency");if(0===e.length)return;const s=function(t){const i=t[0],e=Xi(i.fS("target"));if(void 0===e)return;const s=Xi(i.fS("min")),n=Xi(i.fS("max"));return{xAt:e,aD:s,oD:n}}(e);if(void 0===s)return;const n=function(t){if(0===t.length)return;const i=t[0],e=Xi(i.fS("max")),s=Xi(i.fS("min"));return{aD:s,oD:e}}(i.oS("PlaybackRate"));return{OAt:s,Gf:n}}(t.oS("ServiceDescription"));return{jAt:e,zAt:s,cAt:n,o:r,PAt:h,BAt:i,RAt:o,UAt:a,QAt:u,FAt:c,YAt:d,dwt:l,iAt:f,GAt:_,VAt:w,Wwt:A,Rg:v,WAt:m,HAt:p}}var iG=class{qAt(t,e){return function(t,i){if(!t)throw new g("The provided MPEG-DASH document does not contain a valid MPD root element.");return tG(t,i)}(i.cS(t).dS,e)}};function eG(t){return{get bandwidth(){return t.cz},get codecs(){return t.cst},get id(){return t.o},get uid(){return t.Mg},get name(){return t.kh},get averageBandwidth(){return t.XAt},get label(){return t.kh},set label(i){t.kh=jo(i)},get available(){return t.det},get score(){return t.ZAt},addEventListener(i,e){t.yn(i,e)},removeEventListener(i,e){t.fn(i,e)}}}function sG(t){return vi(eG(t),{get height(){return t.Ti},get width(){return t.ji},get frameRate(){return t.Ict},get firstFrame(){return t.KAt}})}function nG(t){return vi(eG(t),{get audioSamplingRate(){return t.Zwt}})}var rG=class extends Yi{constructor(t){super("update"),this.quality=t}},hG=class extends Bo{get kh(){return this.bT}set kh(t){this.bT!==t&&(this.bT=t,this.Co(new rG(this.va)))}get XAt(){}get det(){return this.JAt}get ZAt(){}jS(){this.JAt=!1,this.Co(new rG(this.va))}constructor(t,i,e,s,n){super(),this.o=t,this.cz=i,this.cst=e,this.$At=n,this.Mg=Jw(),this.bT=s||"",this.JAt=!0}},oG=class extends hG{get va(){return this.Xa||(this.Xa=sG(this)),this.Xa}constructor(t,i,e,s,n,r,h,o,a=0){super(t,i,e,s,n),this.Ict=r,this.ji=h,this.Ti=o,this.KAt=a,this.Xa=void 0}},aG=class extends hG{get va(){return this.Xa||(this.Xa=nG(this)),this.Xa}constructor(t,i,e,s,n,r){super(t,i,e,s,n),this.Zwt=r,this.Xa=void 0}};var uG=class extends Bo{get tvt(){const t=this.ivt();return null==t?void 0:t.Cn}get evt(){const t=this.ivt();return null==t?void 0:t.jn}constructor(...t){super(...t),this.svt=t=>{this.Co(t)}}},cG=class extends uG{get Bot(){return this.dht}get Zwt(){var t;return null!=(t=this.nvt.Om.Zwt)?t:this.Bot.Zwt}get cz(){return this.nvt.Om.cz||0}get cst(){const t=this.nvt.Om;return t.cst?[t.cst]:this.Bot.cst}get rvt(){const t=this.nvt.Om;return t.cst?[t.cst]:[]}get $tt(){return this.nvt.Om.cst||this.Bot.$tt}get Kwt(){return this.nvt.Om.Kwt||this.Bot.Kwt}get dst(){return this.nvt.Om.dst||this.Bot.dst}get Fz(){return this.SF+'; codecs="'+this.$tt+'"'}get Jwt(){const t=this.nvt.Om;return t.Jwt.length?t.Jwt:this.Bot.Jwt}get va(){return this.Xa||(this.Xa=function(t){return{get id(){return t.o},get type(){return t.Rg},get bandwidth(){return t.cz},get width(){return t.ji},get height(){return t.Ti},get frameRate(){var i,e;return null!=(e=null==(i=t.Ict)?void 0:i.fN())?e:NaN},get audioSamplingRate(){return t.Zwt}}}(this))}get Ict(){var t;return null!=(t=this.nvt.Om.Ict)?t:this.Bot.Ict}get Ti(){return this.nvt.Om.Ti||this.Bot.Ti}get o(){return this.nvt.Om.o||""}get Hut(){return this.ovt}set Hut(t){this.ovt=t}get Wut(){const t=this.nvt.avt();if(t)return{zu:t.zu,bht:t.bht,lI:this.Yut.lI}}get $wt(){return this.nvt.Om.$wt||this.Bot.$wt||1}get tAt(){return this.nvt.Om.tAt||this.Bot.tAt}get Yut(){return this.bat.Yut}get SF(){return this.nvt.Om.SF||this.Bot.SF}get bat(){return this.Bot.bat}get iAt(){return this.nvt.Om.iAt||this.Bot.iAt}get Brt(){return this.uvt}get eAt(){return this.nvt.Om.eAt||this.Bot.eAt}get sAt(){return this.nvt.Om.sAt||this.Bot.sAt}get cvt(){return this.nvt.cvt}get nAt(){return this.nvt.Om.nAt||this.Bot.nAt}get ent(){return this.nvt.ent}get rAt(){return this.nvt.Om.rAt||this.Bot.rAt}get Rg(){const t=this.SF.split("/")[0];return"application"===t||"text"===t||hr(this.SF,this.cst)?f.Ru:"video"===t?f.Am:"audio"===t?f.vm:"image"===t?f.$M:f.tT}get ji(){return this.nvt.Om.ji||this.Bot.ji}get Oat(){return this.dvt}set Oat(t){this.dvt=t}Vat(t){const i=ui(t)?this.nvt.lvt(t):this.nvt.Vat(t);return{zu:i.zu,bht:i.bht,lI:this.Yut.lI}}fvt(){return this.nvt.fvt()}ivt(){return this.nvt.ivt()}_vt(){return this.nvt._vt()}zat(t){return this.nvt.zat(t)}Bat(t,i,e){return this.nvt.Bat(t,this.Yut.lI,i,e)}Cut(t){return ui(t)?this.ent.gvt(t,this.nvt):this.ent.Cut(t)}Eat(t){return ui(t)?this.ent.wvt(t,this.nvt):this.ent.Eat(t)}gn(){this.nvt.fn(ri.xrt,this.svt)}constructor(t,i){if(super(),this.Xa=void 0,this.ovt=void 0,this.dvt=!1,this.dht=t,this.nvt=i,this.nvt.yn(ri.xrt,this.svt),this.Rg===f.Am){var e,s;const t=null!=(s=null==(e=this.Ict)?void 0:e.fN())?s:NaN;this.uvt=new oG(this.o,this.cz,this.$tt,"","",t,this.ji,this.Ti)}else this.Rg===f.vm?this.uvt=new aG(this.o,this.cz,this.$tt,"","",this.Zwt):this.uvt=void 0}},dG=class extends uG{get tct(){return this.nvt.Om.tct}get Zwt(){var t;return null!=(t=this.nvt.Om.Zwt)?t:-1}get cst(){if(this.nvt.Om.cst)return[this.nvt.Om.cst];{const t=[];for(const i of this.Wnt)i.rvt.length&&-1===t.indexOf(i.$tt)&&t.push(i.$tt);return t}}get $tt(){return this.cst.join()}get Kwt(){return this.nvt.Om.Kwt}get dst(){return this.nvt.Om.dst}get Fz(){return this.SF+'; codecs="'+this.$tt+'"'}get Jwt(){return this.nvt.Jwt}get Ict(){return this.nvt.Om.Ict}get uct(){return this.nvt.Om.uct}get Ti(){return this.nvt.Om.Ti||0}get o(){return this.nvt.Om.o}get kh(){return this.nvt.Om.kh||""}get $wt(){return this.nvt.Om.$wt}get tAt(){return this.nvt.Om.tAt}get Yut(){return this.bat.Yut}get SF(){return this.nvt.Om.SF||this._ct[0].SF}get bat(){return this.iwt}get iAt(){return this.nvt.Om.iAt}get Wnt(){return this._ct}get Cct(){return this.nvt.Om.Cct||[]}get eAt(){return this.nvt.Om.eAt}get sAt(){return this.nvt.Om.sAt}get nAt(){return this.nvt.Om.nAt}get DP(){return this.nvt.Om.DP}get rAt(){return this.nvt.Om.rAt}get Rg(){const t=(this.nvt.Om.Fz||this.SF).split("/")[0];return"application"===t||"text"===t||"subtitle"===t||hr(this.SF,this.cst)?f.Ru:"video"===t?f.Am:"audio"===t?f.vm:"image"===t?f.$M:f.tT}get ji(){return this.nvt.Om.ji||0}get C6(){return this.nvt.Om.gs||""}get bct(){return this.tvt}get Ect(){const t=this.bct,i=this.evt;if(void 0===t||void 0===i)return;const e=_.min(i,this.Yut.Avt);return _.max(t,e)}async Yn(t,i){if(0===this._ct.length){this._ct=[];const e=this.nvt.Wnt.map((e=>this.vvt(e,t,i)));this._ct=(await Promise.all(e)).filter(Dd)}this.mvt()}async vvt(t,i,e){const s=new cG(this,t),n=await i(s);if(fo(e),n)return s}mvt(){if(!this._ct.length)throw new g("Detected an AdaptationSet without any supported Representations.")}ivt(){return this.nvt.ivt()}_vt(){return this.nvt._vt()}gn(){this.nvt.fn(ri.xrt,this.svt);for(const t of this._ct)t.gn();No(this._ct)}constructor(t,i){super(),this._ct=[],this.iwt=t,this.nvt=i,this.nvt.yn(ri.xrt,this.svt)}};function lG(t,e){const s=[];for(const n of e)for(const e of t)s.push(i.Dh(e,n));return s}var wu=class{pvt(t){const i=t-this.iwt.Cn;if(i<0||i>=this.iwt.ct)return;const e=this.yvt();return void 0!==e&&be(e,i,1e-5)?this.Mvt():this.Tvt(i)}jat(t){const i=t-this.iwt.Cn;if(!(i<0))return this.Nvt(_.min(i,this.iwt.ct))}Mvt(){return this.Dvt(0)}Svt(){const t=this.iwt.ct;if(isFinite(t))return this.Nvt(t)}get Ivt(){return this.iwt.bvt.Evt&&void 0!==this.Lvt()}fvt(t){if(this.iwt.bvt.Rg===bo.Fx){if(this.Ivt){const i=this.Mvt(),e=this.Lvt();if(void 0===i||void 0===e)return;return{kvt:t,Cvt:i,xvt:e}}const i=this.Ovt(t);if(!i)return;return{kvt:t,Cvt:this.jvt(t),xvt:i}}{0;const i=this.Mvt();if(i)return{kvt:t,Cvt:i,xvt:this.Svt()}}}_vt(t,i){if(i){let t=this.Gut(i.Cvt);const e=this.Fat(i.xvt);if(e){const i=this.Vut(e);(!t||i.getTime()<t.getTime())&&(t=i)}return t}{const i=this.Mvt();if(i){const e=this.Vut(i);if(t.getTime()<e.getTime())return e}const e=this.iwt.bvt.zAt;return t.getTime()<e.getTime()?e:void 0}}Ovt(t){const i=(t.getTime()-this.iwt.bvt.zAt.getTime())/1e3-this.iwt.Cn+this.zvt;let e=this.Nvt(Pe(i,0,this.iwt.ct));if(!e)return;if(e=this.Pvt(e,t),!e)return;let s=this.Fat(e);for(;s&&this.Kut(s,t);)e=s,s=this.Fat(e);return e}jvt(t){let i;const e=this.Bvt.Wwt;if(e){const s=(t.getTime()-this.iwt.bvt.zAt.getTime())/1e3-this.iwt.Cn-e.Swt();i=this.Nvt(Pe(s,0,this.iwt.ct)),i||(i=this.Mvt())}else i=this.Mvt();if(!i)return;if(i=this.Pvt(i,t),!i)return;let s=this.Qat(i);for(;s&&this.Kut(s,t);)i=s,s=this.Qat(i);return i}Pvt(t,i){let e=t;for(;e&&this.Vut(e).getTime()>i.getTime();)e=this.Qat(e);if(!e)return;const s=this.Gut(e);if(s&&s.getTime()<=i.getTime()){const t=this.Qat(e);for(t&&this.Kut(t,i)&&(e=t);e;){if(this.Vut(e).getTime()>i.getTime())return;if(this.Kut(e,i))break;e=this.Fat(e)}if(!e)return}return e}Kut(t,i){if(this.Ivt)return!0;if(this.Vut(t).getTime()>i.getTime())return!1;const e=this.Gut(t);return!(e&&i.getTime()>=e.getTime())}Rvt(t,i){if(this.Ivt)return!0;if(this.Uvt(t).getTime()>i.getTime())return!1;const e=this.Gut(t);return!(e&&i.getTime()>=e.getTime())}Qvt(t,i,e){const s=ku(i,this.RL)+this.iwt.Cn;return{_ot:t,Fvt:i,RT:s,ct:e,UT:s+e}}Uvt(t){return this.iwt.bvt.Rg===bo.Fx?new Date(this.iwt.bvt.zAt.getTime()+1e3*(t.RT+t.ct)):this.iwt.bvt.zAt}Vut(t){const i=this.Uvt(t);return this.iwt.bvt.Rg===bo.Fx?new Date(i.getTime()-1e3*this.zvt):i}Gut(t){let i=1/0;if(this.iwt.bvt.Rg===bo.Fx){const e=this.Bvt.Wwt;e&&(i=this.Uvt(t).getTime()+1e3*t.ct+e.Iwt())}const e=this.iwt.bvt.jAt;return e&&(i=_.min(i,e.getTime())),i===1/0?void 0:new Date(i)}Yvt(t,i){return t._ot+i}get jD(){return this.iwt.Cn-ku(this.Gvt,this.RL)}get Gwt(){return ku(this.Gvt,this.RL)}zat(t){return!1}Bat(t,i,e,s,n){const r=this.Vvt(t);if(!r)return Promise.reject(new g("Invalid segment"));const h=this.Wvt(r._ot,i);return h?Promise.resolve(h):ji(this.Hvt(r._ot,i,e,s),n)}Wvt(t,i){}Hvt(t,i,e,s){return Promise.reject(new g("Not supported"))}Qat(t){const i=this.Vvt(t);if(i)return this.Dvt(i._ot-1)}Fat(t){const i=this.Vvt(t);if(i)return this.Dvt(i._ot+1)}Vvt(t){const i=this.Dvt(t._ot);if(i&&i.RT===t.RT)return i;const e=this.pvt(t.RT);return e&&e.RT===t.RT?e:void 0}qvt(t,i){const e=this.Rat(t);if(!e||!this.zat(e._ot))return;const s=this.Wvt(e._ot,i);return s?s.qvt(t):void 0}Rat(t){return this.Dvt(t.Xvt)}Cut(t){const i=this.Vvt(t);return!!i&&0===i._ot}gvt(t,i){const e=this.qvt(t,i);return!!e&&0===e.fot}Eat(t){const i=this.Vvt(t);if(!i)return!1;const e=this.Svt();return!!e&&i._ot===e._ot}wvt(t,i){const e=this.qvt(t,i);if(!e)return!1;const s=this.Svt();if(!s||e.Xvt!==s._ot)return!1;const n=this.Wvt(e.Xvt,i);return e.fot+1===n.U}Qd(){}constructor(t,i){this.iwt=t,this.Bvt=i,this.RL=i.bp,this.zvt=i.xwt,this.Gvt=i.Gwt}},fG=class extends wu{Dvt(t){if(t<0)return;const i=this.Zvt.multiply(t),e=ku(i,this.RL),s=this.iwt.ct;if(e>=s)return;const n=this.Kvt();if(void 0!==n){if(t>n)return;if(t===n&&isFinite(s))return this.Qvt(t,i,s-e)}return isFinite(s)&&e+this.Jvt>s?this.Qvt(t,i,s-e):this.Qvt(t,i,this.Jvt)}yvt(){return 0}Tvt(t){const i=_.floor(t/this.Jvt),e=this.Kvt();return void 0!==e&&i>=e?this.Dvt(e):this.Dvt(i)}Nvt(t){if(t>=this.iwt.ct){const t=_.ceil(this.iwt.ct/this.Jvt)-1,i=this.Kvt();return void 0!==i&&t>=i?this.Dvt(i):this.Dvt(t)}return this.Tvt(t)}Kvt(){const t=this.Bvt.Xwt;var i;if(void 0!==t)return t-(null!=(i=this.Bvt.qwt)?i:1);const e=this.Bvt.$vt;return void 0!==e&&e>0?e-1:void 0}Lvt(){if(isFinite(this.iwt.ct))return this.Svt()}tmt(t,i){return this.Zvt.multiply(t._ot+(i-1))}Yn(){}constructor(t,i){super(i,t);const e=t.imt,s=t.ct;if(void 0===e||void 0===s)throw new g("MultipleSegmentBase does not have a segment duration specified.");this.Zvt=e,this.Jvt=s}};function _G(t,i,e){const s=i.length;if(0===s)return-1;let n=0,r=s-1,h=t.emt(i[n]),o=t.smt(i[r]);for(;n<=r&&t.nmt(h,e)<=0&&t.nmt(e,o)<0;){const a=n+_.floor(t.hmt(e,h,o)*(r-n)),u=i[a],c=t.emt(u),d=a+1<s?t.emt(i[a+1]):t.smt(u);if(t.nmt(d,e)<=0)n=a+1,h=d;else{if(!(t.nmt(e,c)<0))return a;r=a-1,o=c}}return-1}function gG(t,i){return _G(wG.yb,t,i)}var wG=class t{static get yb(){return null!=this.ust||(this.ust=new t),this.ust}emt(t){return t.RT}smt(t){return t.UT}nmt(t,i){return t.compare(i)}hmt(t,i,e){return t.subtract(i).toNumber()/e.subtract(i).toNumber()}},AG=class extends wu{Dvt(t){if(!(t<0))return t<this.omt.length?this.omt[t].uot:this.amt(t-this.omt.length)}yvt(){if(this.omt.length>0)return ku(this.omt[0].RT,this.RL)}Tvt(t){if(this.umt&&ku(this.umt.RT,this.RL)<=t){const i=ku(this.umt.RT,this.RL),e=ku(this.umt.ct,this.RL),s=_.floor((t-i)/e);return this.amt(s)}if(this.omt.length>0&&be(t,ku(this.omt[0].RT,this.RL),1e-5))return this.omt[0].uot;const i=gG(this.omt,Ce.fromNumber(t*this.RL));return i<0?void 0:this.omt[i].uot}Nvt(t){if(!this.umt&&this.omt.length>0){const i=this.omt[this.omt.length-1];if(function(t,i,e){return Bd(t,i,e)>=0}(t,ku(i.UT,this.RL),1e-5))return i.uot}const i=this.yvt();return i&&t<i?this.omt[0].uot:this.Tvt(t)}Lvt(){return isFinite(this.iwt.ct)?this.Svt():this.Dvt(this.omt.length-1)}tmt(t){return this.cmt(t)}amt(t){if(!this.umt)return;const i=this.umt.RT,e=this.umt.ct,s=i.add(e.multiply(t)),n=ku(s,this.RL),r=this.iwt.ct;if(n>=r)return;const h=this.omt.length+t,o=_.min(ku(e,this.RL),n+r);return this.Qvt(h,s,o)}cmt(t){return t.Fvt.add(this.Gvt)}Yn(){const t=this.Bvt.Om.ent;if(!t)throw new g("MultipleSegmentBaseTO does not have a SegmentTimeline specified.");this.dmt(t)}dmt(t){const i=this.Gvt;this.lmt(t,i);const e=this.fmt(t);this._mt(t,i,e.gmt,e.Xvt)}lmt(t,i){const e=this.omt;if(0===t.length)No(e);else{const s=t[0],n=s.RT?Ce.fromString(s.RT,!1).subtract(i):Ce.ZERO;let r=0;for(;r<e.length&&e[r].RT.lessThan(n);)r++;r>0&&e.splice(0,r)}}fmt(t){const i=this.omt,e=this.tgt;let s=0,n=0;for(;s<t.length&&n<i.length;){const r=t[s].zwt||0;if(r<0)break;const h=n+r;if(h>=i.length)break;if(i[h].RT.greaterThanOrEqual(e))break;if(i[n].uot._ot===n)n=h+1;else for(;n<=h;)i[n].uot._ot=n,n++;0,s++}return{gmt:s,Xvt:n}}_mt(t,i,e,s){const n=this.omt;let r,h=e,o=s;for(;h<t.length;){const e=t[h],s=Ce.fromString(e.ct,!1),a=e.zwt||0;let u;if(e.RT){if(u=Ce.fromString(e.RT,!1).subtract(i),o>0){const t=n[o-1];t.UT.greaterThan(u)&&(t.ct=u.subtract(t.RT),t.UT=t.RT.add(t.ct))}}else u=o>0?n[o-1].UT:Ce.ZERO;if(a<0){if(h+1===t.length){r={RT:u,ct:s};break}const e=Ce.fromString(t[h+1].RT,!1).subtract(i);for(;u.lessThan(e);){const t=u.add(s);this.wmt(n,o,u,s,t),u=t,o++}}else{const t=o+a;for(;o<=t;){const t=u.add(s);this.wmt(n,o,u,s,t),u=t,o++}}h++}o<n.length&&n.splice(o),n.length>0&&(this.tgt=n[n.length-1].RT),this.umt=r}wmt(t,i,e,s,n){if(i<t.length){const r=t[i];0,r.ct.equals(s)?r.uot._ot=i:t[i]={RT:e,ct:s,UT:n,uot:this.Qvt(i,e,ku(s,this.RL))}}else t.push({RT:e,ct:s,UT:n,uot:this.Qvt(i,e,ku(s,this.RL))})}constructor(t,i){super(i,t),this.omt=[],this.umt=void 0,this.tgt=Ce.ZERO,this.Yn()}},vG=class{get Om(){return this.YL}get xwt(){return this.YL&&void 0!==this.YL.xwt?this.YL.xwt:this.Amt?this.Amt.xwt:0}get Gwt(){return this.YL&&void 0!==this.YL.Gwt?this.YL.Gwt:this.Amt?this.Amt.Gwt:Ce.ZERO}get Wwt(){return this.YL&&void 0!==this.YL.Wwt?this.YL.Wwt:this.Amt?this.Amt.Wwt:this.bat.bvt.Wwt}get bp(){return this.YL&&void 0!==this.YL.bp?this.YL.bp:this.Amt&&this.Amt.bp?this.Amt.bp:1}get Pwt(){return this.YL&&void 0!==this.YL.Pwt?this.YL.Pwt:this.Amt?this.Amt.Pwt:void 0}get Ywt(){return this.YL&&void 0!==this.YL.Ywt?this.YL.Ywt:this.Amt?this.Amt.Ywt:void 0}get ent(){return this.vmt||(this.vmt=this.mmt()),this.vmt}mmt(){if(this.pmt=this.ymt(),this.pmt)return this.pmt;if(this.Amt)return this.Amt.ent;throw new g("Missing media segment information.")}avt(t){const e=this.Ywt;if(e){return{zu:(void 0!==e.jwt?i.Dh(e.jwt,t.cAt[0]):t.cAt[0]).href,bht:e.bht}}const s=this.Pwt;if(s)return{zu:t.cAt[0].href,bht:[0,s[0]-1]}}Yn(t){this.YL=t,this.pmt&&this.pmt.Yn()}Qd(){this.pmt&&(this.pmt.Qd(),this.pmt=void 0)}constructor(t,i,e){this.vmt=void 0,this.pmt=void 0,this.bat=t,this.Amt=i,this.YL=e}},mG=class extends vG{get ct(){return void 0!==this.YL.ct?this.YL.ct/this.bp:this.Amt&&pG(this.Amt)?this.Amt.ct:void 0}get imt(){return void 0!==this.YL.ct?Ce.fromNumber(this.YL.ct):this.Amt&&pG(this.Amt)?this.Amt.imt:void 0}get qwt(){return void 0!==this.YL.qwt?this.YL.qwt:this.Amt&&pG(this.Amt)?this.Amt.qwt:void 0}get Xwt(){return void 0!==this.YL.Xwt?this.YL.Xwt:this.Amt&&pG(this.Amt)?this.Amt.Xwt:void 0}ymt(){return void 0!==this.YL.ent?new AG(this,this.bat):void 0!==this.YL.ct?new fG(this,this.bat):void 0}};function pG(t){return t instanceof mG}var yG=class{Qb(t){return this.Mmt.replace(/\$\$|\$(RepresentationID|Number|Bandwidth|Time)(?:%0(\d+)([diuxXo]))?\$/g,((i,e,s,n)=>{if("$$"===i)return"$";const r=t[e];if(void 0===r)return i;if(void 0===s)return r.toString();let h=function(t,i){switch(i){case"d":case"i":case"u":return t.toString(10);case"x":return t.toString(16);case"X":return t.toString(16).toUpperCase();case"o":return t.toString(8);default:return}}(r,n);return void 0===h?i:(h=eu(h,Number(s),"0"),h)}))}constructor(t){this.Mmt=t}};var MG=class t extends mG{get aAt(){return this.Tmt?this.Tmt:this.Amt&&this.Amt instanceof t?this.Amt.aAt:void 0}get uAt(){return this.Nmt?this.Nmt:this.Amt&&this.Amt instanceof t?this.Amt.uAt:void 0}avt(t){const e=this.aAt;if(!e)return super.avt(t);const s=e.Qb({Bandwidth:t.Om.cz,RepresentationID:t.Om.o});return{zu:i.SA(s,t.cAt[0])}}Vat(t,e){var s;const n=null!=(s=e.cvt.qwt)?s:1,r=this.uAt.Qb({Bandwidth:e.Om.cz,Number:e.ent.Yvt(t,n),RepresentationID:e.Om.o,Time:e.ent.tmt(t,n)});return{zu:i.SA(r,e.cAt[0])}}lvt(t,i){}get $vt(){}constructor(t,i,e){super(t,i,e),this.Tmt=e.aAt?new yG(e.aAt):void 0,this.Nmt=e.uAt?new yG(e.uAt):void 0}},TG=class t extends mG{Vat(t,e){const s=this.Rwt[t._ot],n=e.cAt[0];let r;return r=s.jp?i.Dh(s.jp,n):n,{zu:r.href,bht:s.Bwt}}lvt(t,i){}get Rwt(){return void 0!==this.YL.Rwt?this.YL.Rwt:this.Amt&&this.Amt instanceof t?this.Amt.Rwt:void 0}get $vt(){var t;return null==(t=this.Rwt)?void 0:t.length}},NG=class{qvt(t){const i=this.Uat(t.fot);if(i&&i.RT===t.RT)return i;const e=this.Dmt(t.RT);return e&&e.RT===t.RT?e:void 0}},DG=class extends NG{get U(){return this.Smt.length}Uat(t){if(t>=0&&t<this.U)return this.Imt(this.Smt[t])}Dmt(t){const i=this.Emt(t);if(this.Smt.length>0){const t=this.Smt[0];if(i<=ku(t.RT,this.bp))return this.Imt(t)}const e=gG(this.Smt,Ce.fromNumber(i*this.bp));if(!(e<0))return this.Imt(this.Smt[e])}Pat(t){const i=this.Emt(t);if(this.Smt.length>0){const t=this.Smt[this.Smt.length-1];if(i>=ku(t.UT,this.bp))return this.Imt(t)}return this.Dmt(t)}Imt(t){const i=ku(t.RT,this.bp)-this.Gwt,e=i+this.bmt,s=ku(t.ct,this.bp);return{Xvt:this.Xvt,fot:t._ot,RT:e,Fvt:Ce.fromNumber(i*this.bp),ct:s,UT:e+s,Lmt:[t.kmt,t.Cmt]}}Emt(t){return t-this.bmt+this.Gwt}constructor(t,i,e,s,n){super(),this.Xvt=t,this.bp=i,this.bmt=e,this.Gwt=s,this.Smt=n}};var SG=class t{M_t(){return this.jm.Ku<this.Om.byteLength}xmt(){const i=this.Omt(),e=this.jmt(),s=this.jm.Ku,n=this.Om.byteLength;let r;r=t.zmt(e)?n-s:t.Pmt(e);const h=s+r<=n?r:n-s,o=Jc(this.Om,this.jm,h);return new EG(i,hl(o))}Omt(){const t=this.jmt();if(t.length>7)throw new RangeError("Invalid EBML ID size");let i=0;for(let e=0;e<t.length;e++)i=256*i+t[e];return i}jmt(){const t=ha(this.Om,this.jm.Sm());if(0===t)throw new RangeError("EBML variable sized integer is invalid");const e=8-(31-R_(t));return i.eit(e<=8&&e>=1,"Incorrect log2 value"),Jc(this.Om,this.jm,e)}static Pmt(t){if(8===t.length&&224&t[1])throw new b("EBML variable sized integer is too large");let i=0;for(let e=0;e<t.length;e++){const s=t[e];if(0===e){i=s&(1<<8-t.length)-1}else i=256*i+s}return i}static zmt(t){for(const i of IG)if(ne(t,new j(i)))return!0;return!1}constructor(t){this.Om=t,this.jm=new Ha}},IG=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]],EG=class{Bmt(){return this.Rmt.byteOffset}Umt(){return new SG(this.Rmt)}Qmt(){const t=this.Rmt.byteLength;if(t>8)throw new RangeError("EMBL integer field size is too large");if(8===t&&224&this.Rmt.getUint8(0))throw new RangeError("EMBL integer field value is too large");let i=0;for(let e=0;e<t;e++){i=256*i+this.Rmt.getUint8(e)}return i}mH(){if(4===this.Rmt.byteLength)return this.Rmt.getFloat32(0);if(8===this.Rmt.byteLength)return this.Rmt.getFloat64(0);throw new RangeError("Invalid size for EMBL floating-point field")}constructor(t,i){this.id=t,this.Rmt=i}};function bG(t,i){const e=function(t){const i=new SG(hl(t)),e=i.xmt();if(e.id!==kG)throw new b("Missing WebM EBML header");const s=i.xmt();if(s.id!==CG)throw new b("Missing WebM SegmentElement");const n=s.Bmt(),r=function(t){const i=t.Umt();let e;for(;i.M_t();){const t=i.xmt();if(t.id===xG){e=t;break}}if(!e)throw new b("Missing WebM InfoElement");return function(t){const i=t.Umt();let e,s=1e6;for(;i.M_t();){const t=i.xmt();t.id===OG?s=t.Qmt():t.id===jG&&(e=t.mH())}if(void 0===e)throw new b("Missing Duration in WebM InfoElement");const n=s/1e9,r=e*n;return{timecodeScale:n,duration:r}}(e)}(s);return{segmentOffset:n,timecodeScale:r.timecodeScale,duration:r.duration}}(i),s=new SG(hl(t)).xmt();if(s.id!==zG)throw new b("Missing WebM CuesElement");const n=function(t,i,e,s){const n=[],r=t.Umt();let h,o;for(;r.M_t();){const t=r.xmt();if(t.id!==PG)continue;const e=LG(t);if(!e)continue;const s=e.unscaledTime,a=i+e.relativeOffset;void 0!==h&&n.push({_ot:n.length,RT:h,ct:s.subtract(h),UT:s,kmt:o,Cmt:a-1}),h=s,o=a}if(void 0!==h){0;const t=Ce.fromNumber(s/e);n.push({_ot:n.length,RT:h,ct:t.subtract(h),UT:t,kmt:o,Cmt:void 0})}return n}(s,e.segmentOffset,e.timecodeScale,e.duration);return{bp:_.round(1/e.timecodeScale),Fmt:n}}function LG(t){const i=t.Umt(),e=i.xmt();if(e.id!==BG)throw new b("Missing CueTime in WebM CuePointElement");const s=Ce.fromNumber(e.Qmt()),n=i.xmt();if(n.id!==RG)throw new b("Missing CueTrackPositions in WebM CuePointElement");const r=n.Umt();let h=0;for(;r.M_t();){const t=r.xmt();if(t.id===UG){h=t.Qmt();break}}return{unscaledTime:s,relativeOffset:h}}var kG=440786851,CG=408125543,xG=357149030,OG=2807729,jG=17545,zG=475249515,PG=187,BG=179,RG=183,UG=241,QG=class extends wu{Dvt(t){if(0===t)return this.Ymt}yvt(){return 0}Tvt(t){return this.Ymt}Nvt(t){return this.Tvt(t)}Lvt(){return this.Ymt}tmt(t,i){return Ce.ZERO}fvt(t){const i=this.Gmt(t);return i&&{kvt:t,Cvt:i,xvt:i}}Gmt(t){const i=this.Ymt;return this.Kut(i,t)?i:void 0}Ovt(t){return this.Gmt(t)}jvt(t){return this.Gmt(t)}Yn(){}zat(t){return 0===t&&void 0!==this.Vmt}Wvt(t,i){const e=i.cAt[0].href;return this.Wmt.get(e)}Hvt(t,i,e,s){const n=i.cAt[0].href;let r=this.Hmt.get(n);if(void 0===r){const h=i.SF,o=this.qmt.Hd;if(Bt(h))r=this.Xmt(t,n,e,s,o);else{if(!Dv(h))throw new $i(td.MEDIA_NOT_SUPPORTED,"Unsupported MIME type for segment index: "+h);r=this.Zmt(t,n,i,e,s,o)}this.Hmt.set(n,r)}return r}async Xmt(t,i,e,s,n){const r=this.Vmt,h=await s.aut(i,r,e,n),o=this.Kmt(t,h);return this.Wmt.set(i,o),o}Kmt(t,i){const e=this.Vmt,s=Nt.$m(new DataView(i),new Ha);if(s.Rg!==he.lm)throw new g("Invalid segment index");const n=Eh.yp(s.Om),r=function(t,i){const e=[];let s=t.WM,n=i+t.HM.toNumber(),r=0;for(const i of t.XM){const t=i.QM,h=Ce.fromNumber(i.ct),o=s.add(h);0===i.UM&&e.push({_ot:r++,RT:s,ct:h,UT:o,kmt:n,Cmt:n+t-1}),n+=t,s=o}return e}(n,e[1]+1);return new DG(t,n.bp,this.iwt.Cn,ku(this.Gvt,this.RL),r)}async Zmt(t,i,e,s,n,r){const h=e.avt(),o=this.Vmt,a=n.aut(h.zu,h.bht,s,r),u=n.aut(i,o,s,r),[c,d]=await Promise.all([a,u]),l=this.Jmt(t,d,c);return this.Wmt.set(i,l),l}Jmt(t,i,e){const s=bG(new j(i),new j(e));return new DG(t,s.bp,this.iwt.Cn,ku(this.Gvt,this.RL),s.Fmt)}Qd(){super.Qd(),this.qmt.Xd()}constructor(t,i){super(i,t),this.Wmt=Cn(),this.Hmt=Cn(),this.qmt=new er,this.Vmt=t.Pwt,this.Ymt=this.Qvt(0,Ce.ZERO,this.iwt.ct)}},FG=class extends vG{get qwt(){}Vat(t,i){return{zu:i.cAt[0].href}}lvt(t,i){return{zu:i.cAt[0].href,bht:t.Lmt}}ymt(){return new QG(this,this.bat)}},YG=class extends Yi{constructor(){super(ri.xrt)}};var GG=class extends Bo{get Om(){return this.YL}get cAt(){return this.$mt}tpt(){var t,i;return null!=(i=this.Bvt)?i:null==(t=this.wit)?void 0:t.tpt()}ipt(t){const i=this.bat,e=this.wit&&this.wit.tpt();this.YL.fAt?this.Bvt=new MG(i,e,this.YL.fAt):this.YL.lAt?this.Bvt=new TG(i,e,this.YL.lAt[0]):this.YL.dAt?this.Bvt=new FG(i,e,this.YL.dAt):t&&!e&&(this.Bvt=new FG(i,e,void 0))}ept(t,i){this.YL=t,this.$mt=t.cAt&&t.cAt.length>0?lG(t.cAt.map((t=>t.zu)),i):i.slice(),this.Bvt&&(t.fAt?this.Bvt.Yn(t.fAt):t.lAt?this.Bvt.Yn(t.lAt[0]):t.dAt&&this.Bvt.Yn(t.dAt))}ivt(){var t;return null==(t=this.spt)?void 0:t.npt}_vt(){var t;return null==(t=this.spt)?void 0:t.rpt}hpt(t){const i=this.opt,e=this.bat.ct,s=this.spt,n=this.apt(t);s&&be(e,i,1e-5)&&qG(s,n)||(this.opt=e,this.spt=n,this.Co(new YG))}Qd(){this.Vo(),this.Bvt&&(this.Bvt.Qd(),this.Bvt=void 0)}constructor(t,i,e){super(),this.Bvt=void 0,this.opt=1/0,this.spt=void 0,this.wit=i,this.ept(t,e)}};function VG(t){let i,e;for(const e of t){const t=e.ivt();if(t){i=t.Cn;break}}if(void 0!==i){for(let i=t.length-1;i>=0;i--){const s=t[i].ivt();if(s){e=s.jn;break}}return void 0!==e?{Cn:i,jn:e}:void 0}}function WG(t){if(0===t.length)return;let i=0,e=1/0;for(const s of t){const t=s.ivt();if(!t)return;if(i=_.max(i,t.Cn),e=_.min(e,t.jn),i>=e)return}return{Cn:i,jn:e}}function HG(t){let i;for(const e of t){const t=e._vt();t&&(!i||t.getTime()<i.getTime())&&(i=t)}return i}function qG(t,i){return function(t,i){return t&&i?t.getTime()===i.getTime():t===i}(t.rpt,i.rpt)&&function(t,i){return t&&i?be(t.Cn,i.Cn,1e-5)&&be(t.jn,i.jn,1e-5):t===i}(t.npt,i.npt)}var XG=class extends uG{get Pnt(){return this.upt}get cst(){return this.Pnt.reduce(((t,i)=>{for(const e of i.cst)ae(t,e)||t.push(e);return t}),[])}get $tt(){return this.cst.length>0?this.cst[0]:""}get Rg(){return this.upt[0].Rg}get o(){return this.IT}get Yut(){return this.iwt.Yut}get SF(){return this.upt[0].SF}get bat(){return this.iwt}get Wnt(){return xl(this.Pnt,(t=>t.Wnt))}ivt(){return WG(this.upt)}_vt(){let t;for(const i of this.upt){const e=i._vt();e&&(!t||e.getTime()<t.getTime())&&(t=e)}return t}gn(){this.Vo();for(const t of this.upt)t.fn(ri.xrt,this.svt)}constructor(t,i,e){super(),this.iwt=t,this.IT=i,this.upt=e.slice();for(const t of e)t.yn(ri.xrt,this.svt)}},ZG=class extends Yi{constructor(){super(ri.jrt)}};function KG(t){const i=[];for(const e of t){let t;const s=e.uct;void 0===s||(t=Po(i,(t=>t.o===s))),t||(t={o:s,Pnt:[]},i.push(t)),t.Pnt.push(e)}return i}var vh,JG=class extends uG{get Pnt(){return this.upt}get twt(){return this.cpt}get kAt(){return this.nvt.Om.kAt}get ct(){return this.nvt.ct}get jn(){return this.Cn+this.ct}get CAt(){return this.nvt.Om.CAt||[]}get o(){return this.nvt.o}get zrt(){return this.dpt}get Yut(){return this.lpt}get fpt(){return this.lpt._pt(this)}get bat(){return this}get gpt(){return this.lpt.wpt(this)}get Apt(){return this.vpt(1/0,_.min)}get mpt(){return this.vpt(0,_.max)}vpt(t,i){if(0===this.cpt.length)return;let e=t;for(const t of this.cpt){const s=t.Rg;if(s===f.vm||s===f.Am){const s=t.evt;if(void 0===s)return;e=i(e,s)}}return e}get Cn(){return this.nvt.Cn}get lI(){return this.Yut.lI}ppt(){this.dpt||(this.dpt=!0,this.Co(new ZG),this.gn())}async Yn(t,i){0===this.upt.length?(await this.ypt(this.nvt.Pnt,t,i),this.Mpt(this.upt),fo(i)):await this.Tpt(t,i)}async ypt(t,i,e){for(const s of t){const t=new dG(this,s);try{await t.Yn(i,e),this.upt.push(t)}catch(t){Kc(t)}}}Mpt(t){const i=KG(t);for(const t of i){const i=new XG(this,t.o,t.Pnt);this.cpt.push(i)}}async Tpt(t,i){for(const e of this.upt)await e.Yn(t,i)}ivt(){return this.nvt.ivt()}_vt(){return this.nvt._vt()}gn(){this.Vo(),this.nvt.fn(ri.xrt,this.svt);for(const t of this.cpt)t.gn();for(const t of this.upt)t.gn();No(this.upt),No(this.cpt)}constructor(t,i){super(),this.upt=[],this.cpt=[],this.dpt=!1,this.lpt=t,this.nvt=i,this.nvt.yn(ri.xrt,this.svt)}},Iu=class extends Yi{constructor(){super(Co.dw)}};(vh||(vh={})).Npt="Dpt";var $G=class extends Yi{constructor(){super(vh.Npt)}},tV=class extends GG{get Bot(){return this.dht}get bat(){return this.dht.bat}get bvt(){return this.dht.bvt}get SF(){return this.YL.SF||this.dht.SF}get cvt(){return this.tpt()}get ent(){return this.cvt.ent}zat(t){const i=this.SF;return!(!Bt(i)&&!Dv(i))&&this.ent.zat(t._ot)}Bat(t,i,e,s){return this.ent.Bat(t,this,i,e,s)}avt(){return this.cvt.avt(this)}Vat(t){return this.cvt.Vat(t,this)}lvt(t){return this.cvt.lvt(t,this)}fvt(){return this.Spt}apt(t){const i=this.ent,e=i.fvt(t),s=e&&function(t,i){const{Cvt:e,xvt:s,kvt:n}=t,r=e.RT;let h;const o=i.Uvt(s);if(o.getTime()<=n.getTime())h=s.UT;else{const t=(o.getTime()-n.getTime())/1e3,i=_.max(s.ct-t,0);h=s.RT+i}return{Cn:r,jn:h}}(e,i),n=this.ent._vt(t,e);return this.Spt=e,{kvt:t,npt:s,rpt:n}}Yn(t){this.ept(t,this.dht.cAt)}constructor(t,i){super(t,i,i.cAt),this.Spt=void 0,this.dht=i,this.ipt(!0)}},iV=class extends GG{get Wnt(){return this._ct}get bat(){return this.iwt}get bvt(){return this.iwt.bvt}get uct(){return this.YL.uct}get SF(){var t;return this.YL.SF||(null==(t=this._ct[0])?void 0:t.Om.SF)||""}get Jwt(){return this.Om.Jwt}Yn(t){this.ept(t,this.iwt.cAt);const i=t.Wnt||[];if(this._ct.length!==i.length)throw new g("Expected "+this._ct.length+' representations in adaptation set "'+t.o+'", found '+i.length);for(let t=0;t<i.length;t++)this._ct[t].Yn(i[t])}hpt(t){for(const i of this._ct)i.hpt(t);super.hpt(t)}apt(t){return{kvt:t,npt:WG(this._ct),rpt:HG(this._ct)}}Qd(){for(const t of this._ct)t.Qd();super.Qd()}constructor(t,i){super(t,i,i.cAt),this.iwt=i,this.ipt(!1),this._ct=t.Wnt.map((t=>new tV(t,this)))}},eV=class extends GG{get Pnt(){return this.upt}get twt(){return this.cpt}get bat(){return this}get bvt(){return this.Ipt}get o(){return this.YL.o}get Cn(){return this.iS}get ct(){return this.UL}Yn(t,i){this.ept(t,this.Ipt.cAt),this.UL=i;const e=t.Pnt||[];if(this.upt.length!==e.length)throw new g("Expected "+this.upt.length+' adaptation sets in period "'+t.o+'", found '+e.length);for(let t=0;t<e.length;t++)this.upt[t].Yn(e[t])}hpt(t){for(const i of this.upt)i.hpt(t);super.hpt(t)}apt(t){return{kvt:t,npt:WG(this.upt),rpt:HG(this.upt)}}Qd(){for(const t of this.upt)t.Qd();super.Qd()}constructor(t,i,e,s){super(i,void 0,t.cAt),this.cpt=[],this.Ipt=t,this.iS=e,this.UL=s,this.ipt(!1),this.upt=(i.Pnt||[]).map((t=>new iV(t,this))),this.cpt=KG(this.upt)}},sV=class{get Ept(){return this.bpt.OAt.aD}get Lpt(){return this.bpt.OAt.oD}get kpt(){return this.bpt.OAt.xAt}get Cpt(){var t;return null==(t=this.bpt.Gf)?void 0:t.aD}get xpt(){var t;return null==(t=this.bpt.Gf)?void 0:t.aD}constructor(t){this.bpt=t}},nV=new Date("2000-01-01"),rV=class extends Bo{get Om(){return this.YL}get Rg(){return this.YL.Rg||bo.Qx}get zAt(){return this.Opt||this.YL.zAt||this.GAt}get jAt(){return this.YL.jAt}get Evt(){var t,i;return null!=(i=null==(t=this.jpt)?void 0:t.ignoreAvailabilityWindow)&&i}get QAt(){return this.zpt}get cAt(){return this.$mt}get PAt(){return this.Ppt}get dwt(){return this.Bpt}get GAt(){return this.YL.GAt||this.An}get Wwt(){return this.YL.Wwt}get Rpt(){return this.Upt}get Qpt(){return this.An}get HAt(){return this.bpt}ivt(){var t;return null==(t=this.spt)?void 0:t.npt}_vt(){var t;return null==(t=this.spt)?void 0:t.rpt}Yn(t,i,e,s){var n;const r=void 0!==this.YL&&this.YL.Rg===bo.Fx;this.YL=t,this.Upt=null!=s?s:e,this.An=e;const h=[Uf(i)];this.$mt=t.cAt&&t.cAt.length>0?lG(t.cAt.map((t=>t.zu)),h):h,this.Ppt=t.PAt&&t.PAt.length>0?lG(t.PAt,this.$mt):[];const o=this.Ppt.map((t=>t.href)),a=i.href;ae(o,a)||(this.Ppt.push(i),o.push(a));const u=this.Fpt.href;ae(o,u)||(this.Ppt.push(this.Fpt),o.push(u)),this.zpt=null==(n=t.QAt)?void 0:n.Swt(),t.HAt&&(this.bpt=new sV(t.HAt));const c=t.Rg===bo.Fx,d=function(t,i,e){const s=[];for(let e=0;e<t.length;e++){const n=t[e];let r;if(n.Cn)r=n.Cn.Swt();else if(e>0&&t[e-1].ct){r=s[e-1]+t[e-1].ct.Swt()}else{if(0!==e||i)break;r=0}s.push(r)}const n=[];for(let i=0;i<s.length-1;i++)n.push({Om:t[i],Cn:s[i],ct:s[i+1]-s[i]});if(s.length>0){const r=s.length-1,h=t[r],o=s[r];let a=1/0;i||(a=h.ct?h.ct.Swt():e-o),n.push({Om:h,Cn:o,ct:a})}return n}(t.dwt,c,this.zpt);this.Ypt(d,r,c),this.hpt(e)}Ypt(t,i,e){const s=this.Bpt;if(0===t.length)return void No(s);const n=t[0].Om.o;let r=0;for(;r<s.length&&s[r].o!==n;)r++;const h=s.splice(0,r);for(const t of h)t.Qd();if(i&&!e&&s.length>0&&t.length>0){var o;const i=null!=(o=hV(s[0].Om))?o:Sn.kN;var a;const e=null!=(a=hV(t[0].Om))?a:Sn.kN;if(e._N(i)){const n=e.NN(i);void 0!==this.zpt&&(this.zpt+=n.fN());for(let i=0;i<t.length;i++){const e=t[i];if(i<s.length){const t=s[i];e.Cn=t.Cn,dV(e.Om,t.Om)}i===t.length-1&&(e.ct+=n.fN())}}}for(let i=0;i<t.length;i++){const e=t[i];if(i<s.length){const t=s[i];0,t.Yn(e.Om,e.ct)}else s.push(new eV(this,e.Om,e.Cn,e.ct))}}hpt(t){for(const i of this.Bpt)i.hpt(t);const i=this.spt,e=this.apt(t);i&&qG(i,e)||(this.spt=e,this.Co(new YG))}apt(t){return{kvt:t,npt:VG(this.Bpt),rpt:HG(this.Bpt)}}Lvt(){if(0===this.Bpt.length)return;const t=this.Bpt[this.Bpt.length-1];if(isFinite(t.ct))return;if(0===t.Pnt.length)return;const i=t.Pnt[0];if(0===i.Wnt.length)return;const e=i.Wnt[0].ent,s=e.Lvt();return s?{uot:s,jAt:e.Gut(s)}:void 0}Qd(){this.Vo();for(const t of this.Bpt)t.Qd()}constructor(t,i,e,s,n){if(super(),this.spt=void 0,this.zpt=void 0,this.Opt=void 0,this.Bpt=[],this.Fpt=i,this.jpt=n,this.Yn(t,e,s),t.Rg===bo.Fx){const t=this.Lvt();t&&t.jAt&&t.jAt.getTime()<nV.getTime()&&(this.Opt=new Date(this.GAt.getTime()-1e3*(t.uot.RT+t.uot.ct)),this.hpt(s))}}};function hV(t){let i=uV(t);var e,s;for(const s of null!=(e=t.Pnt)?e:[])i=xA(i,oV(s));for(const e of null!=(s=t.CAt)?s:[])i=xA(i,cV(e));return i}function oV(t){let i=uV(t);for(const e of t.Wnt)i=xA(i,aV(e));return i}function aV(t){return uV(t)}function uV(t){let i;if(void 0!==t.fAt&&(i=xA(i,cV(t.fAt))),void 0!==t.dAt&&(i=xA(i,cV(t.dAt))),void 0!==t.lAt)for(const e of t.lAt)i=xA(i,cV(e));return i}function cV(t){var i,e;return Sn.EN(null!=(i=t.Gwt)?i:Ce.ZERO,null!=(e=t.bp)?e:1)}function dV(t,i){if(_V(t,i),t.Cn=i.Cn,void 0!==t.Pnt&&void 0!==i.Pnt&&t.Pnt.length===i.Pnt.length)for(let e=0;e<t.Pnt.length;e++)lV(t.Pnt[e],i.Pnt[e]);if(void 0!==t.CAt&&void 0!==i.CAt&&t.CAt.length===i.CAt.length)for(let e=0;e<t.CAt.length;e++)gV(t.CAt[e],i.CAt[e])}function lV(t,i){if(_V(t,i),void 0!==t.Wnt&&void 0!==i.Wnt&&t.Wnt.length===i.Wnt.length)for(let e=0;e<t.Wnt.length;e++)fV(t.Wnt[e],i.Wnt[e])}function fV(t,i){_V(t,i)}function _V(t,i){if(void 0!==t.fAt&&void 0!==i.fAt&&gV(t.fAt,i.fAt),void 0!==t.dAt&&void 0!==i.dAt&&gV(t.dAt,i.dAt),void 0!==t.lAt&&void 0!==i.lAt&&t.lAt.length===i.lAt.length)for(let e=0;e<t.lAt.length;e++)gV(t.lAt[e],i.lAt[e])}function gV(t,i){t.bp=i.bp,t.Gwt=i.Gwt}var wV=class{async MW(t){await this.Gpt(t,this.mI,this.Vpt,this.Wpt).catch(Ah)}Fut(){return new Date(fa()+this.Hpt)}async Gpt(t,i,e,s){let n;if(s&&(n=await this.qpt(i,s,e)),void 0===n){fo(e);for(const s of t)if(n=await this.Xpt(i,s,e),void 0!==n)break}this.Hpt=void 0===n?0:n-fa()}async Xpt(t,i,e){switch(i.lst){case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2012":case"urn:mpeg:dash:utc:http-iso:2014":{const s=i.LM;if(s)return await this.qpt(t,s,e);break}case"urn:mpeg:dash:utc:direct:2012":case"urn:mpeg:dash:utc:direct:2014":{const t=i.LM;if(t){const i=new Date(t).getTime();if(!S(i))return i}break}default:return}}async qpt(t,i,e){try{const s=await t.MS({zu:i,oI:G.GET,aI:dm.Ru,Hd:e}),n=await s.pI(),r=new Date(n).getTime();if(!S(r))return r}catch(t){Kc(t)}}constructor(t,i,e){this.mI=t,this.Vpt=i,this.Wpt=e,this.Hpt=0}},AV=class extends Bo{get jAt(){return this.nvt&&this.nvt.jAt}get zAt(){return this.nvt&&this.nvt.zAt}get Evt(){return this.nvt&&this.nvt.Evt}get o(){return this.nvt&&this.nvt.Om.o}get Rpt(){var t;return null==(t=this.nvt)?void 0:t.Rpt}get Zpt(){var t;return null==(t=this.nvt)?void 0:t.Qpt}get PAt(){return this.nvt?this.nvt.PAt.map((t=>t.href)):[this.Kpt]}get Kpt(){return this.Jpt.href}get RAt(){return this.nvt&&this.nvt.Om.RAt}get UAt(){return this.nvt&&this.nvt.Om.UAt}get QAt(){return this.nvt&&this.nvt.Om.QAt}get FAt(){return this.nvt&&this.nvt.Om.FAt}get YAt(){var t,i;const e=(null==(i=this.nvt)||null==(t=i.Om.YAt)?void 0:t.Iwt())||0;return _.max(e,mV)}get Uf(){return this.$pt}tyt(t){const i=this.Uf;this.$pt=t,i!==this.Uf&&this.Co(new $G)}get dwt(){return this.Bpt}get iyt(){return this.Rg===bo.Fx?this.Avt:this.eyt}get syt(){const t=this.iyt;if(void 0!==t)for(const i of this.dwt)if(i.Cn<=t&&i.jn>t)return i}get iAt(){return this.nvt&&this.nvt.Om.iAt}get GAt(){return this.nvt&&this.nvt.GAt}get Apt(){for(let t=this.Bpt.length-1;t>=0;t-=1){const i=this.Bpt[t].Apt;if(i)return i}}get Avt(){const t=this.Apt;if(void 0===t)return;const i=t-this.nyt;return _.max(i,this.eyt)}get eyt(){for(const t of this.Bpt){const i=t.tvt;if(void 0!==i)return i}}get lI(){return Boolean(this.ryt.lI)}get nyt(){var t,i;if(this.ryt.hyt&&this.Rg===bo.Fx)return this.ryt.hyt;const e=null==(i=this.nvt)||null==(t=i.Om.VAt)?void 0:t.Swt();return void 0!==e?e:this.Rg===bo.Fx?1.5*this.FAt.Swt():0}get Wwt(){return this.nvt&&this.nvt.Wwt}get Rg(){return this.nvt?this.nvt.Rg:void 0}get HAt(){var t;return null==(t=this.nvt)?void 0:t.HAt}async Yn(t,e,s){const n=[],r=[],h=t.BAt?i.Dh(t.BAt,this.Jpt):this.Jpt;void 0===this.nvt?(await this.oyt.MW(t.WAt),this.nvt=new rV(t,this.Jpt,h,this.Fut(),this.jpt),this.nvt.yn(ri.xrt,this.Ds)):this.nvt.Yn(t,h,this.Fut(),e);const o=this.nvt.dwt;let a;if(0===o.length)a=this.Bpt.slice(),No(this.Bpt);else{const t=o[0].o;let i=0;for(;i<this.Bpt.length&&this.Bpt[i].o!==t;)i++;a=this.Bpt.splice(0,i);for(let t=0;t<o.length;t++){const i=o[t];let e;t<this.Bpt.length?e=this.Bpt[t]:(e=new JG(this,i),n.push(e)),r.push(e.Yn(this.ayt,s))}}await Promise.all(r),this.Bpt.push(...n);for(const t of a)t.ppt();this.Co(new Iu)}Fut(){return this.oyt.Fut()}wpt(t){const i=this.Bpt.indexOf(t);if(i>0)return this.Bpt[i-1]}_pt(t){const i=this.Bpt.indexOf(t);if(i>=0&&i+1<this.Bpt.length)return this.Bpt[i+1]}ivt(){return this.nvt?this.nvt.ivt():void 0}_vt(){return this.nvt&&this.nvt._vt()}hpt(t){this.nvt&&this.nvt.hpt(t)}gn(){this.Vo(),this.uyt=void 0,this.tyt(!1);for(const t of this.Bpt)t.gn();No(this.Bpt),this.nvt&&this.nvt.Qd()}constructor(t,i,e,s,n){super(),this.nvt=void 0,this.$pt=!0,this.Bpt=[],this.uyt=void 0,this.ryt=t,this.Jpt=t.Ug,this.ayt=i,this.mI=e,this.cyt=s,this.oyt=new wV(this.mI,this.cyt,this.ryt.dyt),this.jpt=n}},vV=class{get Yut(){return this.lpt}constructor(t,i,e,s,n){this.lpt=new AV(t,i,e,s,n)}},mV=1e3,pV=class{get Tr(){return this.nvt}get W(){return this.lyt||(this.lyt=this.dit(this.fyt.Hd),Ys(this.lyt)),this.lyt}async dit(t){this.nvt.Yut.Co(new rk);try{await this._yt(t),this.nvt.Yut.tyt(!0)}catch(t){throw Kc(t),this.lyt=void 0,this.nvt.Yut.tyt(!1),new g("The provided MPEG-DASH document could not be loaded - "+t.message)}this.gyt=this.wyt(this.fyt.Hd)}async wyt(t){try{for(;this.nvt.Yut.Rg===bo.Fx;)await ji(this.Ayt,t)}catch(t){}}get Ayt(){return this.nvt.Yut.Zpt&&this.nvt.Yut.Rg===bo.Fx?this.vyt(this.fyt.Hd):this.W}async myt(t){fo(t);const i=this.pyt();if(i>0){const e=_.min(i,2147483647);await Di(e,t)}try{await this._yt(t),this.nvt.Yut.tyt(!0)}catch(t){throw new g("The provided MPEG-DASH manifest could not be loaded - "+t.message)}finally{this.yyt=void 0}}pyt(){const t=this.nvt.Yut.Fut().getTime()-this.nvt.Yut.Rpt.getTime();return this.nvt.Yut.YAt-t}Myt(t){const i=this.nvt.Yut._vt();if(i){const e=i.getTime()-t.getTime();if(e>0)return e}this.nvt.Yut.hpt(t);const e=this.nvt.Yut._vt();return e?e.getTime()-t.getTime():NaN}async vyt(t){this.yyt||(this.yyt=this.myt(t));const i=new er;i.Zd(t);try{await Promise.race([this.yyt,this.Tyt(i.Hd)].filter(Dd))}catch(t){Ah(t)}finally{i.Xd()}}Tyt(t){const i=this.nvt.Yut.Fut(),e=this.Myt(i);if(!S(e)&&!this.Tr.Yut.Evt)return this.Nyt(e,t)}async Nyt(t,i){await Di(t,i);const e=this.nvt.Yut.Fut();this.nvt.Yut.hpt(e)}async Dyt(t,i){const e=await this.Iyt.Syt(t,{},i);return(new iG).qAt(e.Eyt,e.yI)}gn(){return this.fyt.Xd(),this.gyt=void 0,this.lyt=void 0,this.yyt=void 0,this.nvt.Yut.gn(),Promise.resolve()}constructor(t,i,e,s,n){this.fyt=new er,this._yt=async t=>{try{const i=this.nvt.Yut.Fut(),e=await this.Dyt(this.nvt.Yut.PAt,t);await this.nvt.Yut.Yn(e,i,t)}catch(t){throw Cc(t)&&this.nvt.Yut.tyt(!1),t}},this.Iyt=s,this.nvt=new vV(t,i,e,this.fyt.Hd,n)}},yV=class extends Yi{constructor(t,i){super("vwt"),this.Nwt=t,this.xnt=i}},MV=class extends Bo{get xnt(){return this.Ont}get Rg(){return this.F0}get Z(){return this.ag.slice()}OS(t){t&&this.Ont!==t&&this.byt(t)}jS(t){this.Ont===t&&this.byt(void 0)}byt(t){this.Ont=t,this.Co(new yV(this,this.Ont))}gn(){this.Vo();for(const t of this.ag)t.uct=void 0;No(this.ag)}constructor(t,i){super(),this.Ont=void 0,this.F0=t,this.ag=i;for(const t of this.ag)t.uct=this}};var TV,NV=class extends Yi{constructor(t,i,e){super(Co.Kg),this.currentTime=t,this.initDataType=i,this.initData=e}};function th(t,i,e,s,n){let r=[],h=[];for(const t of i)t.Rg===f.vm?r=r.concat(t.Z):t.Rg===f.Am&&(h=h.concat(t.Z));return[DV(t,r,e,s,null==n?void 0:n.preferredAudioCodecs),SV(t,h,e,s,null==n?void 0:n.preferredVideoCodecs)].filter(Dd)}function DV(t,i,e,s,n){const r=Po(s||[],(t=>t.eht===f.vm&&t.Rt)),h=[EV(r,e,t),bV(r),LV(r,n),kV(),t=>{const i=t.filter((t=>"main"===t.zt));return i.length>0?i:t}];return IV(i,h)}function SV(t,i,e,s,n){const r=Po(s||[],(t=>t.eht===f.Am&&t.Rt)),h=[EV(r,e,t),LV(r,n),kV(),t=>{const i=t.filter((t=>"main"===t.zt));return i.length>0?i:t}];return IV(i,h)}function IV(t,i){if(0===t.length)return;let e=t;for(const t of i){if(1===e.length)return e[0];e=t(e)}return e[0]}function EV(t,i,e){return s=>{const n=t?t.Bot.o:void 0;if(!Dd(n))return s;const r=null==i?void 0:i.kAt,h=e.kAt,o=r&&h&&r.LM===h.LM,a=Po(s,(t=>t.Bot.o===n));return o&&a?[a]:s}}function bV(t){return i=>{const e=t?t.gs:"",s=i.some((t=>""!==t.gs))?i.filter((t=>""!==t.gs)):i;if(""===e)return s;const n=s.filter((t=>t.gs===e));return n.length>0?n:s}}function LV(t,i){return t=>{if(i&&i.length>0)for(const e of i){const i=t.filter((t=>t.Ng.og.some((t=>ot(t.cst,e)))));if(i.length>0)return i}return t}}function kV(){return t=>{let i=[],e=-1/0;for(const s of t){const t=s.Bot.DP;t>e?(e=t,i=[s]):t===e&&i.push(s)}return i}}!function(t){t.Lyt="api",t.kyt="start"}(TV||(TV={}));var CV={maxRetries:3,minimumBackoff:1e3,maximumBackoff:1/0},xV=class{Cyt(t,i,e){const s=this.Lut.maxRetries===1/0?CV:this.Lut;return Wu((()=>this.xyt(t,i,e)),e,s.maxRetries,s.minimumBackoff,s.maximumBackoff)}async xyt(t,i,e){let s;for(const n of t)try{const t=new Pc({zu:n,aI:dm.Ru,hI:i,lI:this.Oyt,oI:G.GET,Rg:N.GS,cI:aa.tT,Hd:e,IS:15e3,uI:5e3}),s=await this.mI.MS(t),r=await s.pI(e);return{Eyt:r,jyt:n,yI:s.yI}}catch(t){s=t}throw s}constructor(t,i,e=CV){this.mI=t,this.Oyt=i,this.Lut=e}},OV=class{async Syt(t,i,e){let s;for(const n of this.zyt)try{return await n.Syt(t,i,e)}catch(t){Kc(t),s=t}throw s}constructor(t){this.zyt=t}},jV=class{async Syt(t,i,e){const s=await this.cot.Met(t);if(s)return{Eyt:s.data,jyt:s.locationURL,yI:s.responseURL};throw new g("Manifest fetch from cache unsuccesful")}constructor(t){this.cot=t}},zV=class{async Syt(t,i,e){return await this.Pyt.Cyt(t,i,e)}constructor(t){this.Pyt=t}};function PV(t,i){return new OV([new jV(i),new zV(t)])}var BV=class{async Syt(t,i,e){const s=await this.Iyt.Syt(t,i,e);return await this.Byt(s),s}async Byt(t){await this.Ryt.Cet({key:Wi(t.jyt),locationURL:Wa(t.jyt),responseURL:Wa(t.yI),data:t.Eyt,references:[this.Uyt.o]})}constructor(t,i,e){this.Iyt=t,this.Ryt=i,this.Uyt=e}},ec=class extends Yi{constructor(){super(Co._w)}},RV=class extends Yi{constructor(){super(Co.fw)}},dc=class extends F{Qyt(t){return t.Jf=Rt.LOADED,this.tt(t),t}Fyt(t){for(const i of this.Z.og)if(i.Og===t)return i}constructor(){super()}};function UV(t,i){return""===i?t:t+" "+i}var QV=class extends dh{get va(){return this.Xa||(this.Xa=function(t){return vi(dA(t),{get attributes(){return t.aS},get eventID(){var i;return""+(null!=(i=t.Yyt)?i:"")}})}(this)),this.Xa}sN(t){return this.O===t.O}constructor(t,i,e,s,n){super(t,i,e,!1,null==n?void 0:n.toString()),this.aS=s,this.Yyt=n}},FV=class extends dc{Gyt(t){const i=this.AI.wI(hh.Mm,"","","",void 0,Wt.EVENT_STREAM);return i.Og=t,this.Qyt(i),i}Vyt(t,i,e){const s=t.lst;var n;const r=null!=(n=t.LM)?n:"";var h;const o=null!=(h=t.bp)?h:1;var a;const u=null!=(a=t.Gwt)?a:Ce.ZERO,c=UV(s,r);let d=this.Fyt(c);d||(d=this.Gyt(c));for(const s of t.IF)if(!YV(s,d)){const t=GV(s,o,u,i);t.UT>e&&d.MI(t)}}async $n(t){await this.tr(),this.Ipt=t,this.Ipt.yn(Co.dw,this.Wyt),this.Wyt()}async tr(){this.Ipt&&(this.Ipt.fn(Co.dw,this.Wyt),this.Ipt=void 0);for(const t of this.Z.og)this.AI.NI(t);await super.tr()}constructor(t){super(),this.Ipt=void 0,this.Wyt=()=>{var t,i;const e=null!=(i=null==(t=this.Ipt.ivt())?void 0:t.Cn)?i:0;if(e>0)for(const t of this.Z.og)um(t,e);for(const t of this.Ipt.dwt)if(t.jn>e)for(const i of t.CAt)this.Vyt(i,t,e)},this.AI=t}};function YV(t,i){const e=t.o;if(void 0!==e){if(Po(i.L.og,(i=>i.Yyt===e&&i.O===t.Om)))return!0}return!1}function GV(t,i,e,s){const n=t.o,r=t.kM.toSigned().subtract(e),h=t.ct,o=t.Om,a=t.aS,u=r.toNumber()/i+s.Cn,c=h?h.toNumber()/i:void 0,d=void 0!==c?u+c:s.mpt;return new QV(u,d,o,a,n)}function VV(t,i,e,s,n){const r=[],h=Po(e,(t=>t.lst===g_));if(void 0===h)return;const o=h.LM?function(t){const i=t.split(":",1)[0];switch(i){case"cbcs":case"cenc":return i;default:return}}(h.LM.toLowerCase()):"cenc";if(void 0!==o){for(const t of e)if(t.lst!==g_)for(const i of Bm(t.lst)){const e=n&&t.Owt?[t.Owt]:[];r.push({ZA:i,Az:e,vz:void 0,Mj:void 0})}if(r.length)return{LO:t,Ogt:{Hyt:o,kO:h.kO},xgt:r,qyt:i===f.vm?s.slice():[],Xyt:i===f.Am?s.slice():[],U4:!1}}}function WV(t,i){if(!t)return i;if(!i)return t;const e=[],s=Cn();var n;return HV(e,s,t.xgt),HV(e,s,i.xgt),{LO:t.LO,Ogt:{Hyt:t.Ogt.Hyt,kO:null!=(n=t.Ogt.kO)?n:i.Ogt.kO},xgt:e,qyt:qV(t.qyt,i.qyt,ae),Xyt:qV(t.Xyt,i.Xyt,ae),U4:t.U4||i.U4||!1}}function HV(t,i,e){for(const s of e){const e=s.ZA.Db;let n;i.has(e)?(n=i.get(e),n.Az=qV(n.Az,s.Az,XV)):(n=Tt({},s),t.push(n),i.set(e,n))}}function qV(t,i,e){const s=t.slice();for(const t of i)e(s,t)||s.push(t);return s}function XV(t,i){for(const e of t)if(yu(e,i))return!0;return!1}function ZV(t,i,e){let s;const n=t.dst;if(n){const r=t.SF,h=[];for(const i of t.cst)h.push(r+'; codecs="'+i+'"');s=VV(i||{},t.Rg,n,h,e)}for(const n of t.Wnt)s=WV(s,KV(n,i,e));return s}function KV(t,i,e){return VV(i||{},t.Rg,t.dst||[],[t.Fz],e)}function JV(t){return t?t.xgt.map((i=>{const e=$V(t.LO,i.ZA),s=t.Ogt.Hyt;return{ZA:i.ZA,Az:i.Az,Mj:i.Mj,fP:[{initDataTypes:[i.ZA.Tb],audioCapabilities:tW(t.qyt,s,null==e?void 0:e.audioRobustness),videoCapabilities:tW(t.Xyt,s,null==e?void 0:e.videoRobustness),persistentState:null==e?void 0:e.persistentState,distinctiveIdentifier:null==e?void 0:e.distinctiveIdentifier}]}})):[]}function $V(t,i){switch(i.Rg){case ge.BA:return t.widevine;case ge.PA:return t.playready;case ge.RA:return t.fairplay;case ge.UA:return t.clearkey}}function tW(t,i,e){if(0!==t.length)return t.map((t=>({contentType:t,encryptionScheme:i,robustness:e})))}var iW=class extends dc{Gyt(t){const i=this.AI.wI(hh.Mm,t.o,"thumbnails","",!1,Wt.DEFAULT);return i.jg=L.Jn,this.Qyt(i),i}async $n(t){await this.tr(),this.Ipt=t,this.Ipt.yn(Co.dw,this.Yn),this.Yn()}Zyt(t){this.Kyt(t),this.Jyt()}Jyt(){const t=[];for(const i of this.Z.og)this.$yt(i)||t.push(i);for(const i of t)this.it(i)}Kyt(t){const i=[];for(const e of this._ct)-1===t.indexOf(e)&&i.push(e);for(const t of i)_s(this._ct,t)}async tr(){this.Ipt&&(this.Ipt.fn(Co.dw,this.Yn),this.Ipt=void 0);for(const t of this._ct)t.fn(ri.xrt,this.tMt);this._ct.length=0;for(const t of this.Z.og)this.AI.NI(t);await super.tr()}gn(){return this.tMt=void 0,super.gn()}iMt(){var t,i;const e=null!=(i=null==(t=this.Ipt.ivt())?void 0:t.Cn)?i:0;if(e>0)for(const t of this.Z.og)um(t,e)}eMt(t){return this.Z.og.some((i=>i.o===t.o))}sMt(t){return Po(this.Z.og,(i=>i.o===t.o))}$yt(t){return this._ct.some((i=>t.o===i.o))}constructor(t){super(),this._ct=[],this.Yn=()=>{const t=[];for(const i of this.Ipt.dwt)for(const e of i.Pnt)if(e.Rg===f.$M&&e.Wnt.length>0){const i=e.Wnt[0];t.push(i),this.eMt(i)||this.Gyt(i),-1===this._ct.indexOf(i)&&(this._ct.push(i),i.yn(ri.xrt,this.tMt)),this.nMt(i)}this.Zyt(t)},this.nMt=t=>{const i=this.sMt(t);i&&t&&i.jg!==L.Ch&&(this.iMt(),function(t,i){const e=t.ent,s=t.fvt();if(!s)return;const n=s.Cvt,r=s.xvt,h=t.ji,o=t.Ti,[a,u]=function(t){for(const i of t)if(Ts(i.lst,sW)||Ts(i.lst,nW)){const t=i.LM.match(eW);if(t){const[,i,e]=t;return[Number(i),Number(e)]}}return[1,1]}(t.Jwt);let c=n;for(;c&&c._ot<=r._ot;){const s=t.cvt.ct||c.ct,n=rW(i,c,t.Vat(c).zu,h,o,a,u,s);for(const t of n)i.MI(t);c=e.Fat(c)}}(t,i))},this.AI=t;const i=this;this.tMt=function(){i.nMt(this)}}},eW=/^(\d+)x(\d+)$/,sW="http://dashif.org/guidelines/thumbnail_tile",nW="http://dashif.org/thumbnail_tile";function rW(t,i,e,s,n,r,h,o){const a=[],u=i.RT,c=r*h,d=s/r,l=n/h,f=_.round(d),g=_.round(l),w=o/c;if(1===c){const i=u+w;return hW(t,u,i,e)?a:[new dh(u,i,e,!1)]}for(let s=0;s<h;s++)for(let n=0;n<r;n++){const h=u+(s*r+n)*w,o=h+w,c=e+"#xywh="+_.round(n*d)+","+_.round(s*l)+","+f+","+g;if(hW(t,h,o,c)||a.push(new dh(h,o,c,!1)),o>=i.UT)return a}return a}function hW(t,i,e,s){return t.L.og.some((t=>t.RT===i&&t.UT===e&&t.O===s))}var oW=class extends dh{get bM(){return this.rMt}get LM(){return this.hMt}get oMt(){return this.aMt}get va(){return this.Xa||(this.Xa=function(t){return vi(dA(t),{get schemeIDURI(){return t.bM},get value(){return t.LM},get emsgID(){return t.oMt}})}(this)),this.Xa}sN(t){return ne(this.O,t.O)}constructor(t,i,e,s,n,r){super(t,i,r,!1),this.rMt=e,this.hMt=s,this.aMt=n}},aW=class t extends dc{cut(i,e,s){const n=Eh.dp(hl(i));if(!n)return;const r=function(t,i){const e=[];for(const s of t)Cg(s,i)&&e.push(s);return e}(n,he.dm);if(r.length){const i=t.uMt(n,e,s);this.cMt(r,i,s)}}cMt(t,i,e){for(const s of t){let t;t=1===s.ap?s.kM.toNumber()/s.bp+e:i+s.OM/s.bp;const n=t+s.CM/s.bp;"https://aomedia.org/emsg/ID3"===s.bM||"https://developer.apple.com/streaming/emsg-id3"===s.bM?this.dMt(s,t):this.lMt(s,t,n)}}lMt(t,i,e){const s=UV(t.bM,t.LM);let n=this.Fyt(s);n||(n=this.fMt(s),this.Qyt(n)),n.MI(new oW(i,e,t.bM,t.LM,t.o,t.xM))}dMt(t,i){const e=Cx(hl(t.xM));if(!e)return;const s=UV(t.bM,t.LM);let n=this.Fyt(s);n||(n=this._Mt(s),this.Qyt(n));for(const t of e.f1){const e=new Ux(i,t);rx(e,n.L.og),n.MI(e)}}static uMt(t,i,e){const s=xg(t,he.lm);return s?ku(s.WM,s.bp)+e:i}fMt(t){const i=this.AI.wI(hh.Mm,"","","",void 0,Wt.EMSG);return i.Og=t,i.jg=L.zg,i}_Mt(t){const i=this.AI.wI(hh.Mm,"","","",void 0,Wt.ID3);return i.Og=t,i.jg=L.zg,i}async tr(){for(const t of this.Z.og)this.AI.NI(t);await super.tr()}constructor(t){super(),this.AI=t}},uW=class extends aW{async $n(t){await this.tr(),this.Ipt=t,this.Ipt.yn(Co.dw,this.Wyt),this.Wyt()}async tr(){this.Ipt&&(this.Ipt.fn(Co.dw,this.Wyt),this.Ipt=void 0),await super.tr()}constructor(...t){super(...t),this.Wyt=()=>{var t,i;const e=null!=(i=null==(t=this.Ipt.ivt())?void 0:t.Cn)?i:0;this.bS(e)}}};var cW=class{Det(t,i){return this.gMt?this.cot.Det(t,i):Promise.resolve(!1)}Eet(t,i){return this.gMt?this.cot.Eet(t,i):Promise.resolve(void 0)}async Met(t){const i=await this.cot.Met(t);return this.gMt=void 0!==i,i}DH(t){return this.cot.DH(t)}constructor(t){this.gMt=!1,this.cot=t}},$u=class extends gf{fA(){this.Qo.Mf=1/0}canChangePlaybackRate(){return!0}getMinimumLatencyMargin(){return 0}constructor(t,i,e){super(t,i,e)}},dW=[Co.gw,Co.Aw,Co.Mw,Co.lw,Co.Tw],lW=[Co.ww,Co.Ew,Co.ew,Co.$g],fW=class t extends Bo{wMt(t){return!!this.Pz&&this.Pz.aq(t)}async U$(t){this.Pz=await this.sA.$n(t),this.AMt(),this.vMt(),this.Pz.W$(this.ct)}mMt(t){return this.Pz.cq(t)}async pMt(){this.yMt=this.MMt,this.Pz&&(await this.sA.tr(),this.Pz=void 0)}HJ(){this.Pz.HJ()}PJ(){const t=this.ct;this.Pz.ct<t&&this.Pz.W$(t),this.Pz.PJ()}async TMt(t){const i=this.Pz,e=[];i.B$&&e.push(dC(i.B$,t)),i.R$&&e.push(dC(i.R$,t)),await Promise.all(e)}NMt(t,i,e,s,n,r){const h=this.sA,o=this.Pz;return new MY(h,o,t,i,e,s,n,r,this.DMt,h,this.Igt,this.Lut,this.Fgt)}SMt(t,i,e){return t.cq(i,e,this.Pz)}async IMt(t,i,e,s){const n=this.NMt(this.mI,this.CB,this.cot,this.bc,t,s);return n.yn(ri.jrt,this.EMt),n.yn(Co.lw,this.Ds),await n.MW(i,e),n}bMt(t){void 0===t&&(t=!1),this.LMt.Xd(),this.B2.Xd(),this.kMt.Xd(),this.kMt=new er,this.CMt=this.xMt(this.OMt,this.R2,this.CMt,t,this.kMt.Hd).catch(this.Twt)}async xMt(t,i,e,s,n){await Promise.all([t,i,e]),fo(n),await ji(this.jMt.Vb,n);const r=this.zMt;await r._ht(),this.PJ(),fo(n);const h=r.yc,o=r.Mwt,a=r.ywt;let u=this.PMt(h,a,h,o,!1),c=this.BMt(a,u);!s&&this.wMt(c)?await this.RMt(a,u,c):(u=this.PMt(h,a,h,o,!0),c=this.BMt(a,u),await this.UMt(a,u,c,n)),fo(n),this.e_?this.Dm(this.Mf):this.QMt(),this.FMt()}async RMt(t,i,e){const s=this.zMt;await this.mMt(e),this.YMt=e,await this.SMt(s,t,i),await s.wht(Zn.Xnt)}async UMt(t,i,e,s){const n=this.zMt;this.G2(),this.GMt();const r=this.VMt;await this.pMt(),await this.U$(e),this.YMt=e,await this.SMt(n,t,i);try{const t=this.WMt(r,!1,!0,s);await n.wht(Zn.Xnt),await t}finally{this.Z2(),this.HMt()}}get ht(){return this.oT}get Lz(){const t=this.VMt,i=this.qMt,e=i.aB(t);if(-1!==e)return{Cn:i.Cn(e),jn:i.jn(e)}}get qMt(){var t,i,e;const s=null!=(e=null==(t=this.zMt)?void 0:t.wf)?e:ce.MB();var n;const r=null!=(n=null==(i=this.XMt)?void 0:i.wf)?n:ce.MB();return s.rB(r)}get wf(){return this.qMt.ks()}get vf(){var t;const i=null==(t=this.nvt)?void 0:t.Yut,e=null==i?void 0:i.zAt;if(!i||!e)return;const s=e.getTime(),n=1e3*this.Mf;return new Date(n+s)}set vf(t){var i;const e=null==(i=this.nvt)?void 0:i.Yut,s=null==e?void 0:e.zAt;if(!t||!e||!s)return;const n=s.getTime()/1e3,r=t.getTime()/1e3;this.Dm(r-n)}get bt(){return this.bc}get VMt(){return void 0!==this.h2?this.h2:void 0!==this.ZMt?this.ZMt:this.sA.Mf}get Mf(){return this.VMt}set Mf(t){this.Dm(t,t===1/0)}get ct(){let t=NaN;return this.zMt&&this.zMt.cwt?t=this.zMt.jn:this.nvt&&void 0!==this.nvt.Yut.Rg&&(t=this.nvt.Yut.QAt?this.nvt.Yut.QAt.Swt():1/0),t}get jn(){return this.ct}get Sf(){return!(!this.zMt||!this.zMt.cwt)&&(this.e_?this.VMt===this.zMt.jn:this.sA.Sf)}get lt(){return this.xz}get bf(){return this.Oz}get kf(){}KMt(){var t;const i=this.JMt;if(0===i.U)return!0;var e;return(null!=(e=null==(t=this.Lz)?void 0:t.jn)?e:this.VMt)>=i.Cn(0)}$Mt(){var t;if(!this.nvt)return!1;if(this.nvt.Yut.Rg!==bo.Fx)return!1;const i=null==(t=this.zMt)?void 0:t.yc;if(i&&i.zrt)return!0;const e=[];for(const t of this.nvt.Yut.dwt){const i=t.tvt,s=t.mpt;void 0!==i&&void 0!==s&&e.push(i,s)}const s=new ce(e).nB();return function(t,i,e){if(!i.U||!e.U)return ce.MB();const s=i.Cn(0),n=i.jn(i.U-1),r=t.Sn(e).iB().Sn(t).rB(i);return ce.yB(r.Cn(0),r.jn(r.U-1)).hB(r)._B(((t,i)=>t<s&&i<=n&&i-t>al))}(this.qMt,this.JMt,s).U>0}get jf(){return Tt({},this.MMt,{_T:xu.yb.Kj(),gT:this.tTt,wT:{amountOfBufferedAudioSegments:this.iTt,amountOfBufferedVideoSegments:this.eTt}})}get MMt(){return function(t,i){return{dT:t.dT+i.dT,lT:t.lT+i.lT,fT:t.fT+i.fT}}(this.yMt,this.sA.zf())}get Pf(){return this.sA.Pf}set Pf(t){this.sA.Pf=t}get Ff(){return this.a2?this.sTt:this.zMt&&this.zMt.cwt?this.nTt:this.sTt}get Gf(){return this.sA.Gf}set Gf(t){this.sA.Gf=t}get Hf(){let t=this.Uo;return this.zMt&&(t=t.rB(this.rTt)),t.nB(.1).ks()}get rTt(){return this.sA.Hf}hTt(t){this.Uo=this.Uo.rB(t)}get Xf(){return this.zz}set Xf(t){this.zz=t,this.oTt()}get Jf(){let t=this.sA.Jf;return this.aTt&&(t=_.max(oe.Xn,t)),t}get JMt(){return this.uTt(!1)}get cTt(){return this.uTt(!0)}get t_(){return this.JMt.ks()}get e_(){return this.NB||this.dTt}get dTt(){return this.sA.e_}get l0(){return this.sA.l0}get Bz(){}get lTt(){var t,i;return null!=(i=null==(t=this.nvt)?void 0:t.Yut.Rg)?i:bo.Qx}get nt(){return this.Dl}get rt(){return this.uT}get r_(){var t;return this.fTt||(null==(t=this._Tt())?void 0:t.Ti)||0}get a_(){var t;return this.gTt||(null==(t=this._Tt())?void 0:t.ji)||0}get c_(){return this.sA.c_}set c_(t){this.sA.c_=Pe(t,0,1)}get f_(){return this.Rz}get g_(){return!1}set g_(t){}get Uz(){return this.Qz}wTt(t){t.yn(dW,this.Ds),t.yn(Co.Dw,this.ATt),t.yn(Co.Yg,this.vTt),t.yn(ut.ha,this.mTt),t.yn(Co.Vg,this.pTt),t.yn(Co.Aw,this.yTt),t.yn("vwt",this.MTt),t.yn("Kgt",this.MTt)}TTt(t){t.fn(dW,this.Ds),t.fn(Co.Dw,this.ATt),t.fn(Co.Yg,this.vTt),t.fn(ut.ha,this.mTt),t.fn(Co.Vg,this.pTt),t.fn(Co.Aw,this.yTt),t.fn("vwt",this.MTt),t.fn("Kgt",this.MTt)}NTt(t){t.yn(Co.gw,this.Ds)}DTt(t){t.fn(Co.gw,this.Ds)}_Tt(){if(!this.zMt)return;const t=Po(this.zMt.ywt,(t=>t.eht===f.Am));return t?t.yg:void 0}uTt(t){var i;const e=null==(i=this.nvt)?void 0:i.Yut;if(!e)return ce.MB();const s=e.eyt;let n=t?e.Apt:e.Avt;if(void 0===s||void 0===n)return ce.MB();if(!t){const t=this.rTt;t.U>0&&t.jn(t.U-1)>n&&(n=_.min(t.jn(t.U-1),e.Apt))}const r=this.ct;return isFinite(r)&&r>n&&(n=r),ce.yB(s,n).$P()}async $n(t,i){let e,s;fo(i);const n=this.nvt.Yut;try{e=n.syt,s=n.iyt}catch(t){throw new g("Something went wrong determining the start of the provided MPEG-DASH stream")}if(!e)throw new g("Something went wrong determining the initial Period of the provided MPEG-DASH stream");if(void 0===s)throw new g("Something went wrong determining the start time of the provided MPEG-DASH stream");t.textTracks&&this.STt(t.textTracks),this.G2();const r=this.znt(e),h=th(e,r,void 0,void 0,this.nwt),o=this.PMt(e,h,e,h,!0);h.forEach((t=>t.Rt=!0));const a=this.BMt(h,o);await this.U$(a),this.YMt=a,fo(i);const u=await this.IMt(e,r,h,o);fo(i),this.ITt(u),this.Z2(),fo(i),await u.wht(),fo(i),this.ETt||this.Dm(s,!0,TV.kyt)}QMt(){this.LMt.Xd(),this.LMt=new er,this.OMt=this.bTt(this.OMt,this.CMt,this.LMt.Hd).catch(this.Twt)}LTt(){this.LMt.Xd()}async bTt(t,i,e){for(await Promise.all([t,i]),fo(e);;){var s;const t=null==(s=this.zMt)?void 0:s.yc;if(!t){0;break}if(!await this.kTt(t,e)){0;break}}}async kTt(t,i){var e;fo(i);const s=this.zMt;for(0;this.nvt.Yut.Rg===bo.Fx&&void 0===(null==(e=this._pt(t))?void 0:e.tvt);)await ji(this.CTt.Ayt,i),await this.xTt();for(fo(i),await this.xTt(),fo(i);!s.rwt();)await s.df(ah.Bct,i),await this.xTt();fo(i),await this.xTt(),fo(i);const n=this._pt(t);return n?(this.OTt(n)?await this.jTt(n,i):await this.zTt(n,i),!0):(this.HJ(),!1)}OTt(t){var i,e,s,n,r;const h=null!=(r=null==(i=this.bc)?void 0:i.seamlessSwitchStrategy)?r:wi.ZM;if(h===wi.iT)return!0;if(h===wi.eT)return!1;const o=this.zMt,a=null==o?void 0:o.yc,u=null==o?void 0:o.ywt,c=th(t,this.znt(t),a,u,this.nwt),d=this.PMt(t,c,a,u,!1);if(h===wi.CLEAR_ONLY&&((null==(e=this.zMt)?void 0:e.Cgt)||d)||h===wi.SAME_DRM_ONLY&&!((null==(s=this.zMt)?void 0:s.Cgt)&&d||!(null==(n=this.zMt)?void 0:n.Cgt)&&!d))return!1;const l=this.BMt(c,d);return this.wMt(l)}PTt(){return!0}BTt(t){const i=this.RTt();for(const e of i)e!==t&&(e.jg=L.Ch)}FMt(){if(void 0!==this.UTt){if(this.UTt.Bg){const t=Po(this.ht.og,(t=>t.Rt));void 0!==t&&this.UTt.gs===t.gs||(this.UTt.jg=L.Ch)}}else this.QTt()}QTt(){if(this.RTt().length)return;const t=Po(this.ht.og,(t=>t.Rt));if(void 0===t)return;const i=this.nt.og.filter((t=>t.Bg));for(const e of i)if(e.gs===t.gs)return e.jg=L.Jn,void(this.UTt=e)}RTt(){return this.nt.og.filter((t=>t.jg===L.Jn&&(t.zt===hh.wS||t.zt===hh.pm)))}FTt(t){if(t&&this.UTt){const i=function(t,i){if(""===t.gs)return;return i.filter((i=>i.gs===t.gs))[0]}(this.UTt,t.nt.og);i&&(i.jg=L.Jn)}}async jTt(t,i){var e,s;const n=this.zMt;let r=this.XMt;const h=this.YMt;try{fo(i);const e=n.yc,s=n.ywt,h=this.znt(t),o=th(t,h,e,s,this.nwt),a=this.PMt(t,o,e,s,!1);o.forEach((t=>t.Rt=!0));const u=this.BMt(o,a);for(0,await n._ht(),this.PJ(),fo(i),r&&r.yc===t?(this.wMt(u)&&await this.mMt(u),this.YMt=u):(r&&await r.gn(!0),this.wMt(u)&&await this.mMt(u),this.YMt=u,r=await this.IMt(t,h,o,a),this.XMt=r,this.NTt(r),this.YTt.fg=r.nt),await r.wht(),fo(i);this.VMt<t.Cn;)await this.sA.df(Co.Iw,i);fo(i),this.ITt(r)}catch(t){throw Mi(t)&&(r&&await r._ht(),h&&this.YMt!==h&&(this.wMt(h)&&await this.mMt(h),this.YMt=h)),t}(null==(s=this.bc)||null==(e=s.dash)?void 0:e.forceSeekToSynchronize)&&await this.GTt(t,i)}async GTt(t,i){const e=Date.now()/1e3;if(void 0===this.VTt)this.VTt=e;else if(e-this.VTt>900){this.VTt=e,this.GMt();const s=_.max(this.VMt,t.Cn);try{await this.WMt(s,!1,!0,i)}finally{this.HMt()}}}async zTt(t,i){for(fo(i),await this.zMt._ht(),this.PJ(),await this.TMt(t.Cn),fo(i),this.HJ();!this.sA.Sf&&this.VMt<t.Cn;)await this.sA.df([Co.Iw,Co.Jg],i);fo(i);const e=this.zMt.yc,s=this.zMt.ywt,n=this.znt(t),r=th(t,n,e,s,this.nwt),h=this.PMt(t,r,e,s,!0);r.forEach((t=>t.Rt=!0));const o=this.BMt(r,h);this.zMt&&(this.WTt.fn(na.ra,this.HTt),await this.zMt.gn(),this.WTt.yn(na.ra,this.HTt),this.zMt=void 0),this.XMt&&(await this.XMt.gn(),this.XMt=void 0),this.GMt(),this.G2();const a=_.max(this.VMt,t.Cn);await this.pMt(),await this.U$(o),this.YMt=o;const u=await this.IMt(t,n,r,h);this.ITt(u);try{const t=this.WMt(a,!1,!0,i);await u.wht(),await Ph((i=>Promise.race([t,u.df([ah.Bct],i)])),i)}finally{this.Z2(),this.HMt()}}async xTt(){const t=this.XMt;t&&t.yc.zrt&&(await t.gn(!0),this.XMt=void 0)}static qTt(t,i){const e=[],s=[];let n=!i.some((t=>t.Cct.some((t=>"main"===t.LM))));for(const t of i){if(-1!==e.indexOf(t))continue;const r=gW(t.tct.concat(t.Cct),n);n=!1;const h=t.Wnt.map((t=>t.Brt)),o=new jQ(t,h,r),a=wW(t,i);for(const t of a)o.gct(t),e.push(t);s.push(o)}return new MV(t,s)}znt(i){const e=[],s=[];for(const t of i.twt)t.Rg!==f.vm&&t.Rg!==f.Am||(0===t.Wnt.length?this.Co(new QQ("No supported representation found in the AdaptationSet with mimetype : "+t.Rg)):t.Rg===f.vm?e.push(...t.Pnt):s.push(...t.Pnt));const n=[];return e.length>0&&n.push(t.qTt(f.vm,e)),s.length>0&&n.push(t.qTt(f.Am,s)),n}BMt(t,e){var s,n,r,h,o,a,u,c;const d=t.map((t=>{var i;return nQ.hut(null!=(i=t.fct)?i:t.Wnt,ow(t.eht,this.nwt))})).map((t=>({Fz:t.Fz}))),l=null==(n=this.bc)||null==(s=n.dash)?void 0:s.desiredTimescale;var f;const _=(null==(r=this.bc)?void 0:r.seamlessSwitchStrategy)!==wi.eT&&(null==(h=this.bc)?void 0:h.seamlessSwitchStrategy)!==wi.CLEAR_ONLY&&(null==(o=this.bc)?void 0:o.seamlessSwitchStrategy)!==wi.SAME_DRM_ONLY&&(null!=(f=null==(u=this.bc)||null==(a=u.dash)?void 0:a.needsTimescaleShifting)?f:i.Ys.YJ),g=null==(c=this.bc)?void 0:c.useManagedMediaSource;return{Rg:I.Fx,K$:d,Yz:JV(e),U4:null==e?void 0:e.U4,YJ:_,GJ:l,u0:g}}static XTt(t,i){if(!t.length)return;let e;for(const s of t){const t=0===s.vct.length;e=WV(e,ZV(s.Bot,i,t))}return(null==i?void 0:i.preferredKeySystems)&&e&&(e.xgt=function(t,i){const e=t=>{const e=i.indexOf(t.ZA.Db);return e>=0?e:i.length};return yd(t,((t,i)=>e(t)-e(i)))}(e.xgt,i.preferredKeySystems)),e}PMt(i,e,s,n,r){var h,o;const a=this.bc.contentProtection;let u=t.XTt(e,a);if(void 0!==u)return u;var c;const d=null!=(c=null==(h=this.bc)?void 0:h.seamlessSwitchStrategy)?c:wi.ZM;if(d===wi.eT||d===wi.CLEAR_ONLY||d===wi.SAME_DRM_ONLY)return;const l=null==(o=this.zMt)?void 0:o.Cgt;if(!r&&void 0!==l){const t=!l.U4;if(d===wi.ZM&&t&&!this.PTt())return;return l}const f=!r&&d===wi.ZM;return u=this.ZTt(i,a,s,n,f),void 0!==u?(u.U4=!0,u):void 0}ZTt(i,e,s,n,r){let h=i,o=!1;for(;;){if(h=o?this.wpt(h):this._pt(h),void 0===h){if(o)return;o=!0,h=i;continue}const a=th(h,this.znt(h),s,n,this.nwt),u=t.XTt(a,e);if(r){const t=this.BMt(a,u);if(!this.wMt(t))return}if(void 0!==u)return u}}STt(t){for(const i of t)i.src&&this.$z.gI(i);pm(this.$z.Z)}m_(){var t;const i=this.Ff;this.sTt=!0,i||(this.a2||(this.KTt(new is),this.JTt()),(null==(t=this.bz)?void 0:t.Ww)&&this.bz.m_(),this.$Tt())}p_(){this.tNt||(this.tNt=new Rs),this.iNt();const t=this.tNt.Vb;return Ys(t),t}iNt(){if(this.sTt=!1,this.T2=!0,this.oTt(),this.Sf){const t=this.JMt;t.U>0&&this.Dm(t.Cn(0))}this.a2||this.D2().then(this.eNt,this.KTt),this.EMt(),this.$Tt()}get nTt(){return this.sA.Ff}D2(){return this.sA.p_()}JTt(){this.sA.m_()}G2(){this.a2||(this.sTt=this.Ff,this.a2=!0,this.JTt())}Z2(){this.a2&&(this.a2=!1,this.sTt||this.D2().then(this.eNt,this.KTt),this.EMt(),this.$Tt())}$Tt(){const t=this.iO,i=this.Ff;t!==i&&(this.iO=i,i?this.Co(new iu(this.Mf)):this.Co(new Qn(this.Mf)))}Dm(t,i,e){return void 0===i&&(i=!1),void 0===e&&(e=TV.Lyt),this.ETt=!0,this.LMt.Xd(),this.B2.Xd(),this.NB=!0,this.h2=t,this.hTt(this.rTt),this.sNt(new lo(this.Mf)),this.B2=new er,this.R2=this.U2(t,this.OMt,this.R2,this.CMt,this.B2.Hd,i,e).catch(this.Twt),this.R2}nNt(){this.B2.Xd()}async U2(t,i,e,s,n,r,h,o){var a;void 0===r&&(r=!1),void 0===h&&(h=TV.Lyt),void 0===o&&(o=!1),null==(a=this.bz)||a.y_();try{var u,c;0,await Promise.all([i,e,s]),fo(n),await ji(this.jMt.Vb,n);const a=this.JMt.tB(t);this.h2=a;const d=o||(null==(c=this.bc)||null==(u=c.dash)?void 0:u.forceHardSwitchWhenSeekingBackwards)&&a<=this.Mf,l=this.rNt(a),f=this.zMt;if(d||!f||!f.t_.gr(a)&&h!==TV.kyt&&f.yc!==l){if(l){let t=this.XMt;if(this.G2(),f&&await f._ht(),t&&t.yc===l&&!d){const i=this.BMt(t.Mwt,t.Cgt);this.PJ(),this.wMt(i)&&await this.mMt(i),this.YMt=i}else{t&&await t.gn(!0);const i=this.znt(l),e=null==f?void 0:f.yc,s=null==f?void 0:f.ywt,n=th(l,i,e,s,this.nwt);let r=this.PMt(l,n,e,s,!1);n.forEach((t=>t.Rt=!0));let h=this.BMt(n,r);this.OTt(l)&&!d?(this.PJ(),this.wMt(h)&&await this.mMt(h)):(r=this.PMt(l,n,e,s,!0),h=this.BMt(n,r),f&&(this.WTt.fn(na.ra,this.HTt),await f.gn(),this.WTt.yn(na.ra,this.HTt),this.zMt=void 0),await this.pMt(),await this.U$(h)),this.YMt=h,t=await this.IMt(l,i,n,r),this.XMt=t,this.YTt.fg=t.nt,this.NTt(t)}await t.wht(Zn.Knt),this.ITt(t)}}else{0;const t=this.XMt;if(t&&!t.lwt){await t._ht(),this.PJ();const i=this.BMt(f.Mwt,f.Cgt);this.wMt(i)&&await this.mMt(i),this.YMt=i}}0;const _=this.WMt(a,r,!1,n);this.h2=void 0,await this.zMt.wht(Zn.Knt),fo(n),this.QMt(),await _,fo(n),this.Z2(),this.NB=!1,this.hNt(new _r(this.Mf)),this.oNt()}catch(t){if(Mi(t))return void 0;0}}oNt(){if(this.Ff||this.e_||void 0===this.cA)return;const t=this.Mf;var i,e;this.Mf+this.cA-this.f_.wd.maximumOffset<t?null==(i=this.bz)||i.Cn():null==(e=this.bz)||e.y_()}async WMt(t,i,e,s){let n,r,h=!0,o=t;for(;;){const a=this.cTt;if(a.U>0){const i=a.tB(t);o!==i&&(a.gr(o)&&this.nvt.Yut.Rg===bo.Fx||(o=i,h=!0))}if(h)h=!1,n&&Ys(n),null==r||r.Xd(),r=new er,r.Zd(s),n=this.aNt(o,i,e,r.Hd);else if(!this.dTt&&!this.l0)break;await Ph((t=>Promise.race([n,this.df([Co.Mw,Co.Xg],t),this.nvt.Yut.df(ri.xrt,t)])),s)}}async aNt(t,i,e,s){for(this.sA.Dm(t,i,e);this.dTt||this.l0;)await this.sA.df([Co.pw,Co.aw],s)}GMt(){void 0===this.ZMt&&(this.ZMt=this.VMt,this.sA.fn(Co.yw,this.sNt),this.sA.fn(Co.pw,this.hNt))}HMt(){if(void 0===this.ZMt)return;const t=this.VMt;this.ZMt=void 0,this.sA.yn(Co.yw,this.sNt),this.sA.yn(Co.pw,this.hNt),this.VMt!==t&&this.wc()}uNt(t){this.Uo=this.Uo.rB(t)}rNt(t){const i=this.nvt.Yut,e=i.dwt.filter((t=>t.ct>=.2));if(0===e.length)return;const s=e[0];if(t<=s.Cn)return s;for(const i of e)if(i.jn>t)return i;return i.Rg!==bo.Fx?e[e.length-1]:void 0}wpt(t){let i=t.gpt;for(;i&&i.ct<.2;)i=i.gpt;return i}_pt(t){let i=t.fpt;for(;i&&i.ct<.2;)i=i.fpt;return i}async ga(t,e,s){var n;if(this.qz._z(t.contentProtection),this.cNt(),this.bc&&!Ft(this.bc)&&await this.tr(),!t||Ft(t))return;this.TI=new er,s&&this.TI.Zd(s),this.bc=t,this.dNt=e,this.nwt=t.abr,this.Fgt=t.ignoreEmbeddedTextTrackTypes;const r=PV(new xV(this.mI,Boolean(this.bc.useCredentials),this.Lut),this.cot);var h;if(this.tyt(!0),this.CTt=new pV({Ug:i.Dh(this.bc.src),hyt:null!=(h=null==(n=this.bc.latencyConfiguration)?void 0:n.targetOffset)?h:this.bc.liveOffset,dyt:this.bc.timeServer,lI:this.bc.useCredentials},this.lNt(this.nwt),this.mI,r,this.bc.dash),this.nvt=this.CTt.Tr,this.nvt.Yut.yn(Co.cw,this.fNt),this.nvt.Yut.yn(Co.dw,this._Nt),this.nvt.Yut.yn(vh.Npt,this.gNt),this.nvt.Yut.yn(ri.xrt,this.EMt),await this.wNt.$n(this.nvt.Yut),await this.ANt.$n(this.nvt.Yut),ae(this.Fgt,Wt.EMSG)||(this.Igt=new uW(this.AI),this.Dl.pz(this.Igt.Z),await this.Igt.$n(this.nvt.Yut)),t.latencyConfiguration){const i=t.latencyConfiguration;this.bz=new $u(this,this.sA,i),this.bz.Rt=!0,this.Rz.ka(this.bz)}this.oTt()}async vNt(){const t=this.nvt.Yut.Uf;var i,e;(this.tyt(t),t)?this.MTt():(await Promise.all([null==(i=this.zMt)?void 0:i._ht(Zn.frt),null==(e=this.XMt)?void 0:e._ht(Zn.frt)].filter(Dd)),this.LTt(),this.nNt(),this.kMt.Xd())}get Uf(){return this.$pt}tyt(t){this.$pt!==t&&(this.$pt=t,this.Co(t?new ec:new RV))}oTt(){return this.nvt?(this.mNt=this.pNt(this.mNt,this.TI.Hd),this.mNt.catch(this.Twt)):Promise.resolve()}async pNt(t,i){t&&(await t,fo(i));try{this.Xf===pt.ZM||this.T2?await this.yNt(i):this.Xf===pt.Mm&&await this.MNt(i)}catch(t){throw Kc(t),this.yP(new $i(td.MANIFEST_LOAD_ERROR,t.message,t)),t}}async yNt(t){await this.MNt(t),this.TNt||(this.TNt=!0,this.jMt.Zd(this.$n(this.dNt,t)));try{await this.jMt.Vb}catch(t){Kc(t),this.yP(new $i(td.MEDIA_DECODE_ERROR,t.message,t))}}async MNt(t){await ji(this.CTt.W,t);const i=this.nvt.Yut;if(void 0===this.bz&&i.Rg===bo.Fx){const t=i.HAt,e=(null==t?void 0:t.kpt)?(null==t?void 0:t.kpt)/1e3:i.nyt,s={minimumOffset:(null==t?void 0:t.Ept)?(null==t?void 0:t.Ept)/1e3:.5*e,maximumOffset:(null==t?void 0:t.Lpt)?(null==t?void 0:t.Lpt)/1e3:1.5*e,targetOffset:e,forceSeekOffset:2.5*e,minimumPlaybackRate:mu,maximumPlaybackRate:ff};this.bz=new $u(this,this.sA,s),this.Rz.ka(this.bz)}}ITt(i){const e=this.zMt;i!==e&&(this.zMt&&this.TTt(this.zMt),this.XMt&&this.DTt(this.XMt),e&&this.hTt(this.rTt),this.zMt=i,this.XMt=e,this.wTt(this.zMt),this.XMt&&this.NTt(this.XMt),this.oT.fg=i.ht,this.uT.fg=i.rt,this.FTt(i),this.WTt.fn(na.ra,this.HTt),t.NNt(this.WTt),this.WTt.yn(na.ra,this.HTt),this.WTt.fg=i.nt,this.YTt.fg=void 0,this.QTt())}static NNt(t){for(const i of t.og)i.jg=L.Ch}ge(){this.sA.ge()}be(){this.sA.be()}yP(t){this.xz||(Ys(this.tr()),this.xz=Zr(t),this.Oz=t,this.Co(new fh(t)))}cNt(){this.xz=void 0,this.Oz=void 0}AMt(){const t=this.Pz;t&&(t.R$&&(t.R$.AW=this.CB.IW),t.B$&&(t.B$.AW=this.CB.IW))}vMt(){const t=this.Pz;t&&(t.R$&&(t.R$.yW=this.CB.yW),t.B$&&(t.B$.yW=this.CB.yW))}determineStallJumpTarget(){if(this.zMt)return this.zMt.rwt()&&this.Mf>this.zMt.jn-oC&&!this.zMt.cwt?this.zMt.jn:void 0}async tr(){if(this.DNt)return this.DNt;try{this.DNt=this.SNt(),await this.DNt}finally{this.DNt=void 0}}async SNt(){this.Gf=1,this.TI.Xd(),this.nNt(),this.LTt(),this.kMt.Xd(),this.jMt.Xd(),this.ETt=!1,this.m_(),this.T2=!1,this.oT.fg=void 0,this.uT.fg=void 0,this.WTt.fg=void 0,this.YTt.fg=void 0,this.mNt&&(await this.mNt.catch(qo),this.mNt=void 0),await Promise.all([this.OMt,this.R2,this.CMt,this.jMt.Vb.catch(qo)]),this.zMt&&(await this.zMt.gn(!0),this.zMt=void 0),this.XMt&&(this.DTt(this.XMt),await this.XMt.gn(!0),this.XMt=void 0),await this.pMt(),this.YMt=void 0,this.UTt=void 0,this.iP.tr(),await this.wNt.tr(),await this.ANt.tr(),void 0!==this.Igt&&(this.Dl.Tz(this.Igt.Z),await this.Igt.gn(),this.Igt=void 0),this.AI.tr(),this.nvt&&(this.nvt.Yut.fn(Co.cw,this.fNt),this.nvt.Yut.fn(Co.dw,this._Nt),this.nvt.Yut.fn(vh.Npt,this.gNt),await this.CTt.gn(),this.nvt=void 0),this.aTt=!1,this.INt=NaN,this.ENt=0,this.bNt=0,this.ZMt=void 0,this.a2=!1,this.Uo=ce.MB(),this.iO=!0,this.h2=void 0,this.LNt=!1,this.NB=!1,this.TNt=!1,this.jMt=new Rs,this.tTt=0,this.iTt=0,this.eTt=0,this.bc=void 0,this.dNt=void 0,this.Fgt=[],this.VTt=void 0,this.Rz.tr(),this.bz=void 0,this.yMt={dT:0,lT:0,fT:0},await this.$z.tr(),this.sA.tP()}async gn(){this.Vo(),this.cNt(),await this.tr(),this.Vo(),this.oT.gn(),this.uT.gn(),this.WTt.gn(),this.YTt.gn(),this.Dl.gn(),this.iP.gn(),this.kNt.Qd(),await this.wNt.gn(),await this.ANt.gn(),this.AI.gn(),this.sA.fn(Co.Xg,this.B3),this.sA.fn(Zh.Kg,this.X4),this.sA.fn(Co.Jg,this.j3),this.sA.fn(Co.yw,this.sNt),this.sA.fn(Co.pw,this.hNt),this.sA.fn(Co.mw,this.yTt),this.sA.fn(Co.Iw,this.wc),this.sA.fn([Co.jh,Co.Sh],this.CNt),this.sA.fn(lW,this.Ds),await this.$z.gn(),this.Dl.gn(),this.CB.fn("wW",this.xNt),this.CB.fn("pW",this.ONt),this.sA.fn(ut.ha,this.jNt),this.sA.fn([Co.Wg,Co.Vg],this.Ds),this.sA.nP=void 0,this.sA.t5=void 0}w_(){return this.sA.ya}get xf(){return!1}M_(){return!1}T_(){}N_(){}D_(){}S_(){this.bMt(!0)}get cA(){var t;const i=null==(t=this.nvt)?void 0:t.Yut;if(i&&i.Rg===bo.Fx&&i.zAt)return i.Fut().getTime()/1e3-i.zAt.getTime()/1e3-this.Mf}constructor(t,i,e,s,n,r,h){super(),this.zMt=void 0,this.XMt=void 0,this.T2=!1,this.INt=NaN,this.xz=void 0,this.Oz=void 0,this.a2=!1,this.ZMt=void 0,this.h2=void 0,this.LNt=!1,this.ENt=0,this.bNt=0,this.aTt=!1,this.TI=new er,this.jMt=new Rs,this.TNt=!1,this.nvt=void 0,this.CTt=void 0,this.$pt=!0,this.sTt=!0,this.tNt=void 0,this.Uo=ce.MB(),this.zz=pt.PP,this.mNt=void 0,this.iO=!0,this.bc=void 0,this.dNt=void 0,this.nwt=void 0,this.Fgt=[],this.NB=!1,this.LMt=new er,this.OMt=Promise.resolve(),this.B2=new er,this.R2=Promise.resolve(),this.ETt=!1,this.kMt=new er,this.CMt=Promise.resolve(),this.YMt=void 0,this.Igt=void 0,this.tTt=0,this.iTt=0,this.eTt=0,this.Qz=new Qu,this.VTt=void 0,this.yMt={dT:0,lT:0,fT:0},this.Pz=void 0,this.bz=void 0,this.MTt=()=>{this.bMt()},this.wc=()=>{this.Co(new Dr(this.Mf,this.vf))},this.X4=t=>{this.Co(new NV(this.Mf,t.Tb,t.jb))},this.ATt=t=>{this.tTt+=t.gT,this.Co(t)},this.vTt=t=>{const i=t.segments.filter((t=>t.pat));t.track===f.vm?this.iTt=i.length:t.track===f.Am&&(this.eTt=i.length)},this.B3=()=>{const t=this.ct;S(t)||t===this.INt||(this.INt=t,this.Co(new os(this.INt)))},this.CNt=()=>{this.EMt(),this.$Tt()},this.j3=t=>{this.Sf&&this.Co(t)},this._Nt=t=>{this.Ds(t),this.aTt||(this.aTt=!0,this.kNt.zNt())},this.fNt=()=>{this.nvt.Yut.fn(Co.cw,this.fNt),this.Co(new rk)},this.pTt=t=>{this.yP(t.errorObject),this.Co(t)},this.mTt=t=>{this.yP(t.errorObject)},this.Twt=t=>{Mi(t)||this.yP(new $i(td.MEDIA_DECODE_ERROR,t.message,t))},this.EMt=()=>{if(!this.Ff)if(this.KMt())if(this.$Mt()){const t=this.nvt.Yut.iyt;this.Dm(t,!0)}else;else{const t=this.nvt.Yut.iyt;this.Dm(t,!0)}},this.sNt=t=>{this.LNt=this.e_,this.Co(t)},this.hNt=t=>{const i=this.LNt,e=this.e_;this.LNt=e,i&&!e&&this.Co(t)},this.yTt=()=>{const t=this.a_,i=this.r_;this.ENt===t&&this.bNt===i||(this.ENt=t,this.bNt=i,this.Co(new tc))},this.HTt=t=>{const i=t.Lt;i.jg===L.Jn?(this.BTt(i),this.UTt=i):i===this.UTt&&i.jg===L.Ch&&(this.UTt=void 0,this.QTt())},this.eNt=()=>{this.a2||this.tNt&&(this.tNt.Qb(),this.tNt=void 0)},this.KTt=t=>{this.a2||this.tNt&&(this.tNt.Yb(t),this.tNt=void 0)},this.gNt=()=>{this.vNt().catch(this.Twt)},this.jNt=t=>{this.yP(se(t.lt))},this.xNt=()=>{this.AMt()},this.ONt=()=>{this.vMt()},this.mI=t,this.cot=new cW(n),this.sA=r,this.DMt=h,this.CB=e,this.CB.yn("wW",this.xNt),this.CB.yn("pW",this.ONt),this.Rz=s,this.Lut=i.retryConfiguration,this.oT=new ta,this.uT=new ta,this.qz=new yN(t),this.sA.yn(Co.Xg,this.B3),this.sA.yn(Zh.Kg,this.X4),this.sA.yn(Co.Jg,this.j3),this.sA.yn(Co.yw,this.sNt),this.sA.yn(Co.pw,this.hNt),this.sA.yn(Co.mw,this.yTt),this.sA.yn(Co.Iw,this.wc),this.sA.yn([Co.jh,Co.Sh],this.CNt),this.sA.yn(lW,this.Ds),this.sA.yn(ut.ha,this.jNt),this.sA.nP=this.qz,this.sA.t5=this,this.sA.yn([Co.Wg,Co.Vg],this.Ds),this.kNt=new _W(this,this.sA),this.iP=new Gu(this.kNt,!0),this.iP.yn(Zt.Bw,this.EMt),this.iP.yn(Wn,this.Ds),this.WTt=new lc,this.WTt.yn(na.ra,this.HTt),this.YTt=new lc,this.AI=this.PNt(),this.wNt=new FV(this.AI),this.ANt=new iW(this.AI),this.$z=new Tu(this.sA,this.mI),this.Dl=new zs([this.WTt,this.wNt.Z,this.ANt.Z,this.$z.Z])}},_W=class extends X{get Jf(){return this.Qo.Jf}zNt(){this.Co(new Bn(this.Mf,this.Jf))}constructor(t,i){super(i),this.Qo=t}};function gW(t,i){const e=t.filter((t=>"urn:mpeg:dash:role:2011"===t.lst)).map((t=>t.LM)).filter(Dd);return i||ae(e,"main")?ae(e,"caption")?"captions":ae(e,"subtitle")?"subtitles":ae(e,"dub")?"translation":"main":ae(e,"sign")?"sign":ae(e,"description")?"descriptions":ae(e,"commentary")?"commentary":"alternative"}function wW(t,i){var e;const s=Po(t.Jwt,(t=>"urn:mpeg:dash:adaptation-set-switching:2016"===t.lst));var n;const r=null!=(n=null==s||null==(e=s.LM)?void 0:e.split(","))?n:[],h=[];for(const t of r){const e=Number(t),s=Po(i,(t=>t.o===e));s&&h.push(s)}return h}var Xo=class extends fW{A_(){if(ZR(this.sA))return this.sA.A_()}get fTt(){return ZR(this.sA)?this.sA.r_:0}get gTt(){return ZR(this.sA)?this.sA.a_:0}async gn(){var t;await super.gn(),null==(t=this.BNt)||t.gn()}OTt(t){var i,e;return((null!=(e=null==(i=this.bc)?void 0:i.seamlessSwitchStrategy)?e:wi.ZM)!==wi.ZM||!fi.ib)&&super.OTt(t)}PTt(){return!(fi.pE&&fi.ME<3)&&super.PTt()}PNt(){return new $R(this,new Bx)}lNt(t){return KR(t)}constructor(t,i,e,s,n,r,h){super(t,i,e,s,n,r,new JR(h)),this.Ast=h,fi.QE&&(this.BNt=new oU(this))}},AW=class extends Xo{async gn(){await super.gn(),await this.hP.rP(this.sA)}constructor(t,i,e,s,n,r,h,o){const a=new Xc(r);super(t,i,e,s,n,a.MP(h),o),this.hP=a}},vW=class extends Xe{get RNt(){return this.wit.RNt}Af(){return super.Af().Nm(this.RNt)}Yst(){return super.Yst().Nm(this.RNt)}oJ(t,i,e){const s=this.RNt;return super.oJ(t,{Z8:i.Z8-s,ct:i.ct,jD:i.jD-s},e)}NJ(t,i){const e=this.RNt;return super.NJ(_.max(0,t-e),_.max(0,i-e))}TT(t,i,e){const s=this.RNt;return super.TT(_.max(0,t-s),_.max(0,i-s),e)}t$(t,i){const e=this.RNt;super.t$(_.max(0,t-e),_.max(0,i-e))}i$(t,i){const e=this.RNt;super.i$(_.max(0,t-e),_.max(0,i-e))}constructor(t,i){super(i),this.wit=t}},mW=class extends qs{get RNt(){return this.wit.RNt}Td(){return super.Td()+this.RNt}W$(t){super.W$(t-this.RNt)}i_(){return super.i_().Nm(this.RNt)}Z$(t,i,e,s){const n=this.RNt;super.Z$(t-n,i-n,e,s)}zst(t){return new vW(this,t)}constructor(t,i){super(i),this.Ost(i),this.wit=t}},pW=class extends nU{get vst(){return this.sA}get RNt(){return this.UNt}set RNt(t){this.UNt=t}Af(){return super.Af().Nm(this.UNt)}mf(){return yW(super.mf(),this.UNt)}Tf(){return super.Tf()+this.UNt}Td(){return super.Td()+this.UNt}qf(){return super.qf().Nm(this.UNt)}i_(){return super.i_().Nm(this.UNt)}Dm(t,i,e){const s=_.max(0,t-this.UNt);super.Dm(s,i,e)}kz(t){super.kz(yW(t,-this.UNt))}n_(){return this.Dl}wI(t,i,e,s,n,r,h,o){return this.AI.wI(t,i,e,s,n,r,h,o)}NI(t){this.AI.NI(t)}tP(){this.AI.tr(),super.tP()}Zz(){return!1}Jz(t,i,e,s,n){throw new g("Not supported")}Qd(){return this.S8.gn(),this.D8.gn(),this.AI.gn(),this.Dl.gn(),super.Qd()}Lst(t){return new mW(this,t)}bst(t){return new et(t)}I_(t){let i;switch(t.type){case Co.jh:i=new Qn(t.currentTime+this.UNt);break;case Co.Sh:i=new iu(t.currentTime+this.UNt);break;case Zt.Rw:i=new _e(t.currentTime+this.UNt);break;case Co.Iw:i=new Dr(t.currentTime+this.UNt,yW(t.currentProgramDateTime,this.UNt));break;case Co.gw:i=new oa(t.currentTime+this.UNt);break;case Co.yw:i=new lo(t.currentTime+this.UNt);break;case Co.pw:i=new _r(t.currentTime+this.UNt);break;case Co.hw:i=new Pi(t.currentTime+this.UNt);break;case Co.aw:i=new Gh(t.currentTime+this.UNt);break;case Co.Jg:i=new ve(t.currentTime+this.UNt);break;case Co.ww:i=new Kn(t.currentTime+this.UNt,t.playbackRate);break;case Co.Ew:i=new Tc(t.currentTime+this.UNt,t.volume);break;case Co.Xg:i=new os(t.duration+this.UNt);break;case Zt.H_:i=new Bn(t.currentTime+this.UNt,t.readyState);break;default:i=t}super.I_(i)}be(){super.be(),this.D8.be()}ge(){super.ge(),this.D8.ge()}constructor(t){super(t),this.UNt=0,this.AI=new $R(this,new Bx),this.Dl=new zs([this.AI.nt,super.n_()]),this.D8=new zh,this.D8.J3(this.jz.parentElement),this.S8=new Lj(this.D8.we,this.Iu,this.Dl,this.Ol,this.ya)}};function yW(t,i){return t?new Date(t.getTime()+1e3*i):void 0}var MW=class extends rn{MP(t){if(t===f.Am)return new pW(super.MP(t))}async rP(t){const i=t;await i.Qd(),await super.rP(i.vst)}},TW=class extends Xo{async U$(t){await super.U$(t),void 0===this.QNt&&(this.QNt=this.FNt(),this.sA.RNt=this.QNt)}FNt(){if(this.ct===1/0){const t=this.JMt;if(t.U>0)return _.max(0,t.Cn(0)-300)}return 0}U2(t,i,e,s,n,r,h,o){return void 0===r&&(r=!1),void 0===h&&(h=TV.Lyt),void 0===o&&(o=!1),o||(o=this.ct===1/0&&fi.pE&&fi.ME<3&&t<=this.Mf),super.U2(t,i,e,s,n,r,h,o)}async tr(){await super.tr(),this.QNt=void 0,this.sA.RNt=0}async gn(){await super.gn(),await this.sA.Qd(),await this.hP.rP(this.sA)}static YC(t){var i;return(!t||"google-dai"!==(null==t||null==(i=t.ssai)?void 0:i.integration))&&(fi.pE&&fi.ME<4)}constructor(t,i,e,s,n,r,h,o){const a=new MW(new Xc(r));super(t,i,e,s,n,a.MP(h),o),this.hP=a,this.QNt=void 0}},NW=class extends Bu{get vst(){return this.sA}get r_(){return this.sA.r_}get a_(){return this.sA.a_}constructor(t){super(t)}},DW=class extends Xe{Ust(){return this.YNt?this.bW:super.Ust()}Qst(t){this.YNt?this.bW=t:super.Qst(t)}Af(){return this.YNt?this.GNt:super.Af()}IC(){return this.YNt?this.sx:super.IC()}Yst(){return this.YNt?this.VNt:super.Yst()}Gst(){return this.YNt?this.SW:super.Gst()}Vst(t){this.YNt?this.SW=t:super.Vst(t)}oJ(t,i,e){return this.aJ((e=>this.WNt(t,i,e)),e)}WNt(t,i,e){return super.oJ(t,i,e)}e$(){return this.aJ((()=>this.HNt()))}HNt(){return super.e$()}cJ(t,i,e){return this.aJ((e=>this.qNt(t,i,e)),e)}qNt(t,i,e){return super.cJ(t,i,e)}Dq(){return this.YNt?this.H8:super.Dq()}HJ(){this.YNt?this.XNt=!0:super.HJ()}t$(t,i){this.CJ(),this.YNt?(this.VNt=this.VNt.rB(new ce([t,i])),this.ZNt.push({Rg:"iat",RT:t,UT:i})):this.KNt(t,i)}KNt(t,i){super.t$(t,i)}NJ(t,i){return this.aJ((()=>this.JNt(t,i)))}JNt(t,i){return super.NJ(t,i)}i$(t,i){this.CJ(),this.YNt?(this.VNt=this.VNt.oB(new ce([t,i])),this.ZNt.push({Rg:"TT",RT:t,UT:i})):this.$Nt(t,i)}$Nt(t,i){super.i$(t,i)}TT(t,i,e){return this.aJ((e=>this.tDt(t,i,e)),e)}tDt(t,i,e){return super.TT(t,i,e)}cq(t){return this.aJ((()=>this.iDt(t)))}iDt(t){return super.cq(t)}async aJ(t,i){this.CJ(),this.YNt&&(await ji(this.YNt.Vb,i),this.CJ()),fo(i);try{this.BJ=t(i),await this.BJ}finally{this.BJ=void 0}}CJ(){if(this.BJ)throw new g("Internal error")}async eDt(){if(this.YNt)throw new b("Already locked");this.YNt=new Rs,this.sDt(),this.BJ&&(await this.BJ.catch(qo),this.sDt())}nDt(){var t;null==(t=this.YNt)||t.Qb(),this.YNt=void 0,this.rDt()}sDt(){this.sx=super.IC(),this.bW=super.Ust(),this.SW=super.Gst(),this.GNt=super.Af(),this.VNt=super.Yst(),this.H8=super.Dq(),this.XNt=!1}rDt(){this.CJ(),super.Qst(this.bW),super.Vst(this.SW);const t=this.ZNt.slice();No(this.ZNt);for(const i of t)"iat"===i.Rg?this.KNt(i.RT,i.UT):this.$Nt(i.RT,i.UT);this.XNt&&super.HJ(),this.GNt.fB(super.Af())||this.Co(new Yi(Je.KH))}Qd(){var t;null==(t=this.YNt)||t.Xd(),this.YNt=void 0,super.Qd()}constructor(t){super(t),this.BJ=void 0,this.YNt=void 0,this.bW=0,this.GNt=ce.MB(),this.VNt=ce.MB(),this.ZNt=[],this.H8=!1,this.XNt=!1,this.SW=0,this.sx=t.wd}},SW=class extends DW{Af(){var t,i;return super.Af().rB(null!=(i=null==(t=this.hDt)?void 0:t.wf)?i:ce.MB())}Yst(){var t,i;return super.Yst().rB(null!=(i=null==(t=this.hDt)?void 0:t.KJ)?i:ce.MB())}Qst(t){super.Qst(t),this.hDt&&(this.hDt.yW=t)}Vst(t){super.Vst(t),this.hDt&&(this.hDt.AW=t)}KNt(t,i){super.KNt(t,i),this.hDt&&this.hDt.t$(t,i)}$Nt(t,i){super.$Nt(t,i),this.hDt&&this.hDt.i$(t,i)}async tDt(t,i,e){fo(e);const s=[];s.push(super.tDt(t,i,e)),this.hDt&&s.push(this.hDt.TT(t,i,e)),await Promise.all(s)}aq(t){return!!super.aq(t)||this.wit.oDt(t)}iDt(t){return super.aq(t)?super.iDt(t):this.wit.aDt(t)}uDt(t){var i,e;null==(i=this.hDt)||i.fn(qn,this.Wst),this.hDt=t,null==(e=this.hDt)||e.yn(qn,this.Wst)}constructor(t,i){super(i),this.hDt=void 0,this.wit=t}},IW=class extends qs{aq(t){const i=void 0!==this.Y$,e=void 0!==this.G$,s=t.K$.some((t=>D(t.Fz,"audio"))),n=t.K$.some((t=>D(t.Fz,"video")));return i===s&&e===n&&(!!super.aq(t)||(!(!this.cDt||!this.cDt.aq(t))||this.wit.dDt(t)))}async cq(t){return super.aq(t)?await super.cq(t):this.cDt&&this.cDt.aq(t)?(this.lDt(),await this.cq(t)):(await this.wit.fDt(t),await this.cq(t))}oDt(t){return this.aq(this._Dt(t))}aDt(t){return this.cq(this._Dt(t))}_Dt(t){const i=this.wd,e=i.K$.map((i=>D(t.Fz,"audio")&&D(i.Fz,"audio")||D(t.Fz,"video")&&D(i.Fz,"video")?t:i));return Tt({},i,{K$:e})}Z$(t,i,e,s){super.Z$(t,i,e,s),this.cDt&&this.cDt.Z$(t,i,e,s)}gDt(){return!this.wDt&&this.ADt}Td(){return void 0!==this.vDt?this.vDt:this.gDt()?this.UL:super.Td()}W$(t){this.UL=t,this.vDt=void 0,this.gDt()||super.W$(t)}xst(){return!this.gDt()&&super.xst()}HJ(){this.vDt=_.max(EW(this.Pz.B$),EW(this.Pz.R$)),this.gDt()||super.HJ()}PJ(){this.vDt=void 0,this.gDt()||super.PJ()}zst(t){return new SW(this,t)}mDt(){this.wDt=!this.wDt}lDt(){const t=this.Pz,i=this.cDt;i&&(this.wDt=!this.wDt,this.Ost(i),this.pDt(t),this.gDt()&&this.yDt())}pDt(t){var i,e;this.cDt=t,null==(i=this.Y$)||i.uDt(null==t?void 0:t.B$),null==(e=this.G$)||e.uDt(null==t?void 0:t.R$)}MDt(t){const i=this.Pz,e=this.cDt;if(!e)return;const s=this.wDt,n=s?i:e,r=(s?e:i).wf.dA(t);if(!r)return;const h=fU(n.wf,this.Yst()).dA(r.jn(0),al);return!h||r.jn(0)+al>=h.jn(0)?void 0:_.max(r.jn(0),h.Cn(0))}TDt(t,i){if(this.ADt)return Promise.resolve();const e=this.wDt?this.cDt:this.Pz;return e?(this.ADt=!0,this.NDt((i=>{if(fo(i),this.ADt)return async function(t,i,e){fo(e);const s=[];t.B$&&s.push(dC(t.B$,i,e));t.R$&&s.push(dC(t.R$,i,e));await Promise.all(s),t.HJ()}(e,t,i)}),i)):Promise.resolve()}yDt(){if(!this.ADt)return;const t=this.wDt?this.cDt:this.Pz;if(!t)return;var i;this.ADt=!1;const e=null!=(i=this.vDt)?i:this.UL;t.ct<e&&t.W$(e),t.PJ()}DDt(t){var i;const e=null!=(i=this.vDt)?i:this.UL;t.W$(e),this.wDt?this.Ost(t):this.pDt(t)}Yst(){var t,i,e;const s=null!=(e=null==(t=this.Y$)?void 0:t.KJ)?e:ce.MB();var n;const r=null!=(n=null==(i=this.G$)?void 0:i.KJ)?n:ce.MB();return s.rB(r)}async NDt(t,i){const e=[];this.Y$&&e.push(this.Y$.eDt()),this.G$&&e.push(this.G$.eDt());try{await Promise.all(e),await t(i)}finally{this.Y$&&this.Y$.nDt(),this.G$&&this.G$.nDt()}}Bst(t){t.type===Je.KH&&this.wit.FJ(),super.Bst(t)}constructor(t,i){super(i),this.cDt=void 0,this.UL=NaN,this.wDt=!1,this.ADt=!1,this.vDt=void 0,this.Ost(i),this.wit=t}};function EW(t){if(!t)return 0;const i=t.wf;return i.U>0?i.jn(i.U-1):0}function Qi(t){return t.wd.Rg===I.Fx}var yc,bW=class extends NW{get SDt(){return this.IDt}Af(){return super.Af().rB(this.IDt.wf)}Td(){if(!this.EDt){const t=this.Pz;if(t&&Qi(t))return t.ct}return super.Td()}pst(){return!!super.pst()&&!(!this.EDt&&!this.Dq())}yst(){return!!super.yst()&&!(!this.EDt&&super.pst()&&!this.Dq())}Dq(){const t=this.Pz;return!(!t||!Qi(t))&&t.Dq}qf(){return this.Uo.rB(this.sA.Hf)}i_(){return super.i_().rB(this.IDt.t_)}$f(){return super.$f()}mst(){var t;return null!=(t=super.mst())?t:this.IDt.Bz}p_(){return this.SB=!1,super.p_()}m_(){this.SB=!0,super.m_()}H3(){this.EDt=!0,super.H3(),this.IDt.H3()}q3(){this.EDt=!1,super.q3(),this.IDt.H3()}Tf(){var t;return null!=(t=this.h2)?t:super.Tf()}s_(){return void 0!==this.h2||super.s_()}Dm(t,i,e){void 0===i&&(i=!1),void 0===e&&(e=!1),this.bDt.Xd(),this.B2.Xd(),this.B2=new er,this.LDt=this.U2(t,i,e,this.LDt,this.B2.Hd).catch(qo)}async U2(t,i,e,s,n){this.h2=t,this.Q2=t,this.Co(new lo(t)),s&&await s.catch(qo),fo(n),this.Pz&&Qi(this.Pz)&&this.Pz.yDt(),this.h2=void 0,super.Dm(t,i,e),this.IDt.Dm(t,i,e),this.kDt()}kz(t){const i=this.Bz;if(!i||S(i.getTime()))return;const e=(t.getTime()-i.getTime())/1e3;this.Dm(e)}K3(){super.K3(),this.IDt.K3()}get r_(){return this.CDt.r_}get a_(){return this.CDt.a_}be(){this.VP&&(this.VP=!1,this.CDt.be())}ge(){this.VP||(this.VP=!0,this.CDt.ge())}async xDt(){var t;this.h2=void 0,this.Q2=NaN,this.Uo=ce.MB(),null==(t=this.ODt)||t.Xd(),this.bDt.Xd(),this.B2.Xd(),this.LDt&&(await this.LDt.catch(qo),this.LDt=void 0)}Sst(t){super.Sst(t),this.IDt.nP=t}Ist(t){super.Ist(t),this.IDt.t5=t}n_(){return this.Dl}wI(t,i,e,s,n,r,h,o){return this.AI.wI(t,i,e,s,n,r,h,o)}NI(t){this.AI.NI(t)}tP(){this.AI.tr(),super.tP()}async $n(t){const i=await super.$n(t);return Qi(i)&&this.kDt(),i}async tr(){await this.xDt(),await super.tr(),await this.IDt.tr()}async Qd(){await this.xDt(),this.AI.gn(),this.Dl.gn(),await super.Qd()}Lst(t){return new IW(this,t)}bst(t){return new et(t)}kDt(){this.bDt.Xd(),this.bDt=new er,this.LDt=this.jDt(this.LDt,this.bDt.Hd).catch(qo)}async jDt(t,i){if(t&&await t.catch(qo),this.Pz&&Qi(this.Pz))for(;;){let t;for(fo(i),this.zDt()&&this.mDt(),this.Pz.yDt(),fo(i);fo(i),!this.zDt();){if(t=this.Pz.MDt(this.Tf()),void 0!==t){0,this.PDt(),await this.Pz.TDt(t,i),fo(i),this.IDt.Dm(t);break}await Ph((t=>Promise.race([this.df(Co.Iw,t),this.BDt(t)])),i)}for(fo(i);!this.zDt();)await this.sA.df([Co.Iw,Co.Jg,Zt.H_],i)}}zDt(){const t=this.Pz;if(void 0===t||!Qi(t))return!1;const i=this.Tf(),e=this.sA.wf;if(!this.sA.Sf&&e.gr(i))return!1;return!!fU(this.IDt.wf,t.Yst()).dB(i,i+al)}mDt(){if(this.RDt)return;this.RDt=!0,this.Uo=this.qf();const t=yC(this),i=this.s_(),e=this.$f(),s=this.sA,n=this.IDt,r=this.Pz;r.yDt(),r.mDt(),MC(n,t),this.Cst(n),this.IDt=s,s.m_(),s.Pf=!0,this.RDt=!1;const h=this.s_();i!==h&&(h?this.Co(new lo(this.Mf)):this.Co(new _r(this.Mf)));const o=this.$f();e!==o&&this.Co(new Bn(this.Mf,o)),h||this.PDt()}PDt(){const t=this.sA,i=this.CDt;if(i===t)return;const e=this.a_,s=this.r_;this.CDt=t,this.VP&&(i.be(),t.ge());const n=this.a_,r=this.r_;n>0&&r>0&&(e!==n||s!==r)&&this.Co(new tc)}dDt(t){return void 0!==this.IDt.Eq([t])}async fDt(t){this.PDt();const i=this.Pz,e=this.IDt;await e.tr();const s=await e.$n(t);i.DDt(s)}BDt(t){return this.ODt=new Rs,ji(this.ODt.Vb,t)}FJ(){var t;null==(t=this.ODt)||t.Qb()}I_(t){t.type===Co.yw&&this.Q2===t.currentTime||(t.type===Co.pw&&(this.Q2=NaN,this.PDt()),t.type!==Zt.H_&&t.type!==Co.Sh&&t.type!==Co.Jg||this.RDt||!this.zDt()?(t.type!==Co.Jg||this.Sf)&&super.I_(t):this.kDt())}constructor(t,i,e){super(t),this.EDt=!1,this.h2=void 0,this.Q2=NaN,this.Uo=ce.MB(),this.SB=!0,this.RDt=!1,this.VP=!0,this.ODt=void 0,this.LDt=void 0,this.bDt=new er,this.B2=new er,this.IDt=i,this.CDt=t,this.sA.ge(),this.IDt.be(),this.AI=new $R(this,e),this.Dl=new zs([this.AI.nt,super.n_()])}},LW=class extends bW{get vst(){return this.sA}get SDt(){return this.IDt}be(){super.be(),this.D8.be()}ge(){super.ge(),this.D8.ge()}get jz(){return this.sA.jz}get m0(){return this.sA.m0}get g_(){return this.sA.g_}set g_(t){this.sA.g_=t}J3(t){this.sA.J3(t),this.IDt.J3(t)}t2(){this.sA.t2()}D_(){this.sA.D_(),this.IDt.D_()}A_(){return this.sA.A_()}Cst(t){const i=this.w_(),e=this.A_();super.Cst(t),this.w_()!==i&&this.Co(new Mu),this.A_()!==e&&this.Co(new Ci)}Qd(){return this.S8.gn(),this.D8.gn(),super.Qd()}constructor(t,i){super(t,i,new Bx),this.D8=new zh,this.D8.J3(t.jz.parentElement),this.S8=new Lj(this.D8.we,this.Iu,this.nt,this.Ol,this.ya)}},kW=class extends rn{MP(t){if(t===f.Am){const i=super.MP(t),e=super.MP(t);return new LW(i,e)}return super.MP(t)}async rP(t){t instanceof LW?(await t.Qd(),await super.rP(t.vst),await super.rP(t.SDt)):await super.rP(t)}},CW=class extends Xo{async gn(){await super.gn(),await this.hP.rP(this.sA)}static YC(t){var i;return!fi.Qs&&!fi.KE&&!(t&&"google-dai"===(null==(i=t.ssai)?void 0:i.integration))}constructor(t,i,e,s,n,r,h,o){const a=new Xc(new kW(r));super(t,i,e,s,n,a.MP(h),o),this.hP=a}},xW=class extends qs{zst(t){return new DW(t)}IC(){return this.UDt?this.sx:super.IC()}Af(){return this.UDt?this.GNt:super.Af()}Td(){return this.UDt?this.UL:super.Td()}W$(t){this.UDt?(this.UL=t,this.QDt=!0):super.W$(t)}i_(){return this.UDt?this.FDt?this.FDt.h$():this.X$:super.i_()}Z$(t,i,e,s){this.UDt?this.FDt=new hC(t,i,e,s):super.Z$(t,i,e,s)}xst(){return this.UDt?this.H8&&!1!==this.XNt:super.xst()}HJ(){this.UDt?this.XNt=!0:super.HJ()}PJ(){this.UDt?this.XNt=!1:super.PJ()}aq(t){return!this.UDt&&super.aq(t)}cq(t){return this.UDt?Promise.reject(new b("Not supported")):super.cq(t)}async eDt(){if(this.UDt)throw new b("Already locked");this.UDt=!0,this.sDt();const t=[];this.Y$&&t.push(this.Y$.eDt()),this.G$&&t.push(this.G$.eDt()),await Promise.all(t)}nDt(){this.UDt=!1,this.Y$&&this.Y$.nDt(),this.G$&&this.G$.nDt(),this.rDt()}sDt(){this.sx=super.IC(),this.GNt=super.Af(),this.UL=super.Td(),this.X$=super.i_(),this.QDt=!1,this.XNt=void 0,this.FDt=void 0}rDt(){if(this.QDt&&(super.W$(this.UL),this.QDt=!1),void 0!==this.FDt){const t=this.FDt;super.Z$(t.Cn,t.jn,t.o$,t.a$),this.FDt=void 0}void 0!==this.XNt&&(this.XNt?super.HJ():super.PJ(),this.XNt=void 0)}constructor(t){super(t),this.UDt=!1,this.GNt=ce.MB(),this.UL=0,this.QDt=!1,this.H8=!1,this.XNt=void 0,this.X$=ce.MB(),this.FDt=void 0,this.Ost(t),this.sx=t.wd}},OW=class extends nU{get vst(){return this.sA}p_(){return void 0!==this.Pz&&Qi(this.Pz)&&this.Sf&&this.Dm(0),super.p_()}Dm(t,i,e){void 0!==this.Pz&&Qi(this.Pz)&&this.Sf&&t<this.ct&&this.YDt(),super.Dm(t,i,e)}H3(){this.GDt=!0,super.H3()}q3(){this.GDt=!1,this.VDt()||super.q3()}VDt(){return this.GDt||this.WDt}HDt(){this.WDt||(this.WDt=!0,super.H3())}qDt(){this.WDt&&(this.WDt=!1,this.VDt()||super.q3())}$n(t){this.XDt.Xd();const i=this.dit(t,this.ZDt);return this.KDt=i,i}async dit(t,i){return i&&await i.catch(qo),this.qDt(),await super.$n(t)}Lst(t){return new xW(t)}bst(t){return new et(t)}tr(){this.XDt.Xd();const t=this.SNt(this.ZDt);return this.KDt=t,t}async SNt(t){return t&&await t.catch(qo),this.qDt(),await super.tr()}YDt(){this.HDt(),this.XDt.Xd(),this.XDt=new er,this.ZDt=dn(this.JDt(this.KDt,this.ZDt,this.XDt.Hd),this.XDt).catch(Ah)}async JDt(t,i,e){t&&await t.catch(qo),i&&await i.catch(qo),fo(e);const s=this.Pz;if(!s||!Qi(s))return;const n=s.wd;await s.eDt(),await this.sA.tr();const r=await this.sA.$n(n);r.W$(s.ct),s.Ost(r),s.nDt(),this.qDt()}async Qd(){this.XDt.Xd(),this.ZDt&&(await this.ZDt.catch(qo),this.ZDt=void 0),this.VDt()&&super.q3(),await super.Qd()}constructor(...t){super(...t),this.GDt=!1,this.WDt=!1,this.KDt=void 0,this.ZDt=void 0,this.XDt=new er}},jW=class extends rn{MP(t){if(t===f.Am)return new OW(super.MP(t))}async rP(t){const i=t;await i.Qd(),await super.rP(i.vst)}static YC(){return fi.$E}};ON(new class extends FR{JA(t,i,e,s,n,r,h,o){const a=new zi(Al.yb.Het,Al.yb.Wet,Al.yb.Vet,Al.yb.Xet);let u;u=TW.YC(o)?TW:CW.YC(o)?CW:AW;let c=i;return jW.YC()&&(c=new jW(c)),new u(e,s,n,r,a,c,f.Am,t)}NP(){return!0}constructor(...t){super(...t),this.DP=W.iz}}),function(t){t.$Dt="currentbufferingrenditionchange",t.tSt="iSt",t.eSt="sSt",t.nSt="rSt"}(yc||(yc={}));var zW,PW,rc=class{constructor(t,i){var e,s;this.Mg=Jw(),this.hSt=i,this.Rg=t.Rg,this.oSt=t.oSt,this.aSt=t.aSt,this.uSt=t.uSt,this.l=t.l,this.gs=t.gs,this.cSt=t.cSt,this.dSt=t.dSt,this.lSt=void 0===t.$At,this.fSt=null!=(s=null==(e=t.fSt)?void 0:e.split(","))?s:[]}};function xc(t,i){return t.Rg===i.Rg&&(t.l===i.l||!(!t.oSt||!i.oSt))}function BW(t,i){return void 0!==t&&void 0!==i&&RW(t,i)}function RW(t,i){return t.hSt===i.hSt}function UW(t,i){return RW(t,i)&&t.cSt===i.cSt}function QW(t,i){for(const e of t)if(UW(e,i))return!0;return!1}!function(t){t._St="alternative",t.gSt="main",t.wSt="commentary",t.ASt="",t.AS="descriptions",t.vSt="main-desc",t.mSt="translation"}(zW||(zW={})),function(t){t._St="alternative",t.gSt="main",t.wSt="commentary",t.ASt="",t.wS="captions",t.Eg="sign",t.pm="subtitles"}(PW||(PW={}));var FW,YW=class extends Bo{get Tg(){return this.pSt}get Rt(){const t=this.ySt();if(!t)return!1;for(const i of this.Ng.og)if(i.MSt===t)return!0;return!1}set Rt(t){if(t!==this.Rt)if(t){let t=this.Ng.cg(0).MSt;const i=this.Qo.TSt;for(const e of this.Ng.og)if(e.NSt===i){t=e.MSt;break}this.DSt(t)}else this.DSt(void 0)}get yg(){if(!this.Rt)return;const t=this.Qo.SSt;for(const i of this.Ng.og)if(QW(t,i.MSt))return i}get va(){return this.Xa||(this.Xa=Bs(this)),this.Xa}get o(){return this.ET.toString()}get Mg(){return this.ET}get kh(){return this.bT}set kh(t){t!==this.bT&&(this.bT=t,this.Co(new gh(this)))}get gs(){return this.QL}get jg(){return this.Rt?"enabled":"disabled"}get Dg(){return this.yat}set Dg(t){let e=[];if(t){e=t.filter((t=>{const e=this.yg?CQ(this.yg):void 0;return i.Ys.qtt(e,CQ(t))})).filter((i=>this.Ng.NT(t)&&i.det))}else e=this.Ng.og.filter((t=>t.det));if(0!==e.length){if(!(t===this.yat||this.yat&&yl(this.yat,e))){if(this.yat=t?e:void 0,this.Qo.ISt(e.map((t=>t.NSt))),1===e.length){const t=e[0].NSt,i=this.F0===f.Am,s=this.CB.OW;Ys(this.Qo.ESt(t,{bSt:!0,LSt:s&&i,kSt:s&&!i}))}this.Co(new ju(e,this))}}else this.Co(new kQ)}kT(t){this.Rt=t}gn(){this.Vo(),this.Qo.fn(yc.$Dt,this.CSt),this.Qo.fn(yc.tSt,this.xSt);for(const t of this.Ng.og)t.gn();this.Ng.tr()}constructor(t,i,e,s,n){var r;super(),this.F0=t,this.Qo=i,this.CB=e,this.fh=s,this.Ng=n,this.yat=void 0,this.OSt=void 0,this.jSt=()=>this.Co(new gh(this)),this.CSt=()=>{const t=this.yg;t&&this.OSt!==t&&(this.OSt=t,this.Co(new sY(t)))},this.xSt=()=>{const t=this.Rt;this.zSt!==t&&(this.zSt=t,this.fh.Co(new Ji(this)),this.Co(new Ji(this)))},this.OSt=this.yg,this.zSt=this.Rt;const h=n.cg(0);var o,a;this.bT=null!=(o=null==h?void 0:h.MSt.l)?o:"",this.QL=null!=(a=null==h?void 0:h.MSt.gs)?a:"",this.pSt=null==h||null==(r=h.MSt)?void 0:r.fSt.map(XW).filter(Dd),this.ET=Xw(),this.Qo.yn(yc.$Dt,this.CSt),this.Qo.yn(yc.tSt,this.xSt);for(let t=0;t<this.Ng.U;t++){this.Ng.cg(t).yn("update",this.jSt)}}},GW=class extends YW{get zt(){return zW.gSt}ySt(){return this.Qo.PSt}DSt(t){Ys(this.Qo.BSt(t))}constructor(t,i,e,s){super(f.vm,t,i,e,s)}},VW=class extends YW{get zt(){return PW.gSt}ySt(){return this.Qo.RSt}DSt(t){Ys(this.Qo.USt(t))}constructor(t,i,e,s){super(f.Am,t,i,e,s)}},WW=class extends Bo{get o(){return String(this.NSt.o)}get Mg(){return this.NSt.o}get cz(){return this.NSt.cz}get XAt(){return this.NSt.XAt}get kh(){var t;return null!=(t=this.bT)?t:this.MSt.l}set kh(t){this.kh!==t&&(this.bT=t,this.Co(new rG(this.va)))}get $At(){return this.MSt.hSt.QSt()}get ZAt(){return this.NSt.ZAt}jS(){}gn(){this.Vo()}constructor(t,i){super(),this.NSt=t,this.MSt=i,this.bT="",this.det=!0}},HW=class extends WW{get Zwt(){return 0}get cst(){var t;return(null==(t=this.NSt.cst)?void 0:t.FSt)||""}get va(){return this.Xa||(this.Xa=this.fa()),this.Xa}fa(){return nG(this)}constructor(t,i){super(t,i),this.Xa=void 0}},qW=class extends WW{get cst(){var t;return(null==(t=this.NSt.cst)?void 0:t.YSt)||""}get KAt(){return this.GSt}set KAt(t){this.GSt!==t&&(this.GSt=t,this.Co(new rG(this.va)))}get Ict(){var t,i;return null!=(i=null!=(t=this.VSt)?t:this.NSt.Ict)?i:0}set Ict(t){this.Ict!==t&&(this.VSt=t,this.Co(new rG(this.va)))}get Ti(){var t,i;return null!=(i=null==(t=this.NSt.WSt)?void 0:t.Ti)?i:0}get ji(){var t,i;return null!=(i=null==(t=this.NSt.WSt)?void 0:t.ji)?i:0}get va(){return this.Xa||(this.Xa=this.fa()),this.Xa}fa(){return sG(this)}constructor(t,i){super(t,i),this.Xa=void 0,this.GSt=0,this.VSt=void 0}};function XW(t){return"public.accessibility.describes-video"===t?cc.xg:"public.accessibility.transcribes-spoken-dialog"===t?cc.TRANSCRIBES_SPOKEN_DIALOG:"public.accessibility.describes-music-and-sound"===t?cc.DESCRIBES_MUSIC_AND_SOUND:"public.accessibility.easy-to-read"===t?cc.Cg:void 0}!function(t){t.HSt="FATAL",t.ha="ERROR",t.qSt="WARNING",t.XSt="INFO",t.ZSt="DEBUG"}(FW||(FW={}));var Wr=new class{KSt(t){if(!this.Rt())return!1;const i=[];return!(i.length>0)||i.some((i=>i.toLowerCase()===t.toLowerCase()))}JSt(t){for(var e=arguments.length,s=new Array(e>1?e-1:0),n=1;n<e;n++)s[n-1]=arguments[n];this.KSt(t)&&i.tit("DEBUG "+t+" -",...s)}Wp(t){for(var e=arguments.length,s=new Array(e>1?e-1:0),n=1;n<e;n++)s[n-1]=arguments[n];this.KSt(t)&&i.tit("INFO "+t+" -",...s)}$St(t){for(var e=arguments.length,s=new Array(e>1?e-1:0),n=1;n<e;n++)s[n-1]=arguments[n];this.KSt(t)&&i.IA("WARNING "+t+" -",...s)}lt(t){for(var e=arguments.length,s=new Array(e>1?e-1:0),n=1;n<e;n++)s[n-1]=arguments[n];this.KSt(t)&&i.iit("ERROR "+t+" -",...s)}tIt(t){for(var e=arguments.length,s=new Array(e>1?e-1:0),n=1;n<e;n++)s[n-1]=arguments[n];this.KSt(t)&&i.iit("FATAL "+t+" -",...s)}constructor(){this.Rt=()=>!1}},oo="HLSPlaylistParser",hc="Discontinuity",es="Buffering",ZW=class{znt(){var t;const i=null==(t=this.Qo.Tr)?void 0:t.iIt;if(!i||0===i.length)return void Wr.$St("LLHLSTrackConfigurator","The HLSModel contains no variant streams.");var e;const s=null!=(e=Po(i,(t=>0!==t.eIt.length&&0!==t.sIt.length)))?e:i[0],n=i.filter((t=>t!==s));for(const t of s.eIt){const i=new Lt,e=[];i.MT(new HW(s,t)),e.push(t);for(const s of n)for(const n of s.eIt)if(xc(n,t)&&!QW(e,n)){i.MT(new HW(s,n)),e.push(n);break}this.nIt.tt(new GW(this.Qo,this.CB,this.nIt,i))}for(const t of s.sIt){const i=new Lt,e=[];i.MT(new qW(s,t)),e.push(t);for(const s of n)for(const n of s.sIt)if(xc(n,t)&&!QW(e,n)){i.MT(new qW(s,n)),e.push(n);break}this.rIt.tt(new VW(this.Qo,this.CB,this.rIt,i))}}hIt(){this.oIt(this.nIt),this.oIt(this.rIt)}oIt(t){const i=[];for(const e of t.og){const t=[];for(const i of e.Ng.og)ae(i.NSt.aIt,i.MSt)||t.push(i);for(const i of t)e.Ng.TT(i),i.gn();0===e.Ng.U&&i.push(e)}for(const e of i)t.it(e),e.gn()}uIt(t,i){const e=this.cIt(t);void 0!==e&&(e.Ict=i)}dIt(t,i){const e=this.cIt(t);void 0!==e&&(e.KAt=i)}cIt(t){for(const i of this.rIt.og){const e=Po(i.Ng.og,(i=>i.MSt===t));if(void 0!==e)return e}}constructor(t,i,e,s){this.Qo=t,this.CB=i,this.nIt=e,this.rIt=s}},KW=class{get Y8(){const t=1-this.lIt**this.fIt;return this._It/t}Cht(t,i){const e=this.lIt**t,s=i*(1-e)+e*this._It;S(s)||(this._It=s,this.fIt+=t)}cq(t){const i=_.exp(_.log(.5)/t);if(i===this.lIt)return;if(0===this.fIt)return void(this.lIt=i);const e=this.Y8,s=1-i**this.fIt;this._It=e*s,this.lIt=i}constructor(t){this._It=0,this.fIt=0,this.lIt=_.exp(_.log(.5)/t)}},JW=class t{get Y8(){return this.Rht()?_.max(this.gIt.Y8,this.wIt.Y8):this.AIt}Cht(t){const e=i.Jd(),s=t;this.vIt&&void 0!==this.mIt&&e-this.mIt>=this.pIt&&this.tr(),this.yIt+=1,this.gIt.Cht(1,s),this.wIt.Cht(1,s),this.MIt.push(s),this.MIt.length>this.TIt&&this.MIt.shift(),this.mIt=e}Rht(){return void 0!==this.mIt&&i.Jd()-this.mIt<=this.pIt}tr(){this.gIt=new KW(this.NIt),this.wIt=new KW(this.DIt),this.yIt=0,this.MIt=[],this.mIt=void 0}constructor(i=t.SIt,e=t.IIt,s=t.Uht,n=!1){this.yIt=0,this.MIt=[],this.mIt=void 0,this.pIt=6e4,this.TIt=10,this.NIt=i,this.DIt=e,this.AIt=s,this.vIt=n,this.gIt=new KW(i),this.wIt=new KW(e)}};JW.SIt=2,JW.IIt=5,JW.Uht=.1;var $W,tH=class{uW(t){for(const i of this.EIt)i.uW(t)}cW(t){for(const i of this.EIt)i.cW(t)}dW(t,i){for(const e of this.EIt)e.dW(t,i)}lW(t){for(const i of this.EIt)i.lW(t)}constructor(t){this.EIt=t}},iH=class{uW(t){this.bIt=t}cW(t){this.LIt.Cht(t-this.bIt)}dW(t){}lW(t){}constructor(t){this.bIt=0,this.LIt=t}},eH=class{cW(t){this.kIt=t}dW(t,i){this.Yht.Cht(t-this.kIt,i.byteLength),this.kIt=t}lW(t){}uW(t){}constructor(t){this.kIt=0,this.Yht=t}},sH=class{uW(t){}dW(t,e){const s=e.byteLength,n=this.CIt;this.CIt=s;const r=t-this.An;this.An=t,this.xIt.rX(e);const h=!this.xIt.OIt(),o=s>=this.jIt;n!==i.Ys.Vtt&&h&&o&&this.Yht.Cht(r,s)}cW(t){this.An=t}lW(t){}constructor(t,i=0){this.xIt=new nH,this.An=0,this.CIt=0,this.Yht=t,this.jIt=i}},nH=class extends Br{OIt(){return this.zIt}rX(t){this.zIt=!1,super.rX(t)}sX(t,i){this.PIt&&this.PIt!==he.hm||(this.zIt=!0),super.sX(t,i),this.PIt=t}gX(t){return!1}AX(t){}mX(t){}constructor(...t){super(...t),this.PIt=void 0,this.zIt=!1}};($W||($W={})).BIt="sample";var rH=class extends Bo{qj(){if(!this.Rht())return;const t=i.Jd();t-this.RIt>1e3&&(this.RIt=t,xu.yb.qj(this.Y8))}constructor(...t){super(...t),this.RIt=0}},tl=class t extends rH{Cht(t,i){const e=8*i/t;this.gIt.Cht(t,e),this.wIt.Cht(t,e),this.UIt+=i,this.qj(),this.Co(new Yi($W.BIt))}get Y8(){return this.Rht()?_.min(this.gIt.Y8,this.wIt.Y8):this.AIt}Rht(){return this.UIt>=this.QIt}constructor(i=t.SIt,e=t.IIt,s=t.FIt,n=t.Uht){super(),this.UIt=0,this.QIt=s,this.gIt=new KW(i),this.wIt=new KW(e),this.AIt=n}};tl.FIt=128e3,tl.Uht=pN,tl.SIt=.5,tl.IIt=5;var hH=class{get cz(){return this.Yht.Y8}get lz(){return this.YIt.Y8}fz(t){if("segment"!==t.Rg&&"preload-hint"!==t.Rg)return;const i=[new iH(this.YIt)];return"stream"!==t.aI||!function(t){return"segment"===t.Rg&&"initialization-segment"!==t.cI}(t)&&"preload-hint"!==t.Rg?i.push(new eH(this.Yht)):i.push(new sH(this.Yht,1e3)),new tH(i)}GIt(t){this.Yht=new tl(tl.SIt,tl.IIt,1,t)}constructor(t){const i=t.cz>0?t.cz:tl.Uht,e=t.lz>0?t.lz:JW.Uht;this.Yht=new tl(tl.SIt,tl.IIt,1,i),this.YIt=new JW(JW.SIt,JW.IIt,e)}};var oH=class extends Yi{constructor(t){super(yc.nSt),this.lt=t}},aH=class{Eq(t,i){const e={Rg:I.Fx,Yz:[],K$:t.map((t=>({Fz:t}))),u0:i};return Promise.resolve(void 0!==this.uet.Eq([e]))}constructor(t){this.uet=t}},uH=(t,i,e,s,n)=>t.filter((t=>!!ae(s,t)||1.1*t.cz<=e.cz)),cH=(t,i,e,s,n)=>t.filter((t=>{if(ae(s,t))return!0;let r=1/0;for(const i of t.aIt){var h,o;r=_.min(r,null!=(o=null!=(h=i.hSt.VIt)?h:i.hSt.WIt)?o:1/0)}r===1/0&&(r=1);const a=2*e.lz+t.cz*r/e.cz;return t.cz<=i.cz||n.HIt>a})),dH=(t,i,e,s,n)=>yd(t,((t,i)=>i.cz-t.cz)),lH=(t,i,e,s,n)=>t.every((t=>t.ZAt&&!S(t.ZAt)))?yd(t,((t,i)=>i.ZAt-t.ZAt)):t,fH=(t,i,e,s,n)=>0===s.length?t:yd(t,((t,i)=>{const e=ae(s,t)?1:0;return(ae(s,i)?1:0)-e})),_H=(t,i,e,s,n,r)=>t.filter((t=>!t.cst||!i.cst||!(void 0!==i.cst.YSt&&void 0!==t.cst.YSt&&!ot(i.cst.YSt,t.cst.YSt)&&!r.qIt({Fz:'video/mp4; codecs="'+t.cst.YSt+'"'}))&&!(void 0!==i.cst.FSt&&void 0!==t.cst.FSt&&!ot(i.cst.FSt,t.cst.FSt)&&!r.XIt({Fz:'audio/mp4; codecs="'+t.cst.FSt+'"'})))),gH=(t,e,s,n,r)=>{if(!1===r.iut)return t;if(i.Ys.Qtt)return t;const h=i.Ys.Ftt;var o;const a=(null!=(o=null==h?void 0:h.width)?o:r.ji)*lQ;var u;const c=(null!=(u=null==h?void 0:h.height)?u:r.Ti)*lQ;for(let i=0;i<t.length;i++){const e=t[i];if(void 0===e.WSt)return t;const s=e.WSt.Ti,n=e.WSt.ji;if(s<=c&&n<=a)return t.slice(i,t.length)}return[]},wH=(t,e,s,n,r)=>function(t,e){const s=e.iut;if(void 0===s&&!i.Ys.Qs)return t;if(!1===s)return t;for(let i=0;i<t.length;i++){const s=t[i];if(void 0===s.WSt)return t;const n=s.WSt.Ti,r=s.WSt.ji;if(n===e.Ti&&r===e.ji)return t.slice(i,t.length);if(n<e.Ti||r<e.ji)return t.slice(0===i?i:i-1,t.length)}return[]}(t,r);var ke,rt,ea,qe,AH="AbrEvaluator",vH=class{get ZIt(){return this.CB.oW}KIt(t){this.sut=t}async JIt(t,i,e,s,n){return(await this.$It(t,i,e,s,n))[0]}async $It(t,i,e,s,n){if(0===t.length)throw new g("AbrEvaluator - Unable to select optimal variant stream from an empty list.");Wr.JSt(AH,"Performing optimal variant stream selection.");const r=this.ZIt;let h=t;for(const t of this.sut){const o=t(h,i,r,e,s,n);h=$(o)?o:await o}if(0===h.length){Wr.$St(AH,"No possible variant stream remains after ABR rule evaluation. Selecting the lowest bandwidth variant stream.");return[ol(t,(t=>t.cz))]}return h}constructor(t){this.CB=t,this.sut=[_H,uH,cH,dH,gH,wH,lH,fH]}};function lh(t,i){return[t,void 0!==i?t+i-1:Da]}function mH(t){return Boolean(t.jp)}function fc(t){return Boolean(t.Vet)}function nc(t){return t?t.Lmt?t.LM+"@"+t.Lmt.Cn+"-"+(null!=(i=t.Lmt.U)?i:""):""+t.LM:"";var i}function pH(t,i){if(i===t)return!0;if(i.LM!==t.LM)return!1;if(!t.Lmt)return!0;if(i.Lmt){const e=lh(t.Lmt.Cn,t.Lmt.U),s=lh(i.Lmt.Cn,i.Lmt.U);if(e[0]<=s[0])return void 0===e[1]||void 0!==s[1]&&e[1]>=s[1]}return!1}function yH(t,i){return t===i||t.LM===i.LM&&(t.Lmt&&i.Lmt?t.Lmt.Cn===i.Lmt.Cn&&t.Lmt.U===i.Lmt.U:t.Lmt===i.Lmt)}function MH(t){const i=!!t.tEt||void 0;return{o:t.o,iEt:t.iEt,Bz:t.Bz,eEt:t.eEt,ct:t.ct,sEt:t.sEt,tEt:i,nEt:t.rEt,hEt:t.oEt,aEt:t.aEt,uEt:t.uEt}}function TH(t,i){var e,s,n;return{FSt:null!=(e=i.FSt)?e:null==t?void 0:t.FSt,YSt:null!=(s=i.YSt)?s:null==t?void 0:t.YSt,cEt:null!=(n=i.cEt)?n:null==t?void 0:t.cEt}}async function NH(t,i,e,s,n){const r=i.filter((t=>It(t,"audio"))),h=i.filter((t=>It(t,"video"))),o=[],a=e.map((t=>async function(t,i,e){if(!t.$At)return;if(!t.dEt)return;if(t.oI!==ea.lEt)return;const s=DH(t.dEt);if(!s)return;if(s.Db===xa)return{ZA:s,Az:[],vz:void 0,Mj:t.$At};if(s.Db===M_&&t.dEt===D_)return{ZA:s,Az:[],vz:t.$At,Mj:void 0};{Wr.Wp("HLSDrmUtils","Fetching key uri "+t.$At+".");const n=await i.MS({zu:t.$At,lI:e});return{ZA:s,Az:[await n.nj()],vz:void 0,Mj:void 0}}}(t,s,n)));var u;const c=function(t,i){if(0===i.length)return t;const e=t=>{const e=i.indexOf(t.ZA.Db);return e>=0?e:i.length};return yd(t,((t,i)=>e(t)-e(i)))}((await Promise.all(a)).filter(Dd),null!=(u=null==t?void 0:t.preferredKeySystems)?u:[]);for(const i of c){const e=$V(null!=t?t:{},i.ZA),s="cbcs";o.push({ZA:i.ZA,Az:i.Az,vz:i.vz,Mj:i.Mj,fP:[{initDataTypes:[i.ZA.Tb],audioCapabilities:tW(r,s,null==e?void 0:e.audioRobustness),videoCapabilities:tW(h,s,null==e?void 0:e.videoRobustness),persistentState:null==e?void 0:e.persistentState,distinctiveIdentifier:null==e?void 0:e.distinctiveIdentifier}]})}return o}function DH(t){return t===Ht?jm:t===v_?or:t===N_?zm:t===D_?fr:void 0}function SH(t){if("#"!==t[0])throw new g("HLSPlaylistParser - Could not extract M3U8 tag or comment: "+t);return t.split(":",1)[0]}function IH(t){return"#"!==t[0]?t:t.split(":",1)[0]}function EH(t){const i=t.indexOf(":");if(-1===i||t.length<i+1)throw new g("HLSPlaylistParser - Could not extract M3U8 parameter: "+t);return t.substring(i+1)}function oc(t){const i=Ds(EH(t));if(void 0===i)throw new g("HLSPlaylistParser - Could not extract M3U8 float parameter: "+t);return i}function gt(t){const i={},e=/[:,] ?([A-Z0-9-]+)=([^",]+|"([^"]*)")/gi;let s=e.exec(t);for(;null!==s;){const n=s[1];let r;r=void 0!==s[3]?s[3]:s[2],null!==n?i[n]=r:Wr.$St(oo,"Ignoring unparsable M3U8 attribute name: "+t+"."),s=e.exec(t)}return i}function bH(t,e){const s=gt(t);let n,r;try{n=s.URI?i.SA(s.URI,e):void 0,r=function(t){switch(t){case"AUDIO":return ke.vm;case"VIDEO":return ke.Am;case"SUBTITLES":return ke.pm;case"CLOSED-CAPTIONS":return ke.fEt}throw new g("HLSPlaylistParser - Could not parse M3U8 media type: "+t+".")}(s.TYPE)}catch(i){throw new g("HLSPlaylistParser - Could not parse #EXT-X-MEDIA tag: "+t+".")}const h=s["GROUP-ID"],o=s.LANGUAGE,a=s["ASSOC-LANGUAGE"],u=s.NAME,c="YES"===s.DEFAULT;let d="YES"===s.AUTOSELECT;const l="YES"===s.FORCED,f=s["INSTREAM-ID"],_=s.CHARACTERISTICS,w=s.CHANNELS;if(h||Wr.$St(oo,"#EXT-X-MEDIA tag has no GROUP-ID attribute: "+t+"."),o||Wr.$St(oo,"#EXT-X-MEDIA tag has no LANGUAGE attribute: "+t+"."),u||Wr.$St(oo,"#EXT-X-MEDIA tag has no NAME attribute: "+t+"."),r===ke.fEt?(n&&Wr.$St(oo,"#EXT-X-MEDIA tag of type CAPTIONS must not have a URI: "+t+"."),f?/^(CC[0-4])|(SERVICE([1-9]|[1-5][0-9]|6[0-3]))$/.test(f)||Wr.$St(oo,"#EXT-X-MEDIA's INSTREAM-ID is invalid: "+t+"."):Wr.$St(oo,"#EXT-X-MEDIA tag of type CAPTIONS must have an INSTREAM-ID attribute: "+t+".")):f&&Wr.$St(oo,"#EXT-X-MEDIA tag must not have an INSTREAM-ID attribute if the TYPE is not CAPTIONS: "+t+"."),c&&!d&&(d=!0,s.AUTOSELECT&&Wr.$St(oo,"#EXT-X-MEDIA tag with DEFAULT=YES attribute must have AUTOSELECT=YES attribute: "+t+".")),s.FORCED&&r!==ke.pm&&Wr.$St(oo,"#EXT-X-MEDIA tag must not have a FORCED attribute if the TYPE is not SUBTITLES: "+t+"."),void 0===h||void 0===u)throw new g("HLSPlaylistParser - Could not parse #EXT-X-MEDIA tag: "+t+".");return{_Et:a,gEt:w,fSt:_,cSt:h,aSt:d,oSt:c,uSt:l,dSt:f,gs:o,l:u,Rg:r,$At:n}}function LH(t,e,s){const n=gt(t);let r,h,o;try{r=i.SA(s,e),o=function(t){if(void 0===t)return;const i=t.split("x"),e=Number(i[0]),s=Number(i[1]);if(S(e)||S(s))throw new g("HLSPlaylistParser - Could not parse RESOLUTION attribute: "+t+".");return{ji:e,Ti:s}}(n.RESOLUTION),h=function(t){if(!t)return;let i,e,s;const n=t.split(",");for(const t of n){const n=t.trim();D(n,"mp4a")?i="mp4a.40.05"===n?"mp4a.40.5":"mp4a.40.02"===n?"mp4a.40.2":n:"ac-3"===n||"ec-3"===n?i=n:D(n,"avc")||D(n,"hvc1")||D(n,"hev1")||D(n,"dvh")||D(n,"vp09")||D(n,"av01")?e=t:s=s?s+","+n:n}return{FSt:i,YSt:e,cEt:s}}(n.CODECS)}catch(i){throw new g("HLSPlaylistParser - Could not parse #EXT-X-STREAM-INF tag: "+t+".")}const a=Ds(n.BANDWIDTH),u=Ds(n["AVERAGE-BANDWIDTH"]),c=Ds(n.SCORE),d=Ds(n["FRAME-RATE"]),l=n["HDCP-LEVEL"],f=[];if(void 0!==n["ALLOWED-CPC"]){const t=n["ALLOWED-CPC"].split(",");f.push(...t.map((t=>{const i=t.split(":");return{keysystem:i[0],label:i[1]}})))}const _=n["VIDEO-RANGE"],w=n.AUDIO,A=n.VIDEO,v=n.SUBTITLES,m=n["CLOSED-CAPTIONS"];if(void 0===a?Wr.$St(oo,"#EXT-X-STREAM-INF tag has no valid BANDWIDTH attribute: "+t+"."):void 0!==u&&u>a&&Wr.$St(oo,"#EXT-X-STREAM-INF tag must have BANDWIDTH attribute higher or equal to AVERAGE-BANDWIDTH attribute: "+t+"."),h||Wr.Wp(oo,"#EXT-X-STREAM-INF tag should have a CODECS attribute: "+t+"."),h&&h.YSt&&void 0===o&&Wr.Wp(oo,"#EXT-X-STREAM-INF tag should have a valid RESOLUTION attribute if it contains video codecs: "+t+"."),void 0===l||ae(["TYPE-0","TYPE-1","NONE"],l)||Wr.$St(oo,"#EXT-X-STREAM-INF tag has an invalid HDCP-LEVEL attribute: "+t+"."),void 0===_||ae(["SDR","PQ","HLG"],_)||Wr.$St(oo,"#EXT-X-STREAM-INF tag has an invalid VIDEO-RANGE attribute: "+t+"."),void 0===a)throw new g("HLSPlaylistParser - Could not parse #EXT-X-STREAM-INF tag: "+t+".");return{wEt:f,AEt:w,XAt:u,cz:a,vEt:m,cst:h,Ict:d,mEt:l,WSt:o,ZAt:c,pEt:v,$At:r,yEt:A,MEt:_}}function kH(t,i){const e=gt(t);if(!e.URI)throw new g("HLSPlaylistParser - Could not parse #EXT-X-I-FRAME-STREAM-INF tag: "+t+".");try{return LH(t,i,e.URI)}catch(i){throw new g("HLSPlaylistParser - Could not parse #EXT-X-I-FRAME-STREAM-INF tag: "+t+".")}}function Ds(t){const i=Number(t);return S(i)?void 0:i}function CH(t,i){const e=gt(t);let s,n;try{s=function(t){switch(t){case"NONE":return ea.PP;case"AES-128":return ea.TEt;case"SAMPLE-AES":return ea.lEt;case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return t}throw new g("LLHLSPlaylistParser - Could not parse M3U8 key method: "+t+".")}(e.METHOD),n=e.URI?UH(e.URI,i):void 0}catch(i){throw new g("HLSPlaylistParser - Could not parse #EXT-X-KEY tag: "+t+".")}const r=e.KEYFORMAT,h=e.IV,o=e.KEYFORMATVERSIONS;let a,u,c,d,l;if(s!==ea.PP){if(c=r||D_,"SAMPLE-AES-CENC"===s||"SAMPLE-AES-CTR"===s){if(DH(c)!==jm)throw new g("HLSPlaylistParser - #EXT-X-KEY tag with METHOD="+s+" is only compatible with Widevine.");a=ea.lEt}else a=s;u=n,d=h?Lg(h):void 0,l=o?o.split("/").map((t=>Number(t))):[1]}else a=ea.PP,(n||r||o||h)&&Wr.$St(oo,"#EXT-X-KEY tag with METHOD=NONE must not have additional attributes: "+t+".");return{oI:a,$At:u,NEt:d,dEt:c,DEt:l}}function xH(t){const i=EH(t);if(!i)return[void 0,""];const[e,s]=i.split(",");return[Ds(e),s]}function OH(t,i){const e=t.split("@"),s=Ds(e[0]),n=e.length>1?Ds(e[1]):i;if(void 0===s||void 0===n)throw new g("HLSPlaylistParser - Could not parse #EXT-X-BYTERANGE tag: "+t+".");return{Cn:n,U:s}}function jH(t){if(void 0!==t)return OH(t,void 0)}function zH(t,i){return OH(EH(t),i)}function PH(t,i){const e=gt(t);try{const t=UH(e.URI,i);return{LM:t,Lmt:jH(e.BYTERANGE)}}catch(i){throw new g("HLSPlaylistParser - Could not parse #EXT-X-MAP tag: "+t+".")}}function BH(t){const i=EH(t);if(!i)throw new g("HLSPlaylistParser - Could not parse #EXT-X-PROGRAM-DATE-TIME tag: "+t+".");const e=new Date(i);if(!TT(e))throw new g("HLSPlaylistParser - Could not parse #EXT-X-PROGRAM-DATE-TIME tag: "+t+".");return e}function RH(t){const i=gt(t),e=i["START-DATE"],s=i["END-DATE"],n=Ds(i["PLANNED-DURATION"]);let r,h,o,a=Ds(i.DURATION);void 0!==i["SCTE35-CMD"]&&(r=Lg(i["SCTE35-CMD"]).buffer),i["SCTE35-IN"]&&(h=Lg(i["SCTE35-IN"]).buffer),i["SCTE35-OUT"]&&(o=Lg(i["SCTE35-OUT"]).buffer);const u="YES"===i["END-ON-NEXT"],c=function(t){const i={};for(const e of w.keys(t)){const s=t[e];void 0!==s&&D(e,"X-")&&(i[e]=s)}return i}(i),d=i.ID,l=i.CLASS;let f,_;if(void 0===e)Wr.$St(oo,"Could not parse #EXT-X-DATERANGE tag without START-DATE attribute: "+e+".");else if(f=new Date(e),_=void 0!==s?new Date(s):void 0,TT(f)||Wr.$St(oo,"Could not parse EXT-X-DATERANGE tag with invalid START-DATE attribute: "+f+"."),void 0!==a){const i=new Date(f.getTime()+1e3*a);_?_.getTime()!==i.getTime()&&(Wr.$St(oo,"DURATION and END-DATE attributes of #EXT-X-DATERANGE tag are not aligned, updating the END-DATE: "+t+"."),_=i):_=i}else _&&(a=(f.getTime()-_.getTime())/1e3);if(u&&(i.CLASS||Wr.$St(oo,"Could not parse #EXT-X-DATERANGE tag with END-ON-NEXT attribute without CLASS attribute: "+t+"."),i.DURATION&&Wr.$St(oo,"Could not parse #EXT-X-DATERANGE tag with END-ON-NEXT attribute with DURATION attribute: "+t+"."),_&&Wr.$St(oo,"Could not parse #EXT-X-DATERANGE tag with END-ON-NEXT attribute with END-DATE attribute: "+t+".")),void 0===d&&Wr.$St(oo,"Could not parse #EXT-X-DATERANGE tag without valid ID attribute: "+t+"."),void 0===d||void 0===f)throw new g("HLSPlaylistParser - Could not parse #EXT-X-DATERANGE tag: "+t+".");return{o:d,iEt:l,Bz:f,eEt:_,ct:a,sEt:n,oEt:r,uEt:h,aEt:o,tEt:u,rEt:c}}function UH(t,e){if(void 0===t)throw new g("HLSPlaylistParser - Unable to parse URL from string: "+t+".");return i.SA(t,e)}function QH(t,i){const e=gt(t),s=Ds(e.DURATION),n=UH(e.URI,i),r=jH(e.BYTERANGE),h="YES"===e.INDEPENDENT,o="YES"===e.GAP;if(void 0===s)throw new g("HLSPlaylistParser - Unable to parse #EXT-X-PART without valid DURATION: "+t);return{ct:s,$At:{LM:n,Lmt:r},SEt:h,IEt:o}}function FH(t){const i=gt(t);return{EEt:"YES"===i["CAN-BLOCK-RELOAD"],bEt:Ds(i["CAN-SKIP-UNTIL"]),LEt:"YES"===i["CAN-SKIP-DATERANGES"],kEt:Ds(i["HOLD-BACK"]),CEt:Ds(i["PART-HOLD-BACK"])}}function YH(t,i){const e=gt(t);if(void 0===e.URI)throw new g("HLSPlaylistParser - Could not parse #EXT-X-RENDITION-REPORT: "+t+".");const s=UH(e.URI,i),n=Ds(e["LAST-MSN"]),r=Ds(e["LAST-PART"]);if(void 0===n)throw new g("HLSPlaylistParser - Could not parse #EXT-X-RENDITION-REPORT: "+t+".");return{$At:s,xEt:n,OEt:r}}function GH(t,i){var e;const s=gt(t),n=Ds(s["SKIPPED-SEGMENTS"]),r=null==(e=s["RECENTLY-REMOVED-DATERANGES"])?void 0:e.split("\t");if(void 0===n)throw new g("HLSPlaylistParser - Could not parse #EXT-X-SKIP tag without valid SKIPPED-SEGMENTS attribute: "+t+".");return{jEt:n,zEt:r,PEt:i}}function VH(t){const i=Ds(gt(t)["PART-TARGET"]);if(void 0===i)throw new g("HLSPlaylistParser - Could not parse #EXT-X-PART-TARGET-DURATION tag: "+t+".");return i}function WH(t){switch(EH(t)){case"VOD":return qe.BEt;case"EVENT":return qe.REt;default:return Wr.$St(oo,"Found #EXT-X-PLAYLIST-TYPE tag with invalid value: "+t+"."),qe.tT}}function HH(t,i){const e=gt(t);let s,n;try{s=function(t){if(void 0===t)throw new g("HLSPlaylistParser - Could not parse PRELOAD-HINT type: "+t+".");if("MAP"===t)return rt.UEt;if("PART"===t)return rt.QEt;throw new g("HLSPlaylistParser - Could not parse PRELOAD-HINT type: "+t+".")}(e.TYPE),n=UH(e.URI,i)}catch(i){throw new g("HLSPlaylistParser - Could not parse #EXT-X-PRELOAD-HINT tag: "+t+".")}const r=Ds(e["BYTERANGE-START"]),h=Ds(e["BYTERANGE-LENGTH"]);let o;return void 0===r&&void 0===h||(o={Cn:r||0,U:h}),{Rg:s,$At:{LM:n,Lmt:o}}}!function(t){t[t.vm=0]="vm",t[t.Am=1]="Am",t[t.pm=2]="pm",t[t.fEt=3]="fEt"}(ke||(ke={})),function(t){t[t.UEt=0]="UEt",t[t.QEt=1]="QEt"}(rt||(rt={})),function(t){t[t.PP=0]="PP",t[t.TEt=1]="TEt",t[t.lEt=2]="lEt"}(ea||(ea={})),function(t){t[t.tT=0]="tT",t[t.BEt=1]="BEt",t[t.REt=2]="REt"}(qe||(qe={}));var qH=class t{FEt(){const t=this.YEt[this.GEt];return this.GEt+=1,t}VEt(){return this.YEt[this.GEt]}Sm(){const i=new t("");return i.GEt=0,i.YEt=this.YEt.slice(this.GEt),i}static WEt(t){if(!t)return[];return t.split(/[\r\n]+/).map((t=>t.trim())).filter((t=>t))}constructor(i){this.GEt=0,this.YEt=t.WEt(i)}};function XH(t,i,e){const s=t.$At;let n=t.ap,r=t.HEt,h=t.Cn;switch(e){case"#EXT-X-VERSION":n=function(t){const i=oc(t);return S(i)?(Wr.$St(oo,"Playlist version is NaN: "+t+"."),1):i}(i);break;case"#EXT-X-INDEPENDENT-SEGMENTS":r=!0;break;case"#EXT-X-START":h=function(t){const i=gt(t),e=Ds(i["TIME-OFFSET"]);if(void 0===e)throw new g("HLSPlaylistParser - #EXT-X-START is missing a TIME-OFFSET: "+t+".");return{qEt:e,XEt:"YES"===i.PRECISE}}(i);break;case"#EXT-X-DEFINE":Wr.$St(oo,"Ignoring unsupported #EXT-X-DEFINE: "+i+".");break;default:Wr.Wp(oo,"Ignoring unrecognized line or comment: "+i+".")}return{$At:s,ap:n,HEt:r,Cn:h}}function ZH(t,i){return t.map((t=>t.oI===ea.PP||t.NEt?t:Tt({},t,{NEt:KH(i)})))}function KH(t){const i=new DataView(new ArrayBuffer(16)),e=new Ha;return e.Nm(8),_g(i,e,Ce.fromNumber(t)),new j(i.buffer)}function JH(t,e,s){Wr.Wp(oo,"Parsing M3U8 playlist at "+t+".");const n=new qH(s);if("#EXTM3U"!==n.FEt())throw new g("HLSPlaylistParser - Could not parse M3U8 playlist. Playlist does not start with #EXTM3U.");return function(t){return/^#EXT-X-(MEDIA|STREAM-INF|I-FRAME-STREAM-INF|SESSION-DATA|SESSION-KEY):/m.test(t)}(s)?function(t,e){let s;try{s=i.SA(t)}catch(i){throw Wr.$St(oo,"The master playlist has no valid base URI: "+t+"."),new g("HLSPlaylistParser - Could not parse HLS master playlist: "+t)}let n={$At:s,HEt:void 0,Cn:void 0,ap:void 0};const r=[],h=[],o=[],a=[];for(;;){const t=e.FEt();if(!t)break;try{const i=SH(t);switch(i){case"#EXT-X-MEDIA":{const i=bH(t,s);r.push(i);break}case"#EXT-X-STREAM-INF":{const i=LH(t,s,e.FEt());h.push(i);break}case"#EXT-X-I-FRAME-STREAM-INF":{const i=kH(t,s);o.push(i);break}case"#EXT-X-SESSION-DATA":Wr.$St(oo,"Ignoring unsupported #EXT-X-SESSION-DATA: "+t+".");break;case"#EXT-X-SESSION-KEY":{const i=CH(t,s);a.push(i);break}default:n=XH(n,t,i)}}catch(i){Wr.$St(oo,"Ignoring unparsable line: "+t,i)}}let u=n.ap;var c;const d=null!=(c=n.HEt)&&c,l=n.Cn;return void 0===u&&(Wr.$St(oo,"The playlist has no #EXT-X-VERSION, assuming version is 2."),u=2),u>=8&&(h.some((t=>void 0!==t.ZAt))||o.some((t=>void 0!==t.ZAt)))&&(h.some((t=>void 0===t.ZAt))||o.some((t=>void 0===t.ZAt)))&&Wr.$St(oo,"If one master playlist variant stream has a SCORE, all variants should have it."),{$At:s,ap:u,HEt:d,Cn:l,ZEt:o,KEt:a,jp:r,JEt:h}}(t,n):function(t,e,s){let n={$At:t,HEt:void 0,Cn:void 0,ap:void 0};const r=[];let h,o,a,u,c=!1,d=!1;const l=[],f=Cn();let _,w,A,v,m,p,y,M,T,N=[],S=[],I=!1,E=!1;const b=[],L=[];let k,C,x,O,j,z=0,P=!1,B=qe.tT,R=!1,U=0;try{j=i.SA(t)}catch(i){throw Wr.$St(oo,"The media playlist has no valid base URI: "+t+".",i),new g("HLSPlaylistParser - Could not parse HLS media playlist.")}const Q=s.Sm();for(;void 0===C||void 0===x;){const t=Q.FEt();if(!t)break;try{switch(IH(t)){case"#EXT-X-MEDIA-SEQUENCE":C=oc(t);break;case"#EXT-X-DISCONTINUITY-SEQUENCE":x=oc(t)}}catch(i){Wr.$St(oo,"Ignoring unparsable line: "+t,i)}}void 0===C&&(Wr.Wp(oo,"#EXT-X-MEDIA-SEQUENCE tag is missing, assuming first segment media sequence number is 0."),C=0),void 0===x&&(Wr.Wp(oo,"#EXT-X-DISCONTINUITY-SEQUENCE tag is missing, assuming first segment discontinuity sequence number is 0."),x=0);let F=C,Y=x;for(;;){const t=s.FEt();if(!t)break;let e=!1;try{const s=IH(t);switch(s){case"#EXTINF":e=!0,[_,w]=xH(t);break;case"#EXT-X-BYTERANGE":e=!0,A=zH(t,z),A&&(z=A.Cn+A.U);break;case"#EXT-X-DISCONTINUITY":e=!0,I=!0,Y++;break;case"#EXT-X-KEY":{var G;e=!0;const i=CH(t,j);if(i.oI===ea.PP){f.clear(),T=void 0;break}var V;const s=null!=(V=null==(G=i.dEt)?void 0:G.toString())?V:"identity";f.set(s,i),i.oI===ea.TEt&&(T=i);break}case"#EXT-X-MAP":e=!0,m=PH(t,j),p=T;break;case"#EXT-X-PROGRAM-DATE-TIME":e=!0,y=BH(t);break;case"#EXT-X-GAP":e=!0,E=!0;break;case"#EXT-X-BITRATE":e=!0,M=oc(t);break;case"#EXT-X-TARGETDURATION":h=oc(t);break;case"#EXT-X-DATERANGE":{const i=RH(t);r.push(i);break}case"#EXT-X-PART":{e=!0;const i=QH(t,j);S.push(i);break}case"#EXT-X-PRELOAD-HINT":{const i=HH(t,j);b.push(i);break}case"#EXT-X-SKIP":{l.length>0&&Wr.$St(oo,"#EXT-X-SKIP must appear before any #EXTINF tags."),e=!0;const i=GH(t,F);U=i.jEt,O=i.zEt,F+=i.jEt;break}case"#EXT-X-SERVER-CONTROL":{const i=FH(t);c=i.EEt,o=i.bEt,d=i.LEt,a=i.kEt,u=i.CEt;break}case"#EXT-X-RENDITION-REPORT":{const i=YH(t,j);L.push(i);break}case"#EXT-X-PART-INF":k=VH(t);break;case"#EXT-X-MEDIA-SEQUENCE":e&&Wr.$St(oo,"#EXT-X-MEDIA-SEQUENCE must appear before any media segment tags.");break;case"#EXT-X-DISCONTINUITY-SEQUENCE":e&&Wr.$St(oo,"#EXT-X-DISCONTINUITY-SEQUENCE must appear before any media segment tags.");break;case"#EXT-X-ENDLIST":P=!0;break;case"#EXT-X-PLAYLIST-TYPE":B=WH(t);break;case"#EXT-X-I-FRAMES-ONLY":R=!0;break;default:if(D(s,"#"))n=XH(n,t,s);else{v=i.SA(t,j);const e=m?{$At:m,$Et:p}:void 0,s={KEt:ZH($d(f),F),GD:N,tbt:S,ct:_,Wz:w,ibt:I,$At:{Lmt:A,LM:v},ebt:e,sbt:y,IEt:E,nbt:M,PEt:F,rbt:Y};l.push(s),F++,N=[],S=[],_=void 0,w=void 0,I=!1,A=void 0,v=void 0,y=void 0,E=!1,M=void 0}}}catch(i){Wr.$St(oo,"Ignoring unparsable line: "+t,i)}}if(S.length){const t=m?{$At:m,$Et:T}:void 0,i={KEt:ZH($d(f),F),GD:N,tbt:S,ct:_,Wz:w,ibt:I,$At:void 0,ebt:t,sbt:y,IEt:E,nbt:M,PEt:F,rbt:Y};l.push(i)}let W=n.ap;var H;const q=null!=(H=n.HEt)&&H,X=n.Cn;void 0===W&&(Wr.$St(oo,"The media playlist has no #EXT-X-VERSION tag, assuming version is 2."),W=2),void 0===h&&Wr.$St(oo,"Could not parse the HLS media playlist: no #EXT-X-TARGET-DURATION tag was found.");const Z=l.length,K=Z>0;K||Wr.$St(oo,"The HLS media playlist contains no segments.");const J=K&&l[Z-1].tbt.length>0;return J&&void 0===k&&Wr.$St(oo,"Could not parse the HLS media playlist: no #EXT-X-PART-TARGET-DURATION tag was found, but it is required when some or all segments contain parts."),J&&void 0===u&&Wr.$St(oo,"Could not parse the HLS media playlist: The #EXT-X-SERVER-CONTROL tag has no PART-HOLDBACK attribute, but it is required when some or all segments contain parts."),{EEt:c,bEt:o,LEt:d,hbt:r,rbt:x,obt:P,HEt:q,kEt:a,abt:R,PEt:C,jEt:U,CEt:u,VIt:k,ubt:B,cbt:b,zEt:O,dbt:L,lbt:h,Vet:l,Cn:X,$At:j,fbt:e,ap:W}}(t,e,n)}var $H=class{get $At(){return this.hSt.$At}get cst(){return this._bt}set cst(t){this._bt=t?iq(t):void 0,this.gbt=!0}get wbt(){return this.gbt}get aIt(){return this.Abt}get eIt(){return this.Abt.filter((t=>t.Rg===ke.vm))}get sIt(){return this.Abt.filter((t=>t.Rg===ke.Am))}get vbt(){return this.Abt.filter((t=>t.Rg===ke.pm))}get mbt(){return this.Abt.filter((t=>t.Rg===ke.fEt))}pbt(t){for(const i of this.Abt){const e=i.hSt.pbt(t);if(void 0!==e)return e}}ybt(t){for(const i of this.Abt){const e=i.hSt.ybt(t);if(void 0!==e)return e}}Mbt(t){_s(this.Abt,t)}constructor(t,i,e){var s,n,r,h;this.o=tq++,this.ZAt=void 0,this.WSt=void 0,this.XAt=void 0,this.gbt=!1,this.Abt=[],this.hSt=i,this.cz=t.cz,this.XAt=t.XAt,this.ZAt=t.ZAt,this._bt=t.cst?iq(t.cst):void 0,this.WSt=t.WSt,this.Ict=t.Ict,this.AEt=null!=(s=t.AEt)?s:"Tbt"+this.o,this.yEt=null!=(n=t.yEt)?n:"Nbt"+this.o,this.pEt=null!=(r=t.pEt)?r:"Dbt"+this.o,this.vEt=null!=(h=t.vEt)?h:"Sbt"+this.o,this.Abt=e}},tq=0;function iq(t){return Tt({},t,{YSt:t.YSt?Ev(t.YSt):void 0})}var ph,eq=class{get RT(){var t;return this.XT+(null!=(t=this.Ibt)?t:0)}get Ebt(){return this.bbt}get KEt(){return this.Lbt.KEt}kbt(t,i){this.XT=t,this.bbt=i}constructor(t,i,e,s,n){this.Z8=void 0,this.Lbt=t,this.Cbt=i,this.XT=e,this.bbt=s,this.ct=n.ct,this.$At=n.$At,this.SEt=n.SEt,this.IEt=n.IEt}},sq=class{get RT(){var t;return this.XT+(null!=(t=this.xbt)?t:0)}get Obt(){return this.XT}get ct(){return this.UL}get $At(){return this.jbt}get zbt(){return this.Pbt}get Ebt(){return this.bbt}get tbt(){return this.Bbt}get Rbt(){return this.Ubt}get UT(){var t;return this.RT+(null!=(t=this.UL)?t:this.Ubt)}set Ibt(t){this.xbt=t;for(const i of this.Bbt)i.Ibt=t}get Ibt(){return this.xbt}Qbt(t){return this.Bbt[t]}Fbt(t){for(let i=0;i<this.Bbt.length;i++){const e=this.Bbt[i],s=e.RT,n=s+e.ct;if(s<=t&&t<=n)return t===n&&i+1<this.Bbt.length?this.Bbt[i+1]:e}}Ybt(t){for(let i=this.Bbt.length-1;i>=0;i--){const e=this.Bbt[i];if(e.RT<=t)return e}}Gbt(t){let i=this.Ybt(t);for(;i&&!i.SEt&&i.Cbt>0;)i=this.Qbt(i.Cbt-1);return i}kbt(t,i,e){const s=t.tbt.length!==this.Bbt.length||e!==this.bbt;this.Pbt=i,this.bbt=e,this.UL=t.ct,null!=this.sbt||(this.sbt=t.sbt),void 0===this.jbt&&(this.jbt=t.$At),s&&this.Vbt(t.tbt)}Vbt(t){this.Bbt.length>t.length&&(this.Bbt.length=t.length);let i=0;for(let e=0;e<t.length;e++){const s=t[e],n=this.bbt&&e===t.length-1,r=this.XT+i;if(e<this.Bbt.length)this.Bbt[e].kbt(r,n);else{const t=new eq(this,e,r,n,s);this.Bbt.push(t)}i+=s.ct}this.Ubt=i}Wbt(){No(this.Bbt),this.Ubt=0}constructor(t,i,e,s,n){this.Z8=void 0,this.Bbt=[],this.Ubt=0,this.XT=t,this.ebt=n.ebt,this.Pbt=e,this.bbt=s,this.UL=n.ct,this.sbt=n.sbt,this.jbt=n.$At,this.IEt=n.IEt,this.PEt=n.PEt,this.ibt=n.ibt,this.rbt=i,this.KEt=n.KEt,this.Vbt(n.tbt)}};!function(t){t.Hbt="YES",t.qbt="v2"}(ph||(ph={}));var wh=class extends Jo{};var nq=class extends dh{get va(){return this.Xa||(this.Xa=function(t){return vi(dA(t),{get content(){return t.O},get class(){return t.iEt},get startDate(){return t.Bz},get endDate(){return t.eEt},get duration(){return t.ct},get plannedDuration(){return t.sEt},get endOnNext(){return t.tEt},get scte35Cmd(){return t.hEt},get scte35Out(){return t.aEt},get scte35In(){return t.uEt},get customAttributes(){return t.nEt}})}(this)),this.Xa}get iEt(){return this.Xbt}get Bz(){return this.Zbt}get eEt(){return this.Kbt}get ct(){return this.UL}get sEt(){return this.Jbt}get tEt(){return this.$bt}get hEt(){return this.tLt}get aEt(){return this.iLt}get uEt(){return this.eLt}get nEt(){return this.sLt}Yn(t){let i=!1;var e;(void 0===this.Xbt&&void 0!==t.iEt&&(i=!0,this.Xbt=t.iEt),void 0===this.Kbt&&void 0!==t.eEt&&(i=!0,this.Kbt=t.eEt),void 0===this.UL&&void 0!==t.ct&&(i=!0,this.UL=t.ct),void 0===this.Jbt&&void 0!==t.sEt&&(i=!0,this.Jbt=t.sEt),!this.$bt&&t.tEt&&(i=!0,this.$bt=t.tEt),i=this.updateCustomAttributes(t,i),void 0===this.tLt&&void 0!==t.hEt&&(i=!0,this.tLt=t.hEt),void 0===this.iLt&&void 0!==t.aEt&&(i=!0,this.iLt=t.aEt),void 0===this.eLt&&void 0!==t.uEt&&(i=!0,this.eLt=t.uEt),this.nLt(),this.rLt(),this.hLt(),i)&&(this.Co(new Cu(this)),null==(e=this.ZT)||e.Co(new gA(this)))}updateCustomAttributes(t,i){let e=i;if(t.nEt)for(const i of w.keys(t.nEt))void 0===this.sLt[i]&&(e=!0,this.sLt[i]=t.nEt[i]);return e}nLt(){this.UL&&!this.Kbt&&(this.Kbt=new Date(this.Zbt.getTime()+Jt(this.UL)))}rLt(){this.Kbt&&!this.UL&&(this.UL=NT(this.Kbt.getTime()-this.Zbt.getTime()))}hLt(){this.JT===1/0&&(this.Kbt||this.UL)&&(this.JT=rq(this.XT,this.UL,this.Zbt,this.Kbt))}constructor(t,i){super(i,rq(i,t.ct,t.Bz,t.eEt),void 0,!1,t.o),this.Xbt=t.iEt,this.Zbt=t.Bz,this.Kbt=t.eEt,this.UL=t.ct,this.Jbt=t.sEt,this.$bt=Boolean(t.tEt),this.sLt=t.nEt||{},this.tLt=t.hEt,this.iLt=t.aEt,this.eLt=t.uEt,this.nLt(),this.rLt()}};function rq(t,i,e,s){return Dd(i)?t+i:s?t+(NT(s.getTime())-NT(e.getTime())):1/0}var hq=class extends Qx{Yn(t,i){oq(this,aq(t),i)}MI(t){uq(this.L.og,t),super.MI(t)}constructor(){super(void 0,void 0,Wt.DATE_RANGE)}};function oq(t,i,e){const s=t.L.og;for(let e=s.length-1;e>=0;e--){const n=s[e],r=Po(i,(t=>t.o===n.o));r?n.Yn(r):t.ES(n)}for(const s of i){const i=s.Bz;if(void 0!==i&&!t.x0(s.o)){const n=e(i),r=new nq(s,n);uq(t.L.og,r),t.MI(r)}}}function aq(t){const i=Cn(),e=[];for(const s of t)if(i.has(s.o)){const t=i.get(s.o),e=Tt({},t,Jl(s),{nEt:Tt({},t.nEt,s.nEt)});i.set(s.o,e)}else i.set(s.o,s),e.push(s.o);return e.map((t=>i.get(t)))}function uq(t,i){const e=Fd(t,(t=>t.iEt===i.iEt));e&&e.tEt&&e.Yn({o:e.o,eEt:i.Bz})}var cq=String.fromCharCode(95),dq=cq+"HLS_msn",lq=cq+"HLS_part",fq=cq+"HLS_skip",_q="HLSMediaPlaylist",gq=class{get obt(){if(0===this.omt.length)return!1;return this.omt[this.omt.length-1].Ebt}get ct(){return this.UL}get t_(){return this.X$}get oLt(){return this.aLt}get WIt(){return this.uLt}get VIt(){return this.cLt}get kEt(){return this.obt?0:this.dLt?this.dLt:this.uLt?3*this.uLt:void 0}get CEt(){var t;return null!=(t=this.lLt)?t:this.cLt?3*this.cLt:void 0}get EEt(){return this.fLt}get bEt(){return this._Lt}get LEt(){return this.gLt}get ubt(){return this.wLt}get ALt(){return void 0!==this.VIt}get vLt(){if(this.obt)return!0;const t=i.Jd()/1e3,e=this.mLt,s=this.pLt;return void 0!==e&&t-e<s}get mLt(){return this.yLt}get MLt(){if(this.TLt)return i.Jd()/1e3-this.TLt}get Ibt(){return this.xbt}get pLt(){var t;return null!=(t=this.uLt)?t:void 0===this.yLt?5:1}get Vet(){return this.omt}get hbt(){return this.NLt}get DLt(){return this.SLt}set DLt(t){this.SLt=t}get Cn(){return this.iS}get ILt(){return this.ELt}QSt(t){if(!t)return this.$At;const e=i.Dh(this.$At);return void 0!==t.PEt&&e.searchParams.append(dq,String(t.PEt)),void 0!==t.bLt&&e.searchParams.append(lq,String(t.bLt)),void 0!==t.Vm&&e.searchParams.append(fq,t.Vm),e.href}Nht(t){const i=this.omt;if(0===i.length)return;const e=t-i[0].PEt;return e<0||e>=i.length?void 0:i[e]}LLt(t){if(0===this.omt.length)return;const i=_G(wq.yb,this.omt,t);if(!(i<0)){const e=this.omt[i];return t===e.UT&&i+1<this.omt.length?this.omt[i+1]:e}{const i=this.omt[this.omt.length-1];if(t===i.UT)return i}}kLt(t){if(0===this.omt.length)return;const i=this.omt[0];if(t<i.UT)return i;const e=this.omt[this.omt.length-1];return t>=e.RT?e:this.LLt(t)}pbt(t){const i=this.kLt(t);if(void 0===i)return;for(let e=i.PEt-this.omt[0].PEt;e>=0;e--){const i=this.omt[e];if(void 0!==i.sbt)return new Date(i.sbt.getTime()+1e3*(t-i.RT))}}ybt(t){let i;for(const e of this.omt)if(Aq(e))if(void 0===i)i=e;else{if(!(e.sbt.getTime()<=t.getTime()))break;i=e}if(void 0!==i)return i.RT+(t.getTime()-i.sbt.getTime())/1e3}CLt(t){switch(t){case rt.UEt:return this.xLt;case rt.QEt:return this.OLt;default:return}}kbt(t){var e;void 0===this.uLt&&(this.uLt=null!=(e=t.lbt)?e:this.jLt(t));void 0===this.dLt&&void 0!==t.kEt&&(this.dLt=t.kEt),void 0===this.cLt&&void 0!==t.VIt&&(this.cLt=t.VIt),void 0===this.lLt&&void 0!==t.CEt&&(this.lLt=t.CEt),this.fLt=t.EEt,this._Lt=t.bEt,this.gLt=t.LEt,this.wLt=t.ubt,this.dmt(t),this.zLt(t);const s=Po(t.cbt,(t=>t.Rg===rt.UEt)),n=Po(t.cbt,(t=>t.Rg===rt.QEt));this.xLt=s?{$At:s.$At,Rg:s.Rg,rbt:t.rbt}:void 0,this.OLt=n?{$At:n.$At,Rg:n.Rg,rbt:t.rbt}:void 0,this.yLt=i.Jd()/1e3;const r=this.X$.jn(this.X$.U-1);this.PLt();const h=this.X$.jn(this.X$.U-1);(!this.TLt||h-r>0)&&(this.TLt=this.yLt),null!=this.iS||(this.iS=t.Cn)}PLt(){this.aLt=this.BLt(),this.X$=this.RLt(this.aLt),this.UL=this.ULt()}BLt(){const t=this.Vet;if(0===t.length)return ce.MB();const i=t[0].RT,e=t[t.length-1].UT;return new ce([i,e])}RLt(t){if(0===t.U||this.obt)return t;const i=t.Cn(0),e=t.jn(0)-this.hyt;return e<i?ce.pB(i):new ce([i,e])}get hyt(){return this.obt?0:null!=(e=null!=(i=null!=(t=this.QLt)?t:this.CEt)?i:this.kEt)?e:0;var t,i,e}ULt(){return 0===this.omt.length?0:this.obt?Yc(this.omt,(t=>{var i;return null!=(i=t.ct)?i:t.Rbt})):1/0}jLt(t){let i;for(const e of t.Vet)if(void 0!==e.ct){const t=_.max(1,_.round(e.ct));(void 0===i||i<t)&&(i=t)}if(void 0===i)throw new g("HLSModel - Could not determine required segment target duration.");return i}dmt(t){if(0===t.Vet.length)return No(this.omt),void this.FLt();const i=this.YLt(t);if(!i)return;let e,s,n;i.GLt>0&&this.omt.splice(0,i.GLt);const r=t.jEt;if(r>0){if(r>this.omt.length)throw new wh("New playlist skips over missing segments.");const i=this.omt[r-1];if(void 0===i.ct)throw new wh("New playlist skips over an incomplete segment.");e=i.Obt+i.ct,n=i.rbt-t.rbt,s=r;for(let t=0;t<r;t++)this.omt[t].Wbt()}else e=i.VLt,n=0,s=0;for(let i=0;i<t.Vet.length;i++,s++){const r=t.Vet[i],h=0===i,o=t.obt&&i===t.Vet.length-1,a=r.ct,u=r.rbt+n;if(s<this.omt.length){const t=this.omt[s];0,t.kbt(r,h,o)}else{let t=r;if(this.omt.length>0&&void 0===t.ebt){t=Tt({},t,{ebt:this.omt[this.omt.length-1].ebt})}const i=new sq(e,u,h,o,t);i.Ibt=this.xbt,this.omt.push(i)}void 0!==a&&(e+=a)}}YLt(t){if(0===this.omt.length)return{GLt:0,VLt:0};const i=this.omt[0].PEt,e=this.omt[this.omt.length-1].PEt,s=t.Vet[0].PEt-t.jEt,n=t.Vet[t.Vet.length-1].PEt;let r=0,h=0;if(s<i){const e=this.Vet[0].sbt,n=t.Vet[0].sbt;if(!(e&&n&&e<n))return void Wr.$St(_q,"Ignoring older playlist (first media sequence number is "+s+", but previous playlist already started at "+i+")");r=this.omt.length,this.FLt()}else{if(n<e)return void Wr.$St(_q,"Ignoring older playlist (last media sequence number is "+n+", but previous playlist already ended at "+e+")");if(e<s){var o;h=null!=(o=function(t,i){const e=Fd(t,(t=>void 0!==t.sbt));if(void 0===e)return;const s=function(t){let i=0;for(const s of t){if(s.ibt)return;if(s.sbt)return[s,i];var e;i+=null!=(e=s.ct)?e:0}return}(i.Vet);if(void 0===s)return;const[n,r]=s;if(e.rbt!==n.rbt)return;const h=(n.sbt.getTime()-e.sbt.getTime())/1e3;return e.Obt+h-r}(this.omt,t))?o:function(t,i,e){const s=t[t.length-1];var n;const r=null!=(n=s.ct)?n:_.max(e,s.Rbt),h=e*(i-s.PEt-1);return s.Obt+r+h}(this.omt,s,this.uLt),Wr.JSt(_q,"New playlist (starting at "+s+") is entirely after previous playlist (ending at "+e+"), resetting playlist and restarting at "+h+"s"),r=this.omt.length,this.FLt()}else{0;const t=Yd(this.omt,(t=>t.PEt===s));0,h=this.omt[t].Obt,t>0&&(r=t)}}return{GLt:r,VLt:h}}zLt(t){let i=t.hbt.map(MH);if(t.LEt&&t.fbt.Vm===ph.qbt&&(i=this.NLt.concat(i)),this.NLt=aq(i),t.zEt)for(const i of t.zEt){const t=Yd(this.NLt,(t=>t.o===i));t>=0&&si(this.NLt,t)}}WLt(t,i){if(this.xbt!==t){this.xbt=t;for(const t of this.omt)t.Ibt=this.xbt;this.PLt()}this.ELt=i}FLt(){this.xbt=void 0,this.ELt=void 0}constructor(t,i,e){this.yLt=void 0,this.TLt=void 0,this.xLt=void 0,this.OLt=void 0,this.uLt=void 0,this.cLt=void 0,this.dLt=void 0,this.lLt=void 0,this.omt=[],this.NLt=[],this.fLt=!1,this._Lt=void 0,this.gLt=!1,this.wLt=qe.tT,this.X$=ce.MB(),this.aLt=ce.MB(),this.UL=void 0,this.SLt=-1/0,this.ELt=void 0,this.$At=t,this.iS=i,this.QLt=e}},wq=class t{static get yb(){return null!=this.ust||(this.ust=new t),this.ust}emt(t){return t.RT}smt(t){return t.UT}nmt(t,i){return Pd(t,i)}hmt(t,i,e){return(t-i)/(e-i)}};function Aq(t){return void 0!==t.sbt}function ps(t){return void 0!==t.tbt}function vq(t){return ps(t)?t.zbt:0===t.Cbt&&t.Lbt.zbt}function bc(t,i){return ps(t)?ps(i)?t.PEt+1===i.PEt:0===i.Cbt&&bc(t,i.Lbt):t.Cbt===t.Lbt.tbt.length-1?bc(t.Lbt,i):!ps(i)&&t.Lbt===i.Lbt&&t.Cbt+1===i.Cbt}var mq=class extends Jo{get name(){return"DiscontinuityMisalignmentError"}constructor(){super("Tried to wait for multiple discontinuity mappings at the same time")}};var pq=class{HLt(t){const i=this.qLt.get(t);return void 0!==i&&yq(i)}XLt(t){if(this.ZLt()>t)return Promise.reject(new mq);const i=[];for(const s of this.KLt){var e;if(s<t)null==(e=this.qLt.get(s))||e.JLt.Yb(new mq),this.qLt.delete(s);else i.push(s)}return this.KLt=i,-1===this.KLt.indexOf(t)&&this.KLt.push(t),this.$Lt(t).JLt.Vb}tkt(t){const i=this.qLt.get(t);if(!i||!yq(i))throw new g("LLHLSPlayer - Missing timestamp mapping for discontinuity #"+t);return i}ikt(t){return this.tkt(t).jD}ekt(t,i){const e=ps(i)?i:i.Lbt,s=this.tkt(e.rbt);let n=t.MT(s.jD);if(s.skt){const t=Sn.fD(i.RT).NN(n);if(t.yN()._N(jA())){const i=_.round(t.fN()/ur().fN());n=n.MT(ur().JN(i))}}return n}nkt(t,i){return this.ekt(t,i).NN(t)}rkt(t,i,e,s,n){this.hkt<t&&(this.hkt=t);const r=this.$Lt(t);void 0===r.jD&&(r.okt.some((t=>t.eht===i))||(r.okt.push({eht:i,akt:e,ukt:s.uD(e.bp),skt:n}),this.ckt(r,t)))}ckt(t,i){if(t.jD||!this.dkt(t))return;const e=$n(t.okt,Mq);No(t.okt),t.jD=e.ukt.NN(e.akt),t.skt=e.skt,t.JLt.Qb(),_s(this.KLt,i)}dkt(t){return this.lkt.length>0&&this.lkt.every((i=>t.okt.some((t=>t.eht===i))))}$Lt(t){if(this.qLt.has(t))return this.qLt.get(t);{const i={jD:void 0,skt:!1,JLt:new Rs,okt:[]};return this.qLt.set(t,i),i}}fkt(t){this.lkt=t,this.qLt.forEach(((t,i)=>this.ckt(t,i)))}_kt(){this.hkt=-1}ZLt(){return this.hkt}Qd(){this.qLt.forEach((t=>t.JLt.Xd())),this.qLt.clear()}constructor(){this.lkt=[],this.qLt=Y(),this.KLt=[],this.hkt=-1}};function yq(t){return void 0!==t.jD}function Mq(t,i){return t.skt||i.skt?function(t,i){let e=t.NN(i);return t.SN()||i.SN()||(e.wN(jA())?e=e.NN(ur()):e.pN(jA().TN())&&(e=e.MT(ur()))),e}(t.akt,i.akt).gN(Sn.kN):t.akt.gN(i.akt)}var Tq=class{get gkt(){return this.wkt}get iIt(){return this.Akt}get XM(){return this.vkt}kbt(t,i){if(fc(t))if(0===this.Akt.length)this.mkt(t);else{if(!i)return void Wr.$St("HLSModel","No rendition was provided to update the playlist. Ignoring the update.");i.hSt.kbt(t)}else{if(0!==this.Akt.length)return void Wr.$St("HLSModel","Master playlist can only be applied once. Ignoring the update.");this.pkt(t)}}mkt(t){const i=this.ykt(t.$At);i.kbt(t);const e=this.Mkt(ke.vm,i),s=this.Mkt(ke.Am,i),n=new $H({$At:i.$At,cz:0,XAt:0,ZAt:NaN,cst:void 0,WSt:void 0,Ict:0,wEt:[],mEt:void 0,MEt:void 0,AEt:void 0,yEt:void 0,pEt:void 0,vEt:void 0},i,[e,s]);this.Akt.push(n)}pkt(t){this.wkt.push(...t.KEt);const i=this.Tkt(t);for(const e of t.JEt){const s=i.filter((t=>Dq(t,e)));this.Nkt(e,s);const n=new $H(e,this.ykt(e.$At,t.Cn),s);this.Akt.push(n)}}ykt(t,i){let e=this.Dkt.get(t);return void 0===e&&(e=new gq(t,i,this.QLt),this.Dkt.set(t,e)),e}Tkt(t){const i=[];for(const e of t.jp)if(void 0===e.$At){for(const s of t.JEt)if(Nq(e.Rg,e.cSt,s)){const t=new rc(e,this.ykt(s.$At));i.push(t)}}else{const t=new rc(e,this.ykt(e.$At));i.push(t)}return i}Mkt(t,i){return new rc({Rg:t,$At:void 0,cSt:"",gs:void 0,_Et:void 0,l:"",oSt:!0,aSt:!1,uSt:!1,fSt:void 0,dSt:void 0,gEt:void 0},i)}Nkt(t,i){const e=i.filter((t=>t.Rg===ke.vm)),s=i.filter((t=>t.Rg===ke.Am)),n=t.cst&&(t.cst.YSt||t.cst.FSt);if((!n||t.cst.YSt)&&0===s.length){const e=this.Mkt(ke.Am,this.ykt(t.$At));i.push(e)}if((!n||t.cst.FSt)&&0===e.length){const e=this.Mkt(ke.vm,this.ykt(t.$At));i.push(e)}t.cst&&t.cst.cEt}Skt(t){for(const i of this.Akt)for(const e of i.aIt)if(e===t)return e}Ikt(t){for(const i of this.Akt)if(i===t)return i}Ekt(t){for(const i of this.Akt)if(ae(i.aIt,t))return i}Qd(){No(this.Akt),No(this.wkt),this.Dkt.clear(),this.vkt.Qd()}constructor(t,i){this.Akt=[],this.wkt=[],this.Dkt=Cn(),this.vkt=new pq,this.bkt=t,this.QLt=i}};function Nq(t,i,e){switch(t){case ke.vm:return e.AEt===i;case ke.Am:return e.yEt===i;case ke.pm:return e.pEt===i;case ke.fEt:return e.vEt===i}return!1}function Dq(t,i){return Nq(t.Rg,t.cSt,i)&&(!t.lSt||t.hSt.$At===i.$At)}var ns,Sq=class extends Yi{constructor(t){super(ns.Lkt),this.MSt=t}},Iq=class extends Yi{constructor(t){super(ns.kkt),this.MSt=t}},_c="HlsModelUpdater";!function(t){t.Lkt="Ckt",t.kkt="xkt"}(ns||(ns={}));var kc=class extends Bo{get Okt(){return this.jkt}get zkt(){return this.Pkt}get Tr(){return this.nvt}get Bkt(){return this.Rkt}async Ukt(t){const i=this.nvt.bkt;if(!i)throw new g("HLSModelUpdater - Could not load HLS playlist: The provided source is empty.");this.Co(new rk);const e=await this.Qkt(i,{},2,!0,t),s=e.hSt;if(!mH(s)&&!fc(s))throw new g("HLSModelUpdater - Could not load HLS playlist: The playlist is invalid.");mH(s)||Wr.Wp(_c,"Detected media playlist only HLS stream."),this.Fkt(s),e.Ykt&&(this.Pkt=!0,await this.Gkt(t)),this.jkt=!0}async Vkt(t,i,e,s){const n=this.nvt.Skt(t);if(!n)throw new g("HLSModelUpdater - Could not load HLS playlist for rendition: the rendition does not exist on the internal model.");const r={PEt:i,bLt:e,Vm:kq(n)},h=Jt(_.max(1,3*t.hSt.pLt));try{await this.Wkt(n,r,s,h)}catch(t){throw Kc(t),this.Hkt(n),t}}qkt(t,i){const e=this.nvt.Skt(t);if(!e)throw new g("HLSModelUpdater - Could not load HLS playlist for rendition: the rendition does not exist on the internal model.");const s={PEt:void 0,bLt:void 0,Vm:kq(e)},n=Jt(_.max(1,3*t.hSt.pLt));return this.Wkt(e,s,i,n)}Xkt(t,i){return this.Zkt.has(t.Mg)||this.Zkt.set(t.Mg,new Rs),ji(this.Zkt.get(t.Mg).Vb,i)}Hkt(t){this.Co(new Iq(t))}async Wkt(t,e,s,n){const r=t.hSt.QSt(e);let h;try{h=(await this.Qkt(r,e,0,this.Pkt,s,n)).hSt}catch(e){throw Kc(e),t.hSt.DLt=i.Jd(),e}if(!fc(h))throw new g("HLSModelUpdater - Could not load HLS playlist for rendition: the playlist is not a media playlist.");if(this.Kkt&&t!==this.Kkt&&!this.Kkt.hSt.vLt)try{await this.qkt(this.Kkt,s)}catch(i){Kc(i),this.Kkt=t,this.Jkt()}try{this.Fkt(h,t)}catch(i){if(i instanceof wh&&void 0!==e.Vm){const i=Tt({},e,{Vm:void 0});return this.Wkt(t,i,s,n)}throw i}this.$kt(t),this.Kkt=t}async Qkt(t,i,e,s,n,r){if(Wr.Wp(_c,"Loading HLS playlist at "+t+"."),s){const i=await this.tCt(t,n);if(void 0!==i)return{hSt:i,Ykt:!0}}return{hSt:await this.iCt(t,i,e,n,r),Ykt:!1}}async tCt(t,i){try{const e=await this.cot.Met([t]);if(fo(i),void 0!==e)return JH(e.responseURL,{},e.data)}catch(t){Kc(t)}}async iCt(t,i,e,s,n){const r={zu:t,aI:dm.Ru,lI:this.Oyt,oI:G.GET,Rg:N.GS,Hd:s,IS:n},h=await Wu((()=>this.eCt(r)),s,e);return JH(h.yI,i,h.Om)}async eCt(t){const i=await this.mI.MS(t);return{Om:await i.pI(),yI:i.yI}}async Gkt(t){fo(t);const i=[];for(const e of this.nvt.iIt)for(const s of e.aIt)i.push(this.sCt(s,t));await Promise.all(i)}async sCt(t,i){try{const e=await this.cot.Met([t.hSt.$At]);fo(i),void 0===e||t.hSt.vLt||await this.qkt(t,i)}catch(t){Kc(t)}}Jkt(){for(const t of this.nvt.iIt)for(const i of t.aIt)i!==this.Kkt&&void 0!==i.hSt.Ibt&&(i.hSt.vLt?this.$kt(i):i.hSt.FLt())}$kt(t){if(0!==t.hSt.Vet.length){if(!this.Kkt)return this.Kkt=t,void this.Kkt.hSt.WLt(0,void 0);if(this.nCt(this.Kkt),!this.nCt(t)&&void 0===t.hSt.Ibt){const i=this.rCt(t,this.Kkt);Wr.JSt(_c,"Assuming global timeline offset of "+i+"s for rendition "+t.hSt.$At+"."),t.hSt.WLt(i,void 0)}}}rCt(t,i){if(Eq(t)){const e=t.hSt.Vet[0],s=i.hSt.Vet[0];return Wr.JSt(_c,"Synchronizing by start of VOD: "+s.RT+" vs "+e.RT),s.RT-e.Obt}const e=function(t,i){let e=t.length-1,s=i.length-1;for(;e>=0&&s>=0;){const n=t[e],r=i[s];if(n.rbt>r.rbt)e--;else if(n.rbt<r.rbt)s--;else if(n.ibt){if(r.ibt)return{segment:n,referenceSegment:r};s--}else e--}return}(t.hSt.Vet,i.hSt.Vet);if(void 0!==e){const{segment:t,referenceSegment:i}=e;return Wr.JSt(_c,"Synchronizing by start of discontinuity #"+i.rbt+": "+i.RT+" vs "+t.RT),i.RT-t.Obt}const s=Lq(t.hSt.Vet);if(void 0!==s){const t=Lq(i.hSt.Vet);if(void 0!==t){Wr.JSt(_c,"Synchronizing by PDT:",t.sbt.toISOString()+" vs "+s.sbt.getTime());return t.RT-s.Obt-(t.sbt.getTime()-s.sbt.getTime())/1e3}}const n=bq(i),r=bq(t);var h;const o=null!=(h=t.hSt.Ibt)?h:0;return Wr.JSt(_c,"Synchronizing by last segment:",n+" vs "+r),n-r+o}nCt(t){const i=this.nvt.Skt(t);if(!i)return!1;if(Eq(i))return!1;const e=function(t,i){return Fd(t,(t=>void 0!==t.Z8&&i.HLt(t.rbt)))}(i.hSt.Vet,this.nvt.XM);if(void 0===e)return!1;if(i.hSt.ILt===e.rbt)return!0;const s=this.nvt.XM.ekt(e.Z8,e).fN()-e.Obt;return Wr.JSt(_c,"Synchronize by media timestamp: "+s+"s for rendition "+t.hSt.$At+"."),i.hSt.WLt(s,e.rbt),(void 0===this.Kkt||void 0===this.Kkt.hSt.ILt||this.Kkt.hSt.ILt<e.rbt)&&(this.Kkt=i),!0}Fkt(t,i){var e;(this.nvt.kbt(t,i),fc(t)&&i)&&(this.Rkt=i,this.Co(new Sq(i)),null==(e=this.Zkt.get(i.Mg))||e.Qb(),this.Zkt.delete(i.Mg));this.Co(new Iu)}hCt(t,i){for(const e of this.nvt.iIt){const s=Po(e.sIt,(t=>t.hSt===i));void 0!==s&&void 0===t.YSt&&e.Mbt(s);const n=Po(e.eIt,(t=>t.hSt===i));void 0!==n&&void 0===t.FSt&&e.Mbt(n),void 0===s&&void 0===n||(e.cst=TH(e.cst,t))}}Qd(){this.Vo(),this.nvt.Qd(),this.Zkt.forEach((t=>t.Xd())),this.Zkt.clear()}constructor(t,i,e,s,n){super(),this.mI=t,this.cot=i,this.Oyt=e,this.jkt=!1,this.Pkt=!1,this.Kkt=void 0,this.Rkt=void 0,this.Zkt=Y(),this.nvt=new Tq(s,n)}};function Eq(t){return t.hSt.obt||t.hSt.ubt===qe.REt}function bq(t){const i=t.hSt.Vet;return i[i.length-1].UT}function Lq(t){return Fd(t,(t=>void 0!==t.sbt))}function kq(t){if(void 0!==t.hSt.bEt&&!t.hSt.obt&&!(void 0===t.hSt.mLt||i.Jd()/1e3-t.hSt.mLt>=t.hSt.bEt/2))return t.hSt.LEt?ph.qbt:ph.Hbt}var Cq,xq=class{get nt(){return this.wgt}zLt(t){if(0===t.hSt.hbt.length)return;this.oCt||(this.oCt=this.sA.wI(hh.Mm,void 0,void 0,void 0,void 0,Wt.DATE_RANGE),this.wgt.tt(this.oCt));oq(this.oCt,t.hSt.hbt,(i=>{var e;return null!=(e=t.hSt.ybt(i))?e:NaN}))}constructor(t,i){this.aCt=t=>{this.zLt(t.MSt)},this.CTt=t,this.sA=i,this.wgt=new Zi,this.CTt.yn(ns.Lkt,this.aCt)}},Oq=class extends Yi{constructor(){super(yc.$Dt)}},po=class{get uCt(){return this.wJ}get wf(){return lU(this.Fst.wf,this.Fst.KJ)}get Vet(){return this.omt}get Tgt(){return this.mgt}cCt(t){var i;return null==(i=this.dCt(t))?void 0:i.MSt}lut(t){this.wJ=t,this.lCt()}cut(t,i,e,s,n,r){this.omt.push({MSt:t,uot:i,fCt:ce.yB(n,r),_Ct:ce.yB(e,s)}),this.lCt()}dCt(t){return Po(this.omt,(i=>i._Ct.gr(t)))}Nht(t){return Po(this.omt,(i=>i.uot===t))}Qat(t,i){return Po(this.omt,(e=>e.MSt===t&&bc(e.uot,i)))}HJ(){const t=this.wf;t.U>0&&(this.mgt=t.jn(t.U-1))}lCt(){const t=this.Fst.wf;this.omt=this.omt.filter((i=>0!==t.Sn(i._Ct).U))}constructor(t){this.Fst=t,this.omt=[],this.wJ=void 0,this.mgt=void 0}},jq=class{get Rg(){return this.F0}get gCt(){return this.F0===f.vm||this.F0===f.Am}get wCt(){return this.Jrt}get ACt(){return this.vCt}get mCt(){return void 0!==this.pCt}yCt(){if(this.mCt)throw new g("Cannot perform new operation while BufferAppender is still busy")}jst(t){this.Fst!==t&&(this.yCt(),this.Fst=t,this.Jrt=new po(t))}MCt(){return this.pCt?this.pCt.Vb:Promise.resolve()}TCt(t){var i;const e=this.Jrt.Tgt,s=this.Jrt.wf;if(void 0===e)return!1;const n=_.min(t,e);var r;return null!=(r=null==(i=s.$P().oB(this.ACt).dA(n))?void 0:i.gr(e))&&r}NCt(t){return this.Jrt.cCt(t)}Xd(){this.Ax.Xd(),this.Ax=new er}cJ(t){this.yCt(),this.pCt=new Rs;const i=i=>{this.SCt.DCt(t),this.ICt(i)};this.dJ(t,this.Ax.Hd).then(i,i)}async dJ(t,i){Wr.JSt(es,"Appending initializer",nc(t.ECt.$At)),await this.Fst.cJ(t,i),Wr.JSt(es,"Appended initializer",nc(t.ECt.$At)),this.Jrt.lut(t)}Dut(t){this.yCt(),this.pCt=new Rs;const i=i=>{this.SCt.DCt(t),this.ICt(i)};this.bCt(t,this.Ax.Hd).then(i,i)}async bCt(t,i){const e=t.MSt;if(void 0===e.hSt.WIt)throw new g("MediaBufferWrapper - Cannot append HLSAsset to "+this.F0+" MediaBuffer for a HLSRendition with an undefined targetDuration.");const s=this.Jrt.wf.HP,n=this.Fst.wf;Wr.JSt(es,"Appending",nc(t.ECt.$At)),await this.Fst.oJ(t,i),Wr.JSt(es,"Appended",nc(t.ECt.$At),s,this.Jrt.wf.HP);const r=t.RT,h=r+t.ct,o=t.ECt,a=o.RT;var u;const c=o.RT+(null!=(u=o.ct)?u:0);this.Jrt.cut(e,o,r,h,a,c);const d=this.Fst.wf.oB(n),l=this.Jrt.Qat(e,o);if(this.Rg===f.Am)if(l)if(this.LCt(l))if(0===d.U){if(void 0===this.Jrt.Nht(o)){const t=this.Fst.KJ.Sn(new ce([r,h]));this.vCt=this.vCt.rB(t)}}else{const t=d.Cn(0),i=new ce([t,h]);if(this.vCt=this.vCt.oB(i),t>r){const i=this.Fst.KJ.Sn(new ce([r,t]));this.vCt=this.vCt.rB(i)}}else{const t=d.U>0&&d.Cn(0)<r?d.Cn(0):r;this.vCt=this.vCt.oB(new ce([t,h]))}else if(0===d.U){const t=this.Fst.KJ.Sn(new ce([r,h]));this.vCt=this.vCt.rB(t)}else{var _;const t=d.Cn(0),i=null==(_=n.dA(r))?void 0:_.jn(0),e=i&&i>r?i:r;if(t>e){const t=this.Fst.KJ.Sn(new ce([e,d.Cn(0)]));this.vCt=this.vCt.rB(t)}}t.ECt.Ebt&&this.Jrt.HJ()}LCt(t){const i=t._Ct,e=i.Cn(0),s=i.jn(i.U-1),n=i.XP(0),r=i.KP(i.U-1);return this.vCt.uB(e,s,n,r)}constructor(t,i,e,s,n){this.pCt=void 0,this.Ax=new er,this.vCt=ce.MB(),this.ICt=t=>{this.pCt&&(t?Ar(t)&&this.gCt?this.kCt.xW(this.Fst.wf.mB)?this.pCt.Qb():this.pCt.Yb(t):Mi(t)?this.pCt.Qb():this.pCt.Yb(t):this.pCt.Qb(),this.pCt=void 0)},this.F0=t,this.SCt=e,this.Fst=i,this.Jrt=s,this.kCt=n}},zq=class{async CCt(t,i,e,s){const n=await this.xCt(i,s);return await this.OCt.CCt(t,n,e)}async xCt(t,i){var e;if((null==(e=this.jCt)?void 0:e.zu)!==t){Wr.JSt("HLSDecryptor","Fetching new AES-128 decryption key from "+t+".");const e=await this.mI.MS({zu:t,aI:dm.PS,oI:G.GET,Hd:i,Rg:N.HS,cI:aa.iI,lI:this.Oyt}),s=await e.nj(),n=new j(s);this.jCt={zu:t,Om:n}}return this.jCt.Om}constructor(t,i,e){this.OCt=t,this.mI=i,this.Oyt=e,this.jCt=void 0}},Pq=class{async MS(t,i,e,s,n){const r=await this.zCt(t,i,e,dm.PS,s,n),h=await r.nj(n);return{httpStatusCode:r.SS,response:new j(h)}}async PCt(t,i,e,s,n){return(await this.zCt(t,i,e,dm.US,s,n)).rV(n)}async zCt(t,i,e,s,n,r){let h;t.Lmt&&(h=lh(t.Lmt.Cn,t.Lmt.U),0===h[0]&&h[1]===Da&&(h=void 0));const o=h?{Range:"bytes="+h[0]+"-"+h[1]}:void 0,a=new Pc({zu:t.LM,aI:s,hI:o,lI:this.Oyt,oI:G.GET,Rg:i,cI:e,dI:this.Lht,_I:s===dm.US,fI:n,Hd:r});try{const i=await this.cot.Eet(t.LM,h);if(fo(r),void 0!==i)return null==n||n(i.buffer.byteLength,i.buffer.byteLength),new jh({MS:a,aI:a.aI,Om:i.buffer})}catch(t){Kc(t)}return await Wu((()=>ji(this.mI.MS(a),a.Hd)),r,this.Dtt)}constructor(t,i,e,s,n=2){this.mI=t,this.cot=i,this.Lht=e,this.Oyt=s,this.Dtt=n}},yh=class{BCt(){return this.RCt.hSt.EEt}async UCt(t,e,s){if(!this.BCt())throw new g("Could not perform blocking playlist update.");try{await this.QCt(),fo(s),await this.CTt.Vkt(this.RCt,t,e,s),this.An=i.Jd()}catch(t){throw Mi(t)&&this.FCt(),t}this.FCt()}YCt(t){return this.CTt.Xkt(this.RCt,t)}FCt(){if(!this.GCt&&!this.VCt){const t=()=>{this.GCt=void 0};this.GCt=this.WCt(this.HCt.Hd).then(t,t)}}async QCt(){this.GCt&&(this.HCt.Xd(),this.HCt=new er,await this.GCt.catch(qo),this.GCt=void 0)}async WCt(t){for(;;){if(this.RCt.hSt.obt&&this.RCt.hSt.vLt)return;const e=i.Jd()-this.An,s=1e3*this.RCt.hSt.pLt;e<s&&await Di(s-e,t);try{await this.CTt.qkt(this.RCt,t)}catch(t){throw Kc(t),this.CTt.Hkt(this.RCt),t}this.An=i.Jd()}}Qd(){this.VCt=!0,Ys(this.QCt())}constructor(t,i){this.GCt=void 0,this.HCt=new er,this.An=-1/0,this.VCt=!1,this.CTt=t,this.RCt=i,this.FCt()}};!function(t){t[t.UEt=0]="UEt",t[t.QEt=1]="QEt",t[t.VS=2]="VS",t[t.WS=3]="WS"}(Cq||(Cq={}));var Ca="AssetExtractor",Bq=class{qCt(t,i,e){let s=i;for(const i of this.XCt){if(s>=t)return!0;if(s<i.Cn)return!1;if(s<i.jn){if(e<=i.jn)return!0;s=i.jn}}return s>=t}ZCt(t,i){const e=[];for(let s=0;s<this.XCt.length;s+=1){const n=this.XCt[s],r=t-n.Cn,h=n.Om.length,o=_.min(h,_.max(r,0)),a=_.max(0,i+r),u=Yo(n.Om,o,a);u.length&&(s=this.KCt(s,n,t,o,a),e.push(u))}return e}JCt(t,i){this.XCt.push({Cn:t,jn:t+i.length,Om:i})}KCt(t,i,e,s,n){let r=t;this.XCt.splice(r,1),r-=1,i.Cn<e&&(r+=1,this.XCt.splice(r,0,{Cn:i.Cn,jn:e,Om:Yo(i.Om,0,s)}));const h=e+n-s;return h<i.jn&&(r+=1,this.XCt.splice(r,0,{Cn:h,jn:i.jn,Om:Yo(i.Om,n)})),r}constructor(){this.XCt=[]}},Rq=class{get $Ct(){return this.txt}async ixt(){const t=await this.eG.read();if(t.done)throw this.txt=1/0,new g("No more data can be read from the given stream.");return this.txt+=t.value.length,t.value}async ext(t){await this.eG.cancel(t)}constructor(t,i){this.txt=i,this.eG=t.getReader()}},Uq=class{sxt(){this.nxt.Qb(),this.nxt=new Rs}rxt(t){const{kmt:i,Cmt:e}=Fq(this.jbt.Lmt),s=this.hxt.ZCt(i,e-i);Wr.JSt(Ca,"Collected "+s.length+" chunks.");for(const i of s)t.enqueue(i)}async readAndSliceOutAssetBytes(t){await this.oxt.Vb;const{kmt:i,Cmt:e}=Fq(this.jbt.Lmt);try{for(;;){const s=this.eG.$Ct,n=await this.eG.ixt(),r=n.length;Wr.JSt(Ca,"Read "+r+" at "+s+" for extraction of "+nc(this.jbt));const h=_.min(s+r,i)-s;if(!(h>0)){if(s+r<=e)return Wr.JSt(Ca,"Extracting the read data range for extraction of "+nc(this.jbt)),t.enqueue(n),this.sxt(),Ys(this.readAndSliceOutAssetBytes(t));{const i=e-s,h=Yo(n,0,i),o=Yo(n,i);return h.length>0&&(Wr.JSt(Ca,"Extracting "+h.length+" bytes for extraction of "+nc(this.jbt)),t.enqueue(h)),Wr.JSt(Ca,"Of the read "+r+" bytes, the last "+o.length+" will be stored locally for extraction of "+nc(this.jbt)),this.hxt.JCt(s+i,o),Wr.JSt(Ca,"Extraction of "+nc(this.jbt)+" completed as the entire request has been fulfilled."),this.axt(t),void(this.uxt&&(Wr.JSt(Ca,"Aborting stream upstream as no more bytes are needed from "+nc(this.jbt)+"."),await this.eG.ext("AssetExtraction - AbortOnEnd")))}}{const i=Yo(n,0,h),e=Yo(n,h);if(Wr.JSt(Ca,"Of the read "+r+" bytes, the first "+h+" will be stored locally for extraction of "+nc(this.jbt)),this.hxt.JCt(s,i),e.length>0)return Wr.JSt(Ca,"Extracting "+e.length+" bytes for extraction of "+nc(this.jbt)),t.enqueue(e),this.sxt(),Ys(this.readAndSliceOutAssetBytes(t))}}}catch(i){Wr.JSt(Ca,"Extraction of "+nc(this.jbt)+" completed as the entire source stream has been read."),this.axt(t)}}axt(t){t.close(),this.sxt(),this.cxt.Qb()}start(t){Wr.JSt(Ca,"Preparing to push all collected data to controller for extraction of "+nc(this.jbt)),this.rxt(t),Wr.JSt(Ca,"Collected data pushed to controller for extraction of "+nc(this.jbt));const{Cmt:i}=Fq(this.jbt.Lmt);this.eG.$Ct>=i?(Wr.JSt(Ca,"Extraction of "+nc(this.jbt)+" completed as the entire request has been fulfilled."),this.axt(t)):(Wr.JSt(Ca,"Continuing read from original stream for extraction of "+nc(this.jbt)),Ys(this.readAndSliceOutAssetBytes(t)))}get dxt(){return this.cxt.Vb}pull(){return this.oxt.Qb(),this.oxt=new Rs,this.nxt.Vb}constructor(t,i,e,s){this.cxt=new Rs,this.jbt=t,this.eG=i,this.hxt=e,this.uxt=s,this.oxt=new Rs,this.nxt=new Rs}},Qq=class{NT(t){if(!pH(this.jbt,t))return!1;const{kmt:i,Cmt:e}=Fq(t.Lmt);return this.hxt.qCt(this.lxt.$Ct,i,e)}async O_t(t,i){void 0===i&&(i=!1);const e=this.lxt,s=this.hxt;if(Wr.Wp(Ca,"Extracting data from "+nc(t)+" out of "+nc(this.jbt)),this.fxt&&(Wr.JSt(Ca,"Awaiting previous extraction before extracting "+nc(t)+" out of "+nc(this.jbt)),await this.fxt),!this.NT(t))throw new g("The extractor does not contain the data requested");const n=new Uq(t,e,s,i);return this.fxt=n.dxt,new xi(n)}constructor(t,i){this.jbt=i;const{kmt:e}=Fq(this.jbt.Lmt);this.lxt=new Rq(t,e),this.hxt=new Bq}};function Fq(t){if(t){const i=t.Cn;return{kmt:i,Cmt:void 0!==t.U?i+t.U:Da}}return{kmt:0,Cmt:Da}}var Yq=class{async $n(){const t=await this._xt.PCt(this.jbt,N.WS,aa.tT,void 0,this.Ax.Hd);return new Qq(t,this.jbt)}NT(t){return pH(this.jbt,t)}async O_t(t,i){void 0===i&&(i=!1);const e=await this.Ugt;return await ji(e.O_t(t,i),this.Ax.Hd)}Xd(){this.Ugt.catch(qo),this.Ax.Xd()}constructor(t,i){this.jbt=t,this._xt=i,this.Ax=new er,this.Ugt=this.$n()}},Gq=class extends Yi{constructor(t){super(Zq.gxt),this.dI=t}},Vq=class extends Yi{constructor(t,i,e,s,n,r,h){super(Zq.wxt),this.uri=t,this.Axt=i,this.dI=e,this.mediaSequenceNumeber=s,this.mediaTrackId=n,this.vxt=r,this.httpStatusCode=h}};function Wq(t,i,e){const s=ps(e)?e:e.Lbt;if(i.HLt(s.rbt)){if(void 0!==e.Z8)return i.ekt(e.Z8,e).fN();if(e!==s&&void 0!==s.Z8){const t=i.ekt(s.Z8,s).fN();return e.RT+(t-s.RT)}}const n=t.hSt.Nht(s.PEt-1);if(void 0!==n&&i.HLt(n.rbt)){if(n.tbt.length>0){const t=n.Qbt(n.tbt.length-1);if(void 0!==t.Z8){const s=i.ekt(t.Z8,t).fN();return e.RT+(s-t.RT)}}if(void 0!==n.Z8){const t=i.ekt(n.Z8,n).fN();return e.RT+(t-n.RT)}}const r=t.hSt.Nht(s.PEt+1);if(void 0!==r&&i.HLt(r.rbt)){if(r.tbt.length>0){const t=r.Qbt(0);if(void 0!==t.Z8){const s=i.ekt(t.Z8,t).fN();return e.RT+(s-t.RT)}}if(void 0!==r.Z8){const t=i.ekt(r.Z8,r).fN();return e.RT+(t-r.RT)}}return e.RT}function Hq(t){return void 0!==t.Z8}function qq(t,i,e,s){for(let n=i;n<t.length;n++){const i=t[n];if(i.rbt!==e)break;if(Hq(i)){if(s(i,n))break}}}function Xq(t,i,e,s){for(let n=i;n>=0;n--){const i=t[n];if(i.rbt!==e)break;if(Hq(i)){if(s(i,n))break}}}var Zq,Kq="HlsPlaylistDownloader";!function(t){t.gxt="segmentdownloadprogress",t.wxt="segmentdownloaded"}(Zq||(Zq={}));var Jq=class extends Bo{mxt(t){this.pxt.Qd(),this.pxt=new yh(this.CTt,t),this.mCt?this.yxt=t:(this.RCt=t,this.Mxt=0,this.Txt=void 0,this.Nxt=void 0)}get mCt(){return void 0!==this.Dxt}MCt(){return this.Dxt?this.Dxt.Vb:Promise.resolve()}Sxt(){return this.SCt.Sxt()}Ixt(t){this.SCt.Ixt(t)}Xd(){var t,i,e;this.Ext.Xd(),this.Ext=new er,null==(t=this.bxt)||t.Xd(),this.bxt=void 0,null==(i=this.Lxt)||i.Xd(),null==(e=this.kxt)||e.Xd(),this.Lxt=void 0,this.kxt=void 0,this.Mxt=0,this.Txt=void 0,this.Nxt=void 0}Qd(){this.pxt.Qd()}get MSt(){var t;return null!=(t=this.yxt)?t:this.RCt}get Cxt(){if(!this.RCt.hSt.obt||void 0===this.Txt)return!1;const t=this.RCt.hSt.Nht(this.Txt);if(!t.Ebt)return!1;if(void 0!==this.Nxt){if(!t.Qbt(this.Nxt).Ebt)return!1}return!0}xxt(t){const i=this.RCt.hSt.LLt(t);if(!i)return!1;if(void 0!==this.Txt){const e=i.PEt===this.Txt;return void 0!==this.Nxt?i.Fbt(t)===i.Qbt(this.Nxt)&&e:e}return!1}Oxt(t){let i;if(void 0===this.Txt||t<this.Mxt-1e-6)i=this.jxt(t);else if(i=this.zxt(this.Txt,this.Nxt),void 0!==i){const[e,s]=i,n=Wq(this.RCt,this.CTt.Tr.XM,null!=s?s:e),r=3*this.RCt.hSt.WIt;_.abs(n-t)>=r&&(i=this.jxt(t))}else if(this.RCt.hSt.obt){if(this.RCt.hSt.Nht(this.Txt).Ebt&&(i=this.jxt(t),void 0!==i&&i[0].PEt===this.Txt))return}if(i){this.Mxt=t;const[e,s]=i;return 0===(null==s?void 0:s.Cbt)&&void 0!==e.ct?[e,void 0]:[e,s]}}jxt(t){let i,e;const s=this.RCt.hSt.Vet;if(0===s.length)return;const n=this.CTt.Tr.XM,r=Sn.fD(t),h=function(t,i,e){const s=t.hSt.Vet;if(0===s.length)return;const n=t.hSt.kLt(e.fN());if(!i.HLt(n.rbt))return;const r=n.PEt-s[0].PEt,h=n.rbt;let o,a,u,c=0;if(Xq(s,r,h,((t,i)=>(o=t,c=i,!0))),void 0===o&&(qq(s,r+1,h,((t,i)=>(o=t,c=i,!0))),void 0===o))return;return i.ekt(o.Z8,o).vN(e)?(a=o,qq(s,c+1,h,(t=>i.ekt(t.Z8,t)._N(e)?(u=t,!0):(a=t,!1)))):(u=o,Xq(s,c-1,h,(t=>i.ekt(t.Z8,t).vN(e)?(a=t,!0):(u=t,!1)))),void 0!==a&&void 0!==u?[a,u]:void 0}(this.RCt,n,r);let o;if(void 0!==h){const[t,i]=h,e=n.ekt(t.Z8,t),s=n.ekt(i.Z8,i),a=r.NN(e).fN()/s.NN(e).fN()*(i.RT-t.RT);o=t.RT+a}else o=t;const a=s[s.length-1];return a.UT<=o?(i=a,e=a.Gbt(o)):s[0].RT>o?(i=s[0],e=i.Qbt(0)):(i=this.RCt.hSt.LLt(o),e=null==i?void 0:i.Gbt(o)),i?[i,e]:void 0}zxt(t,i){let e,s;if(e=this.RCt.hSt.Nht(t),e&&void 0!==i){if(0===e.tbt.length)return[e,void 0];s=e.Qbt(i+1)}return void 0!==e&&void 0!==s||(e=this.RCt.hSt.Nht(t+1),s=null==e?void 0:e.Qbt(0)),e?[e,s]:void 0}yCt(){if(this.mCt)throw new g("Cannot perform new operation while PlaylistDownloader is still busy")}Pxt(t){this.yCt(),this.Dxt=new Rs,this.Bxt(t,this.Ext.Hd).then(this.Rxt,this.Rxt)}Uxt(){this.pxt.FCt()}async Bxt(t,i){if(this.RCt.hSt.obt)return;let e=this.Oxt(t);for(!e&&this.pxt.BCt()&&void 0!==this.Txt&&(await this.pxt.UCt(void 0===this.Nxt?this.Txt+1:this.Txt,void 0!==this.Nxt?this.Nxt+1:void 0,i),e=this.Oxt(t)),!e&&this.pxt.BCt()&&void 0!==this.Txt&&(await this.pxt.UCt(this.Txt+1,0,i),e=this.Oxt(t));!e;){Wr.Wp(Kq,"No next segment / part available, need to update playlist before continuing."),await this.pxt.YCt(i);const s=this.MSt.hSt.Vet;s[0].RT>t&&(this.Nxt=void 0,this.Txt=void 0);s[s.length-1].PEt<this.Txt&&(this.Nxt=void 0,this.Txt=void 0),e=this.Oxt(t)}}Qxt(){return this.SCt.Fxt()}Yxt(){this.yCt();try{const t=this.RCt.hSt.CLt(rt.UEt);t&&this.Gxt(t);const i=this.RCt.hSt.CLt(rt.QEt);i&&this.Vxt(i)}catch(t){throw Kc(t),this.RCt.hSt.DLt=i.Jd(),this.CTt.Hkt(this.RCt),t}}Gxt(t){this.kxt&&!this.kxt.NT(t.$At)&&(this.kxt.Xd(),this.kxt=void 0),this.kxt||(this.kxt=new Yq(t.$At,this._xt))}Vxt(t){this.Lxt&&!this.Lxt.NT(t.$At)&&(this.Lxt.Xd(),this.Lxt=void 0),this.Lxt||(this.Lxt=new Yq(t.$At,this._xt))}Tht(t,e,s){this.yCt(),Wr.Wp(Kq,"Starting download of segment "+nc(t.$At)+" and part "+(null==e?void 0:e.Cbt)),this.Dxt=new Rs,this.Wxt(t,e,s,this.Ext.Hd).catch((t=>{throw Kc(t),this.RCt.hSt.DLt=i.Jd(),this.CTt.Hkt(this.RCt),t})).then(this.Rxt,this.Rxt)}async Wxt(t,i,e,s){let n;if(t.ebt){var r,h;if(!e||!yH(e.ECt.$At,null==(r=t.ebt)?void 0:r.$At)||t.rbt!==e.rbt){var o;null==(o=this.bxt)||o.Xd(),this.bxt=new Rs;const i=this.Hxt(t.ebt,t,s).then((()=>{this.bxt=void 0}));this.bxt.Zd(i)}n=null==(h=this.bxt)?void 0:h.Vb}await this.qxt(t,i,n,s)}async Hxt(t,i,e){const s=await this.Xxt(t,i,e),n=s.ebt.Om.Om.byteLength;this.SCt.Zxt(s),this.Co(new Vq(s.ebt.ECt.$At,s.Rg,this.F0,i.PEt,s.MSt.Mg,n,s.ebt.xot)),Wr.JSt(es,"Download initializer complete",nc(t.$At))}async qxt(t,i,e,s){const n=await this.Kxt(t,i,s),r=n.uot.Om.Om.byteLength;var h;e&&await ji(e,s),this.SCt.Zxt(n),this.Co(new Vq(n.uot.ECt.$At,n.Rg,this.F0,t.PEt,n.MSt.Mg,r,n.uot.xot)),Wr.JSt(es,"Download complete",nc(null!=(h=null==i?void 0:i.$At)?h:t.$At))}async Kxt(t,i,e){let s;if(i){if(this.Lxt)if(this.Lxt.NT(i.$At)){const t=await this.Lxt.O_t(i.$At),n=await bt(t,e),r=new j(n);s=tX(i,await this.CCt(r,i.KEt,e),200)}else this.Lxt.Xd(),this.Lxt=void 0;s||(Wr.JSt(es,"Start download",nc(i.$At)),s=await this.Jxt(i,e))}else Wr.JSt(es,"Start download",nc(t.$At)),s=await this.Sht(t,e);return this.Txt=t.PEt,this.Nxt=null==i?void 0:i.Cbt,{Rg:"uot",uot:s,MSt:this.RCt,rbt:t.rbt}}async Xxt(t,i,e){let s;if(this.kxt){var n;if(this.kxt.NT(t.$At)){const n=await ji(this.kxt.O_t(t.$At),e),r=await bt(n,e),h=new j(r);s=$q(t,i,await this.CCt(h,t.$Et?[t.$Et]:[],e),200)}Wr.Wp(Kq,"MAP is required for segment, downloading MAP data."),null==(n=this.kxt)||n.Xd(),this.kxt=void 0}return s||(Wr.JSt(es,"Start download",nc(t.$At)),s=await this.$xt(t,i,e)),{Rg:"ebt",ebt:s,MSt:this.RCt,RT:i.RT,rbt:i.rbt,KEt:i.KEt}}async $xt(t,i,e){const{response:s,httpStatusCode:n}=await this._xt.MS(t.$At,N.VS,aa.qS,void 0,e),r=t.$Et?[t.$Et]:[];return $q(t,i,await this.CCt(s,r,e),n)}async Sht(t,i){if(!t.$At)throw new g("Internal error: attempted to download an incomplete segment");let e,s;try{this.tOt(t);const n=await this._xt.MS(t.$At,N.VS,aa.tT,this.iOt,i);e=n.response,s=n.httpStatusCode}finally{this.eOt()}return function(t,i,e){return{Om:{Om:i,Rg:dt.$H},Rg:Cq.VS,xot:e,ECt:t,rbt:t.rbt}}(t,await this.CCt(e,t.KEt,i),s)}async Jxt(t,i){let e,s;try{this.tOt(t);const n=await this._xt.MS(t.$At,N.VS,aa.tT,this.iOt,i);e=n.response,s=n.httpStatusCode}finally{this.eOt()}return tX(t,await this.CCt(e,t.KEt,i),s)}async CCt(t,i,e){const s=Po(i,(t=>t.oI===ea.TEt));return s?s.$At&&s.NEt?await this.sOt.CCt(t,s.$At,s.NEt,e):(Wr.lt(Kq,"Encountered an AES-128 encrypted segment for which no initialization vector could be determined."),t):t}tOt(t){var e,s,n;this.nOt=t,this.rOt=0,this.hOt=i.Jd(),this.oOt=0,this.aOt=null!=(n=null==(s=t.$At)||null==(e=s.Lmt)?void 0:e.U)?n:0}eOt(){this.nOt=void 0,this.rOt=0,this.hOt=0,this.oOt=0,this.aOt=0}uOt(){if(void 0!==this.nOt)return{uot:this.nOt,cOt:this.oOt,dOt:this.aOt,lOt:i.Jd()-this.hOt}}fOt(t){return void 0!==this.nOt&&(0!==this.rOt&&(!(this.aOt>0&&this.oOt>=this.aOt)&&!(t-this.rOt<500)))}constructor(t,e,s,n,r,h,o,a){super(),this.yxt=void 0,this.Dxt=void 0,this.nOt=void 0,this.rOt=0,this.hOt=0,this.oOt=0,this.aOt=0,this.Ext=new er,this.bxt=void 0,this.Mxt=0,this.Txt=void 0,this.Nxt=void 0,this.kxt=void 0,this.Lxt=void 0,this.Rxt=t=>{this.yxt&&(this.RCt=this.yxt,this.yxt=void 0,this.Mxt=0,this.Txt=void 0,this.Nxt=void 0),this.Dxt&&(t&&!Mi(t)?this.Dxt.Yb(t):this.Dxt.Qb(),this.Dxt=void 0)},this.iOt=(t,e)=>{this.oOt=t,t>0&&0===this.rOt&&(this.rOt=i.Jd()),void 0!==e&&(this.aOt=e),this.Co(new Gq(this.F0))},this.F0=t,this.CTt=s,this.SCt=n,this.RCt=e,this.pxt=new yh(s,e),this.sOt=new zq(o,r,a),this._xt=new Pq(r,h,function(t){switch(t){case ke.Am:return Ws.Am;case ke.vm:return Ws.vm;case ke.pm:case ke.fEt:return Ws.Ru;default:return Ws.tT}}(e.Rg),a)}};function $q(t,i,e,s){return{Om:{Om:e,Rg:dt.$H},Rg:Cq.UEt,xot:s,ECt:t,rbt:i.rbt}}function tX(t,i,e){return{Om:{Om:i,Rg:dt.$H},xot:e,Rg:Cq.QEt,ECt:t,rbt:t.Lbt.rbt}}var Yu,vc=class{get uCt(){return this._Ot}get gOt(){const t=[];for(const e of this.wOt)if("uot"===e.Rg){const s=e.uot.ECt,n=Wq(e.MSt,this.vkt,s);var i;t.push({uot:s,MSt:e.MSt,RT:n,UT:n+(null!=(i=s.ct)?i:0)})}return t}get AOt(){const t=[];return this.vOt.forEach((i=>{for(const e of i.mOt)"uot"===e.Rg&&t.push({uot:e.ECt,MSt:e.MSt,RT:e.RT,UT:e.RT+e.ct})})),t}Zxt(t){"ebt"===t.Rg&&(this._Ot=t.ebt),this.wOt.push(t),this.pOt&&(this.pOt.Qb(),this.pOt=void 0)}Sxt(){return this.wOt[0]}Ixt(t){_s(this.wOt,t)}Fxt(){return null!=this.pOt||(this.pOt=new Rs),this.pOt.Vb}yOt(t){this.MOt(t.eht).yOt(t)}TOt(t){return this.MOt(t).TOt()}DCt(t){this.MOt(t.eht).DCt(t)}NOt(t){var i;null==(i=this.vOt.get(t))||i.Qd()}DOt(t){return this.MOt(t).DOt()}MOt(t){if(this.vOt.has(t))return this.vOt.get(t);{const i=new iX;return this.vOt.set(t,i),i}}Ub(){this.SOt(),this.IOt()}SOt(){this._Ot=void 0,No(this.wOt)}IOt(){this.vOt.forEach((t=>t.Ub()))}Qd(){this.vOt.forEach((t=>t.Qd())),this.vOt.clear(),this.Ub(),this.pOt&&(this.pOt.Xd(),this.pOt=void 0)}constructor(t){this.wOt=[],this.vOt=Cn(),this.pOt=void 0,this._Ot=void 0,this.vkt=t}},iX=class{get mOt(){return this.EOt}yOt(t){this.EOt.push(t),this.bOt&&(this.bOt.Qb(),this.bOt=void 0)}TOt(){return this.EOt[0]}DCt(t){_s(this.EOt,t)}DOt(){return null!=this.bOt||(this.bOt=new Rs),this.bOt.Vb}Ub(){No(this.EOt)}Qd(){this.Ub(),this.bOt&&(this.bOt.Xd(),this.bOt=void 0)}constructor(){this.EOt=[],this.bOt=void 0}},eX=1e-6,sX=class{get wf(){return this.GNt}get KJ(){return this.VNt}async cJ(t,i){const e=t.Om.Om;if(this.LOt(e),this.kOt.Rg===Wt.TTML){this.vkt.HLt(t.rbt)||await ji(this.vkt.XLt(t.rbt),i);const s=this.COt(e,t.rbt);for(const t of s)this.kOt.MI(t)}}async oJ(t,i){if(void 0===t.Om)return;const e=t.RT,s=e+t.ct;this.GNt=this.GNt.rB(ce.yB(e,s)).nB(eX),this.t$(t.xOt,t.OOt),this.i$(e,s),this.vkt.HLt(t.rbt)||await ji(this.vkt.XLt(t.rbt),i),this.uJ(t.Om.Om,t.rbt,t.ECt)}uJ(t,i,e){let s;this.LOt(t),s=this.kOt.Rg===Wt.WEBVTT?this.jOt(t,e):this.COt(t,i);for(const t of s)this.kOt.MI(t)}jOt(t,i){const e=VA(t),s=e.L;var n;const r=null!=(n=e.BD)?n:{RD:Sn.kN,lh:Sn.kN};for(const t of s){const e=Sn.fD(t.RT).NN(r.lh).MT(r.RD),s=this.vkt.ekt(e,i).fN(),n=s+(t.UT-t.RT);t.nN(s,n)}return s}COt(t,i){const e=this.vkt.ikt(i).fN();return Ov(t,this.kOt,{xD:0,OD:1/0,jD:e},Dt.APPLICATION_MP4)}LOt(t){this.kOt.Rg===Wt.DEFAULT&&(this.kOt.Rg=this.zOt(t)?Wt.WEBVTT:Wt.TTML)}zOt(t){return rv(Sg(Yh(hl(t),0,_.min(t.byteLength,16)),new Ha))}t$(t,i){this.VNt=this.VNt.rB(ce.yB(t,i)).nB(eX)}i$(t,i){this.VNt=this.VNt.oB(ce.yB(t,i))}constructor(t,i){this.GNt=ce.MB(),this.VNt=ce.MB(),this.kOt=t,this.vkt=i}},nX=class extends Yi{constructor(t,i){super(Yu.POt),this.MSt=t,this.cst=i}},rX=class extends Yi{constructor(t){super(Yu.BOt),this.MSt=t}},hX=class extends Yi{constructor(t,i){super(Yu.ROt),this.MSt=t,this.Ict=i}},oX=class extends Yi{constructor(t,i){super(Yu.UOt),this.MSt=t,this.QOt=i}};!function(t){t.POt="FOt",t.ROt="YOt",t.UOt="GOt",t.BOt="VOt"}(Yu||(Yu={}));var aX=class extends Bo{get WOt(){return this.HOt}qOt(t){for(const i of this.HOt)ae(t,i)||this.SCt.NOt(i);this.HOt=t}get mCt(){return void 0!==this.XOt}MCt(){var t,i;return null!=(i=null==(t=this.XOt)?void 0:t.Vb)?i:Promise.resolve()}yCt(){if(this.mCt)throw new g("Cannot perform new operation while transmuxer is still busy")}ZOt(t,i){}KOt(t){this.yCt(),this.XOt=new Rs;const i=i=>{this.JOt(t,i)};this.$Ot(t,this.Ax.Hd).then(i,i)}tjt(t){this.yCt(),this.XOt=new Rs;const i=i=>{this.JOt(t,i)};this.ijt(t,this.Ax.Hd).then(i,i)}JOt(t,i){this.XOt&&(!i||Mi(i)||function(t){return t instanceof mq}(i)?(Mi(i)||this.SCt.Ixt(t),this.XOt.Qb(),this.XOt=void 0):this.XOt.Yb(i))}ejt(t,i){this.Co(new nX(t,i))}sjt(t,i){this.Co(new hX(t,i))}njt(t,i,e){vq(i)&&this.Co(new oX(t,e))}rjt(t){this.Co(new rX(t))}yOt(t){ae(this.HOt,t.eht)&&this.SCt.yOt(t)}hjt(t){return this.SCt.TOt(t)}DCt(t){this.SCt.DCt(t)}ojt(t){return this.SCt.DOt(t)}Xd(){this.Ax.Xd(),this.Ax=new er}constructor(t,i,e){super(),this.XOt=void 0,this.Ax=new er,this.SCt=t,this.vkt=i,this.HOt=e}};function uX(t,i){return vq(t)?0:_.min(t.RT,i)}function gc(t,i){var e;return _.max(t.RT,i)+(null!=(e=t.ct)?e:0)}var cX=class extends aX{$Ot(t,i){fo(i);const e={Rg:"ajt",Om:t.ebt.Om,eht:this.WOt[0],rbt:t.rbt,ujt:{cst:"",KEt:t.KEt},RT:t.RT,MSt:t.MSt,ECt:t.ebt.ECt};return this.yOt(e),Promise.resolve()}async ijt(t,i){fo(i);const e=t.uot.ECt;let s;void 0!==e.Z8?(this.vkt.HLt(t.rbt)||await ji(this.vkt.XLt(t.rbt),i),s=this.vkt.ekt(e.Z8,e).fN()):s=e.RT;const n=uX(e,s),r=gc(e,n);var h;const o={Rg:"uot",Om:t.uot.Om,eht:this.WOt[0],xOt:n,OOt:r,RT:s,ct:null!=(h=e.ct)?h:0,jD:0,rbt:t.rbt,MSt:t.MSt,ECt:t.uot.ECt};this.yOt(o)}constructor(t,i,e){super(t,i,[e])}};function dX(t,i){let e=ce.MB();for(const s of t){let n=s.RT;if(s.MSt.hSt.obt&&vq(s.uot))n=0;else{const e=t=>s.MSt===t.MSt&&bc(t.uot,s.uot),r=Po(t,e);if(void 0!==r)n=_.min(n,r.UT);else{const t=Po(i,e);void 0!==t&&(n=_.min(n,t._Ct.jn(0)))}}e=e.rB(ce.yB(n,s.UT))}return e}var lX=.001,fX=class{get cjt(){return this.djt}get ljt(){return this.fjt}get _jt(){return this.gjt}get wjt(){return this.SCt}get MSt(){return this.fjt.MSt}mxt(t){this.fjt.mxt(t)}Ajt(t){const i=t.slice();for(let t=this.djt.length-1;t>=0;t--){const e=this.djt[t];if(!e.gCt)throw new g("Invalid state");const s=Yd(i,(t=>t.Rg===e.Rg));s>=0?(e.jst(i[s]),si(i,s)):si(this.djt,t)}for(const t of i){const i=new po(t);this.djt.push(new jq(t.Rg,t,this.SCt,i,this))}i.length>0&&this.SCt.Ub();const e=t.map((t=>t.Rg));this.gjt.qOt(e)}xW(t){var i;const e=(null==(i=this.CB)?void 0:i.xW(t))||!1;return e&&(this.Xd(),this.wjt.Ub()),e}vjt(t){for(const t of this.djt)if(t.Rg!==f.Ru||t.mCt)throw new g("Invalid state");const i=new po(t),e=new jq(f.Ru,t,this.SCt,i,this);this.djt=[e]}get uCt(){const t=this.SCt.uCt;if(t)return t;if(this.djt.length>0){const t=this.djt[0].wCt.uCt;if(t&&this.djt.every((i=>i.wCt.uCt===t)))return t}}yht(){for(const t of this.djt)t.wCt.lCt()}get mjt(){if(0===this.djt.length)return ce.MB();const t=dX(this.SCt.gOt.concat(this.SCt.AOt),xl(this.djt,(t=>t.wCt.Vet))).$P();let i=new ce([0,1/0]);for(const t of this.djt)i=i.Sn(t.wCt.wf);for(const t of this.djt)i=i.oB(t.ACt);return i=i.rB(t),i.nB(lX)}get pjt(){if(0===this.djt.length)return ce.MB();const t=dX(this.SCt.AOt,xl(this.djt,(t=>t.wCt.Vet))).$P();let i=new ce([0,1/0]);for(const t of this.djt)i=i.Sn(t.wCt.wf);return i=i.rB(t),i}yut(t){const i=this.mjt.dA(t,lX);return i?i.jn(i.U-1):t}xxt(t){return!!this.mjt.dA(t,lX)||this.fjt.xxt(t)}yjt(t){return this.pjt.gr(t,lX)}Mjt(t,i,e){for(const t of this.djt){const e=t.wCt,s=e.Tgt;if(void 0!==s&&i>=s&&!e.wf.$P().gr(s))return!0}return i-t<e}Xd(){this.Tjt(),this.Njt()}Tjt(){this.ljt.Xd()}Njt(){this._jt.Xd(),this.cjt.forEach((t=>t.Xd()))}Qd(){this.Xd(),this.ljt.Qd()}constructor(t,i,e,s){this.fjt=t,this.SCt=i,this.gjt=e,this.CB=s,this.djt=[]}};var _X=class extends Yi{constructor(){super(yc.eSt)}},gX=class extends Yi{constructor(){super(yc.tSt)}},wX="LazyMediaBuffer",AX=class extends Bo{get Fz(){return this.KC}get XJ(){return this.F0}get wd(){if(!this.Fst)throw new $i(td.MEDIA_LOAD_ERROR,"Cannot get the configuration of an uninitialized MediaBuffer.");return this.Fst.wd}get AW(){return this.SW}set AW(t){this.SW=t,this.Fst&&(this.Fst.AW=t)}Dq(){return this.Fst?this.Fst.Dq():this.Djt}get wf(){return this.Fst?this.Fst.wf:ce.MB()}get KJ(){return this.Fst?this.Fst.KJ:this.JJ.Cq}get yW(){return this.bW}set yW(t){this.bW=t,this.Fst&&(this.Fst.yW=t)}t$(t,i){Wr.JSt(wX,"Marking gap from "+t+" to "+i+"."),this.JJ.Oq(t,i),this.Fst&&this.Fst.t$(t,i)}i$(t,i){Wr.JSt(wX,"Removing gap from "+t+" to "+i+"."),this.JJ.jq(t,i),this.Fst&&this.Fst.i$(t,i)}Sjt(t){this.Fst=t,this.Fst.yW=this.bW,this.Fst.AW=this.SW;const i=this.JJ.Cq;for(let t=0;t<i.U;t++)this.Fst.t$(i.Cn(t),i.jn(t));var e;this.Djt&&(Wr.JSt(wX,"End of stream"),null==(e=this.Fst)||e.HJ());this.Fst.yn(Je.KH,this.Ds),this.Ijt.Qb(t)}Ejt(t){return ji(this.Ijt.Vb,t)}async oJ(t,i,e){const s=await this.Ejt(e);await s.oJ(t,i,e)}async e$(){const t=await this.Ejt();await t.e$()}async cJ(t,i,e){const s=await this.Ejt(e);await s.cJ(t,i,e)}async TT(t,i,e){const s=await this.Ejt(e);await s.TT(t,i,e)}async NJ(t,i){const e=await this.Ejt();await e.NJ(t,i)}HJ(){this.Djt=!0,this.Fst&&this.Fst.HJ()}aq(t){return!!this.Fst&&this.Fst.aq(t)}async cq(t){const i=await this.Ejt();await i.cq(t)}async gn(){var t;this.Vo(),null==(t=this.Fst)||t.fn(Je.KH,this.Ds)}constructor(t,i){super(),this.F0=t,this.bjt=i,this.KC=void 0,this.Fst=void 0,this.Ijt=new Rs,this.SW=20,this.Djt=!1,this.bW=30,this.JJ=new Tr}},vX="LazyMediaSource",mX=class{get wd(){return{Rg:I.Fx,K$:[],Yz:[]}}get rt(){throw new g("Not implemented")}get B$(){return this.Ljt}get R$(){return this.kjt}get wf(){return this.Pz?this.Pz.wf:ce.MB()}get ct(){return this.Pz?this.Pz.ct:this.UL}get Dq(){return!!this.Pz&&this.Pz.Dq}get t_(){return this.Pz?this.Pz.t_:new ce([0,1/0])}W$(t){this.UL=t,this.Pz&&this.Pz.W$(t)}HJ(){this.H8=!0,this.Pz&&this.Pz.HJ()}PJ(){this.H8=!1,this.Pz&&this.Pz.PJ()}Z$(t,i,e,s){this.Cjt=t,this.xjt=i,this.Ojt=Boolean(e),this.jjt=Boolean(s),this.Pz&&this.Pz.Z$(t,i,e,s)}aq(t){return!this.Pz||this.Pz.aq(t)}async cq(t){if(!this.aq(t))throw new g("LazyMediaSource - Unable to reconfigure MediaSource.");if(this.Pz)await this.Pz.cq(t);else{var i,e;this.sA.H3();const s=await this.sA.$n(t);S(this.UL)||s.W$(this.UL),this.H8&&s.HJ(),s.Z$(this.Cjt,this.xjt,this.Ojt,this.jjt),Wr.JSt(vX,"The MediaSource has been loaded."),this.zjt=!0,this.Pz=s,null==(i=this.Ljt)||i.Sjt(this.Pz.B$),null==(e=this.kjt)||e.Sjt(this.Pz.R$),this.Pjt.Qb(s),this.sA.q3()}}async Qd(){this.Pz&&await this.Pz.Qd()}constructor(t,i,e){this.sA=t,this.Ljt=void 0,this.kjt=void 0,this.Pjt=new Rs,this.Pz=void 0,this.zjt=!1,this.UL=NaN,this.H8=!1,this.Cjt=0,this.xjt=1/0,this.Ojt=!1,this.jjt=!1,i&&(Wr.JSt(vX,"Created lazy media buffer for audio."),this.Ljt=new AX(f.vm,this)),e&&(Wr.JSt(vX,"Created lazy media buffer for video."),this.kjt=new AX(f.Am,this))}};function pX(t,i){return void 0===i&&(i=!1),function(e,s){void 0===s&&(s="*");let n=MX(e,"tag");const r=MX(null==s?"*":s,"range"),h=[];let o,a,u,c=-1;for(;++c<r.length;)if(o=r[c].toLowerCase(),i||"*"!==o){for(a=-1,u=[];++a<n.length;)if(t(n[a].toLowerCase(),o)){if(!i)return n[a];h.push(n[a])}else u.push(n[a]);n=u}return i?h:void 0}}pX(((t,i)=>"*"===i||t===i||It(t,i+"-")),!0),pX(((t,i)=>{const e=t.split("-"),s=i.split("-");let n=0,r=0;if("*"!==s[r]&&e[n]!==s[r])return!1;for(n++,r++;r<s.length;)if("*"!==s[r]){if(!e[n])return!1;if(e[n]!==s[r]){if(1===e[n].length)return!1;n++}else n++,r++}else r++;return!0}),!0);var yX=pX(((t,i)=>{let e,s=i;for(;;){if("*"===s||t===s)return!0;if(e=s.lastIndexOf("-"),e<0)return!1;"-"===s.charAt(e-2)&&(e-=2),s=s.slice(0,e)}}));function MX(t,i){const e=t&&"string"==typeof t?[t]:t;if(!e||"object"!=typeof e||!("length"in e))throw new g("Invalid "+i+" `"+e+"`, expected non-empty string");return e}var TX,NX=16384,DX=71,SX=188,IX=2,EX=3;function bX(t){return LX(t)?1:function(t){return function(t){if(t.length<IX*SX)return-1;const i=t.length<EX*SX?IX:EX,e=_.min(1e3,t.length-i*SX);for(let s=0;s<=e;s++){let e=!0;for(let n=0;n<i;n++)if(t[s+n*SX]!==DX){e=!1;break}if(e)return s}return-1}(t)>=0}(t)?2:function(t){return null!==bx(hl(t),new Ha)}(t)?3:0}function LX(t){const i=Ig(t,0,_.min(t.length,NX));return Eh.fp(hl(i))}!function(t){t[t.tT=0]="tT",t[t.OA=1]="OA",t[t.Bjt=2]="Bjt",t[t.Rjt=3]="Rjt"}(TX||(TX={}));var kX=class{get Rg(){return this.F0}get wf(){return this.Fst.wf}get KJ(){return this.Fst.KJ}Ujt(t){return this.Fst===t}async cJ(t,i){await this.Fst.cJ(t.Om,{PK:t.MSt.Mg},i),void 0!==this.Qjt&&this.F0===f.Am&&LX(t.Om.Om)&&this.Qjt.tnt(t.Om.Om)}async oJ(t,i){fo(i),Wr.Wp("HlsMediaBuffer","Got media data, appending to "+this.F0+" MediaBuffer: "+nc(t.ECt.$At));const e=t.xOt,s=t.OOt,n={Z8:t.RT,ct:t.ct,jD:t.jD,PK:t.MSt.Mg};void 0!==t.Om&&(await this.Fst.oJ(t.Om,n,i),this.Fjt(t.Om,t)),this.Yjt(e,s)}Fjt(t,i){var e;if(!LX(t.Om))return;const s=i.RT,n=s+i.ct,r=i.jD;if(null==(e=this.Igt)||e.cut(t.Om,s,r),void 0!==this.Qjt&&this.F0===f.Am){const e=i.ECt.Ebt;this.Qjt.cut(t.Om,s,n,r,i.MSt,e)}const h=[];void 0!==this.Igt&&h.push(this.Igt),void 0!==this.Qjt&&h.push(this.Qjt),cm(this.wf,h)}Yjt(t,i){const e=this.Fst.wf,s=new ce([t,i]).oB(e);for(let t=0;t<s.U;t++)this.Fst.t$(s.Cn(t),s.jn(t));for(let t=0;t<e.U;t++)this.Fst.i$(e.Cn(t),e.jn(t))}t$(t,i){this.Fst.t$(t,i)}i$(t,i){this.Fst.i$(t,i)}constructor(t,i,e,s){this.F0=t,this.Fst=i,this.Igt=e,this.Qjt=s}};function CX(t){if(t.Rg!==ke.fEt||void 0===t.dSt)return;const i=t.dSt.match(/^CC([1-4])$/);if(i)return Number(i[1]);const e=t.dSt.match(/^SERVICE([\d+])$/);return e?Number(e[1]):void 0}var xX=class{qIt(t){var i,e,s;return null==(s=null==(e=this.Pz)||null==(i=e.R$)?void 0:i.aq(t))||s}XIt(t){var i,e,s;return null==(s=null==(e=this.Pz)||null==(i=e.B$)?void 0:i.aq(t))||s}constructor(t){this.Pz=t}},Ss="LLHLSPlayer",OX=[Zt.jw,Zt.zw,Zt.Pw,Zt.H_],jX=[Co.ww,Co.Wg,Co.ew,Co.$g],zX=2e3,PX=class extends Bo{get cA(){var t;const i=[this.Gjt,this.Vjt].filter(Dd);if(0===i.length||this.ct!==1/0)return;const e=null==(t=this.vf)?void 0:t.getTime();if(e){return(Date.now()-e)/1e3}let s;for(const t of i){const i=t.hSt.t_;if(0===i.U)continue;const e=i.jn(i.U-1)+t.hSt.hyt,n=t.hSt.MLt,r=e+(null!=n?n:0)-this.Mf;(!s||s<r)&&(s=r)}return s}Wjt(){if(void 0===this.Hjt)return!1;const t=i.Jd();if(!this.Hjt.ljt.fOt(t))return!1;const e=this.Hjt.ljt.uOt();if(void 0===e||void 0===e.uot.ct)return!1;const s=this.Mf,n=this.Gf,r=this.Hjt.mjt.dA(s);if((void 0!==r?r.jn(0)-s:0)>=2*e.uot.ct*n)return!1;if(e.cOt>0&&0===e.dOt)return e.lOt>1e3*e.uot.ct*.8;return 8*e.dOt/this.CB.oW.cz>=1.8*e.uot.ct}async qjt(){var t;const i=await this.JIt();if(void 0===i)return;const e=null==(t=this.Hjt)?void 0:t.ljt.uOt();if(void 0===e)return;const s=this.Xjt;if(e.dOt>0){if(_.max(0,e.dOt-e.cOt)<=e.dOt*(i.cz/s.cz))return}const n=i.cz<s.cz;await this.ESt(i,{bSt:n})}Zjt(t){return ol(t,(t=>t.cz))}async Kjt(){let t=await this.Jjt();if(0===t.length)return;const i=await this.$jt(t);i.length>0&&(t=i);const e=this.Zjt(t);void 0!==e&&(await this.ESt(e,{bSt:!0}),this.Qz.GIt(e.cz))}get tzt(){const t=[this.Vjt,this.Gjt].filter(Dd);for(const i of t){if(!i.hSt.obt)return!1;const t=i.hSt.Vet,e=t[t.length-1];if(e&&e.rbt!==this.izt)return!1}return!0}get TSt(){return this.Xjt}get PSt(){return this.Vjt}get RSt(){return this.Gjt}get ezt(){return this.szt}get ht(){return this.oT}get wf(){return this.sA.wf.ks()}get SSt(){const t=[];if(this.Xjt){const i=this.sA.Mf;for(const e of this.nzt)for(const s of e.cjt){const e=s.NCt(i);e&&!ae(t,e)&&t.push(e)}}return t}get vf(){if(this.Xjt){const t=this.sA.Mf;return this.Xjt.pbt(t)}}set vf(t){if(!t||!this.Xjt)return;const i=this.Xjt.ybt(t);void 0!==i&&this.Dm(i,!1,!0)}get bt(){return this.rzt}get Mf(){var t;return null!=(t=this.hzt)?t:this.sA.Mf}set Mf(t){this.Dm(t,t===1/0,!0)}Dm(t,e,s){var n;void 0===e&&(e=!1),void 0===s&&(s=!1),Wr.Wp(Ss,"Seeking to "+t+" s."),this.hzt=t,this.ozt=e,this.azt=!0,this.ETt=!0,null==(n=this.bz)||n.y_(),this.Co(new lo(t)),this.B2.Xd(),this.uzt&&(i.$d(this.czt),s?this.czt=i.ul((()=>this.dzt(t,e)),50):this.dzt(t,e))}dzt(t,e){i.$d(this.czt);const s=[this.Ugt,this.lzt,this.R2].filter(Dd);this.B2=new er,this.R2=this.U2(s,t,e,this.B2.Hd).catch(this.fzt)}get ct(){var t,i,e,s,n,r,h;if(!this.tzt)return null!=(h=null!=(r=null!=(n=null==(t=this.Vjt)?void 0:t.hSt.ct)?n:null==(i=this.Gjt)?void 0:i.hSt.ct)?r:null==(s=this.CTt)||null==(e=s.Bkt)?void 0:e.hSt.ct)?h:[this.Vjt,this.Gjt].filter(Dd).every((t=>function(t){if(void 0===t)return!1;return t.hSt.Vet.length>0&&!t.hSt.obt}(t)))?1/0:NaN;const o=this.sA.ct;if(S(o)){var a,u;const t=null==(u=this.CTt)||null==(a=u.Bkt)?void 0:a.hSt.ct;if(void 0!==t)return t}return o}get Sf(){if(!this.tzt)return!1;if(this.e_&&this.uzt){var t,i;const e=this.Mf,s=null==(t=this.Vjt)?void 0:t.hSt.ct,n=null==(i=this.Gjt)?void 0:i.hSt.ct;return!(void 0!==s&&e<s)&&!(void 0!==n&&e<n)}return this.sA.Sf}get lt(){return this.xz}get bf(){return this.Oz}get kf(){}get xf(){return!1}get jf(){return Tt({},{dT:0,lT:0,fT:0,_T:0,gT:0,wT:{amountOfBufferedAudioSegments:0,amountOfBufferedVideoSegments:0}},this.sA.zf(),{gT:this.tTt,_T:this.CB.oW.cz})}get Tr(){var t;return null==(t=this.CTt)?void 0:t.Tr}get Pf(){return this.sA.Pf}set Pf(t){this.sA.Pf=t}get Uf(){return this.$pt}set Uf(t){this.$pt!==t&&(this.$pt=t,this.Co(t?new ec:new RV))}get Ff(){return this.sA.Ff}get Gf(){return this.sA.Gf}set Gf(t){Wr.Wp(Ss,"Setting playback rate to "+t+"."),this.sA.Gf=t}get Hf(){return this.rTt.ks()}get rTt(){return this.sA.Hf}get Xf(){return this.zz}set Xf(t){this.zz!==t&&(this.zz=t,this._zt())}get Jf(){let t=this.sA.Jf;return this.aTt&&(t=_.max(oe.Xn,t)),t}get t_(){return this.JMt.ks()}get JMt(){let t=this.X$;const i=[this.Vjt,this.Gjt].filter(Dd);if(t.U>0&&i.some((t=>!t.hSt.obt))){const e=this.rTt,s=t.jn(t.U-1);if(e.U>0&&e.jn(e.U-1)>s){let n=e.jn(e.U-1);const r=function(t){return t.reduce(((t,i)=>t.Sn(i.hSt.oLt)),new ce([0,1/0]))}(i);r.U>0&&(n=_.min(n,r.jn(r.U-1))),t=t.rB(new ce([s,n]))}}return t}PLt(){let t=function(t){if(0===t.length)return ce.MB();let i=new ce([0,1/0]),e=0;for(const s of t){const t=s.hSt.t_;t.U>0&&(i=i.Sn(t),e=_.max(e,t.Cn(0)))}if(i.U>0)return i;return ce.pB(e)}([this.Vjt,this.Gjt].filter(Dd));0!==t.U&&(this.Pz&&this.tzt&&this.Pz.ct!==1/0&&(t=new ce([t.Cn(0),this.Pz.ct])),this.X$=t,this.gzt&&this.Igt.bS(t.Cn(0)),this.wzt&&this.Qjt.bS(t.Cn(0)))}get e_(){var t;return null!=(t=this.azt)?t:this.sA.e_}get Bz(){}get nt(){return this.Dl}get rt(){return this.uT}get r_(){var t,i;return this.sA.r_||(null==(i=this.Xjt)||null==(t=i.WSt)?void 0:t.Ti)||0}get a_(){var t,i;return this.sA.a_||(null==(i=this.Xjt)||null==(t=i.WSt)?void 0:t.ji)||0}get c_(){return this.sA.c_}set c_(t){Wr.Wp(Ss,"Setting volume to "+t+"."),this.sA.c_=t}get f_(){return this.xB}get g_(){return!1}set g_(t){}get Uz(){return this.Qz}M_(){return!1}w_(){return this.sA.ya}be(){Wr.Wp(Ss,"Hiding the player."),this.sA.be()}m_(){var t;Wr.Wp(Ss,"Pausing the player."),this.sA.m_(),(null==(t=this.bz)?void 0:t.Ww)&&this.bz.m_()}async p_(){this.T2=!0;const t=this.sA.p_();if(this.Sf){const t=this.JMt;t.U>0&&this.Dm(t.Cn(0))}this.uzt||await this._zt(),this.EMt(),await t,this.oNt()}EMt(){var t;if(!this.KMt())if(null==(t=this.TSt)?void 0:t.hSt.obt){var i;let t=!0,e=0;const s=null==(i=this.Xjt)?void 0:i.hSt.Cn;if(!this.ETt&&s&&(t=!s.XEt,e=s.qEt,e<0)){const t=this.TSt.hSt.oLt;e+=t.jn(t.U-1)}this.dzt(e,t)}else this.dzt(1/0,!0);this.Azt()&&this.dzt(1/0,!0)}KMt(){var t;const i=this.JMt;if(0===i.U)return!0;const e=null==(t=this.vzt)?void 0:t.aB(this.Mf);return(e&&e>0?this.vzt.jn(e):this.Mf)>=i.Cn(0)}get vzt(){var t,i;const e=null==(t=this.mzt)?void 0:t.mjt,s=null==(i=this.Hjt)?void 0:i.mjt;return e?s?s.Sn(e):e:s}Azt(){return VX(this.Mf,this.Vjt)||VX(this.Mf,this.Gjt)}cNt(){this.xz=void 0,this.Oz=void 0}yP(t){this.xz||(Ys(this.tr()),this.xz=Zr(t),this.Oz=t,this.Co(new fh(t)))}ge(){Wr.Wp(Ss,"Showing the player."),this.sA.ge()}T_(){throw new g("Not implemented")}N_(){throw new g("Not implemented")}D_(){}S_(){this.uzt&&Ys(this.pzt(this.Vjt,this.Gjt,this.szt,{S_:!0}))}async ga(t,e,s){var n,r;if(Wr.Wp(Ss,"Setting the player source to "+t.src+"."),this.cNt(),this.rzt&&!Ft(this.rzt)&&(await this.tr(),fo(s)),!t.src||Ft(t))return;this.qz._z(t.contentProtection),this.rzt=t,this.yzt=t.seamlessSwitchStrategy,this.wzt=!ae(t.ignoreEmbeddedTextTrackTypes,Wt.CEA608),this.gzt=!ae(t.ignoreEmbeddedTextTrackTypes,Wt.EMSG),this.yn(yc.nSt,this.handleBufferingErrorEvent);const h=null!=(r=null==(n=t.latencyConfiguration)?void 0:n.targetOffset)?r:t.liveOffset;if(this.CTt=new kc(this.mI,this.cot,t.useCredentials,i.SA(t.src),h),this.CTt.yn(ns.Lkt,this.aCt),this.CTt.yn(ns.kkt,this.Mzt),this.CTt.yn(Co.cw,this.Ds),this.CTt.yn(Co.dw,this.Ds),t.hlsDateRange&&(this.Tzt=new xq(this.CTt,this.sA),this.Dl.pz(this.Tzt.nt)),null!=this.gjt||(this.gjt=this.Nzt.J8()),e.textTracks&&this.Xz(e.textTracks),t.latencyConfiguration){const i=t.latencyConfiguration;this.bz=new $u(this,this.sA,i),this.bz.Rt=!0,this.f_.ka(this.bz)}pm(this.Dl),this._zt()}_zt(){return this.Ugt=this.Dzt(this.Ugt,this.TI.Hd).catch(this.Twt),this.Ugt}async Dzt(t,i){if(t&&(await t,fo(i)),!this.CTt)return;const e=this.zz;e===pt.ZM||this.T2?await this.dit(i):e===pt.Mm&&await this.Szt(i)}async Szt(t){if(void 0===this.CTt||this.aTt)return;if(!this.CTt.Okt){try{await this.CTt.Ukt(t)}catch(t){throw Kc(t),this.Uf=!1,new $i(td.MANIFEST_LOAD_ERROR,"The provided HLS document could not be loaded - "+t.message,t)}this.Izt.znt()}const i=await this.Ezt();this.bzt(i);const e=this.Lzt(i.eIt),s=this.kzt(i.sIt),n=this.Czt(i.vbt);if(!n){const t=UX(i.mbt);t&&(Wr.Wp(Ss,"Detected initial closed caption rendition."),this.xzt(i,t))}await this.pzt(e,s,n,{Ozt:!0}),this.aTt=!0,this.kNt.zNt(),this.jzt()}jzt(){const t=[this.Vjt,this.Gjt].filter(Dd);if(t.some((t=>t.hSt.obt)))return;if(this.bz)return;const i=_.max(...t.map((t=>{var i;return null!=(i=t.hSt.hyt)?i:0}))),e={minimumOffset:.66*i,maximumOffset:2*i,targetOffset:1*i,forceSeekOffset:3*i,minimumPlaybackRate:mu,maximumPlaybackRate:ff};this.bz=new $u(this,this.sA,e),this.xB.ka(this.bz)}async Ezt(){if(this.zzt=this.CTt.Tr.iIt,!this.zzt.length)throw new $i(td.MANIFEST_LOAD_ERROR,"LLHLSPlayer - Could not select initial variant stream: the HLS stream contains no variant streams.");let t=await this.Pzt(this.zzt);if(0===t.length)throw new $i(td.MANIFEST_LOAD_ERROR,"LLHLSPlayer - Could not select initial variant stream: the HLS stream contains no variant stream with a supported codec.");const i=await this.$jt(t);return i.length>0&&(t=i),Wr.Wp(Ss,"Selecting initial active variant stream."),function(t,i,e,s){void 0===s&&(s=Pw.maximumBackoff);const n=function(t,i){if(void 0===i)return t;const e=i.preferredVideoCodecs,s=i.preferredAudioCodecs;if(void 0!==e){let i;for(const n of e){const e=t.filter((t=>t.cst&&t.cst.YSt&&ot(t.cst.YSt,n)));if(0===e.length)continue;if(void 0===s)return e;void 0===i&&(i=e);const r=QX(e,s);if(void 0!==r)return r}if(void 0!==i)return i}if(void 0!==s){const i=QX(t,s);if(void 0!==i)return i}return t}(t,i),r=YX(n,s);switch(e.mW.type){case da.BANDWIDTH:{const t=e.NW,i=r.filter((i=>i.cz<=t));if(i.length>0)return Hd(i,(t=>t.cz))}case da.PERFORMANCE:return ol(r,(t=>t.cz));case da.QUALITY:return Hd(r,(t=>t.cz))}}(t,this.rzt.abr,this.CB,this.Lut.maximumBackoff)}Lzt(t){if(this.Bzt){const t=this.Rzt(this.Bzt);if(t)return t}return FX(t)}kzt(t){if(this.Uzt){const t=this.Rzt(this.Uzt);if(t)return t}return FX(t)}Czt(t){for(const t of this.Dl.og)t.jg===L.Jn&&(this.Qzt=this.Fzt(t));if(this.Qzt){const t=this.Rzt(this.Qzt);if(t)return t}return UX(t)}Fzt(t){return Po(this.Xjt.vbt,(i=>t===this.Yzt.get(i.Mg)))}async dit(t){this.uzt||(await this.Szt(t),this.uzt=!0,await this.pzt(this.Vjt,this.Gjt,this.szt,{Ozt:!0}))}Xz(t){for(const i of t)i.src&&this.$z.gI(i)}xzt(t,i){if(!this.wzt)return;const e=function(t){const i=[];for(const e of t){const t=CX(e);void 0!==t&&i.push({k6:t,C6:e.gs||"",kh:e.l})}return i}(t.mbt);for(const t of e)this.Qjt.X_t(t);if(void 0!==i){const t=CX(i);this.Qjt.H_t(t).jg=L.Jn}}get nzt(){return[this.mzt,this.Hjt,this.Gzt].filter(Dd)}ISt(t){for(const i of t)if(!this.Vzt(i))throw new g("LLHLSPlayer - Could not set an allowed variant stream that does not exists in the internal HLS model.");this.zzt=t}Vzt(t){const i=this.Tr;return!!i&&ae(i.iIt,t)}Rzt(t){if(t&&this.Xjt)return Po(this.Xjt.aIt,(i=>i===t))}bzt(t){var i;if(Wr.Wp(Ss,"Setting active variant stream."),this.Xjt===t)return;const e=(null==(i=this.Xjt)?void 0:i.pEt)!==(null==t?void 0:t.pEt);if(this.Xjt&&e)for(const t of this.Xjt.vbt)this.NI(t);if(this.Xjt=t,this.Co(new _X),this.yTt(),t&&e)for(const i of t.vbt)this.Wzt(i)}Wzt(t){const i=this.sA.wI(hh.pm,void 0,t.l,t.gs,t.oSt,void 0,void 0,t.fSt.map(XW).filter(Dd));i.yn(na.ra,this.onTextTrackChange),this.Yzt.set(t.Mg,i),this.Hzt.tt(i)}NI(t){const i=this.Yzt.get(t.Mg);i&&(i.fn(na.ra,this.onTextTrackChange),this.Hzt.it(i),this.Yzt.delete(t.Mg),this.sA.NI(i))}async Jjt(){var t;const i=null!=(t=this.zzt)?t:this.Tr.iIt;if(0===i.length&&!this.zzt)return Wr.Wp(Ss,"The HLS stream does not contain any variant streams, skipping ABR selection."),[];if(1===i.length&&!this.zzt)return Wr.Wp(Ss,"The HLS stream contains only a single variant stream, skipping ABR selection."),[];const e=await this.Pzt(i);if(0===e.length)return Wr.$St(Ss,"LLHLSPlayer - No variant streams with supported codecs available to perform ABR selection on."),[];const s=YX(e,this.Lut.maximumBackoff);return 0===s.length?(this.qzt||(Wr.$St(Ss,"LLHLSPlayer - No variant streams with online renditions available to perform ABR selection on."),this.Xzt++,await this.Zzt(e)),[]):s}async Kzt(){const t=await this.JIt();if(void 0===t)return;const i=!!this.Xjt&&t.cz<this.Xjt.cz;await this.ESt(t,{bSt:i})}async JIt(){var t,i;const e=await this.Jjt();if(0===e.length)return;const s=function(t){const i=t.Mf,e=t.wf.dA(i);return e?e.jn(0)-i:0}(this.sA),n=await this.$jt(e),r={ji:this.sA.ji,Ti:this.sA.Ti,HIt:s,iut:null==(i=this.rzt)||null==(t=i.abr)?void 0:t.restrictToPlayerSize},h=await this.Jzt.JIt(e,this.Xjt,n,r,new xX(this.Pz));return!!this.Xjt&&h.cz<this.Xjt.cz||this.$zt(h,s)?h:void 0}$zt(t,e){var s;if(t===this.TSt)return!1;const n=this.TSt&&GX(this.TSt,this.Lut.maximumBackoff),r=GX(t,this.Lut.maximumBackoff);if(!n&&r)return!0;(!this.tPt||this.tPt.NSt.cz>t.cz)&&(this.tPt={NSt:t,hdt:i.Jd()});const h=i.Jd()-this.tPt.hdt;var o;const a=null!=(o=null==(s=this.RSt)?void 0:s.hSt.WIt)?o:1/0;return e>=_.max(a-1,5)||h>1e3}async Zzt(t){this.qzt=!0;let i=!1;for(const e of t)try{const t=this.Gjt?Po(e.sIt,(t=>xc(t,this.Gjt))):void 0;if(void 0===t)continue;await this.qkt(t),t.hSt.DLt=-1/0,i=!0}catch(t){}if(i)this.Xzt=0,await this.iPt();else{if(this.Xzt>=this.Lut.maxRetries)return void this.yP(new $i(td.MEDIA_LOAD_ERROR,"The provided video renditions could not be loaded."));const t=_.min(this.Lut.minimumBackoff*2**(this.Xzt-1),this.Lut.maximumBackoff);await Di(t)}this.qzt=!1,await this.Kzt()}async Pzt(t){let i=await Xd(t,(async t=>{var i,e,s;const n=[(null==(i=t.cst)?void 0:i.FSt)?'audio/mp4; codecs="'+t.cst.FSt+'"':void 0,(null==(e=t.cst)?void 0:e.YSt)?'video/mp4; codecs="'+t.cst.YSt+'"':void 0].filter(Dd);return 0===n.length||await this.ePt.Eq(n,null==(s=this.rzt)?void 0:s.useManagedMediaSource)}));return i.some((t=>{var i;return null==(i=t.cst)?void 0:i.YSt}))&&(i=i.filter((t=>!t.cst||t.cst.YSt||0!==t.sIt.length))),i.some((t=>{var i;return null==(i=t.cst)?void 0:i.FSt}))&&(i=i.filter((t=>!t.cst||t.cst.FSt||0!==t.eIt.length))),i}$jt(t){return this.CTt.zkt?Xd(t,(t=>async function(t,i){for(const e of t)if(!await i(e))return!1;return!0}([FX(t.eIt),FX(t.sIt),UX(t.vbt),UX(t.mbt)].filter(Dd),(t=>this.sPt(t))))):Promise.resolve([])}async sPt(t){if(0===t.hSt.Vet.length)return!1;const i=t.hSt.Vet[0];if(!i.$At)return!1;const e=i.$At,s=e.Lmt?lh(e.Lmt.Cn,e.Lmt.U):void 0;try{return await this.cot.Det(e.LM,s)}catch(t){return!1}}async ESt(t,i){if(!this.uzt)throw new g("LLHLSPlayer - The LLHLSPlayer is not loaded.");if(!t)throw new g("LLHLSPlayer - Cannot explicitly set the active variant stream to undefined.");if(!this.Vzt(t))throw new g("LLHLSPlayer - Trying to set an active variant stream that does not exists on the internal model.");if(t===this.Xjt)return void Wr.Wp(Ss,"Trying to set the already active variant stream, ignoring.");const e=this.Vjt?Po(t.eIt,(t=>xc(t,this.Vjt))):void 0,s=this.Gjt?Po(t.sIt,(t=>xc(t,this.Gjt))):void 0,n=this.szt?Po(t.vbt,(t=>xc(t,this.szt))):void 0;this.bzt(t),this.tPt=void 0,await this.pzt(e,s,n,i)}async BSt(t){if(!this.Xjt)return void(this.Bzt=t);const i=this.Rzt(t);if(t&&!i)throw new g("LLHLSPlayer - Trying to set an invalid rendition as the active audio rendition.");this.PSt!==i&&(Wr.Wp(Ss,"Switching audio rendition"),await this.pzt(i,this.Gjt,this.szt,{kSt:!0}))}async USt(t){if(!this.Xjt)return void(this.Uzt=t);const i=this.Rzt(t);if(t&&!i)throw new g("LLHLSPlayer - Trying to set an invalid rendition as the active video rendition.");this.RSt!==i&&(Wr.Wp(Ss,"Switching video rendition"),await this.pzt(this.Vjt,i,this.szt,{LSt:!0}))}async nPt(t){if(!t)throw new g("LLHLSPlayer - Cannot explicitly set the active subtitle rendition to undefined.");if(!this.aTt)return void(this.Qzt=t);const i=this.Rzt(t);if(!i)throw new g("LLHLSPlayer - Trying to set an invalid rendition as the active subtitle rendition.");Wr.Wp(Ss,"Switching subtitle rendition"),await this.pzt(this.Vjt,this.Gjt,i)}async rPt(t,i){if(this.qzt)return;const e=0===this.rt.U;t.Rg===ke.Am||t.Rg===ke.vm&&e?this.zzt&&this.zzt.length<=1?(t.Rg===ke.Am&&this.Gjt!==t?await this.pzt(this.Vjt,t,this.szt):t.Rg===ke.vm&&e&&this.Vjt!==t&&await this.pzt(t,this.Gjt,this.szt),await this.hPt(t,i)):await this.Kzt():await this.hPt(t,i)}async qkt(t,i){try{await this.CTt.qkt(t,i)}catch(e){throw Kc(e),(Cc(e)||$v(e))&&await this.rPt(t,i),e}}async hPt(t,i){if(!ae(this.oPt,t)){this.oPt.push(t);try{const e=t.Rg===ke.pm||t.Rg===ke.fEt?1/0:this.Lut.maxRetries;await Wu((()=>this.retryOfflineRenditionsCallback(t,i)),i,e,this.Lut.minimumBackoff,this.Lut.maximumBackoff)}catch(t){this.yP(new $i(td.MEDIA_LOAD_ERROR,t.message,t))}finally{_s(this.oPt,t),t.hSt.DLt===-1/0&&await this.iPt()}}}pzt(t,i,e,s){void 0===s&&(s={});const n={bSt:s.bSt||!1,kSt:s.kSt||!1,LSt:s.LSt||!1,S_:s.S_||!1,Ozt:s.Ozt||!1};return n.Ozt||n.S_||this.Vjt!==t||this.Gjt!==i||this.szt!==e?void 0===t&&void 0===i?Promise.reject(new g("Trying to buffer no media renditions.")):(this.Vjt=t,this.Gjt=i,this.szt=e,this.PLt(),this.Co(new gX),this.B2.Xd(),this.B2=new er,this.aPt.Xd(),this.aPt=new er,this.lzt=this.uPt([this.lzt,this.R2].filter(Dd),t,i,e,n,this.aPt.Hd).catch(this.fzt),this.lzt):Promise.resolve()}async cPt(t,i,e,s){var n,r;const h=[];if(h.push(this.dPt(i,s)),BW(t,i)||h.push(this.dPt(t,s)),null==(r=this.rzt)||null==(n=r.hls)?void 0:n.delaySubtitlePreload)return Promise.all(h).then((()=>this.dPt(e,s)));const o=this.dPt(e,s);return Promise.all([...h,o])}async dPt(t,i){if(t)try{await this.CTt.qkt(t,i)}catch(e){Kc(e),(Cc(e)||$v(e))&&await this.lPt(t,i)}}async lPt(t,i){if(this.qzt)return;const e=0===this.rt.U;if(t.Rg===ke.Am||t.Rg===ke.vm&&e)if(this.zzt&&this.zzt.length<=1)await this.hPt(t,i);else{const t=await this.Ezt();this.bzt(t);const i=this.Lzt(t.eIt),e=this.kzt(t.sIt),s=this.Czt(t.vbt);await this.pzt(i,e,s)}else await this.hPt(t,i)}async uPt(t,i,e,s,n,r){var h;if(!this.uzt)return void await this.cPt(i,e,s,r);await Promise.all(t.map((t=>t.catch(qo)))),this.fPt(),await this._Pt(r),await this.gPt();const o=[];n.kSt&&this.Pz&&this.Pz.B$&&o.push(this.Pz.B$.TT(0,1/0)),n.LSt&&this.Pz&&this.Pz.R$&&o.push(this.Pz.R$.TT(0,1/0)),await Promise.all(o),fo(r);const a=await this.wPt(i,e,n.S_,r);this.APt(i,e,n.bSt||a),this.vPt(s,n.bSt),fo(r);const u=[e,BW(i,e)?void 0:i,s].filter(Dd);try{await Promise.all(u.filter((t=>!t.hSt.vLt)).map((t=>{var i;return null==(i=this.CTt)?void 0:i.Xkt(t,r)})))}catch(t){Kc(t)}if(fo(r),this.q$(),this.PLt(),void 0!==this.hzt)this.dzt(this.hzt,this.ozt);else if(!this.ETt&&(null==(h=this.Xjt)?void 0:h.hSt.Cn)){const t=this.Xjt.hSt,i=t.Cn;let e=i.qEt;if(i.qEt<0){const i=t.oLt;e+=i.jn(i.U-1)}this.dzt(e,!i.XEt)}else!this.ETt&&u.every((t=>!t.hSt.obt))?this.dzt(1/0,!0):this.nzt.length>0&&this.mPt()}async wPt(t,i,e,s){var n,r;const h=void 0!==t&&t!==i,o=void 0!==i,a=await this.pPt(t,i,this.Xjt);if(fo(s),!e&&this.Pz&&!a)return!1;const u=void 0!==(null==(n=this.Pz)?void 0:n.B$),c=void 0!==(null==(r=this.Pz)?void 0:r.R$);if(!e&&!(h!==u||o!==c)&&a&&this.Pz&&this.Pz.aq(a))return await this._Pt(s),await this.Pz.cq(a),!0;for(const t of this.nzt)t.cjt.forEach((t=>t.Xd()));this.sA.H3();try{this.Pz&&await this.sA.tr(),this.Pz=await this.yPt(a,h,o)}finally{this.sA.q3()}return!0}async pPt(t,i,e){var s,n;const r=e.cst,h=[];if(void 0!==t){if(!r||!r.FSt)return;{const t='audio/mp4; codecs="'+r.FSt+'"';Wr.Wp(Ss,"Configuring MediaSource for initial audio rendition with codec: "+t+"."),h.push(t)}}if(void 0!==i){if(!r||!r.YSt)return;{const t='video/mp4; codecs="'+r.YSt+'"';Wr.Wp(Ss,"Configuring MediaSource for initial video rendition with codec: "+t+"."),h.push(t)}}if(0===h.length)return void Wr.$St(Ss,"No codecs found on the active variant stream.");var o;const a=null!=(o=null==i||null==(s=i.hSt.Vet[0])?void 0:s.KEt)?o:[];var u;const c=null!=(u=null==t||null==(n=t.hSt.Vet[0])?void 0:n.KEt)?u:[],d=this.CTt.Tr,l=await NH(this.rzt.contentProtection,h,d.gkt.concat(c).concat(a),this.mI,this.rzt.useCredentials);return{Rg:I.Fx,K$:h.map((t=>({Fz:t}))),Yz:l,u0:this.rzt.useManagedMediaSource}}async yPt(t,i,e){let s;return s=t?await this.sA.$n(t):new mX(this.sA,i,e),this.Pz=s,this.q$(),this.AMt(),this.vMt(),s}q$(){const t=this.Pz;if(t&&S(t.ct)){var i,e,s;const n=null!=(s=null==(i=this.Vjt)?void 0:i.hSt.ct)?s:null==(e=this.Gjt)?void 0:e.hSt.ct;void 0!==n&&n>0&&t.W$(n)}this.PLt()}AMt(){const t=this.Pz;t&&(t.R$&&(t.R$.AW=this.CB.IW),t.B$&&(t.B$.AW=this.CB.IW))}vMt(){const t=this.Pz;t&&(t.R$&&(t.R$.yW=this.CB.yW),t.B$&&(t.B$.yW=this.CB.yW))}APt(t,i,e){if(!this.Pz)throw new g("Invalid state");this.Pz.B$?this.Y$&&this.Y$.Ujt(this.Pz.B$)||(this.Y$=new kX(f.vm,this.Pz.B$,this.gzt?this.Igt:void 0,this.wzt?this.Qjt:void 0)):this.Y$=void 0,this.Pz.R$?this.G$&&this.G$.Ujt(this.Pz.R$)||(this.G$=new kX(f.Am,this.Pz.R$,this.gzt?this.Igt:void 0,this.wzt?this.Qjt:void 0)):this.G$=void 0;const s=BW(t,i);if(this.G$&&i){const t=s&&this.Y$?[this.G$,this.Y$]:[this.G$];this.Hjt?this.Hjt.MSt!==i&&(e&&(this.Hjt.Xd(),this.Hjt.wjt.Ub()),this.Hjt.mxt(i)):(this.Hjt=function(t,i,e,s,n,r,h,o,a,u){const c=s.Tr.XM,d=new vc(c),l=new Jq(f.Am,t,s,d,n,r,h,u),_=i.map((t=>t.Rg)),g=o.Gyt(d,s.Tr.XM,_),w=new fX(l,d,g,a);return w.Ajt(i),w}(i,t,this.sA,this.CTt,this.mI,this.cot,this.OCt,this.gjt,this.CB,this.rzt.useCredentials),this.Hjt.ljt.yn(Zq.gxt,this.MPt),this.Hjt.ljt.yn(Zq.wxt,this.TPt),this.Hjt._jt.yn(Yu.POt,this.NPt),this.Hjt._jt.yn(Yu.ROt,this.DPt),this.Hjt._jt.yn(Yu.UOt,this.SPt),this.Hjt._jt.yn(Yu.BOt,this.IPt)),this.Hjt.Ajt(t)}else{var n;null==(n=this.Hjt)||n.Qd(),this.Hjt=void 0}var r;this.Y$&&t&&!s?(this.mzt?this.mzt.MSt!==t&&(e&&(this.mzt.Xd(),this.mzt.wjt.Ub()),this.mzt.mxt(t)):(this.mzt=function(t,i,e,s,n,r,h,o,a,u){const c=s.Tr.XM,d=new vc(c),l=new Jq(f.vm,t,s,d,n,r,h,u),_=o.Gyt(d,s.Tr.XM,[i.Rg]),g=new fX(l,d,_,a);return g.Ajt([i]),g}(t,this.Y$,this.sA,this.CTt,this.mI,this.cot,this.OCt,this.gjt,this.CB,this.rzt.useCredentials),this.mzt.ljt.yn(Zq.wxt,this.TPt),this.mzt._jt.yn(Yu.POt,this.NPt),this.mzt._jt.yn(Yu.BOt,this.IPt)),this.mzt.Ajt([this.Y$])):(null==(r=this.mzt)||r.Qd(),this.mzt=void 0);this.EPt()}vPt(t,i){if(this.Gzt){this.Gzt.ljt.MSt===t?i&&(this.Gzt.Xd(),this.Gzt.wjt.Ub()):(this.Gzt.Qd(),this.Gzt=void 0)}if(!this.Gzt&&t){const i=this.Yzt.get(t.Mg);i.jg=L.Jn,this.Gzt=function(t,i,e,s,n,r,h){const o=e.Tr.XM,a=new sX(i,o),u=new vc(o),c=new Jq(f.Ru,t,e,u,s,n,r,h),d=new cX(u,o,f.Ru),l=new fX(c,u,d);return l.vjt(a),l}(t,i,this.CTt,this.mI,this.cot,this.OCt,this.rzt.useCredentials)}}EPt(){const t=[this.Y$,this.G$].filter(Dd).map((t=>t.Rg));this.CTt.Tr.XM.fkt(t)}async U2(t,i,e,s){await Promise.all(t.map((t=>t.catch(qo)))),fo(s),await this.gPt(),fo(s),this.hzt=void 0,this.azt=void 0,this.ETt=!0;const n=this.JMt.tB(i),r=this.sA.df(Co.pw,s);this.sA.Dm(n,e),this.uzt&&this.nzt.length>0&&(this.CTt.Tr.XM._kt(),this.bPt(this.sA.Mf),this.mPt()),await r,this.oNt()}oNt(){const t=this.cA;if(this.Ff||this.e_||void 0===t)return;const i=this.Mf;var e,s;t+this.Mf-this.f_.wd.maximumOffset<i?null==(e=this.bz)||e.Cn():null==(s=this.bz)||s.y_()}bPt(t){for(const i of this.nzt)i.xxt(t)||(i.Tjt(),i.wjt.SOt()),i.yjt(t)||(i.Njt(),i.wjt.IOt())}fPt(){for(const t of this.nzt)t.Xd()}gPt(){return Promise.all([this.LPt(),this.kPt(),this.CPt()])}mPt(){this.xPt(),this.OPt(),this.jPt()}async iPt(){this.uzt&&this.nzt.length>0&&(this.nzt.forEach((t=>t.Tjt())),await this.LPt(),this.xPt(),this.nzt.forEach((t=>t.ljt.Uxt())))}xPt(){if(this.zPt)return;const t=()=>{this.zPt=void 0};this.PPt=new er,this.zPt=this.BPt(this.PPt.Hd).catch(this.fzt).then(t,t)}async LPt(){var t;null==(t=this.PPt)||t.Xd();const i=this.zPt;this.zPt=void 0,i&&await i}async BPt(t){fo(t);const i=this.nzt;for(;;){const e=[],s=this.sA.Mf;for(const t of i){const i=t.ljt,n=t.yut(s);if(i.mCt)e.push(i.MCt());else if(t.Mjt(s,n,this.CB.IW)){const s=i.Oxt(n);if(void 0===s){if(i.MSt.hSt.obt)continue;const t=i.MSt.hSt.Vet;t.length&&t[0].RT>n&&(this.Mf=1/0),i.Yxt(),i.Pxt(n)}else{const[e,n]=s;i.Tht(e,n,t.uCt),t._jt.ZOt(e,n)}e.push(i.MCt())}}await Ph((t=>{if(0===e.length){i.every((t=>t.ljt.Cxt))||e.push(this.sA.df(Co.Iw,t));for(const s of i)e.push(s._jt.df(Yu.BOt,t))}return ji(Promise.race(e),t)}),t)}}OPt(){if(this.RPt)return;const t=()=>{this.RPt=void 0};this.UPt=new er,this.RPt=this.QPt(this.UPt.Hd).catch(this.fzt).then(t,t)}async kPt(){var t;null==(t=this.UPt)||t.Xd();const i=this.RPt;this.RPt=void 0,i&&await i}async QPt(t){fo(t);const i=this.nzt;for(;;){const e=[];for(const t of i){const i=t.ljt,s=t._jt;if(s.mCt)e.push(s.MCt());else{const t=i.Sxt();t?"uot"===t.Rg?(s.tjt(t),e.push(s.MCt())):"ebt"===t.Rg&&(s.KOt(t),e.push(s.MCt())):e.push(i.Qxt())}}if(0===e.length)break;await ji(Promise.race(e),t)}}jPt(){if(this.FPt)return;this.YPt=new er;const t=()=>{this.FPt=void 0};this.FPt=this.GPt(this.YPt.Hd).catch(this.fzt).then(t,t)}async CPt(){var t;null==(t=this.YPt)||t.Xd();const i=this.FPt;this.FPt=void 0,i&&await i}async GPt(t){for(;;){const i=this.nzt;i.forEach((t=>t.yht()));const e=[],s=[],n=[];for(const t of i){const i=t._jt;for(const r of t.cjt){const t=r.gCt?e:s;if(r.mCt)t.push(r.MCt());else if(!r.TCt(this.sA.Mf)){const e=i.hjt(r.Rg);e?"uot"===e.Rg&&e.rbt===this.izt?(r.Dut(e),t.push(r.MCt())):"ajt"===e.Rg&&e.rbt===this.izt&&(r.cJ(e),t.push(r.MCt())):n.push(i.ojt(r.Rg))}}}if(0===e.length){const e=xl(i,(t=>t.cjt.filter((t=>t.gCt)).map((i=>t._jt.hjt(i.Rg)))));if(e.length>0&&e.every((t=>void 0!==t&&"ajt"===t.Rg&&t.rbt!==this.izt))){const s=e,n=Hd(s,(t=>t.rbt)).rbt;if(s.every((t=>t.rbt===n))){const i=ol(s,(t=>t.RT)).RT,e=await this.VPt(s);this.WPt(e)?(Wr.JSt(hc,"Seamless switch from",this.Pz.wd,"to",e),await this.Pz.cq(e),Wr.JSt(hc,"Seamless switch complete.")):await this.HPt(i,e,t),this.izt=s[0].rbt}else for(const t of i)for(const i of t.cjt){let e=t._jt.hjt(i.Rg);for(;e&&e.rbt!==n;)t._jt.DCt(e),e=t._jt.hjt(i.Rg)}continue}}if(0===e.length&&0===s.length&&0===n.length){i.every((t=>t.cjt.length>0&&t.cjt.every((t=>t.TCt(this.sA.Mf)))))&&this.Pz.HJ();break}await ji(Promise.race([...e,...s,...n]),t)}}WPt(t){return this.yzt===wi.iT||this.yzt!==wi.eT&&this.Pz.aq(t)}async VPt(t){const i=t.map((t=>t.ujt.cst)),e=i.map((t=>({Fz:t}))),s=xl(t,(t=>t.ujt.KEt));s.push(...this.CTt.Tr.gkt);let n=await NH(this.rzt.contentProtection,i,s,this.mI,this.rzt.useCredentials);return 0===n.length&&this.Pz&&this.Pz.wd.Yz.length>0&&(n=this.Pz.wd.Yz),{Rg:I.Fx,K$:e,Yz:n,u0:this.rzt.useManagedMediaSource}}async HPt(t,i,e){var s;const n=this.Pz,r=n.ct,h=this.wf.length>0&&this.Mf<t;if(h)try{for(Wr.JSt(hc,"Marking end of stream and waiting for ended to switch discontinuity."),n.HJ();!this.sA.Sf&&this.sA.Mf<t;)await this.sA.df([Co.Iw,Co.Jg],e)}catch(t){throw n.PJ(),n.W$(r),t}Wr.JSt(hc,"Perform hard switch from",null==(s=this.Pz)?void 0:s.wd,"to",i);try{this.sA.H3(),this.Mf<t&&this.sA.Dm(t,!0,!0),this.G$=void 0,this.Y$=void 0,this.EPt(),await this.sA.tr(),this.Pz=await this.sA.$n(i),this.q$(),this.AMt(),this.vMt(),this.Pz.R$&&(this.G$=new kX(f.Am,this.Pz.R$,this.gzt?this.Igt:void 0,this.wzt?this.Qjt:void 0),this.G$.t$(t-1,t)),this.Pz.B$&&(this.Y$=new kX(f.vm,this.Pz.B$,this.gzt?this.Igt:void 0,this.wzt?this.Qjt:void 0),this.Y$.t$(t-1,t)),this.EPt()}finally{h&&Ys(this.sA.p_()),this.sA.q3()}if(this.Hjt){const t=void 0!==this.Y$&&void 0===this.mzt?[this.G$,this.Y$]:[this.G$];this.Hjt.Ajt(t)}this.mzt&&this.mzt.Ajt([this.Y$]),Wr.JSt(hc,"Hard switch complete.")}_Pt(t){return ji(Pl(xl(this.nzt,(t=>t.cjt.map((t=>t.MCt()))))),t)}yTt(){const t=this.a_,i=this.r_;this.ENt===t&&this.bNt===i||(this.ENt=t,this.bNt=i,this.Co(new tc))}async gn(){Wr.Wp(Ss,"Unloading the player."),this.qPt(),this.cNt(),await this.tr(),this.sA.nP=void 0,this.Hzt.gn(),await this.$z.gn(),await this.Igt.gn(),await this.Qjt.gn(),this.oT.gn(),this.uT.gn(),this.Dl.gn(),this.XPt.gn(),this.kNt.Qd(),this.OCt.Qd(),this.gjt&&(this.gjt.Qd(),this.gjt=void 0)}async tr(){Wr.Wp(Ss,"Resetting the player."),this.fn(yc.nSt,this.handleBufferingErrorEvent),this.izt=-1,this.TI.Xd(),this.TI=new er,this.B2.Xd(),this.B2=new er,this.aPt.Xd(),this.aPt=new er;const t=[this.Ugt,this.R2,this.lzt].filter(Dd);await Promise.all(t.map((t=>t.catch(qo)))),this.Ugt=void 0,this.R2=void 0,this.lzt=void 0,this.Vjt=void 0,this.Gjt=void 0,this.szt=void 0,this.zzt=void 0,this.Bzt=void 0,this.Uzt=void 0,this.Qzt=void 0,this.Bzt=void 0,this.Uzt=void 0,this.Qzt=void 0,this.bz=void 0,this.xB.tr(),this.oPt=[],this.bzt(void 0),this.fPt(),await this.gPt(),this.mzt&&(this.mzt.Qd(),this.mzt=void 0),this.Hjt&&(this.Hjt.Qd(),this.Hjt=void 0),this.Gzt&&(this.Gzt.Qd(),this.Gzt=void 0),this.Y$=void 0,this.G$=void 0,this.Pz=void 0,this.CTt&&(this.CTt.Qd(),this.CTt=void 0),this.Tzt&&(this.Dl.Tz(this.Tzt.nt),this.Tzt=void 0),await this.$z.tr(),await this.Igt.tr(),await this.Qjt.tr(),this.sA.tP(),await this.sA.tr(),this.rzt=void 0,this.uzt=!1,this.X$=ce.MB(),this.hzt=void 0,this.INt=void 0,this.ENt=0,this.bNt=0,this.azt=void 0,this.ETt=!1,this.T2=!1,i.$d(this.czt),this.aTt=!1,this.ZPt=!1,this.tTt=0,this.yzt=wi.ZM,this.XPt.tr(),this.KPt(),this.Co(new Ow(this.Mf,this.Jf))}KPt(){for(const t of this.oT.og)t.gn();for(const t of this.uT.og)t.gn();for(const t of this.Dl.og)t.gn();this.oT.tr(),this.uT.tr(),this.Dl.tr(),this.Yzt.clear()}JPt(){this.XPt.yn(OX,this.Ds),this.XPt.yn(Zt.Rw,this.lA),this.XPt.yn(Zt.Bw,this.$Pt),this.XPt.yn(Zt.Ow,this.tBt),this.CB.yn("wW",this.xNt),this.CB.yn("pW",this.ONt),this.sA.yn(jX,this.Ds),this.sA.yn(Co.Vg,this.handleContentProtectionErrorEvent),this.sA.yn(Co.Xg,this.iBt),this.sA.yn(Co.Jg,this.Mh),this.sA.yn(Co.Sh,this.eBt),this.sA.yn(Co.jh,this.sBt),this.sA.yn(Co.gw,this.nBt),this.sA.yn(Zt.H_,this.rO),this.sA.yn(Co.Iw,this.e4),this.sA.yn(Co.yw,this.We),this.sA.yn(Co.pw,this.aP),this.sA.yn(Co.mw,this.rBt),this.sA.yn(Co.Ew,this.hBt)}qPt(){this.XPt.fn(OX,this.Ds),this.XPt.fn(Zt.Rw,this.lA),this.XPt.fn(Zt.Bw,this.$Pt),this.XPt.fn(Zt.Ow,this.tBt),this.CB.fn("wW",this.xNt),this.CB.fn("pW",this.ONt),this.sA.fn(jX,this.Ds),this.sA.fn(Co.Vg,this.handleContentProtectionErrorEvent),this.sA.fn(Co.Xg,this.iBt),this.sA.fn(Co.Jg,this.Mh),this.sA.fn(Co.Sh,this.eBt),this.sA.fn(Co.jh,this.sBt),this.sA.fn(Co.gw,this.nBt),this.sA.fn(Zt.H_,this.rO),this.sA.fn(Co.Iw,this.e4),this.sA.fn(Co.yw,this.We),this.sA.fn(Co.pw,this.aP),this.sA.fn(Co.mw,this.rBt),this.sA.fn(Co.Ew,this.hBt)}constructor(t,e,s,n,r,h,o,a){super(),this.CB=s,this.xB=n,this.OCt=r,this.Nzt=h,this.Yzt=Y(),this.wzt=!0,this.gzt=!0,this.uzt=!1,this.rzt=void 0,this.Pz=void 0,this.Ugt=void 0,this.TI=new er,this.CTt=void 0,this.Bzt=void 0,this.Uzt=void 0,this.Qzt=void 0,this.Xjt=void 0,this.Vjt=void 0,this.Gjt=void 0,this.szt=void 0,this.zzt=void 0,this.oPt=[],this.Y$=void 0,this.G$=void 0,this.mzt=void 0,this.Hjt=void 0,this.Gzt=void 0,this.gjt=void 0,this.aPt=new er,this.lzt=void 0,this.B2=new er,this.R2=void 0,this.izt=-1,this.PPt=void 0,this.UPt=void 0,this.YPt=void 0,this.zPt=void 0,this.RPt=void 0,this.FPt=void 0,this.$pt=!0,this.Xzt=0,this.qzt=!1,this.zz=pt.PP,this.xz=void 0,this.Oz=void 0,this.X$=ce.MB(),this.oBt=[],this.hzt=void 0,this.ozt=!1,this.ETt=!1,this.T2=!1,this.INt=void 0,this.ENt=0,this.bNt=0,this.azt=void 0,this.czt=0,this.aTt=!1,this.ZPt=!1,this.yzt=wi.ZM,this.tPt=void 0,this.aBt=void 0,this.tTt=0,this.handleContentProtectionErrorEvent=t=>{this.xz=Zr(t.errorObject),this.Oz=t.errorObject,this.Ds(t)},this.handleBufferingErrorEvent=t=>{this.yP(new $i(td.MEDIA_LOAD_ERROR,t.lt.message,t.lt))},this.iBt=()=>{this.PLt();const t=this.ct;t!==this.INt&&(this.INt=t,this.Co(new os(this.INt)))},this.Mh=()=>{this.Sf&&this.Co(new ve(this.Mf))},this.eBt=()=>{this.Co(new iu(this.Mf))},this.sBt=()=>{this.EMt(),this.Co(new Qn(this.Mf))},this.lA=()=>{void 0!==this.aBt&&(i.$d(this.aBt),this.aBt=void 0),this.Co(new _e(this.Mf))},this.nBt=()=>{this.Co(new oa(this.Mf))},this.rO=()=>{this.Co(new Bn(this.Mf,this.Jf))},this.e4=()=>{const t=this.SSt;yl(this.oBt,t)||(this.Co(new Oq),this.oBt=t),this.Co(new Dr(this.Mf,this.vf))},this.MPt=Is((t=>{t.dI===f.Am&&this.Wjt()&&Ys(this.qjt())}),200),this.TPt=t=>{var i;this.tTt+=t.vxt;const e=this.rt.U>0?t.dI===f.Am:t.dI===f.vm;"uot"===t.Axt&&e&&Ys(this.Kzt()),this.Co(new RU(function(t){if(t){if(void 0!==t.Lmt){var i,e;const s=t.Lmt.Cn+(null!=(e=t.Lmt.U)?e:0);return{zu:t.LM,bht:[null==(i=t.Lmt)?void 0:i.Cn,s],lI:!0}}return{zu:t.LM.toString()||"",lI:!0}}return{zu:"",lI:!0}}(t.uri),(null==(i=this.TSt)?void 0:i.cz)||0,t.mediaSequenceNumeber,t.mediaTrackId,t.dI,t.httpStatusCode,t.vxt))},this.We=()=>{this.Co(new lo(this.Mf))},this.aP=()=>{this.Co(new _r(this.Mf))},this.rBt=()=>{this.yTt()},this.hBt=()=>{this.Co(new Tc(this.Mf,this.c_))},this.$Pt=()=>{this.sA.e_?this.Co(new qa(this.Mf)):(null!=this.aBt||(this.aBt=i.ul((()=>{this.ZPt&&(this.tPt=void 0,Ys(this.Kjt()))}),2500)),this.EMt(),this.Co(new qa(this.Mf)))},this.tBt=()=>{this.ZPt=!0,this.Co(new jw(this.Mf,this.Jf))},this.fzt=t=>{Mi(t)||Cc(t)||$v(t)||(this.fPt(),Ys(this.gPt()),this.Co(new oH(t)))},this.aCt=()=>{this.PLt()},this.Mzt=t=>{Ys(this.rPt(t.MSt))},this.Twt=t=>{if(Mi(t))return;const i=t instanceof $i?t:new $i(td.MEDIA_DECODE_ERROR,t.message,t);this.yP(i)},this.onTextTrackChange=t=>{if(!this.Xjt)return;const i=t.Lt,e=this.Fzt(i);e&&(i.jg===L.zg||i.jg===L.Jn?(Ys(this.nPt(e)),this.Yzt.forEach((t=>{t!==i&&(t.jg=L.Ch)}))):this.szt&&this.szt===e&&Ys(this.pzt(this.Vjt,this.Gjt,void 0)))},this.retryOfflineRenditionsCallback=async(t,i)=>{this.ezt!==t&&this.PSt!==t&&this.RSt!==t||(await this.CTt.qkt(t,i),t.hSt.DLt=-1/0)},this.xNt=()=>{this.AMt()},this.ONt=()=>{this.vMt()},this.NPt=t=>{const i=this.Xjt;if(!(null==i?void 0:i.wbt)&&(this.CTt.hCt(t.cst,t.MSt.hSt),this.Izt.hIt(),i)){const t=void 0!==this.Vjt&&!ae(i.eIt,this.Vjt),e=void 0!==this.Gjt&&!ae(i.sIt,this.Gjt);(t||e)&&this.pzt(t?void 0:this.Vjt,e?void 0:this.Gjt,this.szt).catch(qo)}},this.DPt=t=>{this.Izt.uIt(t.MSt,t.Ict)},this.SPt=t=>{this.Izt.dIt(t.MSt,t.QOt.fN())},this.IPt=t=>{this.CTt.nCt(t.MSt)},this.cot=new cW(o),this.sA=t,this.mI=e,this.Qz=new hH(this.CB.oW),this.ePt=new aH(this.sA),this.Jzt=new vH(this.CB),this.Lut=a.retryConfiguration,this.oT=new Ur,this.uT=new Ur,this.Izt=new ZW(this,this.CB,this.oT,this.uT),this.Hzt=new Zi,this.$z=new Tu(this.sA,this.mI),this.Igt=new aW(this.sA),this.Qjt=new ZF(this.sA),this.Dl=new zs([this.Hzt,this.$z.Z,this.Igt.Z,this.Qjt.Z]),this.qz=new yN(this.mI),this.sA.nP=this.qz,this.kNt=new RX(this,this.sA),this.XPt=new Gu(this.kNt,!0),this.JPt()}},BX=class{async TP(t,i){if(!mw(t.type))return!1;if(t.useNativePlayback)return!1;const e=t.contentProtection;if(e&&!Qg(e)){if(!Gg(e))return!1;if(!await this.yet(e))return!1}return!0}async yet(t){return!!t.aes128||(!(!t.playready||!await i.kC())||(!(!t.widevine||!await i.EC())||(!(!t.clearkey||!await i.LC())||!t.fairplay&&await i.RC())))}},RX=class extends X{get Jf(){return this.Qo.Jf}zNt(){this.Co(new Bn(this.Mf,this.Jf))}constructor(t,i){super(i),this.Qo=t}};function UX(t){const e=Po(t,(t=>t.oSt)),s=t.filter((t=>t.aSt)),n=i.oit,r=s.map((t=>t.gs)).filter(Dd),h=yX(r,n);return h?Po(s,(t=>t.gs===h)):e}function QX(t,i){for(const e of i){const i=t.filter((t=>t.cst&&t.cst.FSt&&ot(t.cst.FSt,e)));if(0!==i.length)return i}}function FX(t){var i;return null!=(i=UX(t))?i:t[0]}function YX(t,i){return t.filter((t=>GX(t,i)))}function GX(t,e){const s=e+zX,n=0===t.sIt.length||t.sIt.some((t=>t.hSt.DLt<i.Jd()-s)),r=0===t.eIt.length||t.eIt.some((t=>t.hSt.DLt<i.Jd()-s));return n&&r}function VX(t,i){if(!i||i.hSt.obt)return!1;const e=i.hSt.Vet;return 0!==e.length&&e[0].RT>t}var WX=class{async CCt(t,i,e){try{const s=await crypto.subtle.importKey("raw",i,{name:"AES-CBC"},!1,["decrypt"]),n=await crypto.subtle.decrypt({name:"AES-CBC",iv:e},s,t);return new j(n)}catch(t){throw new $i(td.CONTENT_PROTECTION_INTERNAL_ERROR,"Error during AES128 decrypt.")}}Qd(){}static YC(){return"undefined"!=typeof crypto&&void 0!==crypto.subtle&&void 0!==crypto.subtle.decrypt}},HX=class extends Yi{constructor(t,i){super(t),this.data=i}},qX=["message","messageerror","error"],XX=class extends Yi{constructor(t){super(ut.ha),this.error=t}},ZX=class extends Bo{get uBt(){return this.cBt.Hd.Bd}dBt(t,i){this.uBt||(void 0!==this.lBt?this.lBt.dBt(t,i):this.fBt.push({bb:t,_Bt:i}))}gBt(){this.uBt||(this.cBt.Xd(),No(this.fBt),void 0!==this.lBt&&this.lBt.gBt())}constructor(t){super(),this.lBt=void 0,this.fBt=[],this.wBt=t=>{if(this.uBt)t.gBt();else{this.lBt=t,this.lBt.yn(qX,this.Ds);for(const i of this.fBt)t.dBt(i.bb,i._Bt);No(this.fBt)}},this.ABt=t=>{if(this.uBt)return;const i=t instanceof g?t:new g("Could not create Worker.");this.Co(new XX(i)),this.gBt()},this.cBt=new er,t(this.cBt.Hd).then(this.wBt,this.ABt)}};var KX=class extends Bo{dBt(t,i){i?this.lBt.postMessage(t,i):this.lBt.postMessage(t)}gBt(){this.Vo(),this.lBt.removeEventListener("message",this.vBt),this.lBt.removeEventListener("messageerror",this.mBt),this.lBt.removeEventListener("error",this.U3),this.lBt.terminate()}constructor(t,i){super(),this.vBt=t=>{this.Co(new HX("message",t.data))},this.mBt=t=>{this.Co(new HX("messageerror",t.data))},this.U3=t=>{null==t.preventDefault||t.preventDefault.call(t);const i=t.error instanceof g?t.error:new g(t.message);this.Co(new XX(i)),this.gBt()},this.lBt=new sd(t,i),this.lBt.addEventListener("message",this.vBt),this.lBt.addEventListener("messageerror",this.mBt),this.lBt.addEventListener("error",this.U3)}},JX=0,$X=class extends Bo{dBt(t,i){i?this.pBt.contentWindow.postMessage({type:"message",data:t},"*",i):this.pBt.contentWindow.postMessage({type:"message",data:t},"*")}gBt(){var t;this.pBt.removeEventListener("load",this.yBt),self.removeEventListener("message",this.MBt),null==(t=this.pBt.contentWindow)||t.postMessage({type:"terminate"},"*"),hs(this.pBt)}constructor(t,e){super(),this.yBt=()=>{this.pBt.removeEventListener("load",this.yBt),this.pBt.contentWindow.postMessage({type:"initialize",id:this.IT,script:this.TBt},"*")},this.MBt=t=>{t.origin===this.NBt&&t.data.id===this.IT&&("initialized"===t.data.type||("error"===t.data.type?(this.Co(new XX(new g(t.data.data.message))),this.gBt()):this.Co(new HX("message",t.data.data))))},this.IT=JX++,this.TBt=t;const s=i.Dh("iframe.html",e);this.pBt=function(t){const i=h.createElement("iframe");return i.width="0",i.height="0",i.style.display="none",i.src=t,h.body.appendChild(i),i}(s.href),this.NBt=s.origin,this.pBt.addEventListener("load",this.yBt),self.addEventListener("message",this.MBt)}};function tZ(t,e,s){const n=i.SA(t,e);return new ZX((t=>async function(t,e,s,n){let r;try{return r=new KX(t,s),await nZ(r,n),r}catch(t){null==r||r.gBt(),Kc(t)}if(sZ&&ih){let e;try{const s=await i.uO.MS({zu:t,oI:G.GET,aI:dm.Ru,Hd:n});e=await s.pI(n)}catch(t){Kc(t)}if(e){let t;try{const i=ih([e],{type:"application/javascript"});return t=URL.createObjectURL(i),r=new KX(t,s),await nZ(r,n),r}catch(t){null==r||r.gBt(),Kc(t),sZ=!1}finally{t&&URL.revokeObjectURL(t)}}}try{return r=new $X(t,e),await nZ(r,n),r}catch(t){throw null==r||r.gBt(),t}}(n,e,s,t)))}var iZ,eZ,sZ=!0;async function nZ(t,i){const e=await t.df(["message","error"],i);if("error"===e.type)throw function(t){return new $i(td.CONFIGURATION_ERROR,"THEOplayer workers could not be loaded. Please check the configuration of the libraryLocation.",t)}(e.error);if(!function(t){return Nn(t)&&"7.10.0"===t.DBt}(e.data))throw new $i(td.CONFIGURATION_ERROR,"THEOplayer workers could not be loaded. Please check that the worker's version matches THEOplayer's version (7.10.0).");return e}!function(t){t.SBt="CCt",t.IBt="ext"}(iZ||(iZ={})),function(t){t.EBt="bBt",t.LBt="kBt"}(eZ||(eZ={}));var rZ=class{CBt(){const t=tZ(this.xBt,this.OBt,{name:"THEOplayer decrypt worker"});return t.yn("message",this.jBt),t.yn("error",this.zBt),t}CCt(t,i,e){const s=""+ ++this.PBt,n={BBt:iZ.SBt,RBt:s,UBt:t,QBt:i,FBt:e},r=new Rs;return this.YBt.set(s,r),null!=this.lBt||(this.lBt=this.CBt()),this.lBt.dBt(n),r.Vb}Qd(t){void 0===t&&(t=new is),this.YBt.forEach((i=>i.Yb(t))),this.YBt.clear(),this.lBt&&(this.lBt.gBt(),this.lBt=void 0)}constructor(t){this.lBt=void 0,this.PBt=0,this.YBt=Cn(),this.jBt=t=>{const i=t.data,e=i.GBt,s=this.YBt.get(e);if(s)if(this.YBt.delete(e),i.VBt===eZ.EBt)s.Qb(i.WBt);else if(i.VBt===eZ.LBt){const t=i.HBt,e=i.qBt?new g(i.qBt):void 0,n=new $i(td.CONTENT_PROTECTION_INTERNAL_ERROR,"Error during AES128 decrypt. (code: "+t+")",e);s.Yb(n)}},this.zBt=t=>{const i=new $i(td.CONTENT_PROTECTION_INTERNAL_ERROR,t.error.message,t.error);this.Qd(i)},this.OBt=t;try{this.xBt=i.SA("theoplayer.d.js",t)}catch(t){throw new $i(td.CONFIGURATION_ERROR,"Invalid player configuration: missing libraryLocation",t)}}};function hZ(t){return WX.YC()?new WX:new rZ(t)}function oZ(t){const i=Po(t.boxes,fk);if(!i)return;const e=Po(i.boxes,_k);return e?e.handlerType:void 0}function aZ(t){const i=new Gy;return i.boxes.push(...t.boxes),i}function uZ(t){const i=new Ju;return i.boxes.push(...t.boxes),i}var cZ=8;function dZ(t,i){const e=function(t){const i=new py;return i.boxes.push(...t.boxes),i}(t),s=fZ(i);for(let t=0;t<e.boxes.length;t++){const n=e.boxes[t];if(n===i)e.boxes[t]=new Up(new j(i.getSize()-cZ));else if(gk(n)){const i=n,r=Yd(i.boxes,(t=>t instanceof Ru&&t.trackId===s));if(r>=0){const s=i.boxes[r],n=uZ(i);n.boxes[r]=new Up(new j(s.getSize()-cZ)),e.boxes[t]=n}}}return e}function lZ(t,i){const e=function(t){const i=new Ey;return i.boxes.push(...t.boxes),i}(t);for(let t=0;t<e.boxes.length;t++){const s=e.boxes[t];if(vk(s)){const n=Po(s.boxes,mk);n&&n.trackId===i&&(e.boxes[t]=new Up(new j(s.getSize()-cZ)))}}return e}function fZ(t){return Po(t.boxes,lk).trackId}function _Z(t,i,e,s){const n=Po(t.boxes,mk),r=e.uD(i).QN();let h=Ce.ZERO;for(const i of t.boxes){if(i instanceof Lu){h=ig(i.baseMediaDecodeTime,r),i.baseMediaDecodeTime=i.baseMediaDecodeTime.subtract(h);break}if(i instanceof vr){h=ig(Ce.fromNumber(i.baseMediaDecodeTime),r),i.baseMediaDecodeTime-=h.toNumber();break}}if(h.isZero())return;const o=Po(t.boxes,pk);if(void 0!==o&&o.samples.length>0){const t=o.samples;if(!o.flags.sampleDurationPresent){o.flags.sampleDurationPresent=!0;const i=null!=s?s:n.defaultSampleDuration;for(const e of t)e.duration=i}t[0].duration+=h.toNumber(),o.samples=t}}var gZ="Mp4Transmuxer",wZ=class extends aX{$Ot(t,i){fo(i);const e=t.MSt,s=Vk(hl(t.ebt.Om.Om));if(!s)throw new g("Mp4Transmuxer - Unable to parse "+e.Rg+" MP4 initializer.");this.fJ=s;const n=function(t){let i,e;for(const s of t.Z)i||(i=s.cK),e||(e=s.uK);if(i||e)return{FSt:i,YSt:e,cEt:void 0};return}(s);n&&this.ejt(e,n);const r=function(t){for(const i of t.Z)if(void 0!==i.dK)return i.dK;return}(s);void 0!==r&&this.sjt(e,r);const h=function(t){var i;const e=Zy(t),s=Po(e.boxes,ck),n=s.boxes.filter(dk),r=Po(n,(t=>oZ(t)===Xp.AUDIO)),h=Po(n,(t=>oZ(t)===Xp.VIDEO)),o={FSt:{Rp:r?fZ(r):void 0},YSt:{Rp:h?fZ(h):void 0}},a=null==(i=Po(s.boxes,gk))?void 0:i.boxes.filter(wk);var u,c;const d=a?{FSt:null!=(u=Po(a,(t=>t.trackId===o.FSt.Rp)))?u:void 0,YSt:null!=(c=Po(a,(t=>t.trackId===o.YSt.Rp)))?c:void 0}:void 0;var l,f;if(d&&(o.FSt.cM=null==(l=d.FSt)?void 0:l.defaultSampleDuration,o.YSt.cM=null==(f=d.YSt)?void 0:f.defaultSampleDuration),!r||!h)return{FSt:r?t:void 0,YSt:h?t:void 0,GD:o};const _=aZ(e),g=aZ(e),w=e.boxes.indexOf(s);_.boxes[w]=dZ(s,h),g.boxes[w]=dZ(s,r);const A=_.serialize().join(),v=g.serialize().join();return{FSt:A,YSt:v,GD:o}}(t.ebt.Om.Om);if(this.XBt=h.GD,h.YSt){const i=Po(s.Z,(t=>t.Rp===h.GD.YSt.Rp)),e={Rg:"ajt",Om:{Rg:dt.$H,Om:h.YSt},eht:f.Am,rbt:t.rbt,ujt:{cst:'video/mp4; codecs="'+i.uK+'"',KEt:t.KEt},RT:t.RT,MSt:t.MSt,ECt:t.ebt.ECt};this.yOt(e)}if(h.FSt){const i=Po(s.Z,(t=>t.Rp===h.GD.FSt.Rp)),e={Rg:"ajt",Om:{Rg:dt.$H,Om:h.FSt},eht:f.vm,rbt:t.rbt,ujt:{cst:'audio/mp4; codecs="'+i.cK+'"',KEt:t.KEt},RT:t.RT,MSt:t.MSt,ECt:t.ebt.ECt};this.yOt(e)}return Promise.resolve()}async ijt(t,i){fo(i);const e=t.uot.ECt;Wr.Wp(gZ,"Transmuxing fMP4: "+nc(e.$At));const s=t.uot.Om,n=AZ(s.Om,this.fJ),r=$n(n.map((t=>t.X8)),CA);if(void 0!==r&&(e.Z8=r,this.rjt(t.MSt)),!this.vkt.HLt(t.rbt)){const s=Sn.fD(e.RT);if(n.length>0){const i=$n(n.map((t=>t.ZBt)),CA);for(const e of this.WOt)this.vkt.rkt(t.rbt,e,i,s,!1);this.rjt(t.MSt)}this.vkt.HLt(t.rbt)||await ji(this.vkt.XLt(t.rbt),i)}const h=this.vkt.ikt(t.rbt),o=e.Z8?this.vkt.ekt(e.Z8,e).fN():e.RT,a=uX(e,o);var u;const c={xOt:a,OOt:gc(e,a),RT:o,ct:null!=(u=e.ct)?u:0,jD:h.fN(),rbt:t.rbt,MSt:t.MSt,ECt:t.uot.ECt},d=function(t,i){if(void 0===i.FSt.Rp)return{FSt:void 0,YSt:t};if(void 0===i.YSt.Rp)return{FSt:t,YSt:void 0};const e=Zy(t),s=aZ(e),n=aZ(e);for(let t=0;t<e.boxes.length;t++){const r=e.boxes[t];Ak(r)&&(s.boxes[t]=lZ(r,i.YSt.Rp),n.boxes[t]=lZ(r,i.FSt.Rp))}const r=s.serialize().join(),h=n.serialize().join();return{FSt:r,YSt:h}}(s.Om,this.XBt);if(d.YSt){var l;const i=this.XBt.YSt.Rp,s=Po(this.fJ.Z,(t=>t.Rp===i)),h=Po(n,(t=>t.Rp===i)),o=this.KBt(d.YSt,s,h,null==(l=this.XBt)?void 0:l.YSt.cM,e);this.JBt=s,this.njt(t.MSt,e,h.X8.NN(r));const a=Tt({Rg:"uot",Om:{Rg:dt.$H,Om:o},eht:f.Am},c);this.yOt(a)}if(d.FSt){const t=Tt({Rg:"uot",Om:{Rg:dt.$H,Om:d.FSt},eht:f.vm},c);this.yOt(t)}this.$Bt=e,this.tRt=n}KBt(t,i,e,s,n){if(!function(t){return ps(t)?t.ibt:0===t.Cbt&&t.Lbt.ibt}(n))return t;if(!this.$Bt||!this.JBt||!this.tRt)return t;const r=this.JBt.Rp,h=Po(this.tRt,(t=>t.Rp===r)),o=this.vkt.ekt(h.iRt,this.$Bt),a=this.vkt.ekt(e.X8,n).NN(o).uD(i.bp);if(a.vN(Sn.kN))return t;if(a._N(Sn.fD(.5)))return t;const u=ps(n)?n:n.Lbt;return Wr.JSt(gZ,"Stretching first video frame of segment #"+u.PEt+" to fill gap of "+a.fN()+"s"),function(t,i,e,s){const n=Zy(t),r=Po(n.boxes,Ak);if(r){const t=r.getSize();for(const t of r.boxes)t instanceof Ls&&_Z(t,i,e,s);const n=r.getSize();if(n!==t){const i=n-t;for(const t of r.boxes)t instanceof Ls&&yk(t,i)}}return n.serialize().join()}(t,i.bp,a,s)}constructor(...t){super(...t),this.fJ=void 0,this.XBt=void 0,this.$Bt=void 0,this.tRt=void 0,this.JBt=void 0}};function AZ(t,i){const e=xg(Eh.dp(hl(t)),he.Zv);if(!e)throw new g("Mp4Transmuxer - Unable to parse segment or part.");return function(t,i){const e=[];for(const n of t.Z){if(!n.yM||0===n.pM.length||0===n.pM[0].IM.length)continue;const t=n.ep.Rp,r=Po(i.Z,(i=>i.Rp===t));let h=0,o=1/0,a=0;const u=n.ep.cM||0;for(const t of n.pM)for(const i of t.IM){const t=i.EM||0,e=h+t;var s;h+=null!=(s=i.ct)?s:u;const n=h+t;e<o&&(o=e),n>a&&(a=n)}const c=Sn.EN(n.yM.yM,r.bp);e.push({Rp:t,ZBt:c,X8:c.MT(Sn.bN(o,r.bp)),eRt:c.MT(Sn.bN(h,r.bp)),iRt:c.MT(Sn.bN(a,r.bp))})}return e}(e,i)}var vZ,mZ="MpegtsTransmuxer",pZ=class extends wZ{$Ot(t,i){return super.$Ot(t,i)}ZOt(t,i){if(super.ZOt(t,i),this.wit.sRt())return;var e;const s=null!=(e=null==i?void 0:i.$At)?e:t.$At;if(!s)return;/\.(ts|aac|mp3)/i.test(s.LM)&&this.wit.nRt()}rRt(t){let i;return t.MSt===this.hRt&&this.oRt.has(t.rbt)?i=this.oRt.get(t.rbt):(i=bX(t.uot.Om.Om),this.hRt=t.MSt,this.oRt.set(t.rbt,i)),i}async ijt(t,i){fo(i);const e=this.rRt(t),s=t.uot;if(e!==TX.Bjt&&e!==TX.Rjt)return super.ijt(t,i);if(s.ECt.KEt.some(MZ))throw new $i(td.CONTENT_PROTECTION_NOT_SUPPORTED,"SAMPLE-AES encryption is not supported for MPEG-TS or Packed Audio segments");const n=this.wit.nRt();let r;e===TX.Bjt?(Wr.Wp(mZ,"Transmuxing MPEG-TS: "+nc(s.ECt.$At)),r=await n.aRt({data:s.Om.Om,metadata:this.uRt})):(Wr.Wp(mZ,"Transmuxing raw audio: "+nc(s.ECt.$At)),r=await n.cRt({data:s.Om.Om,metadata:this.uRt})),fo(i),this.ejt(t.MSt,{FSt:r.metadata.audio_codec,YSt:r.metadata.video_codec,cEt:void 0}),r.metadata.video_frame_rate&&this.sjt(t.MSt,r.metadata.video_frame_rate);const h=TZ(r.metadata.first_decode_timestamp),o=TZ(r.metadata.first_presentation_timestamp),a=void 0!==r.metadata.first_video_presentation_timestamp?TZ(r.metadata.first_video_presentation_timestamp):void 0;if(s.ECt.Z8=o,this.rjt(t.MSt),void 0!==a&&this.njt(t.MSt,s.ECt,function(t,i){let e=t.NN(i);return e.pN(Sn.kN)&&(e=e.MT(ur())),e}(a,o)),!this.vkt.HLt(t.rbt)){const e=Sn.fD(s.ECt.RT);for(const i of this.WOt)this.vkt.rkt(t.rbt,i,h,e,!0);this.rjt(t.MSt),this.vkt.HLt(t.rbt)||await ji(this.vkt.XLt(t.rbt),i)}const u=this.vkt.nkt(h,s.ECt);this.uRt=r.metadata;const c=this.vkt.ekt(o,s.ECt).fN(),d=uX(s.ECt,c);var l;const _={xOt:d,OOt:gc(s.ECt,d),RT:c,ct:null!=(l=s.ECt.ct)?l:0,jD:u.fN(),rbt:t.rbt,MSt:t.MSt,ECt:s.ECt};if(void 0===r.data.audio_media&&void 0===r.data.video_media){for(const t of this.WOt){const i=Tt({Rg:"uot",Om:void 0,eht:t},_);this.yOt(i)}return}const g=[];if(void 0!==r.data.audio_media){if(r.data.audio_init&&(!this.dRt||this.lRt!==t.rbt||!ne(this.dRt,r.data.audio_init))){const i=this.vkt.ekt(s.ECt.Z8,s.ECt).fN(),e={Rg:"ajt",Om:{Rg:dt.$H,Om:r.data.audio_init},eht:f.vm,rbt:t.rbt,ujt:{cst:'audio/mp4; codecs="'+r.metadata.audio_codec+'"',KEt:s.ECt.KEt},RT:i,MSt:t.MSt,ECt:s.ECt};this.dRt=r.data.audio_init,this.lRt=t.rbt,this.yOt(e)}const i=Tt({Rg:"uot",Om:{Rg:dt.$H,Om:r.data.audio_media},eht:f.vm},_);this.yOt(i)}else if(t.uot.ECt.Ebt&&ae(this.WOt,f.vm)){const t=Tt({Rg:"uot",Om:void 0,eht:f.vm},_);this.yOt(t)}if(void 0!==r.data.video_media){if(r.data.video_init&&(!this.fRt||this._Rt!==t.rbt||!ne(this.fRt,r.data.video_init))){const i=this.vkt.ekt(s.ECt.Z8,s.ECt).fN(),e={Rg:"ajt",Om:{Rg:dt.$H,Om:r.data.video_init},eht:f.Am,rbt:t.rbt,ujt:{cst:'video/mp4; codecs="'+r.metadata.video_codec+'"',KEt:s.ECt.KEt},RT:i,MSt:t.MSt,ECt:s.ECt};this.fRt=r.data.video_init,this._Rt=t.rbt,this.gRt=Vk(hl(r.data.video_init)),this.yOt(e)}const i=this.gRt.Z[0],e=AZ(r.data.video_media,this.gRt)[0],n=this.KBt(r.data.video_media,i,e,void 0,s.ECt);this.JBt=i;const h=Tt({Rg:"uot",Om:{Rg:dt.$H,Om:n},eht:f.Am},_);this.yOt(h),g.push(e)}else if(t.uot.ECt.Ebt&&ae(this.WOt,f.Am)){const t=Tt({Rg:"uot",Om:void 0,eht:f.Am},_);this.yOt(t)}this.$Bt=s.ECt,this.tRt=g}Xd(){this.dRt=void 0,this.fRt=void 0,super.Xd()}constructor(t,i,e,s){super(i,e,s),this.uRt=void 0,this.dRt=void 0,this.fRt=void 0,this.gRt=void 0,this.lRt=0,this._Rt=0,this.hRt=void 0,this.oRt=Y(),this.wit=t}},yZ=class{Gyt(t,i,e){return new pZ(this,t,i,e)}};function MZ(t){return t.oI===ea.lEt}function TZ(t){return Sn.EN(Ce.fromBits(t.low,t.high),t.base)}!function(t){t[t.MPEGTS_TO_FMP4=0]="MPEGTS_TO_FMP4",t[t.RAW_AUDIO_TO_FMP4=1]="RAW_AUDIO_TO_FMP4"}(vZ||(vZ={}));var NZ=()=>{const t=function(){if("undefined"==typeof WebAssembly)return!1;const t=fi.fE;if(t>0&&t<=56)return!1;try{return void 0!==new WebAssembly.Module(Ae("AGFzbQEAAAA="))}catch(t){return!1}}();return NZ=()=>t,t};var DZ=class{aRt(t){return this.wRt(vZ.MPEGTS_TO_FMP4,t)}cRt(t){return this.wRt(vZ.RAW_AUDIO_TO_FMP4,t)}CBt(){const t=tZ(this.xBt,this.OBt,{name:"THEOplayer transmux worker"});return t.yn("message",this.jBt),t.yn("error",this.zBt),t}wRt(t,i){const e=++this.PBt,s={type:t,id:e,input:i},n=new Rs;return this.YBt.set(e,n),this.lBt.dBt(s),n.Vb}Qd(t){void 0===t&&(t=new is),this.YBt.forEach((i=>i.Yb(t))),this.YBt.clear(),this.lBt.gBt()}constructor(t){this.PBt=0,this.YBt=Y(),this.jBt=t=>{const i=t.data;if(void 0!==i.requestId){const t=this.YBt.get(i.requestId);if(!t)return;this.YBt.delete(i.requestId),i.success?t.Qb(i.output):t.Yb(new $i(i.errorCode,i.error))}else i.success||this.Qd(new $i(i.errorCode,i.error))},this.zBt=t=>{const i=new $i(td.MEDIA_DECODE_ERROR,t.error.message,t.error);this.Qd(i)},this.OBt=t;const e=NZ()?"THEOplayer.transmux.js":"THEOplayer.transmux.asmjs.js";try{this.xBt=i.SA(e,t)}catch(t){throw new $i(td.CONFIGURATION_ERROR,"Invalid player configuration: missing libraryLocation",t)}this.lBt=this.CBt()}},SZ=class extends yZ{sRt(){return void 0!==this.lBt}nRt(){var t;return null!=(t=this.lBt)?t:this.lBt=new DZ(this.ARt)}Qd(){this.lBt&&(this.lBt.Qd(),this.lBt=void 0)}constructor(t){super(),this.ARt=t,this.lBt=void 0}},Mc=class{J8(){return new SZ(this.ARt)}constructor(t){this.ARt=t}},IZ=class extends PX{A_(){if(ZR(this.sA))return this.sA.A_()}get g_(){return!1}set g_(t){}async gn(){var t;await super.gn(),null==(t=this.BNt)||t.gn()}constructor(t,i,e,s,n,r,h,o){super(t,i,e,s,n,r,h,o),fi.QE&&(this.BNt=new oU(this))}},EZ=class extends IZ{async gn(){await super.gn(),await this.hP.rP(this.sA)}constructor(t,i,e,s,n,r,h,o){const a=new Xc(t);super(a.MP(f.Am),i,e,s,n,r,h,o),this.hP=a}},bZ=class extends BX{async TP(t,i){return!!_C(t.useManagedMediaSource)&&(!(!t.useManagedMediaSource&&(fi.Ga||fi.fb))&&super.TP(t,i))}async yet(t){return(!t.clearkey||!fi.QE)&&super.yet(t)}};ON(new class extends bZ{JA(t,i,e,s,n,r,h){return new EZ(i,e,n,r,hZ(s.libraryLocation),new Mc(s.libraryLocation),new zi(Al.yb.Het,Al.yb.Wet,Al.yb.Vet,Al.yb.Xet),s)}NP(){return!0}constructor(...t){super(...t),this.DP=W.CA}}),Wr.Rt=()=>{var t;return Boolean(null==(t=s)?void 0:t.THEOplayerDebugLogsEnabled)};var LZ=class{Det(t,i){return Promise.resolve(!1)}Eet(t,i){return Promise.resolve(void 0)}Met(t){return Promise.resolve(void 0)}DH(t){return Promise.resolve(void 0)}},kZ=class extends Bo{vRt(){var t;return null==(t=this.mRt)?void 0:t.hSt}Cn(t){Ys(Wu((()=>this.pRt(t)),t))}async pRt(t){await this.CTt.Ukt(t),this.yRt&&(this.MRt(this.yRt.ji,this.yRt.Ti),this.yRt=void 0),this._4=!0}TRt(t,i){this._4?this.MRt(t,i):this.yRt={ji:t,Ti:i}}MRt(t,i){const e=this.NRt(t,i),s=null==e?void 0:e.sIt[0];s!==this.mRt&&(this.DRt(),void 0!==s&&(this.mRt=s,this.SRt=new yh(this.CTt,s),this.SRt.FCt()))}DRt(){this.mRt=void 0,this.SRt&&(this.SRt.Qd(),this.SRt=void 0)}NRt(t,i){const e=Po(this.CTt.Tr.iIt,(e=>void 0!==e.WSt&&e.WSt.ji===t&&e.WSt.Ti===i));return null!=e?e:this.CTt.Tr.iIt[0]}gn(){this.Vo(),this.DRt(),this.CTt.Qd()}constructor(t,i,e){super(),this.mRt=void 0,this.SRt=void 0,this.yRt=void 0,this.IRt=()=>{this.Co(new Iu)},this.bc=t,this.CTt=new kc(e,new LZ,t.useCredentials,t.src,t.liveOffset),this.CTt.yn(Co.dw,this.Ds),this._4=!1}},CZ=class extends Ut{get ht(){return this.Z4.ht}get wf(){return this.Z4.wf}get vf(){return this.Z4.vf}set vf(t){this.Z4.vf=t}get bt(){return this.Z4.bt}get Mf(){return this.Z4.Mf}set Mf(t){this.Z4.Mf=t}get ct(){return this.Z4.ct}get Sf(){return this.Z4.Sf}get bf(){return this.Z4.bf}get kf(){return this.Z4.kf}get lt(){return this.Z4.lt}get xf(){return this.Z4.xf}get jf(){return this.Z4.jf}get Pf(){return this.Z4.Pf}set Pf(t){this.Z4.Pf=t}get Uf(){return this.Z4.Uf}get Ff(){return this.Z4.Ff}get Gf(){return this.Z4.Gf}set Gf(t){this.Z4.Gf=t}get Hf(){return this.Z4.Hf}get Xf(){return this.Z4.Xf}set Xf(t){this.Z4.Xf=t}get Jf(){return this.Z4.Jf}get t_(){return this.Z4.t_}get e_(){return this.Z4.e_}get Bz(){return this.Z4.Bz}get nt(){return this.Z4.nt}get r_(){return this.Z4.r_}get rt(){return this.Z4.rt}get a_(){return this.Z4.a_}get c_(){return this.Z4.c_}set c_(t){this.Z4.c_=t}get f_(){return this.Z4.f_}get g_(){return this.Z4.g_}set g_(t){this.Z4.g_=t}get Uz(){return this.Z4.Uz}get cA(){}M_(){return this.Z4.M_()}w_(){return this.Z4.w_()}A_(){return this.Z4.A_()}be(){return this.Z4.be()}D_(){return this.Z4.D_()}S_(){return this.Z4.S_()}m_(){return this.Z4.m_()}p_(){return this.Z4.p_()}tr(){return this.Z4.tr()}ga(t,i,e){return this.Z4.ga(t,i,e)}ge(){return this.Z4.ge()}T_(){return this.Z4.T_()}N_(){return this.Z4.N_()}gn(){this.Vo();for(const t of zN)this.Z4.fn(t,this.Ds);return this.Z4.gn()}constructor(t){super(),this.Z4=t;for(const t of zN)this.Z4.yn(t,this.Ds)}},xZ=class extends CZ{async ga(t,i,e){await super.ga(t,i,e),t.hlsDateRange&&this.qAt(t,i,e)}qAt(t,i,e){this.ERt=new kZ(t,i,this.bRt),this.ERt.yn(Co.dw,this.handleManifestUpdate),this.ERt.Cn(e)}tr(){return this.oCt&&(this.nt.it(this.oCt),this.t3.it(this.oCt),this.oCt.gn(),this.oCt=void 0,this.LRt=!1),this.ERt&&(this.ERt.gn(),this.ERt=void 0),this.t3.tr(),super.tr()}gn(){return this.fn(Co.mw,this.rBt),this.ERt&&(this.ERt.gn(),this.ERt=void 0),this.t3.gn(),super.gn()}constructor(t,i,e){super(t),this.ERt=void 0,this.LRt=!1,this.oCt=void 0,this.handleManifestUpdate=()=>{const t=this.ERt.vRt();if(t){const i=this.Bz;if(i){const e=i.getTime();let s=this.oCt;s||(s=new hq,this.oCt=s),s.Yn(t.hbt,(t=>(t.getTime()-e)/1e3)),!this.LRt&&s.L.U>0&&(this.nt.tt(s),this.t3.tt(s),this.LRt=!0)}}},this.rBt=()=>{this.ERt&&this.ERt.TRt(this.a_,this.r_)},this.bRt=i,this.TH=e,this.t3=new Hh(this),this.yn(Co.mw,this.rBt)}};!function(t){kN.SP().IP(t)}((function(t,i,e){return new xZ(t,i,e)}));var Ba=class extends Jo{get name(){return"CastError"}constructor(t,i=""){super("An error occurred while casting."),this.errorCode=t,this.description=i}};async function OZ(t){PZ()||await async function(t){if(null==t?void 0:t.Bd)return Promise.reject(new is);const{Vb:i,Qb:e,Yb:n}=function(){let t,i;return{Vb:new Promise(((e,s)=>{t=e,i=s})),Qb:t,Yb:i}}(),r=s.__onGCastApiAvailable,h=()=>{s.__onGCastApiAvailable=r,n(new is)};return s.__onGCastApiAvailable=(i,o)=>{i?e():n(new g(o)),null==t||t.Gd(h),s.__onGCastApiAvailable=r,r&&r(i,o)},null==t||t.Yd(h),i}(t),zZ()||await Di(100,t),zZ()||(i.IA('Detected the Chromecast library was loaded without the CAF framework. It is strongly encouraged to load it with the CAF framework by using this URL: "//www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1"'),await jZ())}var jZ=Ol((()=>function(t){return new Promise(((i,e)=>{const s=h.createElement("script");s.onload=()=>i(),s.onerror=t=>e((null==t?void 0:t.error)||t),s.type="text/javascript",s.src=t,(h.head||h.documentElement).appendChild(s)}))}("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js").catch((()=>{throw new Ba("API_NOT_INITIALIZED","The Chromecast library could not be loaded successfully.")}))));function zZ(){return Boolean("undefined"!=typeof cast&&cast.framework)}function PZ(){return"undefined"!=typeof chrome&&chrome&&chrome.cast&&chrome.cast.isAvailable}function BZ(t,i,e,s){if(Dd(i))for(const e of w.keys(i)){if("type"===e||"images"===e)continue;const s=i[e];Dd(s)&&(t[e]=s)}!function(t,i,e,s){if(!Dd(e)&&!Dd(null==i?void 0:i.images))return;t.images=[],e&&t.images.push(new s.Image(e));if(null==i?void 0:i.images)if(Qs(i.images))t.images.push(new s.Image(i.images));else if($(i.images))for(const e of i.images){let i;var n,r;if(Qs(e))i=new s.Image(e);else i=new s.Image(e.src),i.height=null!=(n=e.height)?n:null,i.width=null!=(r=e.width)?r:null;t.images.push(i)}}(t,i,e,s)}function RZ(t,i,e){return void 0===e&&(e=chrome),function(t,i,e){switch(null==t?void 0:t.type){case"movie":{const s=new e.MovieMediaMetadata;return BZ(s,t,i,e),s}case"audio":{const s=new e.MusicTrackMediaMetadata;return BZ(s,t,i,e),!Dd(s.artist)&&Dd(t.artistName)&&(s.artist=t.artistName),s}case"tv-show":{const s=new e.TvShowMediaMetadata;return BZ(s,t,i,e),!Dd(s.title)&&Dd(t.episodeTitle)&&(s.title=t.episodeTitle),!Dd(s.season)&&Dd(t.seasonNumber)&&(s.season=t.seasonNumber),!Dd(s.episode)&&Dd(t.episodeNumber)&&(s.episode=t.episodeNumber),s}default:{const s=new e.GenericMediaMetadata;return BZ(s,t,i,e),s}}}(t,i,function(t){return{GenericMediaMetadata:t.cast.media.GenericMediaMetadata,MovieMediaMetadata:t.cast.media.MovieMediaMetadata,TvShowMediaMetadata:t.cast.media.TvShowMediaMetadata,MusicTrackMediaMetadata:t.cast.media.MusicTrackMediaMetadata,Image:t.cast.Image}}(e))}function UZ(t){switch(t){case chrome.cast.ErrorCode.CANCEL:return"CANCEL";case chrome.cast.ErrorCode.TIMEOUT:return"TIMEOUT";case chrome.cast.ErrorCode.API_NOT_INITIALIZED:return"API_NOT_INITIALIZED";case chrome.cast.ErrorCode.INVALID_PARAMETER:return"INVALID_PARAMETER";case chrome.cast.ErrorCode.EXTENSION_NOT_COMPATIBLE:return"EXTENSION_NOT_COMPATIBLE";case chrome.cast.ErrorCode.EXTENSION_MISSING:return"EXTENSION_MISSING";case chrome.cast.ErrorCode.RECEIVER_UNAVAILABLE:return"RECEIVER_UNAVAILABLE";case chrome.cast.ErrorCode.SESSION_ERROR:return"SESSION_ERROR";case chrome.cast.ErrorCode.CHANNEL_ERROR:return"CHANNEL_ERROR";case chrome.cast.ErrorCode.LOAD_MEDIA_FAILED:return"LOAD_MEDIA_FAILED";default:return"CANCEL"}}function QZ(t){if(t.items&&t.items.length>0&&t.currentItemId>=0)return Po(t.items,(i=>i.itemId===t.currentItemId))}var mc,FZ="urn:x-cast:com.theoplayer.cast";!function(t){t.kRt="theoplayer_receiver_info",t.CRt="theoplayer_trackpropertychange",t.xRt="theoplayer_propertychange"}(mc||(mc={}));var YZ;(YZ||(YZ={})).SKIP_AD="SKIP_AD";function GZ(t){h.createElement("img").src=t}var VZ=new RegExp(/^(\d\d):(\d\d):(\d\d)(?:\.(\d{3}))?$/);function WZ(t){if(!Qs(t))return;const i=t.match(VZ);return i?3600*x(i[1],10)+60*x(i[2],10)+Number(i[3])+(Number(i[4])||0)/1e3:void 0}function HZ(t){if(void 0===t)return;const i=t.match(/^([1-9]?\d|100)%$/);return i?x(i[1])/100:void 0}function Ic(t,i){return"vmap"===t.type||!Dd(t.type)&&!Dd(i)}function qZ(t,i){return"vast"===t.type||!Dd(t.type)&&Dd(i)}var XZ,ZZ=class{},KZ=class extends ZZ{get ORt(){return this.Ic}jRt(){return null!=this.zRt||(this.zRt=xl(this.Ic,(t=>t.jRt()))),this.zRt}constructor(t){super(),this.Ic=t.sort(((t,i)=>t.wM-i.wM))}},Nc=class extends ZZ{get o(){return this.PRt}get wM(){return this.BRt}get RRt(){return this.URt}constructor(t,i){super(),this.PRt=t,this.BRt=i,this.URt=!1}},JZ=class extends Nc{get QRt(){return this.FRt}get YRt(){return this.GRt}get VRt(){return this.WRt}get HRt(){return this.qRt}get lt(){return this.xz}jRt(){if(void 0===this.XRt){let t,i,e,s=[];for(const n of this.FRt)n.ZRt&&(t=n.ZRt),n.KRt&&(i=n.KRt),n.JRt&&(e=n.JRt),s=s.concat(n.universalAdIds);this.XRt={HRt:this.HRt,ZRt:t,$Rt:i,JRt:e,lt:this.lt,tUt:s}}return[this.XRt]}constructor(t,i,e,s,n,r,h){super(t,i),this.GRt=e,this.WRt=s,this.qRt=n,this.FRt=r,this.xz=h}},$Z=class{get iUt(){return this.eUt}get sUt(){return this.nUt}constructor(t,i){this.eUt=t,this.nUt=i}},tK=class{get rUt(){return this.hUt}get oUt(){return this.aUt}get uUt(){return this.cUt}get dUt(){return this.lUt}get Xl(){return this.fUt}set Xl(t){this.fUt=t}get _Ut(){return this.gUt}get wUt(){return this.AUt}vUt(){this.AUt=!0}get YRt(){return this.GRt}constructor(t,i,e,s,n,r){this.hUt=t,this.aUt=i,this.cUt=e,this.lUt=s,this.AUt=!1,this.gUt=n,this.GRt=r}};!function(t){t.mUt="all",t.pUt="any",t.PP="none"}(XZ||(XZ={}));var Ln,iK=class{get yUt(){return this.MUt}get TUt(){return this.NUt}constructor(t,i){this.MUt=t,this.NUt=i}},eK=class{get o(){return this.IT}get ji(){return this.nk}get Ti(){return this.rk}get DUt(){return this.SUt}get IUt(){return this.EUt}get bUt(){return this.LUt}get kUt(){return this.CUt}get xUt(){return this.OUt}get jUt(){return this.zUt}get PUt(){return this.BUt}get rUt(){return this.hUt}get oUt(){return this.aUt}get uUt(){return this.cUt}get RUt(){return this.UUt}get sUt(){return this.QUt}get FUt(){return this.YUt}constructor(t,i,e,s,n,r,h,o,a,u,c,d,l,f,_,g){this.nk=t,this.rk=i,this.IT=e,this.SUt=s,this.EUt=n,this.LUt=r,this.CUt=h,this.OUt=o,this.zUt=a,this.BUt=u,this.hUt=c,this.aUt=d,this.cUt=l,this.UUt=f,this.QUt=_,this.YUt=g}},sK=class{get id(){return this.IT}get uri(){return this.jbt}constructor(t,i){this.IT=t,this.jbt=i}},nK=class{get GUt(){return this.VUt}get WUt(){return this.HUt}get qUt(){return this.XUt}get ZUt(){return this.KUt}constructor(t,i,e,s){this.VUt=t,this.HUt=i,this.XUt=e,this.KUt=s}},rK=class extends Nc{get HRt(){return this.qRt}get JUt(){return this.$Ut}get tQt(){return this.iQt}get QRt(){return this.FRt}get eQt(){return this.sQt}get nQt(){return this.rQt}get lt(){return this.xz}jRt(){return void 0===this.$Ut?[]:(null!=this.zRt||(this.zRt=this.$Ut.jRt().map((t=>this.hQt(t)))),this.zRt)}hQt(t){let i,e,s;for(const t of this.QRt)t.ZRt&&(i=t.ZRt),t.KRt&&(e=t.KRt),t.JRt&&(s=t.JRt);const n=t.HRt.concat(this.HRt);let r=t.ZRt;if(i&&t.ZRt){const e=new nK(t.ZRt.oQt.GUt,t.ZRt.oQt.WUt,t.ZRt.oQt.qUt.concat(i.oQt.qUt),t.ZRt.oQt.ZUt.concat(i.oQt.ZUt));r=t.ZRt,r.oQt=e,r.sUt=r.sUt.concat(i.sUt)}let h=t.$Rt;if(e&&e.iUt){var o,a;const s=[];for(const t of e.iUt)s.concat(t.dUt.qUt);const n=[];var u,c;for(const e of null!=(u=null==(o=t.$Rt)?void 0:o.iUt)?u:[]){var d,l,f;const r=new nK(e.dUt.GUt,e.dUt.WUt,e.dUt.qUt.concat(s),(null!=(l=null==(d=t.ZRt)?void 0:d.oQt.ZUt)?l:[]).concat(null!=(f=null==i?void 0:i.oQt.ZUt)?f:[]));n.push(new tK(e.rUt,e.oUt,e.uUt,r,e._Ut,e.YRt))}h=new $Z(n,(null!=(c=null==(a=t.$Rt)?void 0:a.sUt)?c:[]).concat(e.sUt))}let _=t.JRt;if(_){var g;let i=_.yUt;var w,A;s&&s.yUt&&(i=s.yUt),_=new iK(i,(null!=(w=null==(g=t.JRt)?void 0:g.TUt)?w:[]).concat(null!=(A=null==s?void 0:s.TUt)?A:[]))}let v=t.lt;return this.lt&&(v=this.lt),{HRt:n,ZRt:r,$Rt:h,JRt:_,lt:v,tUt:t.tUt}}constructor(t,i,e,s,n,r,h,o,a){super(t,i),this.qRt=e,this.$Ut=s,this.iQt=n,this.FRt=r,this.sQt=h,this.rQt=o,this.xz=a}},hK=class{get o(){return this.IT}get aQt(){return this.uQt}get cQt(){return this.dQt}get xUt(){return this.OUt}get ZRt(){return this.lQt}get KRt(){return this.fQt}get JRt(){return this._Qt}get universalAdIds(){return this.gQt}constructor(t,i,e,s,n,r,h,o){this.IT=t,this.uQt=i,this.dQt=e,this.OUt=s,this.lQt=n,this.fQt=r,this._Qt=h,this.gQt=o}},oK=class{get ct(){return this.wQt}get AQt(){return this.vQt}get sUt(){return this.nUt}set sUt(t){this.nUt=t}set oQt(t){this.mQt=t}get oQt(){return this.mQt}get pQt(){return this.yQt}set pQt(t){this.yQt=t}get MQt(){return this.AUt}get Xl(){return this.fUt}set Xl(t){this.fUt=t}get _Ut(){return this.gUt}get YRt(){return this.GRt}vUt(){this.AUt=!0}constructor(t,i,e,s,n,r,h){this.wQt=t,this.vQt=i,this.nUt=e,this.mQt=s,this.yQt=n,this.AUt=!1,this.gUt=r,this.GRt=h}};function Ni(t,i){return cK(t)&&t.getAttribute(i)||void 0}function aK(t,i){return uK(t,i,void 0,!1)}function uK(t,i,e,s){return i===(t.localName?t.localName:t.nodeName)&&(s&&e?e===t.namespaceURI:!e||!t.namespaceURI||e===t.namespaceURI)}function Ho(t,i){const e=[];for(let s=0;s<t.childNodes.length;s+=1){const n=t.childNodes.item(s);cK(n)&&aK(n,i)&&e.push(n)}return e}function cK(t){return t&&1===t.nodeType}function dK(t,i){const e=(new DOMParser).parseFromString(t,i);if(!e||e.getElementsByTagName("parsererror").length>0)throw new g('Invalid document for MIME type "'+i+'"');return e}function lK(t){return t.replace(/[<>&'"]/g,(t=>{switch(t){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case'"':return""";default:return t}}))}function fK(t){return"data:application/xml,"+encodeURIComponent(t)}function _K(t){switch(t){case"breakStart":case"breakEnd":case"error":return!0;default:return!1}}!function(t){t.TQt="mute",t.NQt="unmute",t.Sh="pause",t.DQt="resume",t.SQt="rewind",t.IQt="skip",t.EQt="playerExpand",t.bQt="playerCollapse",t.Ah="fullscreen",t.LQt="exitFullscreen",t.kQt="expand",t.COLLAPSE="collapse",t.kyt="start",t.CQt="firstQuartile",t.xQt="thirdQuartile",t.OQt="midpoint",t.jQt="complete",t.zQt="acceptInvitationLinear",t.PQt="acceptInvitation",t.BQt="timeSpentViewing",t.RQt="otherAdInteraction",t.gw="progress",t.UQt="creativeView",t.QQt="adExpand",t.FQt="adCollapse",t.YQt="minimize",t.GQt="close",t.VQt="closeLinear",t.WQt="overlayViewDuration",t.HQt="breakStart",t.qQt="breakEnd",t.ha="error"}(Ln||(Ln={}));var gK=["mute","unmute","pause","resume","rewind","skip","closeLinear","close","playerExpand","playerCollapse","fullscreen","exitFullscreen","expand","collapse","creativeView","start","firstQuartile","midpoint","thirdQuartile","complete","acceptInvitationLinear","acceptInvitation","timeSpentViewing","otherAdInteraction","progress"];function wK(t){return void 0!==t&&-1!==gK.indexOf(t)}var AK=["start","firstQuartile","midpoint","thirdQuartile","complete","mute","unmute","pause","resume","rewind","skip","playerExpand","playerCollapse","expand","collapse","fullscreen","exitFullscreen","creativeView","acceptInvitation","adExpand","adCollapse","minimize","close","overlayViewDuration","otherAdInteraction","progress"];function vK(t){return void 0!==t&&-1!==AK.indexOf(t)}var mK=["mute","unmute","pause","resume","rewind","skip","playerExpand","playerCollapse","creativeView"];function pK(t){return void 0!==t&&-1!==mK.indexOf(t)}function yK(t,i){if(void 0===t||""===t||void 0===i)return;let e=t.match(/^(\d+):(\d+):(\d+)$/);return e?C(e[1]||"0")+60*C(e[2]||"0")+C(e[3]||"0"):(e=t.match(/^(100|[1-9]\d|\d)%$/),e?C(e[1]||"0")*i/100:void 0)}var Xr,no,MK=class{get yU(){return this.XQt}get Ku(){return this.ZQt}get eventURL(){return this.KQt}constructor(t,i,e){this.XQt=t,this.ZQt=i,this.KQt=e}},TK=class{get JQt(){return this.$Qt}constructor(t){this.$Qt=t}},NK=class extends TK{get GUt(){return this.VUt}get FUt(){return this.YUt}get tFt(){return this.iFt}constructor(t,i,e,s){super(t),this.iFt=i,this.VUt=e,this.YUt=s}},DK=class extends TK{constructor(t){super(t)}},SK=class extends TK{constructor(t){super(t)}},tr={eFt:{Wb:100,bb:"XML parsing error."},sFt:{Wb:303,bb:"Empty or invalid VAST error."},nFt:{Wb:400,bb:"General linear error"},rFt:{Wb:403,bb:"Unsupported MIME-type or missing mediafiles error"},hFt:{Wb:500,bb:"General nonlinear error"},HR:{Wb:900,bb:"Network error"}},co=class{get oFt(){return this.aFt}uFt(t){if(!this.oFt)return;const i=this.oFt.replace(/\[ERRORCODE]/,""+t.Wb);GZ(i)}constructor(t){this.aFt=t}},mi=class extends Jo{get cFt(){return this.dFt}get lFt(){var t;return null!=(t=this.fFt)?t:900}constructor(t,i,e,s){super(e||i&&IK[i]||t,s),this.dFt=t,this.fFt=i,this._Ft=e}};!function(t){t.ADBLOCK="adblock",t.NETWORK="network",t.PARSING="parsing",t.PLAYBACK="playback",t.GENERAL="general"}(Xr||(Xr={})),function(t){t[t.VAST_MALFORMED_RESPONSE=100]="VAST_MALFORMED_RESPONSE",t[t.VAST_SCHEMA_VALIDATION_ERROR=101]="VAST_SCHEMA_VALIDATION_ERROR",t[t.VAST_UNSUPPORTED_VERSION=102]="VAST_UNSUPPORTED_VERSION",t[t.VAST_TRAFFICKING_ERROR=200]="VAST_TRAFFICKING_ERROR",t[t.VAST_UNEXPECTED_LINEARITY=201]="VAST_UNEXPECTED_LINEARITY",t[t.VAST_UNEXPECTED_DURATION_ERROR=202]="VAST_UNEXPECTED_DURATION_ERROR",t[t.UNEXPECTED_SIZE=203]="UNEXPECTED_SIZE",t[t.VAST_WRAPPER_ERROR=300]="VAST_WRAPPER_ERROR",t[t.VAST_LOAD_TIMEOUT=301]="VAST_LOAD_TIMEOUT",t[t.VAST_TOO_MANY_REDIRECTS=302]="VAST_TOO_MANY_REDIRECTS",t[t.VAST_NO_ADS_AFTER_WRAPPER=303]="VAST_NO_ADS_AFTER_WRAPPER",t[t.GENERAL_LINEAR_ERROR=400]="GENERAL_LINEAR_ERROR",t[t.FILE_NOT_FOUND=401]="FILE_NOT_FOUND",t[t.VAST_MEDIA_LOAD_TIMEOUT=402]="VAST_MEDIA_LOAD_TIMEOUT",t[t.VAST_LINEAR_ASSET_MISMATCH=403]="VAST_LINEAR_ASSET_MISMATCH",t[t.VAST_PROBLEM_DISPLAYING_MEDIA_FILE=405]="VAST_PROBLEM_DISPLAYING_MEDIA_FILE",t[t.MEZZANINE_FILE_REQUIRES=406]="MEZZANINE_FILE_REQUIRES",t[t.MEZZANINE_FILE_DOWNLOADED_FIRST_TIME=407]="MEZZANINE_FILE_DOWNLOADED_FIRST_TIME",t[t.AD_IN_VAST_REJECTED=408]="AD_IN_VAST_REJECTED",t[t.INTERACTIVE_CREATIVE_NOT_EXECUTED=409]="INTERACTIVE_CREATIVE_NOT_EXECUTED",t[t.VERIFICATION_CODE_NOT_EXECUTED=410]="VERIFICATION_CODE_NOT_EXECUTED",t[t.GENERAL_NON_LINEAR_ERROR=500]="GENERAL_NON_LINEAR_ERROR",t[t.NONLINEAR_DIMENSIONS_ERROR=501]="NONLINEAR_DIMENSIONS_ERROR",t[t.OVERLAY_AD_LOADING_FAILED=502]="OVERLAY_AD_LOADING_FAILED",t[t.VAST_NONLINEAR_ASSET_MISMATCH=503]="VAST_NONLINEAR_ASSET_MISMATCH",t[t.GENERAL_COMPANION_AD_ERROR=600]="GENERAL_COMPANION_AD_ERROR",t[t.INVALID_DIMENSIONS_COMPANION_AD=601]="INVALID_DIMENSIONS_COMPANION_AD",t[t.COMPANION_REQUIRED_ERROR=602]="COMPANION_REQUIRED_ERROR",t[t.COMPANION_AD_LOADING_FAILED=603]="COMPANION_AD_LOADING_FAILED",t[t.UNABLE_TO_FIND_SUPPORTED_COMPANION=604]="UNABLE_TO_FIND_SUPPORTED_COMPANION",t[t.UNKNOWN_ERROR=900]="UNKNOWN_ERROR",t[t.GENERAL_VPAID_ERROR=901]="GENERAL_VPAID_ERROR",t[t.MALFORMED_URI=1005]="MALFORMED_URI",t[t.VAST_ASSET_NOT_FOUND=1007]="VAST_ASSET_NOT_FOUND",t[t.VAST_EMPTY_RESPONSE=1009]="VAST_EMPTY_RESPONSE",t[t.UNKNOWN_AD_RESPONSE=1010]="UNKNOWN_AD_RESPONSE",t[t.UNSUPPORTED_LOCALE=1011]="UNSUPPORTED_LOCALE",t[t.INVALID_ARGUMENTS=1101]="INVALID_ARGUMENTS",t[t.INVALID_ADX_EXTENSION=1105]="INVALID_ADX_EXTENSION",t[t.AUTOPLAY_DISALLOWED=1205]="AUTOPLAY_DISALLOWED"}(no||(no={}));var IK={100:"XML parsing error.",101:"VAST schema validation error.",102:"VAST version of response not supported.",200:"Trafficking error. The video player received an ad type that it was not expecting and/or cannot display.",201:"Video player expecting different linearity.",202:"Video player expecting different duration.",203:"Video player expecting different size.",300:"General wrapper error.",301:"Timeout of VAST URI provided in wrapper element, or of VAST URI provided in a subsequent wrapper element. This includes request errors such as invalid URI, unreachable or request timeout for URI, and security or other exceptions related to requesting a VAST URI.",302:"Wrapper limit reached, as defined by the video player. Too many wrapper responses have been received with no InLine response. This can be caused by a circular loop of daisy chaining (one network bouncing to another and another).",303:"No ads VAST response after one or more wrappers. This also includes the number of empty VAST responses from fallback.",400:"General linear error. The video player is unable to display the linear ad.",401:"File not found. Unable to find Linear/MediaFile from URI.",402:"Unable to download or timeout of MediaFile URI.",403:"Could not find a media file that is supported by this video player, based on the attributes of the MediaFile element.",405:"Problem displaying a media file.",406:"A mezzanine file was required, but not provided.",407:"The mezzanine file was downloaded for the first time, so the ad did not serve. This can occur when an ad insertion is missed because the creative is being transcoded. It continues to occur until the creative is available for insertion.",408:"The ad returned in the VAST response was rejected.",409:"The interactive creative defined in the InteractiveCreativeFile node was not executed.",410:"The code referenced in the Verification node was not executed.",500:"General NonLinearAds error.",501:"Unable to display non-linear ad because creative dimensions do not align with creative display area (in other words, the creative dimension was too large). This can occur if you use CSS styles to set width and height of the video ,content element. You should instead use the width and height HTML attributes.",502:"Unable to fetch NonLinearAds/NonLinear resource.",503:"Could not find NonLinearResource with supported type. This can occur when a creative size is larger than the player size.",600:"General CompanionAds error.",601:"Unable to display companion because creative dimensions do not fit within the companion display area (in other words, space was not available).",602:"Unable to display required companion.",603:"Unable to fetch CompanionAds/Companion resource.",604:"Could not find Companion resource with supported type.",900:"VAST 2 error. Even if you request VAST 3 or your DFP network default is VAST 3, this can occur if you have a VAST redirect that returns a VAST 2 response.",901:"General VPAID error",1005:"URI malformed."};function EK(t){if(!t)return!1;switch(t.toLocaleLowerCase()){case yi.CA:case yi.xA:case yi.kA:return!0;default:return!1}}function bK(t){const i=U();return!!(EK(t)||t&&i&&(null==i?void 0:i.canPlayType)&&i.canPlayType(t))||(kK("Invalid or unsupported MediaFile Content delivery type, skipping mediafile"),!1)}function LK(t,i){for(const e of i){new co(e).uFt(t)}}function kK(t){0}var CK,xK=class{get gFt(){return this.wFt}get AFt(){return this.vFt}constructor(t,i){this.wFt=t,this.vFt=i}};!function(t){t.mFt="linear",t.pFt="nonlinear",t.yFt="companion",t.MFt="vmap"}(CK||(CK={}));var OK,Sc=class t{async TFt(i,e){if(Ic(i.sources,i.timeOffset)){const s=await t.NFt(i.sources.src,e),n=s&&s.documentElement;if(!n)throw new mi(Xr.NETWORK,no.VAST_SCHEMA_VALIDATION_ERROR,"Ad source is not a valid XML document.");if(aK(n,"VMAP"))return await this.DFt(n,i,e);if(aK(n,"VAST")){const t=await this.SFt(n,e,!1);if(t){const e=new Uc("",!0,!0,t);return[new PK("start",e,OK.mFt,"",[],!1,!0,i)]}return[]}throw new mi(Xr.GENERAL,no.VAST_MALFORMED_RESPONSE,"Only VMAP and VAST files are allowed as ad source.")}if(qZ(i.sources,i.timeOffset))return[new BK(String(i.timeOffset),i,e)];throw new mi(Xr.GENERAL,no.VAST_MALFORMED_RESPONSE,"Something went wrong parsing the ad source; only VMAP and VAST files are allowed as ad source.")}async IFt(i,e,s,n){let r;void 0===n&&(n=[]);try{r=await t.NFt(i,e)}catch(t){throw LK(t instanceof mi&&t.lFt===no.VAST_MALFORMED_RESPONSE?tr.sFt:tr.HR,n),t}const h=r&&r.documentElement;if(h&&aK(h,"VAST"))return await this.SFt(h,e,s,n)}async EFt(t,i,e,s){var n;if(!(null==(n=t.sources)?void 0:n.src))throw new mi(Xr.GENERAL,no.MALFORMED_URI,"Property src on adSource is missing.");const r=await this.IFt(t.sources.src,s,!1),h=new Uc("",!0,!0,r),o=new PK(i,h,OK.mFt,"",[],!1,!0,t);return o.bFt=e,o}static async requestSuccessOnly(t,i){let e;try{e=await i.MS(t)}catch(t){throw new mi(Xr.NETWORK,no.UNKNOWN_ERROR,"Something went wrong while requesting xml from server.",t)}if(!Mr(e))throw new mi(Xr.NETWORK,no.UNKNOWN_ERROR,"Something went wrong while requesting xml from server.");return e}static async NFt(t,i){const e=new Pc({zu:t,aI:dm.Ru,oI:G.GET}),s=await this.requestSuccessOnly(e,i);try{return function(t){return dK(t,"text/xml")}(await s.Om())}catch(t){throw new mi(Xr.NETWORK,no.VAST_MALFORMED_RESPONSE,"The ad source could not be loaded.")}}async SFt(t,i,e,s){void 0===s&&(s=[]);const n=[],r=[],h=[];if(t&&aK(t,"VAST")){if(0!==Ho(t,"Ad").length){for(const e of Ho(t,"Ad"))try{const t=await this.LFt(e,i,s);0===t.wM?n.push(t):r.push(t)}catch(t){h.push(t)}if(0===n.length&&0===r.length&&h.length>0)throw h[0];return 1===n.length&&0===r.length?n[0]:0===n.length&&0!==r.length?new KZ(r):n.length>0||r.length>0?new KZ(r.concat(n)):void 0}if(0!==Ho(t,"Error").length){for(const i of Ho(t,"Error")){kK(tr.eFt.bb);const t=i.textContent;t&&s.push(t),LK(tr.eFt,s)}throw new mi(Xr.GENERAL,no.VAST_MALFORMED_RESPONSE,"The Ad Server responded with a VAST Error")}if(e)throw LK(tr.sFt,s),new mi(Xr.PARSING,no.VAST_NO_ADS_AFTER_WRAPPER,"No VAST element found after wrapper.")}else if(e)throw LK(tr.sFt,s),new mi(Xr.PARSING,no.VAST_NO_ADS_AFTER_WRAPPER,"No VAST element found after wrapper.")}async DFt(t,e,s){const n=[],r=Ho(t,"AdBreak");for(const t of r)try{const i=await this.kFt(t,e,s);i&&n.push(i)}catch(t){i.tit(t)}return n}async LFt(i,e,s){const n=Ni(i,"id")||"";let r=Xi(Ni(i,"sequence"));r||(r=0);const h=Ho(i,"InLine"),o=Ho(i,"Wrapper");if(0!==o.length)return await this.CFt(o[0],n,r,e,s);if(0!==h.length)return t.xFt(h[0],n,r,s);throw new mi(Xr.PARSING,no.VAST_SCHEMA_VALIDATION_ERROR,"An Ad tag without a Wrapper or inline element cannot be parsed")}static xFt(i,e,s,n){const r=Ho(i,"Error")[0];let h;r&&r.textContent&&(h=r.textContent,n.push(h));const o=Ho(i,"AdSystem")[0];let a,u="";o&&(u=o.textContent||u);const c=Ho(i,"AdTitle")[0];c&&(a=c.textContent||void 0);const d=[];for(const t of Ho(i,"Impression"))t.textContent&&d.push(t.textContent);const l=t.OFt(Ho(i,"Creatives")[0],u,n);return new JZ(e,s,u,a,d,l,new co(h))}async CFt(i,e,s,n,r){const h=Ho(i,"Error")[0];let o="";h&&h.textContent&&(o=h.textContent,r.push(o));const a=Ho(i,"AdSystem")[0];let u="";a&&(u=a.textContent||u);const c=[];for(const t of Ho(i,"Impression"))t.textContent&&c.push(t.textContent);const d=Ho(i,"VASTAdTagURI")[0];let l="";d&&d.textContent&&(l=d.textContent);const f=await this.IFt(l,n,!0,r),_=Ho(i,"Creatives")[0];let g=[];_&&(g=t.jFt(_,u,r));let w=Oa(Ni(i,"followAdditionalWrappers"));w||(w=!0);let A=Oa(Ni(i,"allowMultipleAds"));A||(A=!0);let v=Oa(Ni(i,"fallbackOnNoAd"));return v||(v=!1),new rK(e,s,c,f,w,g,A,v,new co(o))}static jFt(i,e,s){const n=[];for(const r of Ho(i,"Creative")){let i=Ni(r,"id");i||(i="");let h=Xi(Ni(r,"sequence"));h||(h=0);let o=Ni(r,"adId");o||(o="");const a=Ho(r,"Linear")[0];let u;a&&(u=t.zFt(a,"wrapper",i,e,s));const c=Ho(r,"NonLinearAds")[0];let d,l;if(c)try{l=t.PFt(c,i,e),d=l}catch(t){}const f=Ho(r,"CompanionAds")[0];let _;f&&(_=t.BFt(f)),n.push(new hK(i,o,h,"",u,d,_,[]))}return n}static OFt(i,e,s){const n=[];for(const r of Ho(i,"Creative")){let i=Ni(r,"id");i||(i="");let h=Xi(Ni(r,"sequence"));h||(h=0);let o=Ni(r,"adId");o||(o="");let a=Ni(r,"apiFramework");a||(a="");const u=Ho(r,"Linear")[0];let c;if(u)try{c=t.zFt(u,"inline",i,e,s)}catch(t){}const d=Ho(r,"NonLinearAds")[0];let l,f;if(d)try{f=t.PFt(d,i,e),l=f}catch(t){}const _=Ho(r,"CompanionAds")[0];let g;_&&(g=t.BFt(_));const w=Ho(r,"UniversalAdId"),A=t.parseUniversalAdIds(w);n.push(new hK(i,o,h,a,c,l,g,A))}return n}static zFt(i,e,s,n,r){const h=Ho(i,"Duration")[0];let o=0;if(h)o=WZ(h.textContent)||0;else if(!h&&"inline"===e)throw new mi(Xr.PARSING,no.VAST_SCHEMA_VALIDATION_ERROR,"Missing duration element in inLine linear");const a=Ni(i,"skipoffset");let u=-1;if(a){let t=WZ(a);if(void 0===t&&a.indexOf("%")>-1){const i=_.abs(Number(a.replace(/(?![0-9])./g,"")))/100;S(i)||(t=o*i)}void 0!==t&&(u=t)}const c=Ho(i,"MediaFiles")[0];let d=[];if(c&&(d=function(t,i){const e=[];for(const s of Ho(t,"MediaFile")){const t=Ni(s,"delivery"),n=Ni(s,"type");if(!n){kK();continue}if(!i(n))continue;let r=Xi(Ni(s,"width")),h=Xi(Ni(s,"height"));r||(kK(),r=0),h||(kK(),h=0);const o={delivery:t,type:n,width:r,height:h,contentURL:""+s.textContent};e.push(o)}return e}(c,bK)),"inline"===e&&(!c||0===d.length))throw LK(tr.rFt,r),new mi(Xr.PARSING,no.VAST_LINEAR_ASSET_MISMATCH,"Missing MediaFiles in linear element");const l=Ho(i,"TrackingEvents")[0];let f=[];l&&(f=t.RFt(l,wK,"linear"));const g=Ho(i,"VideoClicks")[0],w=t.UFt(g);return new oK(o,d,f,w,u,s,n)}static UFt(i){if(!i)return new nK("","",[],[]);const e=Ho(i,"ClickThrough")[0];let s,n="";e&&(s=e.textContent||void 0,n=Ni(e,"id")||"");const r=t.QFt(Ho(i,"ClickTracking")),h=t.QFt(Ho(i,"CustomClick"));return new nK(s,n,r,h)}static QFt(t){const i=[];for(const e of t){const t=e.textContent;if(!t)continue;const s=Ni(e,"id")||"";i.push(new sK(s,t))}return i}static RFt(t,i,e){const s=[];for(const n of Ho(t,"Tracking")){const r=Ni(n,"event");if(!i(r)){kK();continue}let h="";"linear"===e&&(h=Ni(t,"offset")||"0");const o=n.textContent;o&&s.push(new MK(r,h,o))}return s}static PFt(i,e,s){const n=[];for(const r of Ho(i,"NonLinear")){const i=Ho(r,"NonLinearClickThrough")[0];let h;i&&(h=i.textContent||void 0);const o=t.QFt(Ho(r,"NonLinearClickTracking")),a=Ho(r,"StaticResource")[0];let u;if(a&&a.parentNode){const t=Ni(a,"creativeType"),i=a.textContent||"",e=Ho(a.parentNode,"NonLinearClickThrough")[0];let s="";e&&(s=e.textContent||""),u=new NK(i,t,s,"")}const c=t.FFt(r),d=t.parseHtmlResource(r);if(!u&&!c&&!d){kK();continue}const l=new nK(h,"",o,[]);n.push(new tK(u,c,d,l,e,s))}if(0===n.length)throw new mi(Xr.PARSING,no.VAST_SCHEMA_VALIDATION_ERROR,"nonLinearAds element found with no nonLinear elements");const r=Ho(i,"TrackingEvents")[0];let h=[];return r&&(h=t.RFt(r,vK,"nonlinear")),new $Z(n,h)}static parseUniversalAdIds(t){const i=[];for(const r of t){var e;const t=null!=(e=Ni(r,"idRegistry"))?e:"";var s,n;const h=null!=(n=null!=(s=Ni(r,"idValue"))?s:r.textContent)?n:"";i.push(new xK(t,h))}return i}static BFt(i){let e=Ni(i,"requiredType");(function(t){switch(t){case"all":case"any":case"none":return!0;default:return!1}})(e)||(e=XZ.PP);const s=[];for(const e of Ho(i,"Companion")){let i=Xi(Ni(e,"width")),n=Xi(Ni(e,"height")),r=Ni(e,"id"),h=Xi(Ni(e,"assetWidth")),o=Xi(Ni(e,"assetHeight")),a=Xi(Ni(e,"expandedWidth")),u=Xi(Ni(e,"rxpandedHeight")),c=Ni(e,"apiFramework"),d=Ni(e,"adSlotId"),l=Xi(Ni(e,"pxratio"));const f=Ho(e,"AltText")[0];let _=f?f.textContent:"";i||(kK(),i=0),n||(kK(),n=0),r||(r=""),h||(h=0),o||(o=0),a||(a=0),u||(u=0),c||(c=""),d||(d=""),l||(l=1),_||(_="");const g=t.YFt(e),w=t.FFt(e),A=t.parseHtmlResource(e),v=Ho(e,"TrackingEvents")[0];let m=[];v&&(m=t.RFt(v,pK,"companion"));const p=Ho(e,"CompanionClickThrough")[0];let y;p&&(y=p.textContent||void 0);const M=t.QFt(Ho(e,"CompanionClickTracking"));(g||w||A)&&s.push(new eK(i,n,r,h,o,a,u,c,d,l,g,w,A,new nK(y,"",M,[]),m,_))}return new iK(e,s)}static YFt(t){const i=Ho(t,"StaticResource")[0];let e;if(i&&i.parentNode){let t=Ni(i,"creativeType");t||(t="");const s=i.textContent,n=Ho(i.parentNode,"AltText")[0],r=Ho(i.parentNode,"CompanionClickThrough")[0];let h,o="";n&&(o=n.textContent||""),r&&(h=r.textContent||void 0),s&&(e=new NK(s,t,h,o))}return e}static FFt(t){const i=Ho(t,"IFrameResource")[0];let e;if(i){const t=i.textContent||"";e=new DK(t)}return e}static parseHtmlResource(t){const i=Ho(t,"HTMLResource")[0];let e;if(i){const t=i.textContent||"";e=new SK(t)}return e}async kFt(i,e,s){const n=Ni(i,"timeOffset")||"0",r=Ni(i,"breakType")||OK.tT;let h=Ni(i,"breakId"),o=Oa(Ni(i,"repeatAfter"));if(void 0===h&&(h=""),void 0===o&&(o=!1),!(void 0!==je.GFt(n)))throw new mi(Xr.PARSING,no.VAST_SCHEMA_VALIDATION_ERROR,"Invalid TimeOffset type");const a=Ho(i,"AdSource")[0],u=Ho(i,"TrackingEvents")[0];let c=[];u&&(c=t.RFt(u,_K,"vmap"));let d=Ni(a,"id");d||(d="");let l=Oa(Ni(a,"allowMultipleAds"));void 0===l&&(l=!0);let f=Oa(Ni(a,"followRedirects"));f||(f=!0);const _=Ho(a,"AdTagURI")[0];let g="";const w=Ho(a,"VASTAdData")[0];if(!_||!_.textContent){if(w){if(w.firstElementChild&&uK(w.firstElementChild,"VAST")){const t=await this.SFt(w.firstElementChild,s,!1);if(t){const i=new Uc(d,l,f,t);return new PK(n,i,r,h,c,o,!1,e)}return}throw new mi(Xr.PARSING,no.VAST_SCHEMA_VALIDATION_ERROR,"vmap:VASTAdData does not have a VAST-structure as a child element")}throw new mi(Xr.PARSING,no.VAST_SCHEMA_VALIDATION_ERROR,"Invalid AdTagURI source or invalid VASTAdData in Adbreak Element")}try{g=_.textContent;const t=ie(e);return t.sources.src=g,new BK(n,t,s)}catch(t){return}}};!function(t){t.tT="",t.mFt="linear",t.VFt="nonlinear",t.WFt="display"}(OK||(OK={}));var jK,je=class{static HFt(t){switch(t){case"linear":case"nonlinear":case"display":return!0;default:return!1}}static qFt(t){}static XFt(t){if(void 0!==t)return"start"===t?0:"end"===t?-1:void 0}static ZFt(t){const i=t.split(":");let e=0;return e+=3600*Number(i[0]),e+=60*Number(i[1]),e+=Number(i[2]),e}static KFt(t){if(t<=0)return"00:00:00.000";const i=_.floor(t),e=t-i;return this.JFt(i/3600,2)+":"+this.JFt(i/60%60,2)+":"+this.JFt(i%60,2)+"."+this.JFt(1e3*e,3)}static JFt(t,i){return("00"+_.floor(t)).slice(-i)}static $Ft(t,i){const e=this.GFt(t);if(0===e)switch(t){case"start":return 0;case"end":return-1}else{if(2===e)return HZ(t)*i;if(1===e)return WZ(t);if(3===e)return this.XFt(t);if(4===e){const i=Number(t);if(!S(i)&&i>=-1)return i}}}static GFt(t){return"start"===t||"end"===t?0:void 0!==WZ(t.toString())?1:void 0!==HZ(t.toString())?2:void 0!==this.qFt(t.toString())?3:S(Number(t))?void 0:4}};!function(t){t[t.h6=0]="h6",t[t.tYt=1]="tYt",t[t.iYt=2]="iYt",t[t.eYt=3]="eYt",t[t.sYt=4]="sYt"}(jK||(jK={}));var zK,PK=class{get nYt(){return this.rYt.integration}get hYt(){return this.oYt}get qEt(){return this.aYt}get pQt(){return this.yQt}set pQt(t){this.yQt=t}get sUt(){return this.QUt}get uYt(){return this.cYt}get dYt(){return this.lYt}get ttt(){return this.rYt}get fYt(){return this.bFt.Kl}get W(){return!0}$n(){return Promise.resolve()}get bFt(){return this._Yt}set bFt(t){this._Yt=t}constructor(t,i,e,s,n,r,h,o){this.yQt=-1,this.oYt=i,this.aYt=t,this.gYt=e,this.cYt=s,this.lYt=r,this.QUt=n,this.wYt=h,this.rYt=o}},BK=class{get nYt(){return this.fUt.nYt}get hYt(){return this.fUt.hYt}get qEt(){return this.fUt.qEt}get pQt(){return this.fUt.pQt}set pQt(t){this.fUt.pQt=t}get sUt(){return this.fUt.sUt}get uYt(){return this.fUt.uYt}get dYt(){return this.fUt.dYt}get ttt(){return this.fUt.ttt}get fYt(){return this.fUt.fYt}get W(){return this.ait}$n(){var t;return null!=(t=this.AYt)?t:this.AYt=this.dit()}async dit(){const t=new Sc;this.fUt=await t.EFt(this.ttt,this.qEt,this.bFt,this.mI),this.ait=!0}get bFt(){return this.fUt.bFt}set bFt(t){this.fUt.bFt=t}constructor(t,i,e){this.ait=!1,this.mI=e,this.fUt=new PK(t,void 0,"","",[],!1,!1,i)}},Uc=class{get o(){return this.IT}get eQt(){return this.vYt}get mYt(){return this.pYt}get ORt(){return this.yYt}constructor(t,i,e,s){this.IT=t,this.vYt=i,this.yYt=s,this.pYt=e}};function RK(t,i){let e;if(t.vastAdsRequest&&(e=function(t){if(t.adTagUrl)return t.adTagUrl;if(t.adsResponse)return fK(t.adsResponse);return}(t.vastAdsRequest)),!e){const i=function(t){const i=t.contentUrl||t.contentId;if(!i)return;const e=t.contentType||"video/mp4",s=gw(e)||mw(t.contentType)?"streaming":"progressive",n=void 0!==t.duration?"<Duration>"+je.KFt(t.duration)+"</Duration>":"",r=void 0!==t.whenSkippable&&t.whenSkippable>=0?' skipoffset="'+je.KFt(t.whenSkippable)+'"':"",h='<MediaFile delivery="'+s+'" type="'+e+'">'+lK(i)+"</MediaFile>",o=t.clickThroughUrl?"<VideoClicks><ClickThrough>"+lK(t.clickThroughUrl)+"</ClickThrough></VideoClicks>":"",a="<Linear"+r+">"+n+"<MediaFiles>"+h+"</MediaFiles>"+o+"</Linear>",u=t.title?"<AdTitle>"+lK(t.title)+"</AdTitle>":"";return'<VAST version="3.0"><Ad>'+u+"<InLine><Creatives><Creative>"+a+"</Creative></Creatives></InLine></Ad></VAST>"}(t);i&&(e=fK(i))}const s=t.customData;if(e){const n={integration:null==s?void 0:s.integration,sources:{src:e,type:"vast"},timeOffset:i};return n.integration&&"csai"!==n.integration&&"theo"!==n.integration||(n.skipOffset=t.whenSkippable),n}}!function(t){t.MYt="error",t.TYt="sourceupdate"}(zK||(zK={}));var UK=class extends Yi{constructor(t){super("error"),this.lt=t}},QK=class extends Yi{constructor(t,i){super("sourceupdate"),this.bt=t,this.yc=i}},FK=class extends Bo{get jp(){return this.NYt}DYt(t){this.SYt.DYt(t)}IYt(t){this.SYt.IYt(t)}EYt(t){this.SYt.EYt(t)}bYt(t){this.SYt.bYt(t)}LYt(t){this.NYt.addUpdateListener(t)}kYt(t){this.NYt.removeUpdateListener(t)}CYt(){const t=new Rs,i=new chrome.cast.media.GetStatusRequest;return this.NYt.getStatus(i,(()=>{t.Qb({bt:this.yf(),yc:this.Wa()})}),(i=>t.Yb(i))),t.Vb}yf(){var t;return null==(t=this.NYt.customData)?void 0:t.currentSource}Wa(){var t;let i;if(null==(t=this.OYt.xYt())?void 0:t.version){var e;i=null==(e=this.NYt.customData)?void 0:e.sourceDescription}else{var s;const t=null==(s=QZ(this.NYt))?void 0:s.customData;(function(t){return Mo(t)&&t.theoplayer_version>=1&&Dd(t.streamStart)&&Dd(t.isLive)&&Dd(t.sourceDescription)})(t)&&(i=t.sourceDescription),i||(i=function(t){return{sources:[{src:t.contentId,type:t.contentType}],ads:YK(t)}}(this.NYt.media))}return i}m_(){const t=new chrome.cast.media.PauseRequest;this.NYt.pause(t,qo,this.jYt)}y_(){const t=new chrome.cast.media.StopRequest;this.NYt.stop(t,qo,this.jYt)}p_(){const t=new chrome.cast.media.PlayRequest;this.NYt.play(t,qo,this.jYt)}Dm(t,i){const e=new chrome.cast.media.SeekRequest;return e.currentTime=t,e.resumeState=i?chrome.cast.media.ResumeState.PLAYBACK_PAUSE:chrome.cast.media.ResumeState.PLAYBACK_START,new Promise(((t,i)=>{this.NYt.seek(e,t,(t=>{var e;i(new Ba(UZ(t.code),null!=(e=t.description)?e:void 0))}))}))}Wf(t){this.SYt.B8(FZ,function(t){return{type:mc.xRt,properties:{playbackRate:t}}}(t)).catch(this.zYt)}PYt(t){const i=new chrome.cast.media.EditTracksInfoRequest(t);this.NYt.editTracksInfo(i,qo,this.jYt)}BYt(){return this.NYt.getEstimatedTime()}RYt(){return this.NYt.getEstimatedBreakClipTime()}UYt(){return this.NYt.getEstimatedBreakTime()}QYt(){this.SYt.B8("urn:x-cast:com.google.cast.media",{type:YZ.SKIP_AD,requestId:this.FYt++,mediaSessionId:this.NYt.mediaSessionId}).catch(this.zYt)}gn(){this.Vo()}constructor(t,i,e){super(i),this.FYt=0,this.zYt=t=>{this.Co(new UK(t))},this.jYt=t=>{var i;const e=new Ba(UZ(t.code),null!=(i=t.description)?i:void 0);this.zYt(e)},this.OYt=t,this.SYt=i,this.NYt=e}};function YK(t){return t.vmapAdsRequest&&t.vmapAdsRequest.adTagUrl?[{sources:{src:t.vmapAdsRequest.adTagUrl,type:"vmap"}}]:t.breaks&&t.breakClips?xl(t.breaks,(i=>function(t,i){const e=[];if(t.isWatched)return e;for(const s of t.breakClipIds){const n=Po(i,(t=>t.id===s));if(n){const i=RK(n,t.position);i&&e.push(i)}}return e}(i,t.breakClips))):[]}var GK,VK=class{YYt(t,i){this.OYt.addMessageListener(t,i)}GYt(t,i){this.OYt.removeMessageListener(t,i)}B8(t,i){return new Promise(((e,s)=>{this.OYt.sendMessage(t,i,e,(t=>{var i;s(new Ba(UZ(t.code),null!=(i=t.description)?i:void 0))}))}))}gn(){}constructor(t){this.OYt=t}};function WK(t){return"vmap"===t||"adrule"===t}function HK(t){if(t)return Qs(t)&&""!==t?{src:jo(t),type:void 0}:function(t){return Mo(t)&&Boolean(t.src)}(t)&&""!==t.src?{src:jo(t.src),type:qK(t.type)}:void 0}function qK(t){if(Qs(t)){const i=t.toLowerCase();switch(i){case"vast":case"vmap":case"adrule":return i;default:return void Eo("The ad source type provided in the configuration could not be recognized: '"+t+"'.")}}else t||Eo("For better performance it is highly recommended to add the type to the configuration of your ad sources.")}function mo(t){if(void 0!==t&&""!==t&&("string"==typeof t||"number"==typeof t)){switch(t){case"start":case"00:00:00":case"00:00:00.000":case"0%":case"0":return 0;case"end":case"100%":return-1}if("string"==typeof t){if(function(t){return VZ.test(t)}(t))return je.ZFt(t);if(XK(t))return t}return Number(t)>=0?Number(t):void 0}}function XK(t){return new RegExp(/^\d{1,2}%$/).test(t)}function ZK(t){const i=[],e=(t,s)=>{if($(s))for(let i=0,n=s.length;i<n;i++){const n=Mo(s[i])&&s[i]?String(i):"";e(t+"["+encodeURIComponent(n)+"]",s[i])}else if(Mo(s))for(const i of w.keys(s))e(t+"["+encodeURIComponent(i)+"]",s[i]);else((t,e)=>{i.push(t+"="+encodeURIComponent(null!=e?e:""))})(t,String(s))};for(const i of w.keys(t))e(encodeURIComponent(i),t[i]);return i.join("&")}!function(t){t.kRt="receiver_info",t.REt="event",t.VYt="propertychange",t.CRt="trackevent"}(GK||(GK={}));var T,KK=class{WYt(t){let i;try{i=JSON.parse(t)}catch(t){0}return i}DYt(t){this.HYt.push(t)}IYt(t){_s(this.HYt,t)}EYt(t){this.qYt.push(t)}bYt(t){_s(this.qYt,t)}XYt(t){this.ZYt=t}B8(t,i){return this.KYt.B8(t,i)}gn(){this.KYt.GYt(FZ,this.JYt),No(this.qYt),No(this.HYt),this.ZYt=void 0}constructor(t){this.HYt=[],this.qYt=[],this.JYt=(t,i)=>{const e=this.WYt(i);if(e)if(e.type===GK.VYt)for(const t of this.HYt)for(const i of w.keys(e.properties))t(i,e.properties[i]);else if(e.type===GK.REt)for(const t of this.qYt)t(e.event);else e.type===GK.CRt&&this.ZYt&&e.event.trackState&&this.ZYt(e.event.trackId,e.event.trackState.targetQualityIds)},this.KYt=t,this.KYt.YYt(FZ,this.JYt)}};!function(t){t.$Yt="medialoadedchange",t.Ew="volumechange",t.MYt="casterror",t.tGt="playererror",t.iGt="targetqualitychanged",t.eGt="receiverinfochanged"}(T||(T={}));var JK,$K=class extends Yi{constructor(){super("medialoadedchange")}},tJ=class extends Yi{constructor(t,i){super("volumechange"),this.c_=t,this.Pf=i}},iJ=class extends Yi{constructor(t){super("casterror"),this.lt=t}},eJ=class extends Yi{constructor(t){super("playererror"),this.lt=t}},sJ=class extends Yi{constructor(t,i){super("targetqualitychanged"),this.Rp=t,this.sGt=i}},nJ=class extends Yi{constructor(){super("receiverinfochanged")}},rJ=class extends Bo{nGt(t,i,e){this.SYt.B8(FZ,function(t,i,e){return{type:mc.CRt,trackID:t,trackType:i,properties:{targetQuality:e}}}(t,i,e)).catch(this.zYt)}rGt(){this.KYt.YYt(FZ,this.hGt),this.SYt.B8(FZ,{type:mc.kRt}).catch(qo)}xYt(){return this.oGt}aGt(){return this.OYt.getSessionObj()}uGt(t){!this.cGt&&t&&t.idleReason!==chrome.cast.media.IdleReason.FINISHED&&(this.cGt=new FK(this,this.SYt,t),this.dGt(),this.Co(new $K),this.cGt.LYt(this.lGt))}fGt(){return this.cGt}async _Gt(t){const i=function(t){const i=function(t,i,e,s){const n=OD(t)||"",r=CD(t)||"",h=new chrome.cast.media.MediaInfo(n,r);return h.metadata=RZ(t.metadata,t.poster),h.streamType=s,function(t,i,e){const s=[],n=[];let r,h=0,o=0;for(const t of i){const i=HK(t.sources);if(i)if(Ic(i,t.timeOffset))r=new chrome.cast.media.VastAdsRequest,r.adTagUrl=i.src;else if(qZ(i,t.timeOffset)){var a;const r=null!=(a=t.timeOffset)?a:0,c=t.skipOffset;var u;const d=null!=(u=je.$Ft(r,e))?u:0,l=void 0!==c?je.$Ft(c,e):void 0,f=new chrome.cast.media.BreakClip("bc"+o++);f.vastAdsRequest=new chrome.cast.media.VastAdsRequest,f.vastAdsRequest.adTagUrl=i.src,f.whenSkippable=l,f.customData={integration:t.integration};let _=Po(n,(t=>t.position===d));void 0===_&&(_=new chrome.cast.media.Break("b"+h++,[],d),n.push(_)),_.breakClipIds.push(f.id),s.push(f)}else 0;else 0}t.breakClips=s,t.breaks=n,t.vmapAdsRequest=r}(h,i,e),h}(t.gGt,t.Oc,t.ct,t.eZ),e=new chrome.cast.media.LoadRequest(i);return e.autoplay=!0,e.currentTime=t.Mf,e.customData=t.wGt,e}(t);let e;try{e=await this.OYt.loadMedia(i)}catch(t){e=t}if(e)throw new Ba(UZ(e))}Rf(t){this.aGt().setReceiverMuted(t,qo,this.AGt)}l_(t){this.aGt().setReceiverVolumeLevel(t,qo,this.AGt)}vGt(){return this.aGt().receiver.friendlyName}gn(){this.Vo(),this.OYt.removeEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.mGt),this.aGt().removeUpdateListener(this.dGt),this.KYt.GYt(FZ,this.hGt),this.SYt.gn(),this.KYt.gn()}constructor(t){super(),this.oGt=void 0,this.zYt=t=>{this.Co(new iJ(t))},this.pGt=(t,i)=>{"error"===t&&this.Co(new eJ(i))},this.yGt=(t,i)=>{this.Co(new sJ(t,i))},this.hGt=(t,i)=>{const e=JSON.parse(i);e.type===GK.kRt&&(this.oGt=e.info,this.Co(new nJ))},this.dGt=()=>{const t=this.aGt(),{level:i,muted:e}=t.receiver.volume;this.Co(new tJ(null!=i?i:void 0,null!=e?e:void 0))},this.mGt=()=>this.uGt(this.OYt.getMediaSession()),this.lGt=t=>{var i;t||(null==(i=this.cGt)||i.kYt(this.lGt),this.cGt=void 0,this.Co(new $K))},this.AGt=t=>{var i;const e=new Ba(UZ(t.code),null!=(i=t.description)?i:void 0);this.zYt(e)},this.OYt=t,this.OYt.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,this.mGt),this.KYt=new VK(t.getSessionObj()),this.SYt=new KK(this.KYt),this.SYt.DYt(this.pGt),this.SYt.XYt(this.yGt),this.aGt().addUpdateListener(this.dGt),this.dGt(),this.rGt();const i=this.OYt.getMediaSession();i&&this.uGt(i)}};(JK||(JK={})).MGt="statechange";var il,hJ=class extends Yi{constructor(t){super("statechange"),this.$ct=t}},oJ=class extends Bo{v7(){return this.Ic}Af(){return ce.MB()}Tf(){return this.TB+this.TGt}r7(){return this.Tf()}mf(){}Td(){return this.UL}If(){return this._0}Ef(){}Yf(){return this.SB}NGt(){}Vf(){return this.IB}Wf(t){this.IB!==t&&(this.IB=t,this.Co(new Kn(this.Qo.Mf,t)))}$f(){return oe.sT}qf(){return ce.MB()}i_(){return ce.MB()}s_(){return!1}lf(){return this.oT}o_(){return this.uT}n_(){return this.Dl}PYt(t){}u_(){return this.DGt}h_(){return this.SGt}p_(){this.SB=!1}m_(){this.SB=!0}Dm(t){this.TB=t-this.TGt}IGt(){return this.TGt}EGt(t){this.TGt=t}Z7(t){this.Ic.Z7(t)}y_(){}gn(){this.Vo(),this.oT.gn(),this.uT.gn(),this.Dl.gn(),this.Ic.gn()}constructor(t,i,e,s,n,r,h,o,a){super(),this.Qo=t,this.TGt=0,this.oT=new Ur,this.uT=new Ur,this.Dl=new Zi,this.Ic=new Lz,this.TGt=i,this.TB=e-i,this.UL=s,this._0=n,this.SB=r,this.IB=h,this.DGt=o,this.SGt=a}};!function(t){t.bGt="ccmodechangerequest",t.LGt="cctargetqualitychangerequest",t.kGt="cctrackchangerequest"}(il||(il={}));var aJ,uJ,cJ=class extends Yi{constructor(t,i,e){super(il.bGt),this.track=t,this.trackId=i,this.mode=e}};function dJ(t){return"AUDIO"===t.type}function lJ(t){return"VIDEO"===t.type}function fJ(t){return"TEXT"===t.type}!function(t){t.Ru="TEXT",t.vm="AUDIO",t.Am="VIDEO"}(aJ||(aJ={})),function(t){t.pm="SUBTITLES",t.wS="CAPTIONS",t.AS="DESCRIPTIONS",t.Fn="CHAPTERS",t.Mm="METADATA"}(uJ||(uJ={}));var _J=class extends Bo{get va(){return this.Xa||(this.Xa=cf(this)),this.Xa}get kh(){return this.bT}set kh(t){t!==this.bT&&(this.bT=t,this.Co(new gh(this)))}get q(){return this.k0}get L(){return this.C0}get jg(){return this.ZB}set jg(t){const i=$r(t);this.ZB!==i&&(this.ZB=i,this.CGt!==i&&this.Co(new cJ(this,this.Mg,i)),this.Co(new Ji(this)))}get xGt(){return this.CGt}set xGt(t){const i=$r(t),e=this.ZB!==i;this.ZB=i,this.CGt=i,e&&this.Co(new Ji(this))}Pg(t){this.jg=t}OGt(t){}gn(){}tr(){}constructor(t){super(),this.Xa=void 0;const i=t.customData;this.Mg=Number(t.trackId)||0,this.o=""+(i&&i.id||this.Mg),this.bT=i&&i.label||t.name||"",this.gs=i&&i.language||t.language||"",this.Og=i&&i.inBandMetadataTrackDispatchType||"",this.zt=i&&i.kind||function(t){switch(t){case uJ.pm:return hh.pm;case uJ.wS:return hh.wS;case uJ.AS:return hh.AS;case uJ.Fn:return hh.Fn;case uJ.Mm:return hh.Mm}return}(t.subtype)||"subtitles",this.Jf=Rt.NONE,this.Rg=i&&void 0!==i.type?function(t){return _w(t)?t:Wt.DEFAULT}(i.type):Wt.WEBVTT,this.L0=[],this.C0=new qi(this.L0),this.R0=[],this.k0=new qi(this.R0),this.ZB=$r(i&&i.mode||L.Ch),this.CGt=this.ZB}};var gJ,wJ=class extends Yi{constructor(t,i){super(il.kGt),this.trackId=t,this.enabled=i}},AJ=class extends Yi{constructor(t,i){super(il.LGt),this.track=t,this.targetQuality=i}};!function(t){t.vm="audio",t.Am="video",t.Ru="text"}(gJ||(gJ={}));var vJ,mJ=class extends Bo{get yg(){return this.hct}get Dg(){return this.rct}set Dg(t){this.jGt(t),this.Co(new AJ(this,t))}get Ng(){return this.yT}get kh(){return this.bT}set kh(t){t!==this.bT&&(this.bT=t,this.Co(new gh(this)))}get Rt(){return this.Le}set Rt(t){this.Le!==t&&(this.Le=t,this.zGt!==t&&this.Co(new wJ(this.Mg,t)),this.Co(new Ji(this)))}get PGt(){return this.zGt}set PGt(t){const i=this.Le!==t;this.Le=t,this.zGt=t,i&&this.Co(new Ji(this))}get va(){return this.Xa||(this.Xa=Bs(this)),this.Xa}get jg(){return this.Rt?"enabled":"disabled"}kT(t){this.Rt=t}OGt(t){if(t.targetQualityIds){const i=[];for(let e=0;e<this.yT.U;e++){const s=this.yT.cg(e);t.targetQualityIds.indexOf(s.o)>-1&&i.push(s)}const e=i.length?i:void 0;this.jGt(e)}}jGt(t){(function(t,i){return!t&&i||t&&!i||t&&i&&!yl(t,i)})(this.rct,t)&&(this.rct=t&&this.yT.NT(t)?t:void 0,this.Co(new ju(this.rct,this)))}unload(){for(const t of this.yT.og)t.fn("update",this.jSt);this.yT.tr()}constructor(t){super(),this.hct=void 0,this.yT=new Lt,this.rct=void 0,this.Xa=void 0,this.jSt=()=>this.Co(new gh(this));const i=t.customData;if(this.Mg=Number(t.trackId)||0,this.o=""+(i&&i.id||this.Mg),this.bT=i&&i.label||t.name||"",this.gs=i&&i.language||t.language||"",this.zt=i&&i.kind||"main",this.Le=i&&i.enabled,this.zGt=this.Le,dJ(t)){this.XJ=gJ.vm;const i=t.customData&&t.customData.qualities;if(i)for(const t of i){const i=new aG(t.id,t.bandwidth,t.codecs,t.name,"",t.audioSamplingRate);i.yn("update",this.jSt),this.yT.MT(i)}}else{this.XJ=gJ.Am;const i=t.customData&&t.customData.qualities;if(i)for(const t of i){const i=new oG(t.id,t.bandwidth,t.codecs,t.name,"",t.frameRate,t.width,t.height);i.yn("update",this.jSt),this.yT.MT(i)}}}};!function(t){t.BGt="legacy",t.RGt="caf"}(vJ||(vJ={}));var pJ=class{Mc(){if(this.UGt>=this.Ic.length)return;const t=this.Ic[this.UGt];return this.UGt+=1,t}lt(){return this.Mc()}constructor(t){this.UGt=0,this.Ic=t}};function yJ(t){var i,e,s;return null!=(s=null==(e=t.hYt)||null==(i=e.ORt)?void 0:i.jRt())?s:[]}var Gt,MJ=class{},xo=class{O7(){var t;return null!=(t=this.Xa)?t:this.Xa=function(t){return{get ads(){return t.Oc.map((t=>t.O7()))},get integration(){return t.nYt},get maxDuration(){return t.QGt},get maxRemainingDuration(){return t.FGt},get timeOffset(){return t.qEt}}}(this)}constructor(){this.Xa=void 0}},Rc=class{get YGt(){return this.GGt}get t(){return this.Qo}constructor(t,i){this.GGt=t,this.Qo=i}},TJ=class extends xo{get bFt(){return this._Yt}get Oc(){const t=[];for(const s of this._Yt.VGt)for(const n of yJ(s)){var i,e;const r=null!=(e=null==(i=n.JRt)?void 0:i.TUt)?e:[];if(n.ZRt&&t.push(this.WGt(n.ZRt,r,n.tUt,s.ttt)),n.$Rt)for(const i of n.$Rt.iUt)t.push(this.HGt(i,r,n.$Rt,n.tUt,s.ttt))}return t}WGt(t,i,e,s){const n=Po(this.qGt,(i=>i.ZRt===t));if(void 0!==n)return n;const r=new IJ(t,i,this,this.XGt,e,s);return this.qGt.push(r),r}HGt(t,i,e,s,n){const r=Po(this.ZGt,(i=>i.$Rt===t));if(void 0!==r)return r;const h=new SJ(t,i,e,this,this.XGt,s,n);return this.ZGt.push(h),h}get nYt(){return this._Yt.VGt.some((t=>t.nYt===Os.THEO))?Os.THEO:Os.CSAI}get qEt(){const t=this._Yt.Kl;return t>=0?t:this.XGt.t.Td()}get FGt(){let t=0;for(const i of this._Yt.VGt)for(const e of yJ(i))e.ZRt&&!e.ZRt.MQt&&(t+=e.ZRt.ct);return this.XGt&&this.XGt.YGt&&(t+=this.XGt.YGt.ct-this.XGt.YGt.Mf),t}get QGt(){let t=0;for(const i of this._Yt.VGt)for(const e of yJ(i))e.ZRt&&(t+=e.ZRt.ct);return t}constructor(t,i){super(),this.qGt=[],this.ZGt=[],this._Yt=t,this.XGt=i}},NJ={height:0,width:0,clickThrough:"",contentHTML:"",resourceURI:"",altText:""},DJ=class extends MJ{get Xl(){return this.fUt}get ttt(){return this.rYt}get tUt(){return this.gQt}KGt(){return this.JGt}$Gt(){this.JGt=!0}tVt(t){return Tt({},NJ,{resourceURI:t.JQt||""})}iVt(t){return Tt({},NJ,{contentHTML:t.JQt.trim(),type:"HTMLResource"})}eVt(t){var i,e;return Tt({},NJ,{clickThrough:(null==(i=t.GUt)?void 0:i.trim())||"",resourceURI:(null==(e=t.JQt)?void 0:e.trim())||"",altText:t.FUt||"",type:"StaticResource"})}sVt(t,i,e){if(!t||!i)return;const s="<img "+(e?"title='"+e+"' ":"")+"src='"+encodeURI(t)+"'>";return"<a href='"+encodeURI(i)+"' target='_blank' rel='noopener'>"+s+"</a>"}JRt(t){return t?t.map((t=>{let i;const e={adSlotId:t.jUt||"",height:t.Ti||0,width:t.ji||0};if(t.rUt){var s;const e=this.eVt(t.rUt),n=e.clickThrough||(null==(s=t.RUt)?void 0:s.GUt);i=Tt({},e,{contentHTML:this.sVt(e.resourceURI,n,e.altText)||""})}else if(t.uUt)i=this.iVt(t.uUt);else{if(!t.oUt)return;i=this.tVt(t.oUt)}return vi(i,e)})).filter((t=>void 0!==t)):[]}nVt(){return this.rVt.YRt}constructor(t,i,e,s,n,r){super(),this.JGt=!1,this.rVt=t,this.NUt=i,this.fUt=e,this.XGt=s,this.gQt=n,this.rYt=r}},SJ=class extends DJ{get $Rt(){return this.rVt}get KRt(){return this.hVt}fa(){const t=this.fUt,i={companions:this.JRt(this.NUt),type:"nonlinear",id:this.rVt._Ut,skipOffset:this.pQt,integration:this.rYt.integration,adSystem:this.rVt.YRt,get adBreak(){return t.O7()},creativeId:this.rVt._Ut,universalAdIds:this.gQt.map((t=>({adIdRegistry:t.gFt,adIdValue:t.AFt})))};return this.rVt.oUt?vi(this.tVt(this.rVt.oUt),i):this.rVt.uUt?vi(this.iVt(this.rVt.uUt),i):this.rVt.rUt?vi(this.eVt(this.rVt.rUt),i):i}O7(){var t;return null!=(t=this.Xa)?t:this.Xa=this.fa()}oVt(){var t,i;return null!=(i=null==(t=this.rVt.rUt)?void 0:t.JQt)?i:""}aVt(){var t,i,e;return null!=(e=null==(i=this.rVt)||null==(t=i.rUt)?void 0:t.tFt)?e:""}get pQt(){const t=this.rVt.Xl;return t&&t.ttt&&void 0!==t.ttt.skipOffset?je.$Ft(t.ttt.skipOffset,this.XGt.YGt.ct):(null==(i=this.rVt.Xl)?void 0:i.pQt)||-1;var i}constructor(t,i,e,s,n,r,h){super(t,i,s,n,r,h),this.hVt=e}},IJ=class extends DJ{get ZRt(){return this.rVt}fa(){var t;const i=this.fUt;return{companions:this.JRt(this.NUt),duration:this.rVt.ct,id:this.rVt._Ut,mediaFiles:this.rVt.AQt,skipOffset:this.pQt,type:"linear",integration:this.rYt.integration,adSystem:this.rVt.YRt,width:void 0,height:void 0,get adBreak(){return i.O7()},clickThrough:null==(t=this.rVt.oQt)?void 0:t.GUt,creativeId:this.rVt._Ut,universalAdIds:this.gQt.map((t=>({adIdRegistry:t.gFt,adIdValue:t.AFt})))}}O7(){var t;return null!=(t=this.Xa)?t:this.Xa=this.fa()}oVt(){return this.rVt.AQt.length>0?this.rVt.AQt[0].contentURL:""}aVt(){return this.rVt.AQt.length>0?this.rVt.AQt[0].type:""}get pQt(){const t=this.rVt.Xl;return t&&t.ttt&&void 0!==t.ttt.skipOffset?je.$Ft(t.ttt.skipOffset,this.XGt.YGt.ct):this.rVt.pQt||-1}constructor(t,i,e,s,n,r){super(t,i,e,s,n,r)}};function EJ(t){return t instanceof IJ}!function(t){t.uVt="theo",t.cVt="csai",t.dVt="google-ima",t.so="google-dai",t.lVt="freewheel",t.fVt="mediatailor",t.kI="chromecast",t.N7="theoads"}(Gt||(Gt={}));var bJ,Qo=class extends Gs{fa(){return new LJ(this.Y7.O7())}constructor(t){super("_Vt",t)}},LJ=class extends Xn{constructor(t){super("updatead",t)}},Ec=class extends Gs{fa(){return new kJ(this.Y7.O7())}constructor(t){super("gVt",t)}},kJ=class extends Xn{constructor(t){super("adloaded",t)}},CJ=class extends Ut{get Fc(){return void 0!==this.wVt}get x7(){return this.rVt?[this.rVt]:[]}get j7(){var t;return null!=(t=this.wVt)?t:null}get z7(){return xl(this.AVt,(t=>{const i=t.Oc;if(t===this.wVt&&void 0!==this.rVt){const t=i.indexOf(this.rVt);if(t>=0)return i.slice(t+1)}return t.vVt()?[]:i}))}get P7(){return this.AVt.filter((t=>t===this.wVt||!t.vVt()))}get va(){var t;return null!=(t=this.Xa)?t:this.Xa=Xh(this)}Z1(t,i,e){throw new b("Scheduling ads while casting is not supported.")}Vm(){this.NYt.QYt()}K7(t){var i;null==(i=this.mVt)||i.K7(t)}R7(t,i){var e;null==(e=this.mVt)||e.R7(t,i)}pVt(t){return Po(this.AVt,(i=>i.o===t))}yVt(t,i,e,s){const n=this.AVt,r=[];let h=!1;for(const n of t){let t=this.pVt(n.id);void 0===t&&(t=new xJ(n),s.push(new cr(t))),!Dd(t.MVt)&&Dd(e)&&(t.MVt=this.TVt(t.NVt,e));const o=t.Oc;t.Yn(n,i,e,s);const a=t.Oc;for(const t of a)ae(o,t)||(s.push(new Tz(t)),h=!0);r.push(t)}this.AVt=r,h&&s.push(new Uo);for(const t of n)ae(r,t)||s.push(new pz(t))}DVt(t,i){const e=this.wVt,s=this.rVt;let n,r;if(t){var h;const{breakId:i,breakClipId:e}=t;n=i?this.pVt(i):void 0,r=e?null==(h=this.wVt)?void 0:h.SVt(e):void 0}if(this.wVt=n,this.rVt=r,n!==e&&(void 0!==e&&(e.IVt=void 0,i.push(new Vi(e))),void 0!==n&&(n.IVt=this.NYt,i.push(new Ko(n)))),r!==s){const t=this.Qo.Tf();void 0!==s&&i.push(new vo(s,t)),void 0!==r&&i.push(new Re(r,t))}}TVt(t,i){if(!i||!i.breaks)return;const e=Po(i.breaks,(i=>i.id===t.id));return e}Z7(t){const i=[];for(const t of this.AVt){let e=t.Oc;if(t===this.wVt&&void 0!==this.rVt){const t=e.indexOf(this.rVt);t>=0&&(e=e.slice(t))}else if(t.vVt())continue;for(const t of e){const e=t.EVt();e&&i.push(e)}}for(const e of i)t.Z1(e,Ki.B7,!1)}gn(){return this.Vo(),this.NYt.kYt(this.Yr),void 0!==this.wVt&&(this.wVt.IVt=void 0,this.wVt=void 0),this.rVt=void 0,No(this.AVt),Promise.resolve(void 0)}constructor(t,i,e){super(),this.AVt=[],this.wVt=void 0,this.rVt=void 0,this.Xa=void 0,this.Yr=t=>{var i;if(!t)return;const e=this.NYt.jp,{breakStatus:s}=e,{breakClips:n,breaks:r}=e.media,h=null==(i=QZ(e))?void 0:i.media,o=[];r&&n&&this.yVt(r,n,h,o),this.DVt(s,o);for(const t of o)this.Co(t)},this.Qo=t,this.NYt=i,this.mVt=e,this.NYt.LYt(this.Yr)}},xJ=class extends xo{get NVt(){return this.bVt}get o(){return this.bVt.id}get Oc(){return this.Ic}get nYt(){return Gt.kI}get QGt(){let t=this.bVt.duration;return void 0===t&&this.Ic.length>0&&(t=Yc(this.Ic,(t=>t.ct)),S(t)&&(t=void 0)),t}get FGt(){const t=this.QGt;if(void 0!==t&&void 0!==this.IVt){const i=this.IVt.UYt();if(void 0!==i)return _.max(0,t-i)}return t}get qEt(){return this.bVt.position}vVt(){return this.bVt.isWatched}SVt(t){return Po(this.Ic,(i=>i.o===t))}Yn(t,i,e,s){const n=[];for(let r=0;r<t.breakClipIds.length;r++){const h=t.breakClipIds[r],o=Po(i,(t=>t.id===h));if(void 0===o)continue;const a=r<this.Ic.length?this.Ic[r]:new OJ(o,this);!Dd(a.LVt)&&Dd(e)&&(a.LVt=this.kVt(e,h,r)),a.Yn(o,s),n.push(a)}this.bVt=t,this.Ic=n}kVt(t,i,e){if(!t||!t.breakClips)return;let s=Po(t.breakClips,(t=>t.id===i));if(!s){var n;const i=null==(n=this.MVt)?void 0:n.breakClipIds[e];i&&(s=Po(t.breakClips,(t=>t.id===i)))}return s}constructor(t){super(),this.MVt=void 0,this.Ic=[],this.IVt=void 0,this.bVt=t}},OJ=class{get CVt(){return this.xVt}get o(){return this.xVt.id}get TUt(){return[]}get ct(){var t;return null!=(t=this.xVt.duration)?t:NaN}get AQt(){const t=this.oVt();return t?[{contentURL:t,delivery:"progressive",type:this.aVt(),width:0,height:0}]:[]}get pQt(){const{whenSkippable:t}=this.xVt;return void 0===t?void 0:t<0?-1:t}get GUt(){return this.xVt.clickThroughUrl}get _Ut(){}get tUt(){return[]}nVt(){return""}aVt(){var t;return null!=(t=this.xVt.contentType)?t:""}oVt(){var t,i;return null!=(i=null!=(t=this.xVt.contentUrl)?t:this.xVt.contentId)?i:""}Yn(t,i){const e=this.o,s=this.ct,n=this.xVt.contentUrl;this.xVt=t;const r=this.o,h=this.ct,o=this.xVt.contentUrl;e===r&&(s===h||S(s)&&S(h))&&n===o||i.push(new Qo(this)),S(s)&&!S(h)&&i.push(new Ec(this))}EVt(){let t;return this.LVt&&(t=RK(this.LVt,this.Xl.qEt)),t||(t=RK(this.xVt,this.Xl.qEt)),t}O7(){var t;return null!=(t=this.Xa)?t:this.Xa=this.fa()}fa(){const t=this;return{get companions(){return t.TUt},get duration(){return t.ct},get id(){return t.o},get mediaFiles(){return t.AQt},get skipOffset(){return t.pQt},type:"linear",integration:Gt.kI,get adSystem(){return t.nVt()},width:void 0,height:void 0,get adBreak(){return t.Xl.O7()},get resourceURI(){return t.oVt()},get clickThrough(){return t.GUt},get creativeId(){return t._Ut},get universalAdIds(){return t.tUt.map((t=>({adIdRegistry:t.gFt,adIdValue:t.AFt})))}}}constructor(t,i){this.Xa=void 0,this.xVt=t,this.Xl=i}},jJ=class extends Bo{get OVt(){return this.jVt}set OVt(t){this.jVt!==t&&(this.jVt=t,this.Us.href=null!=t?t:"",t?this.OS():this.jS())}OS(){if(this.Le)return;this.Le=!0,this.Us.style.display="",this.zVt||(this.wit.style.cursor="pointer");const t=this.zVt?this.Us:this.wit;i.Ys.Je?(t.addEventListener("touchstart",this.PVt),t.addEventListener("touchend",this.BVt)):(t.addEventListener("mousedown",this.PVt),t.addEventListener("click",this.BVt))}jS(){if(!this.Le)return;this.Le=!1,this.Us.style.display="none",this.zVt||(this.wit.style.cursor="");const t=this.zVt?this.Us:this.wit;i.Ys.Je?(t.removeEventListener("touchstart",this.PVt),t.removeEventListener("touchend",this.BVt)):(t.removeEventListener("mousedown",this.PVt),t.removeEventListener("click",this.BVt))}Qd(){this.Vo(),this.jS(),this.wit.removeChild(this.Us)}constructor(t,e=i.Ys.Je){super(),this.Le=!1,this.PVt=t=>{t.stopPropagation(),this.Co(new Yi("clickstart"))},this.BVt=t=>{t.stopPropagation(),this.Co(new Yi("click"))},this.wit=t,this.zVt=e,this.Us=h.createElement("a"),this.Us.style.position="absolute",this.Us.style.zIndex="11",this.Us.target="Du",this.zVt?(Gi(this.Us,"learn more"),this.Us.className="theoplayer-ad-overlay-component theoplayer-ad-touch-clickthrough",this.Us.setAttribute("rel","noopener")):ca(this.Us),this.wit.appendChild(this.Us),this.jS()}};!function(t){t.RVt="theo-size-xs",t.UVt="theo-size-s",t.QVt="theo-size-m",t.FVt="theo-size-l",t.YVt="theo-size-xl"}(bJ||(bJ={}));var zJ=[1200,992,768,576],PJ={1200:"theo-size-xl",992:"theo-size-l",768:"theo-size-m",576:"theo-size-s"},BJ=class{GVt(t){let i=RJ(t);i!==this.VVt&&(Kh(this.Us,i),zM(this.Us,this.VVt),this.VVt=i)}gn(){this.Wu.fn(Tn.pn,this.mn)}constructor(t,i){this.Us=t,this.Wu=i,this.mn=t=>{this.GVt(t.width)},this.VVt=RJ(i.ku),Kh(this.Us,this.VVt),i.yn(Tn.pn,this.mn)}};function RJ(t){for(let i of zJ)if(t>i)return PJ[i];return"theo-size-xs"}var UJ=class extends Bo{get we(){return this.Us}get jg(){return this.ZB}get pI(){return this.Ql.textContent||""}set pI(t){Gi(this.Ql,t)}WVt(t){"countdown"!==this.ZB&&(this.ZB="countdown",this.HVt(),this.we.classList.remove("theoplayer-ad-skip-button"),this.we.classList.add("theoplayer-ad-skip-countdown")),this.pI="You can skip in "+_.round(t)+" seconds"}qVt(){"skip"!==this.ZB&&(this.ZB="skip",this.pI="Skip Ad",this.XVt(),this.we.classList.remove("theoplayer-ad-skip-countdown"),this.we.classList.add("theoplayer-ad-skip-button"))}XVt(){this.we.addEventListener("mouseup",this.ZVt),this.we.addEventListener("touchend",this.ZVt)}HVt(){this.we.removeEventListener("mouseup",this.ZVt),this.we.removeEventListener("touchend",this.ZVt)}gn(){this.Vo(),this.HVt(),this.qu.gn(),hs(this.Us),hs(this.Ql),this.KVt&&hs(this.KVt)}constructor(t,i){super(),this.ZVt=()=>{this.Co(new Yi("Vm"))},this.Us=h.createElement("div"),this.we.className="theoplayer-ad-overlay-component theoplayer-ad-skip theoplayer-ad-skip-countdown",this.we.style.position="absolute",this.Ql=h.createElement("span"),this.we.appendChild(this.Ql),i&&(this.KVt=h.createElement("div"),this.KVt.className="theoplayer-ad-skip-poster",this.KVt.style.backgroundImage='url("'+jf(i)+'")',this.we.appendChild(this.KVt)),this.ZB="countdown",this.qu=new BJ(this.we,t)}},QJ=class extends Bo{JVt(){const t=this.NYt.jp.activeTrackIds;if(t){if(this.$Vt()){const i=this.uT.og.map((t=>t.o)),e=this.oT.og.map((t=>t.o));ae(i.concat(e),"0")&&t.push(0)}WJ(t,this.oT),WJ(t,this.uT),function(t,i){const e=!1;for(const e of i.og)e.xGt=ae(t,e.Mg)?L.Jn:L.Ch}(t,this.Dl)}}tWt(){var t;const i=null==(t=this.NYt.jp.media)?void 0:t.tracks;if(!i)return;const e=i.filter(dJ),s=i.filter(lJ),n=i.filter(fJ);if(this.$Vt()&&0===s.length&&0!==this.u_()){const t=this.iWt();s.push(t)}if(this.$Vt()&&0===e.length){const t=this.eWt();e.push(t)}GJ(this.oT,e.map((t=>t.trackId))),GJ(this.uT,s.map((t=>t.trackId))),GJ(this.Dl,n.map((t=>t.trackId))),VJ(e,this.oT),VJ(s,this.uT),function(t,i){let e=!1;for(const s of t){let t=YJ(i,s.trackId);t||(t=new _J(s),i.tt(t),e=!0)}}(n,this.Dl)}sWt(){this.SB||(this.nWt=v(this.od,250))}rWt(){m(this.nWt)}hWt(){this.rWt(),this.sWt()}oWt(){var t;const i=this.NYt.jp,e=i.media;var s;const n=null!=(s=null==e?void 0:e.duration)?s:NaN,r=(null==e?void 0:e.streamType)===chrome.cast.media.StreamType.LIVE||n<0,h=r?1/0:n;this.UL=h,this.aWt();const o=i.getEstimatedLiveSeekableRange(),a=null==(t=i.customData)?void 0:t.buffers;if(Dd(o)){const{start:t,end:i,isMovingWindow:e=r,isLiveDone:s=!1}=o;this.PLt(t,i,e,s)}else if(Dd(a)){const[t,i]=a.seekable;this.PLt(t,i,r,!1)}else r?this.PLt(void 0,void 0,!0,!1):this.PLt(0,h,!1,!1)}uWt(){const t=this.NYt.jp,i=function(t){return void 0!==t&&t.playerState===chrome.cast.media.PlayerState.PAUSED}(t)||FJ(t);this.cWt=i,this.SB!==i&&(this.SB=i,this.SB?this.Co(new iu(this.Tf())):this.Co(new Qn(this.Tf())))}th(){const{playbackRate:t}=this.NYt.jp;this.dWt!==t&&(this.dWt=void 0,this.IB!==t&&(this.IB=t,this.Co(new Kn(this.Tf(),t))))}lWt(){const{playerState:t}=this.NYt.jp;let i;switch(t){case chrome.cast.media.PlayerState.IDLE:i=oe.sT;break;case chrome.cast.media.PlayerState.BUFFERING:i=oe.Xn;break;case chrome.cast.media.PlayerState.PAUSED:case chrome.cast.media.PlayerState.PLAYING:i=oe.rT}this.A0(i),this.fWt()}PLt(t,i,e,s){Dd(t)&&Dd(i)?this.X$=new hC(t,i,e,e&&!s):this.X$=void 0}_Wt(t,i){this.SGt=null!=i?i:this.SGt,this.DGt=null!=t?t:this.DGt,this.Co(new tc)}We(t){this.gWt!==t?(this.NB=!0,this.Co(new lo(this.Tf()))):this.gWt=void 0}aP(){if(!this.NB)return;this.NB=!1;const t=this.Tf();this.Co(new Dr(t,this.mf())),this.Co(new _r(t))}Mh(){this._0=!0,this.If()&&this.Co(new ve(this.Tf()))}aWt(){const t=this.INt,i=this.Td();t===i||S(t)&&S(i)||(this.INt=i,this.Co(new os(i)))}wWt(){const t=this.Tf();this.NB||this.AWt===t||(this.AWt=t,this.Co(new Dr(t,this.mf())))}NGt(){this.SB&&(this.SB=!1,this.Co(new Qn(this.Tf())),this.A0(oe.sT))}v7(){return this.Ic}Af(){return this.GNt.Nm(this.TGt)}Tf(){if(this.Ic.Fc){const t=this.NYt.RYt();if(void 0!==t)return t}return this.r7()}r7(){return void 0!==this.vWt?this.TGt+this.vWt:this._0?this.Td():this.TGt+this.NYt.BYt()}mf(){if(this.mWt)return new Date(this.r7()+this.mWt)}Td(){if(this.Ic.Fc){var t;const i=null==(t=this.Ic.x7[0])?void 0:t.ct;if(void 0!==i&&!S(i))return i}return this.TGt+this.UL}Ef(){return this.xz}If(){return!this.Ic.Fc&&this._0}Yf(){return this.SB}Vf(){return this.IB}Wf(t){this.IB!==t&&(this.dWt=this.IB,this.IB=t,this.Co(new Kn(this.Tf(),t)),this.NYt.Wf(t))}$f(){return this.g0}qf(){return this.Ic.Fc?ce.yB(0,this.Tf()):this.Uo.Nm(this.TGt)}i_(){var t,i;if(this.Ic.Fc)return ce.MB();let e=null!=(i=null==(t=this.X$)?void 0:t.h$().Nm(this.TGt))?i:ce.MB();if(e.U>0){const t=e.jn(e.U-1);e=e.rB(ce.yB(t,this.Tf()))}return e}s_(){return this.NB}lf(){return this.oT}o_(){return this.uT}n_(){return this.Dl}iWt(){return{customData:{activeQuality:{averageBandwidth:0,bandwidth:0,codecs:"",frameRate:0,height:this.h_(),id:"0",name:"",width:this.u_()},enabled:!0,id:"0",kind:"main",label:"",language:"",qualities:[],uid:0},language:"",name:"",trackContentId:"",trackContentType:"",trackId:0,type:aJ.Am}}eWt(){return{customData:{activeQuality:{averageBandwidth:0,bandwidth:0,codecs:"",id:"0",name:"",audioSamplingRate:0},qualities:[],enabled:!0,id:"0",kind:"main",label:"",language:"",uid:0},language:"",name:"",trackContentId:"",trackContentType:"",trackId:0,type:aJ.vm}}$Vt(){var t,i;return!(void 0!==(null==(t=this.OYt.xYt())?void 0:t.version))||(null==(i=this.OYt.xYt())?void 0:i.sdkType)===vJ.RGt}PYt(t){this.$Vt()&&_s(t,0),this.NYt.PYt(t)}u_(){return this.DGt}h_(){return this.SGt}p_(){this.SB&&(this.SB=!1,this.cWt=!1,this.Co(new Qn(this.Tf()))),this.NYt.p_()}m_(){this.SB||(this.SB=!0,this.cWt=!0,this.Co(new iu(this.Tf()))),this.NYt.m_()}Dm(t){if(this.Ic.Fc)return;let i=_.max(0,t-this.TGt);i=_.round(1e6*i)/1e6;const e=this.vWt;this.vWt=i,this.cWt=this.Yf(),this.gWt=i,this.NB=!0,this.Co(new lo(this.Tf())),void 0===e&&(this.$Vt()?this.pWt(i):this.U2(i))}U2(t){this.NYt.Dm(t,this.cWt).then(this.yWt(t)).catch(this.zYt)}yWt(t){return()=>{void 0!==this.vWt&&(this.vWt===t?this.vWt=void 0:this.U2(this.vWt))}}A0(t){this.g0!==t&&(this.g0=t,this.Co(new Bn(this.Tf(),t))),void 0===this.vWt&&this.NB&&t>=oe.nT&&this.aP(),this.fWt()}fWt(){if(this.SB)return void(this.MWt=!1);const t=this.g0>=oe.rT;this.MWt!==t&&(this.MWt=t,t?this.Co(new _e(this.Tf())):this.Co(new qa(this.Tf())))}TWt(){this.NWt||(this.NWt=h.createElement("div"),this.Qo.we.appendChild(this.NWt),this.NWt.className="theoplayer-ad-linear theoplayer-chromecast-ad",this.NWt.style.zIndex="10",ca(this.NWt)),this.NWt.style.display=this.Ic.Fc?"":"none"}DWt(){var t;const i=null==(t=this.Ic.x7[0])?void 0:t.GUt;i&&!this.SWt?(this.SWt=new jJ(this.NWt,!0),this.SWt.OVt=i,this.SWt.yn("clickstart",this.IWt)):this.SWt&&(this.SWt.OVt=i)}EWt(){var t;const i=null==(t=this.Ic.x7[0])?void 0:t.pQt;if(void 0===i||i<0)return void(this.bWt&&(this.bWt.gn(),this.bWt=void 0));if(!this.bWt){var e;const t=null==(e=this.Qo.ba)?void 0:e.mi;this.bWt=new UJ(this.Qo.Iu,t),this.NWt.appendChild(this.bWt.we),this.bWt.yn("Vm",this.LWt)}const s=this.NYt.RYt();void 0!==s&&(s<i?this.bWt.WVt(i-s):this.bWt.qVt())}IGt(){return this.TGt}EGt(t){this.TGt=t}Z7(t){}y_(){this.NYt.y_()}gn(){this.Vo(),this.Ic.gn(),this.SWt&&(this.SWt.Qd(),this.SWt=void 0),this.bWt&&(this.bWt.gn(),this.bWt=void 0),this.NWt&&(hs(this.NWt),this.NWt=void 0),this.NYt.bYt(this.g$),this.NYt.IYt(this.kWt),this.NYt.kYt(this.lGt),this.NYt.fn(zK.MYt,this.CWt),this.NYt.gn()}constructor(t,i,e,s,n){super(),this.GNt=ce.MB(),this.mWt=void 0,this._0=!1,this.xz=void 0,this.dWt=void 0,this.g0=oe.sT,this.MWt=!1,this.Uo=ce.MB(),this.X$=void 0,this.NB=!1,this.oT=new Ur,this.uT=new Ur,this.Dl=new Zi,this.INt=NaN,this.vWt=void 0,this.cWt=!1,this.AWt=NaN,this.gWt=void 0,this.nWt=0,this.kWt=(t,i)=>{switch(t){case"buffered":this.GNt=new ce(i),this.Co(new oa(this.Tf()));break;case"currentProgramDateTime":this.mWt=new Date(i).getTime()-this.Tf();break;case"played":this.Uo=new ce(i);break;case"seekable":this.oWt();break;case"videoHeight":this._Wt(void 0,i);break;case"videoWidth":this._Wt(i,void 0)}},this.g$=t=>{switch(t.type){case Co.yw:this.We(t.currentTime);break;case Co.pw:this.aP();break;case Co.Aw:this.Co(new VQ(t.representation,t.previousRepresentation));break;case Co.Mw:this.Co(new wQ(t.segmentStartTime,t.error,t.trackType,t.track,t.quality,t.retryCount));break;case Co.Kg:this.Co(new NV(t.currentTime,t.initDataType,t.initData));break;case Co.Vg:this.Co(new qx(new Or(td.CONTENT_PROTECTION_ERROR,t.error,void 0,t.licenseAcquisitionURL,t.status,t.statusText,t.licenseAcquisitionMessage,t.systemCode)));break;case Co.Wg:this.Co(new Xx)}},this.lGt=t=>{this.oWt(),this.uWt(),this.th(),this.lWt(),this.wWt(),this.hWt(),this.tWt(),this.JVt(),this.TWt(),this.DWt(),this.EWt(),t||FJ(this.NYt.jp)&&this.Mh()},this.od=()=>{this.wWt(),this.EWt()},this.CWt=t=>{this.Co(t)},this.pWt=Un((t=>this.U2(t)),50),this.zYt=t=>{this.vWt=void 0,this.Co(new UK(t))},this.IWt=()=>{this.m_()},this.LWt=()=>{this.Ic.Vm()},this.Qo=t,this.OYt=e,this.NYt=s,this.Ic=new CJ(t,s,i.Oc),this.TGt=n.IGt(),this.UL=n.Td()-this.TGt,this.SB=n.Yf(),this.IB=n.Vf(),this.DGt=n.u_(),this.SGt=n.h_(),this.NYt.EYt(this.g$),this.NYt.DYt(this.kWt),this.NYt.LYt(this.lGt),this.NYt.yn(zK.MYt,this.CWt),this.NYt.CYt().then((t=>{this.Co(new QK(t.bt,t.yc))}),this.zYt)}};function FJ(t){return void 0!==t&&t.playerState===chrome.cast.media.PlayerState.IDLE&&t.idleReason===chrome.cast.media.IdleReason.FINISHED}function YJ(t,i){for(const e of t.og)if(e.Mg===i)return e}function GJ(t,i){let e=!1;for(let s=0;s<t.U;s++){const n=t.cg(s);-1===i.indexOf(n.Mg)&&(t.it(n),s--,e=!0)}return e}function VJ(t,i){let e=!1;for(const s of t){let t=YJ(i,s.trackId);t||(t=new mJ(s),i.tt(t),e=!0)}return e}function WJ(t,i){for(const e of i.og)e.PGt=ae(t,e.Mg);return!1}var HJ=class{_tt(t){return Promise.resolve("all")}v_(){}gn(){}};function qJ(t,i,e){if(S(t))return e;if(t===1/0){if("live"===e||"dvr"===e)return e;if(i&&i.length>0){if(i.end(i.length-1)-i.start(0)>60)return"dvr"}return"live"}return"vod"}var XJ=[Co.Jg,Co.Xg,Co.ww,Co.mw,Co.Sh,Co.jh,Co.gw,Co.Iw,Co.yw,Co.pw,Zt.Bw,Zt.Rw,Co.Aw,Co.Mw,Co.Kg,Co.Vg,Co.Wg],ZJ=class extends rz{WP(t){if(!t)return;Dh(this.BP&&$l(this.BP),t&&$l(t))||(this.BP=t,this.Co(new zt(t)))}xWt(t){if(!t)return;const i=Ms(t,this.Qo.wd);Dh(this.bc&&$l(this.bc),i&&$l(i))||(this.ja.EGt(0),this.bc=i,this.Co(new _z(i)),this.ja.NGt())}OWt(t){for(const i of this.rt.og)if(i.Mg===t)return i;for(const i of this.ht.og)if(i.Mg===t)return i}get $ct(){return this.ja}set $ct(t){const i=this.ja;i&&(i.fn(zK.MYt,this.CWt),i.fn(zK.TYt,this.jWt),i.fn(XJ,this.Ds),i.fn(Zt.H_,this.rO),t.EGt(i.IGt()),i.Z7(t.v7())),this.ja=t,this.oT.fg=t.lf(),this.uT.fg=t.o_(),this.Dl.fg=t.n_(),this.Ic.fg=t.v7(),i&&i.gn(),t.yn(zK.MYt,this.CWt),t.yn(zK.TYt,this.jWt),t.yn(XJ,this.Ds),t.yn(Zt.H_,this.rO)}get ro(){return this.ho}get Oc(){return this.v7()}v7(){return this.Ic}m7(){return this.J9}lf(){return this.oT}Af(){return this.ja.Af().ks()}get zWt(){return this.PWt||this.bc}set zWt(t){this.PWt=t}async $n(t,i){var e;t&&await this._Gt(t,null!=(e=t.ads)?e:[],t.streamType,NaN,0,null!=i?i:0)}async BWt(t){var i;const e=null!=(i=this.PWt)?i:this.bc;if(!e)return;var s;const n=this.PWt?null!=(s=this.PWt.ads)?s:[]:this.htt(),r=this.Qo.Td(),h=this.Qo.i_(),o=qJ(r,h,e.streamType),a=h.length>0?h.start(0):0,u=null!=t?t:this.r7();await this._Gt(e,n,o,r,a,u)}htt(){const t=new Lz;return this.Ic.Z7(t),t.htt()}mf(){return this.ja.mf()}yf(){return this.BP}get Mf(){return this.Tf()}set Mf(t){this.Nf(t)}Tf(){return this.ja.Tf()}r7(){return this.ja.r7()}Nf(t){this.RWt||(this.OYt.fGt()||this.RWt||!this.bc?this.ja.Dm(t):this.$n(this.bc,t))}Td(){return this.ja.Td()}If(){return this.ja.If()}Ef(){return this.xz}Lf(){return this.Oz}Cf(){return this.aT}zf(){return this.Qo.jf}Bf(){return this.DB}Rf(t){this.DB=t,this.Co(new Tc(this.Mf,this.c_)),this.OYt.Rf(t)}Yf(){return this.ja.Yf()}Vf(){return this.ja.Vf()}Wf(t){this.ja.Wf(t)}qf(){return this.ja.qf().ks()}Zf(){return pt.ZM}Kf(t){}$f(){return this.ja.$f()}i_(){return this.ja.i_().ks()}s_(){return this.ja.s_()}Wa(){return this.bc}async ga(t){this.bc=t,await this.$n(t),this.PWt=void 0,this.ja.NGt()}n_(){return this.Dl}h_(){return this.ja.h_()}u_(){return this.ja.u_()}o_(){return this.uT}d_(){return this.$L}l_(t){this.$L=t,this.Co(new Tc(this.Mf,this.c_)),this.OYt.l_(t)}get g_(){return!1}set g_(t){}A_(){}w_(){return this.EB}v_(){}p_(){this.OYt.fGt()||this.RWt||!this.bc?this.ja.p_():this.$n(this.bc)}m_(){this.ja.m_()}ur(){this.ho=!0}ar(){this.BP=void 0,this.ho=!1}ge(){}be(){}async _Gt(t,i,e,s,n,r){this.RWt=!0,this.UWt(),this.ja.EGt(n);const h="live"===e||"dvr"===e,o=function(t,i,e){return{theoplayer_version:1,streamStart:t,isLive:i,sourceDescription:e}}(n,h,t),a={gGt:t,Oc:i,Mf:_.max(0,r-n),ct:s,eZ:h?chrome.cast.media.StreamType.LIVE:chrome.cast.media.StreamType.BUFFERED,wGt:o};try{await this.OYt._Gt(a)}catch(t){this.QWt(t)}finally{this.RWt=!1}}FWt(){this.YWt(this.oT),this.YWt(this.uT),this.GWt(this.Dl)}YWt(t){for(const i of t.og)this.VWt(i);t.yn(Rl.L_,(t=>{this.VWt(t.Lt),this.WWt()}))}GWt(t){for(const i of t.og)this.HWt(i);t.yn(Rl.L_,(t=>{this.HWt(t.Lt),this.WWt()}))}VWt(t){t.yn(il.LGt,this.Vgt),t.yn(il.kGt,this.qWt),t.yn(il.kGt,this.JVt)}HWt(t){t.yn(il.bGt,this.XWt),t.yn(il.bGt,this.JVt)}ZWt(){const t=[];for(const i of this.rt.og)i.Rt&&t.push(i.Mg);for(const i of this.ht.og)i.Rt&&t.push(i.Mg);for(const i of this.nt.og)i.jg===L.Jn&&t.push(i.Mg);this.ja.PYt(t)}KWt(t,i){this.JWt=t,this.$Wt=i}tHt(t){var i,e;if(!t)return!1;return(null!=(e=null==(i=this.OYt.xYt())?void 0:i.version)?e:-1)>=2?t.map((t=>t.o)):[t[0].o]}iHt(t){this.eHt=t}D_(){}S_(){}async y_(){this.ja.y_(),this.UWt()}UWt(){this.Zx=oe.sT,this.Gx=!1,this.Hx=!1,this.xz=void 0,this.Oz=void 0}async gn(){this.UWt(),this.Vo(),this.$ct=this.sHt(),this.OYt.fn(T.MYt,this.CWt),this.OYt.fn(T.tGt,this.nHt),this.OYt.fn(T.Ew,this.rHt),this.OYt.fn(T.$Yt,this.hHt),this.OYt.fn(T.iGt,this.oHt),this.OYt.gn()}sHt(){return new oJ(this,this.ja.IGt(),this.ja.Tf(),this.ja.Td(),this.ja.If(),this.ja.Yf(),this.ja.Vf(),this.ja.u_(),this.ja.h_())}constructor(t,i){super(t,!0),this.ho=!1,this.eHt=qo,this.Zx=oe.sT,this.Gx=!1,this.Hx=!1,this.RWt=!1,this.PWt=void 0,this.xz=void 0,this.Oz=void 0,this.oT=new ta,this.uT=new ta,this.Dl=new lc,this.EB=new ma,this.aT=new Df,this.J9=new HJ,this.JWt=void 0,this.$Wt=void 0,this.rHt=t=>{var i,e;(Dd(t.c_)&&!be(t.c_,this.$L,1e-5)||Dd(t.Pf)&&t.Pf!==this.DB)&&(this.$L=null!=(i=t.c_)?i:this.$L,this.DB=null!=(e=t.Pf)?e:this.DB,this.Co(new Tc(this.Mf,this.$L)))},this.hHt=()=>{const t=this.OYt.fGt();this.$ct=t?new QJ(this,this.Qo,this.OYt,t,this.ja):this.sHt()},this.jWt=t=>{this.WP(t.bt),this.xWt(t.yc)},this.oHt=t=>{const i=this.OWt(t.Rp);if(!i)return void 0;const e={targetQualityIds:t.sGt};i.OGt(e)},this.CWt=t=>{this.QWt(t.lt)},this.QWt=t=>{this.eHt&&this.eHt(t)},this.nHt=t=>{this.xz=t.lt,this.Oz=se(this.xz),this.Co(new fh(this.Oz))},this.qWt=t=>{if(!t.enabled)return;const i=this.rt.og.some((i=>i.Mg===t.trackId))?this.rt:this.ht;for(const e of i.og)e.Rt&&e.Mg!==t.trackId&&(e.Rt=!1)},this.XWt=t=>{if(t.mode===L.Jn)for(const i of this.nt.og)i.jg===L.Jn&&i.Mg!==t.trackId&&Kv(i.zt,t.track.zt)&&(i.jg=L.Ch)},this.JVt=Un((()=>{this.ZWt()}),50),this.WWt=()=>{const t=[];var i;const e=null!=(i=Po(this.ht.og,(t=>h$(t,this.JWt))))?i:Po(this.ht.og,(t=>t.Rt));var s;e&&t.push(e.Mg);const n=null!=(s=Po(this.nt.og,(t=>h$(t,this.$Wt))))?s:Po(this.nt.og,(t=>t.jg===L.Jn));n&&t.push(n.Mg);const r=Po(this.rt.og,(t=>t.Rt));r&&t.push(r.Mg),0!==t.length&&this.ja.PYt(t)},this.Vgt=t=>{const i=this.tHt(t.targetQuality),e=t.track;this.OYt.nGt(e.Mg,e.XJ,i)},this.rO=t=>{this.Co(t);const i=t.readyState;!this.Gx&&this.Zx===oe.sT&&i>=oe.Xn&&(this.Gx=!0,this.Co(new ti(t.currentTime))),!this.Hx&&this.Zx<=oe.Xn&&i>=oe.nT&&(this.Hx=!0,this.Co(new ki(t.currentTime))),this.Zx<=oe.nT&&i>=oe.rT&&this.Co(new jw(t.currentTime)),this.Zx<=oe.rT&&i===oe.hT&&this.Co(new di(t.currentTime)),this.Zx=i},this.$L=this.Qo.c_,this.DB=this.Qo.Pf,this.OYt=i,this.OYt.yn(T.MYt,this.CWt),this.OYt.yn(T.tGt,this.nHt),this.OYt.yn(T.Ew,this.rHt),this.OYt.yn(T.$Yt,this.hHt),this.OYt.yn(T.iGt,this.oHt),this.Ic=new la(this),this.BP=this.Qo.bt,this.bc=this.Qo.Wa(),this.$ct=new oJ(this,0,this.Qo.r7(),this.Qo.Td(),this.Qo.Sf,this.Qo.Ff,this.Qo.Gf,this.Qo.a_,this.Qo.r_),this.FWt()}},KJ=class extends Ao{fa(){return new JJ(this.lt)}constructor(t){super("error"),this.lt=t}},JJ=class extends Yi{constructor(t){super("error"),this.error=t}},$J=class extends Yi{constructor(t){super("statechange"),this.state=t}};function t$(t,i){let e;return{get casting(){return t.rH},get error(){return t.lt},get receiverName(){return t.aHt},get state(){return t.$ct},start(){t.Cn()},stop(){t.y_()},join(){t.uHt()},leave(){t.cHt()},set connectionCallback(t){null==i||i.dHt(t)},get connectionCallback(){return null==i?void 0:i.lHt()},get source(){return e||t.yc},set source(i){e=i,t.yc=i},addEventListener(i,e){const s=Fr(i,jo);t.yn(s,e)},removeEventListener(i,e){const s=Fr(i,jo);t.fn(s,e)}}}var i$=class extends Ut{get rH(){return this.$ct===zu.CONNECTING||this.$ct===zu.CONNECTED}get lt(){return this.xz}get va(){return this.Xa||(this.Xa=t$(this,this.fHt)),this.Xa}get aHt(){var t;return null==(t=this.fHt._Ht())?void 0:t.vGt()}get yc(){return this.Qo?this.Qo.zWt:this.PWt}set yc(t){this.PWt=t?Ms(t,this.gHt.wd):void 0,this.Qo&&(this.Qo.zWt=this.PWt,this.PWt&&this.Qo.$n(this.PWt))}get $ct(){return this.ja}set $ct(t){let i=t;this.wHt||i!==zu.CONNECTING&&i!==zu.CONNECTED||(i=zu.AVAILABLE),this.ja!==i&&(this.ja=i,this.Co(new $J(this.$ct)))}async AHt(){if(!this.vHt)throw new g("Chromecast must be initialized before starting a session");await this.vHt,this.fHt._Ht()||await this.fHt.mHt()}async Cn(){this.wHt=!0;try{if(this.$ct=zu.CONNECTING,await this.AHt(),await this.pHt(),this.Qo){const t=this.gHt.Wa(),i=this.fHt.yHt(t);this.Qo.zWt=i?Ms(i,this.gHt.wd):this.PWt,this.Qo.BWt()}this.$ct=zu.CONNECTED,await this.gHt.y_()}catch(t){this.MHt(!1).catch(qo),this.$ct=zu.AVAILABLE,Mi(t)||this.T4(t)}}async uHt(){this.wHt=!0;try{if(this.$ct=zu.CONNECTING,await this.AHt(),await this.pHt(),this.Qo){const t=this.gHt.Wa(),i=this.fHt.THt(t);i&&(this.Qo.zWt=Ms(i,this.gHt.wd))}this.$ct=zu.CONNECTED,await this.gHt.y_()}catch(t){await this.MHt(!0).catch(qo),this.$ct=zu.AVAILABLE,Mi(t)||this.T4(t)}}async NHt(){this.fHt._Ht()&&await this.Cn()}async pHt(){null!=this.Qo||(this.Qo=this.DHt()),this.xz=void 0,this.gHt.m_(),await this.fW.SHt(this.Qo)}DHt(){const t=new ZJ(this.gHt,this.fHt._Ht());return t.iHt(this.T4),t}IHt(){this.Qo&&(this.Qo.gn(),this.Qo=void 0)}async MHt(t){if(this.wHt=!1,!this.Qo)return;const i=this.Qo.ro,e=this.Qo.Wa(),s=this.Qo.r7();try{if(i){let i;i=t?this.fHt.EHt(e):this.fHt.bHt(e),null!=i||(i=e),await this.fW.LHt(i,i===e),this.gHt.Nf(s),this.gHt.p_()}}finally{this.IHt()}}cHt(){this.rH&&(this.fHt.kHt(!1),this.MHt(!0).catch(this.T4))}y_(){this.rH&&(this.fHt.kHt(!0),this.MHt(!1).catch(this.T4))}gn(){this.TI.Xd(),this.fHt.fn(JK.MGt,this.CHt),this.Vo(),this.IHt()}constructor(t,i,e,s){super(),this.xz=void 0,this.Xa=void 0,this.Qo=void 0,this.ja=zu.UNAVAILABLE,this.wHt=!1,this.TI=new er,this.xHt=()=>{this.fHt.yn(JK.MGt,this.CHt),this.$ct=this.fHt.OHt()},this.CHt=t=>{const i=t.$ct;this.$ct=i,i!==zu.UNAVAILABLE&&i!==zu.AVAILABLE||this.MHt(!1).catch(this.T4)},this.PWt=void 0,this.T4=t=>{Mi(t)||t instanceof Ba&&(this.xz=t,this.Co(new KJ(t).va))},this.fW=t,this.gHt=i,this.fHt=s,this.sx=e.chromecast,this.vHt=this.fHt.MW(this.sx,this.TI.Hd),this.vHt.then(this.xHt).catch(this.T4)}},e$=class extends Ut{get rH(){return!1}get lt(){}get aHt(){}get yc(){}set yc(t){}get $ct(){return zu.UNAVAILABLE}get va(){return this.Xa||(this.Xa=t$(this)),this.Xa}uHt(){i.IA("Joining a Chromecast session is not possible when JoinStrategy is configured to disabled")}cHt(){i.IA("Leaving a Chromecast session is not possible when JoinStrategy is configured to disabled")}Cn(){i.IA("Starting a Chromecast session is not possible when JoinStrategy is configured to disabled")}y_(){i.IA("Stopping a Chromecast session is not possible when JoinStrategy is configured to disabled")}NHt(){return Promise.resolve()}gn(){}};function s$(t){return{bt:t.bt,Mf:t.Tf(),ct:t.Td(),Sf:t.Sf,lt:t.Ef(),bf:t.Lf(),Pf:t.Pf,Ff:t.Ff,Gf:t.Gf,Jf:t.Jf,e_:t.e_,r_:t.r_,a_:t.a_,c_:t.c_}}var n$=class extends rz{v7(){return this.Ic}lf(){return this.oT}get kf(){return this.Cf()}Cf(){return this.aT}n_(){return this.Dl}o_(){return this.uT}cT(t){if(this.Qo===t)return;let i;this.UP(),this.M7&&(i=s$(this));const e=this.yf(),s=this.w_(),n=this.A_();if(this.Qo=t,this.oT.fg=t.ht,this.uT.fg=t.rt,this.Dl.fg=t.nt,this.aT.fg=t.kf,this.Ic.fg=t.Oc,void 0!==i){ru(this,i,s$(this))}const r=this.yf();r!==e&&this.Co(new zt(r)),this.w_()!==s&&this.Co(new Mu),this.A_()!==n&&this.Co(new Ci),this.RP()}async gn(t){await super.gn(t),this.oT.gn(t),this.uT.gn(t),this.Dl.gn(t),this.aT.gn(),await this.Ic.gn()}constructor(t,i){super(t,i),this.oT=new ta,this.uT=new ta,this.Dl=new lc,this.aT=new Ia,this.oT.fg=t.ht,this.uT.fg=t.rt,this.Dl.fg=t.nt,this.aT.fg=t.kf,this.Ic=new la(this),this.Ic.fg=t.Oc}},r$=class extends n${Wa(){const t=super.Wa();return!t&&this.jHt.rH&&this.jHt.yc?this.jHt.yc:t}ga(t,i){return this.gq.wx((i=>(this.zHt=new er,this.zHt.Zd(i),super.ga(t,this.zHt.Hd))),i)}p_(){super.p_(),this.wd.cast.strategy!==Qf.AUTO||this.jHt.rH||this.jHt.NHt()}SHt(t){return this.gq.wx((i=>this.PHt(t,i)))}LHt(t,i){return void 0===t&&(t=void 0),void 0===i&&(i=!1),this.gq.wx((e=>this.BHt(t,i,e)))}PHt(t,i){fo(i),this.RHt.Oc&&this.RHt.Oc.Z7(t.Oc),this.UHt(),this.QHt=Po(this.RHt.ht.og,(t=>t.Rt)),this.UTt=Po(this.RHt.nt.og,(t=>"showing"===t.jg)),this.FHt=t,this.FHt.KWt(this.QHt,this.UTt),this.cT(t),this.FHt.ur()}async BHt(t,i,e){fo(e);const s=this.FHt;if(void 0!==s)try{if(t){await this.RHt.y_(),fo(e);const s=Ms(t,this.RHt.wd);i&&(s.ads=void 0),this.zHt=new er,this.zHt.Zd(e),await this.RHt.ga(s,this.zHt.Hd)}i&&this.RHt.Oc&&s.Oc.Z7(this.RHt.Oc)}catch(t){Ah(t)}finally{s.ar(),this.cT(this.RHt),this.QHt=Po(this.FHt.ht.og,(t=>t.Rt)),this.UTt=Po(this.FHt.nt.og,(t=>"showing"===t.jg)),this.RHt.ht.yn(Rl.L_,this.YHt),this.RHt.nt.yn(Rl.L_,this.GHt),this.RHt.yn(Zt.Pw,this.UHt),this.FHt===s&&(this.FHt=void 0)}}y_(){var t;return this.QHt=void 0,this.UTt=void 0,this.UHt(),null==(t=this.zHt)||t.Xd(),this.gq.wx((()=>super.y_()))}async gn(){var t;null==(t=this.zHt)||t.Xd(),this.jHt.gn(),await this.LHt(),await this.gq.gn(),await super.gn()}constructor(t,i){super(t),this.gq=new ls,this.QHt=void 0,this.UTt=void 0,this.YHt=t=>{const i=t.Lt;h$(this.QHt,i)&&(i.Rt=!0)},this.GHt=t=>{const i=t.Lt;h$(this.UTt,i)&&(i.jg=L.Jn)},this.UHt=()=>{this.RHt.ht.fn(Rl.L_,this.YHt),this.RHt.nt.fn(Rl.L_,this.GHt)},this.RHt=t,this.wd.cast.strategy!==Qf.DISABLED?this.jHt=new i$(this,t,this.wd.cast,i):this.jHt=new e$,this.aQ.lH(this.jHt)}};function h$(t,i){return void 0!==t&&void 0!==i&&(t.gs===i.gs&&i.kh===t.kh)}var o$=new class extends Bo{dHt(t){this.VHt=t}lHt(){return this.VHt}_Ht(){return this.WHt}OHt(){switch(this.HHt.getCastState()){case cast.framework.CastState.CONNECTED:return zu.CONNECTED;case cast.framework.CastState.CONNECTING:return zu.CONNECTING;case cast.framework.CastState.NOT_CONNECTED:return zu.AVAILABLE;case cast.framework.CastState.NO_DEVICES_AVAILABLE:default:return zu.UNAVAILABLE}}async MW(t,i){await OZ(i),this.HHt=cast.framework.CastContext.getInstance(),this.HHt.addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,this.fH),this.HHt.setOptions({receiverApplicationId:t.appID,autoJoinPolicy:chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED})}async mHt(){try{const t=await this.HHt.requestSession();if(t)throw t}catch(t){throw new Ba(UZ(t))}}yHt(t){var i;return null==(i=this.VHt)?void 0:i.onStart(t)}bHt(t){var i;return null==(i=this.VHt)?void 0:i.onStop(t)}THt(t){var i;return null==(i=this.VHt)?void 0:i.onJoin(t)}EHt(t){var i;return null==(i=this.VHt)?void 0:i.onLeave(t)}kHt(t){this.HHt.endCurrentSession(t)}constructor(...t){super(...t),this.WHt=void 0,this.VHt=void 0,this.fH=()=>{const t=this.OHt();this.WHt=t===zu.CONNECTED?new rJ(this.HHt.getCurrentSession()):void 0,this.Co(new hJ(t))}}},a$=new class{get va(){return this.Xa||(this.Xa=function(t){return{initialize(i){const e=t.MW(Yf(i));return e.catch(qo),e},startSession(){const i=t.mHt();return i.catch(qo),i},endSession(){t.qHt()}}}(this)),this.Xa}async MW(t){this.vHt||(this.vHt=this.XHt(t)),await this.vHt}async XHt(t){await this.fHt.MW(t)}async mHt(){if(!this.vHt)throw new g("Chromecast must be initialized before starting a session");await this.vHt,this.fHt._Ht()||await this.fHt.mHt()}ZHt(){this.fHt.kHt(!1)}qHt(){this.fHt.kHt(!0)}constructor(t){this.vHt=void 0,this.Xa=void 0,this.fHt=t}}(o$),u$={get chromecast(){return a$.va}};go((t=>new r$(t,o$)),Zo.D7);var lt,Oo,c$=class{KHt(t,i,e,s){t.sR.forEach((t=>{if(!this.JHt(t.$Ht)){const n=t.tqt(i,e,s);n&&this.iqt(n)}}))}JHt(t){return this.eqt.get(t)}iqt(t){this.eqt.set(t.sqt,t),this.nqt.set(t.sqt,t.rqt),this.hqt.Qa(t.oqt)}K7(t){this.nqt.has(t.sqt)||(this.nqt.set(t.sqt,t),this.hqt.Qa(t.oqt))}aqt(t){return this.nqt.forEach(t)}uqt(t){return this.eqt.forEach(t)}cqt(t){let i=!1;return this.eqt.forEach((e=>{i=e.cqt(t)||i})),i}async gn(){const t=[];this.eqt.forEach((i=>t.push(i.gn()))),this.nqt.forEach((i=>t.push(i.gn()))),await Promise.all(t),this.eqt.clear(),this.nqt.clear()}constructor(t){this.hqt=t,this.eqt=Cn(),this.nqt=Cn()}},gn=class t extends Ao{fa(){return new d$(this.cFt,this.bb,this.Wb,this.yc)}static dqt(i){return new t(Xr.GENERAL,i.bb,i.lFt)}static lqt(i,e){return new t(i.cFt,i.message,i.lFt,e)}constructor(t,i,e,s){super("fqt"),this.cFt=t,this.bb=i,this.Wb=e,this.yc=s}},d$=class extends Yi{constructor(t,i,e,s){super("aderror"),this.problemType=t,this.message=i,this.errorCode=e,this.source=s}},l$=class extends Eu{get _qt(){return this.gqt}get Fc(){let t=!1;return this.wqt((i=>{t=t||i.Aqt})),t}get x7(){const t=[];return this.wqt((i=>{const e=i.x7;e.length&&t.push(...e)})),t}get j7(){let t=null;return this.wqt((i=>{null!=t||(t=i.j7)})),t}get z7(){const t=[];return this.wqt((i=>{t.push(...i.z7)})),t}get P7(){const t=[];return this.wqt((i=>{t.push(...i.P7)})),t}Z7(t){this.wqt((i=>{i.Z7(t)}))}get va(){var t;return null!=(t=this.Xa)?t:this.Xa=Xh(this)}Vm(){this.wqt((t=>{t.Vm()}))}K7(t){this.gqt.K7(t)}R7(t,i){return this.vqt.R7(t,i)}mqt(t){this.gqt.uqt((i=>{i.mqt(t)}))}cqt(t){return this.gqt.cqt(t)}wqt(t){return this.gqt.aqt(t)}v_(){this.gqt.uqt((t=>t.v_()))}async tr(){const t=[];this.gqt.uqt((i=>t.push(i.y_()))),await Promise.all(t)}async gn(){this.Vo(),await this.gqt.gn()}constructor(t){super(),this.Xa=void 0,this.vqt=t,this.gqt=new c$(this)}},f$=class extends l${Z1(t,i,e){try{this.pqt=e;const s=He.yb.rR(t);if(s.$Ht===Gt.N7)return;const n=this.gqt.JHt(s.$Ht);if(!n)throw new mi(Xr.ADBLOCK,void 0,"Ads could not be loaded.");i!==Ki.U7&&this.T2||this.vqt.yqt(n),s.Z1(t,i,n,this.pqt)}catch(i){0,this.Co(gn.lqt(i,t.sources))}}async tr(){await super.tr(),this.T2=!1}async gn(){await super.gn(),this.vqt.fn(Co.jh,this.l9),this.fn("fqt",this.Mqt)}constructor(t){super(t),this.pqt=!1,this.T2=!1,this.Mqt=t=>{if(!this.pqt)return;const i=new wc(oi.ADVERTISEMENT_ERROR,t.bb),e=new $i(td.AD_BLOCKER_DETECTED,t.bb+" Turn off your AdBlocker and try again.",i);this.vqt.yP(e)},this.l9=()=>{this.T2=!0},this.yn("fqt",this.Mqt),t.yn(Co.jh,this.l9)}},ml=class extends xo{get Oc(){return this.Ic}get QGt(){return this.Tqt}set QGt(t){this.Tqt=t}get FGt(){return this.Nqt}set FGt(t){this.Nqt=t}set qEt(t){this.aYt=t}get qEt(){return this.aYt}Dqt(){this.Sqt=!0}Iqt(t){this.Ic.push(t),this.Sqt=!1}Eqt(t){_s(this.Ic,t)}get Hf(){return this.Sqt}constructor(t){super(),this.aYt=t,this.Ic=[],this.Tqt=-1,this.Nqt=-1,this.Sqt=!1}},_$=class extends ml{get nYt(){return this.bqt}get z7(){return this.Lqt}Yn(t){void 0!==t.maxDuration&&(this.Tqt=t.maxDuration)}kqt(t){const i=this.Ic.indexOf(t);return i>=0&&i<this.Ic.length-1}Iqt(t){super.Iqt(t),this.Lqt.push(t)}Cqt(t){_s(this.Lqt,t)}Eqt(t){super.Eqt(t),_s(this.Lqt,t)}constructor(t,i){super(i.timeOffset),this.Lqt=[],this.bqt=t,this.Yn(i)}};!function(t){t.mFt="linear",t.pFt="nonlinear",t.tT="unknown"}(lt||(lt={})),function(t){t.NONE="none",t.READY="ready"}(Oo||(Oo={}));var bl=class extends MJ{xqt(t,i,e,s,n,r){this.IT=t,this.nk=i,this.rk=e,this.UL=s,this.NUt=n,this.yQt=r,this.Oqt="ready"}get jqt(){return this.Oqt}get TUt(){return this.NUt}get ct(){return this.UL}O7(){var t;return null!=(t=this.Xa)?t:this.Xa=this.fa()}get Ti(){return this.rk}get o(){return this.IT}get pQt(){return this.yQt}get ji(){return this.nk}get zqt(){return this.Pqt}get GUt(){return this.VUt}get _Ut(){return this.gUt}get tUt(){return this.gQt}nVt(){}aVt(){return""}oVt(){return this.Bqt}constructor(t,i){super(),this.Pqt=i,this.IT=void 0,this.yQt=void 0,this.nk=void 0,this.rk=void 0,this.UL=void 0,this.gQt=[],this.NUt=[],this.Oqt="none",this.Xl=t}};function cn(t){return{get adSystem(){return t.nVt()},get readyState(){return t.jqt},get adBreak(){return t.Xl.O7()},get duration(){return t.ct},get companions(){return t.TUt.map((t=>t.va))},get resourceURI(){return t.oVt()},get clickThrough(){return t.GUt},get width(){return t.ji},get type(){return function(t){switch(t){case"linear":case"unknown":return"linear";case"nonlinear":return"nonlinear"}}(t.zqt)},get height(){return t.Ti},get id(){return t.o},get skipOffset(){return t.pQt},get integration(){return t.nYt},get creativeId(){return t._Ut},get universalAdIds(){return t.tUt}}}var g$=class{get jUt(){return this.zUt}get FUt(){return this.YUt}get Rqt(){return this.Uqt}get GUt(){return this.VUt}get Ti(){return this.rk}get JQt(){return this.Bqt}get ji(){return this.nk}get va(){var t;return null!=(t=this.Xa)?t:this.Xa=function(t){return{get adSlotId(){return t.jUt},get altText(){return t.FUt},get contentHTML(){return t.Rqt},get clickThrough(){return t.GUt},get height(){return t.Ti},get resourceURI(){return t.JQt},get width(){return t.ji}}}(this)}Qqt(t){if(t.GUt&&t.JQt)return;const i=function(t){try{return dK(t,"text/html")}catch(t){return}}(t.Rqt);i&&(this.VUt=w$(i,"a","href"),this.Bqt=w$(i,"img","src"))}constructor(t){var i;this.Xa=void 0,this.VUt=void 0,this.Bqt=void 0,this.zUt=t.jUt,this.nk=t.ji,this.rk=t.Ti,this.Uqt=t.Rqt,this.VUt=t.GUt,this.Bqt=t.JQt,this.YUt=null!=(i=t.FUt)?i:"",this.Qqt(t)}};function w$(t,i,e){const s=t.querySelector(i);return s&&s.getAttribute(e)||""}var A$=class extends bl{get nYt(){return this.bqt}get Fqt(){return this.Yqt}set Fqt(t){this.Yqt=t}fa(){return cn(this)}Yn(t){t.id&&(this.IT=t.id),void 0!==t.skipOffset&&(this.yQt=t.skipOffset),void 0!==t.width&&(this.nk=t.width),void 0!==t.height&&(this.rk=t.height),void 0!==t.duration&&(this.UL=t.duration),void 0!==t.readyState&&(this.Oqt=function(t){return"ready"===t?Oo.READY:Oo.NONE}(t.readyState)),void 0!==t.resourceURI&&(this.Bqt=t.resourceURI),void 0!==t.clickThrough&&(this.VUt=t.clickThrough),void 0!==t.companions&&(this.NUt=[...t.companions].map(v$)),void 0!==t.creativeId&&(this.gUt=t.creativeId),void 0!==t.universalAdIds&&(this.gQt=t.universalAdIds)}constructor(t,i,e){super(e,function(t){return"linear"===t?lt.mFt:"nonlinear"===t?lt.pFt:lt.tT}(i.type)),this.Yqt=0,this.bqt=t,this.Yn(i)}};function v$(t){const i={jUt:t.adSlotId,FUt:t.altText,Rqt:t.contentHTML,Fz:void 0,GUt:t.clickThrough,Ti:t.height,JQt:t.resourceURI,ji:t.width};return new g$(i)}var fe=class extends Gs{fa(){return new m$(this.Y7.O7(),this.Gqt)}get Gqt(){return this.Vqt}constructor(t,i){super("Wqt",t),this.Vqt=i}},m$=class extends Xn{constructor(t,i){super("adskip",t),this.playedPercentage=i}},p$=class extends zc{fa(){return new y$(this.Xl.O7())}constructor(t){super("Hqt",t)}},y$=class extends qc{constructor(t){super("updateadbreak",t)}},M$=class extends zc{fa(){return new T$(this.Xl.O7())}constructor(t){super("qqt",t)}},T$=class extends qc{constructor(t){super("adbreakchange",t)}},ir=class extends Gs{fa(){return new N$(this.Y7.O7(),this.currentTime)}constructor(t,i){super("Xqt",t),this.currentTime=i}},N$=class extends Xn{constructor(t,i){super("adfirstquartile",t),this.currentTime=i}},Ke=class extends Gs{fa(){return new D$(this.Y7.O7(),this.currentTime)}constructor(t,i){super("Zqt",t),this.currentTime=i}},D$=class extends Xn{constructor(t,i){super("admidpoint",t),this.currentTime=i}},S$=class extends Gs{fa(){return new I$(this.Y7.O7(),this.currentTime)}constructor(t,i){super("Kqt",t),this.currentTime=i}},I$=class extends Xn{constructor(t,i){super("adthirdquartile",t),this.ad=t,this.currentTime=i}},E$=class{get Oc(){return this.Ic}get VGt(){return this.AVt}get va(){var t;return null!=(t=this.Xa)?t:this.Xa=function(t){return{get integration(){return t.nYt},get ads(){return t.Oc.map((t=>t.O7()))},get adBreaks(){return t.VGt.map((t=>t.O7()))},createAd:(i,e)=>t.Jqt(i,e?t.$qt(e):void 0).O7(),updateAd(i,e){t.tXt(t.iXt(i),e)},updateAdProgress(i,e){const s=Pe(Number(e),0,1);t.eXt(t.iXt(i),s)},beginAd(i){t.Cqt(t.iXt(i))},endAd(i){t.sXt(t.iXt(i))},skipAd(i){t.QYt(t.iXt(i))},removeAd(i){t.Eqt(t.iXt(i))},createAdBreak:i=>t.nXt(i).O7(),updateAdBreak(i,e){t.rXt(t.$qt(i),e)},removeAdBreak(i){t.hXt(t.$qt(i))},removeAllAds(){t.oXt()},error(i){t.aXt(i)},fatalError(i,e){const s=e?Number(e):void 0;t.uXt(i,s)}}}(this)}get Vp(){return this.D4}set Vp(t){this.D4=t}get Aqt(){return this.cXt.some((t=>t.zqt===lt.mFt))}get sqt(){return this.nYt}get x7(){return this.cXt}get j7(){var t;return null!=(t=this.wVt)?t:null}get z7(){return xl(this.AVt,(t=>t.z7))}get P7(){return this.AVt.filter((t=>!t.Hf))}Vm(){var t;if(0===this.cXt.length)return;const i=this.cXt[0];(null==(t=this.D4)?void 0:t.skipAd)?this.D4.skipAd(i.O7()):this.QYt(i)}Z7(t){}Jqt(t,i){var e;const s=null!=i?i:this.dXt({timeOffset:null!=(e=t.timeOffset)?e:0}),n=new A$(this.nYt,t,s);return s.Iqt(n),this.Ic.push(n),this.oqt.Co(new Tz(n)),n}tXt(t,i){t.Yn(i),this.oqt.Co(new Qo(t))}eXt(t,i){if(!ae(this.cXt,t))throw new g("Cannot update ad progress on a non-started ad");const e=t.Fqt,s=_.max(e,i);t.Fqt=s;const n=this.vqt.Tf();e<.25&&s>=.25&&this.oqt.Co(new ir(t,n)),e<.5&&s>=.5&&this.oqt.Co(new Ke(t,n)),e<.75&&s>=.75&&this.oqt.Co(new S$(t,n))}Cqt(t){ae(this.cXt,t)||(this.cXt.push(t),t.Xl.Cqt(t),this.lXt(t.Xl),this.oqt.Co(new Re(t,this.vqt.Tf())))}QYt(t){if(!ae(this.cXt,t))return;const i=t.Xl.kqt(t);this.oqt.Co(new fe(t,t.Fqt)),this.fXt(t,i)}sXt(t){if(!ae(this.cXt,t))return;const i=t.Xl.kqt(t);this.oqt.Co(new vo(t,this.vqt.Tf())),this.fXt(t,i)}Eqt(t){if(!ae(this.Ic,t))return;const i=t.Xl.kqt(t);_s(this.Ic,t),t.Xl.Eqt(t),this.oqt.Co(new M$(t.Xl)),this.fXt(t,i)}nXt(t){const i=new _$(this.nYt,t);return this.AVt.push(i),this.oqt.Co(new cr(i)),i}rXt(t,i){t.Yn(i),this.oqt.Co(new p$(t))}hXt(t){if(ae(this.AVt,t)){for(const i of t.Oc.slice())this.Eqt(i);_s(this.AVt,t),this.oqt.Co(new pz(t))}}oXt(){for(const t of this.AVt.slice())this.hXt(t)}aXt(t){this.oqt.Co(new gn(Xr.GENERAL,t.message))}uXt(t,i){const e=new $i(null!=i?i:td.AD_ERROR,t.message,t);this.vqt.yP(e)}_Xt(t){return Po(this.AVt,(i=>i.qEt===t))}dXt(t){var i;return null!=(i=this._Xt(t.timeOffset))?i:this.nXt(t)}fXt(t,i){_s(this.cXt,t);const e=t.Xl;0!==this.cXt.length||this.wVt!==e||i||(e.Dqt(),this.lXt(void 0))}lXt(t){this.wVt!==t&&(void 0!==this.wVt&&this.oqt.Co(new Vi(this.wVt)),this.wVt=t,void 0!==t&&this.oqt.Co(new Ko(t)))}iXt(t){const i=Po(this.Ic,(i=>i.O7()===t));if(void 0===i)throw new g('Invalid ad for integration "'+this.nYt+'"');return i}$qt(t){const i=Po(this.AVt,(i=>i.O7()===t));if(void 0===i)throw new g('Invalid ad break for integration "'+this.nYt+'"');return i}async ga(t,i){var e;if(fo(i),null==(e=this.D4)?void 0:e.setSource){let i=await Promise.resolve(this.D4.setSource(t));return Mn(i)&&(i=t),Ms(i,this.vqt.wd)}return t}async gXt(){var t;(null==(t=this.D4)?void 0:t.resetSource)?await Promise.resolve(this.D4.resetSource()):this.oXt()}async gn(){var t;(null==(t=this.D4)?void 0:t.destroy)&&await Promise.resolve(this.D4.destroy()).catch(qo),this.oXt(),this.lXt(void 0),this.D4=void 0,this.oqt.gn()}constructor(t,i){this.oqt=new Eu,this.Ic=[],this.AVt=[],this.cXt=[],this.nYt=t,this.vqt=i}};var b$=class extends n${v7(){return this.wXt}get AXt(){return this.vXt}v_(){this.RHt.v_(),this.wXt.v_()}p_(){void 0===this.xz?(void 0!==this.mXt&&this.pXt(this.mXt),super.p_()):this.Co(new fh(this.xz))}async ga(t,i){fo(i);let e=t;if(e)for(const t of this.yXt)e=await t.ga(e,i);if(await super.ga(e,i),fo(i),null==e?void 0:e.ads){const t=Boolean(e.blockContentIfAdError);this.wXt.mqt(e.playAdsAfterTime);for(const i of e.ads)this.wXt.Z1(i,Ki.U7,t)}}async y_(){this.xz=void 0,this.RB=void 0,await this.wXt.tr(),this.LHt(),await super.y_();for(const t of this.yXt)await t.gXt()}pXt(t){this.MXt=this.Qo.Gf;const i=this.Qo.c_,e=this.Qo.Pf;t.l_(i),t.Rf(e),this.vXt=t,this.mXt=void 0,this.cT(t)}yqt(t){void 0===this.vXt&&(this.mXt=t)}LHt(){this.mXt=void 0,void 0!==this.vXt&&(this.RHt.Gf=this.MXt,this.RHt.c_=this.c_,this.RHt.Pf=this.Pf,this.cT(this.RHt),this.vXt=void 0)}Ef(){var t;return null!=(t=this.RB)?t:super.Ef()}Lf(){var t;return null!=(t=this.xz)?t:super.Lf()}yP(t){void 0===this.Lf()&&(this.xz=t,this.RB=Zr(t),this.Co(new fh(t)))}E_(t){return void 0===this.vXt&&this.wXt.cqt(t)}R7(t,i){try{const e=new E$(t,this);e.Vp=i(e.va),this.wXt.K7(e),this.yXt.push(e)}catch(i){this.wXt.Co(new gn(Xr.GENERAL,'Error while constructing ad integration "'+t+'": '+i+'"'))}}async gn(){for(const t of this.yXt)await t.gn().catch(qo);await this.wXt.gn(),this.LHt(),await super.gn()}constructor(t,i){super(t),this.yXt=[],this.xz=void 0,this.RB=void 0,this.MXt=1,this.RHt=t,this.wXt=new f$(this),this.wXt._qt.KHt(i,t,this,t.wd)}};go((t=>new b$(t,He.yb)),Zo.T7);var L$,k$=0!==fi.YE?fi.YE:fi.eE,C$=fi.Ga&&k$<12,fn=class extends rz{get Mf(){return this.Tf()}set Mf(t){this.Nf(t)}r7(){return this.Qo.r7()}get ct(){return this.Td()}get kf(){return this.aT}get t_(){return this.i_()}get f_(){return this.Rz}get oqt(){return this.TXt}get ht(){return this.oT}get Aqt(){return this.vqt.AXt===this}Af(){return ce.MB().ks()}mf(){}pf(t){}Vf(){return 1}Wf(t){}qf(){return new ce([0,this.Mf]).ks()}s_(){return!1}n_(){return this.Dl}o_(){return this.uT}cs(){return this.w_().cs}w_(){return this.EB}ka(){}async gn(){this.Vo(),this.oT.gn(),this.uT.gn(),this.Dl.gn(),this.TXt.gn(),this.Qo.fn(Co.Hg,this.Ds)}NXt(){C$&&this.DXt(),this.Aqt||this.vqt.pXt(this)}LHt(){this.Aqt&&(C$&&this.SXt(),fi.fb&&this.we.querySelectorAll("video[src]").forEach((t=>{t.src=""})),i.Ys.Htt&&this.Qo.S_(),this.vqt.LHt())}DXt(){this.IXt||(Qr.addEventListener("blur",this.EXt),Qr.addEventListener("focus",this.bXt),this.IXt=!0)}SXt(){Qr.removeEventListener("blur",this.EXt),Qr.removeEventListener("focus",this.bXt),this.IXt=!1}LXt(){requestAnimationFrame((()=>this.Qo.be()))}constructor(t,i){super(t,!0),this.vqt=i,this.IXt=!1,this.uT=new Ur,this.oT=new Ur,this.Dl=new Zi,this.aT=new Df,this.TXt=new Eu,this.EB=new ma,this.Rz=new Ti,this.EXt=()=>{this.Qo.ge()},this.bXt=()=>{this.LXt()},this.Qo.yn(Co.Hg,this.Ds)}},x$=0,O$="theoplayer-wrapper",j$=class t{get kXt(){return this.CXt}get xXt(){return this.OXt}get jXt(){return 1===this.OXt.length&&WK(this.OXt[0].sources.type)}get zXt(){return this.PXt}BXt(t){const i=this.RXt===t.timeOffset;return!this.UXt&&i}get QXt(){return this.FXt}get YXt(){return XK(this.GXt)&&!this.UXt}get RXt(){return this.GXt}get Kl(){return this.VXt}WXt(){if(S(this.VXt)){let t=this.RXt;if(void 0===t)return void(this.VXt=0);if("string"==typeof t&&XK(t)){const i=this.Qo.Td();S(i)||i===1/0||(t=HZ(t)*i)}S(t)||(this.VXt=t)}}get HXt(){return this.qXt}set HXt(t){this.qXt=t}get XXt(){return this.ZXt}set XXt(t){this.ZXt=t,this.KXt=!1}get JXt(){return this.$Xt}tZt(t){this.$Xt.push(t)}iZt(){if(!this.UXt){let t,i;const e=this.CXt===Ki.U7&&void 0===this.eZt&&1===this.OXt.length,s=this.OXt[0];if(WK(s.sources.type)||e)t=s.sources.src;else{if(S(this.Qo.Td())&&"end"===this.sZt())return;i=this.nZt()}let n=this.Qo.Td();(S(n)||n===1/0)&&(n=-3),this.UXt={rZt:this.Qo.we.offsetWidth,hZt:this.Qo.we.offsetHeight,oZt:this.Qo.we.offsetWidth,aZt:this.Qo.we.offsetHeight,uZt:this.X9,cZt:this.DB,dZt:t,lZt:i,fZt:s.omidAccessModeRules,_Zt:n}}return this.UXt}nZt(){return'<vmap:VMAP xmlns:vmap="http://www.iab.net/videosuite/vmap" version="1.0">'+this.OXt.map(((t,i)=>this.gZt(t.sources,i))).join("\n")+"</vmap:VMAP>"}gZt(t,i){const e=this.sZt(),s=t.src;return'<vmap:AdBreak timeOffset="'+e+'" breakType="linear,nonlinear" breakId="theoplayer-break-'+this.Mg+"-"+i+'"><vmap:AdSource allowMultipleAds="true" followRedirects="true"><vmap:VASTAdData><VAST version="3.0"><Ad id="'+O$+"-"+this.Mg+"-"+i+'"><Wrapper allowMultipleAds="true" followAdditionalWrappers="true"><VASTAdTagURI><![CDATA['+s+"]]></VASTAdTagURI></Wrapper></Ad></VAST></vmap:VASTAdData></vmap:AdSource></vmap:AdBreak>"}sZt(){if(0===this.RXt)return"start";if(this.RXt===1/0)return"end";const t=this.RXt;if("string"==typeof t&&XK(t)){const i=HZ(t)*this.Qo.Td();return je.KFt(i)}return je.KFt(this.RXt||0)}wZt(t){this.OXt.push(t)}AZt(t){const i=O$+"-"+this.Mg+"-";for(const e of t)if(D(e,i)){const t=Number(e.slice(i.length));if(!S(t)&&t>=0&&t<this.OXt.length)return t}return-1}static vZt(t){if(void 0!==t)return-1===t?1/0:t}mZt(){this.FXt=!0}get pT(){return this.X9}set pT(t){this.X9=t}get Pf(){return this.DB}set Pf(t){this.DB=t}constructor(i,e,s,n){this.CXt=e,this.Qo=s,this.PXt=n,this.VXt=NaN,this.qXt=!1,this.ZXt=!1,this.FXt=!1,this.$Xt=[],this.X9=!1,this.DB=!1,this.OXt=[],this.Mg=++x$,this.eZt=i.timeOffset,this.GXt=t.vZt(this.eZt),this.WXt(),this.OXt.push(i)}},z$=class{get pZt(){return this.yZt.pZt}get MZt(){return this.yZt.MZt}get z7(){return this.yZt.z7}get t(){return this.yZt.t}mqt(t){this.TZt=t}NZt(t){return!(this.pZt&&!this.pZt.QXt&&"nonlinear"!==this.MZt.zqt)||this.pZt.Kl>t.Kl&&this.pZt.Kl!==t.Kl}DZt(t){if(t.length)return t.sort(((t,i)=>t.Kl-i.Kl))[0]}SZt(){if(this.z7.length)return this.DZt(this.IZt(this.t.Tf()))}EZt(){if(!(void 0!==this.TZt&&this.TZt>=0))return this.z7.filter((t=>!t.HXt&&0===t.Kl&&t!==this.pZt))[0]}IZt(t){if(!this.bZt&&(this.bZt=!this.z7.some((t=>S(t.Kl))),!this.bZt))return[];const i=this.z7.filter((i=>!i.HXt&&(i.jXt||!S(i.Kl)&&t<=i.Kl)));return void 0===this.TZt?i:i.filter((t=>t.jXt||void 0===t.RXt||t.Kl>this.TZt))}constructor(t){this.bZt=!1,this.yZt=t,this.TZt=void 0}};!function(t){t[t.LZt=0]="LZt",t[t.kZt=1]="kZt",t[t.CZt=2]="CZt"}(L$||(L$={}));var Nr,P$,pn,vn,B$=class{v_(){this.bo=!0,this.xZt&&this.OZt()}jZt(t,i){this.zZt(t,i);const e=Po(this.z7,(i=>i.BXt(t)));if(e)e.wZt(t);else{var s;const e=new j$(t,i,this.Qo,null==(s=t.replaceContent)||s);this.Lqt.push(e),2===this.PZt&&this.BZt.nXt(e.Kl,e,e.RXt),this.RZt(i,e)}}get MZt(){return this.UZt}get z7(){return this.Lqt}get t(){return this.Qo}get Ozt(){return Boolean(this.Ugt)}get PZt(){return this.QZt}FZt(){if(_s(this.z7,this.pZt),this.pZt){for(const t of this.pZt.JXt)this.BZt.YZt();this.pZt=void 0}}GZt(){for(const t of this.Lqt)for(const i of t.JXt)this.BZt.VZt(i,!0);No(this.Lqt)}async WZt(t){this.FZt(),this.HZt=!0,this.pZt=t,this.qZt=t.Kl,this.Ugt=this.XZt(t),await this.Ugt,this.Ugt=void 0}async XZt(t){this.ZZt(t);const i=t.iZt();if(!i)return this.HZt=!1,void(this.pZt=void 0);const e=this.UZt.KZt(i);t.HXt=!0;try{await e,t.kXt===Ki.B7&&this.UZt.JZt()}catch(t){0,this.pZt=void 0,await this.OZt()}}ZZt(t){this.bo?t.pT=!0:t.pT=this.vqt.pT,t.Pf=this.vqt.Pf}$Zt(){var t;return null!=(t=this.tKt.EZt())?t:this.tKt.SZt()}async OZt(){if(this.pZt&&!this.pZt.QXt)return this.Ugt;const t=this.$Zt();t&&await this.WZt(t)}get pZt(){return this.iKt}set pZt(t){this.iKt=t}get HZt(){return this.eKt}set HZt(t){this.eKt=t}tr(){this.FZt(),No(this.Lqt),this.qZt=0,this.pZt=void 0,this.Ugt=void 0,this.HZt=!1}XXt(){this.HZt=!1,this.pZt&&(this.pZt.XXt=!0)}async RZt(t,i){t===Ki.B7&&this.bo&&this.tKt.NZt(i)&&!this.Ozt&&"linear"!==this.UZt.zqt&&(!this.pZt||this.pZt&&this.pZt.HXt)&&(await Promise.resolve(),await this.WZt(i))}mZt(){this.pZt&&this.pZt.mZt()}get sKt(){if(this.Ozt||this.HZt)return!1;if(this.pZt&&!this.pZt.QXt)return!1;return!!this.Lqt.filter((t=>this.pZt!==t)).length&&Boolean(this.$Zt())}async nKt(){if(!this.sKt)return void 0;const t=this.$Zt();t&&await this.WZt(t)}zZt(t,i){const e=t.sources.type,s=i===Ki.U7&&void 0===t.timeOffset,n=WK(e)||s?1:2;n!==this.QZt&&(this.QZt=n,this.GZt(),this.UZt.YGt&&!this.Ozt&&"linear"!==this.UZt.zqt&&(this.UZt.YGt.Qd(),this.pZt=void 0,this.Ugt=void 0),this.qZt=0,this.xZt=!0)}mqt(t){this.tKt.mqt(t)}gn(){this.Qo.fn(Co.Xg,this.EU)}constructor(t,i,e,s,n){this.QZt=0,this.Ugt=void 0,this.eKt=!1,this.EU=()=>{const t=this.Lqt.filter((t=>t.YXt));for(const i of t){i.WXt();const t=i.RXt;this.BZt.rKt(t,i.Kl)}this.bo&&this.sKt&&this.OZt()},this.Lqt=[],this.UZt=t,this.bo=!1,this.xZt=!1,this.Qo=i,this.vqt=e,this.pZt=void 0,this.qZt=0,this.tKt=new z$(this),this.J9=s,this.BZt=n,this.Qo.yn(Co.Xg,this.EU)}};function R$(t,i){if(t===Nr.hKt){const t=i;return{oKt:t.adBreakDuration,aKt:t.adPosition,Mf:t.currentTime,ct:t.duration,uKt:t.totalAds}}return i}function U$(t){switch(t){case google.ima.AdError.Type.AD_LOAD:return vn.cKt;case google.ima.AdError.Type.AD_PLAY:return vn.dKt}}function Q$(t){return Mo(t)&&Ld(t.getVastErrorCode)}function F$(t){const i=t.getInnerError(),e=i&&Q$(i)?F$(i):void 0;return{bb:t.getMessage(),lFt:t.getErrorCode(),lKt:t.getVastErrorCode(),Rg:U$(t.getType()),fKt:e}}function Y$(t){if(Dd(t))return t}!function(t){t._Kt="contentResumeRequested",t.gKt="contentPauseRequested",t.wKt="click",t.Xg="durationChange",t.AKt="expandedChanged",t.vKt="start",t.mKt="impression",t.Qw="pause",t.pKt="resume",t.hKt="adProgress",t.yKt="adBuffering",t.MKt="firstQuartile",t.OQt="midpoint",t.TKt="thirdQuartile",t.jQt="complete",t.NKt="userClose",t.DKt="linearChanged",t.SKt="loaded",t.IKt="adCanPlay",t.EKt="adMetadata",t.bKt="adBreakReady",t.LKt="interaction",t.kKt="allAdsCompleted",t.CKt="skip",t.xKt="skippableStateChanged",t.OKt="log",t.jKt="viewableImpression",t.zKt="volumeChange",t.PKt="mute"}(Nr||(Nr={})),(P$||(P$={})).BKt="adError",function(t){t[t.RKt=-1]="RKt",t[t.UKt=-1]="UKt",t[t.QKt=-1]="QKt",t[t.FKt=101]="FKt",t[t.YKt=102]="YKt",t[t.GKt=200]="GKt",t[t.VKt=201]="VKt",t[t.WKt=202]="WKt",t[t.HKt=300]="HKt",t[t.qKt=301]="qKt",t[t.XKt=302]="XKt",t[t.ZKt=303]="ZKt",t[t.KKt=400]="KKt",t[t.JKt=402]="JKt",t[t.$Kt=403]="$Kt",t[t.tJt=405]="tJt",t[t.iJt=500]="iJt",t[t.eJt=501]="eJt",t[t.sJt=-1]="sJt",t[t.nJt=503]="nJt",t[t.rJt=602]="rJt",t[t.hJt=900]="hJt",t[t.oJt=901]="oJt",t[t.aJt=1005]="aJt",t[t.uJt=1007]="uJt",t[t.cJt=1009]="cJt",t[t.dJt=1010]="dJt",t[t.lJt=1011]="lJt",t[t.fJt=1012]="fJt",t[t._Jt=1013]="_Jt",t[t.gJt=1020]="gJt",t[t.wJt=1021]="wJt",t[t.AJt=1101]="AJt",t[t.vJt=1204]="vJt",t[t.mJt=1205]="mJt",t[t.pJt=1300]="pJt",t[t.yJt=-1]="yJt",t[t.MJt=-1]="MJt",t[t.TJt=-1]="TJt",t[t.NJt=-1]="NJt"}(pn||(pn={})),function(t){t.cKt="adLoadError",t.dKt="adPlayError"}(vn||(vn={}));var G$=class extends Bo{DJt(t){this.UZt.Co(t)}SJt(t){this.GGt=t,this.GGt.yn(P$.BKt,this.IJt),this.GGt.yn(Nr.gKt,this.EJt),this.GGt.yn(Nr._Kt,this.bJt),this.GGt.yn(Nr.kKt,this.LJt),this.GGt.yn(Nr.vKt,this.kJt),this.GGt.yn(Nr.jQt,this.CJt),this.GGt.yn(Nr.CKt,this.xJt),this.GGt.yn(Nr.NKt,this.OJt),this.GGt.yn(Nr.wKt,this.jJt),this.GGt.yn(Nr.IKt,this.zJt),this.GGt.yn(Nr.Qw,(()=>{this.UZt.Ff||(this.UZt.PJt(!0),this.UZt.Co(new iu(this.UZt.Mf))),this.BJt(!0)})),this.GGt.yn(Nr.pKt,(()=>{this.UZt.Ff&&(this.UZt.PJt(!1),this.UZt.Co(new Qn(this.UZt.Mf)))})),this.GGt.yn(Nr.PKt,(()=>{const i=t.d_();i>=0&&this.RJt(i)})),this.GGt.yn(Nr.zKt,(()=>{const i=t.d_();i>=0&&this.RJt(i)})),this.GGt.yn(Nr.EKt,(t=>{this.QJt.UJt(t.type)})),this.GGt.yn(Nr.Xg,(t=>{t.Y7&&this.FJt(t.Y7.ct)})),this.GGt.yn(Nr.OKt,(async t=>{const i=t.YJt.adError,e=Q$(i)?F$(i):void 0;e&&(this.GJt(e)?await this.VJt(t):this.WJt(e)?await this.HJt(e):this.qJt(e)&&this.XJt(e))})),this.GGt.yn(Nr.SKt,(t=>{if(t.Y7&&(this.UZt.XXt(),this.QJt.ZJt(t.Y7),this.KJt=0,t.Y7.JJt)){var i;const t=this.UZt.Jf,e=oe.sT;this.UZt.w0(e);const s=this.UZt.Mf,n=this.UZt.Jf;n!==t&&this.DJt(new Ow(s,n)),null==(i=this.GGt)||i.l_(this.UZt.$Jt()),this.DJt(new ti(s,e))}})),this.GGt.yn([Nr.yKt,Nr.mKt,Nr.MKt,Nr.OQt,Nr.TKt],(t=>{t.Y7&&this.QJt.t$t(t.Y7,t.type,this.UZt.Mf)})),this.GGt.yn(Nr.MKt,this.i$t),this.GGt.yn(Nr.hKt,this.e$t)}async switchToPlayerIfNoNextAd(){if(this.GGt){const t=this.GGt.s$t();t&&this.n$t(t)||(this.UZt.sKt()?await this.UZt.nKt():(this.UZt.r$t(),this.Qo.Ff&&!this.Qo.Sf&&this.Qo.p_()))}else if(this.UZt.sKt())await this.UZt.nKt();else{const t=this.UZt.Ff;this.UZt.r$t(),t||this.Qo.p_()}}n$t(t){const i=t.h$t,e=null==i?void 0:i.uKt;return(null==i?void 0:i.aKt)!==e}E$(){this.UZt.jc&&(m(this.UZt.jc),this.UZt.jc=null)}qJt(t){return t.Rg===vn.cKt}WJt(t){return t.Rg===vn.dKt}GJt(t){return t.lFt===pn.cJt}async HJt(t){var i;this.XJt(t);const e=[pn.KKt,pn.oJt,pn.wJt,pn.mJt];var s;this.UZt.ett||ae(e,t.lFt)||ae(e,null==(i=t.fKt)?void 0:i.lFt)||(this.UZt.o$t.HZt=!1,null==(s=this.UZt.o$t.pZt)||s.mZt(),await this.switchToPlayerIfNoNextAd())}XJt(t){this.UZt.aXt(t)}async a$t(){this.QJt.YZt(),this.UZt.mZt(),"nonlinear"===this.UZt.zqt&&(this.QJt.u$t(-1,!1),this.UZt.c$t(void 0)),"nonlinear"!==this.UZt.zqt&&"none"!==this.UZt.zqt||this.UZt.sKt()&&await this.UZt.nKt(),this.UZt.d$t(),this.UZt.Aqt?this.UZt.LHt():this.l$t()&&this.Qo.Co(new ve(this.Qo.Tf()))}l$t(){return this.UZt.f$t&&!this.UZt._$t&&this.Qo.Sf}setCountdownTimer(){this.E$(),this.UZt.jc=v((()=>this.BJt()),250)}async VJt(t){void 0!==t.Y7&&(this.UZt.o$t.HZt=!1,this.UZt.mZt(),this.UZt.sKt()?await this.UZt.nKt():this.UZt.PJt(!0))}FJt(t){this.UZt.ct!==t&&t>=0&&(this.UZt.W$(t),this.DJt(new os(this.UZt.ct)))}RJt(t){this.UZt.$Jt()!==t&&(0===t?this.UZt.g$t(t,!0,!1):this.UZt.g$t(t,!1,!1))}async w$t(){this.UZt.A$t&&void 0!==this.Qo.Ef()&&(this.v$t=new er,await this.Qo.ga(this.Qo.Wa(),this.v$t.Hd),this.m$t&&this.Qo.Nf(this.m$t),this.m$t=void 0)}BJt(t){if(this.GGt){const t=this.GGt.p$t();t>this.UZt.ct&&this.FJt(_.round(t))}const i=this.UZt.Mf;(t||!this.UZt.Ff&&i!==this.UZt.y$t)&&(this.UZt.Co(new Dr(i,void 0)),this.UZt.y$t=i)}tr(){this.v$t&&(this.v$t.Xd(),this.v$t=void 0),this.M$t=!1,this.KJt=0}gn(){this.tr(),this.Vo()}constructor(t,i,e){super(),this.UZt=t,this.Qo=i,this.QJt=e,this.M$t=!1,this.v$t=void 0,this.m$t=void 0,this.KJt=0,this.i$t=t=>{if(!t.Y7||!t.Y7.h$t)return;const i=t.Y7.h$t;this.QJt.rXt(i.qEt,i.uKt,i.QGt)},this.e$t=t=>{var i,e,s;if(this.KJt>=5)return;this.KJt++;const n=t.YJt;if(!function(t){return Mo(t)&&void 0!==t.oKt&&void 0!==t.uKt}(n))return;const r=null==(s=this.GGt)||null==(e=s.s$t())||null==(i=e.h$t)?void 0:i.qEt;void 0!==r&&this.QJt.rXt(r,n.uKt,n.oKt)},this.IJt=async t=>{t.YJt.T$t&&await this.HJt(t.YJt.T$t)},this.LJt=async()=>{this.M$t=!0,this.UZt.mZt(),await this.bJt()},this.kJt=t=>{if(!t.Y7)return;const i=t.Y7;this.UZt.c$t(i),this.UZt.ge(),this.UZt.N$t(),this.QJt.D$t(i);const e=i.ct;if(this.FJt(e),i.JJt){const t=this.UZt.Mf,i=this.UZt.Jf;this.UZt.w0(oe.rT),this.DJt(new ki(t,i)),this.DJt(new jw(t,i)),this.DJt(new di(t,i)),this.UZt.Ff||this.DJt(new _e(this.UZt.Mf)),this.setCountdownTimer(),this.BJt(!0)}else this.UZt.LHt(),this.Qo.ge(),this.UZt.Ff||this.Qo.p_()},this.CJt=t=>{var i;if(!t.Y7)return;const e=t.Y7;if(this.E$(),this.QJt.u$t(this.UZt.ct,e.JJt),this.UZt.Jf!==oe.sT){const t=oe.sT;this.UZt.w0(t);const i=this.UZt.Mf;this.DJt(new Ow(i,t))}this.FJt(NaN),this.UZt.S$t=!1,null==(i=this.GGt)||i.l_(this.UZt.$Jt())},this.xJt=t=>{t.Y7&&(this.CJt(t),this.QJt.xJt(t.Y7,this.UZt.Mf,this.UZt.ct))},this.OJt=t=>{t.Y7&&(this.QJt.u$t(-1,t.Y7.JJt),this.UZt.mZt(),!t.Y7.JJt&&this.UZt.sKt()&&this.UZt.nKt())},this.jJt=t=>{t.Y7&&(t.Y7.JJt?this.UZt.m_():this.Qo.m_())},this.zJt=()=>{var t;(this.UZt.S$t=!0,this.UZt.I$t)&&(null==(t=this.GGt)||t.m_(),this.UZt.I$t=!1)},this.EJt=t=>{var i;if(!t.Y7)return;this.UZt.A$t&&(this.m$t=this.Qo.Tf(),this.Qo.D_(),this.Qo.g_=!0),this.UZt.E$t=!0;const e=t.Y7;this.QJt.Md(e);const s=e.ct;this.UZt.c$t(e),this.FJt(s),this.UZt.PJt(!1),this.UZt.ge(),this.UZt.NXt(),this.UZt.A$t||this.Qo.be(),this.Qo.m_(),this.UZt.b$t(e);0===(null==(i=e.h$t)?void 0:i.qEt)||this.UZt.Co(new qa(this.UZt.Mf))},this.bJt=async t=>{const i=null==t?void 0:t.Y7;this.UZt.E$t=!1,"linear"===this.UZt.zqt&&this.QJt.Pd(),i&&i.ct>=0&&this.FJt(i.ct),this.Qo.Td()===1/0&&this.UZt.L$t(),this.UZt.S$t=!1,this.M$t&&await this.a$t(),this.UZt.PJt(!0);try{await this.w$t()}catch(t){return void(Mi(t)||this.Co(new XX(t)))}if(this.UZt.LHt(),this.UZt.be(),this.Qo.Sf||this.Qo.p_(),i&&this.UZt.c$t(i),this.UZt.f$t){if(this.UZt.A$t){var e;const t=this.Qo.A_(),i=null==(e=this.Qo.bt)?void 0:e.src;t&&i&&(t.src=i)}this.UZt._$t=!0}this.Qo.g_=!1,this.UZt.sKt()&&await this.UZt.nKt()}}},V$=class extends ml{get nYt(){return Gt.dVt}constructor(t,i,e){super(t),this.k$t=i,this.C$t=e}},W$=class extends bl{set x$t(t){this.O$t=t}get x$t(){return this.O$t}get nYt(){return Gt.so}nVt(){var t;return null==(t=this.j$t)?void 0:t.YRt}get z$t(){var t;return null==(t=this.j$t)?void 0:t.xUt}get _Ut(){var t;return null==(t=this.j$t)?void 0:t._Ut}get Wz(){var t;return null==(t=this.j$t)?void 0:t.Wz}get P$t(){var t,i;return null!=(i=null==(t=this.j$t)?void 0:t.P$t)?i:[]}get B$t(){var t,i;return null!=(i=null==(t=this.j$t)?void 0:t.B$t)?i:[]}get R$t(){var t,i;return null!=(i=null==(t=this.j$t)?void 0:t.R$t)?i:[]}fa(){return function(t,i){return vi(t,{bitrate:0,contentType:void 0,mediaUrl:void 0,traffickingParameters:void 0,traffickingParametersString:void 0,universalAdIds:[],get apiFramework(){return i.z$t},get creativeId(){return i._Ut},get title(){return i.Wz},get wrapperAdIds(){return i.P$t},get wrapperAdSystems(){return i.B$t},get wrapperCreativeIds(){return i.R$t}})}(cn(this),this)}U$t(t){this.j$t=t;const i=H$(t);this.xqt(t.aQt,t.Q$t,t.F$t,t.ct,i,-1)}constructor(t,i){super(t,i),this.O$t=0,this.j$t=void 0}};function H$(t){return t.JRt.map((t=>new g$(t)))}var q$=class extends bl{fa(){return function(t,i){return vi(t,{get adSystem(){return i.nVt()},get apiFramework(){return i.z$t},get bitrate(){return i.Y$t},get contentType(){return i.Fz},get creativeId(){return i._Ut},get mediaUrl(){return i.G$t},get title(){return i.Wz},get traffickingParameters(){return i.V$t},get traffickingParametersString(){return i.W$t},get wrapperAdIds(){return i.P$t},get wrapperAdSystems(){return i.B$t},get wrapperCreativeIds(){return i.R$t},get universalAdIds(){return i.tUt}})}(cn(this),this)}U$t(t){this.j$t=t,this.xqt(t.aQt,t.Q$t,t.F$t,t.ct,H$(t),t.H$t),this.Pqt=t.JJt?lt.mFt:lt.pFt}get nYt(){return Gt.dVt}nVt(){return this.j$t?$o(this.j$t.YRt):void 0}get z$t(){return this.j$t?$o(this.j$t.xUt):void 0}get Y$t(){return this.j$t?this.j$t.q$t:0}get Fz(){return this.j$t?$o(this.j$t.Fz):void 0}get _Ut(){return this.j$t?$o(this.j$t._Ut):void 0}get X$t(){return this.j$t?$o(this.j$t.X$t):void 0}get G$t(){var t;const i=null==(t=this.j$t)?void 0:t.G$t;return Dd(i)?i:this.Z$t}set G$t(t){this.Z$t=t}get Wz(){var t;return null==(t=this.j$t)?void 0:t.Wz}get V$t(){return this.j$t?$o(this.j$t.V$t):void 0}get W$t(){return this.j$t?$o(this.j$t.W$t):void 0}get P$t(){var t,i;return null!=(i=null==(t=this.j$t)?void 0:t.P$t)?i:[]}get B$t(){var t,i;return null!=(i=null==(t=this.j$t)?void 0:t.B$t)?i:[]}get R$t(){var t,i;return null!=(i=null==(t=this.j$t)?void 0:t.R$t)?i:[]}get tUt(){var t,i;return null!=(i=null==(t=this.j$t)?void 0:t.tUt.map((t=>({adIdRegistry:t.K$t,adIdValue:t.J$t}))))?i:[]}constructor(t){super(t,lt.tT),this.j$t=void 0,this.Z$t=void 0}};function $o(t){return null===t?void 0:t}var X$=class{get oqt(){return this.QJt.oqt}get sqt(){return this.$$t}get Aqt(){return this.QJt.Aqt}get j7(){var t;return null!=(t=this.QJt.j7)?t:null}get x7(){const t=this.QJt.t0t;return t?[t]:[]}get z7(){return this.QJt.z7}get P7(){return this.QJt.P7}Z7(t){this.QJt.Z7(t)}Vm(){this.QJt.Vm()}gn(){return Promise.resolve()}constructor(t,i){this.QJt=t,this.$$t=i}},Z$=class{get i0t(){return this.e0t}get oqt(){return this.TXt}get Aqt(){return this.s0t}get t0t(){return this.rVt}get j7(){return this.wVt}get z7(){return xl(this.AVt,(t=>{if(t.Hf)return[];const i=t.Oc;if(t===this.wVt&&void 0!==this.rVt){const t=i.indexOf(this.rVt);if(t>=0)return i.slice(t+1)}return i}))}get P7(){return this.AVt.filter((t=>!t.Hf))}constructor(t,i){this.TXt=t,this.AVt=[],this.s0t=!1,this.e0t=new X$(this,i)}},K$=class extends Gs{fa(){return new J$(this.Y7.O7())}constructor(t){super("n0t",t)}},J$=class extends Xn{constructor(t){super("adimpression",t)}},$$=class extends Ao{fa(){return new t0(this.Y7.O7())}constructor(t){super("r0t"),this.Y7=t}},t0=class extends Yi{constructor(t){super("adbuffering"),this.ad=t}},i0=class extends Ao{fa(){return new e0}constructor(){super("h0t")}},e0=class extends Yi{constructor(){super("admetadata")}},s0=class t extends Z${o0t(t,i){for(let e=0;e<t;e++){const t=new q$(i);i.Iqt(t),this.oqt.Co(new Tz(t))}}nXt(t,i,e){let s=t;s===1/0&&(s=-1);const n=new V$(s,e,i);this.AVt.push(n),i.tZt(n),this.oqt.Co(new cr(n))}rKt(t,i){for(const e of this.AVt)S(e.qEt)&&e.k$t===t&&(e.qEt=i,this.oqt.Co(new p$(e)))}VZt(t,i){void 0===i&&(i=!1),i&&_s(this.AVt,t),this.oqt.Co(new pz(t))}YZt(){if(this.j7){this.VZt(this.j7,!0);const t=Boolean(this.rVt&&this.rVt.zqt===lt.mFt);this.a0t(void 0,t)}}tXt(t,i){const e=i.h$t;if(!e)return;const s=e.aKt-1,n=t.Oc[s];return n.U$t(i),this.oqt.Co(new Qo(n)),n.Xl.QGt=e.QGt,n}get Aqt(){return this.u0t.Aqt}c0t(t){if(!ae(this.d0t,t)){if(t){if(this.rVt===t)return;this.rVt=t;for(const i of this.l0t)this.UJt(i,t,this.u0t.Mf)}else{if(!this.rVt)return;const t=new vo(this.rVt,this.rVt.Xl.qEt);this.d0t.push(this.rVt),this.rVt=void 0,this.TXt.Co(t)}No(this.l0t)}}a0t(t,i){if(t){var e;if((null==(e=this.j7)?void 0:e.qEt)===t.qEt)return;this.wVt=t,i&&this.oqt.Co(new Ko(this.wVt))}else{if(!this.wVt)return;const t=new Vi(this.wVt);this.wVt=void 0,No(this.d0t),i&&this.TXt.Co(t)}}f0t(t){return this.AVt.filter((i=>be(i.qEt,t,.01)))[0]}static _0t(t,i){if(i.h$t)return t.Oc[i.h$t.aKt-1]}Md(t){if(!t.h$t)return;const i=t.h$t,e=this.f0t(i.qEt);e&&(No(this.l0t),this.a0t(e,t.JJt))}Pd(){this.j7&&this.oqt.Co(new Vi(this.j7)),No(this.l0t),this.YZt()}D$t(i){if(!this.wVt&&i.h$t){const t=this.f0t(i.h$t.qEt);this.a0t(t,i.JJt)}if(this.wVt){const e=t._0t(this.wVt,i);if(!e)return;this.tXt(this.wVt,i);const s=i.G$t;Dd(s)&&!Dd(e.G$t)&&(e.G$t=s,this.oqt.Co(new Qo(e))),this.c0t(e),this.oqt.Co(new Re(this.rVt,e.Xl.qEt))}else 0}u$t(t,i){if(this.c0t(void 0),!i&&this.j7){const t=this.j7;this.a0t(void 0,!1),this.VZt(t)}}ZJt(t){const i=t.h$t;if(!i)return;const e=this.f0t(i.qEt);if(!e)return;this.rXt(i.qEt,i.uKt,i.QGt);const s=this.tXt(e,t);s&&this.oqt.Co(new Ec(s))}rXt(t,i,e){const s=this.f0t(t);if(!s)return;const n=s.Oc.length;if(i>n){const t=i-n;this.o0t(t,s),s.QGt=e,this.oqt.Co(new p$(s))}}xJt(i,e,s){if(!this.wVt)return;const n=t._0t(this.wVt,i);if(n){const t=e/s;this.oqt.Co(new fe(n,t))}}t$t(i,e,s){if(!this.wVt)return;let n=this.rVt;if(!n){const s=t._0t(this.wVt,i);if(!s||ae(this.d0t,s))return void this.l0t.push(e);n=s,this.tXt(this.wVt,i),this.c0t(n)}this.UJt(e,n,s)}UJt(t,i,e){t===Nr.EKt?this.oqt.Co(new i0):t===Nr.mKt&&i?this.oqt.Co(new K$(i)):t===Nr.yKt&&i?this.oqt.Co(new $$(i)):t===Nr.MKt&&i&&e?this.oqt.Co(new ir(i,e)):t===Nr.OQt&&i&&e?this.oqt.Co(new Ke(i,e)):t===Nr.TKt&&i&&e&&this.oqt.Co(new S$(i,e))}Vm(){this.u0t.Vm()}Z7(t){this.u0t.Z7(t)}tr(){const t=Boolean(this.rVt&&this.rVt.zqt===lt.mFt);this.c0t(void 0),this.a0t(void 0,t);for(const t of this.AVt)this.VZt(t);No(this.AVt),No(this.l0t),No(this.d0t)}gn(){this.tr()}constructor(t,i){super(t,Gt.dVt),this.u0t=i,this.l0t=[],this.d0t=[]}};function n0(t){const i=s.google.ima.settings;t.ads&&t.ads.vpaidMode&&s.google.ima.settings.setVpaidMode(function(t){const i=s.google.ima.ImaSdkSettings.VpaidMode;switch(t){case aw.ENABLED:return i.ENABLED;case aw.INSECURE:return i.INSECURE;case aw.DISABLED:default:return i.DISABLED}}(t.ads.vpaidMode)),i.setPlayerVersion("7.10.0"),i.setPlayerType("THEOplayer"),i.setAutoPlayAdBreaks(!0),i.setDisableCustomPlaybackForIOS10Plus(!r0(t));const e=function(t){var i,e,s;const n=null==(e=t.ads)||null==(i=e.googleIma)?void 0:i.language;if(void 0!==n)return n;const r=null==(s=t.ui)?void 0:s.language;if(Qs(r))return r;return}(t);e&&i.setLocale(e)}function r0(t){return fi.Ga&&t.allowNativeFullscreen}var h0=class t extends fn{get rqt(){return this.BZt.i0t}get g0t(){return this.BZt}get o$t(){return this.yZt}get A$t(){return r0(this.TH)}w0t(t,i,e){i===Ki.U7&&void 0!==e&&(this.pqt=e),this.yZt.jZt(t,i)}static get sqt(){return Gt.dVt}get sqt(){return t.sqt}get A0t(){return this.TH.ads.preload===Jn.MIDROLL_AND_POSTROLL}Z7(t){const i=this.v0t();for(const e of i)Ic(e.sources,e.timeOffset)||t.Z1(e,Ki.B7,!1)}v0t(){const t=[],{x7:i,z7:e}=this.rqt,s=[];for(const n of i.concat(e)){const i=n.Xl.C$t;if(ae(s,i.Mg))continue;const e=i.AZt(n.P$t);e>=0?t.push(...i.xXt.slice(e)):t.push(...i.xXt),s.push(i.Mg)}for(const i of this.yZt.z7)i.HXt||t.push(...i.xXt);return pl(t)}set zqt(t){this.Pqt=t}get zqt(){return this.Pqt}get YGt(){return this.GGt}set YGt(t){this.GGt=t,this.m0t=!1}Tf(){if(!this.YGt)return 0;const t=this.YGt.p$t();return S(this.ct)||t<0?0:this.ct-t}Nf(t){}Td(){return this.UL||NaN}W$(t){this.UL=t}Bf(){return this.Qo.Pf}Rf(t){this.g$t(this.c_,t,!0)}Yf(){return this.SB}PJt(t){this.SB=t}get S$t(){return this.p0t}set S$t(t){this.p0t=t}get ett(){return this.pqt}get f$t(){return this.y0t}get I$t(){return this.M0t}set I$t(t){this.M0t=t}get _$t(){return this.T0t}set _$t(t){this.T0t=t}h_(){var t,i,e;return null!=(e=null==(i=this.YGt)||null==(t=i.s$t())?void 0:t.F$t)?e:0}u_(){var t,i,e;return null!=(e=null==(i=this.YGt)||null==(t=i.s$t())?void 0:t.Q$t)?e:0}gf(){return[]}mqt(t){this.TZt=t,this.yZt.mqt(t)}JZt(){!this.m0t&&this.YGt&&(this.YGt.Cn(),this.m0t=!0)}c$t(t){this.zqt=t?t.JJt?"linear":"nonlinear":"none"}i_(){return ce.MB().ks()}d_(){return this.Qo.c_}l_(t){this.g$t(t,this.Pf,!0)}$Jt(){return this.Qo.Pf?0:this.Qo.c_}g$t(t,i,e){const s=this.Qo.c_!==t||this.Qo.Pf!==i;s&&(this.Qo.c_=t,this.Qo.Pf=i),this.YGt&&e&&this.YGt.l_(this.$Jt()),s&&this.Co(new Tc(this.Mf,this.c_))}If(){return!1}Ef(){if(this.N0t&&this.pqt)return this.N0t}Lf(){if(this.D0t&&this.pqt)return this.D0t}$f(){return this.g0}w0(t){this.g0=t,this.Co(new Bn(this.Mf,t))}get E$t(){return this.S0t}set E$t(t){this.S0t=t}v_(){this.Qo.fn(Co.jh,this.I0t),this.bo||(this.bo=!0,this.yZt.v_(),this.N$t())}async p_(){if(this.E0t)return;this.b0t.Xd(),this.b0t=new er;const t=this.Ff;this.PJt(!1),this.Co(new Qn(this.Mf)),this.L0t()||(this.A$t||this.Qo.be(),this.Co(new qa(this.Mf))),this.S$t||(this.I$t=!1);const i=Boolean(this.YGt);this.E0t=this.yZt.OZt();try{await this.E0t}finally{this.E0t=void 0}try{fo(this.b0t.Hd)}catch(t){return}if(this.bo||this.I0t(),!this.N0t||!this.pqt)if(this.YGt){if(t)if(i)try{fo(this.b0t.Hd),this.YGt.k0t(),this.Co(new _e(this.Mf))}catch(t){return}else this.JZt()}else this.pqt||(this.LHt(),this.vqt.p_())}m_(){var t;this.Ff||(this.PJt(!0),this.Co(new iu(this.Mf))),this.b0t.Xd(),this.S$t?null==(t=this.YGt)||t.m_():this.I$t=!0}Vm(){var t;null==(t=this.YGt)||t.Vm()}d$t(){this.YGt&&(this.x0t.C0t(),this.YGt.y_(),this.YGt.Qd(),this.YGt=void 0,this.zqt="none",this.m0t=!1)}async y_(){var t;this.y$t=0,this.yZt.tr(),this.b0t.Xd(),this.PJt(!0),this.y0t=!1,this.T0t=!1,this.S$t=!1,this.BZt.tr(),this.d$t(),this.r$t(),null==(t=this.O0t)||t.tr(),this.I$t=!1,this.x0t.Qd()}ge(){this.j0t.ge(),this.A$t&&this.Qo.ge()}be(){this.j0t.be()}z0t(){return Boolean(this.YGt)&&ae(this.YGt.P0t(),-1)&&!this.y0t}XXt(){this.yZt.XXt()}sKt(){return this.yZt.sKt}mZt(){this.yZt.mZt()}nKt(){return this.yZt.nKt()}cqt(t){if(this.z0t()){if(t.type===Co.Sh&&this.Qo.Sf)return!0;if(t.type===Co.Jg)return this.y0t=!0,this.x0t.C0t(),!0}return!1}L0t(){return Boolean(this.YGt&&this.YGt.s$t())}async KZt(t){try{this.d$t();const i=this.B0t();this.j0t.MW(),this.YGt=await this.x0t.KZt(t,this.O0t,i),this.R0t(this.YGt)}catch(t){this.U0t.HJt(t)}}R0t(t){if(t.l_(this.$Jt()),this.yZt.PZt===L$.kZt){const i=t.P0t();if(i.length)for(const t of i)this.BZt.nXt(t,this.yZt.pZt);else this.BZt.nXt(this.yZt.pZt.Kl,this.yZt.pZt)}this.U0t.tr(),this.U0t.SJt(t)}A_(){if(this.GGt&&this.A$t&&this.L0t())return this.Qo.A_()}w_(){return this.A$t&&this.Aqt?this.Qo.ya:super.w_()}B0t(){const t=!!(this.yZt.PZt===L$.kZt)&&this.A0t;let i,e;void 0!==this.TH.ads.googleIma.uiElements?i=this.TH.ads.googleIma.uiElements:this.TH.ads.showCountdown||(i=[]),void 0!==this.TH.ads.allowedMimeTypes&&(e=this.TH.ads.allowedMimeTypes);return{Q0t:e,F0t:i,Y0t:t,Y$t:this.TH.ads.googleIma.bitrate,G0t:void 0,V0t:this.TZt}}N$t(){if(this.GGt){const t=this.B0t();this.GGt.W0t(t)}}aXt(t){this.N0t=new wc(oi.ADVERTISEMENT_ERROR,t.bb),this.D0t=new $i(td.AD_ERROR,"There was a problem playing ads.",this.N0t),this.oqt.Co(gn.dqt(t))}r$t(){this.Aqt&&(this.Qo.ge(),this.LHt(),this.be())}L$t(){var t;if(this.Qo.Tf()===1/0||0===this.Qo.i_().length)return;(null==(t=this.yZt.pZt)?void 0:t.zXt)&&-1!==this.H0t&&(this.Qo.Nf(this.Qo.Tf()+this.H0t),this.H0t=-1)}b$t(t){var i,e;this.H0t=null!=(e=null==(i=t.h$t)?void 0:i.QGt)?e:-1}LHt(){super.LHt(),this.Qo.ge(),this.A$t&&!this.Qo.Sf&&this.Qo.p_()}LXt(){this.A$t||super.LXt()}async gn(){this.U0t.fn(ut.ha,this.q0t),await super.gn(),this.d$t(),this.x0t.fn("X0t",this.Z0t),this.x0t.Qd(),this.j0t.Qd(),this.yZt.gn(),this.U0t.gn()}constructor(t,i,e,s,n,r,h){super(t,i),this.bo=!1,this.pqt=!1,this.N0t=void 0,this.D0t=void 0,this.H0t=-1,this.Pqt="none",this.S0t=!1,this.m0t=!1,this.b0t=new er,this.p0t=!1,this.M0t=!1,this.Z0t=t=>{this.oqt.Co(t)},this.q0t=t=>{this.N0t=new wc(oi.ADVERTISEMENT_ERROR,"Error while recovering from failed IMA ad.",t.error.message),this.D0t=se(this.N0t)},this.y$t=NaN,this.I0t=()=>{this.bo||this.v_()},this.TH=e,this.SB=!0,this.UL=NaN,this.g0=oe.sT,this.y0t=!1,this.T0t=!1,this.BZt=new s0(this.oqt,this),this.U0t=new G$(this,this.Qo,this.BZt),this.U0t.yn(ut.ha,this.q0t),this.Qo.yn(Co.jh,this.I0t),this.yZt=new B$(this,this.Qo,this.vqt,s,this.BZt),this.O0t=h,this.x0t=r,this.j0t=n,this.be(),this.x0t.yn("X0t",this.Z0t)}},mn=class{registerWebImaAdPlayerConstructor(t){this.K0t=t}createAdPlayer(t,i,e){return o0()&&this.K0t?this.K0t(t,i,e):void 0}};function o0(){if(Boolean(Qr.google&&Qr.google.ima)){return!(1===w.keys(Qr.google.ima).length&&Qr.google.ima.dai)}return!1}mn.yb=new mn;var a0=class{get $Ht(){return h0.sqt}hR(t){return t&&t.integration===Os.GOOGLE_IMA}tqt(t,i,e){return mn.yb.createAdPlayer(t,i,e)}Z1(t,i,e,s){e.w0t(t,i,s)}DQ(t){const i=HK(t.sources);if(!i)return;const e={integration:Os.GOOGLE_IMA,sources:i,omidAccessModeRules:Y$(t.omidAccessModeRules)},s=mo(t.timeOffset);return void 0!==s&&(e.timeOffset=s),e}};He.yb.oR(new a0);var u0=class extends Ao{fa(){return new c0}constructor(){super("gVt")}},c0=class extends Yi{constructor(){super("adloaded")}},Do=-1,d0=class{get VGt(){return this.AVt}get J0t(){return this.$0t}get _ot(){return this.Ltt}get t1t(){return this.GXt}get i1t(){return this.e1t}get Kl(){if(S(this.s1t)){const t=je.$Ft(this.GXt,this.XGt.t.Td());void 0===t||S(t)||(this.s1t=t)}return this.s1t}n1t(){return this.Ltt<this.AVt.length}Mc(){let t;return this.Ltt<this.AVt.length&&(t=this.AVt[this.Ltt],this.Ltt++),t}r1t(t){t.bFt=this,this.AVt.push(t)}async h1t(t){let i=!1;for(const e of this.AVt)try{await e.$n(),i=!0}catch(i){0,_s(this.AVt,e);const s=e.ttt.sources,n="string"==typeof s?s:s.src;t.Co(gn.lqt(i,n))}return this.e1t=!0,i}$Gt(){this.JGt=!0}KGt(){return this.JGt}o1t(){return this.AVt.some((t=>yJ(t).some((t=>t.ZRt))))}constructor(t,i){this.AVt=[],this.JGt=!1,this.GXt=t,this.Ltt=0,this.XGt=i,this.s1t=NaN,this.e1t=!1,this.$0t=new TJ(this,this.XGt)}},l0=class t extends Ut{get a1t(){let t=0;for(const i of this.u1t)i.KGt()||(t+=1);return t}c1t(){this.l1t.d1t()}Cn(){this.Po(),this.f1t.yn("q7",this.l1t._1t)}jn(){this.$o(),this.f1t.fn("q7",this.l1t._1t),this.x$=this.XT,this.l1t.tr();for(const t of this.u1t)t.$Gt();No(this.u1t)}Po(){this.g1t||(this.Qo.yn(Co.Iw,this.w1t),this.g1t=!0)}$o(){this.g1t&&(this.Qo.fn(Co.Iw,this.w1t),this.g1t=!1)}get z7(){return this.u1t}A1t(){return this.v1t(new Dr(Do,void 0))}m1t(t){return this.p1t(t,0,0).length>0}y1t(t,i){let e,s=0;for(const n of this.u1t){if(n.KGt())continue;const r=n.Kl;r>=t&&r<=i&&r>=s&&!S(r)&&(e=n,s=e.Kl)}return e}M1t(t){return this.v1t(new Dr(t,void 0))}T1t(){if(!this.N1t&&void 0!==this.TZt){this.N1t=!this.u1t.some((t=>S(t.Kl)));for(const t of this.u1t)t.Kl!==Do&&t.Kl<=this.TZt&&!t.KGt()&&t.$Gt()}}D1t(t){for(const i of t)i.$Gt();this.vXt.S1t(t),0===this.a1t&&this.$o()}p1t(t,i,e){return this.u1t.filter((s=>{if(s.KGt())return!1;const n=s.Kl;return this.I1t(n,t)||this.E1t(n,t,i,e)}))}I1t(t,i){switch(i){case 0:return 0===t;case Do:return t===Do;default:return!1}}E1t(t,i,e,s){if(t<0)return!1;const n=t-i;return-1!==n&&n<=e&&n>=-s}b1t(i){if(i&&i.length>0){for(const e of i){const i=t.vZt(e.qEt);let s=this.D_t(e);-1===s&&(this.N1t=void 0===this.TZt,this.u1t.push(new d0(i,this.L1t)),s=this.u1t.length-1);this.u1t[s].r1t(e)}this.Po()}}static vZt(t){switch(t){case"start":case"00:00:00":case"00:00:00.000":case"0%":case"0":return"0";case"end":case"100%":return"-1";default:return t}}D_t(i){const e=t.vZt(i.qEt);return Yd(this.u1t,(i=>e===t.vZt(i.t1t)))}k1t(t){_s(this.u1t,t)}mqt(t){this.TZt=t,this.N1t=void 0===t}constructor(t,i,e,s){super(),this.N1t=!1,this.w1t=t=>Ys(this.v1t(t)),this.v1t=async t=>{this.T1t();const i=t.currentTime,e=t.currentTime!==Do?this.y1t(this.x$,t.currentTime):this.p1t(t.currentTime,0,0)[0];let s,n;const r=this.Qo.Td()-10;if(n=this.m1t(Do)&&_.ceil(i)===_.ceil(r)?this.p1t(Do,10,0).filter((t=>!t.i1t)):this.p1t(i,10,0).filter((t=>!t.i1t)),n.length){const t=(await Promise.all(n.map((t=>t.h1t(this.f1t))))).some((t=>!0===t));t&&this.Co(new u0),(!t||!this.l1t.C1t||n[0].Kl<this.l1t.C1t.Kl)&&(s=n[0])}e&&(e!==this.l1t.C1t&&(s=e),this.D1t([e])),s&&(this.l1t._1t(),this.l1t.C1t=s,await this.l1t.d1t()),S(this.Qo.Td())||(this.x$=t.currentTime)},this.Qo=t,this.vXt=i,this.L1t=new Rc(this.vXt,this.Qo),this.TZt=void 0,this.N1t=!1,t.Td()!==1/0?this.XT=0:this.XT=t.Tf(),this.x$=this.XT,this.u1t=[],this.f1t=e,this.l1t=s,this.g1t=!1}},vl=class extends Ut{get x1t(){return this.NWt}get oqt(){return this.TXt}O1t(){this.j1t(),this.z1t(),this.xz=void 0}P1t(t){this.B1t=this.B1t.concat(t)}R1t(t){this.U1t=this.U1t.concat(t)}z1t(){this.B1t=[]}j1t(){this.U1t=[]}Q1t(t){for(const i of this.B1t)i.yU===t&&GZ(i.eventURL)}ge(){this.x1t.style.display=""}be(){this.x1t.style.display="none"}gn(){this.Vo(),this.TXt.Vo(),hs(this.NWt)}constructor(t,i){super(),this.U1t=[],this.B1t=[],this.xz=void 0,this.TXt=new Ut,this.F1t=t=>{t.stopPropagation(),this.Y1t()},this.Y1t=()=>{for(const t of this.U1t)for(const i of t.qUt)GZ(i.uri)},this.NWt=h.createElement("div"),this.NWt.style.display="none",this.G1t=t,this.V1t=i}};function f0(t,i){let e=i;if(!function(t){return"ui"in t}(t))return e;const s=t.ui.language;let n;if(Qs(s)){const i=t.ui.languages;if(!i)return e;n=i[s]}else n=s;return n&&n[i]&&(e=n[i]),e}var _0={[yi.kA]:1,[yi.CA]:2,[yi.xA]:2};function g0(t,i){const e=i?i.map((t=>t.toLowerCase())):i;return yd(t.filter((t=>{const i=t.type.toLowerCase();return!!$(e)&&-1!==e.indexOf(i)&&EK(i)})),((t,i)=>_0[t.type]-_0[i.type])).map(w0)}function w0(t){return Jg({src:t.contentURL,type:t.type,isAdvertisement:!0})}function A0(t,i){return eQ(v0(t),v0(i))}function v0(t){return{Ti:t.height,ji:t.width}}function m0(t,i,e,s){const n=function(t,i,e,s){let n,r=1/0;const h=t.filter((t=>!EK(t.type))).filter((t=>void 0===s||-1!==s.indexOf(t.type)));if(h.length){for(const t of h){const s=(_.abs(t.width/i-1)+_.abs(t.height/e-1))/2;s<r&&(r=s,n=t)}return w0(n||h.sort(A0)[0])}}(t,i.width,i.height,e),r=g0(t,e);return n&&r.push(n),Ms({sources:r},s)}var su,p0=class extends vl{get W1t(){return this.H1t}get Mf(){return this.q1t.Mf}get ct(){let t=this.q1t.ct;return S(t)&&this.lQt&&(t=this.lQt.ct||0),t}get Sf(){return this.q1t.Sf}get Pf(){return this.q1t.Pf}set Pf(t){this.q1t.Pf=t,t?this.Q1t(Ln.TQt):this.Q1t(Ln.NQt)}get Ff(){return this.q1t.Ff}get Jf(){return this.q1t.Jf}get c_(){return this.q1t.c_}set c_(t){this.q1t.c_=t}get r_(){return this.q1t.r_}get a_(){return this.q1t.a_}get X1t(){return this.Z1t}p_(){this.q1t.Ff&&(this.q1t.p_(),this.Co(new Qn(this.Mf)),this.H1t&&this.Q1t(Ln.DQt),this.H1t=!0)}m_(){this.q1t.Ff||(this.q1t.m_(),this.Co(new iu(this.Mf)),this.Q1t(Ln.Sh))}async y_(){var t;null==(t=this.Ax)||t.Xd(),this.Ax=void 0,this.be(),this.H1t=!1,this.K1t=!0,this.J1t(),this.$1t(),await this.t4t()}i4t(t){void 0===t&&(t=!0),this.H1t=!1,t&&this.Q1t(Ln.jQt),this.be(),this.V1t()}e4t(){var t;const i=null==(t=this.vXt.ba)?void 0:t.mi,e=new UJ(this.Wu,i);return this.x1t.appendChild(e.we),e.yn("Vm",this.s4t),e}n4t(){this.lQt&&this.lQt.oQt.GUt&&(this.SWt=new jJ(this.x1t),this.SWt.OVt=this.lQt.oQt.GUt,this.SWt.yn("clickstart",this.r4t),this.SWt.yn("click",this.Y1t))}h4t(t,i){for(const e of this.B1t)if(e.yU===Ln.gw){const s=yK(e.Ku,i);void 0!==s&&this.x$<s&&s<=t&&GZ(e.eventURL)}}async o4t(){if(!this.lQt||!this.a4t)return;const t=m0(this.lQt.AQt,this.a4t,this.sx.ads.allowedMimeTypes,this.sx);if(!t.sources.length)return await this.q1t.tr(),this.G1t(""),void this.lQt.vUt();this.Ax=new er,this.K1t=!0,await this.q1t.ga(t,this.Ax.Hd),this.q1t.ge(),this.lQt.vUt(),this.n4t()}async u4t(t,i,e){this.Z1t=t,this.lQt=t.ZRt,this.q1t.yn(Co.Iw,this.c4t),this.q1t.yn(Co.Xg,this.d4t),this.q1t.yn(Co.Ew,this.l4t),this.q1t.yn(Wn,this.Ds),this.lQt.sUt&&0!==this.lQt.sUt.length&&this.P1t(this.lQt.sUt),this.lQt.oQt&&this.R1t(this.lQt.oQt),this.xz=i,this.a4t=e,0!==this.lQt.AQt.length&&(this.q1t.yn(ut.ha,this.f4t),await this.o4t(),this.q1t.yn(Co.Jg,this._4t),this.q1t.yn(Co.Iw,this.g4t),this.q1t.yn(Zt.Rw,this.w4t),this.q1t.yn(Co.mw,this.Ds))}QYt(){this.W1t&&this.A4t&&this.s4t()}get A4t(){return this.lQt&&-1!==this.lQt.pQt&&this.q1t.Mf>=this.lQt.pQt}v4t(){this.Q1t(Ln.kyt),this.Z1t&&this.oqt.Co(new Re(this.Z1t,this.Mf))}async t4t(){this.q1t.fn(ut.ha,this.f4t),this.q1t.fn(Co.Jg,this._4t),this.q1t.fn(Co.Iw,this.g4t),this.q1t.fn(Zt.Rw,this.Ds),this.q1t.fn(Zt.Rw,this.w4t),this.q1t.fn(Co.mw,this.Ds),this.q1t.fn(Co.Iw,this.c4t),this.q1t.fn(Co.Xg,this.d4t),this.q1t.fn(Co.Ew,this.l4t),this.q1t.fn(Wn,this.Ds),this.Z1t&&(this.Z1t.$Gt(),this.oqt.Co(new vo(this.Z1t,this.Mf))),this.m4t(),this.O1t(),this.J1t(),this.$1t(),this.Z1t=void 0,this.lQt=void 0,this.a4t=void 0,await this.q1t.tr(),this.q1t.be(),this.x1t.style.cursor="",this.p4t=0,this.x$=-1,this.y4t&&(this.M4t.t4t(),this.y4t=!1)}m4t(){this.SWt&&(this.SWt.Qd(),this.SWt=void 0)}$1t(){this.T4t&&(hs(this.T4t),this.T4t=void 0)}J1t(){this.bWt&&(this.bWt.gn(),this.bWt=void 0)}N4t(){this.y4t=!0}D4t(){var t;this.T4t||(this.T4t=h.createElement("div"),this.T4t.className="theoplayer-ad-overlay-component theo-ad-remaining-container",this.x1t.appendChild(this.T4t));const i=null==(t=this.Z1t)?void 0:t.Xl;if(!i)return;const e=i.Oc.filter(EJ);let s=f0(this.sx,"The content will play in")+" "+_.round(i.FGt)+" "+f0(this.sx,"seconds");if(e.length>1){const t=e.filter((t=>t.KGt())).length;s+=". "+f0(this.sx,"Ad")+" "+(t+1)+"/"+e.length}Gi(this.T4t,s)}constructor(t,i,e,s,n,r,h){super(t,i),this.M4t=e,this.sx=s,this.vXt=n,this.Wu=r,this.q1t=h,this.H1t=!1,this.p4t=0,this.x$=-1,this.Ax=new er,this.K1t=!0,this._4t=()=>{this.i4t()},this.w4t=()=>{this.Ax=void 0,this.H1t||(this.v4t(),this.H1t=!0),this.K1t&&(this.K1t=!1,this.vXt.c1t()),this.x1t.style.display="block",this.q1t.fn(Zt.Rw,this.w4t),this.H1t=!0},this.g4t=()=>{const t=this.Mf,i=this.ct,e=t/i;(0===this.p4t&&e>=.25?(this.Q1t(Ln.CQt),this.p4t=1):1===this.p4t&&e>=.5?(this.Q1t(Ln.OQt),this.p4t=2):2===this.p4t&&e>=.75&&(this.Q1t(Ln.xQt),this.p4t=3),this.h4t(t,i),this.D4t(),this.x$=t,this.lQt)&&(-1!==this.lQt.pQt&&this.lQt.pQt<this.lQt.ct&&(null!=this.bWt||(this.bWt=this.e4t()),this.Mf<this.lQt.pQt?this.bWt.WVt(this.lQt.pQt-this.Mf):this.bWt.qVt()))},this.f4t=()=>{var t,i;this.Ax=void 0,this.q1t.fn(ut.ha,this.f4t),this.K1t=!0,null==(t=this.xz)||t.uFt(tr.nFt),this.H1t=!1,this.q1t.be();const e=(null==(i=this.q1t.bt)?void 0:i.src)||"";this.G1t(e)},this.c4t=()=>{this.Ds(new Dr(this.Mf,void 0))},this.d4t=()=>{this.Ds(new os(this.ct))},this.l4t=()=>{this.Ds(new Tc(this.Mf,this.c_))},this.r4t=()=>{this.vXt.m_()},this.s4t=()=>{this.Z1t&&(this.Q1t(Ln.IQt),this.oqt.Co(new fe(this.Z1t,this.Mf/this.ct)),this.i4t(!1))},this.x1t.className="theoplayer-ad-linear",this.x1t.style.zIndex="10",ca(this.x1t),this.q1t.be(),this.y4t=!1}},y0=class t extends Bo{get we(){return this.Us}XVt(){this.we.addEventListener("mouseup",this.ZVt),this.we.addEventListener("touchend",this.ZVt),this.we.addEventListener("mousedown",this.S4t)}HVt(){this.we.removeEventListener("mouseup",this.ZVt),this.we.removeEventListener("touchend",this.ZVt),this.we.removeEventListener("mousedown",this.S4t)}static cr(){const t=h.createElement("div");return t.className="theoplayer-ad-nonlinear-close",t.style.position="absolute",t.style.right="0",t.style.top="0",t.style.cursor="pointer",t.style.fontSize="1.7em",t.style.lineHeight="0.75em",t}gn(){this.HVt(),hs(this.Us)}constructor(){super(),this.ZVt=t=>{this.Co(new Yi("Vm")),this.S4t(t)},this.S4t=t=>{t.stopPropagation()},this.Us=t.cr(),this.XVt()}},M0=class extends vl{get I4t(){return this.E4t}get b4t(){return this.hu}O1t(){super.O1t(),this.x1t&&O(this.x1t)}async u4t(t,i,e){this.hVt&&this.t4t(),this.E4t=t,this.hVt=t.KRt,0!==this.hVt.sUt.length&&this.P1t(this.hVt.sUt),this.xz=i,0!==this.hVt.iUt.length&&(this.R1t(this.hVt.iUt[0].dUt),this.x1t.addEventListener("error",this.L4t),this.x1t.addEventListener("load",this.k4t),await this.o4t(),this.C4t())}QYt(){var t;if(void 0!==this.x4t)return;const i=null==(t=this.hVt)?void 0:t.iUt[0];i&&i.Xl&&-1!==i.Xl.pQt&&(this.Q1t(Ln.IQt),this.oqt.Co(new fe(this.E4t,0)),this.O4t())}v4t(){void 0!==this.E4t&&this.oqt.Co(new Re(this.E4t,this.vXt.Mf))}y_(){this.t4t(),this.E4t=void 0,this.hVt=void 0}t4t(){this.j4t(),void 0!==this.E4t&&(this.E4t.$Gt(),this.oqt.Co(new vo(this.E4t,this.vXt.Mf))),this.O1t(),this.z4t(),void 0!==this.x4t&&(c(this.x4t),this.x4t=void 0)}j4t(){this.x1t.removeEventListener("load",this.k4t),this.x1t.removeEventListener("error",this.L4t)}async o4t(){const t=h.createElement("div");t.className="theoplayer-ad-nonlinear-content",t.style.position="relative",t.style.display="inline-block";const i=this.hVt.iUt[0],e=h.createElement("a");if(i.dUt.GUt&&(e.href=i.dUt.GUt,e.target="Du",e.setAttribute("rel","noopener")),i.oUt){const t=i.oUt,s=h.createElement("iframe");s.src=t.JQt,e.appendChild(s)}else if(i.rUt){const t=i.rUt,s=h.createElement("img");s.src=t.JQt,e.appendChild(s)}else if(i.uUt){const t=i.uUt,s=h.createElement("iframe");s.src=t.JQt,e.appendChild(s)}i.vUt(),e.addEventListener("mousedown",this.F1t),e.addEventListener("touchend",this.F1t),this.x1t.firstChild&&(O(this.x1t),this.t4t()),t.appendChild(e),this.x1t.appendChild(t),this.ge()}C4t(){var t;if(!this.hVt)return;const i=null==(t=this.hVt.iUt[0].Xl)?void 0:t.pQt;void 0!==i&&-1!==i&&(this.x4t=Qr.setTimeout(this.P4t,1e3*i))}z4t(){this.hu&&(this.hu.fn("Vm",this.B4t),this.hu.gn()),this.hu=void 0}get R4t(){return this.vXt.U4t()}constructor(t,i,e){super(t,i),this.k4t=()=>{this.j4t(),this.Q1t(Ln.UQt),this.V1t()},this.L4t=t=>{var i,e;this.j4t(),null==(i=this.xz)||i.uFt(tr.hFt);const s=null==(e=this.hVt)?void 0:e.iUt[0];var n,r;const h=null!=(r=null!=(n=null==s?void 0:s.oUt)?n:null==s?void 0:s.rUt)?r:null==s?void 0:s.uUt;var o;this.G1t(null!=(o=null==h?void 0:h.JQt)?o:"")},this.O4t=()=>{this.be(),O(this.x1t),this.V1t(),this.E4t=void 0,this.hVt=void 0},this.P4t=()=>{this.hu||(this.x4t=void 0,this.hu=new y0,this.x1t.children[0].appendChild(this.hu.we),this.hu.yn("Vm",this.B4t))},this.B4t=()=>{this.Q1t(Ln.IQt),this.QYt()},this.x1t.className="theoplayer-ad-nonlinear",this.x1t.style.position="absolute",this.x1t.style.width="100%",this.x1t.style.bottom="3em",this.x1t.style.zIndex="10",this.x1t.style.textAlign="center",this.vXt=e}},T0=class{static async Q4t(t,i,e){let s=[],n=t.shift();for(;n;){try{const t=await(new Sc).TFt(n,i);s=s.concat(t)}catch(t){0;const i=gn.lqt(t,n.sources.src);e.Co(i)}n=t.shift()}return s}},ll=class extends Ao{fa(){return new N0}constructor(){super("Rrt")}},N0=class extends Yi{constructor(){super("statechange")}};!function(t){t.IDLE="idle",t.LOADING="loading",t.DONE="done",t.ERROR="error",t.EVICTED="evicted"}(su||(su={}));var D0=class{get Gu(){return this.Xu}get U(){return this.Xu.length}get va(){return this.Xa||(this.Xa=this.fa()),this.Xa}cg(t){return this.Xu[t]}MT(t){this.Xu.push(t),this.Xa&&this.Xa.push(t.va),this.F4t(t)}Y4t(t){for(const i of t)this.MT(i)}G4t(t,i){i>=0&&i<=this.Xu.length&&(this.Xu.splice(i,0,t),this.Xa&&this.Xa.splice(i,0,t.va),this.F4t(t))}NT(t){return ae(this.Xu,t)}TT(t){this.V4t(this.Xu.indexOf(t))}V4t(t){if(!(t>=0&&t<this.Xu.length))return;const i=this.Xu[t];si(this.Xu,t),this.Xa&&si(this.Xa,t),this.W4t(i)}Ub(){const t=this.Xu.slice();No(this.Xu),this.Xa&&No(this.Xa);for(const i of t)this.W4t(i)}constructor(){this.Xu=[],this.Xa=void 0}},S0=class extends D0{fa(){return function(t){const i=function(t){const i=t.Gu.map((t=>t.va));return i.item=i=>{const e=0|i,s=t.cg(e);return s&&s.va||void 0},i}(t),e=new ka(t,i);return i.addEventListener=(t,i)=>{e.yn(t,i)},i.removeEventListener=(t,i)=>{e.fn(t,i)},i}(this)}yn(t,i){this.H4t.yn(t,i)}sf(t){this.H4t.sf(t)}Vo(){this.H4t.Vo()}Co(t){this.H4t.Co(t)}fn(t,i){this.H4t.fn(t,i)}uf(t){this.H4t.uf(t)}cf(t){this.H4t.cf(t)}df(t,i){return this.H4t.df(t,i)}constructor(...t){super(...t),this.H4t=new Ut,this.Ds=t=>{this.Co(t)}}};var I0,E0=class extends Yi{constructor(t){super("addtask"),this.task=t}},b0=class extends Ao{fa(){return new E0(this.q4t.va)}constructor(t){super("X4t"),this.q4t=t}},L0=class extends Yi{constructor(t){super("removetask"),this.task=t}},k0=class extends Ao{fa(){return new L0(this.task.va)}constructor(t){super("Z4t"),this.task=t}},C0=class extends S0{F4t(t){this.Co(new b0(t))}W4t(t){this.Co(new k0(t))}constructor(){super()}};!function(t){t.UNINITIALISED="uninitialised",t.INITIALISED="initialised"}(I0||(I0={}));var ul=class extends Bo{async v_(){await this.K4t(),this.iht("initialised")}async K4t(){try{await this.J4t()}catch(t){0}}async J4t(){const t=await this.Ryt.jet();for(const i of t){const t=this.t2t.$4t(i.id,i.sourceDescription,i.parameters,this.i2t);this.e2t(t),this.vx.MT(t),await t.s2t}}get SS(){return this.tht}iht(t){this.tht=t,this.Co(new ll)}get n2t(){return this.vx}$4t(t,i,e){void 0===e&&(e="persistent");const s=this.t2t.r2t(t,i,e);return this.h2t(s,e),this.vx.MT(s),this.e2t(s),s}async h2t(t,i){try{await this.o2t(t,i)}catch(t){throw g("Unable to persist task - "+t)}}async o2t(t,i){await this.Ryt.Cet({key:t.o,id:t.o,sourceDescription:t.yc,parameters:t.rS},i)}e2t(t){t.yn("Rrt",(()=>{t.SS===su.EVICTED&&this.vx.TT(t)}))}constructor(t,i,e){super(),this.tht="uninitialised",this.vx=new C0,this.t2t=i,this.i2t=e,this.Ryt=t,this.v_()}};var Ma=class{get mB(){return this.a2t}get u2t(){return this.c2t}get d2t(){return this.l2t.mB}get f2t(){let t=0,i=0;return this.yT.forEach((e=>{t+=e.timeRanges.mB,i+=e.totalQualityDurationToCache})),0===i?0:_.min(1,t/i)}get l2t(){return this._2t}eN(t){return!!Dh(this.yT,t.yT)&&(!!jd(this.c2t,t.c2t)&&(!!jd(this.mB,t.mB)&&(!!jd(this.d2t,t.d2t)&&this.l2t.fB(t.l2t))))}constructor(t,i,e){if(this.c2t=t,this.yT=i,this.a2t=e,0===this.yT.size)this._2t=ce.MB();else{let t=new ce([-1/0,1/0]);this.yT.forEach((i=>{t=t.Sn(i.timeRanges)})),this._2t=t}}};Ma.QUALITY_TIME_RANGES_NULL_OBJECT=Cn(),Ma.CACHE_PROGRESSION_NULL_OBJECT=new Ma(0,Ma.QUALITY_TIME_RANGES_NULL_OBJECT,NaN),Ma.g2t=Ma.CACHE_PROGRESSION_NULL_OBJECT;var x0=class extends Yi{constructor(){super("progress")}},O0=class extends Ao{fa(){return new x0}constructor(){super("Fqt")}};var j0,ra=class extends Jo{get name(){return"w2t"}constructor(t,i){super(t,i)}};async function z0(t,i,e){const s=[];for(const n of t.twt)s.push(P0(n,i,e));return{A2t:await Promise.all(s)}}async function P0(t,i,e){const s=[];for(const n of t.Pnt)B0(n)||s.push(Q0(n,i,e));return{Z:await Promise.all(s),Rg:t.Rg}}function B0(t){return t.Wnt.every(U0)}!function(t){t[t.kA=0]="kA",t[t.CA=1]="CA"}(j0||(j0={}));var R0=1;function U0(t){return t.$wt!==R0&&Boolean(t.$wt)}async function Q0(t,i,e){const s=[];for(const i of t.Wnt)U0(i)||s.push(F0(i,e));const n=await Promise.all(s),r=t.cst[0],h=t.dst,o=h?function(t,i){const e=[],s=function(t){return t?It(t,"avc")?Dt.VIDEO_H264:It(t,"hev")||It(t,"hvc")||It(t,"hvt")||It(t,"lhv")||It(t,"lhe")||It(t,"lht")?Dt.VIDEO_H265:It(t,"mp4")?Dt.VIDEO_MP4:It(t,"mpeg2")?Dt.VIDEO_MPEG2:It(t,"mpeg")?Dt.VIDEO_MPEG:Dt.VIDEO_UNKNOWN:Dt.VIDEO_UNKNOWN}(t);for(const t of i){const i=t.lst.split(":").pop(),n=t.Owt;e.push({mimeType:s,uuid:i,data:n})}const n=j0.kA,r=nr;return{type:n,schemeType:r,schemeDatas:e}}(r,h):void 0,a=ZV(t,i,!0);return{Ng:n,gs:t.C6,Rg:t.Rg,Yz:o,Cgt:a}}async function F0(t,i){const e=await async function(t,i){const e=[],s=t.ent;t.Wut&&e.push({RT:0,ct:0,v2t:t.Wut});const n=s.Mvt();let r=n;for(;r;){if(t.zat(r)){const s=await t.Bat(r,i,(new er).Hd);for(let i=0;i<s.U;i++)e.push(Y0(s.Uat(i),t))}else e.push(Y0(r,t));r=s.Fat(r)}const h=s.Svt(),o=h.UT-n.RT;return{ct:o,Vet:e}}(t,i),s={o:G0(t),XM:e,cz:t.cz,$tt:t.$tt,Ti:t.Ti,Rg:t.Rg,ji:t.ji};switch(t.Rg){case f.Ru:break;case f.Am:var n,r;s.Ict=null!=(r=null==(n=t.Ict)?void 0:n.fN())?r:NaN;break;case f.vm:s.audioSamplingRate=t.Zwt}return s}function Y0(t,i){return{RT:t.RT,ct:t.ct,v2t:i.Vat(t)}}function G0(t){return t.bat.Cn+"-"+(""+t.o)}function V0(t,i){const e=function(t){const i=function(t){const i=Cn();for(const e of t){let t=i.get(e.cSt);t||(t={Rg:e.Rg,jp:[]},i.set(e.cSt,t)),t.jp.push(e)}return i}(t),e=Y();return i.forEach((t=>{for(const i of t.jp){let s=e.get(t.Rg);s||(s=Cn(),e.set(t.Rg,s));let n=s.get(i.l);n||(n=[],s.set(i.l,n)),n.push(i)}})),e}(t);return function(t,i){const e=Y();return t.forEach(((t,s)=>{const n=Cn();t.forEach(((t,e)=>{const r=[];for(const e of t){const t=W0(e,s,i);r.push(t)}n.set(e,r)})),e.set(s,n)})),e}(e,i)}function W0(t,i,e){const s=t.cSt,n={MSt:t,iIt:[]};for(const t of e)Nq(i,s,t)&&n.iIt.push(t);return n}async function H0(t,i){const e=await i.Syt([t],{});return JH(e.yI,{},e.Eyt)}async function q0(t,i){return mH(t)?async function(t,i){const e=V0(t.jp,t.JEt),s=await async function(t,i){const e=[],s=t.entries();for(let t=s.next();!t.done;t=s.next()){const[s,n]=t.value,r=await K0(n,s,i);e.push(r)}return e}(e,i),n=await async function(t,i){const e=[];for(const o of t){var s,n;const t=await i1(o.$At,i);var r,h;t.cz=o.cz,t.$tt=o.cst?Z0(o.cst):"",t.Ti=null!=(r=null==(s=o.WSt)?void 0:s.Ti)?r:0,t.ji=null!=(h=null==(n=o.WSt)?void 0:n.ji)?h:0,e.push(t)}return{Rg:f.tT,Z:[{gs:JQ,Rg:f.tT,Ng:e}]}}(t.JEt,i);return s.push(n),{ct:X0(s),m2t:[t.$At],dwt:[{A2t:s}]}}(t,i):function(t){const i=e1(t);return{ct:i.ct,m2t:[t.$At],dwt:[{A2t:[{Rg:f.tT,Z:[{Rg:f.tT,gs:JQ,Ng:[{o:t.$At,XM:i,cz:0,$tt:"",Ti:0,Rg:f.tT,ji:0}]}]}]}]}}(t)}function X0(t){let i=-1/0;for(const e of t)for(const t of e.Z)i=_.max(i,...t.Ng.map((t=>t.XM.ct)));return i}function Z0(t){return[t.FSt,t.YSt,t.cEt].filter(Dd).join(",")}async function K0(t,i,e){const s=[],n=t.entries();for(let t=n.next();!t.done;t=n.next()){const[,i]=t.value,n=await J0(i,e);s.push(n)}return{Rg:$0(i),Z:s}}async function J0(t,i){const e=[],s=t[0].MSt;for(const s of t){const t=await t1(s,i);e.push(t)}return{gs:s.gs||JQ,Rg:$0(s.Rg),Ng:e}}function $0(t){switch(t){case ke.vm:return f.vm;case ke.Am:return f.Am;case ke.pm:case ke.fEt:return f.Ru;default:return f.tT}}function t1(t,i){const e=function(t){const i=t.MSt.$At,e=t.iIt.map((t=>t.$At));return i||(e.length?e[0]:void 0)}(t);return i1(e,i)}async function i1(t,i){let e={ct:0,Vet:[]};if(t){const s=await H0(t,i);fc(s)&&(e=e1(s))}return{o:t||"default",p2t:t,XM:e,cz:0,$tt:"",Ti:0,Rg:f.tT,ji:0}}function e1(t){const i=[];let e,s=0;for(const n of t.Vet){const t=s;!n.ebt||void 0!==e&&yH(n.ebt.$At,e)||(i.push(s1(n.ebt,t)),e=n.ebt.$At),i.push(n1(n,t)),s+=n.ct}return{ct:s,Vet:i}}function s1(t,i){return{RT:i,ct:0,v2t:r1(t.$At)}}function n1(t,i){return{RT:i,ct:t.ct,v2t:r1(t.$At)}}function r1(t){return{zu:t.LM,bht:t.Lmt?[t.Lmt.Cn,t.Lmt.Cn+t.Lmt.U]:void 0,lI:!1}}var h1=class{async y2t(t){if(!t.src)throw new g("Invalid typed source");const i=t.type;if(mw(i))return await this.M2t(t);if(vw(i))return await this.T2t(t);throw new g("Unexpected source type")}async M2t(t){try{const i=await H0(t.src,this.Iyt);return await q0(i,this.Iyt)}catch(t){throw new g("Unable to fetch HLS manifest")}}async T2t(t){try{const e=new pV({Ug:i.Dh(t.src),hyt:t.liveOffset,dyt:t.timeServer,lI:t.useCredentials},this.N2t,hL.mV,this.Iyt,t.dash);return await e.W,await async function(t,i,e){const s=[];for(const n of t.dwt)s.push(z0(n,i,e));const n=await Promise.all(s);return{ct:t.QAt.Swt(),m2t:[t.Kpt],dwt:n}}(e.Tr.Yut,t.contentProtection,this.Gat)}catch(t){throw new g("Unable to fetch DASH manifest")}}constructor(t,i,e){this.Iyt=t,this.Gat=i,this.N2t=e}},o1=class{D2t(){const t=new Rs;return this.S2t.push(t),this.I2t(),t.Vb}async E2t(t,i){try{await t}finally{this.b2t-=1,this.I2t(),0===this.S2t.length&&0===this.b2t&&i.Qb(!0)}}I2t(){if(this.S2t.length>0&&this.b2t<this.L2t){this.S2t.shift().Qb(),this.b2t+=1}}constructor(t){this.S2t=[],this.b2t=0,this.L2t=t}};var a1=class extends Bo{get s2t(){return this.v_()}async v_(){const t=new h1(this.Iyt,this.Gat,this.N2t);this.k2t=await t.y2t(this.C2t);const i=function(t,i){if(Qs(t)){if(It(t,"%"))return C(t)/100*i;throw new g("Unexpected - Invalid string supplied as amount to cache.")}return i<t?i:t}(this.Uyt.rS.amount,this.k2t.ct);let e;this.a2t=i;const s=Wi(this.k2t.m2t[0]),n=(await this.Get.Wet.Pet(s,"manifestURL")).filter((t=>ae(t.references,this.Uyt.o))),r=[],h=this.Uyt.rS.bandwidth;for(const t of this.k2t.dwt)for(const i of t.A2t)for(const t of c1(i,this.Uyt.rS.preferredTrackSelection))for(const i of l1(t.Ng,h))r.push(i);this.x2t=_.ceil(r.map((t=>t.cz*function(t,i){let e=0;for(const s of t.XM.Vet.map((t=>t.ct)))if(e+=s,e>=i)return e;return e}(t,i)/8)).reduce(((t,i)=>t+i),0));const o=Cn();if(n&&0!==n.length){const t=n.reduce(((t,i)=>t+i.byteSize),0);for(const t of n){const i=t.qualityId,e=new ce(t.startsAndEnds);if(o.has(i))o.get(i).timeRanges=o.get(i).timeRanges.rB(e).nB(5e-4);else{const t=Po(r,(t=>t.o===i));var a;const s=_.min(this.a2t,null!=(a=null==t?void 0:t.XM.ct)?a:1/0);o.set(i,{timeRanges:e,totalQualityDurationToCache:s})}}e=new Ma(t,o,this.a2t)}else{for(const t of r)o.set(t.o,{timeRanges:ce.MB(),totalQualityDurationToCache:_.min(t.XM.ct,this.a2t)});e=new Ma(0,o,this.a2t)}this.O2t=e}get j2t(){return this.x2t}get O2t(){return this.z2t}set O2t(t){this.z2t.eN(t)||(this.z2t=t,t.eN(Ma.g2t)||this.Co(new O0))}async pi(t){await this.bo,await this.P2t(this.k2t,t)}async P2t(t,i){if(!t.m2t)throw new g("Unexpected - manifest is missing locations");await this.B2t();const e=[];for(const s of t.dwt)e.push(this.R2t(s,t.m2t[0],i));return Pl(e)}async B2t(){const t=await this.U2t.jet();for(const i of t){const t=await this.Get.Het.Pb(i.key);if(t)await u1(t,this.Uyt.o,this.Get.Het,this.i2t);else try{await this.Get.Het.Cet(i,this.i2t)}catch(t){throw new ra("Unable to store manifest with url: "+i.locationURL,t)}}await this.U2t.Ret()}R2t(t,i,e){const s=[];for(const n of t.A2t){const t=c1(n,this.Uyt.rS.preferredTrackSelection);for(const n of t)s.push(this.Q2t(n,i,e))}return Pl(s)}async Q2t(t,i,e){const s=this.Uyt.rS.bandwidth,n=l1(t.Ng,s);t.Rg===f.Am&&t.Cgt&&t.Cgt.LO.widevine&&"persistent"===t.Cgt.LO.widevine.licenseType&&(await this.F2t(t.Cgt),fo(e));const r=[];for(const t of n)r.push(this.Y2t(t,i,e));return Pl(r)}async Y2t(t,i,e){fo(e);const s=t.XM.Vet[0].RT+this.a2t,n=[];let r=!1;for(const h of t.XM.Vet){if(h.RT>=s||this.stopIfFailed(r))break;await this.G2t(e),await this.V2t.D2t(),n.push(this.V2t.E2t(this.W2t(h,t,i),this.H2t).catch((t=>(r=!0,Promise.reject(t)))))}return Pl(n)}async G2t(t){if(null==t?void 0:t.Bd)throw await this.H2t.Vb,new is}async q2t(){return await this.bo.catch(qo),this.k2t}F2t(t){return Promise.resolve()}X2t(){return i.IA("License renewal unsupported in this SDK."),Promise.resolve()}async W2t(t,i,e){const s=this.Get.Wet,n=La(t.v2t.zu,t.v2t.bht),r=await s.Pb(n);if(r)await u1(r,this.Uyt.o,s,this.i2t),this.Z2t(r,!1);else try{const s=await this.K2t(t.v2t),{segmentMetadataEntry:n,segmentEntry:r}=this.J2t(t,i,e,s);await this.Get.Yet((async t=>{await t.Wet.Cet(n,this.i2t),await t.Vet.Cet(r,this.i2t)})),this.Z2t(n,!0)}catch(i){throw new ra("Unable to store segment with url: "+t.v2t.zu,i)}}async K2t(t){const i=await this.Rot.Tht(t,{kht:this.DEFAULT_CACHING_SEGMENT_TIMEOUT,uI:this.DEFAULT_CACHING_SEGMENT_CONNECTION_TIMEOUT});return await this.Uot(i)}async Uot(t){return{buffer:await t.nj()}}J2t(t,i,e,s){const n=La(t.v2t.zu,t.v2t.bht),r=t.RT,h=t.ct,o=this.$2t(s);return{segmentMetadataEntry:{key:n,segmentURLsegmentByteRange:n,manifestURL:Wi(e),qualityId:i.o,byteSize:o,startsAndEnds:new ce([r,r+h]).HP,references:[this.Uyt.o]},segmentEntry:{key:n,segmentURLsegmentByteRange:n,manifestURL:Wi(e),data:s,references:[this.Uyt.o]}}}$2t(t){return t.buffer.byteLength}Z2t(t,i){const e=t.qualityId,s=this.z2t,n=s.yT;n.get(e).timeRanges=n.get(e).timeRanges.rB(new ce(t.startsAndEnds)).nB(5e-4),this.O2t=new Ma(i?s.u2t+t.byteSize:s.u2t,n,this.a2t)}stopIfFailed(t){return!1}constructor(t,i,e,s,n,r,h,o){super(),this.DEFAULT_CACHING_SEGMENT_TIMEOUT=3e4,this.DEFAULT_CACHING_SEGMENT_CONNECTION_TIMEOUT=0,this.H2t=new Rs,this.z2t=Ma.g2t,this.Uyt=t,this.Get=i,this.Iyt=e,this.U2t=s,this.Rot=n,this.Gat=r,this.N2t=o,this.i2t=h,this.x2t=-1;const a=this.Uyt.yc.sources[0];this.C2t=a,this.bo=this.v_(),this.V2t=new o1(this.Uyt.rS.parallelTasksThreshold)}};async function u1(t,i,e,s){ae(t.references,i)||(t.references.push(i),await e.Cet(t,s))}function c1(t,i){switch(t.Rg){case f.vm:return d1(t.Z,i.audioTrackSelection);case f.Ru:return d1(t.Z,i.textTrackSelection);default:return d1(t.Z,[])}}function d1(t,i){if(0===i.length)return t.length?[t[0]]:[];const e=[];for(const s of t)i.indexOf(s.gs)>-1&&e.push(s);return e}function l1(t,i){if(!t.length)return[];const e=[...t].sort(sQ),s=e.filter((t=>t.cz<=i));return s.length>0?[s.pop()]:[e.shift()]}var f1=class{async t3t(){await this.Get.Yet((async t=>{await this.i3t(t),await this.e3t(t),await this.s3t(t),await this.n3t(t)}))}async i3t(t){const i=t.qet,e=this.Uyt.o;await i.TT(e)}async e3t(t){const i=t.Wet,e=t.Vet,s=this.Uyt.yc.sources[0];if(!Dw(s))return;const n=Wi(s.src),r=(await i.Pet(n,"manifestURL")).filter((t=>ae(t.references,this.Uyt.o)));for(const t of r)_s(t.references,this.Uyt.o),0===t.references.length?(await i.TT(t.key),await e.TT(t.key)):await i.Cet(t)}async s3t(t){const i=t.Het,e=this.r3t(),s=(await i.Tet(e)).filter((t=>ae(t.references,this.Uyt.o)));for(const t of s)_s(t.references,this.Uyt.o),0===t.references.length?await i.TT(t.key):await i.Cet(t)}r3t(){if(!this.k2t)return[];const t=this.Uyt.yc.sources[0];if(!Dw(t))return[];const i=Wi(t.src),e=function(t){if(!t)return[];const i=[];for(const e of t.dwt)for(const t of e.A2t)for(const e of t.Z)for(const t of e.Ng)t.p2t&&i.push(t.p2t);return function(t){return t.reduce(((t,i)=>(t.indexOf(i)<0&&t.push(i),t)),[])}(i)}(this.k2t).map((t=>({src:t}))).map((t=>Wi(t.src)));return[i,...e]}async n3t(t){const i=t.Xet,e=(await i.jet()).filter((t=>ae(t.references,this.Uyt.o)));for(const t of e)_s(t.references,this.Uyt.o),0===t.references.length?(await i.TT(t.key),this.h3t(t)):await i.Cet(t)}h3t(t){}constructor(t,i,e){this.Uyt=t,this.Get=i,this.k2t=e}},_1=new class{J8(t,i,e){return new f1(t,i,e)}};var g1=class{get va(){return this.Xa||(this.Xa=function(t){return{renew(i){t.o3t(i)}}}(this)),this.Xa}o3t(t){this.a3t(t)}async a3t(t){try{await this.u3t.X2t(t)}catch(t){0,this.wit.iht(su.ERROR)}}constructor(t,i){this.wit=t,this.u3t=i}},w1=class extends Ut{get s2t(){return this.u3t.s2t}get va(){return this.Xa||(this.Xa=function(t){let i,e={get id(){return t.o},get status(){return t.SS},get source(){return t.yc},get parameters(){return t.rS},get duration(){return t.ct},get cached(){return t.c3t.ks()},get secondsCached(){return t.d3t},get percentageCached(){return t.l3t},get bytes(){return t.f3t},get bytesCached(){return t._3t},get license(){return t.kF.va},start(){t.Cn()},pause(){t.m_()},remove(){t.TT()},addEventListener(t,e){i.yn(t,e)},removeEventListener(t,e){i.fn(t,e)}};return i=new qh(t,["Fqt","Rrt"],e),e}(this)),this.Xa}get o(){return this.IT}get kF(){return this.g3t}get SS(){return this.tht}iht(t){this.tht!==t&&(this.tht=t,this.Co(new ll))}get yc(){return this.bc}get rS(){return this.w3t}get ct(){return this.u3t.O2t.mB}get c3t(){return this.u3t.O2t.l2t}get d3t(){return this.u3t.O2t.d2t}get l3t(){return this.u3t.O2t.f2t}get f3t(){return this.u3t.j2t}get _3t(){return this.u3t.O2t.u2t}Cn(){this.tht===su.EVICTED||this.tht===su.DONE||this.A3t()}async A3t(){try{this.iht(su.LOADING);const t=new er;this.v3t=t,await this.u3t.pi(t.Hd),this.iht(su.DONE)}catch(t){Mi(t)?this.iht(su.IDLE):this.iht(su.ERROR)}finally{this.v3t.Qd()}}m_(){this.v3t.Xd()}TT(){this.SS===su.LOADING?(this.yn("Rrt",this.evictOnLoading),this.m_()):this.m3t()}async m3t(){try{const t=await this.u3t.q2t();await _1.J8(this,this.Get,t).t3t(),this.u3t.O2t=Ma.g2t,this.iht(su.EVICTED)}catch(t){0,this.iht(su.ERROR)}}constructor(t,i,e,s,n,r){super(),this.v3t=new er,this.evictOnLoading=()=>{this.fn("Rrt",this.evictOnLoading),this.m3t()},this.IT=t,this.bc=i,this.w3t=e,this.Get=s,this.u3t=n.J8(this,this.Get,r),this.g3t=new g1(this,this.u3t),this.tht=1===this.u3t.O2t.f2t?su.DONE:su.IDLE,this.u3t.yn("Fqt",(t=>{this.Ds(t),1===this.l3t&&this.iht(su.DONE)}));const h=new Date,o=this.w3t.expirationDate.getTime()-h.getTime();(function(t){return t<2147483647})(o)&&u((()=>this.m3t()),o)}};var A1=class{r2t(t,i,e){const s=ar();return this.$4t(s,t,i,e)}$4t(t,i,e,s){return new w1(t,i,e,this.Get,this.p3t,s)}constructor(t,i){this.Get=t,this.p3t=i}},v1=30,m1=5;function p1(t){if(!t)throw new g("Unexpected - The cache parameters are undefined");const i=function(t){if(Qs(t)&&!It(t,"%"))return x(t);return t}(t.amount);!function(t){if(function(t){return Qs(t)&&It(t,"%")}(t)){const i=C(t);if(S(i)||i<0||i>100)throw new g("The amount as percentage must be between 0 and 100 percent.")}if(!Qs(t)&&S(t))throw new g("The amount must be a number or a string")}(i);const e=function(t){if(!t)return function(){const t=new Date;return t.setMinutes(t.getMinutes()+v1),t}();return t}(t.expirationDate);!function(t){if(t&&!function(t){return!t||Ed(t)&&t>new Date}(t))throw new g("Invalid expiration date for the cache parameters")}(e);const s=function(t){if(void 0===t)return 1/0;return t}(t.bandwidth);!function(t){if(S(t)||t<0)throw new g("The bandwidth must be between zero and infinity.")}(s);const n=function(t){if(!t)return m1;if(S(t))throw new g("The amount must be a number");return t}(t.numberOfParallelTasks);return{amount:i,expirationDate:e,bandwidth:s,parallelTasksThreshold:n,preferredTrackSelection:{audioTrackSelection:[],textTrackSelection:[]}}}var y1=class{set C1t(t){this.y3t=t,this.M3t=0,this.T3t=0,this.N3t=void 0}get C1t(){return this.y3t}$Zt(){if(!this.y3t)return;const t=this.y3t.VGt;for(;this.M3t<t.length;){const i=t[this.M3t];for(void 0===this.N3t&&(this.N3t=yJ(i),this.T3t=0);this.T3t<this.N3t.length;){const t=this.N3t[this.T3t];if(this.T3t++,void 0!==t.ZRt)return t.ZRt}this.M3t++,this.N3t=void 0}}tr(){for(this.C1t=void 0,this.Ax.Xd(),this.Ax=new er;this.D3t.length;)this._1t()}S3t(t){return new ul(this.Get.qet,t,"temporary")}async Dzt(t){const i=g0(t.AQt,this.TH.ads.allowedMimeTypes);if(!i.length)return;const e=await so.yb.zP(i,Ms({sources:i}));if(!e.t.NP())return;this.u3t||(this.u3t=new this.p3t(this.mI));const s=this.Get,n=new A1(s,this.u3t),r=this.S3t(n).$4t(Ms({sources:e.yc}),p1({amount:10,bandwidth:xu.yb.Kj()||this.CB.NW}),"temporary");this.D3t.push(r);const h=this.u3t.J8(r,s,"temporary");this.Ax.Xd(),this.Ax=new er,h.pi(this.Ax.Hd).then(qo),this.I3t(h,t)}constructor(t,i,e,s){this.D3t=[],this.M3t=0,this.T3t=0,this.d1t=async()=>{const t=this.$Zt();t&&await this.Dzt(t)},this._1t=()=>{const t=this.D3t.shift();null==t||t.TT()},this.I3t=async(t,i)=>{let e=!1;for(;!e;)await t.df("Fqt"),e=1===t.O2t.f2t;i.ct<5&&this.d1t()},this.TH=t,this.mI=i,this.Ax=new er,this.p3t=e,this.CB=s,this.Get=new Gr}},M1={key:"",segmentURLsegmentByteRange:"",manifestURL:"",qualityId:"",byteSize:0,startsAndEnds:new ce([0,0]).HP,references:[]},T1={key:"",segmentURLsegmentByteRange:"",manifestURL:"",data:""},N1=class t extends dQ{async aut(t,i,e,s){try{return await super.aut(t,i,e,s)}catch(t){Kc(t)}const n=await this.E3t.aut(t,i,e,s);return await this.b3t(t,i,n),n}async b3t(i,e,s){if(void 0===this.L3t)return;const n=this.Get.Wet,r=La(i,e),h=await n.Pb(r);if(h)await u1(h,this.L3t,n,this.i2t);else try{const i={buffer:s},{segmentMetadataEntry:e,segmentEntry:n}=t.J2t(r,i,this.L3t);await this.Get.Yet((async t=>{await t.Wet.Cet(e,this.i2t),await t.Vet.Cet(n,this.i2t)}))}catch(t){throw new ra("Unable to store segment with url: "+i,t)}}static J2t(t,i,e){return{segmentMetadataEntry:Tt({},M1,{key:t,segmentURLsegmentByteRange:t,references:[e]}),segmentEntry:Tt({},T1,{key:t,segmentURLsegmentByteRange:t,data:i,references:[e]})}}constructor(t,i,e,s,n){super(t),this.E3t=new cQ(i),this.Get=e,this.L3t=s,this.i2t=n}};var D1,S1=class{J8(t,i,e){void 0===e&&(e="persistent");const s=t.yc.sources[0];if(Mw(s))throw new g("Caching THEOlive sources is not supported");const n=Boolean(s.useCredentials),r=new mU(this.mI,Ws.tT),h=new xV(this.mI,n),o=new zi(i.Het,i.Wet,i.Vet,i.Xet),a=function(t,i,e,s,n){return new N1(i,t,e,s,n)}(this.mI,o,i,t.o,e),u=new HR,c=new BV(PV(h,o),u,t);return this.k3t(t,i,c,u,r,a,e)}constructor(t){this.mI=t}},I1=class extends S1{k3t(t,i,e,s,n,r,h){return new a1(t,i,e,s,n,r,h,KR())}},E1=I1;!function(t){t[t.NOT_INITIALISED=0]="NOT_INITIALISED",t[t.C3t=1]="C3t",t[t.x3t=2]="x3t",t[t.Rw=3]="Rw",t[t.Qw=4]="Qw",t[t.O3t=5]="O3t"}(D1||(D1={}));var b1=class t extends fn{get rqt(){return this}static get sqt(){return Gt.cVt}get sqt(){return t.sqt}w0t(t,i,e){i===Ki.B7&&this.T2?Ys(this.KZt([t])):this.j3t.push(t)}Tf(){return this.z3t.W1t?this.z3t.Mf:this.r7()}Nf(t){}Td(){return this.z3t.ct}If(){return this.z3t.Sf}Ef(){}Lf(){}Bf(){return this.z3t.Pf}Rf(t){this.Pf!==t&&(this.z3t.Pf=t,this.Co(new Tc(this.Mf,this.c_)))}Yf(){return this.z3t.Ff}$f(){return this.z3t.Jf}i_(){return ce.MB().ks()}h_(){return this.z3t.r_}u_(){return this.z3t.a_}d_(){return this.z3t.c_}l_(t){this.c_!==t&&(this.z3t.c_=t,this.Co(new Tc(this.Mf,this.c_)))}async p_(){if(this.P3t)return;this.Co(new Qn(this.Mf)),this.B3t(),this.j3t.length&&(this.P3t=this.KZt(this.j3t),await this.P3t,this.P3t=void 0),await this.R3t.M1t(this.Qo.Tf());const t=this.U3t;4!==t&&1!==t&&5!==t||(!this.wVt&&this.Q3t.length?this.F3t():this.wVt?(this.Y3t=!0,this.z3t.p_()):(this.LHt(),this.Qo.p_()),this.U3t=3)}m_(){3===this.U3t&&(this.z3t.m_(),this.U3t=4)}c1t(){this.R3t.c1t()}Cn(){this.U3t=1,this.R3t.Cn()}async y_(){this.R3t&&(this.R3t.jn(),this.G3t(!1),this.M4t.y_(),this.U3t=5,this.wVt&&(this.R3t.k1t(this.wVt.bFt),this.wVt=void 0)),this.T2=!1,this.Y3t=!1,No(this.Q3t),this.Aqt&&(this.LHt(),this.Qo.ge()),No(this.j3t),await this.z3t.y_(),await this.q1t.tr()}Vm(){this.z3t.QYt(),this.M4t.QYt()}v_(){this.q1t.v_(),this.B3t()}cqt(t){return!(t.type!==Co.Jg||!this.R3t||!this.R3t.m1t(-1))&&(this.R3t.A1t().then(qo),!0)}ge(){void 0!==this.z3t.X1t&&(this.q1t.ge(),this.z3t.ge()),void 0!==this.M4t.I4t&&this.M4t.ge()}be(){this.q1t.be(),this.z3t.be(),this.M4t.be()}async KZt(t){const i=await T0.Q4t(t,this.mI,this.oqt);if(!i.length){const t="Ads could not be loaded.";return this.oqt.Co(gn.lqt(new mi(Xr.ADBLOCK,no.FILE_NOT_FOUND),t)),void(this.T2&&!this.wVt&&0===this.Q3t.length&&this.V3t())}this.R3t.b1t(i),this.oqt.Co(new Uo),this.Aqt||this.Qo.Ff||this.R3t.M1t(this.Qo.Tf()),0!==this.U3t&&5!==this.U3t||this.Cn()}S1t(t){this.Q3t.push(...t);for(const i of t)this.T2&&!this.Aqt&&this.F3t()}async F3t(){if(2!==this.U3t&&!this.W3t){0,this.W3t=!0,this.U3t=2;const t=this.wVt;this.H3t(),this.wVt?(await this.wVt.bFt.h1t(this.oqt),this.q3t()||(this.W3t=!1),this.oqt.Co(new M$(this.X3t(this.wVt))),await this.Z3t()):((null==t?void 0:t.bFt.o1t())&&this.oqt.Co(new Vi(this.X3t(t))),this.W3t=!1,this.U3t=1,this.V3t())}}V3t(){this.LHt(),this.Qo.ge(),this.Qo.Sf?this.Qo.Co(new ve(this.Qo.Tf())):this.Qo.p_()}H3t(){let t;if(this.wVt&&this.q3t())t=this.wVt.bFt;else{if(0===this.Q3t.length)return;t=this.Q3t.shift()}if(!t)return;const i=t.Mc();i?this.wVt=i:(this.wVt&&(this.R3t.k1t(this.wVt.bFt),this.wVt=void 0),this.wVt=void 0)}async Z3t(){const t=this.wVt?function(t){var i,e;const s=null==(e=t.hYt)||null==(i=e.ORt)?void 0:i.jRt();return void 0===s?void 0:new pJ(s)}(this.wVt):void 0;if(t){if(!this.wVt)return;this.K3t=t,this.J3t(this.wVt.sUt),this.$3t(Ln.HQt);const i=this.K3t.Mc();this.wVt.bFt.o1t()&&(this.M4t.t4t(),1===this.wVt.bFt._ot&&this.oqt.Co(new Ko(this.X3t(this.wVt)))),await this.u4t(i)}else this.U3t=1,this.W3t=!1,this.wVt=void 0,this.F3t()}async u4t(t){if(t){var i;let s=Dd(t.ZRt),n=Dd(t.$Rt);var e;const r=null!=(e=null==(i=t.JRt)?void 0:i.TUt)?e:[],h=r.length>0,o=this.wVt,a=this.X3t(o);if(t.ZRt){if(t.ZRt.Xl=o,void 0!==o.ttt.skipOffset){const i=je.$Ft(o.ttt.skipOffset,t.ZRt.ct);i&&i<t.ZRt.ct&&(t.ZRt.pQt=i)}const i=a.WGt(t.ZRt,r,t.tUt,o.ttt);this.M4t.t4t(),this.NXt(),await this.z3t.u4t(i,t.lt,{width:this.Qo.we.offsetWidth,height:this.Qo.we.offsetHeight}),s=!0}if(t.$Rt){const i=t.$Rt.iUt[0];if(i.Xl=o,void 0!==o.ttt.skipOffset){const t=je.$Ft(o.ttt.skipOffset,this.Qo.Td());t&&(i.Xl.pQt=t)}const e=s?[]:r,h=a.HGt(i,e,t.$Rt,t.tUt,o.ttt);s&&this.z3t.N4t(),await this.M4t.u4t(h,t.lt,{width:this.Qo.we.offsetWidth,height:this.Qo.we.offsetHeight}),n=!0}if(s){this.U3t=3,this.z3t.ge();const t=0===a.qEt;this.Y3t=t,this.q1t.m_(),this.z3t.p_(),this.Qo.m_(),this.Qo.be(),this.NXt(),this.z3t.v4t()}n&&(this.U3t=3,this.M4t.ge(),this.M4t.v4t()),(s||n||h)&&this.t5t(t.HRt),s||n||await this.i5t(),!s&&n&&(this.q3t()||this.Q3t.length>0?this.F3t():(this.V3t(),this.wVt=o))}else null===t?await this.i5t():this.G3t(!0)}i5t(){const t=this.K3t;return this.u4t(t&&t.Mc())}G3t(t){this.$3t(Ln.qQt),this.e5t(),this.U3t=1;const i=void 0!==this.wVt&&this.wVt.bFt.n1t();if(this.W3t=!1,i)t&&(this.U3t=1,this.F3t());else{if(!this.Aqt)return;this.Qo.ge(),!this.Qo.Sf&&t&&this.Qo.p_(),this.LHt()}}LHt(){this.s5t(),super.LHt()}s5t(){if(this.Qo.Sf&&(this.U3t=5),this.wVt){const t=this.wVt.bFt;t.o1t()&&this.oqt.Co(new Vi(this.X3t(this.wVt))),this.R3t.k1t(t),this.wVt=void 0}}J3t(t){this.n5t=this.n5t.concat(t)}e5t(){this.n5t=[]}r5t(t){this.Qo.we.appendChild(t)}$3t(t){for(const i of this.n5t)i.yU===t&&GZ(i.eventURL)}t5t(t){this.z3t.Q1t(Ln.UQt);for(const i of t)GZ(i)}get j7(){return this.wVt?this.X3t(this.wVt):null}get x7(){return this.wVt?[this.z3t.X1t,this.M4t.I4t].filter(Dd):[]}get z7(){const t=this.Q3t.concat(this.R3t.z7.filter((t=>!t.KGt())));return xl(t,(t=>t.J0t.Oc.filter((t=>!t.KGt()))))}get P7(){return this.R3t.z7.map((t=>t.J0t))}Z7(t){const i=this.v0t();for(const e of i)Ic(e.sources,e.timeOffset)||t.Z1(e,Ki.B7,!1)}v0t(){const t=[];for(const i of this.x7.concat(this.z7))t.push(i.ttt);const i=this.Q3t.concat(this.R3t.z7.filter((t=>!t.KGt())));for(const e of i)for(const i of e.VGt)i.W||t.push(i.ttt);return t.push(...this.j3t),pl(t)}q3t(){return!!this.wVt&&yJ(this.wVt).some((t=>t.ZRt))}X3t(t){return t.bFt.J0t}U4t(){return this.h5t}A_(){return this.q1t.A_()}gf(){return this.q1t.gf()}mqt(t){this.R3t.mqt(t)}async gn(){await super.gn(),this.Qo.fn(Co.jh,this.B3t),this.oqt.VB(this.z3t.oqt),this.oqt.VB(this.M4t.oqt),this.oqt.VB(this.R3t),this.z3t.gn(),this.M4t.gn(),await this.q1t.gn()}constructor(t,i,e,s,n,r){super(t,i),this.Q3t=[],this.U3t=0,this.n5t=[],this.W3t=!1,this.T2=!1,this.Y3t=!0,this.j3t=[],this.o5t=t=>{t.type===Co.jh&&this.Y3t?this.Y3t=!1:this.Co(t)},this.B3t=()=>{this.T2=!0},this.a5t=async()=>(this.U3t=1,await this.z3t.t4t(),this.u4t(this.K3t.Mc())),this.u5t=async t=>{const i=new mi(Xr.PLAYBACK,no.GENERAL_LINEAR_ERROR,"There was a problem playing a linear ad.");return this.oqt.Co(gn.lqt(i,t)),await this.z3t.t4t(),this.u4t(this.K3t.Mc())},this.c5t=()=>(this.M4t.t4t(),this.u4t(this.K3t.Mc())),this.d5t=t=>{const i=new mi(Xr.PLAYBACK,no.GENERAL_NON_LINEAR_ERROR,"There was a problem playing a non linear ad.");return this.oqt.Co(gn.lqt(i,t)),this.M4t.t4t(),this.u4t(this.K3t.Mc())},this.mI=r,this.q1t=e,this.M4t=new M0(this.d5t,this.c5t,this),this.z3t=new p0(this.u5t,this.a5t,this.M4t,s,this,t.Iu,e),this.r5t(this.M4t.x1t),this.r5t(this.z3t.x1t);const h=new y1(s,r,I1,n);this.R3t=new l0(this.Qo,this,this.oqt,h),this.z3t.sf(this.o5t),this.M4t.sf(this.Ds),this.oqt.Qa(this.z3t.oqt),this.oqt.Qa(this.M4t.oqt),this.oqt.Qa(this.R3t),this.h5t=new Rc(this,this.Qo),this.Iu.yn(Tn.pn,this.Ds),this.Qo.yn(Co.jh,this.B3t)}};He.yb.oR(new class{get $Ht(){return b1.sqt}hR(t){return t&&("string"!=typeof t.integration||t.integration===Os.DEFAULT||t.integration===Os.CSAI||t.integration===Os.THEO)}tqt(t,i,e){const s=new YN(t.we,e,t.uO,t.q9,t.f_,t.i7,t.Ol);return new b1(t,i,s,e,t.q9,t.uO)}Z1(t,i,e,s){e.w0t(t,i,s)}DQ(t){const i=HK(t.sources);if(!i)return;const e={integration:t.integration===Os.CSAI?Os.CSAI:Os.THEO,sources:i};"vast"===e.sources.type&&void 0===t.timeOffset?t.timeOffset=0:"vmap"===e.sources.type&&void 0!==t.timeOffset&&Eo("property timeOffset will be ignored for vmap ad sources");const s=mo(t.timeOffset);void 0!==s&&(e.timeOffset=s);const n=mo(t.skipOffset);return void 0!==n&&(e.skipOffset=n),e}});var L1=class{MW(){var t;this._4||(null==(t=this.j0t)||t.initialize(),this._4=!0)}get x1t(){return this.NWt}get l5t(){return this.f5t.offsetHeight}get _5t(){return this.f5t.offsetWidth}get g5t(){return this.j0t}w5t(t){"linear"===t?this.NWt.style.marginTop="0px":"nonlinear"===t&&(this.NWt.style.marginTop="-45px")}ge(){this.NWt.style.opacity="1",this.NWt.style.pointerEvents=""}be(){this.NWt.style.opacity="0",this.NWt.style.pointerEvents="none"}Qd(){var t;null==(t=this.j0t)||t.destroy(),this.j0t=void 0}constructor(t,i){this.j0t=void 0,this._4=!1,this.s9=t;const e=h.createElement("div");e.className="theoplayer-ima-wrapper",ca(e),e.style.zIndex="10",fi.Qs&&function(t,i){t.addEventListener(i,BM)}(e,"mousedown"),i.appendChild(e);const s=h.createElement("div");s.className="theoplayer-ima",s.style.height="100%",this.f5t=s,e.appendChild(s),this.NWt=e,this.j0t=new google.ima.AdDisplayContainer(this.f5t,this.s9)}},k1=class{get aQt(){return this.A5t.getAdId()}get h$t(){const t=this.A5t.getAdPodInfo();if(void 0!==t)try{return{aKt:t.getAdPosition(),QGt:t.getMaxDuration(),v5t:t.getPodIndex(),qEt:t.getTimeOffset(),uKt:t.getTotalAds(),m5t:t.getIsBumper()}}catch(t){return}}get YRt(){return this.A5t.getAdSystem()}get p5t(){return this.A5t.getAdvertiserName()}get xUt(){var t;return null!=(t=this.A5t.getApiFramework())?t:void 0}get JRt(){return this.NUt.map((t=>({jUt:t.getAdSlotId(),Fz:t.getContentType(),Rqt:t.getContent(),Ti:t.getHeight(),ji:t.getWidth()})))}get Fz(){var t;return null!=(t=this.A5t.getContentType())?t:void 0}get _Ut(){return this.A5t.getCreativeId()}get X$t(){return this.A5t.getCreativeAdId()}get y5t(){return this.A5t.getDealId()}get Kp(){return this.A5t.getDescription()}get ct(){return this.A5t.getDuration()}get ji(){return this.A5t.getWidth()}get Ti(){return this.A5t.getHeight()}get G$t(){var t;return null!=(t=this.A5t.getMediaUrl())?t:void 0}get M5t(){return this.A5t.getMinSuggestedDuration()}get H$t(){return this.A5t.getSkipTimeOffset()}get T5t(){return this.A5t.getSurveyUrl()}get Wz(){return this.A5t.getTitle()}get V$t(){return this.A5t.getTraffickingParameters()}get W$t(){return this.A5t.getTraffickingParametersString()}get tUt(){return this.A5t.getUniversalAdIds().map((t=>({K$t:t.getAdIdRegistry(),J$t:t.getAdIdValue()})))}get F0t(){return this.A5t.getUiElements()}get q$t(){return this.A5t.getVastMediaBitrate()}get F$t(){return this.A5t.getVastMediaHeight()}get Q$t(){return this.A5t.getVastMediaWidth()}get P$t(){return this.A5t.getWrapperAdIds()}get B$t(){return this.A5t.getWrapperAdSystems()}get R$t(){return this.A5t.getWrapperCreativeIds()}get JJt(){return this.A5t.isLinear()}constructor(t){this.A5t=t;const i=new google.ima.CompanionAdSelectionSettings;i.resourceType=google.ima.CompanionAdSelectionSettings.ResourceType.ALL,i.creativeType=google.ima.CompanionAdSelectionSettings.CreativeType.ALL,i.sizeCriteria=google.ima.CompanionAdSelectionSettings.SizeCriteria.IGNORE,this.NUt=t.getCompanionAds(0,0,i)}};function C1(){return[google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,google.ima.AdEvent.Type.CLICK,google.ima.AdEvent.Type.DURATION_CHANGE,google.ima.AdEvent.Type.EXPANDED_CHANGED,google.ima.AdEvent.Type.STARTED,google.ima.AdEvent.Type.IMPRESSION,google.ima.AdEvent.Type.PAUSED,google.ima.AdEvent.Type.RESUMED,google.ima.AdEvent.Type.AD_PROGRESS,google.ima.AdEvent.Type.AD_BUFFERING,google.ima.AdEvent.Type.FIRST_QUARTILE,google.ima.AdEvent.Type.MIDPOINT,google.ima.AdEvent.Type.THIRD_QUARTILE,google.ima.AdEvent.Type.COMPLETE,google.ima.AdEvent.Type.USER_CLOSE,google.ima.AdEvent.Type.LINEAR_CHANGED,google.ima.AdEvent.Type.LOADED,google.ima.AdEvent.Type.AD_CAN_PLAY,google.ima.AdEvent.Type.AD_METADATA,google.ima.AdEvent.Type.AD_BREAK_READY,google.ima.AdEvent.Type.INTERACTION,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,google.ima.AdEvent.Type.SKIPPED,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,google.ima.AdEvent.Type.LOG,google.ima.AdEvent.Type.VIEWABLE_IMPRESSION,google.ima.AdEvent.Type.VOLUME_CHANGED,google.ima.AdEvent.Type.VOLUME_MUTED]}var x1=class extends Bo{l_(t){var i;null==(i=this.GGt)||i.setVolume(t)}d_(){return this.GGt.getVolume()}p$t(){return this.GGt.getRemainingTime()}Qd(){No(this.Ic),this.Wu.fn(Tn.pn,this.N5t),this.GGt.removeEventListener(google.ima.AdEvent.Type.LOADED,this.D5t),this.GGt.removeEventListener(C1(),this.forwardAdEventListener),this.GGt.removeEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.forwardAdErrorEventListener),this.GGt.destroy()}Cn(){this.GGt.start()}k0t(){this.GGt.resume()}m_(){this.GGt.pause()}Vm(){this.GGt.skip()}y_(){this.GGt.stop()}s$t(){const t=this.GGt.getCurrentAd();if(t)return this.S5t(t)}P0t(){return this.GGt.getCuePoints()}S5t(t){let i=Po(this.Ic,(i=>i.A5t===t));return i||(i=new k1(t),this.Ic.push(i)),i}W0t(t){this.GGt.updateAdsRenderingSettings(z1(t))}constructor(t,i,e){super(),this.Ic=[],this.D5t=t=>{t.getAd().isLinear()?this.j0t.w5t("linear"):this.j0t.w5t("nonlinear")},this.N5t=()=>{this.GGt.resize(this.j0t._5t,this.j0t.l5t,google.ima.ViewMode.NORMAL)},this.forwardAdEventListener=t=>{const i=t.getAd(),e=function(t){return{[google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED]:Nr._Kt,[google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED]:Nr.gKt,[google.ima.AdEvent.Type.CLICK]:Nr.wKt,[google.ima.AdEvent.Type.DURATION_CHANGE]:Nr.Xg,[google.ima.AdEvent.Type.EXPANDED_CHANGED]:Nr.AKt,[google.ima.AdEvent.Type.STARTED]:Nr.vKt,[google.ima.AdEvent.Type.IMPRESSION]:Nr.mKt,[google.ima.AdEvent.Type.PAUSED]:Nr.Qw,[google.ima.AdEvent.Type.RESUMED]:Nr.pKt,[google.ima.AdEvent.Type.AD_PROGRESS]:Nr.hKt,[google.ima.AdEvent.Type.AD_BUFFERING]:Nr.yKt,[google.ima.AdEvent.Type.FIRST_QUARTILE]:Nr.MKt,[google.ima.AdEvent.Type.MIDPOINT]:Nr.OQt,[google.ima.AdEvent.Type.THIRD_QUARTILE]:Nr.TKt,[google.ima.AdEvent.Type.COMPLETE]:Nr.jQt,[google.ima.AdEvent.Type.USER_CLOSE]:Nr.NKt,[google.ima.AdEvent.Type.LINEAR_CHANGED]:Nr.DKt,[google.ima.AdEvent.Type.LOADED]:Nr.SKt,[google.ima.AdEvent.Type.AD_CAN_PLAY]:Nr.IKt,[google.ima.AdEvent.Type.AD_METADATA]:Nr.EKt,[google.ima.AdEvent.Type.AD_BREAK_READY]:Nr.bKt,[google.ima.AdEvent.Type.INTERACTION]:Nr.LKt,[google.ima.AdEvent.Type.ALL_ADS_COMPLETED]:Nr.kKt,[google.ima.AdEvent.Type.SKIPPED]:Nr.CKt,[google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED]:Nr.xKt,[google.ima.AdEvent.Type.LOG]:Nr.OKt,[google.ima.AdEvent.Type.VIEWABLE_IMPRESSION]:Nr.jKt,[google.ima.AdEvent.Type.VOLUME_CHANGED]:Nr.zKt,[google.ima.AdEvent.Type.VOLUME_MUTED]:Nr.PKt}[t]}(t.type),s={type:e,date:new Date,Y7:i?this.S5t(i):void 0,YJt:R$(e,t.getAdData())};this.Co(s)},this.forwardAdErrorEventListener=t=>{this.Co({date:new Date,Y7:void 0,type:P$.BKt,YJt:{T$t:F$(t.getError())}})},this.GGt=t,this.j0t=i,this.Wu=e,this.Wu.yn(Tn.pn,this.N5t),this.GGt.init(this.j0t._5t,this.j0t.l5t,google.ima.ViewMode.NORMAL),this.GGt.addEventListener(google.ima.AdEvent.Type.LOADED,this.D5t),this.GGt.addEventListener(C1(),this.forwardAdEventListener),this.GGt.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.forwardAdErrorEventListener)}},O1=class extends Ao{get I5t(){return this.E5t}get x1t(){return this.NWt}fa(){return this}constructor(t,i){super("X0t"),this.E5t=t,this.NWt=i}},j1=class extends Bo{C0t(){var t;null==(t=this.x0t)||t.contentComplete()}async KZt(t,i,e){if(this.b5t)throw new g("Only one ImaAdsRequest can be made at a time.");if(!this.L5t.g5t)throw new g("AdDisplayContainer is not initialized.");this.x0t=new google.ima.AdsLoader(this.L5t.g5t),this.x0t.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.onAdsManagerLoadedListener),this.x0t.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.onAdsManagerErrorListener),this.b5t=new Rs,this.k5t=i,this.C5t=e;const s=new google.ima.AdsRequest;return t.dZt?s.adTagUrl=t.dZt:t.lZt&&(s.adsResponse=t.lZt),s.linearAdSlotWidth=t.rZt,s.linearAdSlotHeight=t.hZt,s.nonLinearAdSlotWidth=t.oZt,s.nonLinearAdSlotHeight=t.aZt,s.contentDuration=t._Zt,s.setAdWillAutoPlay(t.uZt),s.setAdWillPlayMuted(t.cZt),t.fZt&&(s.omidAccessModeRules=t.fZt),this.x0t.requestAds(s),this.b5t.Vb}Qd(){var t;void 0!==this.x0t&&(this.x0t.removeEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.onAdsManagerLoadedListener),this.x0t.removeEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.onAdsManagerErrorListener),this.x0t.destroy(),this.x0t=void 0),null==(t=this.b5t)||t.Yb("AdsLoader destroyed"),this.b5t=void 0}constructor(t,i){super(),this.onAdsManagerLoadedListener=t=>{if(this.k5t&&this.C5t&&this.b5t){var i;const e=z1(this.C5t),s=this.k5t,n=t.getAdsManager({get currentTime(){return s.Mf},get duration(){return s.ct}},e),r=new x1(n,this.L5t,this.Wu);this.Co(new O1(n,this.L5t.x1t)),null==(i=this.b5t)||i.Qb(r),this.b5t=void 0}},this.onAdsManagerErrorListener=t=>{var i;const e={bb:t.getError().getMessage(),lKt:t.getError().getVastErrorCode(),lFt:t.getError().getErrorCode(),Rg:U$(t.getError().getType()),fKt:void 0};null==(i=this.b5t)||i.Yb(e),this.b5t=void 0},this.Wu=i,this.L5t=t}};function z1(t){const i=new google.ima.AdsRenderingSettings;return i.enablePreloading=t.Y0t,t.F0t&&(i.uiElements=t.F0t),i.mimeTypes=t.Q0t,void 0!==t.V0t&&(i.playAdsAfterTime=t.V0t),void 0!==t.G0t&&(i.loadVideoTimeout=t.G0t),void 0!==t.Y$t&&(i.bitrate=t.Y$t),void 0!==t.V0t&&(i.playAdsAfterTime=t.V0t),i.restoreCustomPlaybackStateOnAdBreakComplete=!0,i}var P1=class extends Bo{get Mf(){return this.Qo.e_?this.x5t:this.Qo.Tf()}get ct(){return this.Qo.Td()}get Pf(){return this.Qo.Pf}get c_(){return this.Qo.c_}tr(){this.x5t=0}constructor(t){super(),this.Qo=t,this.x5t=this.Qo.Tf(),this.Qo.yn(Co.Iw,(()=>{this.Qo.e_||(this.x5t=this.Qo.Tf()),this.Co(new Dr(this.Mf,void 0))}))}};mn.yb.registerWebImaAdPlayerConstructor((function(t,i,e){n0(e);const s=r0(e)?t.A_():void 0,n=new L1(s,t.we),r=new j1(n,t.Iu),h=new P1(t);return new h0(t,i,e,t.K9,n,r,h)}));var B1=[Co.Xg,Co.Jg],R1=class extends rz{get O5t(){return this.Qo===this.g7?this.vXt:this.g7}ur(t,i,e,s){this.g7.yn(B1,this.Ds),s.Ff&&!s.Sf||this.Qo.p_()}ar(t,i,e){this.g7.fn(B1,this.Ds)}Nf(t){}pf(t){}j5t(t){return super.Nf(t)}z5t(t){return super.pf(t)}yf(){return this.g7.bt}Wa(){return this.g7.Wa()}Td(){return this.g7.Td()}i_(){if(this.P5t())return this.g7.i_();const t=ce.xn(this.g7.i_()),i=ce.xn(this.vXt.i_());return t.rB(i).Sn(ce.yB(0,this.Tf())).ks()}Tf(){return this.B5t(super.Tf())}B5t(t){return this.Qo===this.vXt?this.R5t+t:t}Af(){const t=ce.xn(this.g7.Af()),i=ce.xn(this.vXt.Af());return t.rB(i.Nm(this.R5t)).ks()}E_(t){if(ae(B1,t.type))return!0;if(this.Qo===this.vXt)switch(t.type){case Co.Iw:return this.Co(new Dr(this.B5t(t.currentTime),t.currentProgramDateTime)),!0;case Co.gw:return this.Co(new oa(this.B5t(t.currentTime))),!0;case Co.jh:return this.Co(new Qn(this.B5t(t.currentTime))),!0;case Co.Sh:return this.Co(new iu(this.B5t(t.currentTime))),!0;case Co.Jg:return this.Co(new ve(this.B5t(t.currentTime))),!0;case Co.yw:return this.Co(new lo(this.B5t(t.currentTime))),!0;case Co.pw:return this.Co(new _r(this.B5t(t.currentTime))),!0;case Co.ww:return this.Co(new Kn(this.B5t(t.currentTime),t.playbackRate)),!0;case Co.Ew:return this.Co(new Tc(this.B5t(t.currentTime),t.volume)),!0;case Co.Zg:return this.Co(new Ow(this.B5t(t.currentTime),t.readyState)),!0;case Zt.Ow:return this.Co(new jw(this.B5t(t.currentTime),t.readyState)),!0;case Zt.jw:return this.Co(new di(this.B5t(t.currentTime),t.readyState)),!0;case Zt.zw:return this.Co(new ki(this.B5t(t.currentTime),t.readyState)),!0;case Zt.Pw:return this.Co(new ti(this.B5t(t.currentTime),t.readyState)),!0;case Zt.H_:return this.Co(new Bn(this.B5t(t.currentTime),t.readyState)),!0;case Zt.Bw:return this.Co(new qa(this.B5t(t.currentTime))),!0;case Zt.Rw:return this.Co(new _e(this.B5t(t.currentTime))),!0;case Co.Kg:return this.Co(new NV(this.B5t(t.currentTime),t.initDataType,t.initData)),!0}return super.E_(t)}async gn(){this.g7.fn(B1,this.Ds),await super.gn(!0)}constructor(t,i,e){super(e),this.g7=t,this.vXt=i,this.R5t=t.Tf()}};function U1(t,i){i.Pf=t.Pf,i.c_=t.c_,i.Gf=t.Gf}var Q1,F1=class extends R1{ur(t,i,e,s){super.ur(t,i,e,s),this.O5t.m_();this.U5t(i,e).style.flex="1"}ar(t,i,e){super.ar(t,i,e);this.U5t(i,e).style.flex="0"}constructor(t,i,e){super(t,i,e)}},Y1=class extends F1{P5t(){return!0}U5t(t,i){return t}Q5t(t,i){return i}Nf(t){return super.j5t(t)}pf(t){return super.z5t(t)}constructor(t,i){super(t,i,t)}},G1=class extends F1{P5t(){return!1}U5t(t,i){return i}Q5t(t,i){return t}ur(t,i,e,s){super.ur(t,i,e,s);for(const t of[i,e])t.style.transition=""}constructor(t,i){super(t,i,i)}};!function(t){t.SINGLE="SINGLE",t.DOUBLE="DOUBLE",t.LSHAPE_AD="LSHAPE_AD",t.LSHAPE_CONTENT="LSHAPE_CONTENT"}(Q1||(Q1={}));var V1,W1=class{get F5t(){var t,i;const e=null!=(i=null!=(t=this.Y5t)?t:this.UL)?i:this.Jbt;return void 0!==e?this.RT+e:this.JT?this.JT:void 0}get ct(){const t=this.F5t;return void 0===t?void 0:t-this.RT}Yn(t){var i,e,s;this.UL=null!=(i=t.ct)?i:this.UL,this.JT=null!=(e=t.UT)?e:this.JT,this.Y5t=null!=(s=t.G5t)?s:this.Y5t,this.V5t()}V5t(){void 0===this.UL&&void 0!==this.JT?this.UL=this.JT-this.RT:void 0===this.JT&&void 0!==this.UL&&(this.JT=this.RT+this.UL)}constructor(t){this.Hf=!1,this.o=t.o,this.RT=t.RT,this.$At=t.$At,this.W5t=t.W5t||"SINGLE",this.H5t=t.H5t,this.JT=t.UT,this.Jbt=t.sEt,this.UL=t.ct,this.Y5t=t.G5t,this.V5t()}},H1=Promise,q1="urn:google:dai:2018";!function(t){t.AD_LOADING="adloading",t.AD_LOADED="adloaded",t.AD_ERROR="aderror"}(V1||(V1={}));var X1=class extends Bo{cq(t,i,e){if(void 0===this.q5t){var s,n;if(void 0===(null==(n=Qr.google)||null==(s=n.ima)?void 0:s.dai))throw new g("IMA DAI SDK missing for THEOads");this.q5t=new google.ima.dai.api.StreamManager(this.vXt.we.querySelector("video"),this.vXt.we)}const r=this.q5t;this.X5t(),r.reset();const h=new google.ima.dai.api.PodStreamRequest;return h.networkCode=t,h.customAssetKey=i,h.format="hls",h.adTagParameters=e,this.Z5t=this.K5t([google.ima.dai.api.StreamEvent.Type.STREAM_INITIALIZED,google.ima.dai.api.StreamEvent.Type.ERROR]).then((t=>{if(t.type===google.ima.dai.api.StreamEvent.Type.ERROR)throw new g("DAI stream request failed");this.J5t=t.getStreamData(),this.$5t()})),this.q5t.requestStream(h),this.Z5t}$5t(){var t;null==(t=this.q5t)||t.addEventListener([google.ima.dai.api.StreamEvent.Type.ERROR,google.ima.dai.api.StreamEvent.Type.CLICK,google.ima.dai.api.StreamEvent.Type.STARTED,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,google.ima.dai.api.StreamEvent.Type.MIDPOINT,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,google.ima.dai.api.StreamEvent.Type.COMPLETE,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,google.ima.dai.api.StreamEvent.Type.PAUSED,google.ima.dai.api.StreamEvent.Type.RESUMED],this.t6t),this.vXt.nt.yn(Rl.L_,this.Hn),this.vXt.yn(Co.cw,this.i6t),this.vXt.yn(Zt.jw,this.e6t)}X5t(){var t;null==(t=this.q5t)||t.removeEventListener([google.ima.dai.api.StreamEvent.Type.ERROR,google.ima.dai.api.StreamEvent.Type.CLICK,google.ima.dai.api.StreamEvent.Type.STARTED,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,google.ima.dai.api.StreamEvent.Type.MIDPOINT,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,google.ima.dai.api.StreamEvent.Type.COMPLETE,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,google.ima.dai.api.StreamEvent.Type.PAUSED,google.ima.dai.api.StreamEvent.Type.RESUMED],this.t6t),this.vXt.nt.fn(Rl.L_,this.Hn),this.vXt.fn(Co.cw,this.i6t),this.vXt.fn(Zt.jw,this.e6t)}K5t(t,i){return new H1(((e,s)=>{var n;if(i&&i.Bd)return s(new is);const r=t=>{o(),e(t)},h=()=>{o(),s(new is)},o=()=>{var e;null==(e=this.q5t)||e.removeEventListener(t,r),i&&i.Gd(h)};null==(n=this.q5t)||n.addEventListener(t,r),i&&i.Yd(h)}))}async s6t(t,i){this.Z5t&&await ji(this.Z5t,i);const e=_.floor(1e3*t),s=this.J5t.getStandalonePodManifestUrl(Z1,e);return this.n6t({sources:{src:s}},i)}async r6t(t,i){return this.n6t({ads:[{sources:{src:t,type:"vast"}}]},i)}async n6t(t,i){var e;null==(e=this.TI)||e.Xd(),this.TI=new er,this.TI.Zd(i);const s=this.TI.Hd;return await this.vXt.y_(),fo(s),await this.vXt.ga(Ms(t),s),Ph((t=>{const i=this.df("aderror",t).then(H1.reject),e=this.df("adloaded",t).then((()=>H1.resolve()));return H1.race([i,e])}),s)}async tr(){var t,i;null==(t=this.TI)||t.Xd(),this.TI=void 0,await this.vXt.y_(),null==(i=this.q5t)||i.reset()}constructor(t,i){super(),this.t6t=t=>{this.o6t.h6t(t)},this.Hn=t=>{const i=t.Lt;if(i.zt===hh.Mm&&!(i.Rg!==Wt.ID3&&i.Rg!==Wt.EVENT_STREAM||i.Rg===Wt.EVENT_STREAM&&i.Og!==q1)){if(i.yn(na.O_,this.a6t),i.yn(na.z_,this.u6t),i.L)for(const t of i.L.og)this.a6t(new Oh(t));i.jg=L.zg,this.c6t=i}},this.a6t=t=>{t.BT.yn(sa.zT,this.d6t)},this.u6t=t=>{t.BT.fn(sa.zT,this.d6t)},this.d6t=t=>{var i,e;if(this.J5t)if((null==(i=this.c6t)?void 0:i.Rg)===Wt.ID3){const i=t.BT.O;var s;if("TXXX"===i.id)null==(s=this.q5t)||s.processMetadata("ID3",i.text,t.BT.RT)}else if((null==(e=this.c6t)?void 0:e.Rg)===Wt.EVENT_STREAM){var n;const i=t.BT.O;null==(n=this.q5t)||n.processMetadata(q1,i,t.BT.RT)}},this.i6t=()=>{this.Co(new Yi("adloading"))},this.e6t=()=>{this.Co(new Yi("adloaded"))},this.vXt=t,this.vXt.pT=!1,this.vXt.Xf=pt.ZM,this.o6t=i}};function Z1(){return _.floor((new Date).getTime()/6e4)}var K1,J1=class extends R1{P5t(){return!0}ur(t,i,e,s){super.ur(t,i,e,s),U1(this.Qo,this.O5t),this.O5t.Pf=!0,t.style.backgroundImage="url('"+this.l6t+"')",t.style.backgroundSize="contain",t.style.backgroundPosition="center";for(const t of[i,e])t.style.flex="1",t.style.borderWidth="20px",t.style.transition=["flex","border-width","transform"].map((t=>t+" 1s ease-in-out")).join(", ")}ar(t,i,e){super.ar(t,i,e);for(const t of[i,e])t.style.flex="0",t.style.borderWidth="0px"}Ef(){return this.g7.Ef()||this.vXt.Ef()}Lf(){return this.g7.Lf()||this.vXt.Lf()}$f(){return _.min(this.g7.Jf,this.vXt.Jf)}p_(){this.g7.p_(),this.vXt.p_()}m_(){this.g7.m_(),this.vXt.m_()}constructor(t,i,e){super(t,i,i),this.l6t=e}},$1=class extends R1{ur(t,i,e,s){super.ur(t,i,e,s),this.O5t.m_(),t.style.backgroundImage="url('"+this.l6t+"')",t.style.backgroundSize="contain",t.style.backgroundPosition="center";const n=this.U5t(i,e);n.style.flex="1",n.style.transform="\n translate(-50%, -50%)\n scale(calc(43/60))\n translate(calc(50% + 100%/30), calc(50% + 100%/30))\n ";for(const t of[i,e])t.style.transition=["flex","border-width","transform"].map((t=>t+" 1s ease-in-out")).join(", ")}ar(t,i,e){super.ar(t,i,e);const s=this.U5t(i,e);s.style.flex="0",s.style.transform=""}constructor(t,i,e,s){super(t,i,e),this.l6t=s}},t4=class extends $1{P5t(){return!0}U5t(t,i){return t}Q5t(t,i){return i}constructor(t,i,e){super(t,i,t,e)}},i4=class extends $1{P5t(){return!1}U5t(t,i){return i}Q5t(t,i){return t}constructor(t,i,e){super(t,i,i,e)}},e4=class{start(t){this.f6t=new s4(t)}transform(t){this.f6t.rX(t)}flush(){this.f6t.oX()}},s4=class extends Br{gX(t){return!0}AX(t){this.xH.enqueue(t)}mX(t){}constructor(t){super(),this.xH=t}};!function(t){t[t.INITIALIZER=0]="INITIALIZER",t[t.FRAMES=1]="FRAMES"}(K1||(K1={}));var n4=class{start(t){this.xH=t}_6t(t){this.xH.enqueue(t)}},r4=class extends n4{start(t){super.start(t);for(const t of this.prependPackets)this._6t(t)}constructor(t=[]){super(),this.prependPackets=t}};function h4(t){return t.Rg===he.Zv}var o4=class extends r4{transform(t){this.g6t.push(t),t.Rg===he.Av?(this.RL=function(t){const i=Eh.dp(t.Om.Om)[0];if((null==i?void 0:i.Rg)!==he.Av)throw new g("Not able to parse Moov Box");if(0===i.Z.length)throw new g("Tracks not found");return i.Z[0].jp.ep.bp}(t),this.w6t(this.g6t.splice(0),K1.INITIALIZER)):t.Rg===he.hm&&this.w6t(this.g6t.splice(0),K1.FRAMES)}w6t(t,i){const e={bp:this.RL,SF:this.QF},s=Qt(t.map((t=>$t(t.Om.Om)))),n=Po(t,h4),r={dI:this.Lht,jb:e,uot:s,Rg:i,ct:this.A6t(n)/e.bp,zlt:ku(this.v6t(n),e.bp)};this._6t(r)}A6t(t){if(!t||!this.RL)return 0;const i=Eh.dp(t.Om.Om)[0].Z[0];if(!i||0===i.pM.length)return 0;const e=i.ep.cM||0;return i.pM[0].IM.reduce(((t,i)=>{var s;return t+(null!=(s=i.ct)?s:e)}),0)}v6t(t){var i;if(!t||!this.RL)return Ce.UZERO;var e;return null!=(e=null==(i=Eh.dp(t.Om.Om)[0].Z[0].yM)?void 0:i.yM)?e:Ce.UZERO}m6t(t){t.Rg===K1.INITIALIZER&&(this.RL=t.jb.bp)}constructor(t,i=[],e=!1){super(e?i:[]),this.QF=t,this.g6t=[],this.Lht=this.QF.match(/video/)?Ga.Am:Ga.vm;for(const t of i)this.m6t(t)}},a4="audio/x-theoplayer-fake-json-segment",u4="video/x-theoplayer-fake-json-segment";var c4=class{write(t){if(t.Rg===K1.FRAMES){const i=t.jb.bp,e=Gk(hl(t.uot),void 0,i);if(void 0===e)return;this.Zb.p6t(e,t.ct)}else if(t.Rg===K1.INITIALIZER){const i=new Ea(hl(t.uot),new Ha),e=Nt.tp(i,he.Av),s=e?Eh.Ap(e):[];if(s.length){const t=Qt(s.map((t=>new j(t.RM))));this.Zb.Co(new V(nr,t))}}}constructor(t){this.Zb=t}},d4=class t extends Bo{get wf(){return this.GNt}get wd(){return this.sx}get XJ(){return this.ZJ}get KJ(){return this.VNt}get AW(){return this.SW}set AW(t){this.SW=t}get yW(){return this.bW}set yW(t){this.bW=t}oJ(t,i,e){return this.y6t=i.jD,this.M6t((i=>this.T6t(t,i)),e)}T6t(t,i){switch(this.KC){case"audio/mp4":case"video/mp4":return this.N6t(t,i);case a4:case u4:return this.D6t(t,i);default:return Promise.reject(new b("Unknown content type: "+this.KC))}}async N6t(t,i){fo(i);const e=function(t){switch(t.Rg){case dt.$H:return Rb(t.Om);case dt.US:return t.Om;case dt.tq:throw new g("HeadlessMediaBuffer - Cannot convert opaque SegmentData to Stream.")}}(t);await e.pipeThrough(new De(new e4)).pipeThrough(new De(this.S6t)).pipeTo(new WI(this.I6t),{preventClose:!0,preventAbort:!0})}async D6t(t,i){fo(i);const e=function(t){return JSON.parse($e(t))}(await function(t,i){switch(t.Rg){case dt.$H:return Promise.resolve(t.Om);case dt.US:return Qb(t.Om,i).then((t=>Qt(t)));case dt.tq:return Promise.reject(new g("HeadlessMediaBuffer - Cannot convert opaque SegmentData to Uint8Array."))}}(t,i));this.p6t(e.startTime,e.duration)}e$(){return Promise.resolve()}cJ(t,i,e){return this.M6t((i=>this.T6t(t,i)),e)}Dq(){return this.H8}HJ(){this.H8=!0}PJ(){this.H8=!1}t$(t,i){this.VNt=this.VNt.rB(new ce([t,i]))}TT(t,i,e){return this.M6t((e=>{fo(e),this.GNt=this.GNt.oB(new ce([t,i])),this.Co(new Yi(Je.KH))}),e)}NJ(t,i){return this.M6t((()=>{this.E6t=new ce([t,i])}))}i$(t,i){this.VNt=this.VNt.oB(new ce([t,i]))}p6t(t,i){const e=this.y6t+t,s=new ce([e,e+i]).Sn(this.E6t);this.GNt=this.GNt.rB(s),this.Co(new Yi(Je.KH)),this.b6t()}L6t(){return this.k6t}b6t(){const t=this.GNt,i=t.U>0?t.jn(this.GNt.U-1):0;this.k6t!==i&&(this.k6t=i,this.Co(new os(i)))}aq(i){if(!t.Eq(i))return!1;const e=An(i.Fz);return this.KC===e.Rg}cq(t){return this.sx=t,this.KC=An(t.Fz).Rg,Bt(this.KC)?this.S6t=new o4(t.Fz):this.S6t=void 0,Promise.resolve()}async M6t(t,i){if(this.C6t)throw new g("Attempted to start concurrent buffer mutation");const e=new er;e.Zd(this.UJ.Hd),i&&e.Zd(i);try{this.C6t=Promise.resolve(t(e.Hd)),await this.C6t}finally{this.C6t=void 0}}Qd(){this.Vo(),this.UJ.Xd()}static Eq(t){switch(An(t.Fz).Rg){case"audio/mp4":case"video/mp4":case a4:case u4:return!0;default:return!1}}constructor(t,i){super(),this.k6t=0,this.H8=!1,this.GNt=ce.MB(),this.VNt=ce.MB(),this.bW=30,this.SW=30,this.y6t=0,this.S6t=void 0,this.I6t=new c4(this),this.C6t=void 0,this.E6t=new ce([0,1/0]),this.UJ=new er,this.sx=t,this.KC=An(t.Fz).Rg,Bt(this.KC)&&(this.S6t=new o4(t.Fz)),this.ZJ=i}},l4=class t extends Bo{get B$(){return this.Y$}get R$(){return this.G$}get wf(){return cC(this)}get KJ(){var t,i,e,s;return(null!=(e=null==(t=this.Y$)?void 0:t.KJ)?e:ce.MB()).rB(null!=(s=null==(i=this.G$)?void 0:i.KJ)?s:ce.MB())}get wd(){return this.sx}get ct(){return this.UL}get Dq(){return(!this.Y$||this.Y$.Dq())&&(!this.G$||this.G$.Dq())}get t_(){return this.X$.h$().Sn(new ce([0,this.ct],[!0,!0]))}get z4(){return this.x6t}Qd(){var t,i;return this.Vo(),null==(t=this.G$)||t.Qd(),null==(i=this.Y$)||i.Qd(),this.Y$=void 0,this.G$=void 0,this.UL=NaN,Promise.resolve()}W$(t){this.UL!==t&&(this.UL=t,this.Co(new os(t)))}L6t(){let t=0;return this.Y$&&(t=_.max(t,this.Y$.L6t())),this.G$&&(t=_.max(t,this.G$.L6t())),t}Z$(t,i,e,s){this.X$=new hC(t,i,Boolean(e),Boolean(s))}get rt(){throw new g("Not implemented")}HJ(){this.Y$&&this.Y$.HJ(),this.G$&&this.G$.HJ(),this.O6t()}PJ(){this.Y$&&this.Y$.PJ(),this.G$&&this.G$.PJ()}aq(i){if(!t.Eq(i))return!1;const e=Po(i.K$,(t=>D(t.Fz,"audio"))),s=Po(i.K$,(t=>D(t.Fz,"video")));return!(this.Y$&&e&&!this.Y$.aq(e))&&!(this.G$&&s&&!this.G$.aq(s))}async cq(t){this.sx=t;const i=Po(t.K$,(t=>D(t.Fz,"audio"))),e=Po(t.K$,(t=>D(t.Fz,"video")));this.Y$?i?await this.Y$.cq(i):(this.Y$.Qd(),this.Y$=void 0):i&&(this.Y$=new d4(i,f.vm),this.Y$.yn(Co.Xg,this.O6t)),this.G$?e?await this.G$.cq(e):(this.G$.Qd(),this.G$=void 0):e&&(this.G$=new d4(e,f.Am),this.G$.yn(Co.Xg,this.O6t));const s=this.x6t;0===t.Yz.length?this.x6t=void 0:s&&!t.Yz.some((t=>t.ZA===s))&&(this.x6t=t.Yz[0].ZA)}static Eq(t){return t.K$.every((t=>d4.Eq(t)))}constructor(t){var i;super(),this.Y$=void 0,this.G$=void 0,this.UL=NaN,this.X$=new hC(0,1/0),this.x6t=void 0,this.O6t=()=>{let t;t=this.Dq?this.L6t():_.max(this.UL||0,this.L6t()),this.W$(t)},this.sx=t;const e=Po(t.K$,(t=>D(t.Fz,"audio"))),s=Po(t.K$,(t=>D(t.Fz,"video")));e&&(this.Y$=new d4(e,f.vm),this.Y$.yn(Co.Xg,this.O6t)),s&&(this.G$=new d4(s,f.Am),this.G$.yn(Co.Xg,this.O6t)),this.x6t=null==(i=t.Yz[0])?void 0:i.ZA}},f4=class{Z1(t){return i.ul(t,16)}t4(t){i.$d(t)}},_4=class extends Bo{get wf(){var t,i;return null!=(i=null==(t=this.Pz)?void 0:t.wf)?i:ce.MB()}get Mf(){return this.n2?this.n2.Mf:this.j6t/1e3}get Iu(){return this.Wu}get ct(){var t,i;return this.n2?this.n2.ct:null!=(i=null==(t=this.Pz)?void 0:t.ct)?i:NaN}get Sf(){return this.n2?this.n2.Sf:this._0}get lt(){}get xf(){return!1}get z6t(){return this.Pz}get Pf(){return this.n2?this.n2.Pf:this.DB}set Pf(t){this.n2?this.n2.Pf=t:this.DB!==t&&(this.DB=t,this.Co(new Tc(this.Mf,this.$L)))}get Ff(){return this.n2?this.n2.Ff:this.SB}get Gf(){return this.n2?this.n2.Gf:this.IB}set Gf(t){this.IB!==t&&(this.Yn(),this.IB=t,this.Co(new Kn(this.Mf,t)))}get Jf(){return this.g0}get t_(){var t;return(null==(t=this.Pz)?void 0:t.t_)||ce.MB()}get e_(){return this.n2?this.n2.e_:this.NB}get l0(){return this.n2?this.n2.l0:this.f0}get T0(){return!1}get Bz(){}get c_(){return this.n2?this.n2.c_:this.$L}set c_(t){this.n2?this.n2.c_=t:this.$L!==t&&(this.$L=t,this.Co(new Tc(this.Mf,t)))}get vf(){}get Ti(){return this.Wu._u}get Hf(){let t=this.Uo;return!this.n2&&this.MWt&&(t=t.rB(new ce([this.vWt,this.Mf]))),t}get A2(){return this.VP}get ji(){return this.Wu.ku}get ya(){return this.EB}get X3(){return!0}get W4(){return $L}zf(){return{dT:0,lT:0,fT:0,_T:0,gT:0,wT:{amountOfBufferedAudioSegments:0,amountOfBufferedVideoSegments:0}}}Eq(t){for(const i of t)if(i.Rg===I.Fx&&l4.Eq(i))return i}async Qd(){this.Vo(),await this.tr(),this.AI.gn()}$n(t){if(t.Rg===I.Fx){const e=new l4(t);this.P6t(e),this.Pz=e,i.ul((()=>{this.Pz===e&&(this.Co(new rk),this.Yn())}),0);const s=new ch(e);return s.uet=this,Promise.resolve(s)}return Promise.reject(new g("Unsupported configuration"))}m_(){this.n2?this.n2.m_():this.B6t(),this.Yn()}B6t(){this.SB=!0,void 0!==this.R6t&&(i.E$(this.R6t),this.R6t=void 0),this.Co(new iu(this.Mf))}async p_(){const t=this.df(Zt.Rw);this.n2?this.n2.p_():this.U6t(),await t}U6t(){this.SB&&(this.Yn(),this.SB=!1,this._0&&(this.j6t=0),this.Co(new Qn(this.Mf)),this.Yn(),void 0===this.R6t&&(this.R6t=i.S$(this.Q6t,20)))}async tr(){void 0!==this.R6t&&(i.E$(this.R6t),this.R6t=void 0),this.Pz&&(await this.Pz.Qd(),this.Pz=void 0),this.Co(new os(NaN)),this.j6t=0,this.vWt=0,this.F6t=-1/0,this._0=!1,this.Uo=ce.MB(),this.MWt=!1,this.f0=!1,this.Co(new Dr(0,void 0)),this.NB&&(this.NB=!1,this.Co(new _r(0))),this.SB||(this.Co(new iu(0)),this.SB=!0),1!==this.IB&&(this.IB=1,this.Co(new Kn(0,1))),this.g0!==oe.sT&&(this.g0=oe.sT,this.Co(new Bn(0,oe.sT)))}Dm(t,i,e){if(void 0===i&&(i=!1),void 0===e&&(e=!1),this.n2)return void this.n2.Dm(t,i,e);this.Uo=this.Hf;const s=this.Pz?this.Pz.t_.tB(t):t;this.vWt=s,this.j6t=1e3*s,this.d0=i,e&&!this.NB?(this.f0=!0,this.Co(new Pi(s))):(this.f0=!1,this.NB=!0,this.Co(new lo(s))),this.Yn()}be(){this.VP=!1}get nt(){return this.AI.nt}get Ol(){return this.OB}wI(t,i,e,s,n,r,h,o){return this.AI.wI(t,i,e,s,n,r,h,o)}Zz(){return!1}Jz(){throw new g("Sideloaded native text tracks are not supported")}NI(t){this.AI.NI(t)}tP(){this.AI.tr()}kz(){}ge(){this.VP=!0}K3(){}H3(){this.n2||(void 0!==this.R6t&&(i.E$(this.R6t),this.R6t=void 0),this.Uo=this.Hf,this.n2=yC(this),this.n2.yn(mC,this.Ds))}q3(){if(!this.n2)return;const t=this.n2;this.n2=void 0,MC(this,t),t.Qd(),this.Yn(),this.SB||void 0!==this.R6t||(this.R6t=i.S$(this.Q6t,20))}get r_(){return 0}get a_(){return 0}get nP(){return this.qz}set nP(t){this.qz=t}get z4(){var t;return null==(t=this.Pz)?void 0:t.z4}Yn(){var t,e;if(this.n2)return;const s=i.Jd(),n=S(this.Y6t)?0:s-this.Y6t;this.Y6t=s;let r=!1;var h;const o=null!=(h=null==(t=this.Pz)?void 0:t.wf)?h:ce.MB();var a;const u=null!=(a=null==(e=this.Pz)?void 0:e.KJ)?a:ce.MB();this.SB||(this.j6t=this.G6t(n,o,u));const c=lU(o,u).$P().dA(this.Mf);var d;const l=1e3*_.min(null!=(d=null==c?void 0:c.jn(0))?d:0,this.ct);this.V6t<l&&(this.V6t=l,this.Co(new oa(this.Mf)));const f=this.W6t(c,l);f!==this.g0&&(this.g0=f,this.Co(new Bn(this.Mf,this.g0))),r=this.H6t(r),this.fWt(),r=this.UW(r),!r&&this.MWt&&this.F6t+250<s&&(r=!0,this.Co(new Dr(this.Mf,void 0))),r&&(this.F6t=s)}G6t(t,i,e){let s=this.j6t,n=t*this.IB;const r=1e3*this.ct;for(;;){const t=e.dA(s/1e3);if(void 0!==t&&i.gr(t.jn(0))&&(s=1e3*t.jn(0)),(this.NB||this.f0)&&this.d0){const t=s/1e3,e=lC(i,t,1);if(e!==t){s=1e3*e;break}}if(this.NB||this.f0)break;if(n<=0)break;const h=i.dA(s/1e3);if(void 0===h)break;{const t=_.min(1e3*h.jn(0),r),i=_.min(n,t-s);if(!(i>0))break;s+=i,n-=i}}return s}W6t(t,i){return this.Pz?t?this.Pz&&this.Pz.Dq&&i===1e3*this.Pz.ct?this.j6t===i?oe.nT:oe.hT:this.j6t===i?oe.nT:oe.rT:oe.Xn:oe.sT}H6t(t){let i=t;if(this.g0>=oe.nT){const t=this.NB,e=this.f0;this.NB=!1,this.f0=!1,i||!t&&!e||(i=!0,this.Co(new Dr(this.Mf,void 0))),t?this.Co(new _r(this.Mf)):e&&this.Co(new Gh(this.Mf))}return i}fWt(){const t=this.MWt,i=this.q6t();!t&&i?(this.MWt=!0,this.Co(new _e(this.Mf))):t&&!i&&(this.Uo=this.Hf,this.MWt=!1)}q6t(){return!this.e_&&!(this.Ff||this.Sf||this.lt||this.M0())}M0(){return this.Jf<oe.rT}UW(t){let i=t;return this.Pz&&this.Pz.Dq&&this.Mf===this.ct?this._0||(this._0=!0,i||(i=!0,this.Co(new Dr(this.Mf,void 0))),this.B6t(),this.Co(new ve(this.Mf))):this._0=!1,i}P6t(t){var i,e;null==(i=t.R$)||i.yn(Je.KH,this.X6t),null==(e=t.B$)||e.yn(Je.KH,this.X6t),t.yn(Co.Xg,this.Z6t)}constructor(){super(),this.n2=void 0,this.qz=void 0,this.j6t=0,this.Wu=new jS,this._0=!1,this.EB=new ma,this.V6t=0,this.vWt=0,this.F6t=-1/0,this.Y6t=NaN,this.Pz=void 0,this.DB=!1,this.SB=!0,this.IB=1,this.Uo=ce.MB(),this.MWt=!1,this.g0=oe.sT,this.NB=!1,this.d0=!1,this.f0=!1,this.OB=new gO,this.R6t=void 0,this.VP=!0,this.$L=1,this.Q6t=()=>{this.Yn()},this.X6t=()=>{this.Yn()},this.Z6t=()=>{this.n2||(this.Yn(),this.Co(new os(this.Pz.ct)))},this.AI=new $R(this,new f4)}},g4=class{async K6t(t){this.GCt&&await this.GCt,this.J6t.Okt||await this.J6t.Ukt(t),void 0===this.$6t&&this.t8t(),await this.J6t.qkt(this.$6t,t)}t8t(){for(const t of this.J6t.Tr.iIt)0!==t.sIt.length&&(this.$6t=t.sIt[0])}get nt(){return this.Tzt.nt}gn(){var t;this.g7.fn(Co.dw,this.i8t),null==(t=this.HCt)||t.Xd(),this.J6t.Qd()}constructor(t,i,e,s){this.i8t=()=>{this.GCt=this.K6t(this.HCt.Hd).catch(this.e8t)},this.e8t=t=>{0},this.g7=t;const n=new LZ,r=new _4;this.J6t=new kc(e,n,!1,i,void 0),this.Tzt=new xq(this.J6t,r),this.HCt=new er,this.HCt.Zd(s),this.g7.yn(Co.dw,this.i8t)}};function w4(t){return t&&t.integration===Os.THEOADS}function A4(t){const i=h.createElement("div"),e=h.createElement("div");return function(t,i){let e;for(;Dd(e=t.firstChild);)i.appendChild(e)}(t,i),Kh(t,"theo-ads-sgai-container"),Kh(i,"theo-ads-sgai-content-player"),Kh(e,"theo-ads-sgai-ad-player"),t.appendChild(i),t.appendChild(e),{contentElement:i,adElement:e}}function v4(t){const i=t.style;i.display="flex",i.backgroundColor="transparent",i.backgroundRepeat="no-repeat",i.backgroundAttachment="scroll",i.border="0 solid transparent",i.borderWidth="0px",i.flex="0"}function m4(t){const i=t.style;i.display="",i.backgroundColor="",i.backgroundRepeat="",i.backgroundAttachment="",i.border="",i.borderWidth="",i.flex="",i.transform="",i.transition="",i.backgroundImage="",i.backgroundSize="",i.backgroundPosition=""}He.yb.oR(new class{get $Ht(){return Gt.N7}hR(t){return w4(t)}tqt(t,i,e){}Z1(t,i,e,s){}DQ(t){const i={integration:Os.THEOADS,adTagParameters:Mo(t.adTagParameters)?t.adTagParameters:{}};return Zu(t.sources)&&(i.sources=jo(t.sources)),Zu(t.networkCode)&&(i.networkCode=jo(t.networkCode)),Zu(t.customAssetKey)&&(i.customAssetKey=jo(t.customAssetKey)),Zu(t.backdropDoubleBox)&&(i.backdropDoubleBox=jo(t.backdropDoubleBox)),Zu(t.backdropLShape)&&(i.backdropLShape=jo(t.backdropLShape)),Zu(t.overrideLayout)&&(i.overrideLayout=function(t){switch(t){case"single":case"single-if-mobile":return t;default:return}}(t.overrideLayout)),i}});var p4=class{get s8t(){return this.n8t}r8t(t){if(!ae(this.h8t,t)){this.h8t.push(t);for(const i of t.og)this.o8t(i);t.yn(Rl.L_,this.Hn),t.yn(Rl.C_,this.qn)}}a8t(t){if(ae(this.h8t,t)){_s(this.h8t,t),t.fn(Rl.L_,this.Hn),t.fn(Rl.C_,this.qn);for(const i of t.og)this.u8t(i)}}o8t(t){y4(t)&&this.c8t!==t?this.d8t(t):this.l8t&&M4(t)&&this.f8t!==t&&this._8t(t)}u8t(t){this.c8t===t?this.d8t(void 0):this.f8t===t&&this._8t(void 0)}d8t(t){const i=this.c8t;if(void 0!==i){if(i.L)for(const t of i.L.og)this.g8t(t);i.fn(na.O_,this.w8t),i.fn(na.B_,this.A8t),i.fn(na.U_,this.v8t),i.fn(na.z_,this.u6t),i.jg=L.zg}if(this.c8t=t,void 0!==t){if(t.L)for(const i of t.L.og)this.m8t(i);t.yn(na.O_,this.w8t),t.yn(na.B_,this.A8t),t.yn(na.U_,this.v8t),t.yn(na.z_,this.u6t),t.jg=L.zg}}_8t(t){const i=this.f8t;if(void 0!==i){if(i.L)for(const t of i.L.og)this.g8t(t);i.fn(na.O_,this.p8t),i.fn(na.U_,this.v8t),i.fn(na.z_,this.u6t),i.jg=L.zg}if(this.f8t=t,void 0!==t){if(t.L)for(const i of t.L.og)this.m8t(i);t.yn(na.O_,this.p8t),t.yn(na.U_,this.v8t),t.yn(na.z_,this.u6t),t.jg=L.zg}}m8t(t){Dd(t.Lt)&&(y4(t.Lt)?this.y8t(t):this.l8t&&M4(t.Lt)&&this.M8t(t))}y8t(t){if("com.theoplayer.sgai"!==t.iEt)return;if(!t.nEt["X-ASSET-URI"])return void 0;const i=t.nEt["X-RESUME-OFFSET"],e=new W1({o:t.o,RT:t.RT,$At:t.nEt["X-ASSET-URI"],W5t:Q1[t.nEt["X-COM-THEOPLAYER-SGAI-LAYOUT"]]||Q1.SINGLE,H5t:t.nEt["X-COM-THEOPLAYER-SGAI-BACKDROP"],UT:isFinite(t.UT)?t.UT:void 0,sEt:t.sEt,G5t:void 0!==i?Number(i):void 0});this.T8t(e,t)}M8t(t){const i=t.O;if(!function(t){return"GEO"===t.id||"GEOB"===t.id}(i)||!function(t){return"Anvatos"===t.description&&"application/json"===t.mimeType}(i))return;const e=Ya(new DataView(i.data),new Ha),s=new hB(e),n=s.get("type");if("cue"===n){const i=new hB(s.get("payload"));let e;if("nad"===i.get("type")?e=Number(i.get("dur")):"NFL_linear"===i.get("s_upid")&&(e=Number(i.get("s_bd"))/10),!e)return;const n="theo-ads://dai.break/?d="+e,r=new W1({o:t.o,RT:t.RT,$At:n,W5t:Q1.SINGLE,sEt:e});this.T8t(r,t)}else if("cue_end"===n){const i=this.N8t;i&&i.Yn({ct:t.RT-i.RT})}}D8t(t){this.S8t.get(t.Mg)&&this.E8t.I8t(t.RT)}T8t(t,i){this.n8t.push(t),this.S8t.set(i.Mg,t),this.N8t=t,this.E8t.T8t(t)}b8t(t){const i=this.S8t.get(t.Mg);if(void 0===i)return;const e=t.nEt["X-RESUME-OFFSET"];i.Yn({ct:t.ct,UT:isFinite(t.UT)?t.UT:void 0,G5t:void 0!==e?Number(e):void 0})}g8t(t){this.L8t(t)}L8t(t){const i=this.S8t.get(t.Mg);void 0!==i&&(_s(this.n8t,i),this.S8t.delete(t.Mg),this.E8t.k8t(i))}gn(){this.N8t=void 0,this.d8t(void 0),this._8t(void 0);for(const t of this.h8t.slice())this.a8t(t);No(this.h8t),No(this.n8t),this.S8t.clear()}constructor(t){this.l8t=!1,this.n8t=[],this.S8t=Y(),this.h8t=[],this.Hn=t=>{this.o8t(t.Lt)},this.qn=t=>{this.u8t(t.Lt)},this.w8t=t=>{this.y8t(t.BT)},this.p8t=t=>{this.M8t(t.BT)},this.v8t=t=>{this.D8t(t.BT)},this.u6t=t=>{this.g8t(t.BT)},this.A8t=t=>{this.b8t(t.BT)},this.E8t=t}};function y4(t){return t.zt===hh.Mm&&t.Rg===Wt.DATE_RANGE}function M4(t){return t.zt===hh.Mm&&t.Rg===Wt.ID3}var T4=class extends bl{nVt(){return this.C8t.getAdSystem()}O7(){var t;return null!=(t=this.Xa)?t:this.fa()}oVt(){return this.fUt.x8t.$At}fa(){return cn(this)}get o(){return this.C8t.getAdId()}get duration(){return this.C8t.getDuration()}get GUt(){var t,i;return null==(i=this.C8t)||null==(t=i.Y7)?void 0:t.clickThroughUrl}get _Ut(){return this.C8t.getCreativeId()}get pQt(){return this.C8t.getSkipTimeOffset()}get nYt(){return Gt.N7}constructor(t,i){super(i,function(t){return t===Q1.LSHAPE_CONTENT?lt.pFt:lt.mFt}(i.x8t.W5t)),this.C8t=t,this.fUt=i}};var N4=class extends ml{O8t(t){this.Ic.push(t)}get Hf(){return this.j8t.Hf}get nYt(){return Gt.N7}get QGt(){var t;return null!=(t=this.j8t.ct)?t:-1}get qEt(){return this.j8t.RT}get x8t(){return this.j8t}constructor(t){var i;super(t.RT),this.j8t=t,this.FGt=null!=(i=this.j8t.ct)?i:-1}},D4=class{get oqt(){return this.TXt}get Aqt(){return void 0!==this.wVt}get sqt(){return Gt.N7}get x7(){return this.rVt?[this.rVt]:[]}get j7(){var t;return null!=(t=this.wVt)?t:null}get z7(){return xl(this.AVt,(t=>{const i=t.Oc;if(t===this.wVt&&void 0!==this.rVt){const t=i.indexOf(this.rVt);if(t>=0)return i.slice(t+1)}return t.Hf?[]:i}))}get P7(){return this.AVt.filter((t=>t===this.wVt||!t.Hf))}Vm(){}Z7(t){}T8t(t){const i=new N4(t);this.AVt.push(i)}k8t(t){const i=this._Xt(t);_s(this.AVt,i)}h6t(t){switch(t.type){case google.ima.dai.api.StreamEvent.Type.ERROR:this.TXt.Co(new gn(Xr.GENERAL));break;case google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED:{const t=this.g7.Tf();let i=Po(this.AVt,(i=>{const e=i.qEt,s=e+i.FGt;return e<t&&t<s}));i||(i=this.AVt[0]),this.wVt=i,this.TXt.Co(new Ko(this.wVt));break}case google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED:this.TXt.Co(new Vi(this.wVt)),this.wVt=void 0;break;case google.ima.dai.api.StreamEvent.Type.STARTED:{const i=t.getAd(),e=new T4(i,this.wVt);this.wVt.O8t(e),this.rVt=e,this.z8t=0,this.TXt.Co(new Re(this.rVt,this.g7.Tf()));break}case google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE:this.z8t<.25&&(this.z8t=.25,this.TXt.Co(new ir(this.rVt,this.g7.Tf())));break;case google.ima.dai.api.StreamEvent.Type.MIDPOINT:this.z8t<.5&&(this.z8t=.5,this.TXt.Co(new Ke(this.rVt,this.g7.Tf())));break;case google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE:this.z8t<.75&&(this.z8t=.75,this.TXt.Co(new S$(this.rVt,this.g7.Tf())));break;case google.ima.dai.api.StreamEvent.Type.COMPLETE:this.TXt.Co(new vo(this.rVt,this.g7.Tf())),this.rVt=void 0,this.z8t=-1}this.wVt&&(this.wVt.FGt=this.vXt.Td()-this.vXt.Tf())}_Xt(t){return Po(this.AVt,(i=>i.x8t===t))}gn(){return void 0!==this.wVt&&(this.wVt=void 0),this.rVt=void 0,this.z8t=-1,No(this.AVt),Promise.resolve(void 0)}constructor(t,i){this.TXt=new Eu,this.AVt=[],this.wVt=void 0,this.rVt=void 0,this.z8t=-1,this.g7=t,this.vXt=i}},S4=class extends l${Z1(t,i,e){var s;null==(s=this.g7.Oc)||s.Z1(t,i,e)}constructor(t,i){super(i),this.g7=t;for(const i of He.yb.sR){const e=t.Oc._qt.JHt(i.$Ht);void 0!==e&&this._qt.iqt(e)}}},I4=class extends n${async ga(t,i){var e,s,n;this.P8t(),fo(i),await super.ga(t,i);const r=null==(e=this.g7.bt)?void 0:e.src;if(void 0===r||void 0===t||void 0===t.ads)return;const h=Po(t.ads,w4);if(void 0!==h){for(const t of[this.Us,this.B8t,this.R8t])v4(t);this.U8t(),this.Q8t=h.adTagParameters,this.F8t=h.backdropDoubleBox,this.Y8t=h.backdropLShape,this.G8t=h.overrideLayout,void 0!==h.networkCode&&void 0!==h.customAssetKey&&this.V8t.cq(h.networkCode,h.customAssetKey,this.Q8t).catch((t=>{0})),this.W8t(),null==(s=this.Oc)||s.yn("H7",this.H8t),null==(n=this.Oc)||n.yn("q7",this.q8t),this.X8t.l8t=function(t){return void 0!==t.customAssetKey&&D(t.customAssetKey,"nfl-")}(h),this.X8t.r8t(this.g7.nt),void 0!==h.sources&&this.Z8t(h.sources+r),this.K8t(new Y1(this.g7,this.vXt))}}Z8t(t){this.J8t=new er,this.$8t=new g4(this.g7,t,this.g7.uO,this.J8t.Hd),this.X8t.r8t(this.$8t.nt)}P8t(){var t;void 0!==this.$8t&&(this.X8t.a8t(this.$8t.nt),null==(t=this.J8t)||t.Xd(),this.J8t=void 0,this.$8t.gn(),this.$8t=void 0)}v_(){this.g7.v_(),this.vXt.v_()}A7(){return this.g7.q9}Df(){return this.Us}get Oc(){return this.t9t}K8t(t){var i;void 0!==this.i9t&&(this.i9t.ar(this.we,this.B8t,this.R8t),this.i9t.gn());const e=null!=(i=this.i9t)?i:this,s=null!=t?t:this.g7;U1(e,s),null==t||t.ur(this.we,this.B8t,this.R8t,e),this.i9t=t,this.cT(s)}W8t(){this.g7.yn(Co.Iw,this.e9t),this.g7.yn(Co.yw,this.dU),this.g7.yn(Co.gw,this.fI)}s9t(){this.g7.fn(Co.Iw,this.e9t),this.g7.fn(Co.yw,this.dU),this.g7.fn(Co.gw,this.fI)}n9t(){this.vXt.yn(Co.gw,this.r9t),this.vXt.yn(Co.Jg,this.h9t),this.g7.yn(Co.dw,this.i8t)}o9t(){this.vXt.fn(Co.gw,this.r9t),this.vXt.fn(Co.Jg,this.h9t),this.g7.fn(Co.dw,this.i8t)}I8t(t){this.a9t(t),this.u9t(t),this.c9t(t)}a9t(t){let i;for(const e of this.X8t.s8t){if(e.Hf)continue;const s=e.F5t;void 0!==s&&t>=s?e.Hf=!0:void 0!==i&&i.RT<e.RT||(i=e)}this.d9t!==i&&(this.d9t=i,this.l9t())}l9t(){var t;null==(t=this.f9t)||t.Xd(),this._9t=void 0,this.g9t=void 0}u9t(t){if(void 0===this.d9t||void 0!==this._9t)return;let i=!1;const e=ce.xn(this.g7.Af()).dA(t);void 0!==e&&(i=e.jn(0)>=this.d9t.RT);const s=this.d9t.F5t,n=t>=this.d9t.RT&&(void 0===s||t<s);(i||n)&&(this.f9t=new er,this._9t=this.w9t(this.d9t,t,this.f9t.Hd).catch((t=>{0})))}async w9t(t,e,s){if(!D(t.$At,"theo-ads://dai.break"))return this.V8t.r6t(t.$At,s);const n=i.Dh(t.$At),r=n.searchParams.get("n"),h=n.searchParams.get("k"),o=Tt({},this.Q8t);o.cust_params=function(t,i){const e="slot="+function(t){switch(t){case Q1.DOUBLE:return"doublebox";case Q1.SINGLE:return"video";case Q1.LSHAPE_AD:case Q1.LSHAPE_CONTENT:return"l-banner"}}(i)+";";if(!t)return e;if(-1===t.indexOf("slot="))return t.concat(e);return t.replace(/slot=(.*)(;?)/,e)}(o.cust_params,t.W5t),r&&h&&(await this.V8t.cq(r,h,o),fo(s));const a=Number(n.searchParams.get("d")),u=_.min(a,this.d9t.F5t-e);await this.V8t.s6t(u,s)}c9t(t){if(void 0===this.d9t||void 0!==this.g9t)return;const i=this.d9t.F5t;var e;t>=this.d9t.RT&&(void 0===i||t<i)&&(this.g9t=null==(e=this._9t)?void 0:e.then((()=>this.A9t())))}A9t(){if(void 0===this.d9t)return;var t;const i=null!=(t=this.v9t())?t:this.d9t.W5t,e=this.m9t(i,this.d9t.H5t);this.K8t(e),this.s9t(),this.n9t(),this.g9t=void 0}v9t(){switch(this.G8t){case"single":return Q1.SINGLE;case"single-if-mobile":return fi.Qs?Q1.SINGLE:void 0;default:return}}m9t(t,i){switch(t){case Q1.DOUBLE:return new J1(this.g7,this.vXt,null!=i?i:this.F8t);case Q1.LSHAPE_AD:return new i4(this.g7,this.vXt,null!=i?i:this.Y8t);case Q1.LSHAPE_CONTENT:return new t4(this.g7,this.vXt,null!=i?i:this.Y8t);case Q1.SINGLE:default:return new G1(this.g7,this.vXt)}}p9t(){var t,i;const e=null==(t=this.d9t)?void 0:t.F5t;if(void 0===e||(null==(i=this.i9t)?void 0:i.P5t())||be(this.g7.Tf(),e,.001))return;const s=ce.xn(this.g7.i_()),n=ce.xn(this.vXt.Af()),r=this.vXt.i_();n.$P().gr(r.end(s.U-1))&&this.g7.Nf(e)}LHt(){void 0!==this.d9t&&(this.g7.Nf(this.d9t.F5t),this.K8t(new Y1(this.g7,this.vXt)),this.o9t(),this.W8t(),this.d9t=void 0)}T8t(t){this.o6t.T8t(t),this.a9t(this.g7.Tf())}k8t(t){this.o6t.k8t(t)}Ef(){var t;return null!=(t=this.RB)?t:super.Ef()}Lf(){var t;return null!=(t=this.xz)?t:super.Lf()}yP(t){void 0===this.Lf()&&(this.xz=t,this.RB=Zr(t),this.Co(new fh(t)))}async y_(){var t,i;this.xz=void 0,this.RB=void 0,this.d9t=void 0,this.y9t=!0,this.X8t.a8t(this.g7.nt),this.s9t(),this.o9t(),null==(t=this.Oc)||t.fn("H7",this.H8t),null==(i=this.Oc)||i.fn("q7",this.q8t),this.P8t(),this.K8t(void 0),await this.vXt.y_(),this.l9t(),await this.V8t.tr();for(const t of[this.Us,this.B8t,this.R8t])m4(t);await super.y_()}async gn(){await this.y_().catch(qo),this.K8t(void 0),this.X8t.gn(),await this.vXt.gn(),await super.gn()}E_(t){if(void 0!==this.i9t)switch(t.type){case Zt.Rw:if(!this.y9t)return!0;this.y9t=!1;break;case Co.jh:case Zt.Bw:this.y9t=!0}return super.E_(t)}constructor(t){super(t),this.xz=void 0,this.RB=void 0,this.Q8t={},this.y9t=!0,this.H8t=t=>{const i=t.Y7.O7().clickThrough;void 0!==i&&""!==i&&(this.SWt=new jJ(this.we),this.SWt.OVt=i,this.SWt.yn("clickstart",this.IWt))},this.IWt=()=>{this.m_()},this.q8t=()=>{this.SWt&&(this.SWt.Qd(),this.SWt=void 0)},this.e9t=t=>{this.I8t(t.currentTime)},this.dU=t=>{this.I8t(t.currentTime)},this.fI=t=>{this.u9t(t.currentTime)},this.r9t=t=>{this.p9t()},this.i8t=t=>{this.p9t()},this.h9t=t=>{this.d9t.Hf=!0,this.LHt()},this.U8t=async()=>{try{await this.h7.$Q([zr.THEOADS])}catch(t){await this.y_().catch(qo),this.yP(c_(t,td.LICENSE_INVALID_FEATURE))}},this.Us=t.we;const{contentElement:i,adElement:e}=A4(this.Us);this.B8t=i,this.R8t=e,this.g7=t,this.vXt=new b$(new nz(this.R8t,t.wd,new lS),He.yb),this.o6t=new D4(this.g7,this.vXt),this.V8t=new X1(this.vXt,this.o6t),this.X8t=new p4(this),this.t9t=new S4(t,t),this.t9t.K7(this.o6t)}};go((t=>new I4(t)),Zo.N7);var Bi,E4=class extends Bo{get rH(){return this.$ct===zu.CONNECTED}get $ct(){return this.ja}get va(){return this.Xa||(this.Xa=function(t){return{get casting(){return t.rH},get state(){return t.$ct},start(){t.T_()},stop(){t.N_()},addEventListener(i,e){const s=Fr(i,jo);t.yn(s,e)},removeEventListener(i,e){const s=Fr(i,jo);t.fn(s,e)}}}(this)),this.Xa}M9t(){this.T9t(),this.ygt.yn(Co.lo,this.N9t),i.Ys.Ytt&&this.Ta(zu.AVAILABLE)}preloadPlayer(t){if(fo(t),this.Qo.Jf<oe.Xn){const i=this.Qo.df(Zt.Pw,t);return this.Qo.Xf=pt.Mm,i}return Promise.resolve()}Ta(t){t!==this.ja&&(this.ja=t,this.Co(new $J(this.ja)))}async D9t(t){await this.preloadPlayer(t),this.fW.T_()}N_(){i.Ys.Ytt&&this.Qo.N_()}gn(){this.Vo(),this.ygt.fn(Co.lo,this.N9t),this.S9t.Xd()}constructor(t,i){super(),this.Xa=void 0,this.ja=zu.UNAVAILABLE,this.S9t=new er,this.handleAirplayChangedEvent=()=>{this.Qo&&this.Qo.xf?this.I9t():this.$ct===zu.CONNECTED&&this.E9t()},this.ygt=t,this.fW=i}},b4=class extends E4{T9t(){this.Qo&&this.Qo.fn(Co.Qg,this.handleAirplayChangedEvent),this.b9t?this.Qo=this.fW:this.Qo=this.L9t,this.Qo.yn(Co.Qg,this.handleAirplayChangedEvent)}get b9t(){return this.fW.M_()}async I9t(){if(this.Qo){if(this.b9t){if(!this.Qo.Ff){const t=new Promise((t=>u(t,800))),i=this.Qo.df(Co.Sh,this.S9t.Hd);await Promise.race([i,t])}this.Qo.p_()}else{this.k9t=this.fW.Mf,this.C9t=this.fW.vf,this.L9t.yn(Co.Iw,this.handleAirplayPlayerTimeUpdate),this.x9t=this.fW.fg,this.fW.fg=this.L9t,this.x9t.m_(),this.x9t.be(),this.L9t.ge(),this.L9t.Pf=this.x9t.Pf,this.L9t.Gf=this.x9t.Gf,this.L9t.c_=this.x9t.c_;const t=this.L9t.df(Co.pw);this.L9t.Mf=this.x9t.Mf,await t,this.L9t.p_(),this.L9t.Pf=this.x9t.Pf,this.L9t.Gf=this.x9t.Gf,this.L9t.c_=this.x9t.c_}this.Ta(zu.CONNECTED)}}E9t(){if(this.x9t){this.L9t.fn(Co.Iw,this.handleAirplayPlayerTimeUpdate),this.x9t.Pf=this.L9t.Pf,this.x9t.Gf=this.L9t.Gf,this.x9t.c_=this.L9t.c_;fi.QE&&!fi.Ga&&this.fW.ct===1/0?this.C9t?this.x9t.vf=this.C9t:this.x9t.Mf=1/0:this.x9t.Mf=this.k9t,this.C9t=void 0,this.k9t=void 0,this.x9t.ge(),this.L9t.be(),this.L9t.Ff||this.x9t.p_(),this.fW.fg=this.x9t,this.L9t.tr(),this.x9t=void 0}else this.Qo&&(this.Qo.Mf=this.Qo.Mf+1e-4);this.Ta(zu.AVAILABLE)}T_(){i.Ys.Ytt&&(this.ygt.v_(),this.S9t.Xd(),this.S9t=new er,this.b9t?Ys(this.D9t(this.S9t.Hd)):Ys(this.O9t(this.S9t.Hd)))}async O9t(t){try{await this.L9t.tr();const i=this.fW.Wa();if(void 0===i)throw new g("Not possible to start Airplay without a source");await this.L9t.ga(i,t);const e=this.L9t.df(Zt.Rw,t);this.L9t.p_(),await function(t,i){return Ph((e=>Promise.race([t,Di(i,e).then((()=>{throw new g("Timeout")}))])))}(e,3e3),this.L9t.m_(),fo(t),this.L9t.T_()}catch(t){if(Mi(t))return;0}}gn(){var t;super.gn(),this.fW.mT(this.L9t),null==(t=this.L9t)||t.gn()}constructor(t,e,s){super(t,e),this.N9t=()=>{var t;const e=null==(t=this.fW.Wa())?void 0:t.sources.filter(Cw);i.Ys.Ytt&&(null==e?void 0:e.some(EN))?this.Ta(zu.AVAILABLE):this.Ta(zu.UNAVAILABLE)},this.handleAirplayPlayerTimeUpdate=t=>{this.k9t=t.currentTime,this.C9t=this.fW.vf},this.L9t=s,this.L9t.be(),e.vT(s),this.M9t()}},L4=class extends Ut{S_(){this.j9t.S_()}get ht(){return this.j9t.ht}get wf(){return this.j9t.wf}get bt(){return this.BP}get Mf(){return this.j9t.Mf}set Mf(t){this.j9t.Mf=t}get vf(){return this.j9t.vf}get ct(){return this.j9t.ct}get we(){return this.Us}get Sf(){return this.j9t.Sf}get lt(){return this.j9t.lt}get bf(){return this.j9t.bf}get kf(){return this.j9t.kf}get xf(){return this.j9t.xf}get g_(){return this.j9t.g_}get f_(){return this.j9t.f_}get jf(){return this.j9t.jf}get Pf(){return this.j9t.Pf}set Pf(t){this.j9t.Pf=t}get Uf(){return this.j9t.Uf}get Ff(){return this.j9t.Ff}get Gf(){return this.j9t.Gf}set Gf(t){this.j9t.Gf=t}get Hf(){return this.j9t.Hf}get Xf(){return this.j9t.Xf}set Xf(t){this.j9t.Xf=t}get Jf(){return this.j9t.Jf}get t_(){return this.j9t.t_}get e_(){return this.j9t.e_}M_(){return this.j9t.M_()}T_(){this.j9t.T_()}N_(){this.j9t.N_()}get nt(){return this.j9t.nt}get r_(){return this.j9t.r_}get a_(){return this.j9t.a_}get rt(){return this.j9t.rt}get c_(){return this.j9t.c_}set c_(t){this.j9t.c_=t}p_(){Ys(this.j9t.p_())}m_(){this.j9t.m_()}async y_(){}Wa(){return this.bc}async ga(t,i){let e;if(fo(i),this.bc=t,Ft(t.sources))e=Jg({src:""});else{const i=t.sources.filter(Cw);for(const t of i)if(EN(t)){e=t;break}}if(!e)throw new g("Unsupported source.");await this.j9t.ga(e,t,i),this.WP(e)}WP(t){this.BP!==t&&(this.BP=t,this.Co(new zt(t)))}A_(){return this.j9t.A_()}gf(){return[]}v_(){this.z9t.LB()}ur(t){Qw(this,t)}ar(){}I_(t){return!1}D_(){this.j9t.D_()}async tr(){this.BP=void 0,this.bc=void 0,await this.j9t.tr()}ge(){this.j9t.ge()}be(){this.j9t.be()}w_(){return this.j9t.w_()}async gn(){this.Vo(),this.z9t.gn(),await this.j9t.gn(),this.oT.gn(),this.uT.gn(),this.Dl.gn()}constructor(t,i,e,s,n,r,h){super(),this.BP=void 0,this.bc=void 0,this.oT=new ta,this.uT=new ta,this.Dl=new lc,this.Us=t,this.z9t=new km(r,h,1,[f.Am]),this.z9t.PB(t),this.j9t=new IN(t,this.z9t,i,e,s,n),this.j9t.sf(this.Ds),this.oT.fg=this.j9t.ht,this.uT.fg=this.j9t.rt,this.Dl.fg=this.j9t.nt}},k4=class extends rz{async gn(){this.P9t.gn(),await super.gn()}constructor(t){super(t);const i=new L4(this.Z9.we,this.uO,this.wd,this.q9,this.f_,this.i7,this.Ol);this.P9t=new b4(this,this.Z9,i),this.aQ.cH(this.P9t),this.yn(Co.Hg,(()=>{this.P9t.T9t()}))}};go((t=>new k4(t)),Zo.D7),function(t){t.wKt="click",t.B9t="continue",t.R9t="end",t.ha="error",t.Ah="fullscreen",t.Mm="metadata",t.TQt="mute",t.VFt="nonlinear",t.Sh="pause",t.eYt="position",t.U9t="ready",t.DQt="resume",t.Q9t="seek_end",t.F9t="seek_start",t.Y9t="stall",t.kyt="start",t.Ru="text",t.G9t="linear_event"}(Bi||(Bi={}));var C4,x4=class{V9t(t){this.W9t=t}H9t(t,i){let e;switch(t){case Bi.wKt:e=this.q9t.CLICK;break;case Bi.B9t:e=this.q9t.CONTINUE;break;case Bi.R9t:e=this.q9t.END;break;case Bi.ha:e=this.q9t.ERROR;break;case Bi.Ah:e=this.q9t.FULLSCREEN;break;case Bi.Mm:e=this.q9t.METADATA;break;case Bi.TQt:e=this.q9t.MUTE;break;case Bi.VFt:e=this.q9t.NONLINEAR;break;case Bi.Sh:e=this.q9t.PAUSE;break;case Bi.eYt:e=this.q9t.POSITION;break;case Bi.U9t:e=this.q9t.READY;break;case Bi.DQt:e=this.q9t.RESUME;break;case Bi.Q9t:e=this.q9t.SEEK_END;break;case Bi.F9t:e=this.q9t.SEEK_START;break;case Bi.Y9t:e=this.q9t.STALL;break;case Bi.kyt:e=this.q9t.START;break;case Bi.Ru:e=this.q9t.TEXT;break;case Bi.G9t:e=this.q9t.LINEAR_EVENT}this.W9t.reportPlayerEvent(e,i)}constructor(t){this.q9t=t}},Cl=class{MI(t){t.yn(sa.zT,this.X9t)}gn(){for(let t of this.Z9t)this.it(t);this.wgt.fn(Rl.L_,this.Sz)}it(t){if(t.zt===hh.Mm){for(let i of t.L.og)i.fn(sa.zT,this.X9t);t.fn(na.O_,this.l4),t.fn(na.z_,this.K9t)}}constructor(t,i){this.wgt=t,this.tet=i,this.Z9t=[],this.Sz=t=>{const i=t.Lt;if(i.zt===hh.Mm){for(let t of i.L.og)this.J9t(t)&&this.MI(t);i.yn(na.O_,this.l4),i.yn(na.z_,this.K9t),this.Z9t.push(i)}},this.l4=t=>{this.J9t(t.BT)&&this.MI(t.BT)},this.K9t=t=>{t.BT.fn(sa.zT,this.X9t)},this.wgt.yn(Rl.L_,this.Sz)}},O4=class extends Cl{$9t(t){return ae(this.t7t,t)}UF(t){var i;const e=function(t,i){if(!t||!i||i.U<=0)return[];const e=t.RT,s=i.og,n=[];for(let i=OC(t)+1,r=s.length;i<r;i++){const r=s[i],h=r.O;if(e===r.RT&&j4(h)){if(r.O.id===t.O.id)break;n.push(r)}}return n}(t,null==(i=t.Lt)?void 0:i.L);this.i7t(e);const s=[t].concat(e);this.e7t(s)}i7t(t){this.t7t=this.t7t.concat(t)}e7t(t){let i={};for(let e of t){let t=e.O;i[t.id]=t.text}this.tet.H9t(Bi.Mm,i)}s7t(t){_s(this.t7t,t)}constructor(t,i){super(t,i),this.t7t=[],this.X9t=t=>{let i=t.BT;this.$9t(i)?this.s7t(i):this.UF(i)},this.J9t=t=>t.O.id&&j4(t.O)}};function j4(t){switch(t.id){case"YMID":case"YTYP":case"YSEQ":case"YDUR":case"YCSP":return!0}return!1}!function(t){t.mFt="linear",t.pFt="nonlinear"}(C4||(C4={}));var z4,P4=class{constructor(t,i){this.Rg=t,this.OVt=i}},B4=class extends P4{get n7t(){return this.r7t}get _ot(){return this.Ltt}constructor(t,i,e){super("nonlinear",t),this.r7t=i,this.Ltt=e}},R4=class extends P4{constructor(t){super("linear",t)}},U4="yospace",Q4="urn:yospace:a:id3:2016";function F4(t){return Boolean(Dw(t)&&Zl(t,["ssai"])&&function(t){return Boolean(Zl(t,["integration"])&&t.integration===U4)}(t.ssai))}!function(t){t.S="S",t.M="M",t.E="E"}(z4||(z4={}));var Y4,G4,V4=class{h7t(t){this.o7t=t}a7t(){let t={AdBreakStart:()=>{this.o7t&&this.o7t.AdBreakStart&&this.o7t.AdBreakStart()},AdvertStart:t=>{this.u7t(),this.o7t&&this.o7t.AdvertStart&&this.o7t.AdvertStart(t)},AdvertEnd:t=>{this.c7t.oXt(),this.o7t&&this.o7t.AdvertEnd&&this.o7t.AdvertEnd(t)},AdBreakEnd:()=>{this.c7t.oXt(),this.o7t&&this.o7t.AdBreakEnd&&this.o7t.AdBreakEnd()},UpdateTimeline:t=>{this.o7t&&this.o7t.UpdateTimeline&&this.o7t.UpdateTimeline(t)},InjectVast:()=>{this.o7t&&this.o7t.InjectVast&&this.o7t.InjectVast()}};this.W9t.registerPlayer(t)}gn(){this.c7t.gn(),this.W9t=void 0,this.d7t&&(m(this.d7t),this.d7t=void 0)}constructor(t,i){this.W9t=t,this.c7t=i,this.u7t=()=>{if(this.d7t&&(m(this.d7t),this.d7t=void 0),this.W9t.session.currentAdvert){let t=this.W9t.session.currentAdvert.advert,i=t.getLinear(),e=t.getNonLinears();const s=[];i&&i.clickThrough&&s.push(new R4(i.clickThrough));const n=e.filter((t=>{const i=t.resources.images||{};return 0!==w.keys(i).length}));if(n.length){const t=function(t){const i=w.keys(t.resources.images);return t.resources.images[i[0]]}(n[0]);t&&s.push(new B4(n[0].clickThrough,t,String(e.indexOf(n[0]))))}this.c7t.l7t(s)}else this.d7t=v(this.u7t,250)},this.a7t()}},W4=class t{l7t(t){for(let i of t)i.Rg===C4.mFt?this.f7t(i):this._7t(i)}_7t(e){let s=h.createElement("img");s.src=e.n7t,s.className="theoplayer-yospace-non-linear-image",s.style.maxWidth="100%";const n=t.n4t(e.OVt,"theoplayer-yospace-advert"),r=i.Ys.Je?"touchend":"click";n.addEventListener(r,this.g7t),n.setAttribute("data-advertindex",e._ot),n.appendChild(s),n.style.zIndex="10",n.style.position="absolute",this.Us.appendChild(n),this.w7t.push(n)}A7t(){hs(this.v7t),this.v7t=void 0}oXt(){this.A7t(),this.m7t()}f7t(e){this.A7t();let s=t.n4t(e.OVt,"theoplayer-yospace-ad-clickthrough");s.style.zIndex="10";const n=i.Ys.Je?"touchend":"click";s.addEventListener(n,this.p7t),ca(s),this.Us.appendChild(s),this.v7t=s}static n4t(t,i){const e=h.createElement("a");return e.setAttribute("href",t),e.setAttribute("target","Du"),i&&(e.className=i),e.setAttribute("rel","noopener"),e}gn(){this.oXt(),this.Us=void 0}constructor(t,i){this.Us=t,this.tet=i,this.w7t=[],this.p7t=t=>{this.tet.H9t(Bi.wKt),t.stopPropagation()},this.g7t=t=>{const i=t.currentTarget.getAttribute("data-advertindex");i&&(this.tet.H9t(Bi.VFt,i),t.stopPropagation())},this.m7t=()=>{for(let t of this.w7t)t&&t.parentElement&&t.parentElement.removeChild(t);No(this.w7t)}}},H4=class extends Cl{e7t(t){this.tet.H9t(Bi.Mm,t)}constructor(t,i){super(t,i),this.X9t=t=>{const i=function(t){const i=xf(t),e=i.split(","),s={};for(const t of e){const[i,e]=t.split("=");s[i]=e}return s}(t.BT.O);if(i.YTYP===z4.E){if(Dd(this.y7t)&&i.YMID!==this.y7t)return;this.y7t=void 0}else i.YTYP===z4.S&&(this.y7t=i.YMID);this.e7t(i)},this.J9t=t=>{const i=t;return Dd(i.bM)&&function(t){return t===Q4}(i.bM)}}};!function(t){t[t.M7t=-1]="M7t",t[t.T7t=-2]="T7t",t[t.N7t=-3]="N7t",t[t.D7t=-10]="D7t",t[t.S7t=-11]="S7t"}(Y4||(Y4={})),function(t){t.I7t="ready",t.E7t="error",t.b7t="no-analytics"}(G4||(G4={}));var q4,X4=class extends Bo{get va(){return this.Xa}V9t(t,i){this.W9t=t,this.V8t=i,this.V8t.h7t(this.L7t),this.Co(new Yi("sessionavailable"))}fa(){let t=this;return{get session(){return t.W9t&&t.W9t.session},registerPlayer(i){t.L7t=i,t.V8t&&t.V8t.h7t(t.L7t)},addEventListener(i,e){t.yn(i,e)},removeEventListener(i,e){t.fn(i,e)}}}gn(){this.Vo()}constructor(){super(),this.Xa=this.fa()}};!function(t){t[t.jh=0]="jh",t[t.Sh=1]="Sh"}(q4||(q4={}));var Z4=class{m_(){this.k7t?this.C7t=1:this.Qo.x7t()}p_(){this.k7t?this.C7t=0:this.Qo.O7t()}get j7t(){return this.z7t}P7t(t){-11===t&&Eo("A connection has been established with the CSM, but the stream cannot be paused. This is only valid for Linear playback"),this.Qo.B7t(Tt({},this.QP,{sources:[Tt({},this.R7t,{src:this.W9t&&this.W9t.masterPlaylist(),type:this.R7t&&this.R7t.type})]})),this.U7t(),0===this.C7t&&this.Qo.O7t()}Q7t(t){let i;i=-11===t?"Yospace: A connection has been established with the CSM, but the stream cannot be paused. This is only valid for Linear playback":-2===t?"Yospace: The primary URL is not a valid SSAI stream":-10===t?"Yospace: The stream URL is not correctly formatted":-1===t?"Yospace: Connection error":-3===t?"Yospace: Connection timeout":"Yospace: Session could not be initialised",this.W9t&&(this.W9t.shutdown(),this.W9t=void 0),this.Qo.F7t(new $i(td.SOURCE_INVALID,i))}ga(t){this.QP=t,this.Y7t(),this.R7t=t?Po(t.sources,F4):void 0;let i=!!Qr.YSSessionManager;if(this.R7t,this.R7t&&this.R7t.src&&i){this.k7t=!0;const t=Qr.YSSessionManager;let i;switch(this.R7t.ssai.streamType){case"vod":i=t.createForVoD;break;case"livepause":i=t.createForLivePause;break;case"nonlinear":i=t.createForNonLinear;break;default:i=t.createForLive}const e=i(this.R7t.src,{},this.G7t);if(this.V7t(e),!this.V8t)throw new g("An error occured while instantiating a YospaceSessionManager");this.z7t.V9t(e,this.V8t),this.W7t=this.startPositionPoller(),this.H7t=this.Qo.Pf}else this.k7t=!1,this.Qo.B7t(t)}V7t(t){this.W9t=t,this.tet.V9t(this.W9t),this.q7t&&this.q7t.gn(),this.q7t=new O4(this.Qo.nt,this.tet),this.X7t&&this.X7t.gn(),this.X7t=new H4(this.Qo.nt,this.tet),this.V8t&&this.V8t.gn();const i=new W4(this.Qo.we,this.tet);this.V8t=new V4(this.W9t,i)}Y7t(){var t;this.Qo.fn("presentationmodechange",this.Z7t),this.Qo.fn(Co.Ew,this.rHt),this.Qo.fn(Co.jh,this.K7t),this.Qo.fn(Co.jh,this.J7t),this.Qo.fn(Co.Jg,this.Mh),this.Qo.fn(Co.Sh,this.eBt),this.Qo.fn(Co.yw,this.We),this.Qo.fn(Co.pw,this.aP),this.Qo.fn(Zt.Bw,this.rA),this.Qo.fn(Zt.Rw,this.lA),m(this.W7t),this.W7t=null,this.C7t=1,this.k7t=!1,null==(t=this.W9t)||t.shutdown(),this.W9t=void 0}gn(){this.Y7t(),this.j7t.gn()}constructor(t){this.tet=new x4(Qr.YSPlayerEvents),this.k7t=!1,this.C7t=1,this.z7t=new X4,this.$7t=!1,this.H7t=!1,this.G7t=(t,i)=>{if(!this.W9t)throw new g("An error occured while instantiating a YospaceSessionManager");if(this.k7t=!1,"ready"===t)this.P7t(i);else this.Q7t(i)},this.U7t=()=>{this.Qo.yn("presentationmodechange",this.Z7t),this.Qo.yn(Co.Ew,this.rHt),this.Qo.yn(Co.jh,this.K7t),this.Qo.yn(Co.Jg,this.Mh),this.Qo.yn(Co.Sh,this.eBt),this.Qo.yn(Co.yw,this.We),this.Qo.yn(Co.pw,this.aP),this.Qo.yn(Zt.Bw,this.rA),this.Qo.yn(Zt.Rw,this.lA)},this.Z7t=()=>{this.tet.H9t(Bi.Ah,this.Qo.cs())},this.rHt=()=>{const t=this.Qo.Pf;t!==this.H7t&&(this.H7t=t,this.tet.H9t(Bi.TQt,t))},this.K7t=()=>{this.Qo.fn(Co.jh,this.K7t),this.Qo.yn(Co.jh,this.J7t),this.tet.H9t(Bi.kyt)},this.J7t=()=>{this.tet.H9t(Bi.DQt)},this.Mh=()=>{this.tet.H9t(Bi.R9t)},this.eBt=()=>{this.tet.H9t(Bi.Sh)},this.We=()=>{this.tet.H9t(Bi.F9t)},this.aP=()=>{this.tet.H9t(Bi.Q9t)},this.rA=()=>{this.$7t=!0,this.tet.H9t(Bi.Y9t)},this.lA=()=>{this.$7t&&(this.tet.H9t(Bi.B9t),this.$7t=!1)},this.startPositionPoller=()=>{let t=-1;return v((()=>{let i=this.Qo.Tf();i!==t&&(t=i,this.tet.H9t(Bi.eYt,i))}),250)},this.Qo=t}};Z((function(t){return class extends t{ga(t){this.cNt(),this.tti.ga(t)}p_(){this.tti.p_()}m_(){this.tti.m_()}Lf(){var t;return null!=(t=this.Oz)?t:super.Lf()}Ef(){var t;return null!=(t=this.xz)?t:super.Ef()}B7t(t){super.ga(t)}O7t(){super.p_()}x7t(){super.m_()}F7t(t){this.Oz=t,this.xz=Zr(this.Oz),this.Co(new fh(this.Oz))}fa(){let t=this.tti.j7t;return vi(super.fa(),{get yospace(){return t.va}})}cNt(){this.xz=void 0,this.Oz=void 0}gn(){this.tti.gn(),super.gn()}constructor(t,i){super(t,i),this.xz=void 0,this.Oz=void 0,this.tti=new Z4(this)}}}),Zo.T7);var K4="VPAID";function J4(t){return"spotx"===t.integration}He.yb.oR(new class t{get $Ht(){return this.iti.$Ht}hR(t){return J4(t)}tqt(i,e,s){return s.ads||(s.ads=Lw({})),s.ads.vpaidMode=s.ads.vpaidMode||t.eti(),this.iti.tqt(i,e,s)}Z1(i,e,s,n){!function(t){if(!J4(t))throw new g("Unknown ad integration: "+t.integration)}(i);const r=t.sti(i,s.we);this.iti.Z1(r,e,s,n)}DQ(t){const i=ie(t);if(!S(i.id))return i.queryParameters||(i.queryParameters={}),i.custom&&(i.queryParameters.custom?Eo('"custom" parameter is redefined in queryParameters! Please use "queryParameters.custom" only!'):(i.queryParameters.custom=i.custom,delete i.custom)),i.app&&(i.queryParameters.app?Eo('"app" parameter is redefined in queryParameters! Please use "queryParameters.app" only!'):(i.queryParameters.app=i.app,delete i.app)),i.device&&(i.queryParameters.device?Eo('"device" parameter is redefined in queryParameters! Please use "queryParameters.device" only!'):(i.queryParameters.device=i.device,delete i.device)),i.user&&(i.queryParameters.user?Eo('"user" parameter is redefined in queryParameters! Please use "queryParameters.user" only!'):(i.queryParameters.user=i.user,delete i.user)),i.ipAddress&&(i.queryParameters.ip_addr?Eo('"ipAddress" parameter is redefined in queryParameters! Please use "queryParameters.ip_addr" or "ipAddress" only!'):(i.queryParameters.ip_addr=i.ipAddress,delete i.ipAddress)),i.maximumAdDuration&&(i.queryParameters.VMaxd?Eo('"maximumAdDuration" parameter is redefined in queryParameters! Please use "queryParameters.VMaxd" or "maximumAdDuration" only!'):(i.queryParameters.VMaxd=i.maximumAdDuration,delete i.maximumAdDuration)),i}static sti(i,e){return{integration:Os.SPOTX,sources:{src:t.nti(i,Qr.location.href,e.offsetWidth,e.offsetHeight,fi.fb)}}}static nti(i,e,s,n,r){if(i.sources)return i.sources;let h=n,o=s;r&&0===o&&(o=320,h=180);const a={custom_skin:1,player_width:o,player_height:h};i.cacheBuster&&(a.cb=_.random()),t.rti(e)&&(a.content_page_url=e);const u=Tt({},a,i.queryParameters);return u[K4]||u.VPI||(u[K4]="js"),"https://search.spotxchange.com/vast/2.0/"+i.id+"?"+t.hti(u)}static rti(t){return D(t,"http://")||D(t,"https://")}static hti(t){return ZK(t)}static eti(){return fi.bE?aw.ENABLED:aw.INSECURE}constructor(){this.iti=new a0}});var bn=void 0!==s?s:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},$4=function(){return/Android/i.test(ed.userAgent)||/iPhone|iPad|iPod/i.test(ed.userAgent)},t2=function(t,i){for(var e=0,s=t.length;e<s;e++)i[e]=t[e]},i2=function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e]);return t},e2=function(){function t(t,i){for(var e=0;e<i.length;e++){var s=i[e];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),w.defineProperty(t,s.key,s)}}return function(i,e,s){return e&&t(i.prototype,e),s&&t(i,s),i}}(),s2=function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in w(t))return function(t,i){var e=[],s=!0,n=!1,r=void 0;try{for(var h,o=t[Symbol.iterator]();!(s=(h=o.next()).done)&&(e.push(h.value),!i||e.length!==i);s=!0);}catch(t){n=!0,r=t}finally{try{!s&&o.return&&o.return()}finally{if(n)throw r}}return e}(t,i);throw new b("Invalid attempt to destructure non-iterable instance")},n2=function(t,i,e){return t+(i-t)*e},Bc=function(){var t=/iPad|iPhone|iPod/.test(ed.platform);return function(){return t}}(),r2=function(){var t=-1!==ed.userAgent.indexOf("Version")&&-1!==ed.userAgent.indexOf("Android")&&-1!==ed.userAgent.indexOf("Chrome");return function(){return t}}(),h2=(function(){var t=/^((?!chrome|android).)*safari/i.test(ed.userAgent)}(),function(){var t=-1!==ed.userAgent.indexOf("Firefox")&&-1!==ed.userAgent.indexOf("Android");return function(){return t}}()),o2=function(){var t=ed.userAgent.match(/.*Chrome\/([0-9]+)/),i=t?x(t[1],10):null;return function(){return i}}(),a2=function(){var t=!1;if(65===o2()){var i=ed.userAgent.match(/.*Chrome\/([0-9\.]*)/);if(i){var e=i[1].split("."),s=s2(e,4),n=(s[0],s[1],s[2]),r=s[3];t=3325===x(n,10)&&x(r,10)<148}}return function(){return t}}(),u2=function(){var t=-1!==ed.userAgent.indexOf("R7 Build");return function(){return t}}(),c2=function(){var t=90==s.orientation||-90==s.orientation;return u2()?!t:t},d2=function(){return _.max(s.screen.width,s.screen.height)*s.devicePixelRatio},l2=function(){return _.min(s.screen.width,s.screen.height)*s.devicePixelRatio},f2=function(){if(h.exitFullscreen)h.exitFullscreen();else if(h.webkitExitFullscreen)h.webkitExitFullscreen();else if(h.mozCancelFullScreen)h.mozCancelFullScreen();else{if(!h.msExitFullscreen)return!1;h.msExitFullscreen()}return!0},_2=function(t,i,e,s){var n=t.createShader(t.VERTEX_SHADER);t.shaderSource(n,i),t.compileShader(n);var r=t.createShader(t.FRAGMENT_SHADER);t.shaderSource(r,e),t.compileShader(r);var h=t.createProgram();for(var o in t.attachShader(h,n),t.attachShader(h,r),s)t.bindAttribLocation(h,s[o],o);return t.linkProgram(h),t.deleteShader(n),t.deleteShader(r),h},g2=function(t,i){for(var e={},s=t.getProgramParameter(i,t.ACTIVE_UNIFORMS),n="",r=0;r<s;r++){e[n=t.getActiveUniform(i,r).name.replace("[0]","")]=t.getUniformLocation(i,n)}return e},w2=function(){var t,i=!1;return t=ed.userAgent||ed.vendor||s.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(i=!0),i},A2=function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e]);return t},Wo=[],v2=function(t){if(Bc()){m2(t);var i,e,n=t.style.width,r=t.style.height,h=t.offsetWidth+1,o=t.offsetHeight;t.style.width=h+"px",t.style.height=o+"px";var a=function(){s.cancelAnimationFrame(e);for(var h=0;h<Wo.length;h++)if(Wo[h]===i){t.style.width=n,t.style.height=r,Wo.splice(h,1);break}};i={u7:t,oti:a},Wo.push(i),e=s.requestAnimationFrame(a)}},m2=function(t){if(Bc())for(var i=0;i<Wo.length;i++)if(Wo[i].u7===t){Wo[i].oti();break}},p2=function(){var t=_.PI/180,i=.25*_.PI;var e=new Float32Array([0,0,0,1]),s=new Float32Array([0,0,0]);function n(n,r,h,o,a,u){!function(e,s,n,r){var h=_.tan(s?s.upDegrees*t:i),o=_.tan(s?s.downDegrees*t:i),a=_.tan(s?s.leftDegrees*t:i),u=_.tan(s?s.rightDegrees*t:i),c=2/(a+u),d=2/(h+o);e[0]=c,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=d,e[6]=0,e[7]=0,e[8]=-(a-u)*c*.5,e[9]=(h-o)*d*.5,e[10]=r/(n-r),e[11]=-1,e[12]=0,e[13]=0,e[14]=r*n/(n-r),e[15]=0}(n,o||null,u.depthNear,u.depthFar),function(t,i,e){var s=i[0],n=i[1],r=i[2],h=i[3],o=s+s,a=n+n,u=r+r,c=s*o,d=s*a,l=s*u,f=n*a,_=n*u,g=r*u,w=h*o,A=h*a,v=h*u;t[0]=1-(f+g),t[1]=d+v,t[2]=l-A,t[3]=0,t[4]=d-v,t[5]=1-(c+g),t[6]=_+w,t[7]=0,t[8]=l+A,t[9]=_-w,t[10]=1-(c+f),t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1}(r,h.orientation||e,h.position||s),a&&function(t,i,e){var s,n,r,h,o,a,u,c,d,l,f,_,g=e[0],w=e[1],A=e[2];i===t?(t[12]=i[0]*g+i[4]*w+i[8]*A+i[12],t[13]=i[1]*g+i[5]*w+i[9]*A+i[13],t[14]=i[2]*g+i[6]*w+i[10]*A+i[14],t[15]=i[3]*g+i[7]*w+i[11]*A+i[15]):(s=i[0],n=i[1],r=i[2],h=i[3],o=i[4],a=i[5],u=i[6],c=i[7],d=i[8],l=i[9],f=i[10],_=i[11],t[0]=s,t[1]=n,t[2]=r,t[3]=h,t[4]=o,t[5]=a,t[6]=u,t[7]=c,t[8]=d,t[9]=l,t[10]=f,t[11]=_,t[12]=s*g+o*w+d*A+i[12],t[13]=n*g+a*w+l*A+i[13],t[14]=r*g+u*w+f*A+i[14],t[15]=h*g+c*w+_*A+i[15])}(r,r,a),function(t,i){var e=i[0],s=i[1],n=i[2],r=i[3],h=i[4],o=i[5],a=i[6],u=i[7],c=i[8],d=i[9],l=i[10],f=i[11],_=i[12],g=i[13],w=i[14],A=i[15],v=e*o-s*h,m=e*a-n*h,p=e*u-r*h,y=s*a-n*o,M=s*u-r*o,T=n*u-r*a,N=c*g-d*_,D=c*w-l*_,S=c*A-f*_,I=d*w-l*g,E=d*A-f*g,b=l*A-f*w,L=v*b-m*E+p*I+y*S-M*D+T*N;L&&(L=1/L,t[0]=(o*b-a*E+u*I)*L,t[1]=(n*E-s*b-r*I)*L,t[2]=(g*T-w*M+A*y)*L,t[3]=(l*M-d*T-f*y)*L,t[4]=(a*S-h*b-u*D)*L,t[5]=(e*b-n*S+r*D)*L,t[6]=(w*p-_*T-A*m)*L,t[7]=(c*T-l*p+f*m)*L,t[8]=(h*E-o*S+u*N)*L,t[9]=(s*S-e*E-r*N)*L,t[10]=(_*M-g*p+A*v)*L,t[11]=(d*p-c*M-f*v)*L,t[12]=(o*D-h*I-a*N)*L,t[13]=(e*I-s*D+n*N)*L,t[14]=(g*m-_*y-w*v)*L,t[15]=(c*y-d*m+l*v)*L)}(r,r)}return function(t,i,e){return!(!t||!i)&&(t.pose=i,t.timestamp=i.timestamp,n(t.leftProjectionMatrix,t.leftViewMatrix,i,e.ati("left"),e.uti("left"),e),n(t.rightProjectionMatrix,t.rightViewMatrix,i,e.ati("right"),e.uti("right"),e),!0)}}(),y2=function(t){var i,e=t.indexOf("://");i=-1!==e?e+3:0;var s=t.indexOf("/",i);return-1===s&&(s=t.length),t.substring(0,s)},M2=function(){var t={};return function(i,e){void 0===t[i]&&(console.warn("webvr-polyfill: "+e),t[i]=!0)}}(),_o=function(t,i){M2(t,t+" has been deprecated. This may not work on native WebVR displays. "+(i?"Please use "+i+" instead.":""))};var T2=function(t,i,e){if(i){for(var s=[],n=null,r=0;r<i.length;++r){switch(h=i[r]){case t.TEXTURE_BINDING_2D:case t.TEXTURE_BINDING_CUBE_MAP:if((a=i[++r])<t.TEXTURE0||a>t.TEXTURE31){console.error("TEXTURE_BINDING_2D or TEXTURE_BINDING_CUBE_MAP must be followed by a valid texture unit"),s.push(null,null);break}n||(n=t.getParameter(t.ACTIVE_TEXTURE)),t.activeTexture(a),s.push(t.getParameter(h),null);break;case t.ACTIVE_TEXTURE:n=t.getParameter(t.ACTIVE_TEXTURE),s.push(null);break;default:s.push(t.getParameter(h))}}e(t);for(r=0;r<i.length;++r){var h=i[r],o=s[r];switch(h){case t.ACTIVE_TEXTURE:break;case t.ARRAY_BUFFER_BINDING:t.bindBuffer(t.ARRAY_BUFFER,o);break;case t.COLOR_CLEAR_VALUE:t.clearColor(o[0],o[1],o[2],o[3]);break;case t.COLOR_WRITEMASK:t.colorMask(o[0],o[1],o[2],o[3]);break;case t.CURRENT_PROGRAM:t.useProgram(o);break;case t.ELEMENT_ARRAY_BUFFER_BINDING:t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,o);break;case t.FRAMEBUFFER_BINDING:t.bindFramebuffer(t.FRAMEBUFFER,o);break;case t.RENDERBUFFER_BINDING:t.bindRenderbuffer(t.RENDERBUFFER,o);break;case t.TEXTURE_BINDING_2D:if((a=i[++r])<t.TEXTURE0||a>t.TEXTURE31)break;t.activeTexture(a),t.bindTexture(t.TEXTURE_2D,o);break;case t.TEXTURE_BINDING_CUBE_MAP:var a;if((a=i[++r])<t.TEXTURE0||a>t.TEXTURE31)break;t.activeTexture(a),t.bindTexture(t.TEXTURE_CUBE_MAP,o);break;case t.VIEWPORT:t.viewport(o[0],o[1],o[2],o[3]);break;case t.BLEND:case t.CULL_FACE:case t.DEPTH_TEST:case t.SCISSOR_TEST:case t.STENCIL_TEST:o?t.enable(h):t.disable(h);break;default:console.log("No GL restore behavior for 0x"+h.toString(16))}n&&t.activeTexture(n)}}else e(t)},N2=["attribute vec2 position;","attribute vec3 texCoord;","varying vec2 vTexCoord;","uniform vec4 viewportOffsetScale[2];","void main() {"," vec4 viewport = viewportOffsetScale[int(texCoord.z)];"," vTexCoord = (texCoord.xy * viewport.zw) + viewport.xy;"," gl_Position = vec4( position, 1.0, 1.0 );","}"].join("\n"),D2=["precision mediump float;","uniform sampler2D diffuse;","varying vec2 vTexCoord;","void main() {"," gl_FragColor = texture2D(diffuse, vTexCoord);","}"].join("\n");function us(t,i,e,s){this.gl=t,this.cardboardUI=i,this.bufferScale=e,this.dirtySubmitFrameBindings=s,this.ctxAttribs=t.getContextAttributes(),this.meshWidth=20,this.meshHeight=20,this.bufferWidth=t.drawingBufferWidth,this.bufferHeight=t.drawingBufferHeight,this.realBindFramebuffer=t.bindFramebuffer,this.realEnable=t.enable,this.realDisable=t.disable,this.realColorMask=t.colorMask,this.realClearColor=t.clearColor,this.realViewport=t.viewport,Bc()||(this.realCanvasWidth=w.getOwnPropertyDescriptor(t.canvas.__proto__,"width"),this.realCanvasHeight=w.getOwnPropertyDescriptor(t.canvas.__proto__,"height")),this.isPatched=!1,this.lastBoundFramebuffer=null,this.cullFace=!1,this.depthTest=!1,this.blend=!1,this.scissorTest=!1,this.stencilTest=!1,this.viewport=[0,0,0,0],this.colorMask=[!0,!0,!0,!0],this.clearColor=[0,0,0,0],this.attribs={position:0,texCoord:1},this.program=_2(t,N2,D2,this.attribs),this.uniforms=g2(t,this.program),this.viewportOffsetScale=new Float32Array(8),this.setTextureBounds(),this.vertexBuffer=t.createBuffer(),this.indexBuffer=t.createBuffer(),this.indexCount=0,this.renderTarget=t.createTexture(),this.framebuffer=t.createFramebuffer(),this.depthStencilBuffer=null,this.depthBuffer=null,this.stencilBuffer=null,this.ctxAttribs.depth&&this.ctxAttribs.stencil?this.depthStencilBuffer=t.createRenderbuffer():this.ctxAttribs.depth?this.depthBuffer=t.createRenderbuffer():this.ctxAttribs.stencil&&(this.stencilBuffer=t.createRenderbuffer()),this.patch(),this.onResize()}us.prototype.destroy=function(){var t=this.gl;this.unpatch(),t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),t.deleteBuffer(this.indexBuffer),t.deleteTexture(this.renderTarget),t.deleteFramebuffer(this.framebuffer),this.depthStencilBuffer&&t.deleteRenderbuffer(this.depthStencilBuffer),this.depthBuffer&&t.deleteRenderbuffer(this.depthBuffer),this.stencilBuffer&&t.deleteRenderbuffer(this.stencilBuffer),this.cardboardUI&&this.cardboardUI.destroy()},us.prototype.onResize=function(){var t=this.gl,i=this,e=[t.RENDERBUFFER_BINDING,t.TEXTURE_BINDING_2D,t.TEXTURE0];T2(t,e,(function(t){i.realBindFramebuffer.call(t,t.FRAMEBUFFER,null),i.scissorTest&&i.realDisable.call(t,t.SCISSOR_TEST),i.realColorMask.call(t,!0,!0,!0,!0),i.realViewport.call(t,0,0,t.drawingBufferWidth,t.drawingBufferHeight),i.realClearColor.call(t,0,0,0,1),t.clear(t.COLOR_BUFFER_BIT),i.realBindFramebuffer.call(t,t.FRAMEBUFFER,i.framebuffer),t.bindTexture(t.TEXTURE_2D,i.renderTarget),t.texImage2D(t.TEXTURE_2D,0,i.ctxAttribs.alpha?t.RGBA:t.RGB,i.bufferWidth,i.bufferHeight,0,i.ctxAttribs.alpha?t.RGBA:t.RGB,t.UNSIGNED_BYTE,null),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,i.renderTarget,0),i.ctxAttribs.depth&&i.ctxAttribs.stencil?(t.bindRenderbuffer(t.RENDERBUFFER,i.depthStencilBuffer),t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,i.bufferWidth,i.bufferHeight),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,i.depthStencilBuffer)):i.ctxAttribs.depth?(t.bindRenderbuffer(t.RENDERBUFFER,i.depthBuffer),t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,i.bufferWidth,i.bufferHeight),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,i.depthBuffer)):i.ctxAttribs.stencil&&(t.bindRenderbuffer(t.RENDERBUFFER,i.stencilBuffer),t.renderbufferStorage(t.RENDERBUFFER,t.STENCIL_INDEX8,i.bufferWidth,i.bufferHeight),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.STENCIL_ATTACHMENT,t.RENDERBUFFER,i.stencilBuffer)),!t.checkFramebufferStatus(t.FRAMEBUFFER)===t.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer incomplete!"),i.realBindFramebuffer.call(t,t.FRAMEBUFFER,i.lastBoundFramebuffer),i.scissorTest&&i.realEnable.call(t,t.SCISSOR_TEST),i.realColorMask.apply(t,i.colorMask),i.realViewport.apply(t,i.viewport),i.realClearColor.apply(t,i.clearColor)})),this.cardboardUI&&this.cardboardUI.onResize()},us.prototype.patch=function(){if(!this.isPatched){var t=this,i=this.gl.canvas,e=this.gl;Bc()||(i.width=d2()*this.bufferScale,i.height=l2()*this.bufferScale,w.defineProperty(i,"width",{configurable:!0,enumerable:!0,get:function(){return t.bufferWidth},set:function(e){t.bufferWidth=e,t.realCanvasWidth.set.call(i,e),t.onResize()}}),w.defineProperty(i,"height",{configurable:!0,enumerable:!0,get:function(){return t.bufferHeight},set:function(e){t.bufferHeight=e,t.realCanvasHeight.set.call(i,e),t.onResize()}})),this.lastBoundFramebuffer=e.getParameter(e.FRAMEBUFFER_BINDING),null==this.lastBoundFramebuffer&&(this.lastBoundFramebuffer=this.framebuffer,this.gl.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer)),this.gl.bindFramebuffer=function(i,s){t.lastBoundFramebuffer=s||t.framebuffer,t.realBindFramebuffer.call(e,i,t.lastBoundFramebuffer)},this.cullFace=e.getParameter(e.CULL_FACE),this.depthTest=e.getParameter(e.DEPTH_TEST),this.blend=e.getParameter(e.BLEND),this.scissorTest=e.getParameter(e.SCISSOR_TEST),this.stencilTest=e.getParameter(e.STENCIL_TEST),e.enable=function(i){switch(i){case e.CULL_FACE:t.cullFace=!0;break;case e.DEPTH_TEST:t.depthTest=!0;break;case e.BLEND:t.blend=!0;break;case e.SCISSOR_TEST:t.scissorTest=!0;break;case e.STENCIL_TEST:t.stencilTest=!0}t.realEnable.call(e,i)},e.disable=function(i){switch(i){case e.CULL_FACE:t.cullFace=!1;break;case e.DEPTH_TEST:t.depthTest=!1;break;case e.BLEND:t.blend=!1;break;case e.SCISSOR_TEST:t.scissorTest=!1;break;case e.STENCIL_TEST:t.stencilTest=!1}t.realDisable.call(e,i)},this.colorMask=e.getParameter(e.COLOR_WRITEMASK),e.colorMask=function(i,s,n,r){t.colorMask[0]=i,t.colorMask[1]=s,t.colorMask[2]=n,t.colorMask[3]=r,t.realColorMask.call(e,i,s,n,r)},this.clearColor=e.getParameter(e.COLOR_CLEAR_VALUE),e.clearColor=function(i,s,n,r){t.clearColor[0]=i,t.clearColor[1]=s,t.clearColor[2]=n,t.clearColor[3]=r,t.realClearColor.call(e,i,s,n,r)},this.viewport=e.getParameter(e.VIEWPORT),e.viewport=function(i,s,n,r){t.viewport[0]=i,t.viewport[1]=s,t.viewport[2]=n,t.viewport[3]=r,t.realViewport.call(e,i,s,n,r)},this.isPatched=!0,v2(i)}},us.prototype.unpatch=function(){if(this.isPatched){var t=this.gl,i=this.gl.canvas;Bc()||(w.defineProperty(i,"width",this.realCanvasWidth),w.defineProperty(i,"height",this.realCanvasHeight)),i.width=this.bufferWidth,i.height=this.bufferHeight,t.bindFramebuffer=this.realBindFramebuffer,t.enable=this.realEnable,t.disable=this.realDisable,t.colorMask=this.realColorMask,t.clearColor=this.realClearColor,t.viewport=this.realViewport,this.lastBoundFramebuffer==this.framebuffer&&t.bindFramebuffer(t.FRAMEBUFFER,null),this.isPatched=!1,u((function(){v2(i)}),1)}},us.prototype.setTextureBounds=function(t,i){t||(t=[0,0,.5,1]),i||(i=[.5,0,.5,1]),this.viewportOffsetScale[0]=t[0],this.viewportOffsetScale[1]=t[1],this.viewportOffsetScale[2]=t[2],this.viewportOffsetScale[3]=t[3],this.viewportOffsetScale[4]=i[0],this.viewportOffsetScale[5]=i[1],this.viewportOffsetScale[6]=i[2],this.viewportOffsetScale[7]=i[3]},us.prototype.submitFrame=function(){var t=this.gl,i=this,e=[];if(this.dirtySubmitFrameBindings||e.push(t.CURRENT_PROGRAM,t.ARRAY_BUFFER_BINDING,t.ELEMENT_ARRAY_BUFFER_BINDING,t.TEXTURE_BINDING_2D,t.TEXTURE0),T2(t,e,(function(t){i.realBindFramebuffer.call(t,t.FRAMEBUFFER,null),i.cullFace&&i.realDisable.call(t,t.CULL_FACE),i.depthTest&&i.realDisable.call(t,t.DEPTH_TEST),i.blend&&i.realDisable.call(t,t.BLEND),i.scissorTest&&i.realDisable.call(t,t.SCISSOR_TEST),i.stencilTest&&i.realDisable.call(t,t.STENCIL_TEST),i.realColorMask.call(t,!0,!0,!0,!0),i.realViewport.call(t,0,0,t.drawingBufferWidth,t.drawingBufferHeight),(i.ctxAttribs.alpha||Bc())&&(i.realClearColor.call(t,0,0,0,1),t.clear(t.COLOR_BUFFER_BIT)),t.useProgram(i.program),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,i.indexBuffer),t.bindBuffer(t.ARRAY_BUFFER,i.vertexBuffer),t.enableVertexAttribArray(i.attribs.position),t.enableVertexAttribArray(i.attribs.texCoord),t.vertexAttribPointer(i.attribs.position,2,t.FLOAT,!1,20,0),t.vertexAttribPointer(i.attribs.texCoord,3,t.FLOAT,!1,20,8),t.activeTexture(t.TEXTURE0),t.uniform1i(i.uniforms.diffuse,0),t.bindTexture(t.TEXTURE_2D,i.renderTarget),t.uniform4fv(i.uniforms.viewportOffsetScale,i.viewportOffsetScale),t.drawElements(t.TRIANGLES,i.indexCount,t.UNSIGNED_SHORT,0),i.cardboardUI&&i.cardboardUI.renderNoState(),i.realBindFramebuffer.call(i.gl,t.FRAMEBUFFER,i.framebuffer),i.ctxAttribs.preserveDrawingBuffer||(i.realClearColor.call(t,0,0,0,0),t.clear(t.COLOR_BUFFER_BIT)),i.dirtySubmitFrameBindings||i.realBindFramebuffer.call(t,t.FRAMEBUFFER,i.lastBoundFramebuffer),i.cullFace&&i.realEnable.call(t,t.CULL_FACE),i.depthTest&&i.realEnable.call(t,t.DEPTH_TEST),i.blend&&i.realEnable.call(t,t.BLEND),i.scissorTest&&i.realEnable.call(t,t.SCISSOR_TEST),i.stencilTest&&i.realEnable.call(t,t.STENCIL_TEST),i.realColorMask.apply(t,i.colorMask),i.realViewport.apply(t,i.viewport),!i.ctxAttribs.alpha&&i.ctxAttribs.preserveDrawingBuffer||i.realClearColor.apply(t,i.clearColor)})),Bc()){var s=t.canvas;s.width==i.bufferWidth&&s.height==i.bufferHeight||(i.bufferWidth=s.width,i.bufferHeight=s.height,i.onResize())}},us.prototype.updateDeviceInfo=function(t){var i=this.gl,e=this,s=[i.ARRAY_BUFFER_BINDING,i.ELEMENT_ARRAY_BUFFER_BINDING];T2(i,s,(function(i){var s=e.cti(e.meshWidth,e.meshHeight,t);if(i.bindBuffer(i.ARRAY_BUFFER,e.vertexBuffer),i.bufferData(i.ARRAY_BUFFER,s,i.STATIC_DRAW),!e.indexCount){var n=e.dti(e.meshWidth,e.meshHeight);i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,e.indexBuffer),i.bufferData(i.ELEMENT_ARRAY_BUFFER,n,i.STATIC_DRAW),e.indexCount=n.length}}))},us.prototype.cti=function(t,i,e){for(var s=new Float32Array(2*t*i*5),n=e.getLeftEyeVisibleTanAngles(),r=e.getLeftEyeNoLensTanAngles(),h=e.getLeftEyeVisibleScreenRect(r),o=0,a=0;a<2;a++){for(var u=0;u<i;u++)for(var c=0;c<t;c++,o++){var d=c/(t-1),l=u/(i-1),f=d,g=l,w=n2(n[0],n[2],d),A=n2(n[3],n[1],l),v=_.sqrt(w*w+A*A),m=e.distortion.distortInverse(v),p=A*m/v;d=(w*m/v-r[0])/(r[2]-r[0]),l=(p-r[3])/(r[1]-r[3]),d=2*(h.x+d*h.width-.5),l=2*(h.y+l*h.height-.5),s[5*o+0]=d,s[5*o+1]=l,s[5*o+2]=f,s[5*o+3]=g,s[5*o+4]=a}var y=n[2]-n[0];n[0]=-(y+n[0]),n[2]=y-n[2],y=r[2]-r[0],r[0]=-(y+r[0]),r[2]=y-r[2],h.x=1-(h.x+h.width)}return s},us.prototype.dti=function(t,i){for(var e=new Uint16Array(2*(t-1)*(i-1)*6),s=t/2,n=i/2,r=0,h=0,o=0;o<2;o++)for(var a=0;a<i;a++)for(var u=0;u<t;u++,r++)0!=u&&0!=a&&(u<=s==a<=n?(e[h++]=r,e[h++]=r-t-1,e[h++]=r-t,e[h++]=r-t-1,e[h++]=r,e[h++]=r-1):(e[h++]=r-1,e[h++]=r-t,e[h++]=r,e[h++]=r-t,e[h++]=r-1,e[h++]=r-t-1));return e},us.prototype.lti=function(t,i){var e=w.getOwnPropertyDescriptor(t,i);return void 0!==e.get&&void 0!==e.set||(e.configurable=!0,e.enumerable=!0,e.get=function(){return this.getAttribute(i)},e.set=function(t){this.setAttribute(i,t)}),e};var S2=["attribute vec2 position;","uniform mat4 projectionMat;","void main() {"," gl_Position = projectionMat * vec4( position, -1.0, 1.0 );","}"].join("\n"),I2=["precision mediump float;","uniform vec4 color;","void main() {"," gl_FragColor = color;","}"].join("\n"),E2=_.PI/180,b2=.3125,So=28;function zo(t){this.gl=t,this.attribs={position:0},this.program=_2(t,S2,I2,this.attribs),this.uniforms=g2(t,this.program),this.vertexBuffer=t.createBuffer(),this.gearOffset=0,this.gearVertexCount=0,this.arrowOffset=0,this.arrowVertexCount=0,this.projMat=new Float32Array(16),this.listener=null,this.onResize()}function L2(t){this.coefficients=t}zo.prototype.destroy=function(){var t=this.gl;this.listener&&t.canvas.removeEventListener("click",this.listener,!1),t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer)},zo.prototype.listen=function(t,i){var e=this.gl.canvas,s="undefined"!=typeof TouchEvent;this.listener=function(n){var r=e.clientWidth/2,h=s&&n instanceof TouchEvent?(n.preventDefault(),n.changedTouches[0]):n;h.clientX>r-42&&h.clientX<r+42&&h.clientY>e.clientHeight-42?(n.preventDefault(),n.stopImmediatePropagation(),t(n)):h.clientX<42&&h.clientY<42&&(n.preventDefault(),n.stopImmediatePropagation(),i(n))},e.addEventListener("click",this.listener,!1),e.addEventListener("touchstart",this.listener,!1)},zo.prototype.onResize=function(){var t=this.gl,i=this,e=[t.ARRAY_BUFFER_BINDING];T2(t,e,(function(t){var e=[],n=t.drawingBufferWidth/2,r=_.max(screen.width,screen.height)*s.devicePixelRatio,h=t.drawingBufferWidth/r*s.devicePixelRatio,o=4*h/2,a=42*h,u=So*h/2,c=14*h;function d(t,i){var s=(90-t)*E2,r=_.cos(s),h=_.sin(s);e.push(b2*r*u+n,b2*h*u+u),e.push(i*r*u+n,i*h*u+u)}e.push(n-o,a),e.push(n-o,t.drawingBufferHeight),e.push(n+o,a),e.push(n+o,t.drawingBufferHeight),i.gearOffset=e.length/2;for(var l=0;l<=6;l++){var f=60*l;d(f,1),d(f+12,1),d(f+20,.75),d(f+40,.75),d(f+48,1)}function g(i,s){e.push(c+i,t.drawingBufferHeight-c-s)}i.gearVertexCount=e.length/2-i.gearOffset,i.arrowOffset=e.length/2;var w=o/_.sin(45*E2);g(0,u),g(u,0),g(u+w,w),g(w,u+w),g(w,u-w),g(0,u),g(u,2*u),g(u+w,2*u-w),g(w,u-w),g(0,u),g(w,u-o),g(So*h,u-o),g(w,u+o),g(So*h,u+o),i.arrowVertexCount=e.length/2-i.arrowOffset,t.bindBuffer(t.ARRAY_BUFFER,i.vertexBuffer),t.bufferData(t.ARRAY_BUFFER,new Float32Array(e),t.STATIC_DRAW)}))},zo.prototype.render=function(){var t=this.gl,i=this,e=[t.CULL_FACE,t.DEPTH_TEST,t.BLEND,t.SCISSOR_TEST,t.STENCIL_TEST,t.COLOR_WRITEMASK,t.VIEWPORT,t.CURRENT_PROGRAM,t.ARRAY_BUFFER_BINDING];T2(t,e,(function(t){t.disable(t.CULL_FACE),t.disable(t.DEPTH_TEST),t.disable(t.BLEND),t.disable(t.SCISSOR_TEST),t.disable(t.STENCIL_TEST),t.colorMask(!0,!0,!0,!0),t.viewport(0,0,t.drawingBufferWidth,t.drawingBufferHeight),i.renderNoState()}))},zo.prototype.renderNoState=function(){var t,i,e,s,n,r,h,o,a,u,c=this.gl;c.useProgram(this.program),c.bindBuffer(c.ARRAY_BUFFER,this.vertexBuffer),c.enableVertexAttribArray(this.attribs.position),c.vertexAttribPointer(this.attribs.position,2,c.FLOAT,!1,8,0),c.uniform4f(this.uniforms.color,1,1,1,1),t=this.projMat,i=0,e=c.drawingBufferWidth,s=0,n=c.drawingBufferHeight,o=1/(i-e),a=1/(s-n),u=1/((r=.1)-(h=1024)),t[0]=-2*o,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(i+e)*o,t[13]=(n+s)*a,t[14]=(h+r)*u,t[15]=1,c.uniformMatrix4fv(this.uniforms.projectionMat,!1,this.projMat),c.drawArrays(c.TRIANGLE_STRIP,0,4),c.drawArrays(c.TRIANGLE_STRIP,this.gearOffset,this.gearVertexCount),c.drawArrays(c.TRIANGLE_STRIP,this.arrowOffset,this.arrowVertexCount)},L2.prototype.distortInverse=function(t){for(var i=0,e=1,s=t-this.distort(i);_.abs(e-i)>1e-4;){var n=t-this.distort(e),r=e-n*((e-i)/(n-s));i=e,e=r,s=n}return e},L2.prototype.distort=function(t){for(var i=t*t,e=0,s=0;s<this.coefficients.length;s++)e=i*(e+this.coefficients[s]);return(e+1)*t};var k2=_.PI/180,C2=180/_.PI,nn=function(t,i,e){this.x=t||0,this.y=i||0,this.z=e||0};nn.prototype={constructor:nn,set:function(t,i,e){return this.x=t,this.y=i,this.z=e,this},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},length:function(){return _.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},normalize:function(){var t=this.length();if(0!==t){var i=1/t;this.multiplyScalar(i)}else this.x=0,this.y=0,this.z=0;return this},multiplyScalar:function(t){this.x*=t,this.y*=t,this.z*=t},applyQuaternion:function(t){var i=this.x,e=this.y,s=this.z,n=t.x,r=t.y,h=t.z,o=t.w,a=o*i+r*s-h*e,u=o*e+h*i-n*s,c=o*s+n*e-r*i,d=-n*i-r*e-h*s;return this.x=a*o+d*-n+u*-h-c*-r,this.y=u*o+d*-r+c*-n-a*-h,this.z=c*o+d*-h+a*-r-u*-n,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},crossVectors:function(t,i){var e=t.x,s=t.y,n=t.z,r=i.x,h=i.y,o=i.z;return this.x=s*o-n*h,this.y=n*r-e*o,this.z=e*h-s*r,this}};var Ih=function(t,i,e,s){this.x=t||0,this.y=i||0,this.z=e||0,this.w=void 0!==s?s:1};function x2(t){this.width=t.width||d2(),this.height=t.height||l2(),this.widthMeters=t.widthMeters,this.heightMeters=t.heightMeters,this.bevelMeters=t.bevelMeters}Ih.prototype={constructor:Ih,set:function(t,i,e,s){return this.x=t,this.y=i,this.z=e,this.w=s,this},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},setFromEulerXYZ:function(t,i,e){var s=_.cos(t/2),n=_.cos(i/2),r=_.cos(e/2),h=_.sin(t/2),o=_.sin(i/2),a=_.sin(e/2);return this.x=h*n*r+s*o*a,this.y=s*o*r-h*n*a,this.z=s*n*a+h*o*r,this.w=s*n*r-h*o*a,this},setFromEulerYXZ:function(t,i,e){var s=_.cos(t/2),n=_.cos(i/2),r=_.cos(e/2),h=_.sin(t/2),o=_.sin(i/2),a=_.sin(e/2);return this.x=h*n*r+s*o*a,this.y=s*o*r-h*n*a,this.z=s*n*a-h*o*r,this.w=s*n*r+h*o*a,this},setFromAxisAngle:function(t,i){var e=i/2,s=_.sin(e);return this.x=t.x*s,this.y=t.y*s,this.z=t.z*s,this.w=_.cos(e),this},multiply:function(t){return this.multiplyQuaternions(this,t)},multiplyQuaternions:function(t,i){var e=t.x,s=t.y,n=t.z,r=t.w,h=i.x,o=i.y,a=i.z,u=i.w;return this.x=e*u+r*h+s*a-n*o,this.y=s*u+r*o+n*h-e*a,this.z=n*u+r*a+e*o-s*h,this.w=r*u-e*h-s*o-n*a,this},inverse:function(){return this.x*=-1,this.y*=-1,this.z*=-1,this.normalize(),this},normalize:function(){var t=_.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);return 0===t?(this.x=0,this.y=0,this.z=0,this.w=1):(t=1/t,this.x=this.x*t,this.y=this.y*t,this.z=this.z*t,this.w=this.w*t),this},slerp:function(t,i){if(0===i)return this;if(1===i)return this.copy(t);var e=this.x,s=this.y,n=this.z,r=this.w,h=r*t.w+e*t.x+s*t.y+n*t.z;if(h<0?(this.w=-t.w,this.x=-t.x,this.y=-t.y,this.z=-t.z,h=-h):this.copy(t),h>=1)return this.w=r,this.x=e,this.y=s,this.z=n,this;var o=_.acos(h),a=_.sqrt(1-h*h);if(_.abs(a)<.001)return this.w=.5*(r+this.w),this.x=.5*(e+this.x),this.y=.5*(s+this.y),this.z=.5*(n+this.z),this;var u=_.sin((1-i)*o)/a,c=_.sin(i*o)/a;return this.w=r*u+this.w*c,this.x=e*u+this.x*c,this.y=s*u+this.y*c,this.z=n*u+this.z*c,this},setFromUnitVectors:function(){var t,i;return function(e,s){return void 0===t&&(t=new nn),(i=e.dot(s)+1)<1e-6?(i=0,_.abs(e.x)>_.abs(e.z)?t.set(-e.y,e.x,0):t.set(0,-e.z,e.y)):t.crossVectors(e,s),this.x=t.x,this.y=t.y,this.z=t.z,this.w=i,this.normalize(),this}}()};var O2=new x2({widthMeters:.11,heightMeters:.062,bevelMeters:.004}),j2=new x2({widthMeters:.1038,heightMeters:.0584,bevelMeters:.004}),z2={CardboardV1:new P2({id:"CardboardV1",label:"Cardboard I/O 2014",fov:40,interLensDistance:.06,baselineLensDistance:.035,screenLensDistance:.042,distortionCoefficients:[.441,.156],inverseCoefficients:[-.4410035,.42756155,-.4804439,.5460139,-.58821183,.5733938,-.48303202,.33299083,-.17573841,.0651772,-.01488963,.001559834]}),CardboardV2:new P2({id:"CardboardV2",label:"Cardboard I/O 2015",fov:60,interLensDistance:.064,baselineLensDistance:.035,screenLensDistance:.039,distortionCoefficients:[.34,.55],inverseCoefficients:[-.33836704,-.18162185,.862655,-1.2462051,1.0560602,-.58208317,.21609078,-.05444823,.009177956,-.0009904169,6183535e-11,-16981803e-13]})};function va(t){this.viewer=z2.CardboardV2,this.updateDeviceParams(t),this.distortion=new L2(this.viewer.distortionCoefficients)}function P2(t){this.id=t.id,this.label=t.label,this.fov=t.fov,this.interLensDistance=t.interLensDistance,this.baselineLensDistance=t.baselineLensDistance,this.screenLensDistance=t.screenLensDistance,this.distortionCoefficients=t.distortionCoefficients,this.inverseCoefficients=t.inverseCoefficients}va.prototype.updateDeviceParams=function(t){this.device=this.fti(t)||this.device},va.prototype.getDevice=function(){return this.device},va.prototype.setViewer=function(t){this.viewer=t,this.distortion=new L2(this.viewer.distortionCoefficients)},va.prototype.fti=function(t){if(!t)return Bc()?(console.warn("Using fallback iOS device measurements."),j2):(console.warn("Using fallback Android device measurements."),O2);var i=.0254,e=i/t.xdpi,s=i/t.ydpi;return new x2({widthMeters:e*d2(),heightMeters:s*l2(),bevelMeters:.001*t.bevelMm})},va.prototype.getDistortedFieldOfViewLeftEye=function(){var t=this.viewer,i=this.device,e=this.distortion,s=t.screenLensDistance,n=(i.widthMeters-t.interLensDistance)/2,r=t.interLensDistance/2,h=t.baselineLensDistance-i.bevelMeters,o=i.heightMeters-h,a=C2*_.atan(e.distort(n/s)),u=C2*_.atan(e.distort(r/s)),c=C2*_.atan(e.distort(h/s)),d=C2*_.atan(e.distort(o/s));return{leftDegrees:_.min(a,t.fov),rightDegrees:_.min(u,t.fov),downDegrees:_.min(c,t.fov),upDegrees:_.min(d,t.fov)}},va.prototype.getLeftEyeVisibleTanAngles=function(){var t=this.viewer,i=this.device,e=this.distortion,s=_.tan(-k2*t.fov),n=_.tan(k2*t.fov),r=_.tan(k2*t.fov),h=_.tan(-k2*t.fov),o=i.widthMeters/4,a=i.heightMeters/2,u=t.baselineLensDistance-i.bevelMeters-a,c=t.interLensDistance/2-o,d=-u,l=t.screenLensDistance,f=e.distort((c-o)/l),g=e.distort((d+a)/l),w=e.distort((c+o)/l),A=e.distort((d-a)/l),v=new Float32Array(4);return v[0]=_.max(s,f),v[1]=_.min(n,g),v[2]=_.min(r,w),v[3]=_.max(h,A),v},va.prototype.getLeftEyeNoLensTanAngles=function(){var t=this.viewer,i=this.device,e=this.distortion,s=new Float32Array(4),n=e.distortInverse(_.tan(-k2*t.fov)),r=e.distortInverse(_.tan(k2*t.fov)),h=e.distortInverse(_.tan(k2*t.fov)),o=e.distortInverse(_.tan(-k2*t.fov)),a=i.widthMeters/4,u=i.heightMeters/2,c=t.baselineLensDistance-i.bevelMeters-u,d=t.interLensDistance/2-a,l=-c,f=t.screenLensDistance,g=(d-a)/f,w=(l+u)/f,A=(d+a)/f,v=(l-u)/f;return s[0]=_.max(n,g),s[1]=_.min(r,w),s[2]=_.min(h,A),s[3]=_.max(o,v),s},va.prototype.getLeftEyeVisibleScreenRect=function(t){var i=this.viewer,e=this.device,s=i.screenLensDistance,n=(e.widthMeters-i.interLensDistance)/2,r=i.baselineLensDistance-e.bevelMeters,h=(t[0]*s+n)/e.widthMeters,o=(t[1]*s+r)/e.heightMeters,a=(t[2]*s+n)/e.widthMeters,u=(t[3]*s+r)/e.heightMeters;return{x:h,y:u,width:a-h,height:o-u}},va.prototype.getFieldOfViewLeftEye=function(t){return t?this.getUndistortedFieldOfViewLeftEye():this.getDistortedFieldOfViewLeftEye()},va.prototype.getFieldOfViewRightEye=function(t){var i=this.getFieldOfViewLeftEye(t);return{leftDegrees:i.rightDegrees,rightDegrees:i.leftDegrees,upDegrees:i.upDegrees,downDegrees:i.downDegrees}},va.prototype.getUndistortedFieldOfViewLeftEye=function(){var t=this._ti();return{leftDegrees:C2*_.atan(t.outerDist),rightDegrees:C2*_.atan(t.innerDist),downDegrees:C2*_.atan(t.bottomDist),upDegrees:C2*_.atan(t.topDist)}},va.prototype.getUndistortedViewportLeftEye=function(){var t=this._ti(),i=this.viewer,e=this.device,s=i.screenLensDistance,n=e.widthMeters/s,r=e.heightMeters/s,h=e.width/n,o=e.height/r,a=_.round((t.eyePosX-t.outerDist)*h),u=_.round((t.eyePosY-t.bottomDist)*o);return{x:a,y:u,width:_.round((t.eyePosX+t.innerDist)*h)-a,height:_.round((t.eyePosY+t.topDist)*o)-u}},va.prototype._ti=function(){var t=this.viewer,i=this.device,e=this.distortion,s=t.screenLensDistance,n=t.interLensDistance/2/s,r=i.widthMeters/s,h=i.heightMeters/s,o=r/2-n,a=(t.baselineLensDistance-i.bevelMeters)/s,u=t.fov,c=e.distortInverse(_.tan(k2*u)),d=_.min(o,c),l=_.min(n,c),f=_.min(a,c);return{outerDist:d,innerDist:l,topDist:_.min(h-a,c),bottomDist:f,eyePosX:o,eyePosY:a}},va.Viewers=z2;var B2={format:1,last_updated:"2018-02-20T22:55:10Z",devices:[{type:"android",rules:[{mdmh:"asus/*/Nexus 7/*"},{ua:"Nexus 7"}],dpi:[320.8,323],bw:3,ac:500},{type:"android",rules:[{mdmh:"asus/*/ASUS_Z00AD/*"},{ua:"ASUS_Z00AD"}],dpi:[403,404.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Google/*/Pixel XL/*"},{ua:"Pixel XL"}],dpi:[537.9,533],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Google/*/Pixel/*"},{ua:"Pixel"}],dpi:[432.6,436.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"HTC/*/HTC6435LVW/*"},{ua:"HTC6435LVW"}],dpi:[449.7,443.3],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"HTC/*/HTC One XL/*"},{ua:"HTC One XL"}],dpi:[315.3,314.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"htc/*/Nexus 9/*"},{ua:"Nexus 9"}],dpi:289,bw:3,ac:500},{type:"android",rules:[{mdmh:"HTC/*/HTC One M9/*"},{ua:"HTC One M9"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{mdmh:"HTC/*/HTC One_M8/*"},{ua:"HTC One_M8"}],dpi:[449.7,447.4],bw:3,ac:500},{type:"android",rules:[{mdmh:"HTC/*/HTC One/*"},{ua:"HTC One"}],dpi:472.8,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Huawei/*/Nexus 6P/*"},{ua:"Nexus 6P"}],dpi:[515.1,518],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LENOVO/*/Lenovo PB2-690Y/*"},{ua:"Lenovo PB2-690Y"}],dpi:[457.2,454.713],bw:3,ac:500},{type:"android",rules:[{mdmh:"LGE/*/Nexus 5X/*"},{ua:"Nexus 5X"}],dpi:[422,419.9],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/LGMS345/*"},{ua:"LGMS345"}],dpi:[221.7,219.1],bw:3,ac:500},{type:"android",rules:[{mdmh:"LGE/*/LG-D800/*"},{ua:"LG-D800"}],dpi:[422,424.1],bw:3,ac:500},{type:"android",rules:[{mdmh:"LGE/*/LG-D850/*"},{ua:"LG-D850"}],dpi:[537.9,541.9],bw:3,ac:500},{type:"android",rules:[{mdmh:"LGE/*/VS985 4G/*"},{ua:"VS985 4G"}],dpi:[537.9,535.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/Nexus 5/*"},{ua:"Nexus 5 B"}],dpi:[442.4,444.8],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/Nexus 4/*"},{ua:"Nexus 4"}],dpi:[319.8,318.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/LG-P769/*"},{ua:"LG-P769"}],dpi:[240.6,247.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/LGMS323/*"},{ua:"LGMS323"}],dpi:[206.6,204.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/LGLS996/*"},{ua:"LGLS996"}],dpi:[403.4,401.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Micromax/*/4560MMX/*"},{ua:"4560MMX"}],dpi:[240,219.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Micromax/*/A250/*"},{ua:"Micromax A250"}],dpi:[480,446.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Micromax/*/Micromax AQ4501/*"},{ua:"Micromax AQ4501"}],dpi:240,bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/G5/*"},{ua:"Moto G (5) Plus"}],dpi:[403.4,403],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/DROID RAZR/*"},{ua:"DROID RAZR"}],dpi:[368.1,256.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT830C/*"},{ua:"XT830C"}],dpi:[254,255.9],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1021/*"},{ua:"XT1021"}],dpi:[254,256.7],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1023/*"},{ua:"XT1023"}],dpi:[254,256.7],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1028/*"},{ua:"XT1028"}],dpi:[326.6,327.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1034/*"},{ua:"XT1034"}],dpi:[326.6,328.4],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1053/*"},{ua:"XT1053"}],dpi:[315.3,316.1],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1562/*"},{ua:"XT1562"}],dpi:[403.4,402.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/Nexus 6/*"},{ua:"Nexus 6 B"}],dpi:[494.3,489.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1063/*"},{ua:"XT1063"}],dpi:[295,296.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1064/*"},{ua:"XT1064"}],dpi:[295,295.6],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1092/*"},{ua:"XT1092"}],dpi:[422,424.1],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1095/*"},{ua:"XT1095"}],dpi:[422,423.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/G4/*"},{ua:"Moto G (4)"}],dpi:401,bw:4,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/A0001/*"},{ua:"A0001"}],dpi:[403.4,401],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONE E1005/*"},{ua:"ONE E1005"}],dpi:[442.4,441.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONE A2005/*"},{ua:"ONE A2005"}],dpi:[391.9,405.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONEPLUS A5000/*"},{ua:"ONEPLUS A5000 "}],dpi:[403.411,399.737],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONE A5010/*"},{ua:"ONEPLUS A5010"}],dpi:[403,400],bw:2,ac:1e3},{type:"android",rules:[{mdmh:"OPPO/*/X909/*"},{ua:"X909"}],dpi:[442.4,444.1],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9082/*"},{ua:"GT-I9082"}],dpi:[184.7,185.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G360P/*"},{ua:"SM-G360P"}],dpi:[196.7,205.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/Nexus S/*"},{ua:"Nexus S"}],dpi:[234.5,229.8],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9300/*"},{ua:"GT-I9300"}],dpi:[304.8,303.9],bw:5,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-T230NU/*"},{ua:"SM-T230NU"}],dpi:216,bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SGH-T399/*"},{ua:"SGH-T399"}],dpi:[217.7,231.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SGH-M919/*"},{ua:"SGH-M919"}],dpi:[440.8,437.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-N9005/*"},{ua:"SM-N9005"}],dpi:[386.4,387],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SAMSUNG-SM-N900A/*"},{ua:"SAMSUNG-SM-N900A"}],dpi:[386.4,387.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9500/*"},{ua:"GT-I9500"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/GT-I9505/*"},{ua:"GT-I9505"}],dpi:439.4,bw:4,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G900F/*"},{ua:"SM-G900F"}],dpi:[415.6,431.6],bw:5,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G900M/*"},{ua:"SM-G900M"}],dpi:[415.6,431.6],bw:5,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G800F/*"},{ua:"SM-G800F"}],dpi:326.8,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G906S/*"},{ua:"SM-G906S"}],dpi:[562.7,572.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9300/*"},{ua:"GT-I9300"}],dpi:[306.7,304.8],bw:5,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-T535/*"},{ua:"SM-T535"}],dpi:[142.6,136.4],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-N920C/*"},{ua:"SM-N920C"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-N920P/*"},{ua:"SM-N920P"}],dpi:[386.3655,390.144],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-N920W8/*"},{ua:"SM-N920W8"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9300I/*"},{ua:"GT-I9300I"}],dpi:[304.8,305.8],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9195/*"},{ua:"GT-I9195"}],dpi:[249.4,256.7],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SPH-L520/*"},{ua:"SPH-L520"}],dpi:[249.4,255.9],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SAMSUNG-SGH-I717/*"},{ua:"SAMSUNG-SGH-I717"}],dpi:285.8,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SPH-D710/*"},{ua:"SPH-D710"}],dpi:[217.7,204.2],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-N7100/*"},{ua:"GT-N7100"}],dpi:265.1,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SCH-I605/*"},{ua:"SCH-I605"}],dpi:265.1,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/Galaxy Nexus/*"},{ua:"Galaxy Nexus"}],dpi:[315.3,314.2],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-N910H/*"},{ua:"SM-N910H"}],dpi:[515.1,518],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-N910C/*"},{ua:"SM-N910C"}],dpi:[515.2,520.2],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G130M/*"},{ua:"SM-G130M"}],dpi:[165.9,164.8],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G928I/*"},{ua:"SM-G928I"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G920F/*"},{ua:"SM-G920F"}],dpi:580.6,bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G920P/*"},{ua:"SM-G920P"}],dpi:[522.5,577],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G925F/*"},{ua:"SM-G925F"}],dpi:580.6,bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G925V/*"},{ua:"SM-G925V"}],dpi:[522.5,576.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G930F/*"},{ua:"SM-G930F"}],dpi:576.6,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G935F/*"},{ua:"SM-G935F"}],dpi:533,bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G950F/*"},{ua:"SM-G950F"}],dpi:[562.707,565.293],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G955U/*"},{ua:"SM-G955U"}],dpi:[522.514,525.762],bw:3,ac:500},{type:"android",rules:[{mdmh:"Sony/*/C6903/*"},{ua:"C6903"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{mdmh:"Sony/*/D6653/*"},{ua:"D6653"}],dpi:[428.6,427.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Sony/*/E6653/*"},{ua:"E6653"}],dpi:[428.6,425.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Sony/*/E6853/*"},{ua:"E6853"}],dpi:[403.4,401.9],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Sony/*/SGP321/*"},{ua:"SGP321"}],dpi:[224.7,224.1],bw:3,ac:500},{type:"android",rules:[{mdmh:"TCT/*/ALCATEL ONE TOUCH Fierce/*"},{ua:"ALCATEL ONE TOUCH Fierce"}],dpi:[240,247.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"THL/*/thl 5000/*"},{ua:"thl 5000"}],dpi:[480,443.3],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Fly/*/IQ4412/*"},{ua:"IQ4412"}],dpi:307.9,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"ZTE/*/ZTE Blade L2/*"},{ua:"ZTE Blade L2"}],dpi:240,bw:3,ac:500},{type:"android",rules:[{mdmh:"BENEVE/*/VR518/*"},{ua:"VR518"}],dpi:480,bw:3,ac:500},{type:"ios",rules:[{res:[640,960]}],dpi:[325.1,328.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[640,1136]}],dpi:[317.1,320.2],bw:3,ac:1e3},{type:"ios",rules:[{res:[750,1334]}],dpi:326.4,bw:4,ac:1e3},{type:"ios",rules:[{res:[1242,2208]}],dpi:[453.6,458.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[1125,2001]}],dpi:[410.9,415.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[1125,2436]}],dpi:458,bw:4,ac:1e3}]};function R2(t,i){if(this.dpdb=B2,this.gti(),t){this.onDeviceParamsUpdated=i;var e=new nd,s=this;e.open("GET",t,!0),e.addEventListener("load",(function(){s.loading=!1,e.status>=200&&e.status<=299?(s.dpdb=JSON.parse(e.response),s.gti()):console.error("Error loading online DPDB!")})),e.send()}}function U2(t){this.xdpi=t.xdpi,this.ydpi=t.ydpi,this.bevelMm=t.bevelMm}function Q2(t,i){this.set(t,i)}function Fc(t,i){this.kFilter=t,this.isDebug=i,this.currentAccelMeasurement=new Q2,this.currentGyroMeasurement=new Q2,this.previousGyroMeasurement=new Q2,Bc()?this.filterQ=new Ih(-1,0,0,1):this.filterQ=new Ih(1,0,0,1),this.previousFilterQ=new Ih,this.previousFilterQ.copy(this.filterQ),this.accelQ=new Ih,this.isOrientationInitialized=!1,this.estimatedGravity=new nn,this.measuredGravity=new nn,this.gyroIntegralQ=new Ih}function F2(t,i){this.predictionTimeS=t,this.isDebug=i,this.previousQ=new Ih,this.previousTimestampS=null,this.deltaQ=new Ih,this.outQ=new Ih}function Ye(t,i,e,n){this.yawOnly=e,this.accelerometer=new nn,this.gyroscope=new nn,this.filter=new Fc(t,n),this.posePredictor=new F2(i,n),this.isFirefoxAndroid=h2(),this.isIOS=Bc();var r=o2();this.isDeviceMotionInRadians=!this.isIOS&&r&&r<66,this.isWithoutDeviceMotion=a2(),this.filterToWorldQ=new Ih,Bc()?this.filterToWorldQ.setFromAxisAngle(new nn(1,0,0),_.PI/2):this.filterToWorldQ.setFromAxisAngle(new nn(1,0,0),-_.PI/2),this.inverseWorldToScreenQ=new Ih,this.worldToScreenQ=new Ih,this.originalPoseAdjustQ=new Ih,this.originalPoseAdjustQ.setFromAxisAngle(new nn(0,0,1),-s.orientation*_.PI/180),this.wti(),c2()&&this.filterToWorldQ.multiply(this.inverseWorldToScreenQ),this.resetQ=new Ih,this.Ati=new Float32Array(4),this.start()}R2.prototype.getDeviceParams=function(){return this.deviceParams},R2.prototype.gti=function(){var t=this.vti();t?(this.deviceParams=t,this.onDeviceParamsUpdated&&this.onDeviceParamsUpdated(this.deviceParams)):console.error("Failed to recalculate device parameters.")},R2.prototype.vti=function(){var t=this.dpdb;if(!t)return console.error("DPDB not available."),null;if(1!=t.format)return console.error("DPDB has unexpected format version."),null;if(!t.devices||!t.devices.length)return console.error("DPDB does not have a devices section."),null;var i=ed.userAgent||ed.vendor||s.opera,e=d2(),n=l2();if(!t.devices)return console.error("DPDB has no devices section."),null;for(var r=null,h=1/0,o=0;o<t.devices.length;o++){var a=t.devices[o];if(a.rules)if("ios"==a.type||"android"==a.type){if(Bc()==("ios"==a.type)){for(var u=!1,c=0;c<a.rules.length;c++){var d=a.rules[c],l=this.mti(d,i,e,n);if(!0===l){h=l,r=a,u=!0;break}!1!==l&&l<h&&(h=l,r=a)}if(u)break}}else console.warn("Device["+o+"] has invalid type.");else console.warn("Device["+o+"] has no rules section.")}return r?new U2({xdpi:r.dpi[0]||r.dpi,ydpi:r.dpi[1]||r.dpi,bevelMm:r.bw}):(console.warn("No DPDB device match."),null)},R2.prototype.mti=function(t,i,e,s){if(!t.ua&&!t.res)return!1;if(t.ua&&i.indexOf(t.ua)<0)return!1;if(t.res){if(!t.res[0]||!t.res[1])return!1;var n=t.res[0],r=t.res[1],h=_.min(e,s)-_.min(n,r),o=_.max(e,s)-_.max(n,r),a=_.abs(h)+_.abs(o);if(a>0)return a}return!0},Q2.prototype.set=function(t,i){this.sample=t,this.timestampS=i},Q2.prototype.copy=function(t){this.set(t.sample,t.timestampS)},Fc.prototype.addAccelMeasurement=function(t,i){this.currentAccelMeasurement.set(t,i)},Fc.prototype.addGyroMeasurement=function(t,i){this.currentGyroMeasurement.set(t,i),function(t){return!(S(t)||t<=.001||t>1)}(i-this.previousGyroMeasurement.timestampS)&&this.pti(),this.previousGyroMeasurement.copy(this.currentGyroMeasurement)},Fc.prototype.pti=function(){if(!this.isOrientationInitialized)return this.accelQ=this.yti(this.currentAccelMeasurement.sample),this.previousFilterQ.copy(this.accelQ),void(this.isOrientationInitialized=!0);var t=this.currentGyroMeasurement.timestampS-this.previousGyroMeasurement.timestampS,i=this.Mti(this.currentGyroMeasurement.sample,t);this.gyroIntegralQ.multiply(i),this.filterQ.copy(this.previousFilterQ),this.filterQ.multiply(i);var e=new Ih;e.copy(this.filterQ),e.inverse(),this.estimatedGravity.set(0,0,-1),this.estimatedGravity.applyQuaternion(e),this.estimatedGravity.normalize(),this.measuredGravity.copy(this.currentAccelMeasurement.sample),this.measuredGravity.normalize();var s=new Ih;s.setFromUnitVectors(this.estimatedGravity,this.measuredGravity),s.inverse(),this.isDebug&&console.log("Delta: %d deg, G_est: (%s, %s, %s), G_meas: (%s, %s, %s)",C2*function(t){return t.w>1?(console.warn("getQuaternionAngle: w > 1"),0):2*_.acos(t.w)}(s),this.estimatedGravity.x.toFixed(1),this.estimatedGravity.y.toFixed(1),this.estimatedGravity.z.toFixed(1),this.measuredGravity.x.toFixed(1),this.measuredGravity.y.toFixed(1),this.measuredGravity.z.toFixed(1));var n=new Ih;n.copy(this.filterQ),n.multiply(s),this.filterQ.slerp(n,1-this.kFilter),this.previousFilterQ.copy(this.filterQ)},Fc.prototype.getOrientation=function(){return this.filterQ},Fc.prototype.yti=function(t){var i=new nn;i.copy(t),i.normalize();var e=new Ih;return e.setFromUnitVectors(new nn(0,0,-1),i),e.inverse(),e},Fc.prototype.Mti=function(t,i){var e=new Ih,s=new nn;return s.copy(t),s.normalize(),e.setFromAxisAngle(s,t.length()*i),e},F2.prototype.getPrediction=function(t,i,e){if(!this.previousTimestampS)return this.previousQ.copy(t),this.previousTimestampS=e,t;var s=new nn;s.copy(i),s.normalize();var n=i.length();if(n<20*k2)return this.isDebug&&console.log("Moving slowly, at %s deg/s: no prediction",(C2*n).toFixed(1)),this.outQ.copy(t),this.previousQ.copy(t),this.outQ;var r=n*this.predictionTimeS;return this.deltaQ.setFromAxisAngle(s,r),this.outQ.copy(this.previousQ),this.outQ.multiply(this.deltaQ),this.previousQ.copy(t),this.previousTimestampS=e,this.outQ},Ye.prototype.getPosition=function(){return null},Ye.prototype.getOrientation=function(){var t=void 0;if(this.isWithoutDeviceMotion&&this.Tti)return this.deviceOrientationFixQ=this.deviceOrientationFixQ||(i=(new Ih).setFromAxisAngle(new nn(0,0,-1),0),e=new Ih,-90===s.orientation?e.setFromAxisAngle(new nn(0,1,0),_.PI/-2):e.setFromAxisAngle(new nn(0,1,0),_.PI/2),i.multiply(e)),this.deviceOrientationFilterToWorldQ=this.deviceOrientationFilterToWorldQ||function(){var t=new Ih;return t.setFromAxisAngle(new nn(1,0,0),-_.PI/2),t}(),t=this.Tti,(n=new Ih).copy(t),n.multiply(this.deviceOrientationFilterToWorldQ),n.multiply(this.resetQ),n.multiply(this.worldToScreenQ),n.multiplyQuaternions(this.deviceOrientationFixQ,n),this.yawOnly&&(n.x=0,n.z=0,n.normalize()),this.Ati[0]=n.x,this.Ati[1]=n.y,this.Ati[2]=n.z,this.Ati[3]=n.w,this.Ati;var i,e,n,r=this.filter.getOrientation();return t=this.posePredictor.getPrediction(r,this.gyroscope,this.previousTimestampS),(n=new Ih).copy(this.filterToWorldQ),n.multiply(this.resetQ),n.multiply(t),n.multiply(this.worldToScreenQ),this.yawOnly&&(n.x=0,n.z=0,n.normalize()),this.Ati[0]=n.x,this.Ati[1]=n.y,this.Ati[2]=n.z,this.Ati[3]=n.w,this.Ati},Ye.prototype.resetPose=function(){this.resetQ.copy(this.filter.getOrientation()),this.resetQ.x=0,this.resetQ.y=0,this.resetQ.z*=-1,this.resetQ.normalize(),c2()&&this.resetQ.multiply(this.inverseWorldToScreenQ),this.resetQ.multiply(this.originalPoseAdjustQ)},Ye.prototype.Nti=function(t){this.Tti=this.Tti||new Ih;var i=t.alpha,e=t.beta,s=t.gamma;i=(i||0)*_.PI/180,e=(e||0)*_.PI/180,s=(s||0)*_.PI/180,this.Tti.setFromEulerYXZ(e,i,-s)},Ye.prototype.Dti=function(t){this.Sti(t)},Ye.prototype.Sti=function(t){var i=t.accelerationIncludingGravity,e=t.rotationRate,s=t.timeStamp/1e3,n=s-this.previousTimestampS;return n<0?(M2("fusion-pose-sensor:invalid:non-monotonic","Invalid timestamps detected: non-monotonic timestamp from devicemotion"),void(this.previousTimestampS=s)):n<=.001||n>1?(M2("fusion-pose-sensor:invalid:outside-threshold","Invalid timestamps detected: Timestamp from devicemotion outside expected range."),void(this.previousTimestampS=s)):(this.accelerometer.set(-i.x,-i.y,-i.z),u2()?this.gyroscope.set(-e.beta,e.alpha,e.gamma):this.gyroscope.set(e.alpha,e.beta,e.gamma),this.isDeviceMotionInRadians||this.gyroscope.multiplyScalar(_.PI/180),this.filter.addAccelMeasurement(this.accelerometer,s),this.filter.addGyroMeasurement(this.gyroscope,s),void(this.previousTimestampS=s))},Ye.prototype.Iti=function(t){this.wti()},Ye.prototype.vC=function(t){var i=t.data;i&&i.type&&("devicemotion"===i.type.toLowerCase()&&this.Sti(i.deviceMotionEvent))},Ye.prototype.wti=function(){switch(this.worldToScreenQ.set(0,0,0,1),s.orientation){case 0:break;case 90:this.worldToScreenQ.setFromAxisAngle(new nn(0,0,1),-_.PI/2);break;case-90:this.worldToScreenQ.setFromAxisAngle(new nn(0,0,1),_.PI/2)}this.inverseWorldToScreenQ.copy(this.worldToScreenQ),this.inverseWorldToScreenQ.inverse()},Ye.prototype.start=function(){var t,i,e;this.Eti=this.Dti.bind(this),this.bti=this.Iti.bind(this),this.Lti=this.vC.bind(this),this.kti=this.Nti.bind(this),Bc()&&(t=s.self!==s.top,i=y2(h.referrer),e=y2(s.location.href),t&&i!==e)&&s.addEventListener("message",this.Lti),s.addEventListener("orientationchange",this.bti),this.isWithoutDeviceMotion?s.addEventListener("deviceorientation",this.kti):s.addEventListener("devicemotion",this.Eti)},Ye.prototype.stop=function(){s.removeEventListener("devicemotion",this.Eti),s.removeEventListener("deviceorientation",this.kti),s.removeEventListener("orientationchange",this.bti),s.removeEventListener("message",this.Lti)};var Y2=new nn(1,0,0),G2=new nn(0,0,1),V2={};screen.orientation?V2=screen.orientation:screen.msOrientation?V2=screen.msOrientation:w.defineProperty(V2,"angle",{get:function(){return s.orientation||0}});var W2=new Ih;W2.setFromAxisAngle(Y2,-_.PI/2),W2.multiply((new Ih).setFromAxisAngle(G2,_.PI/2));var H2=function(){function t(i){!function(t,i){if(!(t instanceof i))throw new b("Cannot call a class as a function")}(this,t),this.config=i,this.sensor=null,this.fusionSensor=null,this.Cti=new Float32Array(4),this.api=null,this.errors=[],this.xti=new Ih,this.Oti=new Ih,this.jti=new Ih,this.zti=this.zti.bind(this),this.Pti=this.Pti.bind(this),this.Bti=this.Bti.bind(this),this.Bti(),this.init()}return e2(t,[{key:"init",value:function(){var t=null;try{(t=new RelativeOrientationSensor({frequency:60})).addEventListener("error",this.Pti)}catch(t){this.errors.push(t),"SecurityError"===t.name?(console.error("Cannot construct sensors due to the Feature Policy"),console.warn('Attempting to fall back using "devicemotion"; however this will fail in the future without correct permissions.'),this.useDeviceMotion()):"ReferenceError"===t.name?this.useDeviceMotion():console.error(t)}t&&(this.api="sensor",this.sensor=t,this.sensor.addEventListener("reading",this.zti),this.sensor.start()),s.addEventListener("orientationchange",this.Bti)}},{key:"useDeviceMotion",value:function(){this.api="devicemotion",this.fusionSensor=new Ye(this.config.K_FILTER,this.config.PREDICTION_TIME_S,this.config.YAW_ONLY,this.config.DEBUG)}},{key:"getOrientation",value:function(){if(this.fusionSensor)return this.fusionSensor.getOrientation();if(!this.sensor||!this.sensor.quaternion)return this.Cti[0]=this.Cti[1]=this.Cti[2]=0,this.Cti[3]=1,this.Cti;var t=this.sensor.quaternion;this.xti.set(t[0],t[1],t[2],t[3]);var i=this.jti;return i.copy(W2),i.multiply(this.xti),i.multiply(this.Oti),this.config.YAW_ONLY&&(i.x=i.z=0,i.normalize()),this.Cti[0]=i.x,this.Cti[1]=i.y,this.Cti[2]=i.z,this.Cti[3]=i.w,this.Cti}},{key:"Pti",value:function(t){this.errors.push(t.error),"NotAllowedError"===t.error.name?console.error("Permission to access sensor was denied"):"NotReadableError"===t.error.name?console.error("Sensor could not be read"):console.error(t.error)}},{key:"zti",value:function(){}},{key:"Bti",value:function(){var t=-V2.angle*_.PI/180;this.Oti.setFromAxisAngle(G2,t)}}]),t}();function Vc(){this.Rti();var t=h.createElement("div");(r=t.style).position="fixed",r.top=0,r.right=0,r.bottom=0,r.left=0,r.backgroundColor="gray",r.fontFamily="sans-serif",r.zIndex=1e6;var i=h.createElement("img");i.src=this.icon,(r=i.style).marginLeft="25%",r.marginTop="25%",r.width="50%",t.appendChild(i);var e=h.createElement("div");(r=e.style).textAlign="center",r.fontSize="16px",r.lineHeight="24px",r.margin="24px 25%",r.width="50%",e.innerHTML="Place your phone into your Cardboard viewer.",t.appendChild(e);var s=h.createElement("div");(r=s.style).backgroundColor="#CFD8DC",r.position="fixed",r.bottom=0,r.width="100%",r.height="48px",r.padding="14px 24px",r.boxSizing="border-box",r.color="#656A6B",t.appendChild(s);var n=h.createElement("div");n.style.float="left",n.innerHTML="No Cardboard viewer?";var r,o=h.createElement("a");o.href="https://www.google.com/get/cardboard/get-cardboard/",o.innerHTML="get one",o.target="Du",(r=o.style).float="right",r.fontWeight=600,r.textTransform="uppercase",r.borderLeft="1px solid gray",r.paddingLeft="24px",r.textDecoration="none",r.color="#656A6B",s.appendChild(n),s.appendChild(o),this.overlay=t,this.text=e,this.hide()}Vc.prototype.show=function(t){t||this.overlay.parentElement?t&&(this.overlay.parentElement&&this.overlay.parentElement!=t&&this.overlay.parentElement.removeChild(this.overlay),t.appendChild(this.overlay)):h.body.appendChild(this.overlay),this.overlay.style.display="block";var i=this.overlay.querySelector("img").style;c2()?(i.width="20%",i.marginLeft="40%",i.marginTop="3%"):(i.width="50%",i.marginLeft="25%",i.marginTop="25%")},Vc.prototype.hide=function(){this.overlay.style.display="none"},Vc.prototype.showTemporarily=function(t,i){this.show(i),this.timer=u(this.hide.bind(this),t)},Vc.prototype.disableShowTemporarily=function(){c(this.timer)},Vc.prototype.update=function(){this.disableShowTemporarily(),!c2()&&w2()?this.show():this.hide()},Vc.prototype.Rti=function(){this.icon="data:"+"image/svg+xml"+";base64,"+"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjE5OHB4IiBoZWlnaHQ9IjI0MHB4IiB2aWV3Qm94PSIwIDAgMTk4IDI0MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWxuczpza2V0Y2g9Imh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaC9ucyI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDMuMy4zICgxMjA4MSkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+CiAgICA8dGl0bGU+dHJhbnNpdGlvbjwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxkZWZzPjwvZGVmcz4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHNrZXRjaDp0eXBlPSJNU1BhZ2UiPgogICAgICAgIDxnIGlkPSJ0cmFuc2l0aW9uIiBza2V0Y2g6dHlwZT0iTVNBcnRib2FyZEdyb3VwIj4KICAgICAgICAgICAgPGcgaWQ9IkltcG9ydGVkLUxheWVycy1Db3B5LTQtKy1JbXBvcnRlZC1MYXllcnMtQ29weS0rLUltcG9ydGVkLUxheWVycy1Db3B5LTItQ29weSIgc2tldGNoOnR5cGU9Ik1TTGF5ZXJHcm91cCI+CiAgICAgICAgICAgICAgICA8ZyBpZD0iSW1wb3J0ZWQtTGF5ZXJzLUNvcHktNCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMC4wMDAwMDAsIDEwNy4wMDAwMDApIiBza2V0Y2g6dHlwZT0iTVNTaGFwZUdyb3VwIj4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTQ5LjYyNSwyLjUyNyBDMTQ5LjYyNSwyLjUyNyAxNTUuODA1LDYuMDk2IDE1Ni4zNjIsNi40MTggTDE1Ni4zNjIsNy4zMDQgQzE1Ni4zNjIsNy40ODEgMTU2LjM3NSw3LjY2NCAxNTYuNCw3Ljg1MyBDMTU2LjQxLDcuOTM0IDE1Ni40Miw4LjAxNSAxNTYuNDI3LDguMDk1IEMxNTYuNTY3LDkuNTEgMTU3LjQwMSwxMS4wOTMgMTU4LjUzMiwxMi4wOTQgTDE2NC4yNTIsMTcuMTU2IEwxNjQuMzMzLDE3LjA2NiBDMTY0LjMzMywxNy4wNjYgMTY4LjcxNSwxNC41MzYgMTY5LjU2OCwxNC4wNDIgQzE3MS4wMjUsMTQuODgzIDE5NS41MzgsMjkuMDM1IDE5NS41MzgsMjkuMDM1IEwxOTUuNTM4LDgzLjAzNiBDMTk1LjUzOCw4My44MDcgMTk1LjE1Miw4NC4yNTMgMTk0LjU5LDg0LjI1MyBDMTk0LjM1Nyw4NC4yNTMgMTk0LjA5NSw4NC4xNzcgMTkzLjgxOCw4NC4wMTcgTDE2OS44NTEsNzAuMTc5IEwxNjkuODM3LDcwLjIwMyBMMTQyLjUxNSw4NS45NzggTDE0MS42NjUsODQuNjU1IEMxMzYuOTM0LDgzLjEyNiAxMzEuOTE3LDgxLjkxNSAxMjYuNzE0LDgxLjA0NSBDMTI2LjcwOSw4MS4wNiAxMjYuNzA3LDgxLjA2OSAxMjYuNzA3LDgxLjA2OSBMMTIxLjY0LDk4LjAzIEwxMTMuNzQ5LDEwMi41ODYgTDExMy43MTIsMTAyLjUyMyBMMTEzLjcxMiwxMzAuMTEzIEMxMTMuNzEyLDEzMC44ODUgMTEzLjMyNiwxMzEuMzMgMTEyLjc2NCwxMzEuMzMgQzExMi41MzIsMTMxLjMzIDExMi4yNjksMTMxLjI1NCAxMTEuOTkyLDEzMS4wOTQgTDY5LjUxOSwxMDYuNTcyIEM2OC41NjksMTA2LjAyMyA2Ny43OTksMTA0LjY5NSA2Ny43OTksMTAzLjYwNSBMNjcuNzk5LDEwMi41NyBMNjcuNzc4LDEwMi42MTcgQzY3LjI3LDEwMi4zOTMgNjYuNjQ4LDEwMi4yNDkgNjUuOTYyLDEwMi4yMTggQzY1Ljg3NSwxMDIuMjE0IDY1Ljc4OCwxMDIuMjEyIDY1LjcwMSwxMDIuMjEyIEM2NS42MDYsMTAyLjIxMiA2NS41MTEsMTAyLjIxNSA2NS40MTYsMTAyLjIxOSBDNjUuMTk1LDEwMi4yMjkgNjQuOTc0LDEwMi4yMzUgNjQuNzU0LDEwMi4yMzUgQzY0LjMzMSwxMDIuMjM1IDYzLjkxMSwxMDIuMjE2IDYzLjQ5OCwxMDIuMTc4IEM2MS44NDMsMTAyLjAyNSA2MC4yOTgsMTAxLjU3OCA1OS4wOTQsMTAwLjg4MiBMMTIuNTE4LDczLjk5MiBMMTIuNTIzLDc0LjAwNCBMMi4yNDUsNTUuMjU0IEMxLjI0NCw1My40MjcgMi4wMDQsNTEuMDM4IDMuOTQzLDQ5LjkxOCBMNTkuOTU0LDE3LjU3MyBDNjAuNjI2LDE3LjE4NSA2MS4zNSwxNy4wMDEgNjIuMDUzLDE3LjAwMSBDNjMuMzc5LDE3LjAwMSA2NC42MjUsMTcuNjYgNjUuMjgsMTguODU0IEw2NS4yODUsMTguODUxIEw2NS41MTIsMTkuMjY0IEw2NS41MDYsMTkuMjY4IEM2NS45MDksMjAuMDAzIDY2LjQwNSwyMC42OCA2Ni45ODMsMjEuMjg2IEw2Ny4yNiwyMS41NTYgQzY5LjE3NCwyMy40MDYgNzEuNzI4LDI0LjM1NyA3NC4zNzMsMjQuMzU3IEM3Ni4zMjIsMjQuMzU3IDc4LjMyMSwyMy44NCA4MC4xNDgsMjIuNzg1IEM4MC4xNjEsMjIuNzg1IDg3LjQ2NywxOC41NjYgODcuNDY3LDE4LjU2NiBDODguMTM5LDE4LjE3OCA4OC44NjMsMTcuOTk0IDg5LjU2NiwxNy45OTQgQzkwLjg5MiwxNy45OTQgOTIuMTM4LDE4LjY1MiA5Mi43OTIsMTkuODQ3IEw5Ni4wNDIsMjUuNzc1IEw5Ni4wNjQsMjUuNzU3IEwxMDIuODQ5LDI5LjY3NCBMMTAyLjc0NCwyOS40OTIgTDE0OS42MjUsMi41MjcgTTE0OS42MjUsMC44OTIgQzE0OS4zNDMsMC44OTIgMTQ5LjA2MiwwLjk2NSAxNDguODEsMS4xMSBMMTAyLjY0MSwyNy42NjYgTDk3LjIzMSwyNC41NDIgTDk0LjIyNiwxOS4wNjEgQzkzLjMxMywxNy4zOTQgOTEuNTI3LDE2LjM1OSA4OS41NjYsMTYuMzU4IEM4OC41NTUsMTYuMzU4IDg3LjU0NiwxNi42MzIgODYuNjQ5LDE3LjE1IEM4My44NzgsMTguNzUgNzkuNjg3LDIxLjE2OSA3OS4zNzQsMjEuMzQ1IEM3OS4zNTksMjEuMzUzIDc5LjM0NSwyMS4zNjEgNzkuMzMsMjEuMzY5IEM3Ny43OTgsMjIuMjU0IDc2LjA4NCwyMi43MjIgNzQuMzczLDIyLjcyMiBDNzIuMDgxLDIyLjcyMiA2OS45NTksMjEuODkgNjguMzk3LDIwLjM4IEw2OC4xNDUsMjAuMTM1IEM2Ny43MDYsMTkuNjcyIDY3LjMyMywxOS4xNTYgNjcuMDA2LDE4LjYwMSBDNjYuOTg4LDE4LjU1OSA2Ni45NjgsMTguNTE5IDY2Ljk0NiwxOC40NzkgTDY2LjcxOSwxOC4wNjUgQzY2LjY5LDE4LjAxMiA2Ni42NTgsMTcuOTYgNjYuNjI0LDE3LjkxMSBDNjUuNjg2LDE2LjMzNyA2My45NTEsMTUuMzY2IDYyLjA1MywxNS4zNjYgQzYxLjA0MiwxNS4zNjYgNjAuMDMzLDE1LjY0IDU5LjEzNiwxNi4xNTggTDMuMTI1LDQ4LjUwMiBDMC40MjYsNTAuMDYxIC0wLjYxMyw1My40NDIgMC44MTEsNTYuMDQgTDExLjA4OSw3NC43OSBDMTEuMjY2LDc1LjExMyAxMS41MzcsNzUuMzUzIDExLjg1LDc1LjQ5NCBMNTguMjc2LDEwMi4yOTggQzU5LjY3OSwxMDMuMTA4IDYxLjQzMywxMDMuNjMgNjMuMzQ4LDEwMy44MDYgQzYzLjgxMiwxMDMuODQ4IDY0LjI4NSwxMDMuODcgNjQuNzU0LDEwMy44NyBDNjUsMTAzLjg3IDY1LjI0OSwxMDMuODY0IDY1LjQ5NCwxMDMuODUyIEM2NS41NjMsMTAzLjg0OSA2NS42MzIsMTAzLjg0NyA2NS43MDEsMTAzLjg0NyBDNjUuNzY0LDEwMy44NDcgNjUuODI4LDEwMy44NDkgNjUuODksMTAzLjg1MiBDNjUuOTg2LDEwMy44NTYgNjYuMDgsMTAzLjg2MyA2Ni4xNzMsMTAzLjg3NCBDNjYuMjgyLDEwNS40NjcgNjcuMzMyLDEwNy4xOTcgNjguNzAyLDEwNy45ODggTDExMS4xNzQsMTMyLjUxIEMxMTEuNjk4LDEzMi44MTIgMTEyLjIzMiwxMzIuOTY1IDExMi43NjQsMTMyLjk2NSBDMTE0LjI2MSwxMzIuOTY1IDExNS4zNDcsMTMxLjc2NSAxMTUuMzQ3LDEzMC4xMTMgTDExNS4zNDcsMTAzLjU1MSBMMTIyLjQ1OCw5OS40NDYgQzEyMi44MTksOTkuMjM3IDEyMy4wODcsOTguODk4IDEyMy4yMDcsOTguNDk4IEwxMjcuODY1LDgyLjkwNSBDMTMyLjI3OSw4My43MDIgMTM2LjU1Nyw4NC43NTMgMTQwLjYwNyw4Ni4wMzMgTDE0MS4xNCw4Ni44NjIgQzE0MS40NTEsODcuMzQ2IDE0MS45NzcsODcuNjEzIDE0Mi41MTYsODcuNjEzIEMxNDIuNzk0LDg3LjYxMyAxNDMuMDc2LDg3LjU0MiAxNDMuMzMzLDg3LjM5MyBMMTY5Ljg2NSw3Mi4wNzYgTDE5Myw4NS40MzMgQzE5My41MjMsODUuNzM1IDE5NC4wNTgsODUuODg4IDE5NC41OSw4NS44ODggQzE5Ni4wODcsODUuODg4IDE5Ny4xNzMsODQuNjg5IDE5Ny4xNzMsODMuMDM2IEwxOTcuMTczLDI5LjAzNSBDMTk3LjE3MywyOC40NTEgMTk2Ljg2MSwyNy45MTEgMTk2LjM1NSwyNy42MTkgQzE5Ni4zNTUsMjcuNjE5IDE3MS44NDMsMTMuNDY3IDE3MC4zODUsMTIuNjI2IEMxNzAuMTMyLDEyLjQ4IDE2OS44NSwxMi40MDcgMTY5LjU2OCwxMi40MDcgQzE2OS4yODUsMTIuNDA3IDE2OS4wMDIsMTIuNDgxIDE2OC43NDksMTIuNjI3IEMxNjguMTQzLDEyLjk3OCAxNjUuNzU2LDE0LjM1NyAxNjQuNDI0LDE1LjEyNSBMMTU5LjYxNSwxMC44NyBDMTU4Ljc5NiwxMC4xNDUgMTU4LjE1NCw4LjkzNyAxNTguMDU0LDcuOTM0IEMxNTguMDQ1LDcuODM3IDE1OC4wMzQsNy43MzkgMTU4LjAyMSw3LjY0IEMxNTguMDA1LDcuNTIzIDE1Ny45OTgsNy40MSAxNTcuOTk4LDcuMzA0IEwxNTcuOTk4LDYuNDE4IEMxNTcuOTk4LDUuODM0IDE1Ny42ODYsNS4yOTUgMTU3LjE4MSw1LjAwMiBDMTU2LjYyNCw0LjY4IDE1MC40NDIsMS4xMTEgMTUwLjQ0MiwxLjExMSBDMTUwLjE4OSwwLjk2NSAxNDkuOTA3LDAuODkyIDE0OS42MjUsMC44OTIiIGlkPSJGaWxsLTEiIGZpbGw9IiM0NTVBNjQiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNOTYuMDI3LDI1LjYzNiBMMTQyLjYwMyw1Mi41MjcgQzE0My44MDcsNTMuMjIyIDE0NC41ODIsNTQuMTE0IDE0NC44NDUsNTUuMDY4IEwxNDQuODM1LDU1LjA3NSBMNjMuNDYxLDEwMi4wNTcgTDYzLjQ2LDEwMi4wNTcgQzYxLjgwNiwxMDEuOTA1IDYwLjI2MSwxMDEuNDU3IDU5LjA1NywxMDAuNzYyIEwxMi40ODEsNzMuODcxIEw5Ni4wMjcsMjUuNjM2IiBpZD0iRmlsbC0yIiBmaWxsPSIjRkFGQUZBIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTYzLjQ2MSwxMDIuMTc0IEM2My40NTMsMTAyLjE3NCA2My40NDYsMTAyLjE3NCA2My40MzksMTAyLjE3MiBDNjEuNzQ2LDEwMi4wMTYgNjAuMjExLDEwMS41NjMgNTguOTk4LDEwMC44NjMgTDEyLjQyMiw3My45NzMgQzEyLjM4Niw3My45NTIgMTIuMzY0LDczLjkxNCAxMi4zNjQsNzMuODcxIEMxMi4zNjQsNzMuODMgMTIuMzg2LDczLjc5MSAxMi40MjIsNzMuNzcgTDk1Ljk2OCwyNS41MzUgQzk2LjAwNCwyNS41MTQgOTYuMDQ5LDI1LjUxNCA5Ni4wODUsMjUuNTM1IEwxNDIuNjYxLDUyLjQyNiBDMTQzLjg4OCw1My4xMzQgMTQ0LjY4Miw1NC4wMzggMTQ0Ljk1Nyw1NS4wMzcgQzE0NC45Nyw1NS4wODMgMTQ0Ljk1Myw1NS4xMzMgMTQ0LjkxNSw1NS4xNjEgQzE0NC45MTEsNTUuMTY1IDE0NC44OTgsNTUuMTc0IDE0NC44OTQsNTUuMTc3IEw2My41MTksMTAyLjE1OCBDNjMuNTAxLDEwMi4xNjkgNjMuNDgxLDEwMi4xNzQgNjMuNDYxLDEwMi4xNzQgTDYzLjQ2MSwxMDIuMTc0IFogTTEyLjcxNCw3My44NzEgTDU5LjExNSwxMDAuNjYxIEM2MC4yOTMsMTAxLjM0MSA2MS43ODYsMTAxLjc4MiA2My40MzUsMTAxLjkzNyBMMTQ0LjcwNyw1NS4wMTUgQzE0NC40MjgsNTQuMTA4IDE0My42ODIsNTMuMjg1IDE0Mi41NDQsNTIuNjI4IEw5Ni4wMjcsMjUuNzcxIEwxMi43MTQsNzMuODcxIEwxMi43MTQsNzMuODcxIFoiIGlkPSJGaWxsLTMiIGZpbGw9IiM2MDdEOEIiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTQ4LjMyNyw1OC40NzEgQzE0OC4xNDUsNTguNDggMTQ3Ljk2Miw1OC40OCAxNDcuNzgxLDU4LjQ3MiBDMTQ1Ljg4Nyw1OC4zODkgMTQ0LjQ3OSw1Ny40MzQgMTQ0LjYzNiw1Ni4zNCBDMTQ0LjY4OSw1NS45NjcgMTQ0LjY2NCw1NS41OTcgMTQ0LjU2NCw1NS4yMzUgTDYzLjQ2MSwxMDIuMDU3IEM2NC4wODksMTAyLjExNSA2NC43MzMsMTAyLjEzIDY1LjM3OSwxMDIuMDk5IEM2NS41NjEsMTAyLjA5IDY1Ljc0MywxMDIuMDkgNjUuOTI1LDEwMi4wOTggQzY3LjgxOSwxMDIuMTgxIDY5LjIyNywxMDMuMTM2IDY5LjA3LDEwNC4yMyBMMTQ4LjMyNyw1OC40NzEiIGlkPSJGaWxsLTQiIGZpbGw9IiNGRkZGRkYiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNNjkuMDcsMTA0LjM0NyBDNjkuMDQ4LDEwNC4zNDcgNjkuMDI1LDEwNC4zNCA2OS4wMDUsMTA0LjMyNyBDNjguOTY4LDEwNC4zMDEgNjguOTQ4LDEwNC4yNTcgNjguOTU1LDEwNC4yMTMgQzY5LDEwMy44OTYgNjguODk4LDEwMy41NzYgNjguNjU4LDEwMy4yODggQzY4LjE1MywxMDIuNjc4IDY3LjEwMywxMDIuMjY2IDY1LjkyLDEwMi4yMTQgQzY1Ljc0MiwxMDIuMjA2IDY1LjU2MywxMDIuMjA3IDY1LjM4NSwxMDIuMjE1IEM2NC43NDIsMTAyLjI0NiA2NC4wODcsMTAyLjIzMiA2My40NSwxMDIuMTc0IEM2My4zOTksMTAyLjE2OSA2My4zNTgsMTAyLjEzMiA2My4zNDcsMTAyLjA4MiBDNjMuMzM2LDEwMi4wMzMgNjMuMzU4LDEwMS45ODEgNjMuNDAyLDEwMS45NTYgTDE0NC41MDYsNTUuMTM0IEMxNDQuNTM3LDU1LjExNiAxNDQuNTc1LDU1LjExMyAxNDQuNjA5LDU1LjEyNyBDMTQ0LjY0Miw1NS4xNDEgMTQ0LjY2OCw1NS4xNyAxNDQuNjc3LDU1LjIwNCBDMTQ0Ljc4MSw1NS41ODUgMTQ0LjgwNiw1NS45NzIgMTQ0Ljc1MSw1Ni4zNTcgQzE0NC43MDYsNTYuNjczIDE0NC44MDgsNTYuOTk0IDE0NS4wNDcsNTcuMjgyIEMxNDUuNTUzLDU3Ljg5MiAxNDYuNjAyLDU4LjMwMyAxNDcuNzg2LDU4LjM1NSBDMTQ3Ljk2NCw1OC4zNjMgMTQ4LjE0Myw1OC4zNjMgMTQ4LjMyMSw1OC4zNTQgQzE0OC4zNzcsNTguMzUyIDE0OC40MjQsNTguMzg3IDE0OC40MzksNTguNDM4IEMxNDguNDU0LDU4LjQ5IDE0OC40MzIsNTguNTQ1IDE0OC4zODUsNTguNTcyIEw2OS4xMjksMTA0LjMzMSBDNjkuMTExLDEwNC4zNDIgNjkuMDksMTA0LjM0NyA2OS4wNywxMDQuMzQ3IEw2OS4wNywxMDQuMzQ3IFogTTY1LjY2NSwxMDEuOTc1IEM2NS43NTQsMTAxLjk3NSA2NS44NDIsMTAxLjk3NyA2NS45MywxMDEuOTgxIEM2Ny4xOTYsMTAyLjAzNyA2OC4yODMsMTAyLjQ2OSA2OC44MzgsMTAzLjEzOSBDNjkuMDY1LDEwMy40MTMgNjkuMTg4LDEwMy43MTQgNjkuMTk4LDEwNC4wMjEgTDE0Ny44ODMsNTguNTkyIEMxNDcuODQ3LDU4LjU5MiAxNDcuODExLDU4LjU5MSAxNDcuNzc2LDU4LjU4OSBDMTQ2LjUwOSw1OC41MzMgMTQ1LjQyMiw1OC4xIDE0NC44NjcsNTcuNDMxIEMxNDQuNTg1LDU3LjA5MSAxNDQuNDY1LDU2LjcwNyAxNDQuNTIsNTYuMzI0IEMxNDQuNTYzLDU2LjAyMSAxNDQuNTUyLDU1LjcxNiAxNDQuNDg4LDU1LjQxNCBMNjMuODQ2LDEwMS45NyBDNjQuMzUzLDEwMi4wMDIgNjQuODY3LDEwMi4wMDYgNjUuMzc0LDEwMS45ODIgQzY1LjQ3MSwxMDEuOTc3IDY1LjU2OCwxMDEuOTc1IDY1LjY2NSwxMDEuOTc1IEw2NS42NjUsMTAxLjk3NSBaIiBpZD0iRmlsbC01IiBmaWxsPSIjNjA3RDhCIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTIuMjA4LDU1LjEzNCBDMS4yMDcsNTMuMzA3IDEuOTY3LDUwLjkxNyAzLjkwNiw0OS43OTcgTDU5LjkxNywxNy40NTMgQzYxLjg1NiwxNi4zMzMgNjQuMjQxLDE2LjkwNyA2NS4yNDMsMTguNzM0IEw2NS40NzUsMTkuMTQ0IEM2NS44NzIsMTkuODgyIDY2LjM2OCwyMC41NiA2Ni45NDUsMjEuMTY1IEw2Ny4yMjMsMjEuNDM1IEM3MC41NDgsMjQuNjQ5IDc1LjgwNiwyNS4xNTEgODAuMTExLDIyLjY2NSBMODcuNDMsMTguNDQ1IEM4OS4zNywxNy4zMjYgOTEuNzU0LDE3Ljg5OSA5Mi43NTUsMTkuNzI3IEw5Ni4wMDUsMjUuNjU1IEwxMi40ODYsNzMuODg0IEwyLjIwOCw1NS4xMzQgWiIgaWQ9IkZpbGwtNiIgZmlsbD0iI0ZBRkFGQSI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0xMi40ODYsNzQuMDAxIEMxMi40NzYsNzQuMDAxIDEyLjQ2NSw3My45OTkgMTIuNDU1LDczLjk5NiBDMTIuNDI0LDczLjk4OCAxMi4zOTksNzMuOTY3IDEyLjM4NCw3My45NCBMMi4xMDYsNTUuMTkgQzEuMDc1LDUzLjMxIDEuODU3LDUwLjg0NSAzLjg0OCw0OS42OTYgTDU5Ljg1OCwxNy4zNTIgQzYwLjUyNSwxNi45NjcgNjEuMjcxLDE2Ljc2NCA2Mi4wMTYsMTYuNzY0IEM2My40MzEsMTYuNzY0IDY0LjY2NiwxNy40NjYgNjUuMzI3LDE4LjY0NiBDNjUuMzM3LDE4LjY1NCA2NS4zNDUsMTguNjYzIDY1LjM1MSwxOC42NzQgTDY1LjU3OCwxOS4wODggQzY1LjU4NCwxOS4xIDY1LjU4OSwxOS4xMTIgNjUuNTkxLDE5LjEyNiBDNjUuOTg1LDE5LjgzOCA2Ni40NjksMjAuNDk3IDY3LjAzLDIxLjA4NSBMNjcuMzA1LDIxLjM1MSBDNjkuMTUxLDIzLjEzNyA3MS42NDksMjQuMTIgNzQuMzM2LDI0LjEyIEM3Ni4zMTMsMjQuMTIgNzguMjksMjMuNTgyIDgwLjA1MywyMi41NjMgQzgwLjA2NCwyMi41NTcgODAuMDc2LDIyLjU1MyA4MC4wODgsMjIuNTUgTDg3LjM3MiwxOC4zNDQgQzg4LjAzOCwxNy45NTkgODguNzg0LDE3Ljc1NiA4OS41MjksMTcuNzU2IEM5MC45NTYsMTcuNzU2IDkyLjIwMSwxOC40NzIgOTIuODU4LDE5LjY3IEw5Ni4xMDcsMjUuNTk5IEM5Ni4xMzgsMjUuNjU0IDk2LjExOCwyNS43MjQgOTYuMDYzLDI1Ljc1NiBMMTIuNTQ1LDczLjk4NSBDMTIuNTI2LDczLjk5NiAxMi41MDYsNzQuMDAxIDEyLjQ4Niw3NC4wMDEgTDEyLjQ4Niw3NC4wMDEgWiBNNjIuMDE2LDE2Ljk5NyBDNjEuMzEyLDE2Ljk5NyA2MC42MDYsMTcuMTkgNTkuOTc1LDE3LjU1NCBMMy45NjUsNDkuODk5IEMyLjA4Myw1MC45ODUgMS4zNDEsNTMuMzA4IDIuMzEsNTUuMDc4IEwxMi41MzEsNzMuNzIzIEw5NS44NDgsMjUuNjExIEw5Mi42NTMsMTkuNzgyIEM5Mi4wMzgsMTguNjYgOTAuODcsMTcuOTkgODkuNTI5LDE3Ljk5IEM4OC44MjUsMTcuOTkgODguMTE5LDE4LjE4MiA4Ny40ODksMTguNTQ3IEw4MC4xNzIsMjIuNzcyIEM4MC4xNjEsMjIuNzc4IDgwLjE0OSwyMi43ODIgODAuMTM3LDIyLjc4NSBDNzguMzQ2LDIzLjgxMSA3Ni4zNDEsMjQuMzU0IDc0LjMzNiwyNC4zNTQgQzcxLjU4OCwyNC4zNTQgNjkuMDMzLDIzLjM0NyA2Ny4xNDIsMjEuNTE5IEw2Ni44NjQsMjEuMjQ5IEM2Ni4yNzcsMjAuNjM0IDY1Ljc3NCwxOS45NDcgNjUuMzY3LDE5LjIwMyBDNjUuMzYsMTkuMTkyIDY1LjM1NiwxOS4xNzkgNjUuMzU0LDE5LjE2NiBMNjUuMTYzLDE4LjgxOSBDNjUuMTU0LDE4LjgxMSA2NS4xNDYsMTguODAxIDY1LjE0LDE4Ljc5IEM2NC41MjUsMTcuNjY3IDYzLjM1NywxNi45OTcgNjIuMDE2LDE2Ljk5NyBMNjIuMDE2LDE2Ljk5NyBaIiBpZD0iRmlsbC03IiBmaWxsPSIjNjA3RDhCIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTQyLjQzNCw0OC44MDggTDQyLjQzNCw0OC44MDggQzM5LjkyNCw0OC44MDcgMzcuNzM3LDQ3LjU1IDM2LjU4Miw0NS40NDMgQzM0Ljc3MSw0Mi4xMzkgMzYuMTQ0LDM3LjgwOSAzOS42NDEsMzUuNzg5IEw1MS45MzIsMjguNjkxIEM1My4xMDMsMjguMDE1IDU0LjQxMywyNy42NTggNTUuNzIxLDI3LjY1OCBDNTguMjMxLDI3LjY1OCA2MC40MTgsMjguOTE2IDYxLjU3MywzMS4wMjMgQzYzLjM4NCwzNC4zMjcgNjIuMDEyLDM4LjY1NyA1OC41MTQsNDAuNjc3IEw0Ni4yMjMsNDcuNzc1IEM0NS4wNTMsNDguNDUgNDMuNzQyLDQ4LjgwOCA0Mi40MzQsNDguODA4IEw0Mi40MzQsNDguODA4IFogTTU1LjcyMSwyOC4xMjUgQzU0LjQ5NSwyOC4xMjUgNTMuMjY1LDI4LjQ2MSA1Mi4xNjYsMjkuMDk2IEwzOS44NzUsMzYuMTk0IEMzNi41OTYsMzguMDg3IDM1LjMwMiw0Mi4xMzYgMzYuOTkyLDQ1LjIxOCBDMzguMDYzLDQ3LjE3MyA0MC4wOTgsNDguMzQgNDIuNDM0LDQ4LjM0IEM0My42NjEsNDguMzQgNDQuODksNDguMDA1IDQ1Ljk5LDQ3LjM3IEw1OC4yODEsNDAuMjcyIEM2MS41NiwzOC4zNzkgNjIuODUzLDM0LjMzIDYxLjE2NCwzMS4yNDggQzYwLjA5MiwyOS4yOTMgNTguMDU4LDI4LjEyNSA1NS43MjEsMjguMTI1IEw1NS43MjEsMjguMTI1IFoiIGlkPSJGaWxsLTgiIGZpbGw9IiM2MDdEOEIiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTQ5LjU4OCwyLjQwNyBDMTQ5LjU4OCwyLjQwNyAxNTUuNzY4LDUuOTc1IDE1Ni4zMjUsNi4yOTcgTDE1Ni4zMjUsNy4xODQgQzE1Ni4zMjUsNy4zNiAxNTYuMzM4LDcuNTQ0IDE1Ni4zNjIsNy43MzMgQzE1Ni4zNzMsNy44MTQgMTU2LjM4Miw3Ljg5NCAxNTYuMzksNy45NzUgQzE1Ni41Myw5LjM5IDE1Ny4zNjMsMTAuOTczIDE1OC40OTUsMTEuOTc0IEwxNjUuODkxLDE4LjUxOSBDMTY2LjA2OCwxOC42NzUgMTY2LjI0OSwxOC44MTQgMTY2LjQzMiwxOC45MzQgQzE2OC4wMTEsMTkuOTc0IDE2OS4zODIsMTkuNCAxNjkuNDk0LDE3LjY1MiBDMTY5LjU0MywxNi44NjggMTY5LjU1MSwxNi4wNTcgMTY5LjUxNywxNS4yMjMgTDE2OS41MTQsMTUuMDYzIEwxNjkuNTE0LDEzLjkxMiBDMTcwLjc4LDE0LjY0MiAxOTUuNTAxLDI4LjkxNSAxOTUuNTAxLDI4LjkxNSBMMTk1LjUwMSw4Mi45MTUgQzE5NS41MDEsODQuMDA1IDE5NC43MzEsODQuNDQ1IDE5My43ODEsODMuODk3IEwxNTEuMzA4LDU5LjM3NCBDMTUwLjM1OCw1OC44MjYgMTQ5LjU4OCw1Ny40OTcgMTQ5LjU4OCw1Ni40MDggTDE0OS41ODgsMjIuMzc1IiBpZD0iRmlsbC05IiBmaWxsPSIjRkFGQUZBIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTE5NC41NTMsODQuMjUgQzE5NC4yOTYsODQuMjUgMTk0LjAxMyw4NC4xNjUgMTkzLjcyMiw4My45OTcgTDE1MS4yNSw1OS40NzYgQzE1MC4yNjksNTguOTA5IDE0OS40NzEsNTcuNTMzIDE0OS40NzEsNTYuNDA4IEwxNDkuNDcxLDIyLjM3NSBMMTQ5LjcwNSwyMi4zNzUgTDE0OS43MDUsNTYuNDA4IEMxNDkuNzA1LDU3LjQ1OSAxNTAuNDUsNTguNzQ0IDE1MS4zNjYsNTkuMjc0IEwxOTMuODM5LDgzLjc5NSBDMTk0LjI2Myw4NC4wNCAxOTQuNjU1LDg0LjA4MyAxOTQuOTQyLDgzLjkxNyBDMTk1LjIyNyw4My43NTMgMTk1LjM4NCw4My4zOTcgMTk1LjM4NCw4Mi45MTUgTDE5NS4zODQsMjguOTgyIEMxOTQuMTAyLDI4LjI0MiAxNzIuMTA0LDE1LjU0MiAxNjkuNjMxLDE0LjExNCBMMTY5LjYzNCwxNS4yMiBDMTY5LjY2OCwxNi4wNTIgMTY5LjY2LDE2Ljg3NCAxNjkuNjEsMTcuNjU5IEMxNjkuNTU2LDE4LjUwMyAxNjkuMjE0LDE5LjEyMyAxNjguNjQ3LDE5LjQwNSBDMTY4LjAyOCwxOS43MTQgMTY3LjE5NywxOS41NzggMTY2LjM2NywxOS4wMzIgQzE2Ni4xODEsMTguOTA5IDE2NS45OTUsMTguNzY2IDE2NS44MTQsMTguNjA2IEwxNTguNDE3LDEyLjA2MiBDMTU3LjI1OSwxMS4wMzYgMTU2LjQxOCw5LjQzNyAxNTYuMjc0LDcuOTg2IEMxNTYuMjY2LDcuOTA3IDE1Ni4yNTcsNy44MjcgMTU2LjI0Nyw3Ljc0OCBDMTU2LjIyMSw3LjU1NSAxNTYuMjA5LDcuMzY1IDE1Ni4yMDksNy4xODQgTDE1Ni4yMDksNi4zNjQgQzE1NS4zNzUsNS44ODMgMTQ5LjUyOSwyLjUwOCAxNDkuNTI5LDIuNTA4IEwxNDkuNjQ2LDIuMzA2IEMxNDkuNjQ2LDIuMzA2IDE1NS44MjcsNS44NzQgMTU2LjM4NCw2LjE5NiBMMTU2LjQ0Miw2LjIzIEwxNTYuNDQyLDcuMTg0IEMxNTYuNDQyLDcuMzU1IDE1Ni40NTQsNy41MzUgMTU2LjQ3OCw3LjcxNyBDMTU2LjQ4OSw3LjggMTU2LjQ5OSw3Ljg4MiAxNTYuNTA3LDcuOTYzIEMxNTYuNjQ1LDkuMzU4IDE1Ny40NTUsMTAuODk4IDE1OC41NzIsMTEuODg2IEwxNjUuOTY5LDE4LjQzMSBDMTY2LjE0MiwxOC41ODQgMTY2LjMxOSwxOC43MiAxNjYuNDk2LDE4LjgzNyBDMTY3LjI1NCwxOS4zMzYgMTY4LDE5LjQ2NyAxNjguNTQzLDE5LjE5NiBDMTY5LjAzMywxOC45NTMgMTY5LjMyOSwxOC40MDEgMTY5LjM3NywxNy42NDUgQzE2OS40MjcsMTYuODY3IDE2OS40MzQsMTYuMDU0IDE2OS40MDEsMTUuMjI4IEwxNjkuMzk3LDE1LjA2NSBMMTY5LjM5NywxMy43MSBMMTY5LjU3MiwxMy44MSBDMTcwLjgzOSwxNC41NDEgMTk1LjU1OSwyOC44MTQgMTk1LjU1OSwyOC44MTQgTDE5NS42MTgsMjguODQ3IEwxOTUuNjE4LDgyLjkxNSBDMTk1LjYxOCw4My40ODQgMTk1LjQyLDgzLjkxMSAxOTUuMDU5LDg0LjExOSBDMTk0LjkwOCw4NC4yMDYgMTk0LjczNyw4NC4yNSAxOTQuNTUzLDg0LjI1IiBpZD0iRmlsbC0xMCIgZmlsbD0iIzYwN0Q4QiI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0xNDUuNjg1LDU2LjE2MSBMMTY5LjgsNzAuMDgzIEwxNDMuODIyLDg1LjA4MSBMMTQyLjM2LDg0Ljc3NCBDMTM1LjgyNiw4Mi42MDQgMTI4LjczMiw4MS4wNDYgMTIxLjM0MSw4MC4xNTggQzExNi45NzYsNzkuNjM0IDExMi42NzgsODEuMjU0IDExMS43NDMsODMuNzc4IEMxMTEuNTA2LDg0LjQxNCAxMTEuNTAzLDg1LjA3MSAxMTEuNzMyLDg1LjcwNiBDMTEzLjI3LDg5Ljk3MyAxMTUuOTY4LDk0LjA2OSAxMTkuNzI3LDk3Ljg0MSBMMTIwLjI1OSw5OC42ODYgQzEyMC4yNiw5OC42ODUgOTQuMjgyLDExMy42ODMgOTQuMjgyLDExMy42ODMgTDcwLjE2Nyw5OS43NjEgTDE0NS42ODUsNTYuMTYxIiBpZD0iRmlsbC0xMSIgZmlsbD0iI0ZGRkZGRiI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik05NC4yODIsMTEzLjgxOCBMOTQuMjIzLDExMy43ODUgTDY5LjkzMyw5OS43NjEgTDcwLjEwOCw5OS42NiBMMTQ1LjY4NSw1Ni4wMjYgTDE0NS43NDMsNTYuMDU5IEwxNzAuMDMzLDcwLjA4MyBMMTQzLjg0Miw4NS4yMDUgTDE0My43OTcsODUuMTk1IEMxNDMuNzcyLDg1LjE5IDE0Mi4zMzYsODQuODg4IDE0Mi4zMzYsODQuODg4IEMxMzUuNzg3LDgyLjcxNCAxMjguNzIzLDgxLjE2MyAxMjEuMzI3LDgwLjI3NCBDMTIwLjc4OCw4MC4yMDkgMTIwLjIzNiw4MC4xNzcgMTE5LjY4OSw4MC4xNzcgQzExNS45MzEsODAuMTc3IDExMi42MzUsODEuNzA4IDExMS44NTIsODMuODE5IEMxMTEuNjI0LDg0LjQzMiAxMTEuNjIxLDg1LjA1MyAxMTEuODQyLDg1LjY2NyBDMTEzLjM3Nyw4OS45MjUgMTE2LjA1OCw5My45OTMgMTE5LjgxLDk3Ljc1OCBMMTE5LjgyNiw5Ny43NzkgTDEyMC4zNTIsOTguNjE0IEMxMjAuMzU0LDk4LjYxNyAxMjAuMzU2LDk4LjYyIDEyMC4zNTgsOTguNjI0IEwxMjAuNDIyLDk4LjcyNiBMMTIwLjMxNyw5OC43ODcgQzEyMC4yNjQsOTguODE4IDk0LjU5OSwxMTMuNjM1IDk0LjM0LDExMy43ODUgTDk0LjI4MiwxMTMuODE4IEw5NC4yODIsMTEzLjgxOCBaIE03MC40MDEsOTkuNzYxIEw5NC4yODIsMTEzLjU0OSBMMTE5LjA4NCw5OS4yMjkgQzExOS42Myw5OC45MTQgMTE5LjkzLDk4Ljc0IDEyMC4xMDEsOTguNjU0IEwxMTkuNjM1LDk3LjkxNCBDMTE1Ljg2NCw5NC4xMjcgMTEzLjE2OCw5MC4wMzMgMTExLjYyMiw4NS43NDYgQzExMS4zODIsODUuMDc5IDExMS4zODYsODQuNDA0IDExMS42MzMsODMuNzM4IEMxMTIuNDQ4LDgxLjUzOSAxMTUuODM2LDc5Ljk0MyAxMTkuNjg5LDc5Ljk0MyBDMTIwLjI0Niw3OS45NDMgMTIwLjgwNiw3OS45NzYgMTIxLjM1NSw4MC4wNDIgQzEyOC43NjcsODAuOTMzIDEzNS44NDYsODIuNDg3IDE0Mi4zOTYsODQuNjYzIEMxNDMuMjMyLDg0LjgzOCAxNDMuNjExLDg0LjkxNyAxNDMuNzg2LDg0Ljk2NyBMMTY5LjU2Niw3MC4wODMgTDE0NS42ODUsNTYuMjk1IEw3MC40MDEsOTkuNzYxIEw3MC40MDEsOTkuNzYxIFoiIGlkPSJGaWxsLTEyIiBmaWxsPSIjNjA3RDhCIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTE2Ny4yMywxOC45NzkgTDE2Ny4yMyw2OS44NSBMMTM5LjkwOSw4NS42MjMgTDEzMy40NDgsNzEuNDU2IEMxMzIuNTM4LDY5LjQ2IDEzMC4wMiw2OS43MTggMTI3LjgyNCw3Mi4wMyBDMTI2Ljc2OSw3My4xNCAxMjUuOTMxLDc0LjU4NSAxMjUuNDk0LDc2LjA0OCBMMTE5LjAzNCw5Ny42NzYgTDkxLjcxMiwxMTMuNDUgTDkxLjcxMiw2Mi41NzkgTDE2Ny4yMywxOC45NzkiIGlkPSJGaWxsLTEzIiBmaWxsPSIjRkZGRkZGIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTkxLjcxMiwxMTMuNTY3IEM5MS42OTIsMTEzLjU2NyA5MS42NzIsMTEzLjU2MSA5MS42NTMsMTEzLjU1MSBDOTEuNjE4LDExMy41MyA5MS41OTUsMTEzLjQ5MiA5MS41OTUsMTEzLjQ1IEw5MS41OTUsNjIuNTc5IEM5MS41OTUsNjIuNTM3IDkxLjYxOCw2Mi40OTkgOTEuNjUzLDYyLjQ3OCBMMTY3LjE3MiwxOC44NzggQzE2Ny4yMDgsMTguODU3IDE2Ny4yNTIsMTguODU3IDE2Ny4yODgsMTguODc4IEMxNjcuMzI0LDE4Ljg5OSAxNjcuMzQ3LDE4LjkzNyAxNjcuMzQ3LDE4Ljk3OSBMMTY3LjM0Nyw2OS44NSBDMTY3LjM0Nyw2OS44OTEgMTY3LjMyNCw2OS45MyAxNjcuMjg4LDY5Ljk1IEwxMzkuOTY3LDg1LjcyNSBDMTM5LjkzOSw4NS43NDEgMTM5LjkwNSw4NS43NDUgMTM5Ljg3Myw4NS43MzUgQzEzOS44NDIsODUuNzI1IDEzOS44MTYsODUuNzAyIDEzOS44MDIsODUuNjcyIEwxMzMuMzQyLDcxLjUwNCBDMTMyLjk2Nyw3MC42ODIgMTMyLjI4LDcwLjIyOSAxMzEuNDA4LDcwLjIyOSBDMTMwLjMxOSw3MC4yMjkgMTI5LjA0NCw3MC45MTUgMTI3LjkwOCw3Mi4xMSBDMTI2Ljg3NCw3My4yIDEyNi4wMzQsNzQuNjQ3IDEyNS42MDYsNzYuMDgyIEwxMTkuMTQ2LDk3LjcwOSBDMTE5LjEzNyw5Ny43MzggMTE5LjExOCw5Ny43NjIgMTE5LjA5Miw5Ny43NzcgTDkxLjc3LDExMy41NTEgQzkxLjc1MiwxMTMuNTYxIDkxLjczMiwxMTMuNTY3IDkxLjcxMiwxMTMuNTY3IEw5MS43MTIsMTEzLjU2NyBaIE05MS44MjksNjIuNjQ3IEw5MS44MjksMTEzLjI0OCBMMTE4LjkzNSw5Ny41OTggTDEyNS4zODIsNzYuMDE1IEMxMjUuODI3LDc0LjUyNSAxMjYuNjY0LDczLjA4MSAxMjcuNzM5LDcxLjk1IEMxMjguOTE5LDcwLjcwOCAxMzAuMjU2LDY5Ljk5NiAxMzEuNDA4LDY5Ljk5NiBDMTMyLjM3Nyw2OS45OTYgMTMzLjEzOSw3MC40OTcgMTMzLjU1NCw3MS40MDcgTDEzOS45NjEsODUuNDU4IEwxNjcuMTEzLDY5Ljc4MiBMMTY3LjExMywxOS4xODEgTDkxLjgyOSw2Mi42NDcgTDkxLjgyOSw2Mi42NDcgWiIgaWQ9IkZpbGwtMTQiIGZpbGw9IiM2MDdEOEIiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTY4LjU0MywxOS4yMTMgTDE2OC41NDMsNzAuMDgzIEwxNDEuMjIxLDg1Ljg1NyBMMTM0Ljc2MSw3MS42ODkgQzEzMy44NTEsNjkuNjk0IDEzMS4zMzMsNjkuOTUxIDEyOS4xMzcsNzIuMjYzIEMxMjguMDgyLDczLjM3NCAxMjcuMjQ0LDc0LjgxOSAxMjYuODA3LDc2LjI4MiBMMTIwLjM0Niw5Ny45MDkgTDkzLjAyNSwxMTMuNjgzIEw5My4wMjUsNjIuODEzIEwxNjguNTQzLDE5LjIxMyIgaWQ9IkZpbGwtMTUiIGZpbGw9IiNGRkZGRkYiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNOTMuMDI1LDExMy44IEM5My4wMDUsMTEzLjggOTIuOTg0LDExMy43OTUgOTIuOTY2LDExMy43ODUgQzkyLjkzMSwxMTMuNzY0IDkyLjkwOCwxMTMuNzI1IDkyLjkwOCwxMTMuNjg0IEw5Mi45MDgsNjIuODEzIEM5Mi45MDgsNjIuNzcxIDkyLjkzMSw2Mi43MzMgOTIuOTY2LDYyLjcxMiBMMTY4LjQ4NCwxOS4xMTIgQzE2OC41MiwxOS4wOSAxNjguNTY1LDE5LjA5IDE2OC42MDEsMTkuMTEyIEMxNjguNjM3LDE5LjEzMiAxNjguNjYsMTkuMTcxIDE2OC42NiwxOS4yMTIgTDE2OC42Niw3MC4wODMgQzE2OC42Niw3MC4xMjUgMTY4LjYzNyw3MC4xNjQgMTY4LjYwMSw3MC4xODQgTDE0MS4yOCw4NS45NTggQzE0MS4yNTEsODUuOTc1IDE0MS4yMTcsODUuOTc5IDE0MS4xODYsODUuOTY4IEMxNDEuMTU0LDg1Ljk1OCAxNDEuMTI5LDg1LjkzNiAxNDEuMTE1LDg1LjkwNiBMMTM0LjY1NSw3MS43MzggQzEzNC4yOCw3MC45MTUgMTMzLjU5Myw3MC40NjMgMTMyLjcyLDcwLjQ2MyBDMTMxLjYzMiw3MC40NjMgMTMwLjM1Nyw3MS4xNDggMTI5LjIyMSw3Mi4zNDQgQzEyOC4xODYsNzMuNDMzIDEyNy4zNDcsNzQuODgxIDEyNi45MTksNzYuMzE1IEwxMjAuNDU4LDk3Ljk0MyBDMTIwLjQ1LDk3Ljk3MiAxMjAuNDMxLDk3Ljk5NiAxMjAuNDA1LDk4LjAxIEw5My4wODMsMTEzLjc4NSBDOTMuMDY1LDExMy43OTUgOTMuMDQ1LDExMy44IDkzLjAyNSwxMTMuOCBMOTMuMDI1LDExMy44IFogTTkzLjE0Miw2Mi44ODEgTDkzLjE0MiwxMTMuNDgxIEwxMjAuMjQ4LDk3LjgzMiBMMTI2LjY5NSw3Ni4yNDggQzEyNy4xNCw3NC43NTggMTI3Ljk3Nyw3My4zMTUgMTI5LjA1Miw3Mi4xODMgQzEzMC4yMzEsNzAuOTQyIDEzMS41NjgsNzAuMjI5IDEzMi43Miw3MC4yMjkgQzEzMy42ODksNzAuMjI5IDEzNC40NTIsNzAuNzMxIDEzNC44NjcsNzEuNjQxIEwxNDEuMjc0LDg1LjY5MiBMMTY4LjQyNiw3MC4wMTYgTDE2OC40MjYsMTkuNDE1IEw5My4xNDIsNjIuODgxIEw5My4xNDIsNjIuODgxIFoiIGlkPSJGaWxsLTE2IiBmaWxsPSIjNjA3RDhCIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTE2OS44LDcwLjA4MyBMMTQyLjQ3OCw4NS44NTcgTDEzNi4wMTgsNzEuNjg5IEMxMzUuMTA4LDY5LjY5NCAxMzIuNTksNjkuOTUxIDEzMC4zOTMsNzIuMjYzIEMxMjkuMzM5LDczLjM3NCAxMjguNSw3NC44MTkgMTI4LjA2NCw3Ni4yODIgTDEyMS42MDMsOTcuOTA5IEw5NC4yODIsMTEzLjY4MyBMOTQuMjgyLDYyLjgxMyBMMTY5LjgsMTkuMjEzIEwxNjkuOCw3MC4wODMgWiIgaWQ9IkZpbGwtMTciIGZpbGw9IiNGQUZBRkEiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNOTQuMjgyLDExMy45MTcgQzk0LjI0MSwxMTMuOTE3IDk0LjIwMSwxMTMuOTA3IDk0LjE2NSwxMTMuODg2IEM5NC4wOTMsMTEzLjg0NSA5NC4wNDgsMTEzLjc2NyA5NC4wNDgsMTEzLjY4NCBMOTQuMDQ4LDYyLjgxMyBDOTQuMDQ4LDYyLjczIDk0LjA5Myw2Mi42NTIgOTQuMTY1LDYyLjYxMSBMMTY5LjY4MywxOS4wMSBDMTY5Ljc1NSwxOC45NjkgMTY5Ljg0NCwxOC45NjkgMTY5LjkxNywxOS4wMSBDMTY5Ljk4OSwxOS4wNTIgMTcwLjAzMywxOS4xMjkgMTcwLjAzMywxOS4yMTIgTDE3MC4wMzMsNzAuMDgzIEMxNzAuMDMzLDcwLjE2NiAxNjkuOTg5LDcwLjI0NCAxNjkuOTE3LDcwLjI4NSBMMTQyLjU5NSw4Ni4wNiBDMTQyLjUzOCw4Ni4wOTIgMTQyLjQ2OSw4Ni4xIDE0Mi40MDcsODYuMDggQzE0Mi4zNDQsODYuMDYgMTQyLjI5Myw4Ni4wMTQgMTQyLjI2Niw4NS45NTQgTDEzNS44MDUsNzEuNzg2IEMxMzUuNDQ1LDcwLjk5NyAxMzQuODEzLDcwLjU4IDEzMy45NzcsNzAuNTggQzEzMi45MjEsNzAuNTggMTMxLjY3Niw3MS4yNTIgMTMwLjU2Miw3Mi40MjQgQzEyOS41NCw3My41MDEgMTI4LjcxMSw3NC45MzEgMTI4LjI4Nyw3Ni4zNDggTDEyMS44MjcsOTcuOTc2IEMxMjEuODEsOTguMDM0IDEyMS43NzEsOTguMDgyIDEyMS43Miw5OC4xMTIgTDk0LjM5OCwxMTMuODg2IEM5NC4zNjIsMTEzLjkwNyA5NC4zMjIsMTEzLjkxNyA5NC4yODIsMTEzLjkxNyBMOTQuMjgyLDExMy45MTcgWiBNOTQuNTE1LDYyLjk0OCBMOTQuNTE1LDExMy4yNzkgTDEyMS40MDYsOTcuNzU0IEwxMjcuODQsNzYuMjE1IEMxMjguMjksNzQuNzA4IDEyOS4xMzcsNzMuMjQ3IDEzMC4yMjQsNzIuMTAzIEMxMzEuNDI1LDcwLjgzOCAxMzIuNzkzLDcwLjExMiAxMzMuOTc3LDcwLjExMiBDMTM0Ljk5NSw3MC4xMTIgMTM1Ljc5NSw3MC42MzggMTM2LjIzLDcxLjU5MiBMMTQyLjU4NCw4NS41MjYgTDE2OS41NjYsNjkuOTQ4IEwxNjkuNTY2LDE5LjYxNyBMOTQuNTE1LDYyLjk0OCBMOTQuNTE1LDYyLjk0OCBaIiBpZD0iRmlsbC0xOCIgZmlsbD0iIzYwN0Q4QiI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0xMDkuODk0LDkyLjk0MyBMMTA5Ljg5NCw5Mi45NDMgQzEwOC4xMiw5Mi45NDMgMTA2LjY1Myw5Mi4yMTggMTA1LjY1LDkwLjgyMyBDMTA1LjU4Myw5MC43MzEgMTA1LjU5Myw5MC42MSAxMDUuNjczLDkwLjUyOSBDMTA1Ljc1Myw5MC40NDggMTA1Ljg4LDkwLjQ0IDEwNS45NzQsOTAuNTA2IEMxMDYuNzU0LDkxLjA1MyAxMDcuNjc5LDkxLjMzMyAxMDguNzI0LDkxLjMzMyBDMTEwLjA0Nyw5MS4zMzMgMTExLjQ3OCw5MC44OTQgMTEyLjk4LDkwLjAyNyBDMTE4LjI5MSw4Ni45NiAxMjIuNjExLDc5LjUwOSAxMjIuNjExLDczLjQxNiBDMTIyLjYxMSw3MS40ODkgMTIyLjE2OSw2OS44NTYgMTIxLjMzMyw2OC42OTIgQzEyMS4yNjYsNjguNiAxMjEuMjc2LDY4LjQ3MyAxMjEuMzU2LDY4LjM5MiBDMTIxLjQzNiw2OC4zMTEgMTIxLjU2Myw2OC4yOTkgMTIxLjY1Niw2OC4zNjUgQzEyMy4zMjcsNjkuNTM3IDEyNC4yNDcsNzEuNzQ2IDEyNC4yNDcsNzQuNTg0IEMxMjQuMjQ3LDgwLjgyNiAxMTkuODIxLDg4LjQ0NyAxMTQuMzgyLDkxLjU4NyBDMTEyLjgwOCw5Mi40OTUgMTExLjI5OCw5Mi45NDMgMTA5Ljg5NCw5Mi45NDMgTDEwOS44OTQsOTIuOTQzIFogTTEwNi45MjUsOTEuNDAxIEMxMDcuNzM4LDkyLjA1MiAxMDguNzQ1LDkyLjI3OCAxMDkuODkzLDkyLjI3OCBMMTA5Ljg5NCw5Mi4yNzggQzExMS4yMTUsOTIuMjc4IDExMi42NDcsOTEuOTUxIDExNC4xNDgsOTEuMDg0IEMxMTkuNDU5LDg4LjAxNyAxMjMuNzgsODAuNjIxIDEyMy43OCw3NC41MjggQzEyMy43OCw3Mi41NDkgMTIzLjMxNyw3MC45MjkgMTIyLjQ1NCw2OS43NjcgQzEyMi44NjUsNzAuODAyIDEyMy4wNzksNzIuMDQyIDEyMy4wNzksNzMuNDAyIEMxMjMuMDc5LDc5LjY0NSAxMTguNjUzLDg3LjI4NSAxMTMuMjE0LDkwLjQyNSBDMTExLjY0LDkxLjMzNCAxMTAuMTMsOTEuNzQyIDEwOC43MjQsOTEuNzQyIEMxMDguMDgzLDkxLjc0MiAxMDcuNDgxLDkxLjU5MyAxMDYuOTI1LDkxLjQwMSBMMTA2LjkyNSw5MS40MDEgWiIgaWQ9IkZpbGwtMTkiIGZpbGw9IiM2MDdEOEIiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTEzLjA5Nyw5MC4yMyBDMTE4LjQ4MSw4Ny4xMjIgMTIyLjg0NSw3OS41OTQgMTIyLjg0NSw3My40MTYgQzEyMi44NDUsNzEuMzY1IDEyMi4zNjIsNjkuNzI0IDEyMS41MjIsNjguNTU2IEMxMTkuNzM4LDY3LjMwNCAxMTcuMTQ4LDY3LjM2MiAxMTQuMjY1LDY5LjAyNiBDMTA4Ljg4MSw3Mi4xMzQgMTA0LjUxNyw3OS42NjIgMTA0LjUxNyw4NS44NCBDMTA0LjUxNyw4Ny44OTEgMTA1LDg5LjUzMiAxMDUuODQsOTAuNyBDMTA3LjYyNCw5MS45NTIgMTEwLjIxNCw5MS44OTQgMTEzLjA5Nyw5MC4yMyIgaWQ9IkZpbGwtMjAiIGZpbGw9IiNGQUZBRkEiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTA4LjcyNCw5MS42MTQgTDEwOC43MjQsOTEuNjE0IEMxMDcuNTgyLDkxLjYxNCAxMDYuNTY2LDkxLjQwMSAxMDUuNzA1LDkwLjc5NyBDMTA1LjY4NCw5MC43ODMgMTA1LjY2NSw5MC44MTEgMTA1LjY1LDkwLjc5IEMxMDQuNzU2LDg5LjU0NiAxMDQuMjgzLDg3Ljg0MiAxMDQuMjgzLDg1LjgxNyBDMTA0LjI4Myw3OS41NzUgMTA4LjcwOSw3MS45NTMgMTE0LjE0OCw2OC44MTIgQzExNS43MjIsNjcuOTA0IDExNy4yMzIsNjcuNDQ5IDExOC42MzgsNjcuNDQ5IEMxMTkuNzgsNjcuNDQ5IDEyMC43OTYsNjcuNzU4IDEyMS42NTYsNjguMzYyIEMxMjEuNjc4LDY4LjM3NyAxMjEuNjk3LDY4LjM5NyAxMjEuNzEyLDY4LjQxOCBDMTIyLjYwNiw2OS42NjIgMTIzLjA3OSw3MS4zOSAxMjMuMDc5LDczLjQxNSBDMTIzLjA3OSw3OS42NTggMTE4LjY1Myw4Ny4xOTggMTEzLjIxNCw5MC4zMzggQzExMS42NCw5MS4yNDcgMTEwLjEzLDkxLjYxNCAxMDguNzI0LDkxLjYxNCBMMTA4LjcyNCw5MS42MTQgWiBNMTA2LjAwNiw5MC41MDUgQzEwNi43OCw5MS4wMzcgMTA3LjY5NCw5MS4yODEgMTA4LjcyNCw5MS4yODEgQzExMC4wNDcsOTEuMjgxIDExMS40NzgsOTAuODY4IDExMi45OCw5MC4wMDEgQzExOC4yOTEsODYuOTM1IDEyMi42MTEsNzkuNDk2IDEyMi42MTEsNzMuNDAzIEMxMjIuNjExLDcxLjQ5NCAxMjIuMTc3LDY5Ljg4IDEyMS4zNTYsNjguNzE4IEMxMjAuNTgyLDY4LjE4NSAxMTkuNjY4LDY3LjkxOSAxMTguNjM4LDY3LjkxOSBDMTE3LjMxNSw2Ny45MTkgMTE1Ljg4Myw2OC4zNiAxMTQuMzgyLDY5LjIyNyBDMTA5LjA3MSw3Mi4yOTMgMTA0Ljc1MSw3OS43MzMgMTA0Ljc1MSw4NS44MjYgQzEwNC43NTEsODcuNzM1IDEwNS4xODUsODkuMzQzIDEwNi4wMDYsOTAuNTA1IEwxMDYuMDA2LDkwLjUwNSBaIiBpZD0iRmlsbC0yMSIgZmlsbD0iIzYwN0Q4QiI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0xNDkuMzE4LDcuMjYyIEwxMzkuMzM0LDE2LjE0IEwxNTUuMjI3LDI3LjE3MSBMMTYwLjgxNiwyMS4wNTkgTDE0OS4zMTgsNy4yNjIiIGlkPSJGaWxsLTIyIiBmaWxsPSIjRkFGQUZBIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTE2OS42NzYsMTMuODQgTDE1OS45MjgsMTkuNDY3IEMxNTYuMjg2LDIxLjU3IDE1MC40LDIxLjU4IDE0Ni43ODEsMTkuNDkxIEMxNDMuMTYxLDE3LjQwMiAxNDMuMTgsMTQuMDAzIDE0Ni44MjIsMTEuOSBMMTU2LjMxNyw2LjI5MiBMMTQ5LjU4OCwyLjQwNyBMNjcuNzUyLDQ5LjQ3OCBMMTEzLjY3NSw3NS45OTIgTDExNi43NTYsNzQuMjEzIEMxMTcuMzg3LDczLjg0OCAxMTcuNjI1LDczLjMxNSAxMTcuMzc0LDcyLjgyMyBDMTE1LjAxNyw2OC4xOTEgMTE0Ljc4MSw2My4yNzcgMTE2LjY5MSw1OC41NjEgQzEyMi4zMjksNDQuNjQxIDE0MS4yLDMzLjc0NiAxNjUuMzA5LDMwLjQ5MSBDMTczLjQ3OCwyOS4zODggMTgxLjk4OSwyOS41MjQgMTkwLjAxMywzMC44ODUgQzE5MC44NjUsMzEuMDMgMTkxLjc4OSwzMC44OTMgMTkyLjQyLDMwLjUyOCBMMTk1LjUwMSwyOC43NSBMMTY5LjY3NiwxMy44NCIgaWQ9IkZpbGwtMjMiIGZpbGw9IiNGQUZBRkEiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTEzLjY3NSw3Ni40NTkgQzExMy41OTQsNzYuNDU5IDExMy41MTQsNzYuNDM4IDExMy40NDIsNzYuMzk3IEw2Ny41MTgsNDkuODgyIEM2Ny4zNzQsNDkuNzk5IDY3LjI4NCw0OS42NDUgNjcuMjg1LDQ5LjQ3OCBDNjcuMjg1LDQ5LjMxMSA2Ny4zNzQsNDkuMTU3IDY3LjUxOSw0OS4wNzMgTDE0OS4zNTUsMi4wMDIgQzE0OS40OTksMS45MTkgMTQ5LjY3NywxLjkxOSAxNDkuODIxLDIuMDAyIEwxNTYuNTUsNS44ODcgQzE1Ni43NzQsNi4wMTcgMTU2Ljg1LDYuMzAyIDE1Ni43MjIsNi41MjYgQzE1Ni41OTIsNi43NDkgMTU2LjMwNyw2LjgyNiAxNTYuMDgzLDYuNjk2IEwxNDkuNTg3LDIuOTQ2IEw2OC42ODcsNDkuNDc5IEwxMTMuNjc1LDc1LjQ1MiBMMTE2LjUyMyw3My44MDggQzExNi43MTUsNzMuNjk3IDExNy4xNDMsNzMuMzk5IDExNi45NTgsNzMuMDM1IEMxMTQuNTQyLDY4LjI4NyAxMTQuMyw2My4yMjEgMTE2LjI1OCw1OC4zODUgQzExOS4wNjQsNTEuNDU4IDEyNS4xNDMsNDUuMTQzIDEzMy44NCw0MC4xMjIgQzE0Mi40OTcsMzUuMTI0IDE1My4zNTgsMzEuNjMzIDE2NS4yNDcsMzAuMDI4IEMxNzMuNDQ1LDI4LjkyMSAxODIuMDM3LDI5LjA1OCAxOTAuMDkxLDMwLjQyNSBDMTkwLjgzLDMwLjU1IDE5MS42NTIsMzAuNDMyIDE5Mi4xODYsMzAuMTI0IEwxOTQuNTY3LDI4Ljc1IEwxNjkuNDQyLDE0LjI0NCBDMTY5LjIxOSwxNC4xMTUgMTY5LjE0MiwxMy44MjkgMTY5LjI3MSwxMy42MDYgQzE2OS40LDEzLjM4MiAxNjkuNjg1LDEzLjMwNiAxNjkuOTA5LDEzLjQzNSBMMTk1LjczNCwyOC4zNDUgQzE5NS44NzksMjguNDI4IDE5NS45NjgsMjguNTgzIDE5NS45NjgsMjguNzUgQzE5NS45NjgsMjguOTE2IDE5NS44NzksMjkuMDcxIDE5NS43MzQsMjkuMTU0IEwxOTIuNjUzLDMwLjkzMyBDMTkxLjkzMiwzMS4zNSAxOTAuODksMzEuNTA4IDE4OS45MzUsMzEuMzQ2IEMxODEuOTcyLDI5Ljk5NSAxNzMuNDc4LDI5Ljg2IDE2NS4zNzIsMzAuOTU0IEMxNTMuNjAyLDMyLjU0MyAxNDIuODYsMzUuOTkzIDEzNC4zMDcsNDAuOTMxIEMxMjUuNzkzLDQ1Ljg0NyAxMTkuODUxLDUyLjAwNCAxMTcuMTI0LDU4LjczNiBDMTE1LjI3LDYzLjMxNCAxMTUuNTAxLDY4LjExMiAxMTcuNzksNzIuNjExIEMxMTguMTYsNzMuMzM2IDExNy44NDUsNzQuMTI0IDExNi45OSw3NC42MTcgTDExMy45MDksNzYuMzk3IEMxMTMuODM2LDc2LjQzOCAxMTMuNzU2LDc2LjQ1OSAxMTMuNjc1LDc2LjQ1OSIgaWQ9IkZpbGwtMjQiIGZpbGw9IiM0NTVBNjQiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTUzLjMxNiwyMS4yNzkgQzE1MC45MDMsMjEuMjc5IDE0OC40OTUsMjAuNzUxIDE0Ni42NjQsMTkuNjkzIEMxNDQuODQ2LDE4LjY0NCAxNDMuODQ0LDE3LjIzMiAxNDMuODQ0LDE1LjcxOCBDMTQzLjg0NCwxNC4xOTEgMTQ0Ljg2LDEyLjc2MyAxNDYuNzA1LDExLjY5OCBMMTU2LjE5OCw2LjA5MSBDMTU2LjMwOSw2LjAyNSAxNTYuNDUyLDYuMDYyIDE1Ni41MTgsNi4xNzMgQzE1Ni41ODMsNi4yODQgMTU2LjU0Nyw2LjQyNyAxNTYuNDM2LDYuNDkzIEwxNDYuOTQsMTIuMTAyIEMxNDUuMjQ0LDEzLjA4MSAxNDQuMzEyLDE0LjM2NSAxNDQuMzEyLDE1LjcxOCBDMTQ0LjMxMiwxNy4wNTggMTQ1LjIzLDE4LjMyNiAxNDYuODk3LDE5LjI4OSBDMTUwLjQ0NiwyMS4zMzggMTU2LjI0LDIxLjMyNyAxNTkuODExLDE5LjI2NSBMMTY5LjU1OSwxMy42MzcgQzE2OS42NywxMy41NzMgMTY5LjgxMywxMy42MTEgMTY5Ljg3OCwxMy43MjMgQzE2OS45NDMsMTMuODM0IDE2OS45MDQsMTMuOTc3IDE2OS43OTMsMTQuMDQyIEwxNjAuMDQ1LDE5LjY3IEMxNTguMTg3LDIwLjc0MiAxNTUuNzQ5LDIxLjI3OSAxNTMuMzE2LDIxLjI3OSIgaWQ9IkZpbGwtMjUiIGZpbGw9IiM2MDdEOEIiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTEzLjY3NSw3NS45OTIgTDY3Ljc2Miw0OS40ODQiIGlkPSJGaWxsLTI2IiBmaWxsPSIjNDU1QTY0Ij48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTExMy42NzUsNzYuMzQyIEMxMTMuNjE1LDc2LjM0MiAxMTMuNTU1LDc2LjMyNyAxMTMuNSw3Ni4yOTUgTDY3LjU4Nyw0OS43ODcgQzY3LjQxOSw0OS42OSA2Ny4zNjIsNDkuNDc2IDY3LjQ1OSw0OS4zMDkgQzY3LjU1Niw0OS4xNDEgNjcuNzcsNDkuMDgzIDY3LjkzNyw0OS4xOCBMMTEzLjg1LDc1LjY4OCBDMTE0LjAxOCw3NS43ODUgMTE0LjA3NSw3NiAxMTMuOTc4LDc2LjE2NyBDMTEzLjkxNCw3Ni4yNzkgMTEzLjc5Niw3Ni4zNDIgMTEzLjY3NSw3Ni4zNDIiIGlkPSJGaWxsLTI3IiBmaWxsPSIjNDU1QTY0Ij48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTY3Ljc2Miw0OS40ODQgTDY3Ljc2MiwxMDMuNDg1IEM2Ny43NjIsMTA0LjU3NSA2OC41MzIsMTA1LjkwMyA2OS40ODIsMTA2LjQ1MiBMMTExLjk1NSwxMzAuOTczIEMxMTIuOTA1LDEzMS41MjIgMTEzLjY3NSwxMzEuMDgzIDExMy42NzUsMTI5Ljk5MyBMMTEzLjY3NSw3NS45OTIiIGlkPSJGaWxsLTI4IiBmaWxsPSIjRkFGQUZBIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTExMi43MjcsMTMxLjU2MSBDMTEyLjQzLDEzMS41NjEgMTEyLjEwNywxMzEuNDY2IDExMS43OCwxMzEuMjc2IEw2OS4zMDcsMTA2Ljc1NSBDNjguMjQ0LDEwNi4xNDIgNjcuNDEyLDEwNC43MDUgNjcuNDEyLDEwMy40ODUgTDY3LjQxMiw0OS40ODQgQzY3LjQxMiw0OS4yOSA2Ny41NjksNDkuMTM0IDY3Ljc2Miw0OS4xMzQgQzY3Ljk1Niw0OS4xMzQgNjguMTEzLDQ5LjI5IDY4LjExMyw0OS40ODQgTDY4LjExMywxMDMuNDg1IEM2OC4xMTMsMTA0LjQ0NSA2OC44MiwxMDUuNjY1IDY5LjY1NywxMDYuMTQ4IEwxMTIuMTMsMTMwLjY3IEMxMTIuNDc0LDEzMC44NjggMTEyLjc5MSwxMzAuOTEzIDExMywxMzAuNzkyIEMxMTMuMjA2LDEzMC42NzMgMTEzLjMyNSwxMzAuMzgxIDExMy4zMjUsMTI5Ljk5MyBMMTEzLjMyNSw3NS45OTIgQzExMy4zMjUsNzUuNzk4IDExMy40ODIsNzUuNjQxIDExMy42NzUsNzUuNjQxIEMxMTMuODY5LDc1LjY0MSAxMTQuMDI1LDc1Ljc5OCAxMTQuMDI1LDc1Ljk5MiBMMTE0LjAyNSwxMjkuOTkzIEMxMTQuMDI1LDEzMC42NDggMTEzLjc4NiwxMzEuMTQ3IDExMy4zNSwxMzEuMzk5IEMxMTMuMTYyLDEzMS41MDcgMTEyLjk1MiwxMzEuNTYxIDExMi43MjcsMTMxLjU2MSIgaWQ9IkZpbGwtMjkiIGZpbGw9IiM0NTVBNjQiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTEyLjg2LDQwLjUxMiBDMTEyLjg2LDQwLjUxMiAxMTIuODYsNDAuNTEyIDExMi44NTksNDAuNTEyIEMxMTAuNTQxLDQwLjUxMiAxMDguMzYsMzkuOTkgMTA2LjcxNywzOS4wNDEgQzEwNS4wMTIsMzguMDU3IDEwNC4wNzQsMzYuNzI2IDEwNC4wNzQsMzUuMjkyIEMxMDQuMDc0LDMzLjg0NyAxMDUuMDI2LDMyLjUwMSAxMDYuNzU0LDMxLjUwNCBMMTE4Ljc5NSwyNC41NTEgQzEyMC40NjMsMjMuNTg5IDEyMi42NjksMjMuMDU4IDEyNS4wMDcsMjMuMDU4IEMxMjcuMzI1LDIzLjA1OCAxMjkuNTA2LDIzLjU4MSAxMzEuMTUsMjQuNTMgQzEzMi44NTQsMjUuNTE0IDEzMy43OTMsMjYuODQ1IDEzMy43OTMsMjguMjc4IEMxMzMuNzkzLDI5LjcyNCAxMzIuODQxLDMxLjA2OSAxMzEuMTEzLDMyLjA2NyBMMTE5LjA3MSwzOS4wMTkgQzExNy40MDMsMzkuOTgyIDExNS4xOTcsNDAuNTEyIDExMi44Niw0MC41MTIgTDExMi44Niw0MC41MTIgWiBNMTI1LjAwNywyMy43NTkgQzEyMi43OSwyMy43NTkgMTIwLjcwOSwyNC4yNTYgMTE5LjE0NiwyNS4xNTggTDEwNy4xMDQsMzIuMTEgQzEwNS42MDIsMzIuOTc4IDEwNC43NzQsMzQuMTA4IDEwNC43NzQsMzUuMjkyIEMxMDQuNzc0LDM2LjQ2NSAxMDUuNTg5LDM3LjU4MSAxMDcuMDY3LDM4LjQzNCBDMTA4LjYwNSwzOS4zMjMgMTEwLjY2MywzOS44MTIgMTEyLjg1OSwzOS44MTIgTDExMi44NiwzOS44MTIgQzExNS4wNzYsMzkuODEyIDExNy4xNTgsMzkuMzE1IDExOC43MjEsMzguNDEzIEwxMzAuNzYyLDMxLjQ2IEMxMzIuMjY0LDMwLjU5MyAxMzMuMDkyLDI5LjQ2MyAxMzMuMDkyLDI4LjI3OCBDMTMzLjA5MiwyNy4xMDYgMTMyLjI3OCwyNS45OSAxMzAuOCwyNS4xMzYgQzEyOS4yNjEsMjQuMjQ4IDEyNy4yMDQsMjMuNzU5IDEyNS4wMDcsMjMuNzU5IEwxMjUuMDA3LDIzLjc1OSBaIiBpZD0iRmlsbC0zMCIgZmlsbD0iIzYwN0Q4QiI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0xNjUuNjMsMTYuMjE5IEwxNTkuODk2LDE5LjUzIEMxNTYuNzI5LDIxLjM1OCAxNTEuNjEsMjEuMzY3IDE0OC40NjMsMTkuNTUgQzE0NS4zMTYsMTcuNzMzIDE0NS4zMzIsMTQuNzc4IDE0OC40OTksMTIuOTQ5IEwxNTQuMjMzLDkuNjM5IEwxNjUuNjMsMTYuMjE5IiBpZD0iRmlsbC0zMSIgZmlsbD0iI0ZBRkFGQSI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0xNTQuMjMzLDEwLjQ0OCBMMTY0LjIyOCwxNi4yMTkgTDE1OS41NDYsMTguOTIzIEMxNTguMTEyLDE5Ljc1IDE1Ni4xOTQsMjAuMjA2IDE1NC4xNDcsMjAuMjA2IEMxNTIuMTE4LDIwLjIwNiAxNTAuMjI0LDE5Ljc1NyAxNDguODE0LDE4Ljk0MyBDMTQ3LjUyNCwxOC4xOTkgMTQ2LjgxNCwxNy4yNDkgMTQ2LjgxNCwxNi4yNjkgQzE0Ni44MTQsMTUuMjc4IDE0Ny41MzcsMTQuMzE0IDE0OC44NSwxMy41NTYgTDE1NC4yMzMsMTAuNDQ4IE0xNTQuMjMzLDkuNjM5IEwxNDguNDk5LDEyLjk0OSBDMTQ1LjMzMiwxNC43NzggMTQ1LjMxNiwxNy43MzMgMTQ4LjQ2MywxOS41NSBDMTUwLjAzMSwyMC40NTUgMTUyLjA4NiwyMC45MDcgMTU0LjE0NywyMC45MDcgQzE1Ni4yMjQsMjAuOTA3IDE1OC4zMDYsMjAuNDQ3IDE1OS44OTYsMTkuNTMgTDE2NS42MywxNi4yMTkgTDE1NC4yMzMsOS42MzkiIGlkPSJGaWxsLTMyIiBmaWxsPSIjNjA3RDhCIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTE0NS40NDUsNzIuNjY3IEwxNDUuNDQ1LDcyLjY2NyBDMTQzLjY3Miw3Mi42NjcgMTQyLjIwNCw3MS44MTcgMTQxLjIwMiw3MC40MjIgQzE0MS4xMzUsNzAuMzMgMTQxLjE0NSw3MC4xNDcgMTQxLjIyNSw3MC4wNjYgQzE0MS4zMDUsNjkuOTg1IDE0MS40MzIsNjkuOTQ2IDE0MS41MjUsNzAuMDExIEMxNDIuMzA2LDcwLjU1OSAxNDMuMjMxLDcwLjgyMyAxNDQuMjc2LDcwLjgyMiBDMTQ1LjU5OCw3MC44MjIgMTQ3LjAzLDcwLjM3NiAxNDguNTMyLDY5LjUwOSBDMTUzLjg0Miw2Ni40NDMgMTU4LjE2Myw1OC45ODcgMTU4LjE2Myw1Mi44OTQgQzE1OC4xNjMsNTAuOTY3IDE1Ny43MjEsNDkuMzMyIDE1Ni44ODQsNDguMTY4IEMxNTYuODE4LDQ4LjA3NiAxNTYuODI4LDQ3Ljk0OCAxNTYuOTA4LDQ3Ljg2NyBDMTU2Ljk4OCw0Ny43ODYgMTU3LjExNCw0Ny43NzQgMTU3LjIwOCw0Ny44NCBDMTU4Ljg3OCw0OS4wMTIgMTU5Ljc5OCw1MS4yMiAxNTkuNzk4LDU0LjA1OSBDMTU5Ljc5OCw2MC4zMDEgMTU1LjM3Myw2OC4wNDYgMTQ5LjkzMyw3MS4xODYgQzE0OC4zNiw3Mi4wOTQgMTQ2Ljg1LDcyLjY2NyAxNDUuNDQ1LDcyLjY2NyBMMTQ1LjQ0NSw3Mi42NjcgWiBNMTQyLjQ3Niw3MSBDMTQzLjI5LDcxLjY1MSAxNDQuMjk2LDcyLjAwMiAxNDUuNDQ1LDcyLjAwMiBDMTQ2Ljc2Nyw3Mi4wMDIgMTQ4LjE5OCw3MS41NSAxNDkuNyw3MC42ODIgQzE1NS4wMSw2Ny42MTcgMTU5LjMzMSw2MC4xNTkgMTU5LjMzMSw1NC4wNjUgQzE1OS4zMzEsNTIuMDg1IDE1OC44NjgsNTAuNDM1IDE1OC4wMDYsNDkuMjcyIEMxNTguNDE3LDUwLjMwNyAxNTguNjMsNTEuNTMyIDE1OC42Myw1Mi44OTIgQzE1OC42Myw1OS4xMzQgMTU0LjIwNSw2Ni43NjcgMTQ4Ljc2NSw2OS45MDcgQzE0Ny4xOTIsNzAuODE2IDE0NS42ODEsNzEuMjgzIDE0NC4yNzYsNzEuMjgzIEMxNDMuNjM0LDcxLjI4MyAxNDMuMDMzLDcxLjE5MiAxNDIuNDc2LDcxIEwxNDIuNDc2LDcxIFoiIGlkPSJGaWxsLTMzIiBmaWxsPSIjNjA3RDhCIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTE0OC42NDgsNjkuNzA0IEMxNTQuMDMyLDY2LjU5NiAxNTguMzk2LDU5LjA2OCAxNTguMzk2LDUyLjg5MSBDMTU4LjM5Niw1MC44MzkgMTU3LjkxMyw0OS4xOTggMTU3LjA3NCw0OC4wMyBDMTU1LjI4OSw0Ni43NzggMTUyLjY5OSw0Ni44MzYgMTQ5LjgxNiw0OC41MDEgQzE0NC40MzMsNTEuNjA5IDE0MC4wNjgsNTkuMTM3IDE0MC4wNjgsNjUuMzE0IEMxNDAuMDY4LDY3LjM2NSAxNDAuNTUyLDY5LjAwNiAxNDEuMzkxLDcwLjE3NCBDMTQzLjE3Niw3MS40MjcgMTQ1Ljc2NSw3MS4zNjkgMTQ4LjY0OCw2OS43MDQiIGlkPSJGaWxsLTM0IiBmaWxsPSIjRkFGQUZBIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTE0NC4yNzYsNzEuMjc2IEwxNDQuMjc2LDcxLjI3NiBDMTQzLjEzMyw3MS4yNzYgMTQyLjExOCw3MC45NjkgMTQxLjI1Nyw3MC4zNjUgQzE0MS4yMzYsNzAuMzUxIDE0MS4yMTcsNzAuMzMyIDE0MS4yMDIsNzAuMzExIEMxNDAuMzA3LDY5LjA2NyAxMzkuODM1LDY3LjMzOSAxMzkuODM1LDY1LjMxNCBDMTM5LjgzNSw1OS4wNzMgMTQ0LjI2LDUxLjQzOSAxNDkuNyw0OC4yOTggQzE1MS4yNzMsNDcuMzkgMTUyLjc4NCw0Ni45MjkgMTU0LjE4OSw0Ni45MjkgQzE1NS4zMzIsNDYuOTI5IDE1Ni4zNDcsNDcuMjM2IDE1Ny4yMDgsNDcuODM5IEMxNTcuMjI5LDQ3Ljg1NCAxNTcuMjQ4LDQ3Ljg3MyAxNTcuMjYzLDQ3Ljg5NCBDMTU4LjE1Nyw0OS4xMzggMTU4LjYzLDUwLjg2NSAxNTguNjMsNTIuODkxIEMxNTguNjMsNTkuMTMyIDE1NC4yMDUsNjYuNzY2IDE0OC43NjUsNjkuOTA3IEMxNDcuMTkyLDcwLjgxNSAxNDUuNjgxLDcxLjI3NiAxNDQuMjc2LDcxLjI3NiBMMTQ0LjI3Niw3MS4yNzYgWiBNMTQxLjU1OCw3MC4xMDQgQzE0Mi4zMzEsNzAuNjM3IDE0My4yNDUsNzEuMDA1IDE0NC4yNzYsNzEuMDA1IEMxNDUuNTk4LDcxLjAwNSAxNDcuMDMsNzAuNDY3IDE0OC41MzIsNjkuNiBDMTUzLjg0Miw2Ni41MzQgMTU4LjE2Myw1OS4wMzMgMTU4LjE2Myw1Mi45MzkgQzE1OC4xNjMsNTEuMDMxIDE1Ny43MjksNDkuMzg1IDE1Ni45MDcsNDguMjIzIEMxNTYuMTMzLDQ3LjY5MSAxNTUuMjE5LDQ3LjQwOSAxNTQuMTg5LDQ3LjQwOSBDMTUyLjg2Nyw0Ny40MDkgMTUxLjQzNSw0Ny44NDIgMTQ5LjkzMyw0OC43MDkgQzE0NC42MjMsNTEuNzc1IDE0MC4zMDIsNTkuMjczIDE0MC4zMDIsNjUuMzY2IEMxNDAuMzAyLDY3LjI3NiAxNDAuNzM2LDY4Ljk0MiAxNDEuNTU4LDcwLjEwNCBMMTQxLjU1OCw3MC4xMDQgWiIgaWQ9IkZpbGwtMzUiIGZpbGw9IiM2MDdEOEIiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTUwLjcyLDY1LjM2MSBMMTUwLjM1Nyw2NS4wNjYgQzE1MS4xNDcsNjQuMDkyIDE1MS44NjksNjMuMDQgMTUyLjUwNSw2MS45MzggQzE1My4zMTMsNjAuNTM5IDE1My45NzgsNTkuMDY3IDE1NC40ODIsNTcuNTYzIEwxNTQuOTI1LDU3LjcxMiBDMTU0LjQxMiw1OS4yNDUgMTUzLjczMyw2MC43NDUgMTUyLjkxLDYyLjE3MiBDMTUyLjI2Miw2My4yOTUgMTUxLjUyNSw2NC4zNjggMTUwLjcyLDY1LjM2MSIgaWQ9IkZpbGwtMzYiIGZpbGw9IiM2MDdEOEIiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTE1LjkxNyw4NC41MTQgTDExNS41NTQsODQuMjIgQzExNi4zNDQsODMuMjQ1IDExNy4wNjYsODIuMTk0IDExNy43MDIsODEuMDkyIEMxMTguNTEsNzkuNjkyIDExOS4xNzUsNzguMjIgMTE5LjY3OCw3Ni43MTcgTDEyMC4xMjEsNzYuODY1IEMxMTkuNjA4LDc4LjM5OCAxMTguOTMsNzkuODk5IDExOC4xMDYsODEuMzI2IEMxMTcuNDU4LDgyLjQ0OCAxMTYuNzIyLDgzLjUyMSAxMTUuOTE3LDg0LjUxNCIgaWQ9IkZpbGwtMzciIGZpbGw9IiM2MDdEOEIiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTE0LDEzMC40NzYgTDExNCwxMzAuMDA4IEwxMTQsNzYuMDUyIEwxMTQsNzUuNTg0IEwxMTQsNzYuMDUyIEwxMTQsMTMwLjAwOCBMMTE0LDEzMC40NzYiIGlkPSJGaWxsLTM4IiBmaWxsPSIjNjA3RDhCIj48L3BhdGg+CiAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgICAgICA8ZyBpZD0iSW1wb3J0ZWQtTGF5ZXJzLUNvcHkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDYyLjAwMDAwMCwgMC4wMDAwMDApIiBza2V0Y2g6dHlwZT0iTVNTaGFwZUdyb3VwIj4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTkuODIyLDM3LjQ3NCBDMTkuODM5LDM3LjMzOSAxOS43NDcsMzcuMTk0IDE5LjU1NSwzNy4wODIgQzE5LjIyOCwzNi44OTQgMTguNzI5LDM2Ljg3MiAxOC40NDYsMzcuMDM3IEwxMi40MzQsNDAuNTA4IEMxMi4zMDMsNDAuNTg0IDEyLjI0LDQwLjY4NiAxMi4yNDMsNDAuNzkzIEMxMi4yNDUsNDAuOTI1IDEyLjI0NSw0MS4yNTQgMTIuMjQ1LDQxLjM3MSBMMTIuMjQ1LDQxLjQxNCBMMTIuMjM4LDQxLjU0MiBDOC4xNDgsNDMuODg3IDUuNjQ3LDQ1LjMyMSA1LjY0Nyw0NS4zMjEgQzUuNjQ2LDQ1LjMyMSAzLjU3LDQ2LjM2NyAyLjg2LDUwLjUxMyBDMi44Niw1MC41MTMgMS45NDgsNTcuNDc0IDEuOTYyLDcwLjI1OCBDMS45NzcsODIuODI4IDIuNTY4LDg3LjMyOCAzLjEyOSw5MS42MDkgQzMuMzQ5LDkzLjI5MyA2LjEzLDkzLjczNCA2LjEzLDkzLjczNCBDNi40NjEsOTMuNzc0IDYuODI4LDkzLjcwNyA3LjIxLDkzLjQ4NiBMODIuNDgzLDQ5LjkzNSBDODQuMjkxLDQ4Ljg2NiA4NS4xNSw0Ni4yMTYgODUuNTM5LDQzLjY1MSBDODYuNzUyLDM1LjY2MSA4Ny4yMTQsMTAuNjczIDg1LjI2NCwzLjc3MyBDODUuMDY4LDMuMDggODQuNzU0LDIuNjkgODQuMzk2LDIuNDkxIEw4Mi4zMSwxLjcwMSBDODEuNTgzLDEuNzI5IDgwLjg5NCwyLjE2OCA4MC43NzYsMi4yMzYgQzgwLjYzNiwyLjMxNyA0MS44MDcsMjQuNTg1IDIwLjAzMiwzNy4wNzIgTDE5LjgyMiwzNy40NzQiIGlkPSJGaWxsLTEiIGZpbGw9IiNGRkZGRkYiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNODIuMzExLDEuNzAxIEw4NC4zOTYsMi40OTEgQzg0Ljc1NCwyLjY5IDg1LjA2OCwzLjA4IDg1LjI2NCwzLjc3MyBDODcuMjEzLDEwLjY3MyA4Ni43NTEsMzUuNjYgODUuNTM5LDQzLjY1MSBDODUuMTQ5LDQ2LjIxNiA4NC4yOSw0OC44NjYgODIuNDgzLDQ5LjkzNSBMNy4yMSw5My40ODYgQzYuODk3LDkzLjY2NyA2LjU5NSw5My43NDQgNi4zMTQsOTMuNzQ0IEw2LjEzMSw5My43MzMgQzYuMTMxLDkzLjczNCAzLjM0OSw5My4yOTMgMy4xMjgsOTEuNjA5IEMyLjU2OCw4Ny4zMjcgMS45NzcsODIuODI4IDEuOTYzLDcwLjI1OCBDMS45NDgsNTcuNDc0IDIuODYsNTAuNTEzIDIuODYsNTAuNTEzIEMzLjU3LDQ2LjM2NyA1LjY0Nyw0NS4zMjEgNS42NDcsNDUuMzIxIEM1LjY0Nyw0NS4zMjEgOC4xNDgsNDMuODg3IDEyLjIzOCw0MS41NDIgTDEyLjI0NSw0MS40MTQgTDEyLjI0NSw0MS4zNzEgQzEyLjI0NSw0MS4yNTQgMTIuMjQ1LDQwLjkyNSAxMi4yNDMsNDAuNzkzIEMxMi4yNCw0MC42ODYgMTIuMzAyLDQwLjU4MyAxMi40MzQsNDAuNTA4IEwxOC40NDYsMzcuMDM2IEMxOC41NzQsMzYuOTYyIDE4Ljc0NiwzNi45MjYgMTguOTI3LDM2LjkyNiBDMTkuMTQ1LDM2LjkyNiAxOS4zNzYsMzYuOTc5IDE5LjU1NCwzNy4wODIgQzE5Ljc0NywzNy4xOTQgMTkuODM5LDM3LjM0IDE5LjgyMiwzNy40NzQgTDIwLjAzMywzNy4wNzIgQzQxLjgwNiwyNC41ODUgODAuNjM2LDIuMzE4IDgwLjc3NywyLjIzNiBDODAuODk0LDIuMTY4IDgxLjU4MywxLjcyOSA4Mi4zMTEsMS43MDEgTTgyLjMxMSwwLjcwNCBMODIuMjcyLDAuNzA1IEM4MS42NTQsMC43MjggODAuOTg5LDAuOTQ5IDgwLjI5OCwxLjM2MSBMODAuMjc3LDEuMzczIEM4MC4xMjksMS40NTggNTkuNzY4LDEzLjEzNSAxOS43NTgsMzYuMDc5IEMxOS41LDM1Ljk4MSAxOS4yMTQsMzUuOTI5IDE4LjkyNywzNS45MjkgQzE4LjU2MiwzNS45MjkgMTguMjIzLDM2LjAxMyAxNy45NDcsMzYuMTczIEwxMS45MzUsMzkuNjQ0IEMxMS40OTMsMzkuODk5IDExLjIzNiw0MC4zMzQgMTEuMjQ2LDQwLjgxIEwxMS4yNDcsNDAuOTYgTDUuMTY3LDQ0LjQ0NyBDNC43OTQsNDQuNjQ2IDIuNjI1LDQ1Ljk3OCAxLjg3Nyw1MC4zNDUgTDEuODcxLDUwLjM4NCBDMS44NjIsNTAuNDU0IDAuOTUxLDU3LjU1NyAwLjk2NSw3MC4yNTkgQzAuOTc5LDgyLjg3OSAxLjU2OCw4Ny4zNzUgMi4xMzcsOTEuNzI0IEwyLjEzOSw5MS43MzkgQzIuNDQ3LDk0LjA5NCA1LjYxNCw5NC42NjIgNS45NzUsOTQuNzE5IEw2LjAwOSw5NC43MjMgQzYuMTEsOTQuNzM2IDYuMjEzLDk0Ljc0MiA2LjMxNCw5NC43NDIgQzYuNzksOTQuNzQyIDcuMjYsOTQuNjEgNy43MSw5NC4zNSBMODIuOTgzLDUwLjc5OCBDODQuNzk0LDQ5LjcyNyA4NS45ODIsNDcuMzc1IDg2LjUyNSw0My44MDEgQzg3LjcxMSwzNS45ODcgODguMjU5LDEwLjcwNSA4Ni4yMjQsMy41MDIgQzg1Ljk3MSwyLjYwOSA4NS41MiwxLjk3NSA4NC44ODEsMS42MiBMODQuNzQ5LDEuNTU4IEw4Mi42NjQsMC43NjkgQzgyLjU1MSwwLjcyNSA4Mi40MzEsMC43MDQgODIuMzExLDAuNzA0IiBpZD0iRmlsbC0yIiBmaWxsPSIjNDU1QTY0Ij48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTY2LjI2NywxMS41NjUgTDY3Ljc2MiwxMS45OTkgTDExLjQyMyw0NC4zMjUiIGlkPSJGaWxsLTMiIGZpbGw9IiNGRkZGRkYiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTIuMjAyLDkwLjU0NSBDMTIuMDI5LDkwLjU0NSAxMS44NjIsOTAuNDU1IDExLjc2OSw5MC4yOTUgQzExLjYzMiw5MC4wNTcgMTEuNzEzLDg5Ljc1MiAxMS45NTIsODkuNjE0IEwzMC4zODksNzguOTY5IEMzMC42MjgsNzguODMxIDMwLjkzMyw3OC45MTMgMzEuMDcxLDc5LjE1MiBDMzEuMjA4LDc5LjM5IDMxLjEyNyw3OS42OTYgMzAuODg4LDc5LjgzMyBMMTIuNDUxLDkwLjQ3OCBMMTIuMjAyLDkwLjU0NSIgaWQ9IkZpbGwtNCIgZmlsbD0iIzYwN0Q4QiI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0xMy43NjQsNDIuNjU0IEwxMy42NTYsNDIuNTkyIEwxMy43MDIsNDIuNDIxIEwxOC44MzcsMzkuNDU3IEwxOS4wMDcsMzkuNTAyIEwxOC45NjIsMzkuNjczIEwxMy44MjcsNDIuNjM3IEwxMy43NjQsNDIuNjU0IiBpZD0iRmlsbC01IiBmaWxsPSIjNjA3RDhCIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTguNTIsOTAuMzc1IEw4LjUyLDQ2LjQyMSBMOC41ODMsNDYuMzg1IEw3NS44NCw3LjU1NCBMNzUuODQsNTEuNTA4IEw3NS43NzgsNTEuNTQ0IEw4LjUyLDkwLjM3NSBMOC41Miw5MC4zNzUgWiBNOC43Nyw0Ni41NjQgTDguNzcsODkuOTQ0IEw3NS41OTEsNTEuMzY1IEw3NS41OTEsNy45ODUgTDguNzcsNDYuNTY0IEw4Ljc3LDQ2LjU2NCBaIiBpZD0iRmlsbC02IiBmaWxsPSIjNjA3RDhCIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTI0Ljk4Niw4My4xODIgQzI0Ljc1Niw4My4zMzEgMjQuMzc0LDgzLjU2NiAyNC4xMzcsODMuNzA1IEwxMi42MzIsOTAuNDA2IEMxMi4zOTUsOTAuNTQ1IDEyLjQyNiw5MC42NTggMTIuNyw5MC42NTggTDEzLjI2NSw5MC42NTggQzEzLjU0LDkwLjY1OCAxMy45NTgsOTAuNTQ1IDE0LjE5NSw5MC40MDYgTDI1LjcsODMuNzA1IEMyNS45MzcsODMuNTY2IDI2LjEyOCw4My40NTIgMjYuMTI1LDgzLjQ0OSBDMjYuMTIyLDgzLjQ0NyAyNi4xMTksODMuMjIgMjYuMTE5LDgyLjk0NiBDMjYuMTE5LDgyLjY3MiAyNS45MzEsODIuNTY5IDI1LjcwMSw4Mi43MTkgTDI0Ljk4Niw4My4xODIiIGlkPSJGaWxsLTciIGZpbGw9IiM2MDdEOEIiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTMuMjY2LDkwLjc4MiBMMTIuNyw5MC43ODIgQzEyLjUsOTAuNzgyIDEyLjM4NCw5MC43MjYgMTIuMzU0LDkwLjYxNiBDMTIuMzI0LDkwLjUwNiAxMi4zOTcsOTAuMzk5IDEyLjU2OSw5MC4yOTkgTDI0LjA3NCw4My41OTcgQzI0LjMxLDgzLjQ1OSAyNC42ODksODMuMjI2IDI0LjkxOCw4My4wNzggTDI1LjYzMyw4Mi42MTQgQzI1LjcyMyw4Mi41NTUgMjUuODEzLDgyLjUyNSAyNS44OTksODIuNTI1IEMyNi4wNzEsODIuNTI1IDI2LjI0NCw4Mi42NTUgMjYuMjQ0LDgyLjk0NiBDMjYuMjQ0LDgzLjE2IDI2LjI0NSw4My4zMDkgMjYuMjQ3LDgzLjM4MyBMMjYuMjUzLDgzLjM4NyBMMjYuMjQ5LDgzLjQ1NiBDMjYuMjQ2LDgzLjUzMSAyNi4yNDYsODMuNTMxIDI1Ljc2Myw4My44MTIgTDE0LjI1OCw5MC41MTQgQzE0LDkwLjY2NSAxMy41NjQsOTAuNzgyIDEzLjI2Niw5MC43ODIgTDEzLjI2Niw5MC43ODIgWiBNMTIuNjY2LDkwLjUzMiBMMTIuNyw5MC41MzMgTDEzLjI2Niw5MC41MzMgQzEzLjUxOCw5MC41MzMgMTMuOTE1LDkwLjQyNSAxNC4xMzIsOTAuMjk5IEwyNS42MzcsODMuNTk3IEMyNS44MDUsODMuNDk5IDI1LjkzMSw4My40MjQgMjUuOTk4LDgzLjM4MyBDMjUuOTk0LDgzLjI5OSAyNS45OTQsODMuMTY1IDI1Ljk5NCw4Mi45NDYgTDI1Ljg5OSw4Mi43NzUgTDI1Ljc2OCw4Mi44MjQgTDI1LjA1NCw4My4yODcgQzI0LjgyMiw4My40MzcgMjQuNDM4LDgzLjY3MyAyNC4yLDgzLjgxMiBMMTIuNjk1LDkwLjUxNCBMMTIuNjY2LDkwLjUzMiBMMTIuNjY2LDkwLjUzMiBaIiBpZD0iRmlsbC04IiBmaWxsPSIjNjA3RDhCIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTEzLjI2Niw4OS44NzEgTDEyLjcsODkuODcxIEMxMi41LDg5Ljg3MSAxMi4zODQsODkuODE1IDEyLjM1NCw4OS43MDUgQzEyLjMyNCw4OS41OTUgMTIuMzk3LDg5LjQ4OCAxMi41NjksODkuMzg4IEwyNC4wNzQsODIuNjg2IEMyNC4zMzIsODIuNTM1IDI0Ljc2OCw4Mi40MTggMjUuMDY3LDgyLjQxOCBMMjUuNjMyLDgyLjQxOCBDMjUuODMyLDgyLjQxOCAyNS45NDgsODIuNDc0IDI1Ljk3OCw4Mi41ODQgQzI2LjAwOCw4Mi42OTQgMjUuOTM1LDgyLjgwMSAyNS43NjMsODIuOTAxIEwxNC4yNTgsODkuNjAzIEMxNCw4OS43NTQgMTMuNTY0LDg5Ljg3MSAxMy4yNjYsODkuODcxIEwxMy4yNjYsODkuODcxIFogTTEyLjY2Niw4OS42MjEgTDEyLjcsODkuNjIyIEwxMy4yNjYsODkuNjIyIEMxMy41MTgsODkuNjIyIDEzLjkxNSw4OS41MTUgMTQuMTMyLDg5LjM4OCBMMjUuNjM3LDgyLjY4NiBMMjUuNjY3LDgyLjY2OCBMMjUuNjMyLDgyLjY2NyBMMjUuMDY3LDgyLjY2NyBDMjQuODE1LDgyLjY2NyAyNC40MTgsODIuNzc1IDI0LjIsODIuOTAxIEwxMi42OTUsODkuNjAzIEwxMi42NjYsODkuNjIxIEwxMi42NjYsODkuNjIxIFoiIGlkPSJGaWxsLTkiIGZpbGw9IiM2MDdEOEIiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTIuMzcsOTAuODAxIEwxMi4zNyw4OS41NTQgTDEyLjM3LDkwLjgwMSIgaWQ9IkZpbGwtMTAiIGZpbGw9IiM2MDdEOEIiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNNi4xMyw5My45MDEgQzUuMzc5LDkzLjgwOCA0LjgxNiw5My4xNjQgNC42OTEsOTIuNTI1IEMzLjg2LDg4LjI4NyAzLjU0LDgzLjc0MyAzLjUyNiw3MS4xNzMgQzMuNTExLDU4LjM4OSA0LjQyMyw1MS40MjggNC40MjMsNTEuNDI4IEM1LjEzNCw0Ny4yODIgNy4yMSw0Ni4yMzYgNy4yMSw0Ni4yMzYgQzcuMjEsNDYuMjM2IDgxLjY2NywzLjI1IDgyLjA2OSwzLjAxNyBDODIuMjkyLDIuODg4IDg0LjU1NiwxLjQzMyA4NS4yNjQsMy45NCBDODcuMjE0LDEwLjg0IDg2Ljc1MiwzNS44MjcgODUuNTM5LDQzLjgxOCBDODUuMTUsNDYuMzgzIDg0LjI5MSw0OS4wMzMgODIuNDgzLDUwLjEwMSBMNy4yMSw5My42NTMgQzYuODI4LDkzLjg3NCA2LjQ2MSw5My45NDEgNi4xMyw5My45MDEgQzYuMTMsOTMuOTAxIDMuMzQ5LDkzLjQ2IDMuMTI5LDkxLjc3NiBDMi41NjgsODcuNDk1IDEuOTc3LDgyLjk5NSAxLjk2Miw3MC40MjUgQzEuOTQ4LDU3LjY0MSAyLjg2LDUwLjY4IDIuODYsNTAuNjggQzMuNTcsNDYuNTM0IDUuNjQ3LDQ1LjQ4OSA1LjY0Nyw0NS40ODkgQzUuNjQ2LDQ1LjQ4OSA4LjA2NSw0NC4wOTIgMTIuMjQ1LDQxLjY3OSBMMTMuMTE2LDQxLjU2IEwxOS43MTUsMzcuNzMgTDE5Ljc2MSwzNy4yNjkgTDYuMTMsOTMuOTAxIiBpZD0iRmlsbC0xMSIgZmlsbD0iI0ZBRkFGQSI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik02LjMxNyw5NC4xNjEgTDYuMTAyLDk0LjE0OCBMNi4xMDEsOTQuMTQ4IEw1Ljg1Nyw5NC4xMDEgQzUuMTM4LDkzLjk0NSAzLjA4NSw5My4zNjUgMi44ODEsOTEuODA5IEMyLjMxMyw4Ny40NjkgMS43MjcsODIuOTk2IDEuNzEzLDcwLjQyNSBDMS42OTksNTcuNzcxIDIuNjA0LDUwLjcxOCAyLjYxMyw1MC42NDggQzMuMzM4LDQ2LjQxNyA1LjQ0NSw0NS4zMSA1LjUzNSw0NS4yNjYgTDEyLjE2Myw0MS40MzkgTDEzLjAzMyw0MS4zMiBMMTkuNDc5LDM3LjU3OCBMMTkuNTEzLDM3LjI0NCBDMTkuNTI2LDM3LjEwNyAxOS42NDcsMzcuMDA4IDE5Ljc4NiwzNy4wMjEgQzE5LjkyMiwzNy4wMzQgMjAuMDIzLDM3LjE1NiAyMC4wMDksMzcuMjkzIEwxOS45NSwzNy44ODIgTDEzLjE5OCw0MS44MDEgTDEyLjMyOCw0MS45MTkgTDUuNzcyLDQ1LjcwNCBDNS43NDEsNDUuNzIgMy43ODIsNDYuNzcyIDMuMTA2LDUwLjcyMiBDMy4wOTksNTAuNzgyIDIuMTk4LDU3LjgwOCAyLjIxMiw3MC40MjQgQzIuMjI2LDgyLjk2MyAyLjgwOSw4Ny40MiAzLjM3Myw5MS43MjkgQzMuNDY0LDkyLjQyIDQuMDYyLDkyLjg4MyA0LjY4Miw5My4xODEgQzQuNTY2LDkyLjk4NCA0LjQ4Niw5Mi43NzYgNC40NDYsOTIuNTcyIEMzLjY2NSw4OC41ODggMy4yOTEsODQuMzcgMy4yNzYsNzEuMTczIEMzLjI2Miw1OC41MiA0LjE2Nyw1MS40NjYgNC4xNzYsNTEuMzk2IEM0LjkwMSw0Ny4xNjUgNy4wMDgsNDYuMDU5IDcuMDk4LDQ2LjAxNCBDNy4wOTQsNDYuMDE1IDgxLjU0MiwzLjAzNCA4MS45NDQsMi44MDIgTDgxLjk3MiwyLjc4NSBDODIuODc2LDIuMjQ3IDgzLjY5MiwyLjA5NyA4NC4zMzIsMi4zNTIgQzg0Ljg4NywyLjU3MyA4NS4yODEsMy4wODUgODUuNTA0LDMuODcyIEM4Ny41MTgsMTEgODYuOTY0LDM2LjA5MSA4NS43ODUsNDMuODU1IEM4NS4yNzgsNDcuMTk2IDg0LjIxLDQ5LjM3IDgyLjYxLDUwLjMxNyBMNy4zMzUsOTMuODY5IEM2Ljk5OSw5NC4wNjMgNi42NTgsOTQuMTYxIDYuMzE3LDk0LjE2MSBMNi4zMTcsOTQuMTYxIFogTTYuMTcsOTMuNjU0IEM2LjQ2Myw5My42OSA2Ljc3NCw5My42MTcgNy4wODUsOTMuNDM3IEw4Mi4zNTgsNDkuODg2IEM4NC4xODEsNDguODA4IDg0Ljk2LDQ1Ljk3MSA4NS4yOTIsNDMuNzggQzg2LjQ2NiwzNi4wNDkgODcuMDIzLDExLjA4NSA4NS4wMjQsNC4wMDggQzg0Ljg0NiwzLjM3NyA4NC41NTEsMi45NzYgODQuMTQ4LDIuODE2IEM4My42NjQsMi42MjMgODIuOTgyLDIuNzY0IDgyLjIyNywzLjIxMyBMODIuMTkzLDMuMjM0IEM4MS43OTEsMy40NjYgNy4zMzUsNDYuNDUyIDcuMzM1LDQ2LjQ1MiBDNy4zMDQsNDYuNDY5IDUuMzQ2LDQ3LjUyMSA0LjY2OSw1MS40NzEgQzQuNjYyLDUxLjUzIDMuNzYxLDU4LjU1NiAzLjc3NSw3MS4xNzMgQzMuNzksODQuMzI4IDQuMTYxLDg4LjUyNCA0LjkzNiw5Mi40NzYgQzUuMDI2LDkyLjkzNyA1LjQxMiw5My40NTkgNS45NzMsOTMuNjE1IEM2LjA4Nyw5My42NCA2LjE1OCw5My42NTIgNi4xNjksOTMuNjU0IEw2LjE3LDkzLjY1NCBMNi4xNyw5My42NTQgWiIgaWQ9IkZpbGwtMTIiIGZpbGw9IiM0NTVBNjQiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNNy4zMTcsNjguOTgyIEM3LjgwNiw2OC43MDEgOC4yMDIsNjguOTI2IDguMjAyLDY5LjQ4NyBDOC4yMDIsNzAuMDQ3IDcuODA2LDcwLjczIDcuMzE3LDcxLjAxMiBDNi44MjksNzEuMjk0IDYuNDMzLDcxLjA2OSA2LjQzMyw3MC41MDggQzYuNDMzLDY5Ljk0OCA2LjgyOSw2OS4yNjUgNy4zMTcsNjguOTgyIiBpZD0iRmlsbC0xMyIgZmlsbD0iI0ZGRkZGRiI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik02LjkyLDcxLjEzMyBDNi42MzEsNzEuMTMzIDYuNDMzLDcwLjkwNSA2LjQzMyw3MC41MDggQzYuNDMzLDY5Ljk0OCA2LjgyOSw2OS4yNjUgNy4zMTcsNjguOTgyIEM3LjQ2LDY4LjkgNy41OTUsNjguODYxIDcuNzE0LDY4Ljg2MSBDOC4wMDMsNjguODYxIDguMjAyLDY5LjA5IDguMjAyLDY5LjQ4NyBDOC4yMDIsNzAuMDQ3IDcuODA2LDcwLjczIDcuMzE3LDcxLjAxMiBDNy4xNzQsNzEuMDk0IDcuMDM5LDcxLjEzMyA2LjkyLDcxLjEzMyBNNy43MTQsNjguNjc0IEM3LjU1Nyw2OC42NzQgNy4zOTIsNjguNzIzIDcuMjI0LDY4LjgyMSBDNi42NzYsNjkuMTM4IDYuMjQ2LDY5Ljg3OSA2LjI0Niw3MC41MDggQzYuMjQ2LDcwLjk5NCA2LjUxNyw3MS4zMiA2LjkyLDcxLjMyIEM3LjA3OCw3MS4zMiA3LjI0Myw3MS4yNzEgNy40MTEsNzEuMTc0IEM3Ljk1OSw3MC44NTcgOC4zODksNzAuMTE3IDguMzg5LDY5LjQ4NyBDOC4zODksNjkuMDAxIDguMTE3LDY4LjY3NCA3LjcxNCw2OC42NzQiIGlkPSJGaWxsLTE0IiBmaWxsPSIjODA5N0EyIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTYuOTIsNzAuOTQ3IEM2LjY0OSw3MC45NDcgNi42MjEsNzAuNjQgNi42MjEsNzAuNTA4IEM2LjYyMSw3MC4wMTcgNi45ODIsNjkuMzkyIDcuNDExLDY5LjE0NSBDNy41MjEsNjkuMDgyIDcuNjI1LDY5LjA0OSA3LjcxNCw2OS4wNDkgQzcuOTg2LDY5LjA0OSA4LjAxNSw2OS4zNTUgOC4wMTUsNjkuNDg3IEM4LjAxNSw2OS45NzggNy42NTIsNzAuNjAzIDcuMjI0LDcwLjg1MSBDNy4xMTUsNzAuOTE0IDcuMDEsNzAuOTQ3IDYuOTIsNzAuOTQ3IE03LjcxNCw2OC44NjEgQzcuNTk1LDY4Ljg2MSA3LjQ2LDY4LjkgNy4zMTcsNjguOTgyIEM2LjgyOSw2OS4yNjUgNi40MzMsNjkuOTQ4IDYuNDMzLDcwLjUwOCBDNi40MzMsNzAuOTA1IDYuNjMxLDcxLjEzMyA2LjkyLDcxLjEzMyBDNy4wMzksNzEuMTMzIDcuMTc0LDcxLjA5NCA3LjMxNyw3MS4wMTIgQzcuODA2LDcwLjczIDguMjAyLDcwLjA0NyA4LjIwMiw2OS40ODcgQzguMjAyLDY5LjA5IDguMDAzLDY4Ljg2MSA3LjcxNCw2OC44NjEiIGlkPSJGaWxsLTE1IiBmaWxsPSIjODA5N0EyIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTcuNDQ0LDg1LjM1IEM3LjcwOCw4NS4xOTggNy45MjEsODUuMzE5IDcuOTIxLDg1LjYyMiBDNy45MjEsODUuOTI1IDcuNzA4LDg2LjI5MiA3LjQ0NCw4Ni40NDQgQzcuMTgxLDg2LjU5NyA2Ljk2Nyw4Ni40NzUgNi45NjcsODYuMTczIEM2Ljk2Nyw4NS44NzEgNy4xODEsODUuNTAyIDcuNDQ0LDg1LjM1IiBpZD0iRmlsbC0xNiIgZmlsbD0iI0ZGRkZGRiI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik03LjIzLDg2LjUxIEM3LjA3NCw4Ni41MSA2Ljk2Nyw4Ni4zODcgNi45NjcsODYuMTczIEM2Ljk2Nyw4NS44NzEgNy4xODEsODUuNTAyIDcuNDQ0LDg1LjM1IEM3LjUyMSw4NS4zMDUgNy41OTQsODUuMjg0IDcuNjU4LDg1LjI4NCBDNy44MTQsODUuMjg0IDcuOTIxLDg1LjQwOCA3LjkyMSw4NS42MjIgQzcuOTIxLDg1LjkyNSA3LjcwOCw4Ni4yOTIgNy40NDQsODYuNDQ0IEM3LjM2Nyw4Ni40ODkgNy4yOTQsODYuNTEgNy4yMyw4Ni41MSBNNy42NTgsODUuMDk4IEM3LjU1OCw4NS4wOTggNy40NTUsODUuMTI3IDcuMzUxLDg1LjE4OCBDNy4wMzEsODUuMzczIDYuNzgxLDg1LjgwNiA2Ljc4MSw4Ni4xNzMgQzYuNzgxLDg2LjQ4MiA2Ljk2Niw4Ni42OTcgNy4yMyw4Ni42OTcgQzcuMzMsODYuNjk3IDcuNDMzLDg2LjY2NiA3LjUzOCw4Ni42MDcgQzcuODU4LDg2LjQyMiA4LjEwOCw4NS45ODkgOC4xMDgsODUuNjIyIEM4LjEwOCw4NS4zMTMgNy45MjMsODUuMDk4IDcuNjU4LDg1LjA5OCIgaWQ9IkZpbGwtMTciIGZpbGw9IiM4MDk3QTIiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNNy4yMyw4Ni4zMjIgTDcuMTU0LDg2LjE3MyBDNy4xNTQsODUuOTM4IDcuMzMzLDg1LjYyOSA3LjUzOCw4NS41MTIgTDcuNjU4LDg1LjQ3MSBMNy43MzQsODUuNjIyIEM3LjczNCw4NS44NTYgNy41NTUsODYuMTY0IDcuMzUxLDg2LjI4MiBMNy4yMyw4Ni4zMjIgTTcuNjU4LDg1LjI4NCBDNy41OTQsODUuMjg0IDcuNTIxLDg1LjMwNSA3LjQ0NCw4NS4zNSBDNy4xODEsODUuNTAyIDYuOTY3LDg1Ljg3MSA2Ljk2Nyw4Ni4xNzMgQzYuOTY3LDg2LjM4NyA3LjA3NCw4Ni41MSA3LjIzLDg2LjUxIEM3LjI5NCw4Ni41MSA3LjM2Nyw4Ni40ODkgNy40NDQsODYuNDQ0IEM3LjcwOCw4Ni4yOTIgNy45MjEsODUuOTI1IDcuOTIxLDg1LjYyMiBDNy45MjEsODUuNDA4IDcuODE0LDg1LjI4NCA3LjY1OCw4NS4yODQiIGlkPSJGaWxsLTE4IiBmaWxsPSIjODA5N0EyIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTc3LjI3OCw3Ljc2OSBMNzcuMjc4LDUxLjQzNiBMMTAuMjA4LDkwLjE2IEwxMC4yMDgsNDYuNDkzIEw3Ny4yNzgsNy43NjkiIGlkPSJGaWxsLTE5IiBmaWxsPSIjNDU1QTY0Ij48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTEwLjA4Myw5MC4zNzUgTDEwLjA4Myw0Ni40MjEgTDEwLjE0Niw0Ni4zODUgTDc3LjQwMyw3LjU1NCBMNzcuNDAzLDUxLjUwOCBMNzcuMzQxLDUxLjU0NCBMMTAuMDgzLDkwLjM3NSBMMTAuMDgzLDkwLjM3NSBaIE0xMC4zMzMsNDYuNTY0IEwxMC4zMzMsODkuOTQ0IEw3Ny4xNTQsNTEuMzY1IEw3Ny4xNTQsNy45ODUgTDEwLjMzMyw0Ni41NjQgTDEwLjMzMyw0Ni41NjQgWiIgaWQ9IkZpbGwtMjAiIGZpbGw9IiM2MDdEOEIiPjwvcGF0aD4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0xMjUuNzM3LDg4LjY0NyBMMTE4LjA5OCw5MS45ODEgTDExOC4wOTgsODQgTDEwNi42MzksODguNzEzIEwxMDYuNjM5LDk2Ljk4MiBMOTksMTAwLjMxNSBMMTEyLjM2OSwxMDMuOTYxIEwxMjUuNzM3LDg4LjY0NyIgaWQ9IkltcG9ydGVkLUxheWVycy1Db3B5LTIiIGZpbGw9IiM0NTVBNjQiIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+"};var q2="CardboardV1",X2="WEBVR_CARDBOARD_VIEWER";function Ze(){try{this.selectedKey=localStorage.getItem(X2)}catch(t){console.error("Failed to load viewer profile: %s",t)}this.selectedKey||(this.selectedKey=q2),this.dialog=this.Uti(va.Viewers),this.root=null,this.Qti=[]}Ze.prototype.show=function(t){this.root=t,t.appendChild(this.dialog),this.dialog.querySelector("#"+this.selectedKey).checked=!0,this.dialog.style.display="block"},Ze.prototype.hide=function(){this.root&&this.root.contains(this.dialog)&&this.root.removeChild(this.dialog),this.dialog.style.display="none"},Ze.prototype.getCurrentViewer=function(){return va.Viewers[this.selectedKey]},Ze.prototype.Fti=function(){var t=this.dialog.querySelector("input[name=field]:checked");return t?t.id:null},Ze.prototype.onChange=function(t){this.Qti.push(t)},Ze.prototype.Yti=function(t){for(var i=0;i<this.Qti.length;i++)this.Qti[i](t)},Ze.prototype.Gti=function(){if(this.selectedKey=this.Fti(),this.selectedKey&&va.Viewers[this.selectedKey]){this.Yti(va.Viewers[this.selectedKey]);try{localStorage.setItem(X2,this.selectedKey)}catch(t){console.error("Failed to save viewer profile: %s",t)}this.hide()}else console.error("ViewerSelector.onSave_: this should never happen!")},Ze.prototype.Uti=function(t){var i=h.createElement("div");i.classList.add("webvr-polyfill-viewer-selector"),i.style.display="none";var e=h.createElement("div");(n=e.style).position="fixed",n.left=0,n.top=0,n.width="100%",n.height="100%",n.background="rgba(0, 0, 0, 0.3)",e.addEventListener("click",this.hide.bind(this));var s=h.createElement("div"),n=s.style;for(var r in n.boxSizing="border-box",n.position="fixed",n.top="24px",n.left="50%",n.marginLeft="-140px",n.width="280px",n.padding="24px",n.overflow="hidden",n.background="#fafafa",n.fontFamily="'Roboto', sans-serif",n.boxShadow="0px 5px 20px #666",s.appendChild(this.Vti("Select your viewer")),t)s.appendChild(this.Wti(r,t[r].label));return s.appendChild(this.Hti("Save",this.Gti.bind(this))),i.appendChild(e),i.appendChild(s),i},Ze.prototype.Vti=function(t){var i=h.createElement("h1"),e=i.style;return e.color="black",e.fontSize="20px",e.fontWeight="bold",e.marginTop=0,e.marginBottom="24px",i.innerHTML=t,i},Ze.prototype.Wti=function(t,i){var e=h.createElement("div");e.style.marginTop="8px",e.style.color="black";var s=h.createElement("input");s.style.fontSize="30px",s.setAttribute("id",t),s.setAttribute("type","radio"),s.setAttribute("value",t),s.setAttribute("name","field");var n=h.createElement("label");return n.style.marginLeft="4px",n.setAttribute("for",t),n.innerHTML=i,e.appendChild(s),e.appendChild(n),e},Ze.prototype.Hti=function(t,i){var e=h.createElement("button");e.innerHTML=t;var s=e.style;return s.float="right",s.textTransform="uppercase",s.color="#1094f7",s.fontSize="14px",s.letterSpacing=0,s.border=0,s.background="none",s.marginTop="16px",e.addEventListener("click",i),e};void 0!==s||("undefined"!=typeof global?global:"undefined"!=typeof self&&self);var Z2=function(t,i){return t(i={exports:{}},i.exports),i.exports}((function(t,i){var e;e=function(){return function(t){var i={};function e(s){if(i[s])return i[s].exports;var n=i[s]={i:s,l:!1,exports:{}};return t[s].call(n.exports,n,n.exports,e),n.l=!0,n.exports}return e.m=t,e.c=i,e.d=function(t,i,s){e.o(t,i)||w.defineProperty(t,i,{configurable:!1,enumerable:!0,get:s})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,i){return w.prototype.hasOwnProperty.call(t,i)},e.p="",e(e.s=0)}([function(t,i,e){var n=function(){function t(t,i){for(var e=0;e<i.length;e++){var s=i[e];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),w.defineProperty(t,s.key,s)}}return function(i,e,s){return e&&t(i.prototype,e),s&&t(i,s),i}}(),r=e(1),o=void 0!==ed&&C((""+(/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(ed.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))<10&&!s.MSStream,a=function(){function t(){!function(t,i){if(!(t instanceof i))throw new b("Cannot call a class as a function")}(this,t),o?this.noSleepTimer=null:(this.noSleepVideo=h.createElement("video"),this.noSleepVideo.setAttribute("playsinline",""),this.noSleepVideo.setAttribute("src",r),this.noSleepVideo.addEventListener("timeupdate",function(t){this.noSleepVideo.currentTime>.5&&(this.noSleepVideo.currentTime=_.random())}.bind(this)))}return n(t,[{key:"enable",value:function(){o?(this.disable(),this.noSleepTimer=s.setInterval((function(){s.location.href="/",s.setTimeout(s.stop,0)}),15e3)):this.noSleepVideo.play()}},{key:"disable",value:function(){o?this.noSleepTimer&&(s.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause()}}]),t}();t.exports=a},function(t,i,e){t.exports="data:video/mp4;base64,AAAAIGZ0eXBtcDQyAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAACKBtZGF0AAAC8wYF///v3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE0MiByMjQ3OSBkZDc5YTYxIC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAxNCAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTEgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDExMSBtZT1oZXggc3VibWU9MiBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0wIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MCA4eDhkY3Q9MCBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0wIHRocmVhZHM9NiBsb29rYWhlYWRfdGhyZWFkcz0xIHNsaWNlZF90aHJlYWRzPTAgbnI9MCBkZWNpbWF0ZT0xIGludGVybGFjZWQ9MCBibHVyYXlfY29tcGF0PTAgY29uc3RyYWluZWRfaW50cmE9MCBiZnJhbWVzPTMgYl9weXJhbWlkPTIgYl9hZGFwdD0xIGJfYmlhcz0wIGRpcmVjdD0xIHdlaWdodGI9MSBvcGVuX2dvcD0wIHdlaWdodHA9MSBrZXlpbnQ9MzAwIGtleWludF9taW49MzAgc2NlbmVjdXQ9NDAgaW50cmFfcmVmcmVzaD0wIHJjX2xvb2thaGVhZD0xMCByYz1jcmYgbWJ0cmVlPTEgY3JmPTIwLjAgcWNvbXA9MC42MCBxcG1pbj0wIHFwbWF4PTY5IHFwc3RlcD00IHZidl9tYXhyYXRlPTIwMDAwIHZidl9idWZzaXplPTI1MDAwIGNyZl9tYXg9MC4wIG5hbF9ocmQ9bm9uZSBmaWxsZXI9MCBpcF9yYXRpbz0xLjQwIGFxPTE6MS4wMACAAAAAOWWIhAA3//p+C7v8tDDSTjf97w55i3SbRPO4ZY+hkjD5hbkAkL3zpJ6h/LR1CAABzgB1kqqzUorlhQAAAAxBmiQYhn/+qZYADLgAAAAJQZ5CQhX/AAj5IQADQGgcIQADQGgcAAAACQGeYUQn/wALKCEAA0BoHAAAAAkBnmNEJ/8ACykhAANAaBwhAANAaBwAAAANQZpoNExDP/6plgAMuSEAA0BoHAAAAAtBnoZFESwr/wAI+SEAA0BoHCEAA0BoHAAAAAkBnqVEJ/8ACykhAANAaBwAAAAJAZ6nRCf/AAsoIQADQGgcIQADQGgcAAAADUGarDRMQz/+qZYADLghAANAaBwAAAALQZ7KRRUsK/8ACPkhAANAaBwAAAAJAZ7pRCf/AAsoIQADQGgcIQADQGgcAAAACQGe60Qn/wALKCEAA0BoHAAAAA1BmvA0TEM//qmWAAy5IQADQGgcIQADQGgcAAAAC0GfDkUVLCv/AAj5IQADQGgcAAAACQGfLUQn/wALKSEAA0BoHCEAA0BoHAAAAAkBny9EJ/8ACyghAANAaBwAAAANQZs0NExDP/6plgAMuCEAA0BoHAAAAAtBn1JFFSwr/wAI+SEAA0BoHCEAA0BoHAAAAAkBn3FEJ/8ACyghAANAaBwAAAAJAZ9zRCf/AAsoIQADQGgcIQADQGgcAAAADUGbeDRMQz/+qZYADLkhAANAaBwAAAALQZ+WRRUsK/8ACPghAANAaBwhAANAaBwAAAAJAZ+1RCf/AAspIQADQGgcAAAACQGft0Qn/wALKSEAA0BoHCEAA0BoHAAAAA1Bm7w0TEM//qmWAAy4IQADQGgcAAAAC0Gf2kUVLCv/AAj5IQADQGgcAAAACQGf+UQn/wALKCEAA0BoHCEAA0BoHAAAAAkBn/tEJ/8ACykhAANAaBwAAAANQZvgNExDP/6plgAMuSEAA0BoHCEAA0BoHAAAAAtBnh5FFSwr/wAI+CEAA0BoHAAAAAkBnj1EJ/8ACyghAANAaBwhAANAaBwAAAAJAZ4/RCf/AAspIQADQGgcAAAADUGaJDRMQz/+qZYADLghAANAaBwAAAALQZ5CRRUsK/8ACPkhAANAaBwhAANAaBwAAAAJAZ5hRCf/AAsoIQADQGgcAAAACQGeY0Qn/wALKSEAA0BoHCEAA0BoHAAAAA1Bmmg0TEM//qmWAAy5IQADQGgcAAAAC0GehkUVLCv/AAj5IQADQGgcIQADQGgcAAAACQGepUQn/wALKSEAA0BoHAAAAAkBnqdEJ/8ACyghAANAaBwAAAANQZqsNExDP/6plgAMuCEAA0BoHCEAA0BoHAAAAAtBnspFFSwr/wAI+SEAA0BoHAAAAAkBnulEJ/8ACyghAANAaBwhAANAaBwAAAAJAZ7rRCf/AAsoIQADQGgcAAAADUGa8DRMQz/+qZYADLkhAANAaBwhAANAaBwAAAALQZ8ORRUsK/8ACPkhAANAaBwAAAAJAZ8tRCf/AAspIQADQGgcIQADQGgcAAAACQGfL0Qn/wALKCEAA0BoHAAAAA1BmzQ0TEM//qmWAAy4IQADQGgcAAAAC0GfUkUVLCv/AAj5IQADQGgcIQADQGgcAAAACQGfcUQn/wALKCEAA0BoHAAAAAkBn3NEJ/8ACyghAANAaBwhAANAaBwAAAANQZt4NExC//6plgAMuSEAA0BoHAAAAAtBn5ZFFSwr/wAI+CEAA0BoHCEAA0BoHAAAAAkBn7VEJ/8ACykhAANAaBwAAAAJAZ+3RCf/AAspIQADQGgcAAAADUGbuzRMQn/+nhAAYsAhAANAaBwhAANAaBwAAAAJQZ/aQhP/AAspIQADQGgcAAAACQGf+UQn/wALKCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHAAACiFtb292AAAAbG12aGQAAAAA1YCCX9WAgl8AAAPoAAAH/AABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAGGlvZHMAAAAAEICAgAcAT////v7/AAAF+XRyYWsAAABcdGtoZAAAAAPVgIJf1YCCXwAAAAEAAAAAAAAH0AAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAygAAAMoAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAB9AAABdwAAEAAAAABXFtZGlhAAAAIG1kaGQAAAAA1YCCX9WAgl8AAV+QAAK/IFXEAAAAAAAtaGRscgAAAAAAAAAAdmlkZQAAAAAAAAAAAAAAAFZpZGVvSGFuZGxlcgAAAAUcbWluZgAAABR2bWhkAAAAAQAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAAE3HN0YmwAAACYc3RzZAAAAAAAAAABAAAAiGF2YzEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAygDKAEgAAABIAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY//8AAAAyYXZjQwFNQCj/4QAbZ01AKOyho3ySTUBAQFAAAAMAEAAr8gDxgxlgAQAEaO+G8gAAABhzdHRzAAAAAAAAAAEAAAA8AAALuAAAABRzdHNzAAAAAAAAAAEAAAABAAAB8GN0dHMAAAAAAAAAPAAAAAEAABdwAAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAAC7gAAAAAQAAF3AAAAABAAAAAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAQAAAAEAAAEEc3RzegAAAAAAAAAAAAAAPAAAAzQAAAAQAAAADQAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAANAAAADQAAAQBzdGNvAAAAAAAAADwAAAAwAAADZAAAA3QAAAONAAADoAAAA7kAAAPQAAAD6wAAA/4AAAQXAAAELgAABEMAAARcAAAEbwAABIwAAAShAAAEugAABM0AAATkAAAE/wAABRIAAAUrAAAFQgAABV0AAAVwAAAFiQAABaAAAAW1AAAFzgAABeEAAAX+AAAGEwAABiwAAAY/AAAGVgAABnEAAAaEAAAGnQAABrQAAAbPAAAG4gAABvUAAAcSAAAHJwAAB0AAAAdTAAAHcAAAB4UAAAeeAAAHsQAAB8gAAAfjAAAH9gAACA8AAAgmAAAIQQAACFQAAAhnAAAIhAAACJcAAAMsdHJhawAAAFx0a2hkAAAAA9WAgl/VgIJfAAAAAgAAAAAAAAf8AAAAAAAAAAAAAAABAQAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAACsm1kaWEAAAAgbWRoZAAAAADVgIJf1YCCXwAArEQAAWAAVcQAAAAAACdoZGxyAAAAAAAAAABzb3VuAAAAAAAAAAAAAAAAU3RlcmVvAAAAAmNtaW5mAAAAEHNtaGQAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAidzdGJsAAAAZ3N0c2QAAAAAAAAAAQAAAFdtcDRhAAAAAAAAAAEAAAAAAAAAAAACABAAAAAArEQAAAAAADNlc2RzAAAAAAOAgIAiAAIABICAgBRAFQAAAAADDUAAAAAABYCAgAISEAaAgIABAgAAABhzdHRzAAAAAAAAAAEAAABYAAAEAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAQAAAAEAAAAUc3RzegAAAAAAAAAGAAAAWAAAAXBzdGNvAAAAAAAAAFgAAAOBAAADhwAAA5oAAAOtAAADswAAA8oAAAPfAAAD5QAAA/gAAAQLAAAEEQAABCgAAAQ9AAAEUAAABFYAAARpAAAEgAAABIYAAASbAAAErgAABLQAAATHAAAE3gAABPMAAAT5AAAFDAAABR8AAAUlAAAFPAAABVEAAAVXAAAFagAABX0AAAWDAAAFmgAABa8AAAXCAAAFyAAABdsAAAXyAAAF+AAABg0AAAYgAAAGJgAABjkAAAZQAAAGZQAABmsAAAZ+AAAGkQAABpcAAAauAAAGwwAABskAAAbcAAAG7wAABwYAAAcMAAAHIQAABzQAAAc6AAAHTQAAB2QAAAdqAAAHfwAAB5IAAAeYAAAHqwAAB8IAAAfXAAAH3QAAB/AAAAgDAAAICQAACCAAAAg1AAAIOwAACE4AAAhhAAAIeAAACH4AAAiRAAAIpAAACKoAAAiwAAAItgAACLwAAAjCAAAAFnVkdGEAAAAObmFtZVN0ZXJlbwAAAHB1ZHRhAAAAaG1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAAO2lsc3QAAAAzqXRvbwAAACtkYXRhAAAAAQAAAABIYW5kQnJha2UgMC4xMC4yIDIwMTUwNjExMDA="}])},t.exports=e()})),K2=function(t){return t&&t.__esModule?t.default:t}(Z2),J2=1e3,$2=[0,0,.5,1],t3=[.5,0,.5,1],i3=s.requestAnimationFrame,e3=s.cancelAnimationFrame;function s3(t){w.defineProperties(this,{hasPosition:{writable:!1,enumerable:!0,value:t.hasPosition},hasExternalDisplay:{writable:!1,enumerable:!0,value:t.hasExternalDisplay},canPresent:{writable:!1,enumerable:!0,value:t.canPresent},maxLayers:{writable:!1,enumerable:!0,value:t.maxLayers},hasOrientation:{enumerable:!0,get:function(){return _o("VRDisplayCapabilities.prototype.hasOrientation","VRDisplay.prototype.getFrameData"),t.hasOrientation}}})}function le(t){var i=!("wakelock"in(t=t||{}))||t.wakelock;this.isPolyfilled=!0,this.displayId=J2++,this.displayName="",this.depthNear=.01,this.depthFar=1e4,this.isPresenting=!1,w.defineProperty(this,"isConnected",{get:function(){return _o("VRDisplay.prototype.isConnected","VRDisplayCapabilities.prototype.hasExternalDisplay"),!1}}),this.capabilities=new s3({hasPosition:!1,hasOrientation:!1,hasExternalDisplay:!1,canPresent:!1,maxLayers:1}),this.stageParameters=null,this.qti=!1,this.Up=null,this.Xti=null,this.CY=null,this.d7=null,this.Zti=null,this.Kti=null,this.Jti=null,this.$ti=null,i&&w2()&&(this.tii=new K2)}le.prototype.getFrameData=function(t){return p2(t,this.eii(),this)},le.prototype.getPose=function(){return _o("VRDisplay.prototype.getPose","VRDisplay.prototype.getFrameData"),this.eii()},le.prototype.resetPose=function(){return _o("VRDisplay.prototype.resetPose"),this.sii()},le.prototype.getImmediatePose=function(){return _o("VRDisplay.prototype.getImmediatePose","VRDisplay.prototype.getFrameData"),this.eii()},le.prototype.requestAnimationFrame=function(t){return i3(t)},le.prototype.cancelAnimationFrame=function(t){return e3(t)},le.prototype.wrapForFullscreen=function(t){if(Bc())return t;if(!this.d7){this.d7=h.createElement("div");var i=["height: "+_.min(screen.height,screen.width)+"px !important","top: 0 !important","left: 0 !important","right: 0 !important","border: 0","margin: 0","padding: 0","z-index: 999999 !important","position: fixed"];this.d7.setAttribute("style",i.join("; ")+";"),this.d7.classList.add("webvr-polyfill-fullscreen-wrapper")}if(this.CY==t)return this.d7;if(this.CY&&(this.Xti?this.Xti.appendChild(this.CY):this.CY.parentElement.removeChild(this.CY)),this.CY=t,this.Xti=t.parentElement,this.Xti||h.body.appendChild(t),!this.d7.parentElement){var e=this.CY.parentElement;e.insertBefore(this.d7,this.CY),e.removeChild(this.CY)}this.d7.insertBefore(this.CY,this.d7.firstChild),this.Zti=this.CY.getAttribute("style");var s=this;return function(){if(s.CY){var t=["position: absolute","top: 0","left: 0","width: "+_.max(screen.width,screen.height)+"px","height: "+_.min(screen.height,screen.width)+"px","border: 0","margin: 0","padding: 0"];s.CY.setAttribute("style",t.join("; ")+";")}}(),this.d7},le.prototype.removeFullscreenWrapper=function(){if(this.CY){var t=this.CY;this.Zti?t.setAttribute("style",this.Zti):t.removeAttribute("style"),this.CY=null,this.Zti=null;var i=this.d7.parentElement;return this.d7.removeChild(t),this.Xti===i?i.insertBefore(t,this.d7):this.Xti&&this.Xti.appendChild(t),i.removeChild(this.d7),t}},le.prototype.requestPresent=function(t){var i=this.isPresenting,e=this;return t instanceof Array||(_o("VRDisplay.prototype.requestPresent with non-array argument","an array of VRLayers as the first argument"),t=[t]),new Promise((function(s,n){if(e.capabilities.canPresent)if(0==t.length||t.length>e.capabilities.maxLayers)n(new g("Invalid number of layers."));else{var r=t[0];if(r.source){var o=r.leftBounds||$2,a=r.rightBounds||t3;if(i){var u=e.Up;u.source!==r.source&&(u.source=r.source);for(var c=0;c<4;c++)u.leftBounds[c]=o[c],u.rightBounds[c]=a[c];return e.wrapForFullscreen(e.Up.source),e.nii(),void s()}if(e.Up={predistorted:r.predistorted,source:r.source,leftBounds:o.slice(0),rightBounds:a.slice(0)},e.qti=!1,e.Up&&e.Up.source){var d=e.wrapForFullscreen(e.Up.source);e.rii(d,(function(){var t=h.fullscreenElement||h.webkitFullscreenElement||h.mozFullScreenElement||h.msFullscreenElement;e.isPresenting=d===t,e.isPresenting?(screen.orientation&&screen.orientation.lock&&screen.orientation.lock("landscape-primary").catch((function(t){console.error("screen.orientation.lock() failed due to",t.message)})),e.qti=!1,e.hii(),s()):(screen.orientation&&screen.orientation.unlock&&screen.orientation.unlock(),e.disableWakeLock(),e.oii(),e.removeFullscreenWrapper(),e.aii()),e.uii()}),(function(){e.qti&&(e.removeFullscreenWrapper(),e.aii(),e.disableWakeLock(),e.qti=!1,e.isPresenting=!1,n(new g("Unable to present.")))})),!function(t){if(h.fullscreenEnabled&&t.requestFullscreen)t.requestFullscreen();else if(h.webkitFullscreenEnabled&&t.webkitRequestFullscreen)t.webkitRequestFullscreen();else if(h.mozFullScreenEnabled&&t.mozRequestFullScreen)t.mozRequestFullScreen();else{if(!h.msFullscreenEnabled||!t.msRequestFullscreen)return!1;t.msRequestFullscreen()}return!0}(d)?(Bc()||r2())&&(e.enableWakeLock(),e.isPresenting=!0,e.hii(),e.uii(),s()):(e.enableWakeLock(),e.qti=!0)}e.qti||Bc()||(f2(),n(new g("Unable to present.")))}else s()}else n(new g("VRDisplay is not capable of presenting."))}))},le.prototype.exitPresent=function(){var t=this.isPresenting,i=this;return this.isPresenting=!1,this.Up=null,this.disableWakeLock(),new Promise((function(e,s){t?(f2(),i.oii(),i.removeFullscreenWrapper(),i.aii(),i.uii(),e()):s(new g("Was not presenting to VRDisplay."))}))},le.prototype.getLayers=function(){return this.Up?[this.Up]:[]},le.prototype.uii=function(){var t=new CustomEvent("vrdisplaypresentchange",{detail:{display:this}});s.dispatchEvent(t)},le.prototype.cii=function(){var t=new CustomEvent("vrdisplayconnect",{detail:{display:this}});s.dispatchEvent(t)},le.prototype.rii=function(t,i,e){this.aii(),this.Kti=t,this.Jti=i,this.$ti=e,i&&(h.fullscreenEnabled?t.addEventListener("fullscreenchange",i,!1):h.webkitFullscreenEnabled?t.addEventListener("webkitfullscreenchange",i,!1):h.mozFullScreenEnabled?h.addEventListener("mozfullscreenchange",i,!1):h.msFullscreenEnabled&&t.addEventListener("msfullscreenchange",i,!1)),e&&(h.fullscreenEnabled?t.addEventListener("fullscreenerror",e,!1):h.webkitFullscreenEnabled?t.addEventListener("webkitfullscreenerror",e,!1):h.mozFullScreenEnabled?h.addEventListener("mozfullscreenerror",e,!1):h.msFullscreenEnabled&&t.addEventListener("msfullscreenerror",e,!1))},le.prototype.aii=function(){if(this.Kti){var t=this.Kti;if(this.Jti){var i=this.Jti;t.removeEventListener("fullscreenchange",i,!1),t.removeEventListener("webkitfullscreenchange",i,!1),h.removeEventListener("mozfullscreenchange",i,!1),t.removeEventListener("msfullscreenchange",i,!1)}if(this.$ti){var e=this.$ti;t.removeEventListener("fullscreenerror",e,!1),t.removeEventListener("webkitfullscreenerror",e,!1),h.removeEventListener("mozfullscreenerror",e,!1),t.removeEventListener("msfullscreenerror",e,!1)}this.Kti=null,this.Jti=null,this.$ti=null}},le.prototype.enableWakeLock=function(){this.tii&&this.tii.enable()},le.prototype.disableWakeLock=function(){this.tii&&this.tii.disable()},le.prototype.hii=function(){},le.prototype.oii=function(){},le.prototype.submitFrame=function(t){},le.prototype.getEyeParameters=function(t){return null};var n3={MOBILE_WAKE_LOCK:!0,DEBUG:!1,DPDB_URL:"https://dpdb.webvr.rocks/dpdb.json",K_FILTER:.98,PREDICTION_TIME_S:.04,CARDBOARD_UI_DISABLED:!1,ROTATE_INSTRUCTIONS_DISABLED:!1,ROTATE_INSTRUCTIONS_LANDSCAPE_TIMEOUT:3e3,YAW_ONLY:!1,BUFFER_SCALE:.5,DIRTY_SUBMIT_FRAME_BINDINGS:!1},r3="left",h3="right";function Fs(t){var i=A2({},n3);t=A2(i,t||{}),le.call(this,{wakelock:t.MOBILE_WAKE_LOCK}),this.config=t,this.displayName="Cardboard VRDisplay",this.capabilities=new s3({hasPosition:!1,hasOrientation:!0,hasExternalDisplay:!1,canPresent:!0,maxLayers:1}),this.stageParameters=null,this.dii=this.config.BUFFER_SCALE,this.lii=new H2(this.config),this.fii=null,this._ii=null,this.u7=null,this.gii=null,this.wii=new R2(this.config.DPDB_URL,this.Aii.bind(this)),this.vii=new va(this.wii.getDeviceParams()),this.mii=new Ze,this.mii.onChange(this.pii.bind(this)),this.vii.setViewer(this.mii.getCurrentViewer()),this.config.ROTATE_INSTRUCTIONS_DISABLED||(this.yii=new Vc),Bc()&&s.addEventListener("resize",this.AY.bind(this))}Fs.prototype=w.create(le.prototype),Fs.prototype.eii=function(){return{position:null,orientation:this.lii.getOrientation(),linearVelocity:null,linearAcceleration:null,angularVelocity:null,angularAcceleration:null}},Fs.prototype.sii=function(){this.lii.resetPose&&this.lii.resetPose()},Fs.prototype.ati=function(t){var i;if(t==r3)i=this.vii.getFieldOfViewLeftEye();else{if(t!=h3)return console.error("Invalid eye provided: %s",t),null;i=this.vii.getFieldOfViewRightEye()}return i},Fs.prototype.uti=function(t){var i;if(t==r3)i=[.5*-this.vii.viewer.interLensDistance,0,0];else{if(t!=h3)return console.error("Invalid eye provided: %s",t),null;i=[.5*this.vii.viewer.interLensDistance,0,0]}return i},Fs.prototype.getEyeParameters=function(t){var i=this.uti(t),e=this.ati(t),s={offset:i,renderWidth:.5*this.vii.device.width*this.dii,renderHeight:this.vii.device.height*this.dii};return w.defineProperty(s,"fieldOfView",{enumerable:!0,get:function(){return _o("VRFieldOfView","VRFrameData's projection matrices"),e}}),s},Fs.prototype.Aii=function(t){this.config.DEBUG&&console.log("DPDB reported that device params were updated."),this.vii.updateDeviceParams(t),this.fii&&this.fii.updateDeviceInfo(this.vii)},Fs.prototype.Mii=function(){this.Up&&this.fii&&(this.Up.leftBounds||this.Up.rightBounds)&&this.fii.setTextureBounds(this.Up.leftBounds,this.Up.rightBounds)},Fs.prototype.hii=function(){var t=this.Up.source.getContext("webgl");if(t||(t=this.Up.source.getContext("experimental-webgl")),t||(t=this.Up.source.getContext("webgl2")),t){if(this.u7=t.canvas,this.gii=t.canvas.getAttribute("style"),this.Up.predistorted?this.config.CARDBOARD_UI_DISABLED||(t.canvas.width=d2()*this.dii,t.canvas.height=l2()*this.dii,this._ii=new zo(t)):(this.config.CARDBOARD_UI_DISABLED||(this._ii=new zo(t)),this.fii=new us(t,this._ii,this.config.BUFFER_SCALE,this.config.DIRTY_SUBMIT_FRAME_BINDINGS),this.fii.updateDeviceInfo(this.vii)),this._ii&&this._ii.listen(function(t){this.mii.show(this.Up.source.parentElement),t.stopPropagation(),t.preventDefault()}.bind(this),function(t){this.exitPresent(),t.stopPropagation(),t.preventDefault()}.bind(this)),this.yii){var i=this.config.ROTATE_INSTRUCTIONS_LANDSCAPE_TIMEOUT;c2()&&w2()&&i?this.yii.showTemporarily(i,this.Up.source.parentElement):this.yii.update()}this.orientationHandler=this.Iti.bind(this),s.addEventListener("orientationchange",this.orientationHandler),this.vrdisplaypresentchangeHandler=this.Mii.bind(this),s.addEventListener("vrdisplaypresentchange",this.vrdisplaypresentchangeHandler),this.AY(),this.Tii()}},Fs.prototype.oii=function(){this.fii&&(this.fii.destroy(),this.fii=null),this._ii&&(this._ii.destroy(),this._ii=null),this.yii&&this.yii.hide(),this.mii.hide(),this.u7&&(m2(this.u7),this.gii?this.u7.setAttribute("style",this.gii):this.u7.removeAttribute("style"),v2(this.u7),this.u7=null,this.gii=null),s.removeEventListener("orientationchange",this.orientationHandler),s.removeEventListener("vrdisplaypresentchange",this.vrdisplaypresentchangeHandler)},Fs.prototype.nii=function(){this.oii(),this.hii()},Fs.prototype.submitFrame=function(t){if(this.fii)this.Mii(),this.fii.submitFrame();else if(this._ii&&this.Up){var i=this.Up.source.getContext("webgl").canvas;i.width==this.lastWidth&&i.height==this.lastHeight||this._ii.onResize(),this.lastWidth=i.width,this.lastHeight=i.height,this._ii.render()}},Fs.prototype.Iti=function(t){this.mii.hide(),this.yii&&this.yii.update(),this.AY()},Fs.prototype.AY=function(t){if(this.Up){var i=this.Up.source.getContext("webgl");m2(i.canvas);i.canvas.setAttribute("style",["position: absolute","top: 0","left: 0","width: 100vw","height: 100vh","border: 0","margin: 0","padding: 0px","box-sizing: content-box"].join("; ")+";"),v2(i.canvas)}},Fs.prototype.pii=function(t){this.vii.setViewer(t),this.fii&&this.fii.updateDeviceInfo(this.vii),this.Tii()},Fs.prototype.Tii=function(){var t=new CustomEvent("vrdisplaydeviceparamschange",{detail:{vrdisplay:this,deviceInfo:this.vii}});s.dispatchEvent(t)},Fs.VRFrameData=function(){this.leftProjectionMatrix=new Float32Array(16),this.leftViewMatrix=new Float32Array(16),this.rightProjectionMatrix=new Float32Array(16),this.rightViewMatrix=new Float32Array(16),this.pose=null},Fs.VRDisplay=le;var o3={PROVIDE_MOBILE_VRDISPLAY:!0,GET_VR_DISPLAYS_TIMEOUT:1e3,MOBILE_WAKE_LOCK:!0,DEBUG:!1,DPDB_URL:"https://dpdb.webvr.rocks/dpdb.json",K_FILTER:.98,PREDICTION_TIME_S:.04,TOUCH_PANNER_DISABLED:!0,CARDBOARD_UI_DISABLED:!1,ROTATE_INSTRUCTIONS_DISABLED:!1,ROTATE_INSTRUCTIONS_LANDSCAPE_TIMEOUT:3e3,YAW_ONLY:!1,BUFFER_SCALE:.5,DIRTY_SUBMIT_FRAME_BINDINGS:!1};function a3(t){this.config=i2(i2({},o3),t),this.polyfillDisplays=[],this.enabled=!1,this.hasNative="getVRDisplays"in ed,this.native={},this.native.getVRDisplays=ed.getVRDisplays,this.native.VRFrameData=s.VRFrameData,this.native.VRDisplay=s.VRDisplay,(!this.hasNative||this.config.PROVIDE_MOBILE_VRDISPLAY&&$4())&&(this.enable(),this.getVRDisplays().then((function(t){t&&t[0]&&t[0].cii&&t[0].cii()})))}a3.prototype.getPolyfillDisplays=function(){if(this.Nii)return this.polyfillDisplays;if($4()){var t=new Fs({MOBILE_WAKE_LOCK:this.config.MOBILE_WAKE_LOCK,DEBUG:this.config.DEBUG,DPDB_URL:this.config.DPDB_URL,CARDBOARD_UI_DISABLED:this.config.CARDBOARD_UI_DISABLED,K_FILTER:this.config.K_FILTER,PREDICTION_TIME_S:this.config.PREDICTION_TIME_S,TOUCH_PANNER_DISABLED:this.config.TOUCH_PANNER_DISABLED,ROTATE_INSTRUCTIONS_DISABLED:this.config.ROTATE_INSTRUCTIONS_DISABLED,ROTATE_INSTRUCTIONS_LANDSCAPE_TIMEOUT:this.config.ROTATE_INSTRUCTIONS_LANDSCAPE_TIMEOUT,YAW_ONLY:this.config.YAW_ONLY,BUFFER_SCALE:this.config.BUFFER_SCALE,DIRTY_SUBMIT_FRAME_BINDINGS:this.config.DIRTY_SUBMIT_FRAME_BINDINGS});this.polyfillDisplays.push(t)}return this.Nii=!0,this.polyfillDisplays},a3.prototype.enable=function(){if(this.enabled=!0,this.hasNative&&this.native.VRFrameData){var t=this.native.VRFrameData,i=new this.native.VRFrameData,e=this.native.VRDisplay.prototype.getFrameData;s.VRDisplay.prototype.getFrameData=function(s){s instanceof t?e.call(this,s):(e.call(this,i),s.pose=i.pose,t2(i.leftProjectionMatrix,s.leftProjectionMatrix),t2(i.rightProjectionMatrix,s.rightProjectionMatrix),t2(i.leftViewMatrix,s.leftViewMatrix),t2(i.rightViewMatrix,s.rightViewMatrix))}}ed.getVRDisplays=this.getVRDisplays.bind(this),s.VRDisplay=Fs.VRDisplay,s.VRFrameData=Fs.VRFrameData},a3.prototype.getVRDisplays=function(){var t,i=this,e=this.config;return this.hasNative?function(t){return Promise.race?Promise.race(t):new Promise((function(i,e){for(var s=0;s<t.length;s++)t[s].then(i,e)}))}([this.native.getVRDisplays.call(ed),new Promise((function(i){t=u((function(){console.warn("Native WebVR implementation detected, but `getVRDisplays()` failed to resolve. Falling back to polyfill."),i([])}),e.GET_VR_DISPLAYS_TIMEOUT)}))]).then((function(e){return c(t),e.length>0?e:i.getPolyfillDisplays()})):Promise.resolve(this.getPolyfillDisplays())},a3.version="0.10.5-opentelly.3",a3.VRFrameData=Fs.VRFrameData,a3.VRDisplay=Fs.VRDisplay;var u3=w.freeze({default:a3}),c3=u3&&a3||u3;void 0!==bn&&bn.window&&(bn.document||(bn.document=bn.window.document),bn.navigator||(bn.navigator=bn.window.navigator));new c3({TOUCH_PANNER_DISABLED:!0,ROTATE_INSTRUCTIONS_LANDSCAPE_TIMEOUT:0,MOBILE_WAKE_LOCK:!fi.fb&&!fi.Ga,DPDB_URL:void 0});var ft,d3=class{Dii(t,i){const e=this.Sii;let s;switch(i){case e.VERTEX_SHADER:s=e.createShader(i),this.Iii=s;break;case e.FRAGMENT_SHADER:s=e.createShader(i),this.Eii=s;break;default:return void console.error("Invalid Shader Type:",i)}e.attachShader(this.bii,s),e.shaderSource(s,t),e.compileShader(s)}Lii(t){const i=this.Sii;if(t){this.kii={};for(const e in t)i.bindAttribLocation(this.bii,t[e],e),this.kii[e]=t[e]}}Cii(){this.Sii.linkProgram(this.bii)}xii(){const t=this.Sii;if(this.Oii){if(t.getProgramParameter(this.bii,t.LINK_STATUS)){if(!this.kii){this.kii={};const i=t.getProgramParameter(this.bii,t.ACTIVE_ATTRIBUTES);for(let e=0;e<i;e++){const i=t.getActiveAttrib(this.bii,e);this.kii[i.name]=t.getAttribLocation(this.bii,i.name)}}this.jii={};const i=t.getProgramParameter(this.bii,t.ACTIVE_UNIFORMS);let e="";for(let s=0;s<i;s++){e=t.getActiveUniform(this.bii,s).name.replace("[0]",""),this.jii[e]=t.getUniformLocation(this.bii,e)}}else this.Iii&&!t.getShaderParameter(this.Iii,t.COMPILE_STATUS)?console.error("Vertex shader compile error:",t.getShaderInfoLog(this.Iii)):this.Eii&&!t.getShaderParameter(this.Eii,t.COMPILE_STATUS)?console.error("Fragment shader compile error:",t.getShaderInfoLog(this.Eii)):console.error("Program link error:",t.getProgramInfoLog(this.bii)),t.deleteProgram(this.bii),this.bii=null;t.deleteShader(this.Iii),t.deleteShader(this.Eii),this.Oii=!1}t.useProgram(this.bii)}constructor(t){this.kii=null,this.jii=null,this.Oii=!0,this.Iii=null,this.Eii=null,this.Sii=t,this.bii=t.createProgram()}},l3=class{pr(t,i,e){let s=this.Sii;this.zii(t,i,s,e),this.t.Ff||this.t.u7.JF(s,s.TEXTURE_2D,0,s.RGBA,s.RGBA,s.UNSIGNED_BYTE),s.drawElements(s.TRIANGLES,this.Pii,s.UNSIGNED_SHORT,0)}Bii(t){this.Rii||(t.bindTexture(t.TEXTURE_2D,this.Uii),this.t.u7.JF(t,t.TEXTURE_2D,0,t.RGB,t.RGB,t.UNSIGNED_BYTE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),this.Rii=!0)}zii(t,i,e,s){const n=this.bii;n.xii(),this.Bii(e);const r=n.jii,h=n.kii;let o;e.uniformMatrix4fv(r.projectionMat,!1,t),e.uniformMatrix4fv(r.modelViewMat,!1,i),o="right"===s?this.Qii:this.Fii,e.bindBuffer(e.ARRAY_BUFFER,o),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.Yii),e.enableVertexAttribArray(h.position),e.enableVertexAttribArray(h.texCoord),e.vertexAttribPointer(h.position,3,e.FLOAT,!1,20,0),e.vertexAttribPointer(h.texCoord,2,e.FLOAT,!1,20,12),e.activeTexture(e.TEXTURE0),e.uniform1i(r.diffuse,0),e.bindTexture(e.TEXTURE_2D,this.Uii)}constructor(t,i,e){this.Rii=!1,this.Sii=t,this.Uii=t.createTexture();let s=["uniform mat4 projectionMat;","uniform mat4 modelViewMat;","attribute vec3 position;","attribute vec2 texCoord;","varying vec2 vTexCoord;","void main() {"," vTexCoord = texCoord;"," gl_Position = projectionMat * modelViewMat * vec4( position, 1.0 );","}"].join("\n"),n=["precision mediump float;","uniform sampler2D diffuse;","varying vec2 vTexCoord;","void main() {"," gl_FragColor = texture2D(diffuse, vTexCoord);","}"].join("\n");this.bii=new d3(t),this.bii.Dii(s,t.VERTEX_SHADER),this.bii.Dii(n,t.FRAGMENT_SHADER),this.bii.Lii({position:0,texCoord:1}),this.bii.Cii();const r=[],h=[],o=[],a=40;for(let t=0;t<=40;++t){const i=t*_.PI/40,s=_.sin(i),n=_.cos(i);for(let i=0;i<=a;++i){const o=2*i*_.PI/a-_.PI,u=_.sin(o)*s,c=n,d=-_.cos(o)*s,l=i/a,f=t/40;switch(e){case"horizontal":r.push(2*u,2*c,2*d,l/2,f),h.push(2*u,2*c,2*d,l/2+.5,f);break;case"vertical":r.push(2*u,2*c,2*d,l,f/2),h.push(2*u,2*c,2*d,l,f/2+.5);break;default:r.push(2*u,2*c,2*d,l,f)}}}for(let t=0;t<40;++t){let i=41*t,e=41*(t+1);for(let t=0;t<a;++t){let s=i+t,n=e+t;o.push(s,n,s+1,n,n+1,s+1)}}switch(this.Fii=t.createBuffer(),this.Qii=t.createBuffer(),t.bindBuffer(t.ARRAY_BUFFER,this.Fii),t.bufferData(t.ARRAY_BUFFER,new Float32Array(r),t.STATIC_DRAW),t.bindBuffer(t.ARRAY_BUFFER,this.Qii),e){case"horizontal":case"vertical":t.bufferData(t.ARRAY_BUFFER,new Float32Array(h),t.STATIC_DRAW);break;default:t.bufferData(t.ARRAY_BUFFER,new Float32Array(r),t.STATIC_DRAW)}this.Yii=t.createBuffer(),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.Yii),t.bufferData(t.ELEMENT_ARRAY_BUFFER,new Uint16Array(o),t.STATIC_DRAW),this.Pii=o.length,this.t=i}},f3=class extends Ao{fa(){return new _3}constructor(){super("Gii")}},_3=class extends Yi{constructor(){super("stereochange")}},g3=class extends Ao{fa(){return new w3}constructor(){super("Vii")}},w3=class extends Yi{constructor(){super("directionchange")}},as=_.PI/180,xn=180/_.PI,Th=class{Wj(t,i){return this.x=t,this.y=i,this}Odt(t){return this.x=t.x,this.y=t.y,this}Wii(t){return this.Wj(t[0],t[1])}Hii(){const t=new Float32Array(2);return t[0]=this.x,t[1]=this.y,t}qii(t,i){return this.x=t.x-i.x,this.y=t.y-i.y,this}constructor(t,i){this.x=t||0,this.y=i||0}},ds=class{Wj(t,i,e){return this.x=t,this.y=i,this.z=e,this}Odt(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}Wii(t){return this.Wj(t[0],t[1],t[2])}Hii(){const t=new Float32Array(3);return t[0]=this.x,t[1]=this.y,t[2]=this.z,t}U(){return _.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}Xii(){const t=this.U();if(0!==t){const i=1/t;this.Zii(i)}else this.x=0,this.y=0,this.z=0;return this}Zii(t){this.x*=t,this.y*=t,this.z*=t}Kii(t){const i=this.x,e=this.y,s=this.z,n=t.x,r=t.y,h=t.z,o=t.w,a=o*i+r*s-h*e,u=o*e+h*i-n*s,c=o*s+n*e-r*i,d=-n*i-r*e-h*s;return this.x=a*o+d*-n+u*-h-c*-r,this.y=u*o+d*-r+c*-n-a*-h,this.z=c*o+d*-h+a*-r-u*-n,this}Jii(t){return this.x*t.x+this.y*t.y+this.z*t.z}$ii(t,i){const e=t.x,s=t.y,n=t.z,r=i.x,h=i.y,o=i.z;return this.x=s*o-n*h,this.y=n*r-e*o,this.z=e*h-s*r,this}constructor(t,i,e){this.x=t||0,this.y=i||0,this.z=e||0}},Ka=class{Wj(t,i,e,s){return this.x=t,this.y=i,this.z=e,this.w=s,this}Odt(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this}Wii(t){return this.Wj(t[0],t[1],t[2],t[3])}Hii(){const t=new Float32Array(4);return t[0]=this.x,t[1]=this.y,t[2]=this.z,t[3]=this.w,t}Jii(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}JN(t){return this.tei(this,t)}tei(t,i){const e=t.x,s=t.y,n=t.z,r=t.w,h=i.x,o=i.y,a=i.z,u=i.w;return this.x=e*u+r*h+s*a-n*o,this.y=s*u+r*o+n*h-e*a,this.z=n*u+r*a+e*o-s*h,this.w=r*u-e*h-s*o-n*a,this}iei(){return this.x*=-1,this.y*=-1,this.z*=-1,this.Xii(),this}eei(){const t=this.x,i=this.y,e=this.z,s=this.w,n=t*i+e*s;let r,h,o;if(n>.499)r=2*_.atan2(t,s),h=_.PI/2,o=0;else if(n<-.499)r=-2*_.atan2(t,s),h=-_.PI/2,o=0;else{const a=t*t,u=i*i,c=e*e;r=_.atan2(2*i*s-2*t*e,1-2*u-2*c),h=_.asin(2*n),o=_.atan2(2*t*s-2*i*e,1-2*a-2*c)}return new A3(r,o,h)}Xii(){let t=_.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);return 0===t?(this.x=0,this.y=0,this.z=0,this.w=1):(t=1/t,this.x=this.x*t,this.y=this.y*t,this.z=this.z*t,this.w=this.w*t),this}constructor(t,i,e,s){this.x=t||0,this.y=i||0,this.z=e||0,this.w=void 0!==s?s:1}},A3=class{Wj(t,i,e){return this.sei=t,this.nei=i,this.rei=e,this}Odt(t){return this.Wj(t.sei,t.nei,t.rei)}MT(t){return this.sei+=t.sei,this.nei+=t.nei,this.rei+=t.rei,this}hei(){const t=this.sei,i=this.rei,e=this.nei,s=_.cos(t/2),n=_.cos(i/2),r=_.cos(e/2),h=_.sin(t/2),o=_.sin(i/2),a=_.sin(e/2),u=s*n,c=h*o;return new Ka(u*a+c*r,h*n*r+s*o*a,s*o*r-h*n*a,u*r-c*a)}constructor(t,i,e){this.sei=t||0,this.nei=i||0,this.rei=e||0}},v3=.15,m3=class{OS(){this.Rt||(this.Rt=!0,this.we.addEventListener("keydown",this.oei),this.we.addEventListener("mousedown",this.aei),this.we.addEventListener("touchstart",this.uei),s.addEventListener("mousemove",this.er),s.addEventListener("mouseup",this.cei),this.dei(s),s.addEventListener("touchmove",this.lei),s.addEventListener("touchend",this.fei))}dei(t){if(FM(t));else if(tt(t))try{t.parent.addEventListener("mouseup",this.cei),this.dei(t.parent)}catch(i){t.document.documentElement.addEventListener("mouseleave",this._ei)}}jS(){this.Rt&&(this.Rt=!1,this.gei=!1,this.wei&&(we(this.wei),this.wei=null),this.we.removeEventListener("keydown",this.oei),this.we.removeEventListener("mousedown",this.aei),this.we.removeEventListener("touchstart",this.uei),s.removeEventListener("mousemove",this.er),s.removeEventListener("mouseup",this.cei),this.Aei(s),s.removeEventListener("touchmove",this.lei),s.removeEventListener("touchend",this.fei))}Aei(t){if(t.document.documentElement.removeEventListener("mouseleave",this._ei),tt(t))try{t.parent.removeEventListener("mouseup",this.cei),this.Aei(t.parent)}catch(t){}}get vei(){return new A3(this.mei,this.pei,this.yei)}set vei(t){this.mei=t.sei,this.pei=t.nei,this.yei=t.rei}Mei(t){this.Tei("mei",t)}Nei(t){t=Pe(t,-_.PI/2,_.PI/2),this.Tei("pei",t)}Tei(t,i){this.wei&&we(this.wei);let e=this[t],s=Hr(),n=()=>{let r=Hr()-s;if(r>=80)return this[t]=i,we(this.wei),void(this.wei=null);this.wei=ro(n);let h=r/80;this[t]=e+(i-e)*h};this.wei=ro(n)}Dei(){this.pei+=2*_.PI*this.Sei.y/this.we.clientHeight*.3,this.mei+=2*_.PI*this.Sei.x/this.we.clientWidth*.5,this.pei=Pe(this.pei,-_.PI/2,_.PI/2)}Iei(){this.gei=!1}Eei(){return(h.pointerLockElement||h.mozPointerLockElement||h.webkitPointerLockElement)===this.we}resetPose(){this.pei=0,this.mei=0}gn(){this.jS()}constructor(t){this.Rt=!1,this.pei=0,this.mei=0,this.yei=0,this.wei=null,this.bei=new Th,this.Lei=new Th,this.Sei=new Th,this.gei=!1,this.oei=t=>{38===t.keyCode?this.Nei(this.pei+v3):39===t.keyCode?this.Mei(this.mei-v3):40===t.keyCode?this.Nei(this.pei-v3):37===t.keyCode&&this.Mei(this.mei+v3)},this.aei=t=>{this.bei.Wj(t.clientX,t.clientY),this.gei=!0,t.preventDefault()},this.uei=t=>{t.touches&&1===t.touches.length&&(this.bei.Wj(t.touches[0].pageX,t.touches[0].pageY),this.gei=!0,t.preventDefault())},this.er=t=>{if(this.gei||this.Eei()){if(this.Eei()){let i=t.movementX||t.mozMovementX||0,e=t.movementY||t.mozMovementY||0;this.Lei.Wj(this.bei.x-i,this.bei.y-e)}else this.Lei.Wj(t.clientX,t.clientY);this.Sei.qii(this.Lei,this.bei),this.bei.Odt(this.Lei),this.Dei()}},this.lei=t=>{this.gei&&(this.Lei.Wj(t.touches[0].pageX,t.touches[0].pageY),this.Sei.qii(this.Lei,this.bei),this.bei.Odt(this.Lei),this.Dei())},this.cei=t=>{this.Iei()},this.fei=t=>{this.Iei()},this._ei=t=>{this.Iei()},this.we=t}},vs=Ns(dd()),p3=Ns(ld()),y3=(Ns(fd()),Ns(_d())),M3=(Ns(gd()),Ns(wd())),T3=Ns(Ad()),N3=Ns(vd()),D3=Ns(md()),S3=Ns(pd()),I3=["Vii","Rrt","Gii","error"];function E3(t){let i,e={get stereo(){return t.kei},set stereo(i){t.kei=i},get useDeviceMotionControls(){return t.Cei},set useDeviceMotionControls(i){t.Cei=i},get direction(){return t.xei},set direction(i){t.xei=i},get verticalFOV(){return t.Oei},set verticalFOV(i){t.Oei=i},get canPresentVR(){return t.jei},get state(){return t.$ct},addEventListener(t,e){i.yn(t,e)},removeEventListener(t,e){i.fn(t,e)}};return i=new qh(t,I3,e),e}!function(t){t.Rs="unavailable",t.zei="available",t.Oa="presenting"}(ft||(ft={}));var b3=new A3(0*as,0,0);function L3(t){return xd(t+180,360)-180}function k3(t,i){let e=t.Jii(i);return 1-e*e<1e-4}var C3=class extends Bo{ko(){ed.getVRDisplays?(this.Pei=new VRFrameData,this.Bei(),s.addEventListener("vrdisplayconnect",this.Bei,!1),s.addEventListener("vrdisplaydisconnect",this.Bei,!1),s.addEventListener("vrdisplayactivate",this.Rei,!1),s.addEventListener("vrdisplaydeactivate",this.Uei,!1),s.addEventListener("vrdisplaypresentchange",this.Qei,!1)):ed.getVRDevices?this.Fei("Your browser supports WebVR but not the latest version.",td.VR_PLATFORM_UNSUPPORTED):this.Fei("Your browser does not support WebVR.",td.VR_PLATFORM_UNSUPPORTED),this.t.yn(Co.lo,this.do),this.do()}Yei(){let t={alpha:!1,antialias:!1,preserveDrawingBuffer:!0};if(!this.Gei){const t=h.createElement("canvas");t.className="theoplayer-vr",ca(t),t.style.zIndex="2",this.t.we.appendChild(t),this.Gei=t}this.Sii=this.Gei.getContext("webgl",t),this.Sii||(this.Sii=this.Gei.getContext("experimental-webgl",t),this.Sii)?(this.Sii.enable(this.Sii.DEPTH_TEST),this.Sii.enable(this.Sii.CULL_FACE)):this.Fei("Your browser does not support WebGL.",td.VR_PLATFORM_UNSUPPORTED)}Vei(){let t=this.xei;this.Wei||(this.Yei(),this.Wei=!0),this.Sii&&(this.Hei(new l3(this.Sii,this.t,this.qei)),this.Gei.style.display="",this.gi||(this.gi=new m3(this.Gei)),this.gi.OS(),this.t.ya.yn(ye.ra,this.AY),this.t.yn(Tn.pn,this.AY),this.xei=t,this.AY(),this.Xei=ro(this.Zei))}Kei(){let t=this.xei;this.Hei(void 0),this.gi&&this.gi.jS(),this.Gei&&(this.Gei.style.display="none"),this.t.ya.fn(ye.ra,this.AY),this.t.fn(Tn.pn,this.AY),this.Xei&&we(this.Xei),this.xei=t}Jei(){var t;return null==(t=this.t.Wa())?void 0:t.vr}$ei(t){let i=this.$ct,e=this.kei;this.tsi&&(this.isi=void 0,this.Uei()),this.tsi=t,this.tsi&&(this.tsi.depthNear=.1,this.tsi.depthFar=1024),this.kei=e,this.$ct!==i&&this.Co(new ll),this.kei!==e&&this.Co(new f3)}esi(t){let i=this.$ct;this.ssi=t,this.$ct!==i&&this.Co(new ll)}Hei(t){let i=this.$ct;this.nsi=t,this.$ct!==i&&this.Co(new ll)}rsi(t){let i=this.$ct,e=this.kei;this.hsi=t,this.gi&&(t?this.gi.jS():this.gi.OS()),this.$ct!==i&&this.Co(new ll),this.kei!==e&&this.Co(new f3)}osi(t){let i=this.kei;this.asi=t,this.kei!==i&&this.Co(new f3)}usi(){let t=this.Gei;this.dsi===t.width&&this.lsi===t.height||(t.width=this.dsi,t.height=this.lsi,this.fsi())}_si(t,i){(0,p3.default)(t,i.Hii()),(0,M3.default)(t,t)}useDeviceOrientation(){return!!this.hsi||this.gsi}wsi(){const t=DeviceMotionEvent.requestPermission;"function"==typeof t&&t().catch(qo)}Fei(t,i){Hu(t),this.Co(new fh(new $i(i,t)))}Asi(){this.Co(new g3)}get kei(){return this.jei?this.hsi:this.asi}set kei(t){this.jei?t?this.Rei():this.Uei():this.osi(t)}get Cei(){return this.gsi}set Cei(t){this.kei||(this.gsi=t,t&&fi.Ga&&this.wsi())}get xei(){let t=this.vei;return{yaw:L3(t.sei*xn),pitch:t.nei*xn,roll:_.round(t.rei*xn)}}set xei(t){let i=L3(t&&+t.yaw||0),e=L3(t&&+t.pitch||0),s=L3(t&&+t.roll||0);this.vei=new A3(i*as,e*as,s*as)}get vei(){if(this.$ct===ft.Rs)return this.vsi.eei();let t=this.msi,i=this.psi,e=new A3;return t&&e.MT(t),i&&e.MT(i),e}set vei(t){const i=this.vei.hei();if(this.$ct===ft.Rs)this.vsi=t.hei();else{let i=this.tsi;i&&i.resetPose&&i.resetPose(),this.gi&&(this.gi.vei=t),this.vsi=this.vei.hei()}k3(i,this.vsi)||this.Asi()}get msi(){let t=this.isi&&this.isi.orientation;if(t)return(new Ka).Wii(t).eei()}get psi(){return this.gi&&this.gi.vei}get Oei(){return 180*this.ysi}set Oei(t){t&&t>=0&&t<=180&&(this.ysi=+t/180)}get jei(){return!(!this.tsi||!this.tsi.capabilities.canPresent)}get $ct(){var t;return this.ssi&&((null==(t=this.Jei())?void 0:t.nativeVR)||this.nsi)?this.hsi?ft.Oa:ft.zei:ft.Rs}gn(){this.TI.Xd(),this.Vo(),this.Kei(),this.Uei(),this.t.fn(Co.lo,this.do),s.removeEventListener("vrdisplayconnect",this.Bei,!1),s.removeEventListener("vrdisplaydisconnect",this.Bei,!1),s.removeEventListener("vrdisplayactivate",this.Rei,!1),s.removeEventListener("vrdisplaydeactivate",this.Uei,!1),s.removeEventListener("vrdisplaypresentchange",this.Qei,!1),this.t=void 0}constructor(t){super(),this.TI=new er,this.vsi=new Ka,this.ysi=.4,this.asi=!1,this.gsi=!1,this.ssi=!1,this.wd=void 0,this.qei=Xa.NONE,this.gi=void 0,this.Msi=[],this.tsi=void 0,this.hsi=!1,this.Wei=!1,this.Gei=void 0,this.nsi=void 0,this.Sii=null,this.Xei=0,this.Pei=void 0,this.isi=void 0,this.Tsi=(0,vs.default)(),this.Nsi=(0,vs.default)(),this.dsi=0,this.lsi=0,this.Dsi=!0,this.Ssi=0,this.Isi=()=>{this.t.fn(Zt.Rw,this.Isi);let t=this.Jei();t&&!t.nativeVR&&this.Vei()},this.do=()=>{this.Kei();let t=this.Jei();this.wd=t,t&&t.panoramaMode!==rl.NONE?(t.panoramaMode===rl.PM180&&Eo("PanoramaMode is set to '180' while the VR API only supports '360', consider using the WebXR API if you need to play 180 degree content."),this.esi(!0),t.nativeVR?this.Co(new ll):(this.qei=t.stereoMode,this.t.yn(Zt.Rw,this.Isi))):this.esi(!1)},this.Rei=async()=>{if(this.$ct!==ft.Rs&&this.jei){this.Dsi=!1,this.Esi();try{await this.tsi.requestPresent([{source:this.Gei}])}catch(t){this.Fei("Failed to present VR content.",td.VR_PRESENTATION_ERROR)}finally{this.Qei()}}},this.Uei=async()=>{if(this.tsi)try{await this.tsi.exitPresent()}catch(t){}finally{this.Qei()}},this.Bei=async()=>{try{this.Msi=await ji(ed.getVRDisplays(),this.TI.Hd),this.tsi&&ae(this.Msi,this.tsi)||this.$ei(this.Msi[0])}catch(t){this.Msi=[],this.$ei(void 0)}},this.Qei=()=>{this.rsi(!!this.tsi&&this.tsi.isPresenting),this.AY(),this.Dsi=!this.hsi,this.Dsi?ro(this.fsi):this.Esi()},this.AY=()=>{if(!this.Gei)return;const t=this.t.we.offsetWidth,e=this.t.we.offsetHeight;let s=this.tsi;if(s&&this.kei){let t=s.getEyeParameters("left"),i=s.getEyeParameters("right");t&&i&&(this.dsi=2*_.max(t.renderWidth,i.renderWidth),this.lsi=_.max(t.renderHeight,i.renderHeight))}else{let s=i.Ys.c2;this.dsi=t*s,this.lsi=e*s}},this.fsi=()=>{if(!fi.Ga||!this.Gei||!this.Dsi)return;this.Esi();let t=this.Gei,i=t.offsetWidth+1,e=t.offsetHeight;t.style.width=i+"px",t.style.height=e+"px",this.Ssi=ro(this.Esi)},this.Esi=()=>{if(!this.Ssi)return;let t=this.Gei;t.style.width="100%",t.style.height="100%",we(this.Ssi),this.Ssi=0},this.Zei=()=>{let t=this.tsi,i=this.ysi,e=this.Gei,s=this.nsi,n=this.Sii,r=this.Pei,h=this.Tsi,o=this.Nsi;this.usi(),n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT),t&&this.useDeviceOrientation()&&(t.getFrameData(r),this.isi=r.pose);let a=this.vei.hei();this._si(o,a),t&&t.isPresenting?(this.Xei=t.requestAnimationFrame(this.Zei),n.viewport(0,0,.5*e.width,e.height),s.pr(r.leftProjectionMatrix,o,"left"),n.viewport(.5*e.width,0,.5*e.width,e.height),s.pr(r.rightProjectionMatrix,o,"right"),t.submitFrame()):(this.Xei=ro(this.Zei),(0,N3.default)(h,_.PI*i,e.width/e.height,.1,1024),this.kei?(n.viewport(0,0,.5*e.width,e.height),s.pr(h,o,"left"),n.viewport(.5*e.width,0,.5*e.width,e.height),s.pr(h,o,"right")):(n.viewport(0,0,e.width,e.height),s.pr(h,o))),k3(a,this.vsi)||(this.vsi.Odt(a),this.Asi())},this.t=t,this.vei=b3,this.va=E3(this),this.ko()}};Z((function(t){return class extends t{fa(){if(null!==this.bsi){const t=this.bsi.va;return vi(super.fa(),{vr:t})}return super.fa()}gn(){var t;null==(t=this.bsi)||t.gn(),super.gn()}constructor(t,i){super(t,i),this.bsi=null,i.vr.useWebXR||(this.bsi=new C3(this))}}}),Zo.Za);var x3=class{OS(){this.Le||(this.Le=!0,this.Us.addEventListener("mousedown",this.aei),this.Us.addEventListener("touchstart",this.uei),s.addEventListener("mousemove",this.er),s.addEventListener("touchmove",this.lei),s.addEventListener("mouseup",this.cei),s.addEventListener("touchend",this.fei),this.dei(s))}jS(){this.Le&&(this.Le=!1,this.Us.removeEventListener("mousedown",this.aei),this.Us.removeEventListener("touchstart",this.uei),s.removeEventListener("mousemove",this.er),s.removeEventListener("touchmove",this.lei),s.removeEventListener("mouseup",this.cei),s.removeEventListener("touchend",this.fei),this.Aei(s))}dei(t){if(FM(t));else if(tt(t))try{t.parent.addEventListener("mouseup",this.cei),this.dei(t.parent)}catch(i){t.document.documentElement.addEventListener("mouseleave",this._ei)}}Aei(t){if(t.document.documentElement.removeEventListener("mouseleave",this._ei),tt(t))try{t.parent.removeEventListener("mouseup",this.cei),this.Aei(t.parent)}catch(t){}}Iei(){this.Lsi=!1}Dei(){const t=this.Csi.ksi;t.yaw+=2*_.PI*this.xsi.x*.4/this.Us.clientWidth,t.pitch+=2*_.PI*this.xsi.y*.5/this.Us.clientHeight,t.pitch=Pe(t.pitch,-_.PI/2,_.PI/2),this.Csi.ksi=t}Eei(){return(h.pointerLockElement||h.mozPointerLockElement||h.webkitPointerLockElement)===this.Us}gn(){this.jS()}constructor(t,i){this.Le=!1,this.Osi=new Th,this.jsi=new Th,this.xsi=new Th,this.Lsi=!1,this.aei=t=>{this.Osi.Wj(t.clientX,t.clientY),this.Lsi=!0,t.preventDefault(),t.stopPropagation()},this.uei=t=>{t.touches&&1===t.touches.length&&(this.Osi.Wj(t.touches[0].pageX,t.touches[0].pageY),this.Lsi=!0,t.preventDefault())},this.er=t=>{if(this.Lsi||this.Eei()){if(this.Eei()){const i=t.movementX||t.mozMovementX||0,e=t.movementY||t.mozMovementY||0;this.jsi.Wj(this.Osi.x-i,this.Osi.y-e)}else this.jsi.Wj(t.clientX,t.clientY);this.xsi.qii(this.jsi,this.Osi),this.Osi.Odt(this.jsi),this.Dei()}},this.lei=t=>{this.Lsi&&(this.jsi.Wj(t.touches[0].pageX,t.touches[0].pageY),this.xsi.qii(this.jsi,this.Osi),this.Osi.Odt(this.jsi),this.Dei())},this.cei=()=>{this.Iei()},this.fei=()=>{this.Iei()},this._ei=()=>{this.Iei()},this.Csi=t,this.Us=i}},O3=class{zsi(t){t.clearColor(...this.BH),t.clear(t.COLOR_BUFFER_BIT)}Psi(t,i){t.clearDepth(1),t.enable(t.DEPTH_TEST),t.depthFunc(t.LEQUAL),t.clear(t.DEPTH_BUFFER_BIT),this.Bsi.forEach((e=>{e.Psi(t,i)}))}Rsi(t){this.Bsi.push(t)}Usi(){this.Bsi=[]}constructor(){this.BH=[0,0,0,1],this.Bsi=[]}},j3=class{Qsi(t,i,e){const s=t.createBuffer();return null===s?(Eo("Failed to create buffer."),null):(t.bindBuffer(i,s),t.bufferData(i,e,t.STATIC_DRAW),s)}constructor(t,i,e,s,n){this.Fsi=t,this.Zb=this.Qsi(t,i,e),this.Ysi=s,this.F0=n,this.Gsi=!1,this.Vsi=0,this.Zu=0}},z3=class extends j3{OS(t){if(null===this.Zb)return void Eo("Attempted to enable buffer that failed to initialize.");if(null===t)return void Eo("Attempted to enable attribute without location.");const i=this.Fsi;i.bindBuffer(i.ARRAY_BUFFER,this.Zb),i.vertexAttribPointer(t,this.Ysi,this.F0,this.Gsi,this.Vsi,this.Zu),i.enableVertexAttribArray(t)}jS(t){t&&this.Fsi.disableVertexAttribArray(t)}constructor(t,i,e){super(t,t.ARRAY_BUFFER,i,e,t.FLOAT)}};var P3,B3,Hc,R3=class extends j3{Wsi(){const t=this.Fsi;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.Zb),t.drawElements(t.TRIANGLES,this.Hsi,this.F0,this.Zu)}constructor(t,i){super(t,t.ELEMENT_ARRAY_BUFFER,i,1,t.UNSIGNED_SHORT),this.Hsi=i.length}};!function(t){t.VertexPos="aVertexPosition",t.VertexUV="aVertexUV",t.VertexColor="aVertexColor"}(P3||(P3={})),function(t){t.ProjectionMat="uProjectionMatrix",t.ModelViewMat="uModelViewMatrix",t.Texture="uTexture"}(B3||(B3={})),function(t){t.Normal="vNormal",t.Color="vColor",t.UV="vUV"}(Hc||(Hc={}));var U3=class{qsi(t,i,e){const s=this.Xsi(t,t.VERTEX_SHADER,i),n=this.Xsi(t,t.FRAGMENT_SHADER,e);if(null===s||null===n)return Eo("Failed to create vertex or fragment shader."),null;const r=t.createProgram();return null===r?(Eo("Failed to create shader program"),null):(t.attachShader(r,s),t.attachShader(r,n),t.linkProgram(r),t.getProgramParameter(r,t.LINK_STATUS)?r:(Eo("Failed to initialize shader program"),null))}Xsi(t,i,e){const s=t.createShader(i);if(null===s)return Eo("failed to create shader."),null;if(t.shaderSource(s,e),t.compileShader(s),!t.getShaderParameter(s,t.COMPILE_STATUS)){const i=t.getShaderInfoLog(s);return Eo("Failed to compile shader with error: "+i),t.deleteShader(s),null}return s}Zsi(){return this.Ksi}Jsi(t){const i=this.Ksi;if(null===i)return Eo("Attempted to retrieve attribute location when shader program was not initialized"),null;const e=this.Fsi.getAttribLocation(i,t);return-1===e?null:e}$si(t){const i=this.Ksi;if(null===i)return Eo("Attempted to retrieve uniform location when shader program was not initialized"),null;const e=this.Fsi.getUniformLocation(i,t);return null===e&&Hu("Attempted to retrieve nonexistent uniform: "+t),e}constructor(t,i,e){this.Fsi=t,this.Ksi=this.qsi(this.Fsi,i,e)}},Lc=class{tni(){const t=this.ini.length,i=_.max(...this.eni);return i>=t?(Hu("Created geometry where largest index ("+i+") is larger than/equal to attribute array size ("+t+")"),!1):(i<t-1&&Eo("Created geometry where largest index ("+i+") is smaller than attribute buffer - 1 ("+(t-1)+") resulting in unused vertices"),!this.sni||this.sni.length===t||(Hu("Created geometry where position ("+t+") and uv ("+this.sni.length+") buffers have different length."),!1))}nni(t,i){if(!this.tni())throw new g("Failed to validate buffers for WebGLGeometry.");const e=function(t,i){const e=[];return i.forEach((t=>{e.push(t.x,t.y,t.z)})),new z3(t,new Float32Array(e),3)}(t,this.ini),s=function(t,i){return new R3(t,new Uint16Array(i))}(t,this.eni),n=function(t,i){const e=[];return i.forEach((t=>{e.push(t.x,t.y)})),new z3(t,new Float32Array(e),2)}(t,this.sni);return new Q3(e,s,n,i)}constructor(t,i,e){this.ini=t,this.eni=i,this.sni=e}},Q3=class{rni(){this.ini.OS(this.hni),null!==this.oni&&this.sni.OS(this.oni)}ani(){this.ini.jS(this.hni),null!==this.oni&&this.sni.jS(this.oni)}Psi(){this.eni.Wsi()}constructor(t,i,e,s){this.ini=t;const n=s.Jsi(P3.VertexPos);if(null===n)throw new g("Failed to get position attribute location.");this.hni=n,this.sni=e,this.oni=s.Jsi(P3.VertexUV),this.eni=i}},F3=class extends Lc{constructor(t=1,i=32,e=16,s=0,n=2*_.PI,r=0,h=_.PI){let o=0;const a=_.min(r+h,_.PI),u=[],c=[],d=[],l=[];for(let u=0;u<=e;u++){const f=[],g=u/e;let w=0;0===u&&0===r?w=.5/i:u===e&&a===_.PI&&(w=-.5/i);for(let e=0;e<=i;e++){const a=e/i,u=-t*_.cos(s+a*n)*_.sin(r+g*h),l=t*_.cos(r+g*h),A=t*_.sin(s+a*n)*_.sin(r+g*h);c.push(new ds(u,l,A)),d.push(new Th(a+w,1-g)),f.push(o++)}l.push(f)}for(let t=0;t<e;t++)for(let s=0;s<i;s++){const i=l[t][s+1],n=l[t][s],h=l[t+1][s],o=l[t+1][s+1];(0!==t||r>0)&&u.push(i,n,o),(t!==e-1||a<_.PI)&&u.push(n,h,o)}super(c,u,d)}},Y3=[0,0,0,255,0,0,0,255,0,0,0,255,0,0,0,255],G3=class{uni(){const t=this.Fsi;t.activeTexture(this.cni),t.bindTexture(t.TEXTURE_2D,this.dni)}ur(){const t=this.Fsi;t.activeTexture(this.cni),t.bindTexture(t.TEXTURE_2D,this.dni),t.uniform1i(this.lni,0)}fni(t){const i=this.Fsi;i.bindTexture(i.TEXTURE_2D,this.dni),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!0),i.texImage2D(i.TEXTURE_2D,this.PK,this._ni,this.gni,this.wni,t),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1)}Ani(t){const i=this.Fsi;i.bindTexture(i.TEXTURE_2D,this.dni),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!0),t.u7.JF(i,i.TEXTURE_2D,this.PK,this._ni,this.gni,this.wni),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1)}constructor(t,i){if(this.Fsi=t,this.dni=t.createTexture(),null===this.dni)throw new g("Failed to create texture");const e=i.$si(B3.Texture);if(null===e)throw new g("Failed to get texture location.");this.lni=e,t.bindTexture(t.TEXTURE_2D,this.dni),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),this.cni=t.TEXTURE0,this.PK=0,this._ni=t.RGBA,this.gni=t.RGBA,this.wni=t.UNSIGNED_BYTE,t.texImage2D(t.TEXTURE_2D,this.PK,this._ni,2,2,0,this.gni,this.wni,new j(Y3))}},V3="\n attribute vec4 "+P3.VertexPos+";\n attribute vec2 "+P3.VertexUV+";\n\n uniform mat4 "+B3.ModelViewMat+";\n uniform mat4 "+B3.ProjectionMat+";\n \n varying mediump vec2 "+Hc.UV+";\n \n void main() {\n gl_Position = "+B3.ProjectionMat+" * "+B3.ModelViewMat+" * "+P3.VertexPos+";\n "+Hc.UV+" = "+P3.VertexUV+";\n }\n",W3="\n varying mediump vec2 "+Hc.UV+";\n \n uniform sampler2D "+B3.Texture+";\n\n void main() {\n gl_FragColor = texture2D("+B3.Texture+", "+Hc.UV+");\n }\n",H3=class{Zsi(){return this.Ksi}OS(){this.Fsi.useProgram(this.Ksi.Zsi()),this.dni.ur()}vni(t){this.dni.fni(t)}mni(t){this.dni.Ani(t)}constructor(t){this.Fsi=t,this.Ksi=new U3(t,V3,W3),this.dni=new G3(t,this.Ksi)}},q3=class{Psi(t,i){if(this.pni(i.yni)){this.Mni.rni(),this.Tni.OS();const e=this.Nni,s=i.Dni,n=(0,T3.default)(s,s,e);t.uniformMatrix4fv(this.Sni,!1,n);const r=i.Ini;t.uniformMatrix4fv(this.Eni,!1,r),this.Mni.Psi(),this.Mni.ani()}}pni(t){return"none"===this.yni||"right"!==t&&"left"===this.yni||"right"===t&&"right"===this.yni}get Nni(){const t=(0,vs.default)(),i=this.po;return(0,S3.default)(t,t,i.Hii()),(0,D3.default)(t,t,this.bni.x,new Float32Array([1,0,0])),(0,D3.default)(t,t,this.bni.y,new Float32Array([0,1,0])),(0,D3.default)(t,t,this.bni.z,new Float32Array([0,0,1])),t}constructor(t,i,e,s){this.po=new ds,this.bni=new ds,this.yni="none",this.Tni=e;const n=e.Zsi();this.Mni=i.nni(t,n),s&&(this.yni=s);const r=n.$si(B3.ModelViewMat);if(null===r)throw new g("Failed to get model view matrix location.");this.Sni=r;const h=n.$si(B3.ProjectionMat);if(null===h)throw new g("Failed to get projection matrix location.");this.Eni=h}},X3=class{Lni(){const t=(0,vs.default)();return(0,N3.default)(t,this.kni,this.Cni,this.xni,this.Oni)}jni(){this.zni=this.Lni()}get Ini(){return new Float32Array(this.zni)}set Ini(t){this.zni=t}Pni(){const t=(0,vs.default)(),i=(0,y3.default)((0,vs.default)(),this.Bni.Hii()),e=(0,p3.default)((0,vs.default)(),this.Rni.Hii());return(0,T3.default)(t,i,e),(0,M3.default)(t,t),t}Uni(){this.Qni=this.Pni()}get Dni(){return new Float32Array(this.Qni)}Fni(){this.Uni(),this.jni()}tr(){this.Bni=new ds,this.bni=new Ka,this.Fni()}Yni(t){const i=this.Rni.eei();i.MT(t),this.bni=i.hei()}Gni(t){this.bni=t.hei()}get Vni(){return this.kni}set Vni(t){this.kni=t,this.jni()}get Wni(){return this.Cni}set Wni(t){this.Cni=t,this.jni()}get po(){return(new ds).Odt(this.Bni)}set po(t){this.Bni=t,this.Uni()}get bni(){return(new Ka).Odt(this.Rni)}set bni(t){this.Rni=t,this.Uni()}constructor(t){this.kni=72*_.PI/180,this.Cni=1.77,this.xni=.1,this.Oni=100,this.yni="none",this.Bni=new ds,this.Rni=new Ka,this.zni=this.Lni(),this.Qni=this.Pni(),t&&(this.yni=t)}},Z3=1e-4,K3=class extends Bo{ko(){this.Hni(),this.Fsi?ed.xr?(ed.xr.addEventListener("devicechange",this.qni),this.Xni().then((()=>{this.Zni?(this.Kni(),this.Jni(),this.$ni()):this.Fei("XR: Inline session not available. Panorama functionality will not work.",td.VR_PRESENTATION_ERROR)}))):this.Fei("Your browser does not support WebXR",td.VR_PLATFORM_UNSUPPORTED):this.Fei("Your browser does not support webGL",td.VR_PLATFORM_UNSUPPORTED)}$ni(){this.Qo.ya.yn(ye.ra,this.mn),this.Qo.yn(Tn.pn,this.mn),this.Qo.yn(Co.lo,this.do),this.Qo.yn(Co.pw,this.lU)}Hni(){this.tri=h.createElement("canvas"),this.tri.className="theoplayer-vr",this.tri.style.zIndex="2",this.tri.style.background="black",this.tri.style.display="none",this.Qo.we.appendChild(this.tri),ca(this.tri);let t=this.tri.getContext("webgl2");t||(t=this.tri.getContext("webgl")),t&&(this.Fsi=t,this.iri=new x3(this,this.tri))}async Xni(){ed.xr?await Promise.all([ed.xr.isSessionSupported("inline").then((t=>{this.Zni=t})).catch((t=>{this.Zni=!1,this.Fei("exception when calling xr.isSessionSupported for inline session: "+t,td.VR_PRESENTATION_ERROR)})),ed.xr.isSessionSupported("immersive-vr").then((t=>{this.eri=t})).catch((t=>{this.eri=!1,this.Fei("exception when calling xr.isSessionSupported for immersive-vr session: "+t,td.VR_PRESENTATION_ERROR)}))]):(this.Zni=!1,this.eri=!1)}Kni(){const t=this.Jei();this.sx=t,this.ssi=Boolean(t),this.ssi&&(this.sri=(null==t?void 0:t.stereoMode)||Xa.NONE,this.nri=(null==t?void 0:t.panoramaMode)||rl.NONE,this.rri&&(this.hri(this.nri,this.sri),this.Vei()))}hri(t,i){if(!this.Fsi||t===rl.NONE)return;const e=this.Fsi;let s,n;this.ari.Usi(),t===rl.PM360?(s=2*_.PI,n=-_.PI/2):(s=_.PI,n=-_.PI);const r=new F3(16,60,40,0,s),h=[],o=[];for(let t=0;t<r.sni.length;t++){const e=r.sni[t];switch(i){case Xa.NONE:h.push(e),o.push(e);break;case Xa.VERTICAL:h.push(new Th(e.x,.5*e.y)),o.push(new Th(e.x,.5*e.y+.5));break;case Xa.HORIZONTAL:h.push(new Th(.5*e.x,e.y)),o.push(new Th(.5*e.x+.5,e.y))}}r.ini.forEach((t=>{t.x*=-1}));const a=new Lc(r.ini,r.eni,h),u=new Lc(r.ini,r.eni,o);this.cri=new H3(e);const c=new q3(e,a,this.cri,"left");c.bni.y=n,this.ari.Rsi(c);const d=new q3(e,u,this.cri,"right");d.bni.y=n,this.ari.Rsi(d)}Vei(){this.tri.style.display="block",this.Zni&&this.Qo.yn(Co.jh,this.dri)}Kei(){this.lri(),this.Qo.fn(Co.jh,this.dri),this.tri.style.display="none"}fri(){this._ri(),this.gri()}async wri(){if(this.Ari||!this.Zni)return;const t={optionalFeatures:["local"]};try{const i=await ji(ed.xr.requestSession("inline",t),this.TI.Hd);let e;e=fi.Qs?fi.dE?"viewer":"local":"viewer";const s=await i.requestReferenceSpace(e);i.addEventListener("end",this._ri),this.vri=s,this.Ari=i,this.iri.OS(),this.pri(),await i.updateRenderState({baseLayer:new XRWebGLLayer(i,this.Fsi),inlineVerticalFieldOfView:this.kni*as})}catch(t){this._ri(),this.Fei(t,td.VR_PRESENTATION_ERROR)}}_ri(){this.Ari&&(this.lri(),this.iri.jS(),this.Ari.removeEventListener("end",this.gri),this.Ari.end(),this.Ari=null,this.Jni())}async yri(){if(!this.Mri&&this.eri){this.lri();try{const t=await ji(ed.xr.requestSession("immersive-vr"),this.TI.Hd),i=await t.requestReferenceSpace("local");t.addEventListener("end",this.gri),this.Tri=i,this.Mri=t,await this.Nri(),this.pri()}catch(t){this.gri(),this.Fei(t,td.VR_PRESENTATION_ERROR)}}}async Nri(){const t=this.Fsi,i=this.Mri;this.tri&&t&&i&&!this.Dri&&(this.tri.addEventListener("webglcontextlost",(t=>{t.preventDefault()})),this.tri.addEventListener("webglcontextrestored",(()=>{this.hri(this.nri,this.sri)})),this.Dri=!0,await t.makeXRCompatible(),await i.updateRenderState({baseLayer:new XRWebGLLayer(i,t)}))}Jni(){if(!this.Mri&&this.Fsi){const t=this.Fsi,e=this.tri.clientWidth,s=this.tri.clientHeight,n=i.Ys.c2;this.tri.width=e*n,this.tri.height=s*n,t.viewport(0,0,t.drawingBufferWidth,t.drawingBufferHeight)}}pri(){null===this.Sri&&(this.Iri(),this.Eri?this.Sri=this.Eri.requestAnimationFrame(this.bri):(this.Lri(),Eo("XR: Attempted to start animation loop without inline or immersive session.")))}lri(){null!==this.Sri&&(this.Lri(),this.Eri?this.Eri.cancelAnimationFrame(this.Sri):Eo("XR: Attempted to stop animation loop by cancelAnimationFrame even though there is no session running."),this.Sri=null)}Iri(){if(null!==this.kri)return;const t=this.Qo.A_();if(void 0===t||!(t instanceof HTMLVideoElement))return void Eo("No video source.");if("function"!=typeof t.requestVideoFrameCallback)return;const i=()=>{this.cri.mni(this.Qo),this.kri=t.requestVideoFrameCallback(i)};this.Cri=t,this.kri=t.requestVideoFrameCallback(i)}Lri(){var t,i;null!==this.kri&&(null==(i=this.Cri)||null==(t=i.cancelVideoFrameCallback)||t.call(i,this.kri),this.Cri=null,this.kri=null)}xri(){return!!this.Ori||(fi.Ga?this.jri&&this.zri:this.jri)}wsi(){const t=DeviceMotionEvent.requestPermission;"function"==typeof t&&t().then((t=>{this.zri="granted"===t}))}Pri(){return(!this.Ff()||Boolean(this.Bri))&&this.Rri()}Ff(){return this.Qo.Ff}Rri(){return this.Qo.Jf>=2}get ssi(){return this.Uri}set ssi(t){const i=this.$ct;this.Uri=t,this.$ct!==i&&this.Co(new ll)}get rri(){return this.nri!==rl.NONE}get nri(){return this.Qri}set nri(t){const i=this.$ct;this.Qri=t,this.$ct!==i&&this.Co(new ll)}get eri(){return this.Fri}set eri(t){const i=this.$ct;this.Fri=t,this.$ct!==i&&this.Co(new ll)}get jei(){return this.eri}get Eri(){return this.Mri||this.Ari}get Mri(){return this.Ori}set Mri(t){const i=this.$ct;this.Ori=t,this.$ct!==i&&this.Co(new ll)}get Yri(){return this.Tri||this.vri}get xei(){const t=this.Gri.eei();return{yaw:t.sei*xn,pitch:t.nei*xn,roll:t.rei*xn}}set xei(t){const i=J3(t&&t.pitch||0)*as,e=J3(t&&t.roll||0)*as,s=J3(t&&t.yaw||0)*as,n=new A3(s,i,e);this.Gri=n.hei()}get ksi(){const t=this.Vri.eei();return{yaw:t.sei,pitch:t.nei,roll:t.rei}}set ksi(t){const i=$3(t&&t.pitch||0),e=$3(t&&t.roll||0),s=$3(t&&t.yaw||0),n=new A3(s,i,e);this.Vri=n.hei()}get $ct(){return this.ssi?this.Mri?ft.Oa:ft.zei:ft.Rs}get kei(){return null!==this.Mri}set kei(t){const i=this.kei;t&&this.eri?this.yri():this.gri(),this.kei!==i&&this.Co(new f3)}get Cei(){return this.jri}set Cei(t){null===this.Ori&&(this.jri=t,t&&fi.Ga&&this.wsi())}get Oei(){return this.kni}set Oei(t){t&&t>=0&&t<=180&&(this.kni=t,null!==this.Ari&&this.Ari.updateRenderState({inlineVerticalFieldOfView:this.kni*as}))}Fei(t,i){Hu(t),this.Co(new fh(new $i(i,t)))}Jei(){const t=this.Qo.Wa();return t&&t.vr}gn(){this.TI.Xd(),this.fri(),this.Vo(),this.Qo=void 0,this.Fsi=void 0}constructor(t){super(),this.TI=new er,this.Zni=!1,this.Fri=!1,this.Gri=new Ka,this.Wri=new Ka,this.Vri=new Ka,this.kni=74,this.jri=!1,this.sx=void 0,this.sri=Xa.NONE,this.Uri=!1,this.Qri=rl.NONE,this.ari=new O3,this.Ari=null,this.Ori=null,this.vri=null,this.Tri=null,this.Dri=!1,this.Sri=null,this.Cri=null,this.kri=null,this.Bri=0,this.zri=!1,this.qni=()=>{this.Xni()},this.do=()=>{this.Kei(),this.fri(),this.Kni()},this.dri=()=>{this.wri()},this.gri=()=>{this.Mri&&(qu("Ending immersive session"),this.lri(),this.Mri.removeEventListener("end",this.gri),this.Mri.end(),this.Mri=null,this.Tri=null,this.Dri=!1,this.Ari?this.pri():this.wri())},this.mn=()=>{this.Jni()},this.bri=(t,i)=>{if(!this.Fsi)return;const e=this.Fsi,s=this.Eri;if(null===this.kri&&this.Pri()&&(this.cri.mni(this.Qo),this.Bri>0&&(this.Bri-=1)),null===s||void 0===i)return void Eo("Attempted to run webXR animation loop without session or xrFrame.");this.Sri=s.requestAnimationFrame(this.bri);const n=s.renderState.baseLayer,r=i.getViewerPose(this.Yri);if(void 0===n||void 0===r)return void Eo("Attempted to run webXR animation loop without glLayer or viewerPose.");e.bindFramebuffer(e.FRAMEBUFFER,n.framebuffer);let h=new A3,o=0;for(const t of r.views){const i=new X3(t.eye);if(i.Ini=t.projectionMatrix,this.xri()){let e;if(fi.Qs&&fi.dE&&null===this.Ori){if(e=t.transform.inverse.orientation,0===e.x&&0===e.y&&0===e.z&&1===e.w)return}else e=t.transform.orientation;i.bni=new Ka(e.x,e.y,e.z,e.w)}this.Ari&&i.Yni(this.Vri.eei()),h=h.MT(i.bni.eei()),o+=1;const s=n.getViewport(t);s&&e.viewport(s.x,s.y,s.width,s.height),this.ari.Psi(e,i)}const a=new A3(h.sei/o,h.nei/o,h.rei);this.Gri=a.hei(),function(t,i){const e=t.Jii(i);return 1-e*e<Z3}(this.Gri,this.Wri)||(this.Wri.Odt(this.Gri),this.Co(new g3))},this.lU=()=>{this.Bri=5},this.Qo=t,this.va=E3(this),this.ko()}};function J3(t){return xd(t+180,360)-180}function $3(t){return xd(t+_.PI,2*_.PI)-_.PI}Z((function(t){return class extends t{fa(){return null!==this.Csi?vi(super.fa(),{vr:this.Csi.va}):super.fa()}gn(){var t;null==(t=this.Csi)||t.gn(),super.gn()}constructor(t,i){super(t,i),this.Csi=null,i.vr.useWebXR&&(this.Csi=new K3(this))}}}),Zo.Za);var t5=class{getEpochTimeMs(){return fa()}release(){}},i5=class{createTimer(t,i,e){let s=v(t,i);return()=>m(s)}release(){}},e5=class{makeRequest(t,i,e,s,n,r){const h=function(t){switch(t.toLowerCase()){case"get":return G.GET;case"post":return G.POST;case"put":return G.PUT;case"delete":return G.DELETE;case"head":return G.HEAD;case"options":return G.OPTIONS;default:throw new g("Request method unknown.")}}(t);if(this.Hri){if(h===G.GET)(new Image).src=i+"?"+e;else{const t=e||new ArrayBuffer(0),n=s||void 0;this.mI.YF({zu:i,rI:t,Fz:n})}return()=>{}}const o=new er,a=s?{"Content-Type":s}:void 0,u=new Pc({zu:i,rI:e,lI:!1,aI:dm.Ru,IS:n,oI:h,Hd:o.Hd,hI:a});return this.qri(u,r),()=>o.Xd()}async qri(t,i){if(i)try{const e=await this.mI.MS(t);if(e.SS>=200&&e.SS<300){i(!0,await e.pI())}else i(!1,"HTTP"+e.SS)}catch(t){i(!1,String(t))}}release(){s.removeEventListener("beforeunload",this.Xri)}constructor(t){this.Hri=!1,this.Xri=()=>{this.Hri=!0},this.mI=t,s.addEventListener("beforeunload",this.Xri)}};var s5=class{saveData(t,i,e,s){try{return localStorage.setItem(t+"/"+i,e),s(!0,null)}catch(t){return s(!1,t.toString())}}loadData(t,i,e){try{return e(!0,localStorage.getItem(t+"/"+i))}catch(t){return e(!1,t.toString())}}release(){}},n5=()=>null,r5=class{getDeviceBrand(){return this.Zri?this.Zri.brand:null}getDeviceCategory(){return fi.ib||fi.sb?this.Kri.Client.DeviceCategory.ANDROID_DEVICE:fi.fb||fi.gb?this.Kri.Client.DeviceCategory.APPLE_DEVICE:fi.Ab?this.Kri.Client.DeviceCategory.CHROMECAST:this.Kri.Client.DeviceCategory.WEB}getDeviceManufacturer(){return this.Zri?this.Zri.manufacturer:null}getDeviceModel(){return this.Zri?this.Zri.model:null}getDeviceVersion(){return this.Zri?this.Zri.version:null}getDeviceType(){return null}getFrameworkName(){return fi.ib?"THEOplayer AndroidTV SDK":fi.sb?"THEOplayer Android SDK":fi.fb?"THEOplayer IOS SDK":fi.gb?"THEOplayer tvOS SDK":fi.Ab?"THEOplayer Chromecast SDK":"THEOplayer Web SDK"}release(){}constructor(t,i){this.Kri=t,this.Zri=i,this.getBrowserName=n5,this.getBrowserVersion=n5,this.getFrameworkVersion=n5,this.getOperatingSystemName=n5,this.getOperatingSystemVersion=n5}},h5=class{consoleLog(t,i){switch(i){case Conviva.SystemSettings.LogLevel.ERROR:return Hu(t);case Conviva.SystemSettings.LogLevel.WARNING:return Eo(t);default:return qu(t)}}release(){}},_l=self.theoplayerDeviceMetadata;var o5,a5=class{getPHT(){return-1}getBufferLength(){const t=ce.xn(this.Qo.Af()),i=this.Qo.Tf(),e=t.aB(i);if(e<0)return 0;return Jt(t.jn(e)-i)}getSignalStrength(){return 1e3}getRenderedFrameRate(){return-1}constructor(t){this.Qo=t}},u5="conviva";function c5(t){return t&&t.integration===u5}function d5(t){if(t)for(let i of t)if(c5(i))return i}function l5(t,i){if(!i)return t;if(!t)return i;return Xl(i,ie(t))}var f5=[Co.Zg,Co.jh,Co.Sh,Zt.Rw,Zt.Bw,Co.Jg,ut.ha,Zt.H_],_5=class{get va(){return this.Xa||(this.Xa=function(t){return{get client(){return t.Jri},get contentSessionKey(){return t.$ri},createSession:()=>t.pC(),cleanupSession:()=>t.thi()}}(this)),this.Xa}get Jri(){return this.ihi}get $ri(){return this.ehi}shi(){return this.t.Ff?this.nhi.PlayerStateManager.PlayerState.PAUSED:this.rhi||this.t.Jf<oe.rT?this.nhi.PlayerStateManager.PlayerState.BUFFERING:this.nhi.PlayerStateManager.PlayerState.PLAYING}W$(t){let i=this.hhi;i&&i.getDuration()!==t&&i.setDuration(t)}ohi(t){let i=this.hhi;i&&i.getPlayerState()!==t&&i.setPlayerState(t)}ahi(){this.rhi="none"===this.t.Xf||this.t.Jf<oe.nT,this.lWt(),this.t.e_&&this.dU(),this.uhi&&this.dhi()}mHt(){this.lhi&&!this.lhi.manualSessionControl&&(this.pC(),this.t.SU.Uf||this.fhi())}kHt(){this.hhi&&this.ohi(this.nhi.PlayerStateManager.PlayerState.STOPPED),this.lhi&&!this.lhi.manualSessionControl&&this.thi()}pC(){if(this._hi&&void 0===this.ehi){let t=this.ihi.getPlayerStateManager();this.hhi=t,t.setPlayerVersion&&t.setPlayerVersion("7.10.0"),this.ehi=this.ihi.createSession(this._hi),this.ahi(),this.ihi.attachPlayer(this.ehi,this.hhi);const i=new a5(this.t);t.setClientMeasureInterface(i)}}thi(){this.TU=!1,this.rhi=!1,this.hhi&&(this.ihi.releasePlayerStateManager(this.hhi),this.hhi=void 0),void 0!==this.ehi&&(this.ihi.cleanupSession(this.ehi),this.ehi=void 0)}ghi(){this.t.yn(Co.Xg,this.whi),this.t.yn(Co.yw,this.dU),this.t.yn(Co.pw,this.lU),this.t.yn(Co.Jg,this.Ahi),this.t.yn(ut.ha,this.T4),this.t.yn(Co.Mw,this.vhi),this.t.yn([Co.cw,Zt.Bw],this.mhi),this.t.yn([Co.Zg,Zt.Rw],this.phi),this.t.yn(f5,this.lWt),this.t.Oc&&(this.t.Oc.yn("W7",this.yhi),this.t.Oc.yn("V7",this.Mhi)),s.addEventListener("beforeunload",this.Ahi),this.Thi()}Nhi(){this.t.fn(Co.Xg,this.whi),this.t.fn(Co.yw,this.dU),this.t.fn(Co.pw,this.lU),this.t.fn(Co.Jg,this.Ahi),this.t.fn(ut.ha,this.T4),this.t.fn(Co.Mw,this.vhi),this.t.fn([Co.cw,Zt.Bw],this.mhi),this.t.fn([Co.Zg,Zt.Rw],this.phi),this.t.fn(f5,this.lWt),this.t.Oc&&(this.t.Oc.fn("W7",this.yhi),this.t.Oc.fn("V7",this.Mhi)),this.t.rt.fn(Rl.L_,this.Thi),this.uhi&&(this.uhi.fn(na.J_,this.dhi),this.uhi=void 0),s.removeEventListener("beforeunload",this.Ahi)}gn(){this.Nhi(),this.kHt(),this.thi()}constructor(t,i,e,s){this.t=t,this.nhi=i,this.ihi=e,this.Dhi=s,this.TU=!1,this.rhi=!1,this._hi=void 0,this.lhi=void 0,this.hhi=void 0,this.ehi=void 0,this.uhi=void 0,this.yhi=t=>{void 0!==this.$ri&&(this.ihi.adStart(this.$ri,function(t){const i=t.Xl.O7().integration;return"csai"===i||"theo"===i||"google-ima"===i||"freewheel"===i?Conviva.Client.AdStream.SEPARATE:Conviva.Client.AdStream.CONTENT}(t),this.nhi.Client.AdPlayer.CONTENT,function(t,i){const e=t.Xl.O7().timeOffset;return 0===e?Conviva.Client.AdPosition.PREROLL:-1===e||be(e,i,.001)?Conviva.Client.AdPosition.POSTROLL:Conviva.Client.AdPosition.MIDROLL}(t,this.t.Td())),this.ihi.detachPlayer(this.$ri))},this.Mhi=()=>{void 0!==this.$ri&&void 0!==this.hhi&&(this.ihi.attachPlayer(this.$ri,this.hhi),this.ihi.adEnd(this.$ri))},this.mhi=()=>{this.rhi=!0},this.phi=()=>{this.rhi=!1},this.whi=()=>{let t=this.t.Td();S(t)||t===1/0||this.W$(t)},this.Ahi=()=>{this.kHt()},this.T4=()=>{let t=this.t.Ef();t&&this.hhi&&this.hhi.sendError(t.code+": "+t.message,this.nhi.Client.ErrorSeverity.FATAL),this.kHt()},this.Shi=()=>{!this.t.SU.Uf&&this.hhi&&this.fhi()},this.fhi=()=>{var t;null==(t=this.hhi)||t.sendError("A Video Playback Failure has occurred: Waiting for the manifest to come back online",this.nhi.Client.ErrorSeverity.FATAL)},this.vhi=()=>{var t;null==(t=this.hhi)||t.sendError("A Video Playback Failure has occurred: Segment not found",this.nhi.Client.ErrorSeverity.FATAL)},this.lU=()=>{var t;this.TU&&(this.TU=!1,(null==(t=this.hhi)?void 0:t.setPlayerSeekEnd)&&this.hhi.setPlayerSeekEnd())},this.dU=()=>{var t;this.TU||(this.TU=!0,(null==(t=this.hhi)?void 0:t.setPlayerSeekStart)&&this.hhi.setPlayerSeekStart(-1))},this.do=()=>{this.kHt(),this.lhi=void 0,this._hi=void 0,this.Ihi()},this.Ihi=()=>{if(this._hi)return;let t=this.t.Wa();if(!t)return;let i=this.t.bt;if(!i)return;let e=function(t){return d5(t.analytics)}(t),s=l5(e,this.Dhi);if(!s)return;let n=s.contentMetadata;if(n&&this.nhi){let t=i.src;this.ihi||(this.ihi=function(t,i,e){if(!o5){let s=new i.SystemSettings,n=new i.SystemInterface(new t5,new i5,new e5(e),new s5,new r5(i,_l),new h5),r=new i.SystemFactory(n,s),h=new i.ClientSettings(t.customerKey),o=$h(t.heartbeatInterval);o>0?h.heartbeatInterval=o:void 0===h.heartbeatInterval&&(h.heartbeatInterval=10);let a=jo(t.gatewayUrl);a&&(h.gatewayUrl=a),o5=new i.Client(h,r)}return o5}(s,this.nhi,this.t.uO)),this.lhi=s,this._hi=function(t,i,e){let s=new e.ContentMetadata;return s.assetName=t.assetName,s.streamUrl=i,s.streamType=function(t,i){return t?i.ContentMetadata.StreamType.LIVE:!1===t?i.ContentMetadata.StreamType.VOD:i.ContentMetadata.StreamType.UNKNOWN}(t.live,e),s.defaultBitrateKbps=t.defaultBitrateKbps,s.defaultResource=t.defaultResource,s.duration=t.duration,s.encodedFrameRate=t.encodedFrameRate,s.applicationName=t.applicationName||"THEOplayer",s.viewerId=t.viewerId||ar(),s.custom=t.custom,s}(n,t,this.nhi),this.t.Ff||this.dri()}},this.dri=()=>{this.mHt()},this.dhi=()=>{if(!this.uhi||!this.hhi)return;let t=this.uhi.yg;if(t){let i=this.hhi;i.setBitrateKbps(t.cz/1e3),i.setEncodedFrameRate&&t.Ict&&i.setEncodedFrameRate(t.Ict),i.setVideoResolutionWidth&&t.ji&&i.setVideoResolutionWidth(t.ji),i.setVideoResolutionHeight&&t.Ti&&i.setVideoResolutionHeight(t.Ti)}},this.Thi=()=>{let t=this.t.rt;t&&t.fn(Rl.L_,this.Thi),t.U?(this.uhi=t.cg(0),this.uhi.fn(na.J_,this.dhi),this.uhi.yn(na.J_,this.dhi)):t.yn(Rl.L_,this.Thi)},this.lWt=()=>{this.ohi(this.shi())},this.t.yn(Co.lo,this.do),this.t.yn(Co.Hg,this.Ihi),this.t.yn(Co.jh,this.dri),this.ghi(),this.t.SU.yn(Co.fw,this.Shi),this.t.SU.yn(Co._w,this.Shi)}};Z((function(t){return class extends t{gn(){this.H9&&this.H9.gn(),super.gn()}constructor(t,i){super(t,i);const e=s.Conviva;if(e){const t=function(t){return d5(Rw(t).analytics)}(i);this.H9=new _5(this,e,o5,t),this.l7.W9=this.H9}}}}),Zo.S7);var g5=class extends Ut{get va(){return this.Xa||(this.Xa=function(t){let i,e={get status(){return t.SS},get tasks(){return t.n2t},get network(){return t.SU.va},createTask:(i,e)=>t.Ehi(i,e),addEventListener(t,e){i.yn(t,e)},removeEventListener(t,e){i.fn(t,e)}};return i=new ka(t,e),e}(this)),this.Xa}get SS(){return this.bhi.SS}get n2t(){return this.bhi.n2t.va}get SU(){return this.s7}Ehi(t,i,e){let s,n;if(void 0===e&&(e="persistent"),!t)throw new g("Unexpected - The source description is undefined");if(s=Ms(t),n=p1(i),Mn(s))throw new g("Invalid source description");return this.bhi.$4t(s,n).va}constructor(t,i){super(),this.bhi=t,this.s7=i,this.bhi.yn("Rrt",this.Ds)}};var w5=function(){const t=new wL(i.uO,!1),e=Al.yb,s=new E1(t),n=new A1(e,s),r=new vL(t),h=new ul(e.qet,n,"persistent");return new g5(h,r)}().va;function A5(t,i){if("function"==typeof t.getAll){return ua(void 0===i?t.getAll():t.getAll(i))}return function(t){let i=new Rs,e=[];return t.onsuccess=()=>{let s=t.result;s&&s.value?(e.push(s.value),s.continue()):i.Qb(e),qo()},t.onerror=()=>{i.Yb(t.error),qo()},i.Vb}(void 0===i?t.openCursor():t.openCursor(i))}function ua(t){return new Promise(((i,e)=>{t.onsuccess=()=>{i(t.result),qo()},t.onerror=()=>{e(t.error),qo()}}))}var v5=class{Xd(){if(this.ro)try{this.Yet.abort(),this.ro=!1}catch(t){}}constructor(t){this.Yet=t,this.ro=!0,this.Vb=new Promise(((t,i)=>{this.Yet.oncomplete=()=>{this.ro=!1,t(),qo()},this.Yet.onerror=()=>{this.ro&&(this.ro=!1,i(this.Yet.error||new g("Transaction error")),qo())},this.Yet.onabort=()=>{this.ro=!1,i(new g("Transaction aborted")),qo()}}))}};async function wl(t,i,e){const s=new v5(t);try{const[t]=await Promise.all([i(e),s.Vb]);return t}catch(t){if(!s.ro)throw new ra("IDBTransaction committed prematurely",t);throw t}finally{s.Xd()}}var m5=class{get l(){return this.wit.l}ket(t){return Promise.resolve("persistent"===t)}Cet(t,i){if(void 0===i&&(i="persistent"),"persistent"!==i)return Promise.reject(Ee(i));return ua(this.Lhi(M.Ket).put(t))}async xet(t,i){if(void 0===i&&(i="persistent"),"persistent"!==i)return Promise.reject(Ee(i));for(const e of t)await this.Cet(e,i)}async zb(t){return Boolean(await this.Pb(t))}Pb(t){return ua(this.Lhi(M.Zet).get(t))}Oet(t,i){return ua(this.Lhi(M.Zet).index(i).get(t))}async Tet(t){const i=[];for(let e of t){const t=await this.Pb(e);t&&i.push(t)}return i}jet(){return A5(this.Lhi(M.Zet))}zet(t){return A5(this.Lhi(M.Zet),t)}Pet(t,i){return A5(this.Lhi(M.Zet).index(i),t)}TT(t){return ua(this.Lhi(M.Ket).delete(t))}async Bet(t){for(const i of t)await this.TT(i)}Ret(){return ua(this.Lhi(M.Ket).clear())}Lhi(t){if(!this.khi)throw new g("Lock was released");if(!function(t,i){return t===M.Zet&&i===M.Zet||i===M.Ket}(t,this.khi.mode))throw new g("Incompatible transaction mode: "+this.khi.mode+", expected "+t);return this.khi.objectStore(this.l)}Chi(){this.wit.xhi(this),this.khi=void 0}constructor(t,i){this.wit=t,this.khi=i}};var pa=class{ket(t){return Promise.resolve("persistent"===t)}Cet(t,i){return void 0===i&&(i="persistent"),"persistent"!==i?Promise.reject(Ee(i)):this.Yet(M.Ket,(i=>i.Cet(t)))}xet(t,i){return void 0===i&&(i="persistent"),"persistent"!==i?Promise.reject(Ee(i)):this.Yet(M.Ket,(i=>i.xet(t)))}zb(t){return this.Yet(M.Zet,(i=>i.zb(t)))}Pb(t){return this.Yet(M.Zet,(i=>i.Pb(t)))}Oet(t,i){return this.Yet(M.Zet,(e=>e.Oet(t,i)))}Tet(t){return this.Yet(M.Zet,(i=>i.Tet(t)))}jet(){return this.Yet(M.Zet,(t=>t.jet()))}zet(t){return this.Yet(M.Zet,(i=>i.zet(t)))}Pet(t,i){return this.Yet(M.Zet,(e=>e.Pet(t,i)))}TT(t){return this.Yet(M.Ket,(i=>i.TT(t)))}Bet(t){return this.Yet(M.Ket,(i=>i.Bet(t)))}Ret(){return this.Yet(M.Ket,(t=>t.Ret()))}eDt(t){return this.Ohi(),this.YNt=new m5(this,t),this.YNt}Ohi(){if(void 0!==this.YNt)throw new g("Already locked")}xhi(t){if(this.YNt!==t)throw new g("Incorrect lock");this.YNt=void 0}wx(t){return this.gq.wx(t)}Yet(t,i){return this.wx((()=>this.jhi(t,i)))}async jhi(t,i){this.Ohi();const e=this.zhi.transaction(this.l,t),s=this.eDt(e);try{return await wl(e,i,s)}finally{s.Chi()}}Phi(t){this.Ohi();const i=this.zhi.transaction(this.l,t);return this.eDt(i)}static Bhi(t,i){let e;const s=new Promise((t=>{e=t})),n=t.reduce(((t,i)=>t.then((()=>{let t;const e=new Promise((i=>{t=i}));return i.wx((()=>(t(),s))).catch(qo),e}))),Promise.resolve());return e(n.then(i)),s}constructor(t,i){this.YNt=void 0,this.gq=new ls,this.zhi=t,this.l=i}},p5={ap:17,Rhi:async t=>{const{transaction:i,database:e}=t,s=i.objectStoreNames;if(s&&s.length)for(let t=0;t<s.length;t++)e.deleteObjectStore(s[t]);e.createObjectStore(D5,{keyPath:"id"}),e.createObjectStore(S5,{keyPath:"key"}),e.createObjectStore(I5,{keyPath:"key"});e.createObjectStore(E5,{keyPath:"segmentURLsegmentByteRange"}).createIndex("manifestURL","manifestURL");e.createObjectStore(b5,{keyPath:"segmentURLsegmentByteRange"}).createIndex("manifestURL","manifestURL")}},y5=class{async Uhi(t){for(const i of this.Qhi)this.Fhi<i.ap&&await i.Rhi(t)}constructor(t){this.Fhi=t}},M5=class extends y5{get Qhi(){return[p5]}},T5=new class{Yhi(t){this.Ghi=t}J8(t){return this.Ghi(t)}constructor(){this.Ghi=t=>new M5(t)}},N5=18,D5="cachingTask",S5="licences",I5="manifest",E5="segment",b5="segmentMetadata";async function L5(){!function(){if("undefined"==typeof indexedDB)throw new g("Indexed database unavailable")}();const t=indexedDB.open("theoplayer-cache-database",N5);return t.addEventListener("upgradeneeded",k5),await ua(t)}async function k5(t){const i=t.oldVersion<=N5?t.oldVersion:-1,e=t.target,s=e.result,n=e.transaction,r=T5.J8(i),h={database:s,transaction:n};await wl(n,(t=>r.Uhi(t)),h)}var C5=class{static get yb(){return this.ust||(this.ust=L5()),this.ust}};C5.ust=void 0;var x5=class{Yet(t){return t(this)}Chi(){this.Wet.Chi(),this.Vet.Chi(),this.Het.Chi(),this.qet.Chi(),this.Xet.Chi()}constructor(t,i){this.Wet=t.Wet.eDt(i),this.Vet=t.Vet.eDt(i),this.Het=t.Het.eDt(i),this.qet=t.qet.eDt(i),this.Xet=t.Xet.eDt(i)}};Al.wa(class t{static async J8(){const i=await C5.yb;return new t(i)}Yet(t){const i=this.allCollections;return pa.Bhi(i,(()=>this.jhi(i,t)))}async jhi(t,i){const e=t.map((t=>t.l)),s=this.zhi.transaction(e,M.Ket),n=new x5(this,s);try{return await wl(s,i,n)}finally{n.Chi()}}get allCollections(){return[this.Vet,this.Wet,this.Het,this.qet,this.Xet]}constructor(t){this.zhi=t,this.Wet=new pa(t,b5),this.Vet=new pa(t,E5),this.Het=new pa(t,I5),this.qet=new pa(t,D5),this.Xet=new pa(t,S5)}}.J8);var O5=class{Vhi(t){const i=this.fW.gf(),e=t.createGain();for(const s of i){t.createMediaElementSource(s).connect(e)}return e}get va(){return this.Xa||(this.Xa=this.fa()),this.Xa}fa(){const t=this;return{createAudioSourceNode:i=>t.Vhi(i)}}constructor(t){this.Xa=void 0,this.fW=t}};Z((function(t){return class extends t{fa(){const t=this.Whi.va;return vi(super.fa(),{get audio(){return t}})}constructor(t,i){super(t,i),this.Whi=new O5(this.Z9)}}}),Zo.Za);Z((function(t){return class i extends t{ga(t){const e=i.Hhi(this.wd.analytics),s=i.Hhi(t?t.analytics:void 0);e||s?this.qhi(Tt({},e,s)):this.Xhi&&this.Xhi.disable(),super.ga(t)}qhi(t){if(this.Xhi)this.Xhi.enable(),this.Xhi.setOptions(t);else{const i=s.youbora;if(!i)throw new g("Youbora JavaScript library not loaded.");if(!i.adapters.TheoPlayer2)throw new g("TheoPlayer2 adapter not available on Youbora JavasScript library");const e=new i.Plugin(t);e.setAdapter(new i.adapters.TheoPlayer2(this.va)),this.Oc&&i.adapters.TheoPlayer2.NativeAdsAdapter&&e.setAdsAdapter(new i.adapters.TheoPlayer2.NativeAdsAdapter(this.va)),this.Xhi=e}}static Hhi(t){if(t){const i=t.filter((t=>"youbora"===t.integration));if(0===i.length)return;if(i.length>1)throw new g("Only one youbora analytics configuration expected");const e=i[0],{integration:s}=e;return h_(e,["integration"])}}gn(){this.Xhi&&this.Xhi.disable(),super.gn()}constructor(t,i){super(t,i)}}}),Zo.S7);var j5=1,z5=0,P5=1e3,B5=class t extends Ul{Zhi(){const t=this.ct===1/0,i=t?j5:z5,e=t?-1:this.ct,s=xl(this.Qo.rt.og,this.Khi);this.Jhi.setPresentationInformation(new this.$hi(i,e,s))}Khi(t){const i=t.Ng.og,e=[];for(let t=0;t<i.length;t++){const s=i[t];s.ji&&s.Ti&&e.push({trackIdx:t,bitrate:s.cz,width:s.ji,height:s.Ti,codecIdentifier:s.cst})}return e}toi(){return this.Qo.Tf()*P5}get ct(){return this.Qo.Td()*P5}get ioi(){return this.eoi}get soi(){return this.noi}set soi(t){this.noi=t,t&&this.Jhi.reportPlayerState(t)}set roi(t){this.hoi=t}ooi(){return v((()=>{this.aoi(),this.uoi()}),t.coi)}doi(){this.Qo.Oc&&(this.Qo.Oc.yn("H7",this.H8t),this.Qo.Oc.yn("q7",this.q8t),this.Qo.Oc.yn("fqt",this.loi),this.Qo.Oc.yn("Wqt",this.foi)),this.Qo.yn(Co.Jg,this.Ahi),this.Qo.yn(ut.ha,this.T4),this.Qo.yn(Co.Sh,this._oi),this.Qo.yn(Co.jh,this.dri),this.Qo.yn(Zt.Rw,this.cU),this.Qo.yn(Co.mw,this.AY),this.Qo.yn(Co.pw,this.lU),this.Qo.yn(Zt.Bw,this.aU),this.Qo.yn(Co.Tw,this.goi)}woi(){this.Qo.Oc&&(this.Qo.Oc.fn("H7",this.H8t),this.Qo.Oc.fn("q7",this.q8t),this.Qo.Oc.fn("fqt",this.loi),this.Qo.Oc.fn("Wqt",this.foi)),this.Qo.fn(Co.Jg,this.Ahi),this.Qo.fn(ut.ha,this.T4),this.Qo.fn(Co.Sh,this._oi),this.Qo.fn(Co.jh,this.dri),this.Qo.fn(Zt.Rw,this.cU),this.Qo.fn(Co.mw,this.AY),this.Qo.fn(Co.pw,this.lU),this.Qo.fn(Zt.Bw,this.aU),this.Qo.fn(Co.Tw,this.goi)}gn(){m(this.Aoi),this.woi()}constructor(t,i,e,s=MMPlayerState,n=MMAdState,r=MMPresentationInfo){super(),this.Qo=t,this.sx=i,this.Jhi=e,this.voi=s,this.moi=n,this.$hi=r,this.poi=!0,this.eoi=!1,this.hoi=void 0,this.noi=void 0,this.yoi=void 0,this.H8t=t=>{const i=t.Y7;i.oVt();var e;e=i.O7().duration;const s="linear"===i.O7().type;i.aVt(),i.nVt();s&&(this.eoi=!0),this.roi=this.moi.AD_IMPRESSION,this.roi=this.moi.AD_STARTED},this.q8t=t=>{this.eoi=!1,this.roi=this.moi.AD_COMPLETED},this.loi=t=>{t.cFt===Xr.ADBLOCK?this.roi=this.moi.AD_BLOCKED:this.roi=this.moi.AD_ERROR},this.foi=()=>{this.roi=this.moi.AD_SKIPPED},this.goi=t=>{var i,e,s,n;t.dI===f.Am&&(this.yoi&&t.JU!==this.yoi&&this.Jhi.reportABRSwitch(this.yoi,t.JU),this.yoi=t.JU,this.Jhi.reportChunkRequest(new MMChunkInformation(t.Rp,t.JU,t.wM,t.got.zu,void 0,void 0,null!=(s=null==(i=t.got.bht)?void 0:i[0])?s:0,null!=(n=null==(e=t.got.bht)?void 0:e[1])?n:-1)))},this.Ahi=t=>{this.soi=this.voi.STOPPED,this.Co(t)},this.T4=t=>{this.soi=this.voi.ERROR,this.Jhi.reportError(t.error,this.toi())},this._oi=()=>{this.ioi?this.roi=this.moi.AD_PAUSED:this.soi=this.voi.PAUSED},this.dri=()=>{this.ioi&&(this.roi=this.moi.AD_PLAY)},this.cU=()=>{this.ioi?(this.hoi===this.moi.AD_PAUSED&&(this.roi=this.moi.AD_RESUMED),this.roi=this.moi.AD_PLAYING):(this.poi&&(this.poi=!1,this.Zhi(),this.soi=this.voi.STARTED),this.soi!==this.voi.PAUSED&&this.soi!==this.voi.BUFFERING||(this.soi=this.voi.RESUMED))},this.AY=()=>{this.Jhi.reportPresentationSize(this.Qo.a_,this.Qo.r_)},this.lU=t=>{this.ioi||this.soi!==this.voi.PAUSED||this.Jhi.reportPlayerSeekCompleted(t.currentTime*P5)},this.aU=()=>{this.ioi||(this.soi=this.voi.BUFFERING)},this.uoi=()=>{this.Jhi.reportDownloadRate(_.floor(xu.yb.Kj()))},this.aoi=()=>{this.ioi||this.Jhi.reportPlaybackPosition(this.toi())},this.soi=this.voi.INITIALIZED,this.doi(),this.Aoi=this.ooi()}};B5.coi=2e3,Z((function(t){return class extends t{gn(){super.gn(),this.Moi()}constructor(t,i){super(t,i),this.Toi=void 0,this.Noi=void 0,this.Doi=()=>{this.Noi=void 0,this.Moi();const t=super.Wa();t&&(this.Noi=function(t,i){const e=function(t,i){if(t&&t.analytics)for(const i of t.analytics)if("smartsight"===i.integration)return i;if(i&&i.analytics)for(const t of i.analytics)if("smartsight"===t.integration)return t;return}(t,i);if(!e)return;return e}(t,this.wd)),this.Soi()},this.Soi=()=>{if(!this.Toi&&this.Noi&&this.bt&&this.bt.src&&!this.Ff){const t=MMSmartStreaming.getInstance();!function(t,i,e){t.registerMMSmartStreaming(e.playerName,e.customerID,e.subscriberID,e.domainName),t.reportComponent("THEOSDK"),t.reportPlayerInfo("THEOplayer","THEOplayer","7.10.0"),t.reportDeviceInfo(void 0,void 0,void 0,void 0,void 0,s.innerWidth,s.innerHeight),t.initializeSession("QBRModeDisabled",i,e.metaURL,e.assetID)}(t,this.bt.src,this.Noi),this.Toi=new B5(this,this.Noi,t),this.Toi.yn("ended",this.Moi)}},this.Moi=()=>{this.Toi&&(this.Toi.gn(),this.Toi=void 0)},this.yn(Co.lo,this.Doi),this.yn(Co.Hg,this.Soi),this.yn(Co.jh,this.Soi)}}}),Zo.S7);var R5=String.fromCharCode(95);var U5=class t{get va(){return this.Xa||(this.Xa=function(t){return{get adsManager(){return t.adsManager},get ids(){return t.ids},get adContainer(){return t.adContainer},get imaSDK(){return t.imaSDK},get sendEvent(){return t.sendEvent},set sendEvent(i){t.sendEvent=i}}}(this)),this.Xa}get id(){return this.IT}get adsManager(){return this.E5t}get ids(){return this.Ioi}get adContainer(){return this.NWt}get sendEvent(){return this.Eoi}set sendEvent(t){for(let t of this.boi)this.E5t.removeEventListener(t.type,t.listener);this.boi=[],this.Eoi=t,this.Loi()}get imaSDK(){return!0}koi(){for(let t in google.ima.AdEvent.Type){const i=google.ima.AdEvent.Type[t];this.E5t.addEventListener(i,this.Coi),this.boi.push({type:i,listener:this.Coi})}}xoi(){No(this.boi);for(let t in google.ima.AdEvent.Type){const i=google.ima.AdEvent.Type[t];this.E5t.removeEventListener(i,this.Coi)}}Ooi(t){this.FB.push({type:t.type,adVolume:this.adsManager.getVolume()})}Loi(){null==this.Eoi||this.Eoi.call(this,this.FB),this.FB=[]}static joi(i){return t.zoi[i]||i}constructor(i,e,s,n){this.Coi=i=>{this.Ooi({type:t.joi(i.type)})},this.IT=i,this.E5t=e,this.Ioi=s,this.NWt=n,this.boi=[],this.FB=[]}};U5.zoi={loaded:"AdLoaded",impression:"AdImpression",start:"AdVideoStart",firstQuartile:"AdVideoFirstQuartile",midpoint:"AdVideoMidpoint",thirdQuartile:"AdVideoThirdQuartile",complete:"AdVideoComplete",pause:"AdPaused",skip:"AdSkipped",volumeChange:"AdVolumeChange"};var Q5=class{Poi(t,i){this.Boi=h.createElement("script"),this.Boi.id=t.id,this.Boi.type="text/javascript",t.adContainer.appendChild(this.Boi),this.Boi.src="https://z.moatads.com/"+i+"/moatvideo.js#"+t.id,this.Roi=t.id,s[this.Roi]=t.va}Uoi(){this.Boi&&hs(this.Boi),this.Roi&&(s[this.Roi]=void 0)}constructor(){this.Boi=void 0,this.Roi=void 0}};Z((function(t){return class i extends t{ga(t){var e,s,n;this.Qoi(),null==(e=this.Foi)||e.removeEventListener(google.ima.AdEvent.Type.COMPLETE,this.Yoi),null==(s=this.Foi)||s.removeEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,this.Qoi),null==(n=this.Foi)||n.removeEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,this.Goi),this.Foi=void 0,this.NWt=void 0,super.ga(t);const r=t&&t.analytics;this.Voi=i.Woi(r);this.Oc&&this.Voi&&o0()&&this.Hoi()}gn(){var t,i,e;this.Qoi(),null==(t=this.Foi)||t.removeEventListener(google.ima.AdEvent.Type.COMPLETE,this.Yoi),null==(i=this.Foi)||i.removeEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,this.Qoi),null==(e=this.Foi)||e.removeEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,this.Goi),this.Foi=void 0,this.NWt=void 0,this.Oc&&this.Oc.fn("X0t",this.Z0t),super.gn()}Hoi(){this.Oc&&this.Oc.yn("X0t",this.Z0t)}qoi(t,i,e){const s=R5+"moatApi"+_.floor(1e8*_.random());this.Xoi=new U5(s,t,i,e),this.Xoi.koi(),this.Zoi.Poi(this.Xoi,this.Voi.partnerCode)}static Woi(t){if(t){const i=t.filter((t=>"moat"===t.integration));if(0===i.length)return;if(i.length>1)throw new g("Only one Moat analytics configuration expected");return i[0]}}constructor(t,i){super(t,i),this.Voi=void 0,this.Xoi=void 0,this.Foi=void 0,this.NWt=void 0,this.Goi=()=>{this.qoi(this.Foi,{partnerCode:this.Voi.partnerCode,viewMode:google.ima.ViewMode.NORMAL},this.NWt)},this.Z0t=t=>{this.Foi=t.I5t,this.NWt=t.x1t,this.Qoi(),this.Foi.addEventListener(google.ima.AdEvent.Type.COMPLETE,this.Yoi),this.Foi.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,this.Qoi),this.Foi.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,this.Goi)},this.Yoi=t=>{const i=t.getAd().getAdPodInfo();i.getAdPosition()<i.getTotalAds()&&(this.Qoi(),this.Goi())},this.Qoi=()=>{this.Xoi&&(this.Xoi.xoi(),this.Xoi=void 0),this.Zoi.Uoi()},this.Zoi=new Q5}}}),Zo.S7);var Le,vu=class extends Yi{constructor(t,i,e){super(t,new Date),this.Koi=i,this.Y7=e}};!function(t){t.LOADED="DAILoaded",t.AD_BREAK_STARTED="DAIAdBreakStarted",t.AD_BREAK_ENDED="DAIAdBreakEnded",t.AD_PERIOD_STARTED="DAIAdPeriodStarted",t.AD_PERIOD_ENDED="DAIAdPeriodEnded",t.AD_PROGRESS="DAIAdProgress",t.CUEPOINTS_CHANGED="DAICuePointsChanged",t.CLICK="DAIClick",t.ERROR="DAIError",t.STARTED="DAIStarted",t.FIRST_QUARTILE="DAIFirstQuartile",t.MIDPOINT="DAIMidpoint",t.STREAM_INITIALIZED="DAIStreamInitialized",t.THIRD_QUARTILE="DAIThirdQuartile",t.COMPLETE="DAIComplete"}(Le||(Le={}));var F5=class extends vu{constructor(t,i){super("DAILoaded",t,i)}},Y5=class extends vu{constructor(t,i){super("DAIAdBreakStarted",t,i)}},G5=class extends vu{constructor(t,i){super("DAIAdBreakEnded",t,i)}},V5=class extends vu{constructor(t,i){super("DAIAdProgress",t,i)}},W5=class extends vu{constructor(t,i){super("DAICuePointsChanged",t,i)}},H5=class extends vu{constructor(t,i){super("DAIClick",t,i)}},q5=class extends vu{constructor(t,i){super("DAIError",t,i)}},X5=class extends vu{constructor(t,i){super("DAIStarted",t,i)}},Z5=class extends vu{constructor(t,i){super("DAIFirstQuartile",t,i)}},K5=class extends vu{constructor(t,i){super("DAIMidpoint",t,i)}},J5=class extends vu{constructor(t,i){super("DAIStreamInitialized",t,i)}},$5=class extends vu{constructor(t,i){super("DAIThirdQuartile",t,i)}},t6=class extends vu{constructor(t,i){super("DAIComplete",t,i)}};var i6=class extends Bo{replaceAdTagParameters(t){return this.q5t.replaceAdTagParameters(null!=t?t:null)}Joi(t){return this.q5t.contentTimeForStreamTime(t)}$oi(t){return this.q5t.streamTimeForContentTime(t)}PCt(t,i){const e=function(t){let i;"vod"===t.availabilityType?(i=new s.google.ima.dai.api.VODStreamRequest,i.contentSourceId=t.contentSourceID,i.videoId=t.videoID):"live"===t.availabilityType&&(i=new s.google.ima.dai.api.LiveStreamRequest,i.assetKey=t.assetKey);const e=google.ima.dai.api.StreamRequest.StreamFormat;var n;return i.format="dash"===t.format?e.DASH:e.HLS,i.apiKey=t.apiKey,i.adTagParameters=t.adTagParameters,i.omidAccessModeRules=null!=(n=Y$(t.omidAccessModeRules))?n:{},i}(t);this.q5t.requestStream(e)}tr(){this.tai(!1),this.q5t.reset()}gn(){this.Vo();const t=google.ima.dai.api.StreamEvent.Type;this.q5t.removeEventListener(t.AD_BREAK_STARTED,this.iai),this.q5t.removeEventListener(t.AD_PROGRESS,this.eai),this.q5t.removeEventListener(t.CLICK,this.ZVt),this.q5t.removeEventListener(t.COMPLETE,this.sai),this.q5t.removeEventListener(t.CUEPOINTS_CHANGED,this.nai),this.q5t.removeEventListener(t.ERROR,this.Ss),this.q5t.removeEventListener(t.FIRST_QUARTILE,this.rai),this.q5t.removeEventListener(t.LOADED,this.hai),this.q5t.removeEventListener(t.MIDPOINT,this.oai),this.q5t.removeEventListener(t.STARTED,this.aai),this.q5t.removeEventListener(t.STREAM_INITIALIZED,this.uai),this.q5t.removeEventListener(t.THIRD_QUARTILE,this.cai),this.q5t.removeEventListener(t.AD_BREAK_ENDED,this.lai),this.tr(),this.fai&&hs(this.fai)}_ai(t){this.q5t.onTimedMetadata(t)}gai(t,i,e){this.q5t.processMetadata(t,i,e)}wai(t){const i=this.q5t.previousCuePointForStreamTime(t);if(i)return{UT:i.end,RT:i.start,Hf:i.played}}Aai(t){const i=this.wai(t),e=i&&!i.Hf?i.RT:void 0;return Promise.resolve(e)}tai(t){this.SWt.style.display=t?"block":"none"}constructor(t,i,e){super(),this.q5t=t,this.SWt=i,this.fai=e,this.iai=t=>{this.tai(!0);const i=Pt(t),e=xt(t);this.Co(new Y5(i,e))},this.lai=t=>{this.tai(!1);const i=Pt(t),e=xt(t);this.Co(new G5(i,e))},this.eai=t=>{const i=Pt(t),e=xt(t);this.Co(new V5(i,e))},this.ZVt=t=>{const i=Pt(t),e=xt(t);this.Co(new H5(i,e))},this.sai=t=>{const i=Pt(t),e=xt(t);this.Co(new t6(i,e))},this.nai=t=>{const i=Pt(t),e=xt(t);this.Co(new W5(i,e))},this.Ss=t=>{const i=Pt(t),e=xt(t);this.Co(new q5(i,e))},this.rai=t=>{const i=Pt(t),e=xt(t);this.Co(new Z5(i,e))},this.hai=t=>{const i=Pt(t),e=xt(t);this.Co(new F5(i,e))},this.oai=t=>{const i=Pt(t),e=xt(t);this.Co(new K5(i,e))},this.aai=t=>{const i=Pt(t),e=xt(t);this.Co(new X5(i,e))},this.uai=t=>{const i=Pt(t),e=xt(t);this.Co(new J5(i,e))},this.cai=t=>{const i=Pt(t),e=xt(t);this.Co(new $5(i,e))},this.SWt.style.display="none",this.q5t.setClickElement(this.SWt);const s=google.ima.dai.api.StreamEvent.Type;this.q5t.addEventListener(s.AD_BREAK_STARTED,this.iai),this.q5t.addEventListener(s.AD_PROGRESS,this.eai),this.q5t.addEventListener(s.CLICK,this.ZVt),this.q5t.addEventListener(s.COMPLETE,this.sai),this.q5t.addEventListener(s.CUEPOINTS_CHANGED,this.nai),this.q5t.addEventListener(s.ERROR,this.Ss),this.q5t.addEventListener(s.FIRST_QUARTILE,this.rai),this.q5t.addEventListener(s.LOADED,this.hai),this.q5t.addEventListener(s.MIDPOINT,this.oai),this.q5t.addEventListener(s.STARTED,this.aai),this.q5t.addEventListener(s.STREAM_INITIALIZED,this.uai),this.q5t.addEventListener(s.THIRD_QUARTILE,this.cai),this.q5t.addEventListener(s.AD_BREAK_ENDED,this.lai)}};function Pt(t){const i=t.getStreamData(),e=i.adProgressData;let s;e&&(s={oKt:e.adBreakDuration,vai:e.duration,aKt:e.adPosition,Mf:e.currentTime,ct:e.duration,uKt:e.totalAds});return{mai:s,pai:(i.cuepoints||[]).map((t=>({RT:t.start,UT:t.end,Hf:t.played}))),yai:i.errorMessage||void 0,Mai:i.manifestFormat||void 0,Tai:i.streamId||void 0,Nai:(i.subtitles||[]).map((t=>({Dai:t.webvtt,Sai:t.ttml,gs:t.language}))),zu:i.url}}function e6(t){return{jUt:t.getAdSlotId(),Rqt:t.getContent(),Fz:t.getContentType(),Ti:t.getHeight(),ji:t.getWidth()}}function xt(t){const i=t.getAd();if(!i)return;const e=i.getAdPodInfo(),s=i.getCompanionAds().map(e6);return{aQt:i.getAdId(),h$t:{aKt:e.getAdPosition(),QGt:e.getMaxDuration(),v5t:e.getPodIndex(),qEt:e.getTimeOffset(),uKt:e.getTotalAds()},YRt:i.getAdSystem(),p5t:i.getAdvertiserName(),xUt:i.getApiFramework(),JRt:s,_Ut:i.getCreativeId(),X$t:i.getCreativeAdId(),y5t:i.getDealId(),Kp:i.getDescription(),ct:i.getDuration(),Wz:i.getTitle(),Iai:i.getUniversalAdIdRegistry(),Eai:i.getUniversalAdIdValue(),F$t:i.getVastMediaHeight(),Q$t:i.getVastMediaWidth(),P$t:i.getWrapperAdIds(),B$t:i.getWrapperAdSystems(),R$t:i.getWrapperCreativeIds()}}function s6(){const t=h.body.lastElementChild;if(t instanceof HTMLIFrameElement&&"Advertisement"===t.title)return t}var n6="theo-dai-clickthrough",r6="urn:google:dai:2018",h6=class{get va(){const t=this,i=this.bai;return{contentTimeForStreamTime:i=>t.q5t?t.q5t.Joi(i):i,streamTimeForContentTime:i=>t.q5t?t.q5t.$oi(i):i,replaceAdTagParameters(i){t.q5t&&t.q5t.replaceAdTagParameters(i)},get snapback(){return t.Lai},set snapback(i){t.Lai=i},get sourceTransformer(){return i.kai},set sourceTransformer(t){i.kai=t}}}Nf(t){this.B2.Xd(),this.B2=new er,Ys(this.j5t(t,this.B2.Hd))}async j5t(t,i){if(fo(i),!this.Cai||!this.q5t)return this.Qo.xai(t);if(this.Cai.j7)return;if(t>this.Qo.Tf()&&this.Lai){const e=await ji(this.q5t.Aai(t),i);if(e){this.Qo.xai(e),await this.q5t.df(Le.AD_BREAK_ENDED,i);if(this.q5t.wai(t).UT>t)return}}this.Qo.xai(t)}i_(){const t=this.Cai&&this.Cai.j7;if(t){const i=ce.xn(this.Qo.Oai()),e=t.qEt,s=e+t.QGt,n=new ce([e,s]);return i.Sn(n).ks()}return this.Qo.Oai()}async ctt(t,i){if(!t)return this.Qo.jai(t,i);try{this.Qo.nt.yn(Rl.L_,this.zai);const e=await this.bai.Pai(t,i);this.Cai&&this.q5t&&(this.Bai=!0),await this.Qo.jai(e,i)}catch(t){if(Kc(t),t.code===oi.LICENSE_INVALID)return;const i=new $i(td.SOURCE_NOT_SUPPORTED,"Something went wrong while setting up a Google DAI stream.",t);throw this.xz=Zr(i),this.Oz=i,this.Qo.Co(new fh(i)),i}}tr(){if(this.Bai){if(this.Qo.nt.fn(Rl.L_,this.zai),this.c6t){this.c6t.fn(na.O_,this.Rai);for(const t of this.c6t.L.og)t.fn(sa.zT,this.X9t);this.c6t=void 0}this.xz=void 0,this.Oz=void 0,this.B2.Xd(),this.Cai&&this.Cai.tr(),this.q5t&&this.q5t.tr(),this.Bai=!1}}get lt(){return this.xz||this.Qo.Uai()}get bf(){return this.Oz||this.Qo.Qai()}gn(){this.tr(),this.Qo.Fai(),this.q5t&&this.q5t.gn()}constructor(t,i,e,s){this.c6t=void 0,this.xz=void 0,this.Oz=void 0,this.B2=new er,this.Bai=!1,this.Lai=!0,this.zai=t=>{const i=t.Lt;i.zt===hh.Mm&&(i.Rg===Wt.ID3||i.Rg===Wt.EVENT_STREAM&&i.Og===r6)&&(i.jg=L.zg,this.c6t=i,i.yn(na.O_,this.Rai))},this.Rai=t=>{t.BT.yn(sa.zT,this.X9t)},this.X9t=t=>{var i,e;if(this.q5t)if((null==(i=this.c6t)?void 0:i.Rg)===Wt.ID3){const i=t.BT.O;"TXXX"===i.id&&this.q5t._ai({TXXX:i.text})}else if((null==(e=this.c6t)?void 0:e.Rg)===Wt.EVENT_STREAM){const i=t.BT.O;this.q5t.gai(r6,i,t.nD)}},this.Qo=t,this.q5t=i,this.Cai=e,this.bai=s,e&&i&&this.Qo.Oc&&this.Qo.Oc.K7(e.i0t)}},o6=class extends ml{get Yai(){return this.Gai}get nYt(){return Gt.so}constructor(t,i,e,s=!0){super(e),this.Gai=s,this.Tqt=t,this.Nqt=i}},a6=class extends Z${Vai(){const t=[Le.STARTED,Le.FIRST_QUARTILE,Le.MIDPOINT,Le.THIRD_QUARTILE,Le.COMPLETE];this.q5t.yn(t,this.Wai),this.q5t.yn(Le.AD_BREAK_ENDED,this.lai),this.q5t.yn(Le.AD_PROGRESS,this.eai),this.q5t.yn(Le.CUEPOINTS_CHANGED,this.nai)}get Aqt(){return this.s0t}get oqt(){return this.TXt}Hai(t){let i=t.h$t.qEt,e=this.wVt||this.findAdBreakWithPredicate(i,(t=>!t.Hf));if(!e){const s=t.h$t.QGt;i=this.Qo.Tf(),e=new o6(s,s,i,!1),e.Dqt(),this.AVt.push(e)}return e}qai(t){switch(t){case Le.STARTED:this.s0t=!0;break;case Le.AD_BREAK_ENDED:this.s0t=!1}}Xai(t,i,e){if(i)switch(t){case Le.STARTED:case Le.FIRST_QUARTILE:case Le.MIDPOINT:case Le.THIRD_QUARTILE:case Le.COMPLETE:this.oqt.Co(new Ko(this.wVt))}if(e)switch(t){case Le.STARTED:case Le.FIRST_QUARTILE:case Le.MIDPOINT:case Le.THIRD_QUARTILE:case Le.COMPLETE:this.oqt.Co(new Re(this.rVt,this.rVt.x$t))}switch(t){case Le.COMPLETE:this.oqt.Co(new vo(this.rVt,this.t0t.x$t));break;case Le.AD_BREAK_ENDED:this.oqt.Co(new Vi(this.j7))}switch(t){case Le.FIRST_QUARTILE:this.oqt.Co(new ir(this.rVt,this.t0t.x$t));break;case Le.MIDPOINT:this.oqt.Co(new Ke(this.rVt,this.t0t.x$t));break;case Le.THIRD_QUARTILE:this.oqt.Co(new S$(this.rVt,this.t0t.x$t))}}Zai(t){const i=t.Y7,e=this.Hai(i),s=function(t,i){if(t.Oc.length)return!1;for(let e=0;e<i;e++){const i=new W$(t,lt.mFt);t.Iqt(i)}return!0}(e,i.h$t.uKt),n=function(t,i){const e=i.h$t.aKt-1;return t.Oc[e]}(e,i),r=function(t,i){return t.jqt!==Oo.READY&&(t.U$t(i),!0)}(n,i);this.rVt=n,this.wVt=e,e.Dqt(),this.Xai(t.type,s,r)}Kai(t){for(const i of this.AVt)if(Cd(t,i.qEt))return i}findAdBreakWithPredicate(t,i){for(const e of this.AVt)if(Cd(e.qEt,t)&&i(e))return e}get Jai(){const t=this.findAdBreakWithPredicate(0,(t=>t.Yai));let i=0;return t&&(i=t.QGt),i}$ai(t,i){let e;for(const s of this.AVt)s.qEt>=t&&s.qEt<=i&&!s.Hf&&(!e||s.qEt>=e.qEt)&&(e=s);return e}Vm(){}Z7(t){}tr(){this.rVt&&(this.oqt.Co(new vo(this.rVt,this.rVt.x$t)),this.rVt=void 0),this.wVt&&(this.oqt.Co(new Vi(this.wVt)),this.wVt=void 0),this.s0t=!1,No(this.AVt)}gn(){this.tr(),this.oqt.gn()}constructor(t,i){super(new Eu,Gt.so),this.q5t=t,this.Qo=i,this.eai=t=>{const i=this.wVt;if(!i||!this.rVt)return;const e=t.Koi.mai;this.rVt.x$t=e.Mf,function(t,i){const e=i.aKt,s=i.oKt,n=i.Mf,r=Yc(t.Oc.slice(0,e-1),(t=>{var i;return null!=(i=t.ct)?i:0}));t.FGt=s-n-r}(i,e)},this.nai=t=>{const i=t.Koi.pai;if(i)for(const t of i)if(!this.Kai(t.RT)){const i=t.UT-t.RT,e=new o6(i,i,t.RT,!0);this.AVt.push(e)}},this.Wai=t=>{this.qai(t.type),this.Zai(t)},this.lai=t=>{this.s0t=!1,this.rVt=void 0;const i=this.j7;i&&(i.FGt=0,this.Xai(t.type,!1,!1),this.wVt=void 0)},this.Vai()}};function u6(t){if(t.sources)if($(t.sources)){for(const i of t.sources)if(pw(i))return!0}else if(Mo(t.sources))return pw(t.sources);return!1}var c6=class{async Pai(t,i){const e=[],s=[];for(const i of t.sources)if(pw(i)){if(!this.q5t)continue;e.push(i)}else s.push(i);if(0===e.length)return t;let n,r;for(;void 0===n&&0!==e.length;){const{yc:h}=await so.yb.zP(e,t),o=h;fo(i);try{n=await this.tui(o,i),s.push(n)}catch(t){Kc(t),r=t,_s(e,o)}}if(0!==t.sources.length&&0===s.length)throw new g("Fatal: unable to play DAI streams.");return r&&Eo(r.message),Tt({},t,{sources:s})}async tui(t,i){if(!this.q5t)throw new g("Could not find Google\u2019s IMA DAI HTML5 SDK, all DAI sources will be ignored.");const e=this.q5t.df(Le.LOADED,i),s=this.q5t.df(Le.ERROR,i),n=t.type===yi.kA?"dash":"hls";this.q5t.PCt(Tt({},t.ssai,{format:n}));const r=await Promise.race([e,s]);if(r.type===Le.LOADED){const i=t.type===yi.kA?yi.kA:yi.xA;return Jg(Tt({},t,{src:this.kai?await this.kai(r.Koi.zu||""):r.Koi.zu,type:i}))}throw g(r.Koi.yai)}constructor(t){this.q5t=t,this.kai=t=>t}};Z(function(t){return i=>class extends i{fa(){const t=super.fa(),i=t.ads;if(i){const t=this.iui.va;vi(i,{get dai(){return t}})}return t}get Ul(){return this.eui}xai(t){super.Nf(t)}Nf(t){this.iui.Nf(t)}Oai(){return super.i_()}i_(){return this.iui.i_()}ga(t){return this.iui.tr(),super.ga(t)}async jai(t,i){return super.ctt(t,i)}async ctt(t,i){return this.iui.ctt(t,i)}Uai(){return super.Ef()}Qai(){return super.Lf()}Ef(){return this.iui.lt}Lf(){return this.iui.bf}Fai(){super.gn()}gn(){this.iui.gn(),this.SWt&&(hs(this.SWt),this.SWt.removeEventListener("keydown",this.sui),this.SWt.removeEventListener("click",this.sui),this.SWt=void 0)}constructor(i,e){super(i,e),this.eui=!1,this.sui=t=>{13===t.which&&this.SWt.click(),this.m_()};const s=this.A_();let n,r;try{this.SWt=h.createElement("button"),this.SWt.className=n6,n=t(s,this.SWt),r=new a6(n,this),this.we.appendChild(this.SWt),this.eui=!0}catch(t){this.SWt=void 0}const o=new c6(n);this.iui=new h6(this,n,r,o),this.SWt&&(this.SWt.addEventListener("keydown",this.sui),this.SWt.addEventListener("click",this.sui))}}}((function(t,i){if(!(s.google&&s.google.ima&&Mo(s.google.ima.dai)))throw new g("Could not find Google\u2019s IMA DAI HTML5 SDK, all DAI sources will be ignored.");const e=s6(),n=new google.ima.dai.api.StreamManager(t),r=s6();return new i6(n,i,r&&r!==e?r:void 0)})),Zo.T7);var d6=class{get nui(){return void 0===this.rui?0:(performance.now()-this.rui)/1e3}hui(t){this.oui=t,this.uui.aui(t),this.Qo.yn(Co.jh,this.dri),this.Qo.yn(Co.Jg,this.Ahi),this.Qo.yn(Co.Iw,this.e9t),this.Qo.yn(ut.ha,this.T4),this.Qo.yn(Zt.Bw,this.mhi),this.Qo.yn([Zt.Ow,Zt.jw,Zt.Rw],this.phi),this.Qo.yn(Co.Xg,this.whi),Vs.ZF(this.cui)}dui(){this.Qo.fn(Co.jh,this.dri),this.Qo.fn(Co.Jg,this.Ahi),this.Qo.fn(Co.Iw,this.e9t),this.Qo.fn(ut.ha,this.T4),this.Qo.fn(Zt.Bw,this.mhi),this.Qo.fn([Zt.Ow,Zt.jw,Zt.Rw],this.phi),this.Qo.fn(Co.Xg,this.whi),Vs.WF(this.cui),this.lui||(this.uui.fui(this._ui),this.uui.gui()),this.wui&&this.Aui(),this.oui=void 0,this.vui=!1,this.lui=!1,this._ui=-1/0,No(this.mui)}pui(){this.vui&&this.uui.yui(),this.rui=performance.now(),this.Mui=v(this.Tui,6e4)}Aui(){this.uui.Nui(this.nui),this.wui=!1,this.rui=void 0,this.Mui&&(m(this.Mui),this.Mui=void 0)}Dui(){if(S(this.Qo.Td()))return;const t=10*function(t,i){return _.floor(t/i)}(this.Qo.Tf()/this.Qo.Td()*100,10);ae(this.mui,t)||(this.mui.push(t),this.uui.Sui(t))}constructor(t,i){this.Qo=t,this.uui=i,this.vui=!1,this.lui=!1,this.mui=[],this._ui=-1/0,this.wui=!1,this.dri=()=>{this.vui||(this.uui.Iui(),this.wui&&this.uui.yui(),this.vui=!0)},this.Ahi=()=>{this.uui.Eui(),this.lui=!0},this.e9t=()=>{this._ui<this.Qo.Tf()&&(this._ui=this.Qo.Tf()),this.Dui()},this.mhi=()=>{this.vui&&(this.bui=performance.now(),this.uui.Lui(this.Qo.Tf()))},this.phi=()=>{this.bui&&(this.uui.kui((performance.now()-this.bui)/1e3),this.bui=void 0)},this.T4=()=>{this._ui<this.Qo.Tf()&&(this._ui=this.Qo.Tf()),this.uui.$it(this.Qo.Ef().message)},this.whi=()=>{const t=this.Qo.Td()===1/0;t&&!this.wui&&(this.wui=t,this.pui())},this.cui=()=>{this.uui.fui(this._ui),this.uui.Cui()},this.Tui=()=>{void 0!==this.rui&&this.uui.xui(this.nui)}}},l6=class{aui(t){this.Oui(["setDocumentTitle",t.itemTitle]),this.Oui(["setCustomUrl","https://content.streamone.net/embed/cust=Xo9oT45EptMG/account="+t.accountID+"/item="+t.itemID]),this.Oui(["trackPageView"])}Iui(){this.jui("item first play","viewing","1")}gui(){this.jui("item skipped","skipped","1")}Sui(t){this.jui("item progress","percent",""+t)}Cui(){this.jui("item abandoned","window closed","1")}fui(t){this.jui("item time","watched",""+t)}Eui(){this.jui("item finished","ended","1")}Lui(t){this.jui("buffering started","timestamp",""+t)}kui(t){this.jui("buffering ended","duration",""+t)}$it(t){this.jui("error","message",""+t)}yui(){this.jui("livestream first play","viewing","1")}xui(t){this.jui("livestream progress","duration",""+t)}Nui(t){this.jui("livestream time","watched",""+t)}jui(t,i,e){this.Oui(["trackEvent","Video",t,i,e])}Oui(t){const i="undefined"!=typeof _paq?_paq:void 0;i?i.push(t):console.warn("The Piwik library required for the StreamOne pre-integration was not found. Make sure it is loaded before instantiating THEOplayer.")}},f6=class{get zui(){if(!this.Pui)return;const t=this.Qo.Tf()/this.Pui;return _.floor(4*t)+1}get Bui(){return void 0!==this.Pui}hui(){this.Ic.yn("H7",this.H8t),this.Ic.yn("q7",this.q8t),this.Ic.yn("Wqt",this.foi),this.Ic.yn("fqt",this.loi),this.Qo.yn(Co.Iw,this.e9t),Vs.ZF(this.cui)}dui(){this.Ic.fn("H7",this.H8t),this.Ic.fn("q7",this.q8t),this.Ic.fn("Wqt",this.foi),this.Ic.fn("fqt",this.loi),this.Qo.fn(Co.Iw,this.e9t),No(this.Rui),Vs.WF(this.cui),this.Pui=void 0}constructor(t,i,e){this.Qo=t,this.Ic=i,this.uui=e,this.Rui=[],this.H8t=()=>{this.Pui=this.Qo.Td(),this.uui.Uui(this.Pui)},this.q8t=()=>{this.Pui&&(this.uui.Qui(this.Pui),No(this.Rui),this.Pui=void 0)},this.foi=t=>{if(!this.Pui)return;const i=this.Pui-this.Pui*t.Gqt;this.uui.Fui(i),this.Pui=void 0},this.loi=()=>{this.Pui=this.Qo.Td(),this.uui.Yui()},this.e9t=()=>{const t=this.zui;if(this.Bui&&t&&!ae(this.Rui,t)){switch(t){case 1:this.uui.Gui();break;case 2:this.uui.Vui();break;case 3:this.uui.Wui();break;case 4:this.uui.Hui()}this.Rui.push(t)}},this.cui=()=>{this.uui.qui()}}},_6=class{Uui(t){this.uui.jui("ad start","duration",""+t)}Qui(t){this.uui.jui("ad finished","duration",""+t)}Fui(t){this.uui.jui("ad skipped","remaining time",""+t)}Yui(){this.uui.jui("ad blocker","detected","1")}Gui(){this.uui.jui("ad progress","firstQuartile","")}Vui(){this.uui.jui("ad progress","secondQuartile","")}Wui(){this.uui.jui("ad progress","thirdQuartile","")}Hui(){this.uui.jui("ad progress","fourthQuartile","")}qui(){this.uui.jui("ad abandoned","window closed","1")}constructor(t){this.uui=t}};function g6(t){return t&&"streamone"===t.integration}Z((function(t){return class extends t{gn(){this.fn(Co.lo,this.do),this.Xui&&(this.Zui&&this.Zui.dui(),this.Kui&&this.Kui.dui(),this.Xui=!1),super.gn()}constructor(t,i){super(t,i),this.Xui=!1,this.do=()=>{this.Xui&&(this.Zui.dui(),this.Kui&&this.Kui.dui());const t=this.Wa();if(this.Xui=!1,!t)return;const i=function(t){if(t.analytics)for(let i of t.analytics)if(g6(i))return i}(t);i&&(this.Xui=!0,this.Zui.hui(i),this.Kui&&this.Kui.hui())};const e=new l6;if(this.Zui=new d6(this,e),this.Oc){const t=new _6(e);this.Kui=new f6(this,this.Oc,t)}this.yn(Co.lo,this.do)}}}),Zo.S7);var w6=class extends Xe{async cJ(t,i,e){const s=await A6(t);await super.cJ(s,i,e),this.Jui(s,i)}async oJ(t,i,e){const s=await A6(t);await super.oJ(s,i,e),this.Jui(s,i)}Jui(t,i){const e=this.tci.$ui;if(void 0===e)return;const s=i.PK;let n;if(this.ici!==s&&(this.ici=s,e.setLevelSwitching(s),e.setContainerFormat(2)),function(t){return Xt.call(t,"Z8")}(i)){const t=i.Z8,r=i.Z8+i.ct;n=i.jD,e.newPts(t,r,"video",s)}else 0;e.appendBuffer(t.Om,"video",s,n)}async TT(t,i,e){var s;await super.TT(t,i,e),null==(s=this.tci.$ui)||s.flushBuffer(t,i)}constructor(t,i){super(t),this.tci=i,this.ici=void 0}};async function A6(t){switch(t.Rg){case dt.$H:return t;case dt.US:{const i=await bt(t.Om);return{Rg:dt.$H,Om:new j(i)}}case dt.tq:throw new g("Opaque initialization segments are not supported on web.")}}var v6=class extends qs{zst(t){return t.XJ===f.Am?new w6(t,this.tci):new Xe(t)}constructor(t,i){super(t),this.tci=i,this.Ost(t)}},m6=class extends nU{get $ui(){return this.eci}sci(){this.eci=new LcevcDil.LcevcDil(this.sA.jz,this.nci,{})}ge(){super.ge(),this.rci()}be(){super.be(),this.nci.style.display="none"}tr(){return this.nci.style.display="none",void 0!==this.eci&&(this.eci.close(),this.sci()),super.tr()}Qd(){return this.hci=!0,void 0!==this.eci&&(this.eci.close(),this.eci=void 0),this.pu.removeChild(this.nci),super.Qd()}yP(t){this.Co(new bC(new wc(oi.ABORTED,t)))}rci(){this.sA.jz.style.display="none",this.nci.style.display="block"}get vst(){return this.sA}Lst(t){return new v6(t,this)}bst(t){return new et(t)}constructor(t,i){super(t),this.hci=!1,this.aci=t=>{this.hci||(t||this.yP("LCEVC SDK failed to initialize."),this.sci())},this.uci=()=>{this.hci||this.yP("LCEVC SDK failed to initialize.")},this.pu=i,this.nci=h.createElement("canvas"),this.nci.style.width="100%",this.nci.style.height="100%",this.nci.style.position="absolute",this.nci.style.top="50%",this.nci.style.left="50%",this.nci.style.transform="translate(-50%, -50%)",this.nci.style.display="none",this.pu.appendChild(this.nci),LcevcDil.ready.then(this.aci,this.uci)}},kl=class extends rn{MP(t){if(t===f.Am)return this.cci=new m6(super.MP(t),this.pu),this.cci}async rP(t){this.cci=void 0;const i=t;await i.Qd(),await super.rP(i.vst)}get dci(){return this.cci}constructor(t,i){super(t),this.pu=i}},p6=class extends Xo{async gn(){for(const t of this.uT.og)t.fn(na.J_,this.lci);this.rt.fn(Rl.L_,this.fci),this.rt.fn(Rl.C_,this._ci),await super.gn(),await this.sA.Qd(),await this.hP.rP(this.sA)}constructor(t,i,e,s,n,r,h,o){const a=new kl(r,o),u=new Xc(a);super(t,i,e,s,n,u.MP(h),o),this.fci=t=>{t.Lt.yn(na.J_,this.lci)},this._ci=t=>{t.Lt.fn(na.J_,this.lci)},this.lci=t=>{var i;const e=null==(i=this.gci.dci)?void 0:i.$ui,s=t.Brt.Mg;null==e||e.setCurrentLevel(s)},this.hP=u,this.gci=a,this.uT.yn(Rl.L_,this.fci),this.uT.yn(Rl.C_,this._ci)}};ON(new class extends FR{JA(t,i,e,s,n,r,h){const o=new zi(Al.yb.Het,Al.yb.Wet,Al.yb.Vet,Al.yb.Xet);let a=i;return jW.YC()&&(a=new jW(a)),new p6(e,s,n,r,o,a,f.Am,t)}async TP(t){if(!t.lcevc)return!1;if(!await super.TP(t))return!1;if(void 0===s.LcevcDil)throw new $i(td.CONFIGURATION_ERROR,"LCEVC SDK is not loaded.");return!0}NP(){return!1}constructor(...t){super(...t),this.DP=W.Jj}});var y6,M6=class extends IZ{async gn(){for(const t of this.uT.og)t.fn(na.J_,this.lci);this.rt.fn(Rl.L_,this.fci),this.rt.fn(Rl.C_,this._ci),await super.gn(),await this.hP.rP(this.sA)}constructor(t,i,e,s,n,r,h,o,a){const u=new kl(i,t),c=new Xc(u);super(c.MP(f.Am),e,s,n,r,h,o,a),this.fci=t=>{t.Lt.yn(na.J_,this.lci)},this._ci=t=>{t.Lt.fn(na.J_,this.lci)},this.lci=t=>{var i;const e=null==(i=this.gci.dci)?void 0:i.$ui,s=t.Brt.MSt.Mg;null==e||e.setCurrentLevel(s)},this.hP=c,this.gci=u,this.uT.yn(Rl.L_,this.fci),this.uT.yn(Rl.C_,this._ci)}};ON(new class extends bZ{JA(t,i,e,s,n,r,h){return new M6(t,i,e,n,r,hZ(s.libraryLocation),new Mc(s.libraryLocation),new zi(Al.yb.Het,Al.yb.Wet,Al.yb.Vet,Al.yb.Xet),s)}async TP(t,i){if(!t.lcevc)return!1;if(!await super.TP(t,i))return!1;if(void 0===s.LcevcDil)throw new $i(td.CONFIGURATION_ERROR,"LCEVC SDK is not loaded.");return!0}NP(){return!1}constructor(...t){super(...t),this.DP=W.ez}}),function(t){t.wci="tr",t.Aci="vci"}(y6||(y6={}));var T6="freewheel-nonlinear-ad",N6=[Co.Xg,Co.Iw,Co.Ew,Co.Sh,Zt.Rw,Co.jh],D6=class t extends fn{v_(){this.hP.LB()}mci(){this.pci.yn("W7",this.yci),this.pci.yn(["H7","q7"],this.Mci),this.pci.yn("V7",this.V3t)}Tci(){this.pci.fn("W7",this.yci),this.pci.fn(["H7","q7"],this.Mci),this.pci.fn("V7",this.V3t)}Nci(){this.oqt.Qa(this.pci.Dci)}Sci(){this.pci.Ici.yn(N6,this.Ds)}Eci(){this.pci.Ici.fn(N6,this.Ds)}get rqt(){return this}static get sqt(){return Gt.lVt}get sqt(){return t.sqt}get j7(){var t;return null!=(t=this.pci.Dci.j7)?t:null}get x7(){const t=this.pci.Dci.t0t;return t?[t]:[]}Z7(t){}Tf(){return this.pci.Ici.Mf}Nf(t){}Td(){return this.pci.Ici.ct}If(){return this.pci.Ici.Sf}Ef(){return this.xz}Lf(){return this.Oz}h_(){return 0}u_(){return 0}d_(){return this.pci.Ici.c_}l_(t){this.pci.Ici.c_=t}Bf(){return this.pci.Ici.Pf}Rf(t){this.pci.Ici.Pf=t}$f(){return this.pci.Ici.Jf}get z7(){return this.pci.Dci.z7}get P7(){return this.pci.Dci.P7}i_(){return this.pci.Ici.t_}Yf(){return this.pci.Ici.Ff}cqt(t){if(this.Aqt||this.pci.cqt(t),this.pci.bci){if(t.type===Co.Sh&&this.Qo.Sf)return!0;if(t.type===Co.Jg)return this.pci.kci.Lci(),!0}return!1}be(){this.pci.be()}m_(){this.Ff||this.pci.Ici.m_()}async Cci(){if(!this.pci.xci)try{await this.pci.KZt()}catch(t){this.Oci(t,Xr.GENERAL)}}async jci(){if(this.pci.Ici.zci)return this.pci.Ici.p_(),!1;if(this.pci.Pci)try{await this.pci.kci.Bci()}catch(t){this.Oci(t,Xr.PLAYBACK)}return!0}get Rci(){return Dd(this.Ef())}Oci(t,i){t.name!==y6.wci&&this.oqt.Co(new gn(i,"Ads could not be loaded."))}async p_(){if(this.Ff&&this.Co(new Qn(this.Mf)),await this.Cci(),this.Rci)return;const t=await this.jci();!this.Rci&&t&&this.V3t()}w0t(t,i,e){i===Ki.U7&&this.pci.w0t(t)}ge(){this.pci.ge()}Vm(){this.pci.Ici.Vm()}A_(){return this.s9}gf(){return this.hP.jB.map((t=>t.jz))}mqt(t){}async gn(){await this.y_(),this.pci.gn(),await this.hP.rP(this.sA),this.Tci(),this.Eci(),this.oqt.VB(this.pci.Dci)}async y_(){this.pci.tr(),this.Aqt&&(this.Qo.ge(),this.LHt(),this.be())}constructor(t,i,e,s,n){super(t,i),this.xz=void 0,this.Oz=void 0,this.Mci=t=>{const i=t.Y7,e="H7"===t.type;if(i.zqt===lt.pFt){const t=this.Qo.we.classList;e?t.add(T6):t.remove(T6)}e?this.ge():this.be()},this.yci=()=>{this.NXt(),this.Qo.m_(),this.Qo.be()},this.V3t=()=>{this.pci.xci&&(this.Qo.Sf||this.Qo.p_(),this.be(),this.Qo.ge(),this.LHt())},this.pci=s,this.hP=e,this.sA=n,this.s9=n.jz,this.s9.controls=!1,this.mci(),this.Nci(),this.Sci()}};var S6=class extends ml{get Uci(){return this.Qci}get Fci(){return this.Oc[this.Yci]}set Gci(t){this.Yci=t}get Gci(){return this.Yci}get zqt(){return this.Pqt}get nYt(){return Gt.lVt}constructor(t,i,e,s){super(e),this.Qci=s,this.Yci=0,this.Pqt=E6(s),this.Tqt=t,this.Nqt=i}},I6=class extends bl{get Vci(){return this.Wci}set Vci(t){this.Wci!==t&&(this.Wci=t)}get Ti(){return this.Xl.Uci.getHeight()}get ji(){return this.Xl.Uci.getWidth()}get GUt(){return this.Vci.getEventCallbackUrls(tv.freewheel.SDK.EVENT_AD_CLICK,tv.freewheel.SDK.EVENT_TYPE_CLICK)[0]}get nYt(){return Gt.lVt}fa(){return cn(this)}constructor(t,i,e){super(t,i),this.Wci=e}};function E6(t){return t.getTimePositionClass()===tv.freewheel.SDK.TIME_POSITION_CLASS_OVERLAY?lt.pFt:lt.mFt}var b6=class t extends Ut{async Hci(t,i){this.qci=t,this.Xci=i,this.Zci(t),await i,this.Kci()}get Jci(){return this.$ci}get tdi(){return this.idi}get edi(){return this.sdi}get j7(){return this.wVt}get t0t(){return this.rVt}get z7(){const t=[];if(this.wVt){const i=this.wVt.Gci;i>=0&&t.push(...this.wVt.Oc.slice(i+1))}for(const i of this.ndi)t.push(...i.Oc);return t}get P7(){return this.ndi}Kci(){this.rdi()}Zci(t){t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_STARTED,this.hdi),t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_ENDED,this.odi),t.addEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION,this.adi),t.addEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION_END,this.udi),t.addEventListener(tv.freewheel.SDK.EVENT_AD,this.cdi)}ddi(){this.qci&&(this.qci.removeEventListener(tv.freewheel.SDK.EVENT_SLOT_STARTED,this.hdi),this.qci.removeEventListener(tv.freewheel.SDK.EVENT_SLOT_ENDED,this.odi),this.qci.removeEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION,this.adi),this.qci.removeEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION_END,this.udi),this.qci.removeEventListener(tv.freewheel.SDK.EVENT_AD,this.cdi))}rdi(){this.$ci=this.ldi(this.fdi),this.idi=this.ldi(this._di).concat(this.ldi(this.gdi)),this.sdi=this.ldi(this.wdi),this.ndi=this.$ci.concat(this.idi).concat(this.sdi)}ldi(t){if(!this.qci)return[];const i=this.qci.getSlotsByTimePositionClass(t);return this.Adi(i)}vdi(t){if(!this.wVt)return void 0;const i=t.getSlot().getAdInstances().indexOf(t);-1!==i&&(this.wVt.Gci=i);const e=this.wVt.Fci;return e&&(e.Vci=t),e}mdi(t){return Po(this.ndi,(i=>i.Uci===t))}Adi(i){return i.map((i=>{const e=i.getTotalDuration(),s=t.pdi(i);return new S6(e,e,s,i)}))}static ydi(t,i){const e=t.getAdInstances(),s=[];for(const t of e){const e=E6(t.getSlot()),n=new I6(i,e,t),r=[];n.xqt(t.getAdId(),t.getSlot().getWidth(),t.getSlot().getHeight(),t.getDuration(),r,0),i.Iqt(n),s.push(n)}return s}LWt(){const t=this.t0t;t&&this.Co(new fe(t,this.Mdi()))}Tdi(){const t=this.t0t;t&&(this.Co(new vo(t,t.Vci.getPlayheadTime())),this.rVt=void 0)}Ndi(t){const i=this.j7;i&&(i.FGt=function(t,i,e){void 0===e&&(e=0);let s=0;const n=t.Oc.length;for(let r=i;r<n;r++){const n=t.Oc[r],h=n.ct;if(n){let t=h;r===i&&(t=Pe(h-e,0,h)),s+=t}}return s}(i,i.Gci,t))}static pdi(t){return t.getTimePositionClass()===tv.freewheel.SDK.TIME_POSITION_CLASS_POSTROLL?-1:t.getTimePosition()}Mdi(){const t=this.t0t;if(!t)return 0;const i=t.Vci;return i.getPlayheadTime()/i.getDuration()}Ddi(t){_s(this.ndi,t),_s(this.$ci,t),_s(this.idi,t),_s(this.sdi,t)}tr(){this.ddi(),this.$ci.length=0,this.idi.length=0,this.sdi.length=0,this.ndi.length=0,this.rVt=void 0,this.wVt=void 0,this.qci=void 0,this.Xci=void 0}gn(){this.tr(),this.Vo()}constructor(i,e){super(),this.Us=i,this.bx=e,this.fdi=tv.freewheel.SDK.TIME_POSITION_CLASS_PREROLL,this._di=tv.freewheel.SDK.TIME_POSITION_CLASS_MIDROLL,this.wdi=tv.freewheel.SDK.TIME_POSITION_CLASS_POSTROLL,this.gdi=tv.freewheel.SDK.TIME_POSITION_CLASS_OVERLAY,this.$ci=[],this.idi=[],this.sdi=[],this.ndi=[],this.hdi=i=>{const e=i.slot,s=this.mdi(e);s&&(t.ydi(e,s),this.wVt=s,s.Dqt(),this.Ddi(s),s.zqt===lt.mFt&&this.Co(new Ko(s)))},this.odi=()=>{const t=this.j7;t&&t.zqt===lt.mFt&&(this.Co(new Vi(t)),this.bx.src=""),this.wVt=void 0},this.adi=t=>{const i=this.vdi(t.adInstance);i&&(this.Co(new Re(i,i.Vci.getPlayheadTime())),this.rVt=i),t.adInstance.getEventCallbackUrls(tv.freewheel.SDK.EVENT_AD_CLICK,tv.freewheel.SDK.EVENT_TYPE_CLICK).length>0&&(this.Us.style.cursor="pointer",this.Us.addEventListener("click",this.Sdi))},this.udi=()=>{this.Us.style.cursor="",this.Us.removeEventListener("click",this.Sdi)},this.Sdi=()=>{this.t0t&&this.t0t.Vci.getRendererController().processEvent({name:tv.freewheel.SDK.EVENT_AD_CLICK})},this.cdi=t=>{switch(t.subType){case tv.freewheel.SDK.EVENT_AD_COMPLETE:this.Tdi();break;case tv.freewheel.SDK.EVENT_AD_SKIPPED:this.LWt(),this.Tdi()}}}},L6=class t extends Ut{Idi(){if(this._gt){this._gt.setAdVolume(k6(this.Pf,this.c_))}}Edi(t){this._gt=t,this.Zci(t)}Zci(t){t.addEventListener(tv.freewheel.SDK.EVENT_AD,this.bdi),t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_STARTED,this.Ldi),t.addEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION,this.kdi),t.addEventListener(tv.freewheel.SDK.EVENT_AD_COMPLETE,this.Cdi),t.addEventListener(tv.freewheel.SDK.EVENT_CONTENT_VIDEO_PAUSE_REQUEST,this.xdi),t.addEventListener(tv.freewheel.SDK.EVENT_CONTENT_VIDEO_RESUME_REQUEST,this.Odi)}jdi(){const t=this._gt;t&&(t.removeEventListener(tv.freewheel.SDK.EVENT_AD,this.bdi),t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_STARTED,this.Ldi),t.removeEventListener(tv.freewheel.SDK.EVENT_AD_IMPRESSION,this.kdi),t.removeEventListener(tv.freewheel.SDK.EVENT_AD_COMPLETE,this.Cdi),t.removeEventListener(tv.freewheel.SDK.EVENT_CONTENT_VIDEO_PAUSE_REQUEST,this.xdi),t.removeEventListener(tv.freewheel.SDK.EVENT_CONTENT_VIDEO_RESUME_REQUEST,this.Odi))}p_(){this.nvt.j7&&(this.nvt.j7.Uci.resume(),this.Ff=!1)}m_(){this.nvt.j7&&(this.nvt.j7.Uci.pause(),this.Ff=!0)}get Mf(){const t=this.nvt.t0t;return t&&(this.Mf=t.Vci.getPlayheadTime()),this.TB}set Mf(t){this.TB=t}get ct(){return this.UL}get zci(){return!!this.nvt&&void 0!==this.nvt.j7}get Ff(){return this.SB}set Ff(t){this.SB=t}get c_(){return this.$L}set c_(t){this._gt&&this._gt.setAdVolume(t),this.$L=t}get Pf(){return this._gt&&(this.zdi=0===this._gt.getAdVolume()),this.zdi}set Pf(t){this._gt&&this._gt.setAdVolume(k6(t,this.c_)),this.zdi=t}get t_(){return this.X$}get Sf(){return this._0}set Sf(t){this._0=t}get Jf(){return this.g0}static Pdi(t){switch(t){case"pause":return tv.freewheel.SDK.VIDEO_STATE_PAUSED;case"playing":return tv.freewheel.SDK.VIDEO_STATE_PLAYING;case"ended":return tv.freewheel.SDK.VIDEO_STATE_COMPLETED;case"stop":return tv.freewheel.SDK.VIDEO_STATE_STOPPED}}Bdi(i){const e=t.Pdi(i);this._gt&&e&&this._gt.setVideoState(e)}Vm(){const t=this.nvt.t0t;t&&t.Vci.skip()}tr(){if(this.jdi(),this._gt){this.Bdi("stop"),this._gt.setVideoState(tv.freewheel.SDK.VIDEO_STATE_STOPPED);const t=this._gt.getTemporalSlots();for(const i of t)i.stop();this._gt.dispose(),this._gt=void 0}this.UL=NaN,this.Sf=!1,this.g0=oe.sT,this.Mf=0,this.Rdi=0,this.Ff=!0,void 0!==this.Udi&&(m(this.Udi),this.Udi=void 0)}gn(){this.tr(),this.Vo(),this.nvt.fn("W7",this.Md),this.Wu.fn(Tn.pn,this.Ldi),this.NWt.removeEventListener("click",this.Qdi)}constructor(t,i,e,s){super(),this.Qo=t,this.Wu=i,this.nvt=e,this.NWt=s,this.X$=ce.MB().ks(),this.SB=!0,this.UL=NaN,this.zdi=!1,this._0=!1,this.g0=oe.sT,this.TB=0,this.Rdi=0,this.bdi=t=>{switch(t.subType){case tv.freewheel.SDK.EVENT_AD_PAUSE:(function(t){if(!t)return!0;const i=t.Vci,e=i.getPlayheadTime(),s=i.getDuration();return e>=s||Cd(s,e)})(this.nvt.t0t)||(this.Ff=!0,this.Co(new iu(this.Mf)));break;case tv.freewheel.SDK.EVENT_AD_RESUME:this.Ff=!1,this.Co(new _e(this.Mf));break;case tv.freewheel.SDK.EVENT_AD_VOLUME_CHANGE:if(this._gt){const t=this._gt.getAdVolume();0===t?this.zdi=!0:this.$L=t,this.Co(new Tc(this.Mf,this.c_))}}},this.kdi=()=>{this.Sf=!1;const t=this.Ff;if(this.Ff=!1,t&&(this.Co(new Qn(this.Mf)),this.Co(new _e(this.Mf))),this.g0=oe.rT,this.Mf=0,!this.nvt.t0t)return;const i=this.nvt.t0t.Vci;this.UL=i.getDuration(),this.Co(new os(this.UL)),this.Udi=v((()=>{if(!this.zci)return void this.E$();this.nvt.Ndi(this.Mf);const t=i.getPlayheadTime();be(t,this.Rdi,.001)||this.Co(new Dr(t,void 0)),this.Rdi=t}),250),this._gt&&this._gt.setAdVolume(k6(this.Pf,this.c_))},this.Qdi=()=>{const t=this.nvt.t0t;t&&(t.zqt===lt.pFt?this.Qo.m_():this.Ff||this.m_())},this.E$=()=>{m(this.Udi),this.Udi=void 0},this.Cdi=()=>{this.E$(),this.Sf=!0},this.xdi=()=>{this.Bdi("pause")},this.Odi=()=>{this.Bdi("playing")},this.Md=t=>{t.Xl.zqt===lt.mFt&&(this.Ff=!1)},this.Ldi=()=>{this._gt&&this._gt.resize(this.Wu.ku,this.Wu._u)},this.$L=t.c_,e.yn("W7",this.Md),this.Wu.yn(Tn.pn,this.Ldi),this.NWt.addEventListener("click",this.Qdi)}};function k6(t,i){return t?0:i}var Ml=class extends Jo{get name(){return y6.Aci}constructor(){super("A FreeWheel Ad Error occurred")}},jl=class extends Jo{get name(){return y6.wci}constructor(){super("A FreeWheel Reset Error Occurred")}},C6=0;var x6=class{Fdi(t,i,e){t.setNetwork(i.networkId),t.setServer(i.adServerUrl);const s=this._gt;if(s.setProfile(i.profile),i.assetId&&i.assetDuration&&s.setVideoAsset(i.assetId,i.assetDuration),i.siteSectionId&&s.setSiteSection(i.siteSectionId),s.registerVideoDisplayBase(e),i.cuePoints&&i.cuePoints.length)for(const t of i.cuePoints)s.addTemporalSlot("cue-"+ ++C6,t.adUnit,t.timeOffset);const n=i.customData;if(Mo(n)){const t=w.keys(n);for(const i of t){const t=n[i];s.addKeyValue(i,t)}}}async Ydi(){this._gt.submitRequest(),await this.Gdi.Vb}tr(){this._gt.removeEventListener(tv.freewheel.SDK.EVENT_REQUEST_COMPLETE,this.Vdi),this.Gdi.Yb(new jl)}constructor(t,i,e,s){this._gt=i,this.Vdi=t=>{this._gt.removeEventListener(tv.freewheel.SDK.EVENT_REQUEST_COMPLETE,this.Vdi),t.success?this.Gdi.Qb(void 0):this.Gdi.Yb(new Ml)},this.Fdi(t,e,s),i.addEventListener(tv.freewheel.SDK.EVENT_REQUEST_COMPLETE,this.Vdi),this.Gdi=new Rs}},O6=class{Wdi(){this.qci.removeEventListener(tv.freewheel.SDK.EVENT_SLOT_ENDED,this.odi),this.qci.removeEventListener(tv.freewheel.SDK.EVENT_ERROR,this.odi)}get Hdi(){return this.qd.Vb}ext(){this.Wdi(),this.qd.Yb(new jl)}constructor(t){this.qci=t,this.odi=t=>{this.Wdi(),this.qd.Qb(void 0)},this.HJt=t=>{this.Wdi(),this.qd.Yb(new Ml)},this.qd=new Rs,t.addEventListener(tv.freewheel.SDK.EVENT_SLOT_ENDED,this.odi),t.addEventListener(tv.freewheel.SDK.EVENT_ERROR,this.HJt)}},j6=class{vT(t){this.qci=t}Bci(){return this.qdi(this.Xdi.Jci)}Lci(){this.qdi(this.Xdi.edi)}async qdi(t){if(this.qci)for(;t.length>0;){this.Zdi=new O6(this.qci);const i=this.Zdi.Hdi,e=this.Xdi.j7;e&&e.zqt===lt.pFt&&e.Uci.stop();t.shift().Uci.play();try{await i}finally{this.Zdi=void 0}}}tr(){this.Zdi&&(this.Zdi.ext(),this.Zdi=void 0),this.Kdi=0}gn(){this.Qo.fn(Co.Iw,this.Jdi)}constructor(t,i){this.Qo=t,this.Xdi=i,this.Kdi=0,this.Jdi=()=>{const t=this.Qo.Tf();for(const i of this.Xdi.tdi){const e=new ce([this.Kdi,t],[!0,!0]),s=i.Uci.getTimePosition();if(e.gr(s))switch(i.Uci.getTimePositionClass()){case tv.freewheel.SDK.TIME_POSITION_CLASS_MIDROLL:this.qdi([i]);break;case tv.freewheel.SDK.TIME_POSITION_CLASS_OVERLAY:i.Uci.play(),i.Uci.setVisible(!0)}}this.Kdi=t},t.yn(Co.Iw,this.Jdi)}},z6=0,P6=class t extends Eu{static createUniqueDisplayBaseId(){return"theo-freewheel-"+ ++z6}get bci(){return 0!==this.Dci.edi.length}get Pci(){return 0!==this.Dci.Jci.length}async KZt(){if(!this.rYt)throw new g("Invalid state");const t=this.$di,i=t.newContext();i.setParameter(tv.freewheel.SDK.PARAMETER_RENDERER_VIDEO_DISPLAY_CONTROLS_WHEN_PAUSE,!1,tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL),i.setParameter(tv.freewheel.SDK.PARAMETER_EXTENSION_CONTENT_VIDEO_ENABLED,!1,tv.freewheel.SDK.PARAMETER_LEVEL_GLOBAL);const e=new x6(t,i,this.rYt,this.tli),s=this.Dci.Hci(i,e.Ydi());this.ili.vT(i),this.Ici.Edi(i),this.eli=e;try{await s}finally{this.Ici.Idi(),this.sli=!0}}get Ici(){return this.QJt}get Dci(){return this.nli}get xci(){return this.sli}static rli(t,i,e){const s=h.createElement("div");return s.id=e,s.className="theo-freewheel",i.classList.add("theo-freewheel-video"),s.appendChild(i),t.appendChild(s),s}get kci(){return this.ili}cqt(t){this.Ici.Bdi(t.type)}ge(){this.NWt.style.display="block",this.bx.style.display="block"}be(){this.NWt.style.display="none",this.bx.style.display="none"}w0t(t){this.rYt=t}tr(){this.sli=!1,this.rYt=void 0,this.Dci.tr(),this.ili.tr(),this.eli&&(this.eli.tr(),this.eli=void 0),this.Ici.tr(),this.bx.src=""}gn(){this.tr(),this.QJt.gn(),this.ili.gn(),this.Dci.gn(),this.NWt.remove(),this.Qo.we.removeChild(this.NWt)}constructor(i,e,n){super(),this.Qo=i,this.bx=e,this.sli=!1,this.tli=t.createUniqueDisplayBaseId(),this.NWt=t.rli(i.we,e,this.tli),this.$di=new s.tv.freewheel.SDK.AdManager,this.nli=new b6(this.NWt,this.bx),this.ili=new j6(this.Qo,this.Dci),this.Qa(this.Dci),this.QJt=new L6(i,n,this.Dci,this.NWt)}};function B6(t){if(s.tv)switch(t){case"preroll":return tv.freewheel.SDK.ADUNIT_PREROLL;case"midroll":return tv.freewheel.SDK.ADUNIT_MIDROLL;case"postroll":return tv.freewheel.SDK.ADUNIT_POSTROLL;case"overlay":return tv.freewheel.SDK.ADUNIT_OVERLAY}}function R6(t,i,e){if(void 0!==i&&S(i)||i<0||i===1/0)return NaN;switch(t){case"preroll":return 0;case"postroll":return e}return mo(i)}var U6;function Q6(t){return t.navigator&&t.navigator.userAgent||""}He.yb.oR(new class{get $Ht(){return Gt.lVt}hR(t){return t.integration===Os.FREEWHEEL}tqt(t,i,e){if(!Boolean(s.tv&&s.tv.freewheel&&s.tv.freewheel.SDK&&s.tv.freewheel.SDK.AdManager))return;const n=new km(t.Iu,t.Ol,1,[f.Am]);n.PB(t.we);const r=n.MP(f.Am),h=new P6(t,r.jz,t.Iu);return new D6(t,i,n,h,r)}DQ(t){const e=ie(t);$(e.cuePoints)||(e.cuePoints=[]);const s=[],n=t.assetDuration||0;for(const t of e.cuePoints){const e=R6(t.adUnit,t.timeOffset,n),r=B6(t.adUnit);!S(e)&&Qs(r)?(t.adUnit=r,t.timeOffset=e,s.push(t)):i.IA("Invalid adUnit/timeOffset combination. Cue was removed.")}return e.cuePoints=s,e}Z1(t,i,e,s){e.w0t(t,i,s)}}),function(t){t.hli="Windows 10",t.oli="Windows 8.1",t.ali="Windows 8",t.uli="Windows 7",t.cli="Windows Vista",t.dli="Windows Server 2003",t.lli="Windows XP",t.fli="Windows Phone",t._li="Mac OS X",t.gli="Mac OS",t.II="Android",t.bI="iOS",t.wli="Ubuntu",t.Ali="Linux",t.vli="Chrome OS"}(U6||(U6={}));var F6={"Windows 10":/(Windows 10.0|Windows NT 10.0)/i,"Windows 8.1":/(Windows 8.1|Windows NT 6.3)/i,"Windows 8":/(Windows 8|Windows NT 6.2)/i,"Windows 7":/(Windows 7|Windows NT 6.1)/i,"Windows Vista":/Windows NT 6.0/i,"Windows Server 2003":/Windows NT 5.2/i,"Windows XP":/(Windows NT 5.1|Windows XP)/i,"Windows Phone":/Windows Phone/i,Android:/Android/i,Linux:/(Linux(?!.*Ubuntu)|X11)/,Ubuntu:/Ubuntu/i,iOS:/(iPhone|iPad|iPod)/i,"Mac OS X":/Mac OS X/i,"Mac OS":/(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/i,"Chrome OS":/CrOS/i};function uu(t,i){const e=F6[i];return!!e&&Boolean(Q6(t).match(e))}function Y6(t){return uu(t,"Android")}function G6(t){return uu(t,"Windows Phone")}function V6(t){return uu(t,"iOS")&&!G6(t)}function W6(t){return uu(t,"Ubuntu")}var H6,Wc=/Windows (NT|Phone) ([0-9.]+)/i,q6=/Mac.*?(OS |OS X )(\d+(([_.])\d+)?(([_.])\d+)?)/i,X6={"Windows 10":Wc,"Windows 8.1":Wc,"Windows 8":Wc,"Windows 7":Wc,"Windows Vista":Wc,"Windows Server 2003":Wc,"Windows XP":Wc,"Windows Phone":/Windows Phone ([0-9.]+)/i,Android:/Android (\d+(([_.])\d+)?(([_.])\d+)?)/i,Linux:void 0,Ubuntu:void 0,iOS:/(iPad|iPhone|iPod).*?(OS |os |OS_)(\d+(([_.])\d+)?(([_.])\d+)?)/i,"Mac OS X":q6,"Mac OS":q6,"Chrome OS":void 0};function Z6(t,i){const e=X6[i];return e?Q6(t).match(e):null}function K6(t){return t.split(/[_.]/).map((t=>x(t,10)))}function J6(t){if(function(t){return Boolean(Q6(t).match(/Windows/i))}(t)){if(function(t){return uu(t,"Windows 10")}(t))return"Windows 10";if(G6(t))return"Windows Phone";if(function(t){return uu(t,"Windows 8.1")}(t))return"Windows 8.1";if(function(t){return uu(t,"Windows 8")}(t))return"Windows 8";if(function(t){return uu(t,"Windows 7")}(t))return"Windows 7";if(function(t){return uu(t,"Windows Vista")}(t))return"Windows Vista";if(function(t){return uu(t,"Windows Server 2003")}(t))return"Windows Server 2003";if(function(t){return uu(t,"Windows XP")}(t))return"Windows XP"}else{if(Y6(t))return"Android";if(V6(t))return"iOS";if(function(t){return uu(t,"Mac OS X")}(t))return"Mac OS X";if(function(t){return uu(t,"Mac OS")}(t))return"Mac OS";if(W6(t))return"Ubuntu";if(function(t){return uu(t,"Chrome OS")}(t))return"Chrome OS";if(function(t){return uu(t,"Linux")&&!W6(t)}(t))return"Linux"}}function $6(t,i){const e=function(t){const i=Z6(t,"Windows 10");return i&&i.length>2?K6(i[2]):void 0}(t),s=function(t){const i=Z6(t,"Mac OS X");return i&&i.length>2?K6(i[2]):void 0}(t),n=function(t){const i=Z6(t,"Android");return i&&i.length>1?K6(i[1]):void 0}(t),r=function(t){const i=Z6(t,"iOS");return i&&i.length>3?K6(i[3]):void 0}(t),h=function(t){const i=Z6(t,"Chrome OS");return i&&i.length>0?K6(i[0]):void 0}(t);return e?e.length>i?e[i]:void 0:s?s.length>i?s[i]:void 0:n?n.length>i?n[i]:void 0:r?r.length>i?r[i]:void 0:h&&h.length>i?h[i]:void 0}function t8(t){const i=function(t){return $6(t,0)}(t),e=function(t){return $6(t,1)}(t),s=function(t){return $6(t,2)}(t);if(void 0!==i)return void 0===e?""+i:void 0===s?i+"."+e:i+"."+e+"."+s}!function(t){t.mli="Chrome",t.yli="Chrome Mobile",t.Mli="Chrome iOS",t.Tli="Chromium",t.Nli="Firefox",t.Dli="Seamonkey",t.Sli="Firefox iOS",t.Ili="Firefox Mobile",t.Eli="Safari",t.bli="Safari Mobile",t.Lli="Edge",t.kli="Edge Chromium",t.Cli="Edge Mobile",t.xli="IE",t.Oli="Opera",t.jli="Opera Mobile",t.zli="Vivaldi",t.Pli="HeadlessChrome",t.Bli="Android Browser"}(H6||(H6={}));var i8={Chrome:/Chrome/i,"Chrome Mobile":void 0,"Chrome iOS":/CriOS/i,Chromium:/Chromium/i,HeadlessChrome:/HeadlessChrome/i,Firefox:/Firefox/i,Seamonkey:/Seamonkey/i,"Firefox iOS":/FxiOS/i,Safari:/Safari/i,Edge:/Edge\/\d+/i,"Edge Chromium":/Edg\/\d+/i,IE:/Trident/i,Opera:/Opera|OPR/i,Vivaldi:/Vivaldi/i,"Android Browser":void 0};function St(t,i){const e=i8[i];return!!e&&Boolean(Q6(t).match(e))}function e8(t){return Boolean(Q6(t).match(/Mobi/i))}function s8(t){return Boolean(t.chrome&&t.navigator&&t.navigator.vendor&&/google/i.test(t.navigator.vendor))||n8(t)}function n8(t){return St(t,"Chrome iOS")}function r8(t){return St(t,"Firefox")&&!o8(t)}function h8(t){return St(t,"Firefox Mobile")&&!o8(t)&&e8(t)}function o8(t){return St(t,"Seamonkey")}function a8(t){return St(t,"Firefox iOS")&&!o8(t)}function u8(t){return St(t,"Safari")&&!St(t,"Chrome")&&!fi.VI}function c8(t){return Boolean(v8(t))}function d8(t){return St(t,"Edge")}function l8(t){return St(t,"Edge Chromium")}function f8(t){return St(t,"IE")}function _8(t){return St(t,"Vivaldi")}var dl,g8=/chrome\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i,w8={Chrome:g8,"Chrome Mobile":g8,"Chrome iOS":/CriOS\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/i,Chromium:g8,HeadlessChrome:g8,Firefox:/Firefox\/([0-9.]+)/i,"Firefox iOS":/FxiOS\/([0-9.]+)/i,Safari:/(Version)\/((\d+)\.(\d+)(?:\.(\d+))?).*Safari/,"Safari Mobile":void 0,Edge:/Edge\/(\d+)/i,"Edge Chromium":/Edg\/(\d+)/i,"Edge Mobile":void 0,IE:/(MSIE |Trident.*?rv:)(\d+)/i,Opera:/(OPR\/(\d+\.\d+))|(Opera(?=.*Version\/((\d+)\.(\d+))))/i,"Opera Mobile":void 0,Vivaldi:/Vivaldi\/((\d+)\.(\d+)\.(\d+)(?:\.(\d+))?)/i,"Android Browser":void 0};function A8(t,i){const e=w8[i];return e?Q6(t).match(e):null}function v8(t){return A8(t,"Opera")}function m8(t){const i=function(t){return A8(t,"Firefox")}(t);return i?C(i[1]):0}function p8(t){const i=function(t){return A8(t,"Firefox iOS")}(t);return i?C(i[1].split(".")[0]):0}function y8(t){const i=function(t){return A8(t,"Safari")}(t);return i?C(i[2].split(".")[0]):0}function M8(t){const i=function(t){return A8(t,"Edge")}(t);return i?C(i[1]):0}function T8(t){const i=function(t){return A8(t,"Edge Chromium")}(t);return i?C(i[1]):0}function N8(t){const i=function(t){return A8(t,"IE")}(t);return i?C(i[2]):0}function D8(t){const i=function(t){return A8(t,"Vivaldi")}(t);return i?C(i[1]):0}function S8(t){if(Y6(t))return s8(t)?"Chrome Mobile":r8(t)||h8(t)?"Firefox Mobile":d8(t)?"Edge Mobile":c8(t)?"Opera Mobile":"Android Browser";if(V6(t)){if(s8(t)||n8(t))return"Chrome iOS";if(r8(t)||a8(t))return"Firefox iOS";if(d8(t))return"Edge Mobile";if(u8(t)||function(t){return u8(t)&&e8(t)}(t))return"Safari Mobile";if(c8(t))return"Opera Mobile"}return function(t){return St(t,"Chromium")}(t)?"Chromium":function(t){return St(t,"HeadlessChrome")}(t)?"HeadlessChrome":s8(t)?"Chrome":r8(t)?"Firefox":u8(t)?"Safari":d8(t)?"Edge":l8(t)?"Edge Chromium":f8(t)?"IE":c8(t)?"Opera":_8(t)?"Vivaldi":void 0}function I8(t){return _8(t)?D8(t):n8(t)?Number(function(t){const i=w8["Chrome iOS"];return i&&i.exec(Q6(t))||[]}(t)[1]):s8(t)?Number(function(t){const i=w8.Chrome;return i&&i.exec(Q6(t))||[]}(t)[1]):r8(t)||h8(t)?m8(t):a8(t)?p8(t):u8(t)?y8(t):d8(t)?M8(t):l8(t)?T8(t):f8(t)?N8(t):c8(t)?function(t){const i=v8(t);return i&&i[0].indexOf("Opera")>-1?C(i[5]):i?C(i[2].split(".")[0]):0}(t):void 0}function E8(t){const i=Q6(t);return i.match(/CrKey|Roku|AFTS|AppleTV|Nexus Player/i)?"settop":i.match(/Xbox|Playstation|Wii|Nintendo/i)?"console":/(iPad|Tablet|(Android(?!.*Mobi))|(Windows(?!.*Phone)(.*Touch))|Kindle|Playbook|Silk|(Puffin(?!.*(IP|AP|WP))))/i.test(i)?"tablet":/Mobi/.test(i)?"mobile":i.match(/GoogleTV|SmartTV|SMART-TV|Internet TV|NetCast|NETTV|boxee|Kylo|DLNADOC|hbbtv|CE-HTML/i)?"smarttv":i.match(/(nuhk|Googlebot|bingbot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver)/i)?"searchbot":function(t){return Boolean(S8(t))}(t)?"pc":void 0}!function(t){t.Rli="pc",t.Uli="console",t.Qli="settop",t.Fli="mobile",t.Yli="tablet",t.Gli="smarttv",t.Vli="searchbot"}(dl||(dl={}));var b8=class{NQ(t){this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_ID,t.deviceID||function(){let t=at.Pb("deviceId");if(t)return t;let i=ND();return at.Wj("deviceId",i),i}()),this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.PLAYER,"THEOplayer"),this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.PLAYER_VERSION,"7.10.0"),this.Wli(t),this.Hli(),this.qli(t),this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.EMPCLIENT_INTEGRATION_VERSION,"3.0"),this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.EMPCLIENT_INTEGRATION_BUILDDATE,"2023-04-17 12:00:00"),t.application&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.APPLICATION,t.application),t.applicationVersion&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.APPLICATION_VERSION,t.applicationVersion),t.userAccountID&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.USER_ACCOUNT_ID,t.userAccountID);const i=t.connectionType;i?this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DATA_CONNECTION_TYPE,i):(this.Xli(),ed.connection&&ed.connection.addEventListener&&ed.connection.addEventListener("change",this.Xli))}Wli(t){this.Zli(t);const i=t.deviceManufacturer||_l&&_l.manufacturer;i&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_MANUFACTURER,i);const e=t.deviceModel||_l&&_l.model;e&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_MODEL,e)}Zli(t){const i=t.deviceType||function(){const t=E8(self);switch(t){case dl.Uli:return"game-console";case dl.Gli:return"tv";case dl.Qli:return"media-streamer";default:return t}}();i&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_TYPE,i)}Hli(){const t=S8(self);t&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_BROWSER,t);const i=I8(self);void 0!==i&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_BROWSER_VERSION,i.toString())}qli(t){const i=t.deviceOs||J6(self);i&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_OS,i);const e=t.deviceOsVersion||t8(self);e&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DEVICE_OS_VERSION,e.toString())}gn(){ed.connection&&ed.connection.removeEventListener&&ed.connection.removeEventListener("change",this.Xli)}constructor(t,e){this.empClient=t,this.agama=e,this.Xli=()=>{const t=i.qit;switch(t){case"wifi":this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DATA_CONNECTION_TYPE,"wlan");break;case"ethernet":this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DATA_CONNECTION_TYPE,t);break;case"cellular":const e=function(t){switch(t){case"3g":return"mobile/3G";case"4g":return"mobile/4G";default:return}}(i.Hit);e&&this.empClient.setDeviceMetadata(this.agama.DeviceMetadata.DATA_CONNECTION_TYPE,e)}}}};var L8,ys;Z(function(t){return i=>class extends i{Nf(t){this.Kli&&this.Kli.fU(),super.Nf(t)}gn(){this.Kli&&this.Kli.gn(),super.gn()}constructor(i,e){super(i,e),this.eU=new t,this.Kli=new SD(this,this.eU,e)}}}(class extends _D{v_(t){this.Jli=t,this.$li&&(this.eU=function(t,i){const e=function(t,i){switch(i){case"info":return t.LogLevel.INFO;case"debug":return t.LogLevel.DEBUG;case"warning":return t.LogLevel.WARNING;case"error":return t.LogLevel.ERROR;default:return t.LogLevel.FATAL}}(i,t.logLevel);i.setLogLevel(e);const s=new i.EMPClient(t.config);return function(t,i){return t.setExternalConfig(i.config),t}(s,t)}(t,this.$li),this.eU&&(this.tfi=new b8(this.eU,this.$li),this.bo=!0))}TQ(){return this.$li||console.warn("Please load the Agama Library (empclient.min.js) in order to use the integration"),!!this.$li}yQ(){return this.bo}KU(t,i){if(this.eU&&this.$li)switch(t){case Ua.vR:this.eU.setMeasurement(this.$li.Measurement.BUFFER_LENGTH,i);break;case Ua.mR:this.eU.setMeasurement(this.$li.Measurement.BYTES_RECEIVED,i);break;case Ua.yR:this.eU.setMeasurement(this.$li.Measurement.SEGMENT_PROFILE_BITRATE,i);break;case Ua.MR:this.eU.setMeasurement(this.$li.Measurement.VIDEO_PROFILE_BITRATE,i);break;case Ua.pR:this.eU.setMeasurement(this.$li.Measurement.SEGMENT_READ_BITRATE,i);break;case Ua.fR:this.eU.setMeasurement(this.$li.Measurement.HTTP_REQUEST_STATUS_CODE_1XX,i);break;case Ua._R:this.eU.setMeasurement(this.$li.Measurement.HTTP_REQUEST_STATUS_CODE_2XX,i);break;case Ua.gR:this.eU.setMeasurement(this.$li.Measurement.HTTP_REQUEST_STATUS_CODE_3XX,i);break;case Ua.wR:this.eU.setMeasurement(this.$li.Measurement.HTTP_REQUEST_STATUS_CODE_4XX,i);break;case Ua.AR:this.eU.setMeasurement(this.$li.Measurement.HTTP_REQUEST_STATUS_CODE_5XX,i);break;case Ua.DR:this.eU.setMeasurement(this.$li.Measurement.PLAYBACK_POSITION,i);break;case Ua.SR:this.eU.setMeasurement(this.$li.Measurement.NUMBER_OF_FRAMES_DECODED,i);break;case Ua.NR:this.eU.setMeasurement(this.$li.Measurement.NUMBER_OF_FRAMES_DROPPED,i)}}CU(t,i){if(this.eU&&this.$li)switch(t){case Vo.kR:this.eU.setSessionMetadata(this.$li.SessionMetadata.ASSET_DURATION,i);break;case Vo.LR:this.eU.setSessionMetadata(this.$li.SessionMetadata.MANIFEST_URI,i);break;case Vo.xR:this.eU.setSessionMetadata(this.$li.SessionMetadata.NUMBER_OF_CONTENT_PROFILES,i);break;case Vo.zR:this.eU.setSessionMetadata(this.$li.SessionMetadata.SERVICE_NAME,i);break;case Vo.OR:this.eU.setSessionMetadata(this.$li.SessionMetadata.CDN,i);break;case Vo.jR:this.eU.setSessionMetadata(this.$li.SessionMetadata.CONTENT_TITLE,i);break;case Vo.PR:this.eU.setSessionMetadata(this.$li.SessionMetadata.CONTENT_TYPE,i);break;case Vo.RR:this.eU.setSessionMetadata(this.$li.SessionMetadata.CONTENT_DESCRIPTION,i)}}NQ(){this.tfi&&this.Jli&&this.tfi.NQ(this.Jli)}MQ(t,i){this.$li&&this.eU&&(this.hQ(),function(t,i,e,s){const n=DD(t,e,s);i.abrSession(n,t.ViewState.INITIAL_BUFFERING)}(this.$li,this.eU,t,i),this.ifi=!0)}gn(){this.tfi&&this.tfi.gn(),this.efi(uD.UR),this.eU=void 0}vU(t){this.sfi(t)}yU(t,i){this.eU&&this.eU.event(t.code,i)}hQ(){this.eU&&this.ifi&&(this.eU.exitSession(),this.ifi=!1)}efi(t){if(this.eU&&this.$li&&(this.hQ(),t===uD.UR))this.eU.shutdown(this.$li.ShutdownType.NORMAL_SHUTDOWN)}mU(t,i,e){this.sfi(t,i,e)}sfi(t,i,e){if(this.eU&&this.$li)switch(t){case sl.Rw:this.nfi(this.$li.ViewState.PLAYING,i,e);break;case sl.cR:this.nfi(this.$li.ViewState.FAILED,i,e);break;case sl.dR:this.nfi(this.$li.ViewState.INITIAL_BUFFERING,i,e);break;case sl.Qw:this.nfi(this.$li.ViewState.PAUSED,i,e);break;case sl.aR:this.nfi(this.$li.ViewState.SEEK,i,e);break;case sl.uR:this.nfi(this.$li.ViewState.STALLED,i,e);break;case sl.lR:this.nfi(this.$li.ViewState.NO_ACCESS,i,e)}}nfi(t,i,e){if(this.eU)if(i){const s=function(t){return t||""}(e);this.eU.viewStateExtended(t,i.code,s)}else this.eU.viewStateChanged(t)}constructor(){super(),this.bo=!1,this.ifi=!1,this.$li=Qr.Agama}}),Zo.S7),function(t){t.PLAY_ALL="play-all",t.PLAY_NONE="play-none",t.PLAY_LAST="play-last"}(L8||(L8={})),function(t){t.VOD="vod",t.LIVE="live"}(ys||(ys={}));var k8=class{get va(){return this.rfi.va}get lt(){return this.xz}get bf(){return this.Oz}hfi(t){this.xz=Zr(t),this.Oz=t,this.Qo.Co(new fh(t))}ga(t){this.ofi.tr(),this.afi.Ub(),this.ufi=!1,this.Qo.cfi(t)}async ctt(t,i){if(this.dfi.tr(),this.ufi=!1,!t||!function(t){return t.sources.some((t=>t.integration===te.VERIZON_MEDIA))}(t))return await this.Qo.lfi(t,i);try{this.ffi=await this._fi.Pai(t),await this.Qo.lfi(this.ffi,i)}catch(t){this.hfi(new $i(td.MANIFEST_LOAD_ERROR,t.message,t))}}gn(){this.B2.Xd(),this.gfi.Xd(),this.Qo.fn(Co.Hg,this.Ihi),this.Qo.fn(Co.jh,this.dri),this.Qo.fn(Co.Iw,this.e9t),this.Qo.fn(Co.Jg,this.Ahi),this.Qo.fn(Zt.zw,this.jd);for(const t of this.ofi.VGt.Gu)t.fn("wfi",this.Afi),t.fn("W7",this.yhi),t.fn("V7",this.Mhi);this.ofi.VGt.fn("F7",this.vfi),this.ofi.VGt.fn("Q7",this.mfi),this.ofi.gn(),this.SWt&&(this.SWt.Qd(),this.SWt=void 0),this.ufi=!1}async fetchAssetInfo(t){if(t&&t.integrationData)try{const i=await this.pfi.Syt(t.integrationData.source.prefix,t.integrationData.source.id,this.gfi.Hd,t.integrationData.preplayResponse.sid);this.rfi.yfi(i),this.afi.Mfi(i,this.ofi.VGt.Gu)}catch(t){0}}Tfi(t){this.ofi.Nfi(t),this.ofi.x7.forEach((i=>i.Dfi(t))),this.ofi.Sfi(this.Qo.i_()),this.DWt()}Nf(t){this.ofi.j7||(this.B2.Xd(),this.B2=new er,Ys(this.j5t(t,this.B2.Hd)))}async j5t(t,i){if(fo(i),t<this.Qo.Tf())return void this.Ifi(t);let e=[];switch(this.ofi.Efi){case L8.PLAY_ALL:e=this.ofi.bfi(this.Qo.Tf(),t),await this.Lfi(t,e,i);break;case L8.PLAY_LAST:const s=this.ofi.bfi(this.Qo.Tf(),t).pop();e=s?[s]:[],await this.Lfi(t,e,i);break;case L8.PLAY_NONE:this.kfi(t)}}Ifi(t){const i=Po(this.ofi.VGt.Gu,(i=>i.bht.gr(t)));i?this.Qo.Cfi(i.RT):this.Qo.Cfi(t)}kfi(t){const i=this.ofi.bfi(this.Qo.Tf(),t).pop();i&&i.bht.gr(t)?this.Qo.Cfi(i.UT):this.Qo.Cfi(t)}async Lfi(t,i,e){for(const t of i)await this.xfi(t,e);const s=i[i.length-1];s&&s.bht.gr(t)?this.Qo.Tf()<t&&this.Qo.Cfi(s.UT):this.Qo.Cfi(t)}async xfi(t,i){t.fn("wfi",this.Afi);const e=Promise.race([t.df("V7",i),t.df("wfi",i)]);this.Tfi(this.Qo.Tf()),t.ro||this.Qo.Cfi(t.RT),await e,t.yn("wfi",this.Afi)}DWt(){const t=Po(this.ofi.x7,(t=>t.Ofi.length>0));if(t){const i=t.Ofi[0];this.SWt||(this.SWt=new jJ(this.Qo.we),this.SWt.yn("clickstart",this.jfi)),this.SWt.OVt=i}else this.SWt&&(this.SWt.Qd(),this.SWt=void 0)}constructor(t,i,e,s,n,r,h){this.Qo=t,this.dfi=i,this._fi=e,this.ofi=s,this.rfi=n,this.pfi=r,this.afi=h,this.xz=void 0,this.Oz=void 0,this.B2=new er,this.gfi=new er,this.zfi=void 0,this.ufi=!1,this.SWt=void 0,this.Ihi=t=>{const i=t.currentSource;if(!i||!i.integrationData)return;const{preplayResponse:e,source:s}=i.integrationData;this.rfi.Pfi(e),e&&e.type===ys.VOD&&e.ads&&this.ofi.Mfi(e.ads),this.dfi.Bfi=i.integrationData,s.assetInfo&&Ys(this.fetchAssetInfo(i))},this.dri=()=>{this.ufi=!0},this.e9t=()=>{this.ufi&&this.Tfi(this.Qo.Tf())},this.Ahi=()=>{this.ufi&&(this.Tfi(1/0),this.ufi=!1)},this.jd=()=>{Ys(this.dfi.Cn())},this.Afi=t=>{this.B2.Xd(),this.B2=new er,Ys(this.j5t(t.Xl.UT,this.B2.Hd))},this.yhi=()=>{1!==this.Qo.Gf&&(this.zfi=this.Qo.Gf,this.Qo.Gf=1)},this.Mhi=()=>{void 0!==this.zfi&&(this.Qo.Gf=this.zfi,this.zfi=void 0)},this.vfi=t=>{t.Xl.yn("wfi",this.Afi),t.Xl.yn("W7",this.yhi),t.Xl.yn("V7",this.Mhi)},this.mfi=t=>{t.Xl.fn("wfi",this.Afi),t.Xl.fn("W7",this.yhi),t.Xl.fn("V7",this.Mhi)},this.jfi=()=>{this.Qo.m_()},this.Qo.yn(Co.Hg,this.Ihi),this.Qo.yn(Co.jh,this.dri),this.Qo.yn(Co.Iw,this.e9t),this.Qo.yn(Co.Jg,this.Ahi),this.Qo.yn(Zt.zw,this.jd),this.ofi.VGt.yn("F7",this.vfi),this.ofi.VGt.yn("Q7",this.mfi)}};var C8,x8=Vr({breaksIndex:sh,adsIndex:sh,startTime:sh,endTime:sh}),O8=Vr({index:sh,timeOffset:sh}),j8=Vr({duration:sh,apiFramework:ai(Ps,GT),creative:Ps,mimeType:Ps,width:sh,height:sh,companions:ht(function(t){return new JT(t)}((()=>j8))),extensions:ai(ln,ht(YT)),fw_parameters:ai(ln,mr(Ps)),events:mr(ht(Ps))}),z8=Vr({type:z(["linear","nonlinear"]),position:z(["preroll","midroll","postroll","pause","overlay",""]),timeOffset:sh,duration:sh,ads:ht(j8),events:mr(ht(Ps))}),P8=Vr({breaks:ht(z8),breakOffsets:ht(O8),placeholderOffsets:ht(x8)}),B8=Vr({fairplayCertificateURL:ai(ln,Ps),widevineLicenseURL:ai(ln,Ps),playreadyLicenseURL:ai(ln,Ps)}),R8={type:z(HT(ys)),playURL:Ps,prefix:Ps,sid:Ps,drm:ai(ln,B8)},U8=Vr(Tt({},R8,{type:z([ys.VOD]),ads:P8,interstitialURL:ai(Ps,GT,ln)})),Q8=ai(U8,Vr(Tt({},R8,{type:z([ys.LIVE])}))),F8=Ps,Y8=Vr({userId:Ps,externalId:ai(Ps,ht(Ps))});!function(t){t[t.AD_IMPRESSIONS=1]="AD_IMPRESSIONS",t[t.FW_VIDEO_VIEWS=2]="FW_VIDEO_VIEWS",t[t.LINEAR_AD_DATA=4]="LINEAR_AD_DATA"}(C8||(C8={}));var G8=class{async Syt(t){try{return this.Rfi(t)}catch(t){throw t}}async Rfi(t){const e=await async function(t){const e=t.prefix,s=V8[t.assetType],n=function(t){if(ht(F8).Nj(t))return 1===t.length?t[0]:t.join(",")+"/multiple";if(F8.Nj(t))return t;if(Y8.Nj(t)&&$(t.externalId))return 1===t.externalId.length?"ext/"+t.userId+"/"+t.externalId[0]:"ext/"+t.userId+"/"+t.externalId.join(",")+"/multiple";if(Y8.Nj(t))return"ext/"+t.userId+"/"+t.externalId;throw new b("Invalid asset id")}(t.id),r=await async function(t){if(t&&await i.xC())return{rmt:"fps",manifest:"m3u8"};if(t&&await i.EC())return{rmt:"wv",manifest:"mpd"};if(t&&await i.kC())return{rmt:"pr",manifest:"mpd"};return{}}(t.contentProtected),h=function(t,i){const e=W8(t,i);return e?{"ad.cping":"1","ad.pingf":String(e)}:{}}(t.assetType,t.ping);let o={};$(t.preplayParameters)?t.preplayParameters.forEach((t=>{o[t[0]]=t[1]})):o=t.preplayParameters;const a=e+"/preplay/"+s+n+".json";return Ra(a,Tt({v:"2"},o,r,h,o))}(t),s=this.mI.MS({oI:G.GET,zu:e,aI:dm.RS}),n=await s,r=Tt({},await n.Om(),{type:t.assetType===Pa.ASSET?ys.VOD:ys.LIVE});return Q8.Nj(r)||Q8.Sj(r,"PreplayResponse"),r}constructor(t){this.mI=t}},V8={[Pa.ASSET]:"",[Pa.CHANNEL]:"channel/",[Pa.EVENT]:"event/"};function W8(t,i){const e=t!==Pa.ASSET;return(!e&&i.adImpressions?1:0)+(!e&&i.freeWheelVideoViews?2:0)+(e&&i.linearAdData?4:0)}var H8,q8=Vr({ad_id:Ps,apiFramework:ai(GT,Ps),companions:ht(YT),creative:Ps,duration:sh,mimeType:Ps,height:sh,width:sh,extensions:ai(ln,ht(YT)),fw_parameters:ai(ln,mr(Ps))}),X8=Vr({breakId:Ps,ads:ht(q8),type:z(["linear","nonlinear"]),position:z(["preroll","midroll","postroll","pause","overlay",""]),timeOffset:sh,duration:sh,height:ai(ln,sh),width:ai(ln,sh),events:mr(ht(Ps))}),Z8=Vr({breaks:ht(X8)}),K8=Vr({next_time:sh,ads:ai(ln,Z8),extensions:ai(ln,ht(YT)),error:ai(ln,Ps),currentBreakEnd:ai(ln,sh)});!function(t){t.kyt="start",t.aR="seek"}(H8||(H8={}));var J8=class{async Syt(t,i){try{return this.Rfi(t,i)}catch(t){throw t}}async Rfi(t,i){const e=function(t){const i={v:"3",pt:String(t.currentTime)};(function(t){return void 0!==t.seekTime})(t)&&t.hasFreeWheelVideoViews&&(i.ft=String(t.seekTime));t.event&&(i.ev=t.event);return Ra(t.zonePrefix+"/session/ping/"+t.sessionId+".json",Tt({},i))}(t),s=this.mI.MS({oI:G.GET,zu:e,aI:dm.RS,Hd:i}),n=await s,r=await n.Om();return K8.Nj(r)||K8.Sj(r,"PingResponse"),r}constructor(t){this.mI=t}};var $8=class extends Ao{get NS(){return this.DS}fa(){return new t9(this.DS)}constructor(t){super("Ufi"),this.DS=t}},t9=class extends Yi{constructor(t){super("pingresponse"),this.response=t}},i9=class extends Ao{get lt(){return this.xz}fa(){return new e9(this.xz)}constructor(t){super("Qfi"),this.xz=t}},e9=class extends Yi{constructor(t){super("pingerror"),this.error=t}},s9=class extends Bo{set Bfi(t){this.Ffi=t}get Yfi(){return this.Gfi}async Cn(){const t=this.Ffi;if(!t)return;0!==W8(t.source.assetType,t.source.ping)&&(this.Gfi=this.Qo.i_().start(0),await this.Vfi(H8.kyt),this.Qo.yn("timeupdate",this.Wfi),this.Qo.yn("seeking",this.Hfi))}async Vfi(t,i){const e=this.Ffi.preplayResponse,s={};if(S(this.Gfi))return void 0;if(Dd(this.qfi)&&Cd(this.qfi,this.Qo.Tf()-this.Gfi))return;void 0!==i&&(s.seekTime=i),void 0!==t&&(s.event=t);let n,r=this.Qo.Tf()-this.Gfi;t===H8.kyt?r=0:t!==H8.aR&&this.Xfi&&(r=_.min(r,this.Xfi)),this.qfi=r;try{var h;const t=await this.Zfi.Syt(Tt({zonePrefix:e.prefix,sessionId:e.sid,currentTime:r,hasFreeWheelVideoViews:null==(h=this.Ffi)?void 0:h.source.ping.freeWheelVideoViews},s),this.Ax.Hd);this.Co(new $8(t)),this.Xfi=-1!==t.next_time?t.next_time:void 0,n=t.error}catch(t){Mi(t)||(n=t.message)}finally{n&&this.Co(new i9(n))}}tr(){this.Xfi=void 0,this.Ffi=void 0,this.Gfi=NaN,this.Kfi=!1,this.Jfi=NaN,this.qfi=void 0,this.Qo.fn("seeking",this.Hfi),this.Qo.fn("timeupdate",this.Wfi),this.$fi()}$fi(){this.Ax.Xd(),this.Ax=new er}gn(){this.tr()}constructor(t,i){super(),this.Zfi=t,this.Qo=i,this.Gfi=NaN,this.Xfi=void 0,this.Kfi=!1,this.Jfi=NaN,this.Ax=new er,this.qfi=void 0,this.Wfi=async()=>{const t=this.Qo.Tf();if(this.Jfi=t,this.Kfi||Sa(this.Xfi)||S(this.Gfi))return;this.Gfi+this.Xfi<=t&&(this.Kfi=!0,await this.Vfi(),this.Kfi=!1)},this.Hfi=()=>{if(this.Qo.Tf()===this.Gfi)return;this.Kfi&&this.$fi(),this.Jfi=this.Qo.Tf();const t=this.Jfi-(this.Gfi||0);S(t)?Ys(this.Vfi(H8.aR,0)):Ys(this.Vfi(H8.aR,t))}}},n9=class{async Pai(t){const i=[];for(const e of t.sources)if(r9(e))try{const s=o9({source:e,preplayResponse:await this.t_i.Syt(e)},t,this.TH);s.src&&(s.src=Ra(s.src,e.playbackUrlParameters)),i.push(s)}catch(t){0}else i.push(e);if(0!==t.sources.length&&0===i.length)throw new g("Fatal: unable to play VerizonMediaSources.");return Tt({},t,{sources:i})}constructor(t,i){this.t_i=t,this.TH=i}};function r9(t){return"verizon-media"===t.integration}function h9(t){if(t.sources)if($(t.sources)){for(const i of t.sources)if(!Qs(i)&&"verizon-media"===i.integration)return!0}else if(!Qs(t.sources))return"verizon-media"===t.sources.integration;return!1}function o9(t,i,e){const s=t.preplayResponse;let n;t.source.contentProtected&&s.drm&&(n={integration:"uplynk"},s.drm.fairplayCertificateURL&&(n.fairplay={certificateURL:s.drm.fairplayCertificateURL}),s.drm.widevineLicenseURL&&(n.widevine={licenseAcquisitionURL:s.drm.widevineLicenseURL}),s.drm.playreadyLicenseURL&&(n.playready={licenseAcquisitionURL:s.drm.playreadyLicenseURL}));const r=Jg({src:s.playURL,contentProtection:n,useNativePlayback:t.source.useNativePlayback,hls:t.source.hls,dash:t.source.dash,seamlessSwitchStrategy:t.source.seamlessSwitchStrategy},i,e);return r.integrationData=t,r}var a9=class extends Ao{fa(){return new u9(this.Xl.va)}constructor(t,i){super("W7"),this.Xl=t,this.nD=i}},u9=class extends Yi{constructor(t){super("adbreakbegin"),this.adBreak=t}},c9=class extends Ao{fa(){return new d9(this.Xl.va)}constructor(t,i){super("V7"),this.Xl=t,this.nD=i}},d9=class extends Yi{constructor(t){super("adbreakend"),this.adBreak=t}},l9=class extends Ao{fa(){return new f9(this.Xl.va)}constructor(t){super("wfi"),this.Xl=t}},f9=class extends Yi{constructor(t){super("adbreakskip"),this.adBreak=t}};var _9=class extends Ao{fa(){return new g9(this.Xl.va)}constructor(t){super("Hqt"),this.Xl=t}},g9=class extends Yi{constructor(t){super("updateadbreak"),this.adBreak=t}},w9=class extends Ut{get va(){return this.Xa||(this.Xa=function(t){let i;const e={get startTime(){return t.RT},get endTime(){return t.UT},get duration(){return t.ct},get ads(){return t.Oc.va},get skipOffset(){return t.pQt},set skipOffset(i){t.pQt=i},addEventListener(t,e){i.yn(t,e)},removeEventListener(t,e){i.fn(t,e)}};return i=new ka(t,e),e}(this)),this.Xa}get RT(){return this.XT}get UT(){return this.UL?this.XT+this.UL:void 0}i_i(t){this.UL=t-this.RT;for(const i of this.Oc.Gu)i.RT>t&&this.Oc.TT(i);this.Co(new _9(this))}get ct(){return this.UL}get bht(){const t=this.UT;return Dd(t)?new ce([this.RT,t]):ce.MB()}get Oc(){return this.Ic}get e_i(){return this.s_i}get ro(){return this.ho}get pQt(){return this.wui?-1:this.yQt}set pQt(t){this.wui||(this.yQt=t)}Jot(t){return t>=this.RT&&(Sa(this.ct)||t<=this.RT+this.ct)}n_i(t){return-1!==this.pQt&&(!!Dd(this.UT)&&t-this.RT>=this.pQt)}Vm(){this.Ic.Gu.forEach((t=>t.Vm())),this.Co(new l9(this))}r_i(t){const i=Dd(this.UT)&&t>=this.UT,e=this.RT<=t&&!i&&!this.ro,s=this.ro&&this.UT&&t>=this.UT;e&&(this.ho=!0,this.Co(new a9(this,this.RT))),this.Ic.Gu.forEach((i=>i.r_i(t))),s&&(this.s_i=!0,this.ho=!1,this.Co(new c9(this,this.UT)))}constructor(t,i,e,s,n){super(),this.XT=t,this.UL=i,this.Ic=e,this.wui=s,this.ho=!1,this.s_i=!1,this.yQt=n}},A9=class extends Ao{fa(){return new v9(this.Y7.va)}constructor(t,i){super("H7"),this.Y7=t,this.nD=i}},v9=class extends Yi{constructor(t){super("adbegin"),this.ad=t}},m9=class extends Ao{fa(){return new p9(this.Y7.va)}constructor(t,i){super("q7"),this.Y7=t,this.nD=i}},p9=class extends Yi{constructor(t){super("adend"),this.ad=t}},y9=class extends Ao{fa(){return new M9(this.Y7.va)}constructor(t){super("h_i"),this.Y7=t}},M9=class extends Yi{constructor(t){super("removead"),this.ad=t}},Gc=class extends S0{F4t(t){}W4t(t){this.Co(new y9(t))}constructor(){super()}},T9=class extends Ao{fa(){return new N9(this.Y7.va)}constructor(t){super("Xqt"),this.Y7=t}},N9=class extends Yi{constructor(t){super("adfirstquartile"),this.ad=t}},D9=class extends Ao{fa(){return new S9(this.Y7.va)}constructor(t){super("Zqt"),this.Y7=t}},S9=class extends Yi{constructor(t){super("admidpoint"),this.ad=t}},I9=class extends Ao{fa(){return new E9(this.Y7.va)}constructor(t){super("Kqt"),this.Y7=t}},E9=class extends Yi{constructor(t){super("adthirdquartile"),this.ad=t}},b9=class extends Ao{fa(){return new L9(this.Y7.va)}constructor(t){super("o_i"),this.Y7=t}},L9=class extends Yi{constructor(t){super("adcomplete"),this.ad=t}};var k9,C9,x9,O9=class t extends Ut{static a_i(i,e){return new t(i,e.duration,e.apiFramework||"",e.creative,e.mimeType,e.width,e.height,e.companions.map((e=>t.a_i(i,e))),e.extensions,e.fw_parameters,e.events,void 0)}static u_i(i,e){return new t(i,e.duration,e.apiFramework||"",e.creative,e.mimeType,e.width,e.height,e.companions.map((e=>t.u_i(i,e))),e.extensions,e.fw_parameters,void 0,e.ad_id)}get va(){return this.Xa||(this.Xa=function(t){let i;const e={get apiFramework(){return t.xUt},get companions(){return t.TUt.va},get creative(){return t.c_i},get duration(){return t.ct},get endTime(){return t.UT},get events(){return t.IF},get extensions(){return t.d_i},get freeWheelParameters(){return t.l_i},get height(){return t.Ti},get mimeType(){return t.SF},get startTime(){return t.RT},get width(){return t.ji},addEventListener(t,e){i.yn(t,e)},removeEventListener(t,e){i.fn(t,e)}};return i=new ka(t,e),e}(this)),this.Xa}get RT(){return this.XT}get UT(){return this.XT+this.UL}get ct(){return this.UL}get xUt(){return this.OUt}get c_i(){return this.f_i}get SF(){return this.QF}get ji(){return this.nk}get Ti(){return this.rk}get IF(){return this.FB}get TUt(){return this.NUt}get d_i(){return this.__i}get l_i(){return this.g_i}get ro(){return this.ho}get Ofi(){var t;return null!=(t=this.FB.clickthroughs)?t:[]}r_i(t){const i=this.RT<=t&&t<this.UT,e=i&&!this.ro,s=!i&&this.ro;e&&(this.w_i=!1,this.A_i=!1,this.v_i=!1,this.m_i=!1,this.ho=!0,this.Co(new A9(this,this.RT))),s&&(this.ho=!1,this.Co(new m9(this,this.UT)))}Dfi(t){const i=(t-this.RT)/this.ct;!this.w_i&&i>=.25&&(this.w_i=!0,this.Co(new T9(this))),!this.A_i&&i>=.5&&(this.A_i=!0,this.Co(new D9(this))),!this.v_i&&i>=.75&&(this.v_i=!0,this.Co(new I9(this))),!this.m_i&&i>=.9999&&(this.m_i=!0,this.Co(new b9(this)))}Vm(){this.w_i=!0,this.A_i=!0,this.v_i=!0,this.m_i=!0}gn(){this.fn("H7",this.p_i),this.fn("q7",this.y_i)}constructor(t,i,e,s,n,r,h,o,a=[],u={},c={},d){super(),this.XT=t,this.UL=i,this.OUt=e,this.f_i=s,this.QF=n,this.nk=r,this.rk=h,this.__i=a,this.g_i=u,this.FB=c,this.uQt=d,this.NUt=new Gc,this.ho=!1,this.w_i=!1,this.A_i=!1,this.v_i=!1,this.m_i=!1,this.p_i=()=>this.Dfi(this.XT),this.y_i=()=>this.Dfi(this.UT),this.NUt.Y4t(o),this.yn("H7",this.p_i),this.yn("q7",this.y_i)}},j9=class extends Ao{fa(){return new z9(this.Xl.va)}constructor(t){super("F7"),this.Xl=t}},z9=class extends Yi{constructor(t){super("addadbreak"),this.adBreak=t}},P9=class extends Ao{fa(){return new B9(this.Xl.va)}constructor(t){super("Q7"),this.Xl=t}},B9=class extends Yi{constructor(t){super("removeadbreak"),this.adBreak=t}},R9=class extends S0{F4t(t){this.Co(new j9(t))}W4t(t){this.Co(new P9(t))}constructor(){super()}},U9=class{get va(){return this.Xa||(this.Xa=function(t){return{get adBreaks(){return t.VGt.va},get currentAdBreak(){if(t.j7)return t.j7.va},get currentAds(){return t.j7?t.j7.Oc.va:(new Gc).va},skip(){t.Vm()}}}(this)),this.Xa}get VGt(){return this.AVt}get j7(){return Po(this.AVt.Gu,(t=>t.ro))}get x7(){return this.j7?this.j7.Oc.Gu.filter((t=>t.ro)):[]}get M_i(){if(0===this.VGt.U||0===this.T_i.i_().length)return;const t=this.T_i.i_().end(this.T_i.i_().length-1);return Po(this.VGt.Gu,(i=>i.Jot(t)))}get Efi(){return this.N_i}Sfi(t){if(0===t.length)return;const i=ce.xn(t);for(const t of this.AVt.Gu.slice())Dd(t.UT)&&i.Cn(0)>t.UT&&this.AVt.TT(t)}Mfi(t){const i=!function(t){return Dd(t.breakOffsets)}(t),e=i?this.dfi.Yfi:0;for(const s of t.breaks){if(0===s.ads.length)continue;let t=s.timeOffset+e;const n=new Gc;let r=0;for(const e of s.ads){const s=i?O9.u_i(t,e):O9.a_i(t,e);n.MT(s),t+=s.ct,r+=s.ct}const h=s.timeOffset+e,o=i?void 0:s.duration,a=new w9(h,o,n,i,this.D_i);i&&this.S_i.push({fUt:a,_It:h+r}),this.AVt.MT(a)}}I_i(t){const i=this.M_i;i&&i.i_i(t+this.dfi.Yfi)}Nfi(t){this.E_i=t,this.AVt.Gu.forEach((i=>i.r_i(t)))}Vm(){const t=this.E_i,i=this.j7;t&&i&&i.n_i(t)&&i.Vm()}bfi(t,i){let e=[];for(const s of this.VGt.Gu)!s.e_i&&s.RT>=t&&s.RT<i&&e.push(s);return e}gn(){this.T_i.fn("timeupdate",this.b_i),this.dfi.fn("Ufi",this.L_i)}tr(){for(const t of this.VGt.Gu){for(const i of t.Oc.Gu)i.Vo();t.Vo()}this.VGt.Ub(),this.E_i=void 0,this.S_i=[]}constructor(t,i,e,s){this.S_i=[],this.L_i=t=>{t.NS.ads&&this.Mfi(t.NS.ads),t.NS.currentBreakEnd&&this.I_i(t.NS.currentBreakEnd)},this.b_i=t=>{if(0===this.S_i.length||0===this.T_i.i_().length)return;const i=this.T_i.i_().end(this.T_i.i_().length-1);for(const t of this.S_i.slice())Dd(t.fUt.ct)?_s(this.S_i,t):t._It<i&&(t.fUt.i_i(t._It),_s(this.S_i,t))},this.T_i=t,this.dfi=i,this.AVt=new R9,this.D_i=e,this.N_i=s,t.yn("timeupdate",this.b_i),this.dfi.yn("Ufi",this.L_i)}};!function(t){t[t.NOT_AVAILABLE=-1]="NOT_AVAILABLE",t[t.NOT_APPLICABLE=0]="NOT_APPLICABLE",t[t.G=1]="G",t[t.PG=2]="PG",t[t.PG_13=3]="PG_13",t[t.R=4]="R",t[t.NC_17=5]="NC_17",t[t.X=6]="X",t[t.NOT_RATED=7]="NOT_RATED"}(k9||(k9={})),function(t){t[t.NOT_AVAILABLE=-1]="NOT_AVAILABLE",t[t.NOT_APPLICABLE=0]="NOT_APPLICABLE",t[t.TV_Y=1]="TV_Y",t[t.TV_Y7=2]="TV_Y7",t[t.TV_G=3]="TV_G",t[t.TV_PG=4]="TV_PG",t[t.TV_14=5]="TV_14",t[t.TV_MA=6]="TV_MA",t[t.NOT_RATED=7]="NOT_RATED"}(C9||(C9={})),function(t){t[t.ADULT_LANGUAGE=1]="ADULT_LANGUAGE",t[t.SEXUAL_SITUATIONS=2]="SEXUAL_SITUATIONS",t[t.VIOLENCE=4]="VIOLENCE",t[t.DRUGS=8]="DRUGS"}(x9||(x9={}));var Q9=class t{static k_i(i,e,s){const n=new ws(i.rating_flags);return new t(e,s,i.duration,Boolean(i.audio_only),i.boundary_details,Boolean(i.error),i.tv_rating,i.max_slice,i.thumb_prefix,i.slice_dur,i.movie_rating,i.owner,i.meta,i.rates,i.thumbs,i.poster_url,i.default_poster_url,i.desc,n.Em(1),n.Em(2),n.Em(4),n.Em(8),i.external_id,Boolean(i.is_ad),i.asset)}get va(){return this.Xa||(this.Xa=function(t){return{startTime:t.RT,endTime:t.UT,duration:t.ct,audioOnly:t.C_i,boundaryDetails:t.x_i,error:t.lt,tvRating:t.O_i,maxSlice:t.j_i,thumbPrefix:t.z_i,sliceDuration:t.P_i,movieRating:t.B_i,ownerId:t.R_i,metadata:t.GD,rates:t.U_i,thumbnailResolutions:t.Q_i,posterUrl:t.F_i,defaultPosterUrl:t.Y_i,description:t.Kp,hasAdultLanguage:t.G_i,hasSexualSituations:t.V_i,hasViolence:t.W_i,hasDrugSituations:t.H_i,externalId:t.q_i,isAd:t.X_i,assetId:t.Z_i}}(this)),this.Xa}constructor(t,i,e,s,n,r,h,o,a,u,c,d,l,f,_,g,w,A,v,m,p,y,M,T,N){this.RT=t,this.UT=i,this.ct=e,this.C_i=s,this.x_i=n,this.lt=r,this.O_i=h,this.j_i=o,this.z_i=a,this.P_i=u,this.B_i=c,this.R_i=d,this.GD=l,this.U_i=f,this.Q_i=_,this.F_i=g,this.Y_i=w,this.Kp=A,this.G_i=v,this.V_i=m,this.W_i=p,this.H_i=y,this.q_i=M,this.X_i=T,this.Z_i=N}};var F9=Vr({duration:sh,offset:sh}),Y9=Vr({c3:F9}),G9=Vr({c7:F9}),V9=Vr({halftime:F9}),W9=z(HT(C9)),H9=z(HT(k9)),q9=Vr({width:ai(ln,sh),prefix:Ps,bw:sh,bh:sh,height:ai(ln,sh)}),X9=Vr({audio_only:sh,boundary_details:ai(ln,ht(ai(Y9,G9,V9))),error:sh,tv_rating:W9,max_slice:sh,thumb_prefix:Ps,slice_dur:sh,movie_rating:H9,owner:Ps,meta:YT,rates:ht(sh),thumbs:ht(q9),poster_url:Ps,duration:sh,default_poster_url:Ps,desc:Ps,rating_flags:sh,external_id:Ps,is_ad:sh,asset:Ps}),Z9=class{async Syt(t,i,e,s){const n=function(t,i,e){if(F8.Nj(i))return[K9(t,i,e)];if(ht(F8).Nj(i))return i.map((i=>K9(t,i,e)));if(Y8.Nj(i)){return($(i.externalId)?i.externalId:[i.externalId]).map((s=>K9(t,"ext/"+i.userId+"/"+s,e)))}throw new b("Invalid asset id")}(t,i,s),r=n.map((t=>Wu((()=>this.Rfi(t)),e)));return(await Promise.all(r)).filter(Dd)}async Rfi(t){const i=this.mI.MS({oI:G.GET,zu:t,aI:dm.RS}),e=await i,s=await e.Om();return X9.Nj(s)||X9.Sj(s,"AssetInfoResponse"),s}constructor(t){this.mI=t}};function K9(t,i,e){return e?t+"/player/assetinfo/"+i+".json?pbs="+e:t+"/player/assetinfo/"+i+".json"}var Kr,J9=class extends Ao{fa(){return new $9(this.sd.va)}constructor(t){super("K_i"),this.sd=t}},$9=class extends Yi{constructor(t){super("removeasset"),this.asset=t}},t7=class extends Ao{fa(){return new i7(this.sd.va)}constructor(t){super("J_i"),this.sd=t}},i7=class extends Yi{constructor(t){super("addasset"),this.asset=t}},e7=class extends S0{Mfi(t,i){let e,s=0;for(const n of t){e=s+n.duration;for(const t of i)s<=t.RT&&t.RT<e&&(e+=t.ct||0);this.MT(Q9.k_i(n,s,e)),s=e}}F4t(t){this.Co(new t7(t))}W4t(t){this.Co(new J9(t))}constructor(){super()}},s7=class extends Ao{fa(){return new n7(this.NS)}constructor(t){super("$_i"),this.NS=t}},n7=class extends Yi{constructor(t){super("preplayresponse"),this.response=t}},r7=class extends Ao{fa(){return new h7(this.NS)}constructor(t){super("tgi"),this.NS=t}},h7=class extends Yi{constructor(t){super("assetinforesponse"),this.response=t}},o7=class extends Ut{Pfi(t){t&&this.Co(new s7(ie(t)))}yfi(t){t.forEach((t=>this.Co(new r7(t))))}get va(){return this.Xa||(this.Xa=this.fa()),this.Xa}fa(){let t;const i=this,e={get ads(){return i.ofi.va},get assets(){return i.afi.va},addEventListener(i,e){t.yn(i,e)},removeEventListener(i,e){t.fn(i,e)}};return t=new ka(i,e),e}constructor(t,i,e){super(),this.ofi=t,this.afi=i,this.dfi=e,e.yn("Ufi",this.Ds),e.yn("Qfi",this.Ds)}},a7=class{igi(t,i){const e=new G8(t.uO),s=new J8(t.uO),n=function(t){if(t.verizonMedia&&Dd(t.verizonMedia.defaultSkipOffset)){const i=t.verizonMedia.defaultSkipOffset;return bd(i)?i:-1}return-1}(i),r=function(t){const i=t.verizonMedia?t.verizonMedia.onSeekOverAd:void 0;return function(t){if(!t)return"play-none";switch(t.toLowerCase()){case"play-all":return"play-all";case"play-none":default:return"play-none";case"play-last":return"play-last"}}(i)}(i),h=new s9(s,t),o=new n9(e,i),a=new U9(t,h,n,r),u=new Z9(t.uO),c=new e7,d=new o7(a,c,h);return new k8(t,h,o,a,d,u,c)}};Z((function(t){return class extends t{cfi(t){super.ga(t)}lfi(t,i){return super.ctt(t,i)}Cfi(t){super.Nf(t)}Ef(){var t;return null!=(t=this.egi.lt)?t:super.Ef()}Lf(){var t;return null!=(t=this.egi.bf)?t:super.Lf()}Nf(t){this.egi.Nf(t)}ga(t){this.egi.ga(t)}ctt(t,i){return this.egi.ctt(t,i)}fa(){const t=this.egi.va;return vi(super.fa(),{get verizonMedia(){return t}})}gn(){this.egi.gn(),super.gn()}constructor(t,i){super(t,i),this.egi=(new a7).igi(this,i)}}}),Zo.T7),function(t){t.CREATIVE_VIEW="creativeView",t.START="start",t.FIRST_QUARTILE="firstQuartile",t.MID_POINT="midpoint",t.THIRD_QUARTILE="thirdQuartile",t.COMPLETE="complete",t.MUTE="mute",t.UNMUTE="unmute",t.PAUSE="pause",t.REWIND="rewind",t.RESUME="resume",t.FULL_SCREEN="fullscreen",t.EXIT_FULL_SCREEN="exitFullscreen",t.EXPAND="expand",t.COLLAPSE="collapse",t.ACCEPT_INVITATION_LINEAR="acceptInvitationLinear",t.ACCEPT_INVITATION="acceptInvitation",t.CLOSE_LINEAR="closeLinear",t.CLOSE="close",t.SKIP="skip",t.SKIP_SHOWN="skipShown",t.PROGRESS="progress",t.ENGAGED_VIEW="engagedView",t.IMPRESSION="impression",t.ERROR="error"}(Kr||(Kr={}));var u7=class extends bl{fa(){return cn(this)}get nYt(){return Gt.fVt}get RT(){return this.XT}get sUt(){return this.QUt}constructor(t,i,e,s){super(t,i),this.QUt=s,this.XT=e}},c7=class extends ml{get sbt(){return this.sgi}get nYt(){return Gt.fVt}constructor(t,i,e){if(super(i),this.Tqt=t,this.Nqt=t,e){const t=new Date(e);TT(t)&&(this.sgi=t)}}},d7=class{Ag(){this.Qo.yn(Zt.Rw,this.lA),this.Qo.yn(Co.Sh,this.eBt),this.Qo.yn(Co.jh,this.sBt),this.Qo.yn(Co.yw,this.We),this.Qo.yn(Co.Jg,this.Mh),this.Qo.yn(Co.Iw,this.od),this.Qo.yn(Co.Ew,this.rHt),this.Qo.yn("presentationmodechange",this.ngi)}gg(){this.Qo.fn(Zt.Rw,this.lA),this.Qo.fn(Co.Sh,this.eBt),this.Qo.fn(Co.jh,this.sBt),this.Qo.fn(Co.yw,this.We),this.Qo.fn(Co.Jg,this.Mh),this.Qo.fn(Co.Iw,this.od),this.Qo.fn(Co.Ew,this.rHt),this.Qo.fn("presentationmodechange",this.ngi)}get rgi(){return this.hgi}get x7(){const t=this.rgi;if(!t)return[];const i=[],e=this.ogi();for(const s of t.Oc)e>=s.RT&&this.Kdi<=s.RT+s.ct&&i.push(s);return i}ogi(){return this.Qo.Tf()-this.agi}ugi(){if(this.cgi)return;if(this.Qo.Td()!==1/0)return void(0===this.dgi.length&&(this.cgi=this.lgi()));const t=()=>{var t;null==(t=this.fgi)||t.Qd(),this.fgi=void 0,this.cgi=void 0};this.fgi=new er,this.cgi=this._gi(this.fgi.Hd).catch(this.T4).then(t,t)}async ggi(){const t=_.min(1e3*2**this.wgi,3e4);try{var i;await Di(t,null==(i=this.fgi)?void 0:i.Hd),this.wgi++}catch(t){if(Mi(t))return void(this.wgi=0)}this.ugi()}async _gi(t){for(;fo(t),!this.Qo.Ff;){const e=i.Jd()-this.Agi;if(e>1e4)await this.lgi(t),this.Agi=i.Jd(),this.wgi=0;else{const i=1e4-e;await Di(i,t)}}}vgi(t){const i=t.sbt;if(i&&this.Qo.vf&&0===this.agi&&!this.mgi&&0!==_.floor(this.Qo.i_().start(0))){const e=(this.Qo.vf.getTime()-i.getTime())/1e3,s=this.Qo.Tf()-t.qEt;this.agi=s-e}}async lgi(t){try{const i=await this.Qo.uO.MS({zu:this.pgi}),e=await i.QO(t);if(0===e.avails.length)return void(0!==this.dgi.length&&(this.dgi=[]));if(e.avails.length===this.dgi.length&&e.avails[0].startTimeInSeconds===this.dgi[0].qEt)return void this.vgi(this.dgi[0]);const s=[];for(const t of e.avails){const i=new c7(t.durationInSeconds,t.startTimeInSeconds,t.availProgramDateTime);for(const e of t.ads){const t=new u7(i,lt.mFt,e.startTimeInSeconds,e.trackingEvents);t.xqt(e.adId,e.width,e.height,e.durationInSeconds,[],e.skipoffset),i.Iqt(t)}s.push(i),this.vgi(i)}this.dgi=yd(s,((t,i)=>t.qEt-i.qEt))}catch(t){throw Kc(t),new g("Failed to poll MediaTailor tracking events")}}ygi(){var t;null==(t=this.fgi)||t.Xd(),this.fgi=void 0,this.cgi=void 0,this.Agi=-1/0}Mgi(){if(0===this.dgi.length)return;const t=this.dgi[this.dgi.length-1],i=this.ogi();if(t.qEt+t.QGt<this.Kdi){var e;this.hgi&&(null==(e=this.Qo.Oc)||e.Co(new Vi(this.hgi)),this.hgi=void 0)}else{for(const t of this.dgi){const e=t.qEt;if(!(e+t.QGt<this.Kdi)&&(e<=i&&e+t.QGt>this.Kdi)){var s;if(this.rgi===t)return;return this.hgi=t,void(null==(s=this.Qo.Oc)||s.Co(new Ko(this.hgi)))}}var n;if(this.hgi)null==(n=this.Qo.Oc)||n.Co(new Vi(this.hgi)),this.hgi=void 0}}Tgi(){const t=this.x7;if(0===t.length)return;let i=[];for(const e of t){const t=e.sUt.filter((t=>ae(this.Ngi,t.eventType)));i=i.concat(t)}for(const t of i)this.Dgi(t.startTimeInSeconds)&&(t.eventType===Kr.COMPLETE&&this.Sgi(Kr.ENGAGED_VIEW),this.Igi(t))}Egi(t,i){return i.sUt.filter((i=>Ts(i.eventType,t)))[0]}Sgi(t){const i=this.x7;if(0===i.length)return;const e=this.Egi(t,i[0]);e&&this.Igi(e)}Igi(t){this.Xai(t.eventType);for(const i of t.beaconUrls){const t={oI:G.GET,zu:i,rI:"",aI:dm.RS};0,Ys(this.bgi(t))}}Xai(t){let i;const e=this.x7;switch(t){case Kr.START:i=new Re(e[e.length-1],this.Qo.Tf());break;case Kr.COMPLETE:i=new vo(e[0],this.Qo.Tf());break;case Kr.FIRST_QUARTILE:i=new ir(e[0],this.Qo.Tf());break;case Kr.MID_POINT:i=new Ke(e[0],this.Qo.Tf());break;case Kr.THIRD_QUARTILE:i=new S$(e[0],this.Qo.Tf())}var s;void 0!==i&&(null==(s=this.Qo.Oc)||s.Co(i))}async bgi(t){const i=await this.Qo.uO.MS(t);i.SS}Dgi(t){const i=this.ogi();return t>=this.Kdi&&t<i}gn(){this.gg(),this.ygi(),this.Kdi=-1}constructor(t,i,e){this.Agi=-1/0,this.hgi=void 0,this.agi=0,this.dgi=[],this.zdi=!1,this.JB=!1,this.Kdi=-1,this.fgi=void 0,this.cgi=void 0,this.wgi=0,this.lA=()=>{this.ugi()},this.sBt=()=>{this.Sgi(Kr.RESUME)},this.eBt=()=>{this.ygi(),this.Sgi(Kr.PAUSE)},this.We=()=>{this.ygi(),this.Kdi=-1},this.Mh=()=>{this.ygi()},this.od=()=>{-1===this.Kdi&&(this.Kdi=this.ogi()),this.Mgi(),this.Tgi(),this.Kdi=this.ogi()},this.rHt=()=>{if(this.zdi!==this.Qo.Pf){this.zdi=this.Qo.Pf;const t=this.zdi?Kr.MUTE:Kr.UNMUTE;this.Sgi(t)}},this.ngi=()=>{if(this.JB!==this.Qo.cs()){this.JB=this.Qo.cs();const t=this.JB?Kr.FULL_SCREEN:Kr.EXIT_FULL_SCREEN;this.Sgi(t)}},this.T4=t=>{Mi(t)||(this.Sgi(Kr.ERROR),Ys(this.ggi()))},this.Ngi=[Kr.START,Kr.FIRST_QUARTILE,Kr.MID_POINT,Kr.THIRD_QUARTILE,Kr.COMPLETE,Kr.IMPRESSION,Kr.CREATIVE_VIEW],this.Qo=t,this.pgi=i,this.mgi=e,this.Ag()}};Z((function(t){return class extends t{ga(t){return this.Lgi&&(this.Lgi.gn(),this.Lgi=void 0,this.cNt()),super.ga(t)}async ctt(t,i){if(!t||!function(t){return t.sources.some((t=>t.integration===te.MEDIATAILOR))}(t))return super.ctt(t,i);try{const e=await this.kgi(t,i);await super.ctt(e,i)}catch(t){this.yP(new $i(td.MANIFEST_LOAD_ERROR,t.message,t))}}Nf(t){var i;(null==(i=this.Lgi)?void 0:i.rgi)||super.Nf(t)}Ef(){var t;return null!=(t=this.xz)?t:super.Ef()}Lf(){var t;return null!=(t=this.Oz)?t:super.Lf()}yP(t){this.xz=Zr(t),this.Oz=t,this.Co(new fh(t))}cNt(){this.xz=void 0,this.Oz=void 0}async kgi(t,i){let e=[];for(const s of t.sources){if(!Tw(s)){e.push(s);continue}const t=s;if(!t.src){e.push(s);continue}const n=await this.Cgi(t,i);fo(i);const r=Tt({},t,{integration:void 0,src:n});e.push(r)}const s=ie(t);return s.sources=e,s}async Cgi(t,i){const e=t.src||"",s=e.match(/.+?(?=\/v1\/)/);if(!s)throw new g("Could not find MediaTailor session initialization url");const n=s[0],r=It(e,"?ads."),h=r?{zu:e,aI:dm.RS}:{zu:e,oI:G.POST,rI:JSON.stringify({adParams:t.adParams}),aI:dm.RS},o=await Wu((()=>this.xgi(h,i)),i);let a;try{if(a=n+o.manifestUrl,!r){const t=n+o.trackingUrl,i=gw(a);this.Lgi=new d7(this,t,i)}}catch(t){throw new g("Something went wrong parsing the MediaTailor session initialization response")}return a}async xgi(t,i){try{const e=await this.uO.MS(t);return await e.QO(i)}catch(t){throw Kc(t),new g("Failed to initialize MediaTailor session manifest")}}gn(){this.Lgi&&(this.Lgi.gn(),this.Lgi=void 0),this.cNt(),super.gn()}constructor(t,i){super(t,i),this.Lgi=void 0,this.xz=void 0,this.Oz=void 0}}}),Zo.S7);export{i as a,fi as b,Dd as c,$ as d,Mo as e,Qs as f,Is as g,Pe as h,xB as i,hs as j,CM as k,jM as l,Kh as m,zM as n,PM as o,ca as p,UM as q,QM as r,BB as s,RB as t,Tt as u,It as v,jf as w,yd as x,pe as y,Pd as z,Po as A,_s as B,ae as C,No as D,Bo as E,Yi as F,td as G,Mh as H,Co as I,ql as J,vi as K,Dh as L,Zl as M,Ks as N,$h as O,Vw as P,Rt as Q,P as R,L as S,hh as T,Kv as U,tm as V,oe as W,qa as X,Zo as Y,Z,cz as _,Ow as $,os as aa,Rw as ba,ce as ca,ye as da,sD as ea,rD as fa,nD as ga,hD as ha,aD as ia,zu as ja,kD as ka,ro as la,Tn as ma,zS as na,FS as oa,WS as pa,xr as qa,Oc as ra,qS as sa,rk as ta,mO as ua,pO as va,yO as wa,TO as xa,NO as ya,DO as za,VO as Aa,WO as Ba,HO as Ca,qO as Da,Gi as Ea,tz as Fa,iz as Ga,fz as Ha,Oz as Ia,jz as Ja,zz as Ka,Pz as La,zR as Ma,PR as Na,BR as Oa,RR as Pa,JQ as Qa,$Q as Ra,Gt as Sa,BJ as Ta,qJ as Ua,u$ as Va,ft as Wa,w5 as Xa,n6 as Ya,u6 as Za,h9 as _a};
|