@clickview/reports 0.41.1 → 0.42.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +3 -3
- package/dist/css/{594-reports-2043a7560d.chunk.css → 110-reports-653ddf29e0.chunk.css} +4 -9
- package/dist/css/{203-reports-02c43c15cb.chunk.css → 203-reports-86a7e389f0.chunk.css} +1 -1
- package/dist/css/{895-reports-1d398e776d.chunk.css → 405-reports-df0064d5b4.chunk.css} +5 -10
- package/dist/css/{954-reports-fdf55f6334.chunk.css → 421-reports-e5992ac63d.chunk.css} +0 -1
- package/dist/css/{496-reports-f9c3835f95.chunk.css → 496-reports-24697451a9.chunk.css} +5 -5
- package/dist/css/{866-reports-2c0310ea04.chunk.css → 604-reports-04698cbe40.chunk.css} +5 -10
- package/dist/css/{616-reports-feca8a362a.chunk.css → 616-reports-94e466ee7e.chunk.css} +1 -1
- package/dist/css/{518-reports-b222d2b6a8.chunk.css → 740-reports-8f7c9db27e.chunk.css} +4 -9
- package/dist/css/{84-reports-4ebb91bbba.chunk.css → 84-reports-c86ea21c62.chunk.css} +1 -1
- package/dist/css/reports-app-0501ff3ff2.css +30 -0
- package/dist/languages/en.json +1 -1
- package/dist/scripts/{594-2ea1721bc0-reports.chunk.js → 110-f3742378d7-reports.chunk.js} +1 -1
- package/dist/scripts/277-172b675e69-reports.chunk.js +1 -0
- package/dist/scripts/{895-5e2462c361-reports.chunk.js → 405-3a89090002-reports.chunk.js} +1 -1
- package/dist/scripts/421-4bc5e89337-reports.chunk.js +1 -0
- package/dist/scripts/{496-2dd3a5baaa-reports.chunk.js → 496-4346bcbeef-reports.chunk.js} +2 -2
- package/dist/scripts/53-0e02ad1cc4-reports.chunk.js +1 -0
- package/dist/scripts/535-206770d4ee-reports.chunk.js +1 -0
- package/dist/scripts/604-3227f6fa33-reports.chunk.js +1 -0
- package/dist/scripts/{703-c50eb9724c-reports.chunk.js → 703-9302f3a04f-reports.chunk.js} +1 -1
- package/dist/scripts/{518-dc5f5dc8a5-reports.chunk.js → 740-5399746b2c-reports.chunk.js} +1 -1
- package/dist/scripts/806-7a16d02d23-reports.chunk.js +1 -0
- package/dist/scripts/{998-b3d5cc5f4f-reports.chunk.js → 998-0bb9077175-reports.chunk.js} +2 -2
- package/dist/scripts/bundle-55f376e25e.min.js +2 -0
- package/dist/scripts/{bundle-9f76731db6.min.js.LICENSE.txt → bundle-55f376e25e.min.js.LICENSE.txt} +0 -4
- package/dist/scripts/{polyfills-c1ed04b9f2.min.js → polyfills-26a87754bd.min.js} +1 -1
- package/package.json +45 -46
- package/typings/libs/CVLanguages.d.ts +24 -24
- package/typings/libs/cloneDeep.d.ts +4 -4
- package/typings/libs/google-api.d.ts +4 -4
- package/typings/libs/microsoft-teams.d.ts +2 -2
- package/typings/libs/react-table-config.d.ts +138 -138
- package/typings/libs/trackjs.d.ts +2 -2
- package/typings/libs/videojs-contrib-quality-levels.d.ts +28 -28
- package/typings/utils/imports.d.ts +12 -12
- package/dist/css/reports-app-d98705b1b1.css +0 -34
- package/dist/scripts/277-8c16ee2810-reports.chunk.js +0 -1
- package/dist/scripts/619-78f3b693a9-reports.chunk.js +0 -1
- package/dist/scripts/763-2e9799e475-reports.chunk.js +0 -1
- package/dist/scripts/785-3b18448147-reports.chunk.js +0 -1
- package/dist/scripts/806-f38b852d47-reports.chunk.js +0 -1
- package/dist/scripts/866-0a05f9888b-reports.chunk.js +0 -1
- package/dist/scripts/954-ad9c374f73-reports.chunk.js +0 -1
- package/dist/scripts/bundle-9f76731db6.min.js +0 -2
- /package/dist/scripts/{184-4e0ad3f212-reports.chunk.js → 184-eff1ab3119-reports.chunk.js} +0 -0
- /package/dist/scripts/{203-f3d2b27d9c-reports.chunk.js → 203-7d35016aa7-reports.chunk.js} +0 -0
- /package/dist/scripts/{496-2dd3a5baaa-reports.chunk.js.LICENSE.txt → 496-4346bcbeef-reports.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{616-c25a4abe3a-reports.chunk.js → 616-dc1b4d3b50-reports.chunk.js} +0 -0
- /package/dist/scripts/{84-26805ce26d-reports.chunk.js → 84-dd6286011e-reports.chunk.js} +0 -0
- /package/dist/scripts/{998-b3d5cc5f4f-reports.chunk.js.LICENSE.txt → 998-0bb9077175-reports.chunk.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! For license information please see 998-
|
|
2
|
-
(self.webpackChunk_clickview_reports=self.webpackChunk_clickview_reports||[]).push([[998],{68942:(e,t,n)=>{"use strict";var r=n(51562),i=n(448),a=n(63848),s=function(e){var t={};return e?(e.trim().split("\n").forEach((function(e){var n=e.indexOf(":"),r=e.slice(0,n).trim().toLowerCase(),i=e.slice(n+1).trim();void 0===t[r]?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]})),t):t};function o(e,t,n){var r=e;return a(t)?(n=t,"string"==typeof e&&(r={uri:e})):r=i({},t,{uri:e}),r.callback=n,r}function u(e,t,n){return l(t=o(e,t,n))}function l(e){if(void 0===e.callback)throw new Error("callback argument missing");var t=!1,n=function(n,r,i){t||(t=!0,e.callback(n,r,i))};function r(){var e=void 0;if(e=c.response?c.response:c.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(e){}return null}(c),v)try{e=JSON.parse(e)}catch(e){}return e}function i(e){return clearTimeout(d),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,n(e,y)}function a(){if(!l){var t;clearTimeout(d),t=e.useXDR&&void 0===c.status?200:1223===c.status?204:c.status;var i=y,a=null;return 0!==t?(i={body:r(),statusCode:t,method:f,headers:{},url:h,rawRequest:c},c.getAllResponseHeaders&&(i.headers=s(c.getAllResponseHeaders()))):a=new Error("Internal XMLHttpRequest Error"),n(a,i,i.body)}}var o,l,c=e.xhr||null;c||(c=e.cors||e.useXDR?new u.XDomainRequest:new u.XMLHttpRequest);var d,h=c.url=e.uri||e.url,f=c.method=e.method||"GET",p=e.body||e.data,m=c.headers=e.headers||{},g=!!e.sync,v=!1,y={body:void 0,headers:{},statusCode:0,method:f,url:h,rawRequest:c};if("json"in e&&!1!==e.json&&(v=!0,m.accept||m.Accept||(m.Accept="application/json"),"GET"!==f&&"HEAD"!==f&&(m["content-type"]||m["Content-Type"]||(m["Content-Type"]="application/json"),p=JSON.stringify(!0===e.json?p:e.json))),c.onreadystatechange=function(){4===c.readyState&&setTimeout(a,0)},c.onload=a,c.onerror=i,c.onprogress=function(){},c.onabort=function(){l=!0},c.ontimeout=i,c.open(f,h,!g,e.username,e.password),g||(c.withCredentials=!!e.withCredentials),!g&&e.timeout>0&&(d=setTimeout((function(){if(!l){l=!0,c.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",i(e)}}),e.timeout)),c.setRequestHeader)for(o in m)m.hasOwnProperty(o)&&c.setRequestHeader(o,m[o]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(c.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(c),c.send(p||null),c}e.exports=u,e.exports.default=u,u.XMLHttpRequest=r.XMLHttpRequest||function(){},u.XDomainRequest="withCredentials"in new u.XMLHttpRequest?u.XMLHttpRequest:r.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],(function(e){u["delete"===e?"del":e]=function(t,n,r){return(n=o(t,n,r)).method=e.toUpperCase(),l(n)}}))},15206:e=>{var t=!("undefined"==typeof window||!window.document||!window.document.createElement);e.exports=t},232:function(e){e.exports=function(){"use strict";for(var e=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e<t?t:e>n?n:e},t={},n=0,r=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];n<r.length;n+=1){var i=r[n];t["[object "+i+"]"]=i.toLowerCase()}var a=function(e){return t[Object.prototype.toString.call(e)]||"object"},s=Math.PI,o={clip_rgb:function(t){t._clipped=!1,t._unclipped=t.slice(0);for(var n=0;n<=3;n++)n<3?((t[n]<0||t[n]>255)&&(t._clipped=!0),t[n]=e(t[n],0,255)):3===n&&(t[n]=e(t[n],0,1));return t},limit:e,type:a,unpack:function(e,t){return void 0===t&&(t=null),e.length>=3?Array.prototype.slice.call(e):"object"==a(e[0])&&t?t.split("").filter((function(t){return void 0!==e[0][t]})).map((function(t){return e[0][t]})):e[0]},last:function(e){if(e.length<2)return null;var t=e.length-1;return"string"==a(e[t])?e[t].toLowerCase():null},PI:s,TWOPI:2*s,PITHIRD:s/3,DEG2RAD:s/180,RAD2DEG:180/s},u={format:{},autodetect:[]},l=o.last,c=o.clip_rgb,d=o.type,h=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=this;if("object"===d(e[0])&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];var r=l(e),i=!1;if(!r){i=!0,u.sorted||(u.autodetect=u.autodetect.sort((function(e,t){return t.p-e.p})),u.sorted=!0);for(var a=0,s=u.autodetect;a<s.length;a+=1){var o=s[a];if(r=o.test.apply(o,e))break}}if(!u.format[r])throw new Error("unknown format: "+e);var h=u.format[r].apply(null,i?e:e.slice(0,-1));n._rgb=c(h),3===n._rgb.length&&n._rgb.push(1)};h.prototype.toString=function(){return"function"==d(this.hex)?this.hex():"["+this._rgb.join(",")+"]"};var f=h,p=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p.Color,[null].concat(e)))};p.Color=f,p.version="2.1.2";var m=p,g=o.unpack,v=Math.max,y=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=g(e,"rgb"),r=n[0],i=n[1],a=n[2],s=1-v(r/=255,v(i/=255,a/=255)),o=s<1?1/(1-s):0;return[(1-r-s)*o,(1-i-s)*o,(1-a-s)*o,s]},_=o.unpack,b=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=_(e,"cmyk"))[0],r=e[1],i=e[2],a=e[3],s=e.length>4?e[4]:1;return 1===a?[0,0,0,s]:[n>=1?0:255*(1-n)*(1-a),r>=1?0:255*(1-r)*(1-a),i>=1?0:255*(1-i)*(1-a),s]},T=o.unpack,S=o.type;f.prototype.cmyk=function(){return y(this._rgb)},m.cmyk=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["cmyk"])))},u.format.cmyk=b,u.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=T(e,"cmyk"),"array"===S(e)&&4===e.length)return"cmyk"}});var w=o.unpack,k=o.last,E=function(e){return Math.round(100*e)/100},C=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=w(e,"hsla"),r=k(e)||"lsa";return n[0]=E(n[0]||0),n[1]=E(100*n[1])+"%",n[2]=E(100*n[2])+"%","hsla"===r||n.length>3&&n[3]<1?(n[3]=n.length>3?n[3]:1,r="hsla"):n.length=3,r+"("+n.join(",")+")"},x=o.unpack,I=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=x(e,"rgba"))[0],r=e[1],i=e[2];n/=255,r/=255,i/=255;var a,s,o=Math.min(n,r,i),u=Math.max(n,r,i),l=(u+o)/2;return u===o?(a=0,s=Number.NaN):a=l<.5?(u-o)/(u+o):(u-o)/(2-u-o),n==u?s=(r-i)/(u-o):r==u?s=2+(i-n)/(u-o):i==u&&(s=4+(n-r)/(u-o)),(s*=60)<0&&(s+=360),e.length>3&&void 0!==e[3]?[s,a,l,e[3]]:[s,a,l]},A=o.unpack,O=o.last,P=Math.round,L=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=A(e,"rgba"),r=O(e)||"rgb";return"hsl"==r.substr(0,3)?C(I(n),r):(n[0]=P(n[0]),n[1]=P(n[1]),n[2]=P(n[2]),("rgba"===r||n.length>3&&n[3]<1)&&(n[3]=n.length>3?n[3]:1,r="rgba"),r+"("+n.slice(0,"rgb"===r?3:4).join(",")+")")},D=o.unpack,R=Math.round,M=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];var r,i,a,s=(t=D(t,"hsl"))[0],o=t[1],u=t[2];if(0===o)r=i=a=255*u;else{var l=[0,0,0],c=[0,0,0],d=u<.5?u*(1+o):u+o-u*o,h=2*u-d,f=s/360;l[0]=f+1/3,l[1]=f,l[2]=f-1/3;for(var p=0;p<3;p++)l[p]<0&&(l[p]+=1),l[p]>1&&(l[p]-=1),6*l[p]<1?c[p]=h+6*(d-h)*l[p]:2*l[p]<1?c[p]=d:3*l[p]<2?c[p]=h+(d-h)*(2/3-l[p])*6:c[p]=h;r=(e=[R(255*c[0]),R(255*c[1]),R(255*c[2])])[0],i=e[1],a=e[2]}return t.length>3?[r,i,a,t[3]]:[r,i,a,1]},N=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,U=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,F=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,B=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,j=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,H=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,V=Math.round,q=function(e){var t;if(e=e.toLowerCase().trim(),u.format.named)try{return u.format.named(e)}catch(e){}if(t=e.match(N)){for(var n=t.slice(1,4),r=0;r<3;r++)n[r]=+n[r];return n[3]=1,n}if(t=e.match(U)){for(var i=t.slice(1,5),a=0;a<4;a++)i[a]=+i[a];return i}if(t=e.match(F)){for(var s=t.slice(1,4),o=0;o<3;o++)s[o]=V(2.55*s[o]);return s[3]=1,s}if(t=e.match(B)){for(var l=t.slice(1,5),c=0;c<3;c++)l[c]=V(2.55*l[c]);return l[3]=+l[3],l}if(t=e.match(j)){var d=t.slice(1,4);d[1]*=.01,d[2]*=.01;var h=M(d);return h[3]=1,h}if(t=e.match(H)){var f=t.slice(1,4);f[1]*=.01,f[2]*=.01;var p=M(f);return p[3]=+t[4],p}};q.test=function(e){return N.test(e)||U.test(e)||F.test(e)||B.test(e)||j.test(e)||H.test(e)};var W=q,z=o.type;f.prototype.css=function(e){return L(this._rgb,e)},m.css=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["css"])))},u.format.css=W,u.autodetect.push({p:5,test:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(!t.length&&"string"===z(e)&&W.test(e))return"css"}});var G=o.unpack;u.format.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=G(e,"rgba");return n[0]*=255,n[1]*=255,n[2]*=255,n},m.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["gl"])))},f.prototype.gl=function(){var e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]};var X=o.unpack,$=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r=X(e,"rgb"),i=r[0],a=r[1],s=r[2],o=Math.min(i,a,s),u=Math.max(i,a,s),l=u-o,c=100*l/255,d=o/(255-l)*100;return 0===l?n=Number.NaN:(i===u&&(n=(a-s)/l),a===u&&(n=2+(s-i)/l),s===u&&(n=4+(i-a)/l),(n*=60)<0&&(n+=360)),[n,c,d]},K=o.unpack,Z=Math.floor,Y=function(){for(var e,t,n,r,i,a,s=[],o=arguments.length;o--;)s[o]=arguments[o];var u,l,c,d=(s=K(s,"hcg"))[0],h=s[1],f=s[2];f*=255;var p=255*h;if(0===h)u=l=c=f;else{360===d&&(d=0),d>360&&(d-=360),d<0&&(d+=360);var m=Z(d/=60),g=d-m,v=f*(1-h),y=v+p*(1-g),_=v+p*g,b=v+p;switch(m){case 0:u=(e=[b,_,v])[0],l=e[1],c=e[2];break;case 1:u=(t=[y,b,v])[0],l=t[1],c=t[2];break;case 2:u=(n=[v,b,_])[0],l=n[1],c=n[2];break;case 3:u=(r=[v,y,b])[0],l=r[1],c=r[2];break;case 4:u=(i=[_,v,b])[0],l=i[1],c=i[2];break;case 5:u=(a=[b,v,y])[0],l=a[1],c=a[2]}}return[u,l,c,s.length>3?s[3]:1]},Q=o.unpack,J=o.type;f.prototype.hcg=function(){return $(this._rgb)},m.hcg=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["hcg"])))},u.format.hcg=Y,u.autodetect.push({p:1,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Q(e,"hcg"),"array"===J(e)&&3===e.length)return"hcg"}});var ee=o.unpack,te=o.last,ne=Math.round,re=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=ee(e,"rgba"),r=n[0],i=n[1],a=n[2],s=n[3],o=te(e)||"auto";void 0===s&&(s=1),"auto"===o&&(o=s<1?"rgba":"rgb");var u="000000"+((r=ne(r))<<16|(i=ne(i))<<8|(a=ne(a))).toString(16);u=u.substr(u.length-6);var l="0"+ne(255*s).toString(16);switch(l=l.substr(l.length-2),o.toLowerCase()){case"rgba":return"#"+u+l;case"argb":return"#"+l+u;default:return"#"+u}},ie=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,ae=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,se=function(e){if(e.match(ie)){4!==e.length&&7!==e.length||(e=e.substr(1)),3===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var t=parseInt(e,16);return[t>>16,t>>8&255,255&t,1]}if(e.match(ae)){5!==e.length&&9!==e.length||(e=e.substr(1)),4===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);var n=parseInt(e,16);return[n>>24&255,n>>16&255,n>>8&255,Math.round((255&n)/255*100)/100]}throw new Error("unknown hex color: "+e)},oe=o.type;f.prototype.hex=function(e){return re(this._rgb,e)},m.hex=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["hex"])))},u.format.hex=se,u.autodetect.push({p:4,test:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(!t.length&&"string"===oe(e)&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return"hex"}});var ue=o.unpack,le=o.TWOPI,ce=Math.min,de=Math.sqrt,he=Math.acos,fe=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r=ue(e,"rgb"),i=r[0],a=r[1],s=r[2],o=ce(i/=255,a/=255,s/=255),u=(i+a+s)/3,l=u>0?1-o/u:0;return 0===l?n=NaN:(n=(i-a+(i-s))/2,n/=de((i-a)*(i-a)+(i-s)*(a-s)),n=he(n),s>a&&(n=le-n),n/=le),[360*n,l,u]},pe=o.unpack,me=o.limit,ge=o.TWOPI,ve=o.PITHIRD,ye=Math.cos,_e=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r,i,a=(e=pe(e,"hsi"))[0],s=e[1],o=e[2];return isNaN(a)&&(a=0),isNaN(s)&&(s=0),a>360&&(a-=360),a<0&&(a+=360),(a/=360)<1/3?r=1-((i=(1-s)/3)+(n=(1+s*ye(ge*a)/ye(ve-ge*a))/3)):a<2/3?i=1-((n=(1-s)/3)+(r=(1+s*ye(ge*(a-=1/3))/ye(ve-ge*a))/3)):n=1-((r=(1-s)/3)+(i=(1+s*ye(ge*(a-=2/3))/ye(ve-ge*a))/3)),[255*(n=me(o*n*3)),255*(r=me(o*r*3)),255*(i=me(o*i*3)),e.length>3?e[3]:1]},be=o.unpack,Te=o.type;f.prototype.hsi=function(){return fe(this._rgb)},m.hsi=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["hsi"])))},u.format.hsi=_e,u.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=be(e,"hsi"),"array"===Te(e)&&3===e.length)return"hsi"}});var Se=o.unpack,we=o.type;f.prototype.hsl=function(){return I(this._rgb)},m.hsl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["hsl"])))},u.format.hsl=M,u.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Se(e,"hsl"),"array"===we(e)&&3===e.length)return"hsl"}});var ke=o.unpack,Ee=Math.min,Ce=Math.max,xe=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r,i,a=(e=ke(e,"rgb"))[0],s=e[1],o=e[2],u=Ee(a,s,o),l=Ce(a,s,o),c=l-u;return i=l/255,0===l?(n=Number.NaN,r=0):(r=c/l,a===l&&(n=(s-o)/c),s===l&&(n=2+(o-a)/c),o===l&&(n=4+(a-s)/c),(n*=60)<0&&(n+=360)),[n,r,i]},Ie=o.unpack,Ae=Math.floor,Oe=function(){for(var e,t,n,r,i,a,s=[],o=arguments.length;o--;)s[o]=arguments[o];var u,l,c,d=(s=Ie(s,"hsv"))[0],h=s[1],f=s[2];if(f*=255,0===h)u=l=c=f;else{360===d&&(d=0),d>360&&(d-=360),d<0&&(d+=360);var p=Ae(d/=60),m=d-p,g=f*(1-h),v=f*(1-h*m),y=f*(1-h*(1-m));switch(p){case 0:u=(e=[f,y,g])[0],l=e[1],c=e[2];break;case 1:u=(t=[v,f,g])[0],l=t[1],c=t[2];break;case 2:u=(n=[g,f,y])[0],l=n[1],c=n[2];break;case 3:u=(r=[g,v,f])[0],l=r[1],c=r[2];break;case 4:u=(i=[y,g,f])[0],l=i[1],c=i[2];break;case 5:u=(a=[f,g,v])[0],l=a[1],c=a[2]}}return[u,l,c,s.length>3?s[3]:1]},Pe=o.unpack,Le=o.type;f.prototype.hsv=function(){return xe(this._rgb)},m.hsv=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["hsv"])))},u.format.hsv=Oe,u.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Pe(e,"hsv"),"array"===Le(e)&&3===e.length)return"hsv"}});var De=18,Re=.95047,Me=1,Ne=1.08883,Ue=.137931034,Fe=.206896552,Be=.12841855,je=.008856452,He=o.unpack,Ve=Math.pow,qe=function(e){return(e/=255)<=.04045?e/12.92:Ve((e+.055)/1.055,2.4)},We=function(e){return e>je?Ve(e,1/3):e/Be+Ue},ze=function(e,t,n){return e=qe(e),t=qe(t),n=qe(n),[We((.4124564*e+.3575761*t+.1804375*n)/Re),We((.2126729*e+.7151522*t+.072175*n)/Me),We((.0193339*e+.119192*t+.9503041*n)/Ne)]},Ge=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=He(e,"rgb"),r=n[0],i=n[1],a=n[2],s=ze(r,i,a),o=s[0],u=s[1],l=116*u-16;return[l<0?0:l,500*(o-u),200*(u-s[2])]},Xe=o.unpack,$e=Math.pow,Ke=function(e){return 255*(e<=.00304?12.92*e:1.055*$e(e,1/2.4)-.055)},Ze=function(e){return e>Fe?e*e*e:Be*(e-Ue)},Ye=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r,i,a=(e=Xe(e,"lab"))[0],s=e[1],o=e[2];return r=(a+16)/116,n=isNaN(s)?r:r+s/500,i=isNaN(o)?r:r-o/200,r=Me*Ze(r),n=Re*Ze(n),i=Ne*Ze(i),[Ke(3.2404542*n-1.5371385*r-.4985314*i),Ke(-.969266*n+1.8760108*r+.041556*i),Ke(.0556434*n-.2040259*r+1.0572252*i),e.length>3?e[3]:1]},Qe=o.unpack,Je=o.type;f.prototype.lab=function(){return Ge(this._rgb)},m.lab=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["lab"])))},u.format.lab=Ye,u.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Qe(e,"lab"),"array"===Je(e)&&3===e.length)return"lab"}});var et=o.unpack,tt=o.RAD2DEG,nt=Math.sqrt,rt=Math.atan2,it=Math.round,at=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=et(e,"lab"),r=n[0],i=n[1],a=n[2],s=nt(i*i+a*a),o=(rt(a,i)*tt+360)%360;return 0===it(1e4*s)&&(o=Number.NaN),[r,s,o]},st=o.unpack,ot=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=st(e,"rgb"),r=n[0],i=n[1],a=n[2],s=Ge(r,i,a),o=s[0],u=s[1],l=s[2];return at(o,u,l)},ut=o.unpack,lt=o.DEG2RAD,ct=Math.sin,dt=Math.cos,ht=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=ut(e,"lch"),r=n[0],i=n[1],a=n[2];return isNaN(a)&&(a=0),[r,dt(a*=lt)*i,ct(a)*i]},ft=o.unpack,pt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=ft(e,"lch"))[0],r=e[1],i=e[2],a=ht(n,r,i),s=a[0],o=a[1],u=a[2],l=Ye(s,o,u);return[l[0],l[1],l[2],e.length>3?e[3]:1]},mt=o.unpack,gt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=mt(e,"hcl").reverse();return pt.apply(void 0,n)},vt=o.unpack,yt=o.type;f.prototype.lch=function(){return ot(this._rgb)},f.prototype.hcl=function(){return ot(this._rgb).reverse()},m.lch=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["lch"])))},m.hcl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["hcl"])))},u.format.lch=pt,u.format.hcl=gt,["lch","hcl"].forEach((function(e){return u.autodetect.push({p:2,test:function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(t=vt(t,e),"array"===yt(t)&&3===t.length)return e}})}));var _t={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},bt=o.type;f.prototype.name=function(){for(var e=re(this._rgb,"rgb"),t=0,n=Object.keys(_t);t<n.length;t+=1){var r=n[t];if(_t[r]===e)return r.toLowerCase()}return e},u.format.named=function(e){if(e=e.toLowerCase(),_t[e])return se(_t[e]);throw new Error("unknown color name: "+e)},u.autodetect.push({p:5,test:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(!t.length&&"string"===bt(e)&&_t[e.toLowerCase()])return"named"}});var Tt=o.unpack,St=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=Tt(e,"rgb");return(n[0]<<16)+(n[1]<<8)+n[2]},wt=o.type,kt=o.type;f.prototype.num=function(){return St(this._rgb)},m.num=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["num"])))},u.format.num=function(e){if("number"==wt(e)&&e>=0&&e<=16777215)return[e>>16,e>>8&255,255&e,1];throw new Error("unknown num color: "+e)},u.autodetect.push({p:5,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(1===e.length&&"number"===kt(e[0])&&e[0]>=0&&e[0]<=16777215)return"num"}});var Et=o.unpack,Ct=o.type,xt=Math.round;f.prototype.rgb=function(e){return void 0===e&&(e=!0),!1===e?this._rgb.slice(0,3):this._rgb.slice(0,3).map(xt)},f.prototype.rgba=function(e){return void 0===e&&(e=!0),this._rgb.slice(0,4).map((function(t,n){return n<3?!1===e?t:xt(t):t}))},m.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["rgb"])))},u.format.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=Et(e,"rgba");return void 0===n[3]&&(n[3]=1),n},u.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Et(e,"rgba"),"array"===Ct(e)&&(3===e.length||4===e.length&&"number"==Ct(e[3])&&e[3]>=0&&e[3]<=1))return"rgb"}});var It=Math.log,At=function(e){var t,n,r,i=e/100;return i<66?(t=255,n=-155.25485562709179-.44596950469579133*(n=i-2)+104.49216199393888*It(n),r=i<20?0:.8274096064007395*(r=i-10)-254.76935184120902+115.67994401066147*It(r)):(t=351.97690566805693+.114206453784165*(t=i-55)-40.25366309332127*It(t),n=325.4494125711974+.07943456536662342*(n=i-50)-28.0852963507957*It(n),r=255),[t,n,r,1]},Ot=o.unpack,Pt=Math.round,Lt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n,r=Ot(e,"rgb"),i=r[0],a=r[2],s=1e3,o=4e4;o-s>.4;){var u=At(n=.5*(o+s));u[2]/u[0]>=a/i?o=n:s=n}return Pt(n)};f.prototype.temp=f.prototype.kelvin=f.prototype.temperature=function(){return Lt(this._rgb)},m.temp=m.kelvin=m.temperature=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["temp"])))},u.format.temp=u.format.kelvin=u.format.temperature=At;var Dt=o.type;f.prototype.alpha=function(e,t){return void 0===t&&(t=!1),void 0!==e&&"number"===Dt(e)?t?(this._rgb[3]=e,this):new f([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]},f.prototype.clipped=function(){return this._rgb._clipped||!1},f.prototype.darken=function(e){void 0===e&&(e=1);var t=this.lab();return t[0]-=De*e,new f(t,"lab").alpha(this.alpha(),!0)},f.prototype.brighten=function(e){return void 0===e&&(e=1),this.darken(-e)},f.prototype.darker=f.prototype.darken,f.prototype.brighter=f.prototype.brighten,f.prototype.get=function(e){var t=e.split("."),n=t[0],r=t[1],i=this[n]();if(r){var a=n.indexOf(r);if(a>-1)return i[a];throw new Error("unknown channel "+r+" in mode "+n)}return i};var Rt=o.type,Mt=Math.pow;f.prototype.luminance=function(e){if(void 0!==e&&"number"===Rt(e)){if(0===e)return new f([0,0,0,this._rgb[3]],"rgb");if(1===e)return new f([255,255,255,this._rgb[3]],"rgb");var t=this.luminance(),n=20,r=function(t,i){var a=t.interpolate(i,.5,"rgb"),s=a.luminance();return Math.abs(e-s)<1e-7||!n--?a:s>e?r(t,a):r(a,i)},i=(t>e?r(new f([0,0,0]),this):r(this,new f([255,255,255]))).rgb();return new f(i.concat([this._rgb[3]]))}return Nt.apply(void 0,this._rgb.slice(0,3))};var Nt=function(e,t,n){return.2126*(e=Ut(e))+.7152*(t=Ut(t))+.0722*Ut(n)},Ut=function(e){return(e/=255)<=.03928?e/12.92:Mt((e+.055)/1.055,2.4)},Ft={},Bt=o.type,jt=function(e,t,n){void 0===n&&(n=.5);for(var r=[],i=arguments.length-3;i-- >0;)r[i]=arguments[i+3];var a=r[0]||"lrgb";if(Ft[a]||r.length||(a=Object.keys(Ft)[0]),!Ft[a])throw new Error("interpolation mode "+a+" is not defined");return"object"!==Bt(e)&&(e=new f(e)),"object"!==Bt(t)&&(t=new f(t)),Ft[a](e,t,n).alpha(e.alpha()+n*(t.alpha()-e.alpha()))};f.prototype.mix=f.prototype.interpolate=function(e,t){void 0===t&&(t=.5);for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return jt.apply(void 0,[this,e,t].concat(n))},f.prototype.premultiply=function(e){void 0===e&&(e=!1);var t=this._rgb,n=t[3];return e?(this._rgb=[t[0]*n,t[1]*n,t[2]*n,n],this):new f([t[0]*n,t[1]*n,t[2]*n,n],"rgb")},f.prototype.saturate=function(e){void 0===e&&(e=1);var t=this.lch();return t[1]+=De*e,t[1]<0&&(t[1]=0),new f(t,"lch").alpha(this.alpha(),!0)},f.prototype.desaturate=function(e){return void 0===e&&(e=1),this.saturate(-e)};var Ht=o.type;f.prototype.set=function(e,t,n){void 0===n&&(n=!1);var r=e.split("."),i=r[0],a=r[1],s=this[i]();if(a){var o=i.indexOf(a);if(o>-1){if("string"==Ht(t))switch(t.charAt(0)){case"+":case"-":s[o]+=+t;break;case"*":s[o]*=+t.substr(1);break;case"/":s[o]/=+t.substr(1);break;default:s[o]=+t}else{if("number"!==Ht(t))throw new Error("unsupported value for Color.set");s[o]=t}var u=new f(s,i);return n?(this._rgb=u._rgb,this):u}throw new Error("unknown channel "+a+" in mode "+i)}return s};Ft.rgb=function(e,t,n){var r=e._rgb,i=t._rgb;return new f(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),"rgb")};var Vt=Math.sqrt,qt=Math.pow;Ft.lrgb=function(e,t,n){var r=e._rgb,i=r[0],a=r[1],s=r[2],o=t._rgb,u=o[0],l=o[1],c=o[2];return new f(Vt(qt(i,2)*(1-n)+qt(u,2)*n),Vt(qt(a,2)*(1-n)+qt(l,2)*n),Vt(qt(s,2)*(1-n)+qt(c,2)*n),"rgb")};Ft.lab=function(e,t,n){var r=e.lab(),i=t.lab();return new f(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),"lab")};var Wt=function(e,t,n,r){var i,a,s,o,u,l,c,d,h,p,m,g;return"hsl"===r?(s=e.hsl(),o=t.hsl()):"hsv"===r?(s=e.hsv(),o=t.hsv()):"hcg"===r?(s=e.hcg(),o=t.hcg()):"hsi"===r?(s=e.hsi(),o=t.hsi()):"lch"!==r&&"hcl"!==r||(r="hcl",s=e.hcl(),o=t.hcl()),"h"===r.substr(0,1)&&(u=(i=s)[0],c=i[1],h=i[2],l=(a=o)[0],d=a[1],p=a[2]),isNaN(u)||isNaN(l)?isNaN(u)?isNaN(l)?g=Number.NaN:(g=l,1!=h&&0!=h||"hsv"==r||(m=d)):(g=u,1!=p&&0!=p||"hsv"==r||(m=c)):g=u+n*(l>u&&l-u>180?l-(u+360):l<u&&u-l>180?l+360-u:l-u),void 0===m&&(m=c+n*(d-c)),new f([g,m,h+n*(p-h)],r)},zt=function(e,t,n){return Wt(e,t,n,"lch")};Ft.lch=zt,Ft.hcl=zt;Ft.num=function(e,t,n){var r=e.num(),i=t.num();return new f(r+n*(i-r),"num")};Ft.hcg=function(e,t,n){return Wt(e,t,n,"hcg")};Ft.hsi=function(e,t,n){return Wt(e,t,n,"hsi")};Ft.hsl=function(e,t,n){return Wt(e,t,n,"hsl")};Ft.hsv=function(e,t,n){return Wt(e,t,n,"hsv")};var Gt=o.clip_rgb,Xt=Math.pow,$t=Math.sqrt,Kt=Math.PI,Zt=Math.cos,Yt=Math.sin,Qt=Math.atan2,Jt=function(e,t){for(var n=e.length,r=[0,0,0,0],i=0;i<e.length;i++){var a=e[i],s=t[i]/n,o=a._rgb;r[0]+=Xt(o[0],2)*s,r[1]+=Xt(o[1],2)*s,r[2]+=Xt(o[2],2)*s,r[3]+=o[3]*s}return r[0]=$t(r[0]),r[1]=$t(r[1]),r[2]=$t(r[2]),r[3]>.9999999&&(r[3]=1),new f(Gt(r))},en=o.type,tn=Math.pow,nn=function(e){var t="rgb",n=m("#ccc"),r=0,i=[0,1],a=[],s=[0,0],o=!1,u=[],l=!1,c=0,d=1,h=!1,f={},p=!0,g=1,v=function(e){if((e=e||["#fff","#000"])&&"string"===en(e)&&m.brewer&&m.brewer[e.toLowerCase()]&&(e=m.brewer[e.toLowerCase()]),"array"===en(e)){1===e.length&&(e=[e[0],e[0]]),e=e.slice(0);for(var t=0;t<e.length;t++)e[t]=m(e[t]);a.length=0;for(var n=0;n<e.length;n++)a.push(n/(e.length-1))}return T(),u=e},y=function(e){return e},_=function(e){return e},b=function(e,r){var i,l;if(null==r&&(r=!1),isNaN(e)||null===e)return n;l=r?e:o&&o.length>2?function(e){if(null!=o){for(var t=o.length-1,n=0;n<t&&e>=o[n];)n++;return n-1}return 0}(e)/(o.length-2):d!==c?(e-c)/(d-c):1,l=_(l),r||(l=y(l)),1!==g&&(l=tn(l,g)),l=s[0]+l*(1-s[0]-s[1]),l=Math.min(1,Math.max(0,l));var h=Math.floor(1e4*l);if(p&&f[h])i=f[h];else{if("array"===en(u))for(var v=0;v<a.length;v++){var b=a[v];if(l<=b){i=u[v];break}if(l>=b&&v===a.length-1){i=u[v];break}if(l>b&&l<a[v+1]){l=(l-b)/(a[v+1]-b),i=m.interpolate(u[v],u[v+1],l,t);break}}else"function"===en(u)&&(i=u(l));p&&(f[h]=i)}return i},T=function(){return f={}};v(e);var S=function(e){var t=m(b(e));return l&&t[l]?t[l]():t};return S.classes=function(e){if(null!=e){if("array"===en(e))o=e,i=[e[0],e[e.length-1]];else{var t=m.analyze(i);o=0===e?[t.min,t.max]:m.limits(t,"e",e)}return S}return o},S.domain=function(e){if(!arguments.length)return i;c=e[0],d=e[e.length-1],a=[];var t=u.length;if(e.length===t&&c!==d)for(var n=0,r=Array.from(e);n<r.length;n+=1){var s=r[n];a.push((s-c)/(d-c))}else{for(var o=0;o<t;o++)a.push(o/(t-1));if(e.length>2){var l=e.map((function(t,n){return n/(e.length-1)})),h=e.map((function(e){return(e-c)/(d-c)}));h.every((function(e,t){return l[t]===e}))||(_=function(e){if(e<=0||e>=1)return e;for(var t=0;e>=h[t+1];)t++;var n=(e-h[t])/(h[t+1]-h[t]);return l[t]+n*(l[t+1]-l[t])})}}return i=[c,d],S},S.mode=function(e){return arguments.length?(t=e,T(),S):t},S.range=function(e,t){return v(e),S},S.out=function(e){return l=e,S},S.spread=function(e){return arguments.length?(r=e,S):r},S.correctLightness=function(e){return null==e&&(e=!0),h=e,T(),y=h?function(e){for(var t=b(0,!0).lab()[0],n=b(1,!0).lab()[0],r=t>n,i=b(e,!0).lab()[0],a=t+(n-t)*e,s=i-a,o=0,u=1,l=20;Math.abs(s)>.01&&l-- >0;)r&&(s*=-1),s<0?(o=e,e+=.5*(u-e)):(u=e,e+=.5*(o-e)),s=(i=b(e,!0).lab()[0])-a;return e}:function(e){return e},S},S.padding=function(e){return null!=e?("number"===en(e)&&(e=[e,e]),s=e,S):s},S.colors=function(t,n){arguments.length<2&&(n="hex");var r=[];if(0===arguments.length)r=u.slice(0);else if(1===t)r=[S(.5)];else if(t>1){var a=i[0],s=i[1]-a;r=function(e,t,n){for(var r=[],i=e<t,a=n?i?t+1:t-1:t,s=e;i?s<a:s>a;i?s++:s--)r.push(s);return r}(0,t,!1).map((function(e){return S(a+e/(t-1)*s)}))}else{e=[];var l=[];if(o&&o.length>2)for(var c=1,d=o.length,h=1<=d;h?c<d:c>d;h?c++:c--)l.push(.5*(o[c-1]+o[c]));else l=i;r=l.map((function(e){return S(e)}))}return m[n]&&(r=r.map((function(e){return e[n]()}))),r},S.cache=function(e){return null!=e?(p=e,S):p},S.gamma=function(e){return null!=e?(g=e,S):g},S.nodata=function(e){return null!=e?(n=m(e),S):n},S};var rn=function(e){var t,n,r,i,a,s,o;if(2===(e=e.map((function(e){return new f(e)}))).length)t=e.map((function(e){return e.lab()})),a=t[0],s=t[1],i=function(e){var t=[0,1,2].map((function(t){return a[t]+e*(s[t]-a[t])}));return new f(t,"lab")};else if(3===e.length)n=e.map((function(e){return e.lab()})),a=n[0],s=n[1],o=n[2],i=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*a[t]+2*(1-e)*e*s[t]+e*e*o[t]}));return new f(t,"lab")};else if(4===e.length){var u;r=e.map((function(e){return e.lab()})),a=r[0],s=r[1],o=r[2],u=r[3],i=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*(1-e)*a[t]+3*(1-e)*(1-e)*e*s[t]+3*(1-e)*e*e*o[t]+e*e*e*u[t]}));return new f(t,"lab")}}else if(5===e.length){var l=rn(e.slice(0,3)),c=rn(e.slice(2,5));i=function(e){return e<.5?l(2*e):c(2*(e-.5))}}return i},an=function(e,t,n){if(!an[n])throw new Error("unknown blend mode "+n);return an[n](e,t)},sn=function(e){return function(t,n){var r=m(n).rgb(),i=m(t).rgb();return m.rgb(e(r,i))}},on=function(e){return function(t,n){var r=[];return r[0]=e(t[0],n[0]),r[1]=e(t[1],n[1]),r[2]=e(t[2],n[2]),r}};an.normal=sn(on((function(e){return e}))),an.multiply=sn(on((function(e,t){return e*t/255}))),an.screen=sn(on((function(e,t){return 255*(1-(1-e/255)*(1-t/255))}))),an.overlay=sn(on((function(e,t){return t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255))}))),an.darken=sn(on((function(e,t){return e>t?t:e}))),an.lighten=sn(on((function(e,t){return e>t?e:t}))),an.dodge=sn(on((function(e,t){return 255===e||(e=t/255*255/(1-e/255))>255?255:e}))),an.burn=sn(on((function(e,t){return 255*(1-(1-t/255)/(e/255))})));for(var un=an,ln=o.type,cn=o.clip_rgb,dn=o.TWOPI,hn=Math.pow,fn=Math.sin,pn=Math.cos,mn=Math.floor,gn=Math.random,vn=Math.log,yn=Math.pow,_n=Math.floor,bn=Math.abs,Tn=function(e,t){void 0===t&&(t=null);var n={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===a(e)&&(e=Object.values(e)),e.forEach((function(e){t&&"object"===a(e)&&(e=e[t]),null==e||isNaN(e)||(n.values.push(e),n.sum+=e,e<n.min&&(n.min=e),e>n.max&&(n.max=e),n.count+=1)})),n.domain=[n.min,n.max],n.limits=function(e,t){return Sn(n,e,t)},n},Sn=function(e,t,n){void 0===t&&(t="equal"),void 0===n&&(n=7),"array"==a(e)&&(e=Tn(e));var r=e.min,i=e.max,s=e.values.sort((function(e,t){return e-t}));if(1===n)return[r,i];var o=[];if("c"===t.substr(0,1)&&(o.push(r),o.push(i)),"e"===t.substr(0,1)){o.push(r);for(var u=1;u<n;u++)o.push(r+u/n*(i-r));o.push(i)}else if("l"===t.substr(0,1)){if(r<=0)throw new Error("Logarithmic scales are only possible for values > 0");var l=Math.LOG10E*vn(r),c=Math.LOG10E*vn(i);o.push(r);for(var d=1;d<n;d++)o.push(yn(10,l+d/n*(c-l)));o.push(i)}else if("q"===t.substr(0,1)){o.push(r);for(var h=1;h<n;h++){var f=(s.length-1)*h/n,p=_n(f);if(p===f)o.push(s[p]);else{var m=f-p;o.push(s[p]*(1-m)+s[p+1]*m)}}o.push(i)}else if("k"===t.substr(0,1)){var g,v=s.length,y=new Array(v),_=new Array(n),b=!0,T=0,S=null;(S=[]).push(r);for(var w=1;w<n;w++)S.push(r+w/n*(i-r));for(S.push(i);b;){for(var k=0;k<n;k++)_[k]=0;for(var E=0;E<v;E++)for(var C=s[E],x=Number.MAX_VALUE,I=void 0,A=0;A<n;A++){var O=bn(S[A]-C);O<x&&(x=O,I=A),_[I]++,y[E]=I}for(var P=new Array(n),L=0;L<n;L++)P[L]=null;for(var D=0;D<v;D++)null===P[g=y[D]]?P[g]=s[D]:P[g]+=s[D];for(var R=0;R<n;R++)P[R]*=1/_[R];b=!1;for(var M=0;M<n;M++)if(P[M]!==S[M]){b=!0;break}S=P,++T>200&&(b=!1)}for(var N={},U=0;U<n;U++)N[U]=[];for(var F=0;F<v;F++)N[g=y[F]].push(s[F]);for(var B=[],j=0;j<n;j++)B.push(N[j][0]),B.push(N[j][N[j].length-1]);B=B.sort((function(e,t){return e-t})),o.push(B[0]);for(var H=1;H<B.length;H+=2){var V=B[H];isNaN(V)||-1!==o.indexOf(V)||o.push(V)}}return o},wn={analyze:Tn,limits:Sn},kn=Math.sqrt,En=Math.atan2,Cn=Math.abs,xn=Math.cos,In=Math.PI,An={cool:function(){return nn([m.hsl(180,1,.9),m.hsl(250,.7,.4)])},hot:function(){return nn(["#000","#f00","#ff0","#fff"]).mode("rgb")}},On={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Pn=0,Ln=Object.keys(On);Pn<Ln.length;Pn+=1){var Dn=Ln[Pn];On[Dn.toLowerCase()]=On[Dn]}var Rn=On;return m.average=function(e,t,n){void 0===t&&(t="lrgb"),void 0===n&&(n=null);var r=e.length;n||(n=Array.from(new Array(r)).map((function(){return 1})));var i=r/n.reduce((function(e,t){return e+t}));if(n.forEach((function(e,t){n[t]*=i})),e=e.map((function(e){return new f(e)})),"lrgb"===t)return Jt(e,n);for(var a=e.shift(),s=a.get(t),o=[],u=0,l=0,c=0;c<s.length;c++)if(s[c]=(s[c]||0)*n[0],o.push(isNaN(s[c])?0:n[0]),"h"===t.charAt(c)&&!isNaN(s[c])){var d=s[c]/180*Kt;u+=Zt(d)*n[0],l+=Yt(d)*n[0]}var h=a.alpha()*n[0];e.forEach((function(e,r){var i=e.get(t);h+=e.alpha()*n[r+1];for(var a=0;a<s.length;a++)if(!isNaN(i[a]))if(o[a]+=n[r+1],"h"===t.charAt(a)){var c=i[a]/180*Kt;u+=Zt(c)*n[r+1],l+=Yt(c)*n[r+1]}else s[a]+=i[a]*n[r+1]}));for(var p=0;p<s.length;p++)if("h"===t.charAt(p)){for(var m=Qt(l/o[p],u/o[p])/Kt*180;m<0;)m+=360;for(;m>=360;)m-=360;s[p]=m}else s[p]=s[p]/o[p];return h/=r,new f(s,t).alpha(h>.99999?1:h,!0)},m.bezier=function(e){var t=rn(e);return t.scale=function(){return nn(t)},t},m.blend=un,m.cubehelix=function(e,t,n,r,i){void 0===e&&(e=300),void 0===t&&(t=-1.5),void 0===n&&(n=1),void 0===r&&(r=1),void 0===i&&(i=[0,1]);var a,s=0;"array"===ln(i)?a=i[1]-i[0]:(a=0,i=[i,i]);var o=function(o){var u=dn*((e+120)/360+t*o),l=hn(i[0]+a*o,r),c=(0!==s?n[0]+o*s:n)*l*(1-l)/2,d=pn(u),h=fn(u);return m(cn([255*(l+c*(-.14861*d+1.78277*h)),255*(l+c*(-.29227*d-.90649*h)),255*(l+c*(1.97294*d)),1]))};return o.start=function(t){return null==t?e:(e=t,o)},o.rotations=function(e){return null==e?t:(t=e,o)},o.gamma=function(e){return null==e?r:(r=e,o)},o.hue=function(e){return null==e?n:("array"===ln(n=e)?0==(s=n[1]-n[0])&&(n=n[1]):s=0,o)},o.lightness=function(e){return null==e?i:("array"===ln(e)?(i=e,a=e[1]-e[0]):(i=[e,e],a=0),o)},o.scale=function(){return m.scale(o)},o.hue(n),o},m.mix=m.interpolate=jt,m.random=function(){for(var e="#",t=0;t<6;t++)e+="0123456789abcdef".charAt(mn(16*gn()));return new f(e,"hex")},m.scale=nn,m.analyze=wn.analyze,m.contrast=function(e,t){e=new f(e),t=new f(t);var n=e.luminance(),r=t.luminance();return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)},m.deltaE=function(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=1),e=new f(e),t=new f(t);for(var i=Array.from(e.lab()),a=i[0],s=i[1],o=i[2],u=Array.from(t.lab()),l=u[0],c=u[1],d=u[2],h=kn(s*s+o*o),p=kn(c*c+d*d),m=a<16?.511:.040975*a/(1+.01765*a),g=.0638*h/(1+.0131*h)+.638,v=h<1e-6?0:180*En(o,s)/In;v<0;)v+=360;for(;v>=360;)v-=360;var y=v>=164&&v<=345?.56+Cn(.2*xn(In*(v+168)/180)):.36+Cn(.4*xn(In*(v+35)/180)),_=h*h*h*h,b=kn(_/(_+1900)),T=g*(b*y+1-b),S=h-p,w=s-c,k=o-d,E=(a-l)/(n*m),C=S/(r*g);return kn(E*E+C*C+(w*w+k*k-S*S)/(T*T))},m.distance=function(e,t,n){void 0===n&&(n="lab"),e=new f(e),t=new f(t);var r=e.get(n),i=t.get(n),a=0;for(var s in r){var o=(r[s]||0)-(i[s]||0);a+=o*o}return Math.sqrt(a)},m.limits=wn.limits,m.valid=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];try{return new(Function.prototype.bind.apply(f,[null].concat(e))),!0}catch(e){return!1}},m.scales=An,m.colors=_t,m.brewer=Rn,m}()},94605:e=>{e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},29076:(e,t,n)=>{var r=n(62366);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},5822:(e,t,n)=>{var r=n(46802),i=n(22275),a=n(50430),s=r("unscopables"),o=Array.prototype;null==o[s]&&a(o,s,i(null)),e.exports=function(e){o[s][e]=!0}},25528:(e,t,n)=>{"use strict";var r=n(50189).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},72814:e=>{e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},4905:(e,t,n)=>{var r=n(62366);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},16607:(e,t,n)=>{"use strict";var r=n(72758).forEach,i=n(31853);e.exports=i("forEach")?function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}:[].forEach},5029:(e,t,n)=>{var r=n(40678),i=n(74479),a=n(6971),s=function(e){return function(t,n,s){var o,u=r(t),l=i(u.length),c=a(s,l);if(e&&n!=n){for(;l>c;)if((o=u[c++])!=o)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},72758:(e,t,n)=>{var r=n(17755),i=n(62901),a=n(87615),s=n(74479),o=n(17021),u=[].push,l=function(e){var t=1==e,n=2==e,l=3==e,c=4==e,d=6==e,h=5==e||d;return function(f,p,m,g){for(var v,y,_=a(f),b=i(_),T=r(p,m,3),S=s(b.length),w=0,k=g||o,E=t?k(f,S):n?k(f,0):void 0;S>w;w++)if((h||w in b)&&(y=T(v=b[w],w,_),e))if(t)E[w]=y;else if(y)switch(e){case 3:return!0;case 5:return v;case 6:return w;case 2:u.call(E,v)}else if(c)return!1;return d?-1:l||c?c:E}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6)}},95611:(e,t,n)=>{var r=n(25061),i=n(46802),a=n(24101),s=i("species");e.exports=function(e){return a>=51||!r((function(){var t=[];return(t.constructor={})[s]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},62040:(e,t,n)=>{var r=n(94605),i=n(87615),a=n(62901),s=n(74479),o=function(e){return function(t,n,o,u){r(n);var l=i(t),c=a(l),d=s(l.length),h=e?d-1:0,f=e?-1:1;if(o<2)for(;;){if(h in c){u=c[h],h+=f;break}if(h+=f,e?h<0:d<=h)throw TypeError("Reduce of empty array with no initial value")}for(;e?h>=0:d>h;h+=f)h in c&&(u=n(u,c[h],h,l));return u}};e.exports={left:o(!1),right:o(!0)}},17021:(e,t,n)=>{var r=n(62366),i=n(20119),a=n(46802)("species");e.exports=function(e,t){var n;return i(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[a])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},17755:(e,t,n)=>{var r=n(94605);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},70888:(e,t,n)=>{var r=n(4905);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var a=e.return;throw void 0!==a&&r(a.call(e)),t}}},13165:(e,t,n)=>{var r=n(46802)("iterator"),i=!1;try{var a=0,s={next:function(){return{done:!!a++}},return:function(){i=!0}};s[r]=function(){return this},Array.from(s,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var a={};a[r]=function(){return{next:function(){return{done:n=!0}}}},e(a)}catch(e){}return n}},75489:e=>{var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},20486:(e,t,n)=>{var r=n(75489),i=n(46802)("toStringTag"),a="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:a?r(t):"Object"==(s=r(t))&&"function"==typeof t.callee?"Arguments":s}},53769:(e,t,n)=>{"use strict";var r=n(86846),i=n(81738).getWeakData,a=n(4905),s=n(62366),o=n(72814),u=n(98971),l=n(72758),c=n(51900),d=n(50684),h=d.set,f=d.getterFor,p=l.find,m=l.findIndex,g=0,v=function(e){return e.frozen||(e.frozen=new y)},y=function(){this.entries=[]},_=function(e,t){return p(e.entries,(function(e){return e[0]===t}))};y.prototype={get:function(e){var t=_(this,e);if(t)return t[1]},has:function(e){return!!_(this,e)},set:function(e,t){var n=_(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=m(this.entries,(function(t){return t[0]===e}));return~t&&this.entries.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,l){var d=e((function(e,r){o(e,d,t),h(e,{type:t,id:g++,frozen:void 0}),null!=r&&u(r,e[l],e,n)})),p=f(t),m=function(e,t,n){var r=p(e),s=i(a(t),!0);return!0===s?v(r).set(t,n):s[r.id]=n,e};return r(d.prototype,{delete:function(e){var t=p(this);if(!s(e))return!1;var n=i(e);return!0===n?v(t).delete(e):n&&c(n,t.id)&&delete n[t.id]},has:function(e){var t=p(this);if(!s(e))return!1;var n=i(e);return!0===n?v(t).has(e):n&&c(n,t.id)}}),r(d.prototype,n?{get:function(e){var t=p(this);if(s(e)){var n=i(e);return!0===n?v(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return m(this,e,t)}}:{add:function(e){return m(this,e,!0)}}),d}}},66606:(e,t,n)=>{"use strict";var r=n(29638),i=n(45001),a=n(91092),s=n(64246),o=n(81738),u=n(98971),l=n(72814),c=n(62366),d=n(25061),h=n(13165),f=n(40606),p=n(3419);e.exports=function(e,t,n,m,g){var v=i[e],y=v&&v.prototype,_=v,b=m?"set":"add",T={},S=function(e){var t=y[e];s(y,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(g&&!c(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return g&&!c(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(g&&!c(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(a(e,"function"!=typeof v||!(g||y.forEach&&!d((function(){(new v).entries().next()})))))_=n.getConstructor(t,e,m,b),o.REQUIRED=!0;else if(a(e,!0)){var w=new _,k=w[b](g?{}:-0,1)!=w,E=d((function(){w.has(1)})),C=h((function(e){new v(e)})),x=!g&&d((function(){for(var e=new v,t=5;t--;)e[b](t,t);return!e.has(-0)}));C||((_=t((function(t,n){l(t,_,e);var r=p(new v,t,_);return null!=n&&u(n,r[b],r,m),r}))).prototype=y,y.constructor=_),(E||x)&&(S("delete"),S("has"),m&&S("get")),(x||k)&&S(b),g&&y.clear&&delete y.clear}return T[e]=_,r({global:!0,forced:_!=v},T),f(_,e),g||n.setStrong(_,e,m),_}},46810:(e,t,n)=>{var r=n(51900),i=n(62466),a=n(8117),s=n(56462);e.exports=function(e,t){for(var n=i(t),o=s.f,u=a.f,l=0;l<n.length;l++){var c=n[l];r(e,c)||o(e,c,u(t,c))}}},10149:(e,t,n)=>{var r=n(25061);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},62141:(e,t,n)=>{"use strict";var r=n(61151).IteratorPrototype,i=n(22275),a=n(86034),s=n(40606),o=n(80501),u=function(){return this};e.exports=function(e,t,n){var l=t+" Iterator";return e.prototype=i(r,{next:a(1,n)}),s(e,l,!1,!0),o[l]=u,e}},50430:(e,t,n)=>{var r=n(11502),i=n(56462),a=n(86034);e.exports=r?function(e,t,n){return i.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},86034:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},30645:(e,t,n)=>{"use strict";var r=n(29638),i=n(62141),a=n(64320),s=n(22848),o=n(40606),u=n(50430),l=n(64246),c=n(46802),d=n(20013),h=n(80501),f=n(61151),p=f.IteratorPrototype,m=f.BUGGY_SAFARI_ITERATORS,g=c("iterator"),v="keys",y="values",_="entries",b=function(){return this};e.exports=function(e,t,n,c,f,T,S){i(n,t,c);var w,k,E,C=function(e){if(e===f&&P)return P;if(!m&&e in A)return A[e];switch(e){case v:case y:case _:return function(){return new n(this,e)}}return function(){return new n(this)}},x=t+" Iterator",I=!1,A=e.prototype,O=A[g]||A["@@iterator"]||f&&A[f],P=!m&&O||C(f),L="Array"==t&&A.entries||O;if(L&&(w=a(L.call(new e)),p!==Object.prototype&&w.next&&(d||a(w)===p||(s?s(w,p):"function"!=typeof w[g]&&u(w,g,b)),o(w,x,!0,!0),d&&(h[x]=b))),f==y&&O&&O.name!==y&&(I=!0,P=function(){return O.call(this)}),d&&!S||A[g]===P||u(A,g,P),h[t]=P,f)if(k={values:C(y),keys:T?P:C(v),entries:C(_)},S)for(E in k)(m||I||!(E in A))&&l(A,E,k[E]);else r({target:t,proto:!0,forced:m||I},k);return k}},11502:(e,t,n)=>{var r=n(25061);e.exports=!r((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},36009:(e,t,n)=>{var r=n(45001),i=n(62366),a=r.document,s=i(a)&&i(a.createElement);e.exports=function(e){return s?a.createElement(e):{}}},58514:e=>{e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},72089:e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},29638:(e,t,n)=>{var r=n(45001),i=n(8117).f,a=n(50430),s=n(64246),o=n(88506),u=n(46810),l=n(91092);e.exports=function(e,t){var n,c,d,h,f,p=e.target,m=e.global,g=e.stat;if(n=m?r:g?r[p]||o(p,{}):(r[p]||{}).prototype)for(c in t){if(h=t[c],d=e.noTargetGet?(f=i(n,c))&&f.value:n[c],!l(m?c:p+(g?".":"#")+c,e.forced)&&void 0!==d){if(typeof h==typeof d)continue;u(h,d)}(e.sham||d&&d.sham)&&a(h,"sham",!0),s(n,c,h,e)}}},25061:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},95453:(e,t,n)=>{"use strict";var r=n(50430),i=n(64246),a=n(25061),s=n(46802),o=n(44847),u=s("species"),l=!a((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),c=!a((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,d){var h=s(e),f=!a((function(){var t={};return t[h]=function(){return 7},7!=""[e](t)})),p=f&&!a((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return t=!0,null},n[h](""),!t}));if(!f||!p||"replace"===e&&!l||"split"===e&&!c){var m=/./[h],g=n(h,""[e],(function(e,t,n,r,i){return t.exec===o?f&&!i?{done:!0,value:m.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}})),v=g[0],y=g[1];i(String.prototype,e,v),i(RegExp.prototype,h,2==t?function(e,t){return y.call(e,this,t)}:function(e){return y.call(e,this)}),d&&r(RegExp.prototype[h],"sham",!0)}}},98218:(e,t,n)=>{var r=n(25061);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},21501:(e,t,n)=>{var r=n(6809);e.exports=r("native-function-to-string",Function.toString)},3425:(e,t,n)=>{var r=n(53757),i=n(45001),a=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?a(r[e])||a(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},26354:(e,t,n)=>{var r=n(20486),i=n(80501),a=n(46802)("iterator");e.exports=function(e){if(null!=e)return e[a]||e["@@iterator"]||i[r(e)]}},45001:(e,t,n)=>{var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||Function("return this")()},51900:e=>{var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},92499:e=>{e.exports={}},12118:(e,t,n)=>{var r=n(3425);e.exports=r("document","documentElement")},17788:(e,t,n)=>{var r=n(11502),i=n(25061),a=n(36009);e.exports=!r&&!i((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},62901:(e,t,n)=>{var r=n(25061),i=n(75489),a="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?a.call(e,""):Object(e)}:Object},3419:(e,t,n)=>{var r=n(62366),i=n(22848);e.exports=function(e,t,n){var a,s;return i&&"function"==typeof(a=t.constructor)&&a!==n&&r(s=a.prototype)&&s!==n.prototype&&i(e,s),e}},81738:(e,t,n)=>{var r=n(92499),i=n(62366),a=n(51900),s=n(56462).f,o=n(41050),u=n(98218),l=o("meta"),c=0,d=Object.isExtensible||function(){return!0},h=function(e){s(e,l,{value:{objectID:"O"+ ++c,weakData:{}}})},f=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,l)){if(!d(e))return"F";if(!t)return"E";h(e)}return e[l].objectID},getWeakData:function(e,t){if(!a(e,l)){if(!d(e))return!0;if(!t)return!1;h(e)}return e[l].weakData},onFreeze:function(e){return u&&f.REQUIRED&&d(e)&&!a(e,l)&&h(e),e}};r[l]=!0},50684:(e,t,n)=>{var r,i,a,s=n(77650),o=n(45001),u=n(62366),l=n(50430),c=n(51900),d=n(61695),h=n(92499),f=o.WeakMap;if(s){var p=new f,m=p.get,g=p.has,v=p.set;r=function(e,t){return v.call(p,e,t),t},i=function(e){return m.call(p,e)||{}},a=function(e){return g.call(p,e)}}else{var y=d("state");h[y]=!0,r=function(e,t){return l(e,y,t),t},i=function(e){return c(e,y)?e[y]:{}},a=function(e){return c(e,y)}}e.exports={set:r,get:i,has:a,enforce:function(e){return a(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},55557:(e,t,n)=>{var r=n(46802),i=n(80501),a=r("iterator"),s=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||s[a]===e)}},20119:(e,t,n)=>{var r=n(75489);e.exports=Array.isArray||function(e){return"Array"==r(e)}},91092:(e,t,n)=>{var r=n(25061),i=/#|\.prototype\./,a=function(e,t){var n=o[s(e)];return n==l||n!=u&&("function"==typeof t?r(t):!!t)},s=a.normalize=function(e){return String(e).replace(i,".").toLowerCase()},o=a.data={},u=a.NATIVE="N",l=a.POLYFILL="P";e.exports=a},62366:e=>{e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},20013:e=>{e.exports=!1},98971:(e,t,n)=>{var r=n(4905),i=n(55557),a=n(74479),s=n(17755),o=n(26354),u=n(70888),l=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,n,c,d){var h,f,p,m,g,v,y,_=s(t,n,c?2:1);if(d)h=e;else{if("function"!=typeof(f=o(e)))throw TypeError("Target is not iterable");if(i(f)){for(p=0,m=a(e.length);m>p;p++)if((g=c?_(r(y=e[p])[0],y[1]):_(e[p]))&&g instanceof l)return g;return new l(!1)}h=f.call(e)}for(v=h.next;!(y=v.call(h)).done;)if("object"==typeof(g=u(h,_,y.value,c))&&g&&g instanceof l)return g;return new l(!1)}).stop=function(e){return new l(!0,e)}},61151:(e,t,n)=>{"use strict";var r,i,a,s=n(64320),o=n(50430),u=n(51900),l=n(46802),c=n(20013),d=l("iterator"),h=!1;[].keys&&("next"in(a=[].keys())?(i=s(s(a)))!==Object.prototype&&(r=i):h=!0),null==r&&(r={}),c||u(r,d)||o(r,d,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},80501:e=>{e.exports={}},99262:(e,t,n)=>{var r=n(25061);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},77650:(e,t,n)=>{var r=n(45001),i=n(21501),a=r.WeakMap;e.exports="function"==typeof a&&/native code/.test(i.call(a))},71640:(e,t,n)=>{"use strict";var r=n(11502),i=n(25061),a=n(89749),s=n(72822),o=n(49265),u=n(87615),l=n(62901),c=Object.assign;e.exports=!c||i((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=c({},e)[n]||a(c({},t)).join("")!=r}))?function(e,t){for(var n=u(e),i=arguments.length,c=1,d=s.f,h=o.f;i>c;)for(var f,p=l(arguments[c++]),m=d?a(p).concat(d(p)):a(p),g=m.length,v=0;g>v;)f=m[v++],r&&!h.call(p,f)||(n[f]=p[f]);return n}:c},22275:(e,t,n)=>{var r=n(4905),i=n(56191),a=n(72089),s=n(92499),o=n(12118),u=n(36009),l=n(61695)("IE_PROTO"),c="prototype",d=function(){},h=function(){var e,t=u("iframe"),n=a.length,r="script",i="java"+r+":";for(t.style.display="none",o.appendChild(t),t.src=String(i),(e=t.contentWindow.document).open(),e.write("<"+r+">document.F=Object</"+r+">"),e.close(),h=e.F;n--;)delete h[c][a[n]];return h()};e.exports=Object.create||function(e,t){var n;return null!==e?(d[c]=r(e),n=new d,d[c]=null,n[l]=e):n=h(),void 0===t?n:i(n,t)},s[l]=!0},56191:(e,t,n)=>{var r=n(11502),i=n(56462),a=n(4905),s=n(89749);e.exports=r?Object.defineProperties:function(e,t){a(e);for(var n,r=s(t),o=r.length,u=0;o>u;)i.f(e,n=r[u++],t[n]);return e}},56462:(e,t,n)=>{var r=n(11502),i=n(17788),a=n(4905),s=n(76973),o=Object.defineProperty;t.f=r?o:function(e,t,n){if(a(e),t=s(t,!0),a(n),i)try{return o(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},8117:(e,t,n)=>{var r=n(11502),i=n(49265),a=n(86034),s=n(40678),o=n(76973),u=n(51900),l=n(17788),c=Object.getOwnPropertyDescriptor;t.f=r?c:function(e,t){if(e=s(e),t=o(t,!0),l)try{return c(e,t)}catch(e){}if(u(e,t))return a(!i.f.call(e,t),e[t])}},59219:(e,t,n)=>{var r=n(23855),i=n(72089).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},72822:(e,t)=>{t.f=Object.getOwnPropertySymbols},64320:(e,t,n)=>{var r=n(51900),i=n(87615),a=n(61695),s=n(10149),o=a("IE_PROTO"),u=Object.prototype;e.exports=s?Object.getPrototypeOf:function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?u:null}},23855:(e,t,n)=>{var r=n(51900),i=n(40678),a=n(5029).indexOf,s=n(92499);e.exports=function(e,t){var n,o=i(e),u=0,l=[];for(n in o)!r(s,n)&&r(o,n)&&l.push(n);for(;t.length>u;)r(o,n=t[u++])&&(~a(l,n)||l.push(n));return l}},89749:(e,t,n)=>{var r=n(23855),i=n(72089);e.exports=Object.keys||function(e){return r(e,i)}},49265:(e,t)=>{"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);t.f=i?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},22848:(e,t,n)=>{var r=n(4905),i=n(29076);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,a){return r(n),i(a),t?e.call(n,a):n.__proto__=a,n}}():void 0)},45085:(e,t,n)=>{"use strict";var r=n(20486),i={};i[n(46802)("toStringTag")]="z",e.exports="[object z]"!==String(i)?function(){return"[object "+r(this)+"]"}:i.toString},62466:(e,t,n)=>{var r=n(3425),i=n(59219),a=n(72822),s=n(4905);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(s(e)),n=a.f;return n?t.concat(n(e)):t}},7206:(e,t,n)=>{var r=n(45001),i=n(9522).trim,a=n(49309),s=r.parseInt,o=/^[+-]?0[Xx]/,u=8!==s(a+"08")||22!==s(a+"0x16");e.exports=u?function(e,t){var n=i(String(e));return s(n,t>>>0||(o.test(n)?16:10))}:s},53757:(e,t,n)=>{e.exports=n(45001)},86846:(e,t,n)=>{var r=n(64246);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},64246:(e,t,n)=>{var r=n(45001),i=n(6809),a=n(50430),s=n(51900),o=n(88506),u=n(21501),l=n(50684),c=l.get,d=l.enforce,h=String(u).split("toString");i("inspectSource",(function(e){return u.call(e)})),(e.exports=function(e,t,n,i){var u=!!i&&!!i.unsafe,l=!!i&&!!i.enumerable,c=!!i&&!!i.noTargetGet;"function"==typeof n&&("string"!=typeof t||s(n,"name")||a(n,"name",t),d(n).source=h.join("string"==typeof t?t:"")),e!==r?(u?!c&&e[t]&&(l=!0):delete e[t],l?e[t]=n:a(e,t,n)):l?e[t]=n:o(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||u.call(this)}))},41847:(e,t,n)=>{var r=n(75489),i=n(44847);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var a=n.call(e,t);if("object"!=typeof a)throw TypeError("RegExp exec method returned something other than an Object or null");return a}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},44847:(e,t,n)=>{"use strict";var r,i,a=n(5268),s=RegExp.prototype.exec,o=String.prototype.replace,u=s,l=(r=/a/,i=/b*/g,s.call(r,"a"),s.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),c=void 0!==/()??/.exec("")[1];(l||c)&&(u=function(e){var t,n,r,i,u=this;return c&&(n=new RegExp("^"+u.source+"$(?!\\s)",a.call(u))),l&&(t=u.lastIndex),r=s.call(u,e),l&&r&&(u.lastIndex=u.global?r.index+r[0].length:t),c&&r&&r.length>1&&o.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),e.exports=u},5268:(e,t,n)=>{"use strict";var r=n(4905);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},64475:e=>{e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},88506:(e,t,n)=>{var r=n(45001),i=n(50430);e.exports=function(e,t){try{i(r,e,t)}catch(n){r[e]=t}return t}},40606:(e,t,n)=>{var r=n(56462).f,i=n(51900),a=n(46802)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,a)&&r(e,a,{configurable:!0,value:t})}},61695:(e,t,n)=>{var r=n(6809),i=n(41050),a=r("keys");e.exports=function(e){return a[e]||(a[e]=i(e))}},19982:(e,t,n)=>{var r=n(45001),i=n(88506),a="__core-js_shared__",s=r[a]||i(a,{});e.exports=s},6809:(e,t,n)=>{var r=n(20013),i=n(19982);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.4.0",mode:r?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},31853:(e,t,n)=>{"use strict";var r=n(25061);e.exports=function(e,t){var n=[][e];return!n||!r((function(){n.call(null,t||function(){throw 1},1)}))}},50189:(e,t,n)=>{var r=n(90321),i=n(64475),a=function(e){return function(t,n){var a,s,o=String(i(t)),u=r(n),l=o.length;return u<0||u>=l?e?"":void 0:(a=o.charCodeAt(u))<55296||a>56319||u+1===l||(s=o.charCodeAt(u+1))<56320||s>57343?e?o.charAt(u):a:e?o.slice(u,u+2):s-56320+(a-55296<<10)+65536}};e.exports={codeAt:a(!1),charAt:a(!0)}},9522:(e,t,n)=>{var r=n(64475),i="["+n(49309)+"]",a=RegExp("^"+i+i+"*"),s=RegExp(i+i+"*$"),o=function(e){return function(t){var n=String(r(t));return 1&e&&(n=n.replace(a,"")),2&e&&(n=n.replace(s,"")),n}};e.exports={start:o(1),end:o(2),trim:o(3)}},6971:(e,t,n)=>{var r=n(90321),i=Math.max,a=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):a(n,t)}},40678:(e,t,n)=>{var r=n(62901),i=n(64475);e.exports=function(e){return r(i(e))}},90321:e=>{var t=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:t)(e)}},74479:(e,t,n)=>{var r=n(90321),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},87615:(e,t,n)=>{var r=n(64475);e.exports=function(e){return Object(r(e))}},76973:(e,t,n)=>{var r=n(62366);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},41050:e=>{var t=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++t+n).toString(36)}},84583:(e,t,n)=>{var r=n(3425);e.exports=r("navigator","userAgent")||""},24101:(e,t,n)=>{var r,i,a=n(45001),s=n(84583),o=a.process,u=o&&o.versions,l=u&&u.v8;l?i=(r=l.split("."))[0]+r[1]:s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(i=r[1]),e.exports=i&&+i},46802:(e,t,n)=>{var r=n(45001),i=n(6809),a=n(41050),s=n(99262),o=r.Symbol,u=i("wks");e.exports=function(e){return u[e]||(u[e]=s&&o[e]||(s?o:a)("Symbol."+e))}},49309:e=>{e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},15296:(e,t,n)=>{"use strict";var r=n(29638),i=n(72758).filter;r({target:"Array",proto:!0,forced:!n(95611)("filter")},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},94386:(e,t,n)=>{"use strict";var r=n(29638),i=n(16607);r({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},48868:(e,t,n)=>{"use strict";var r=n(40678),i=n(5822),a=n(80501),s=n(50684),o=n(30645),u="Array Iterator",l=s.set,c=s.getterFor(u);e.exports=o(Array,"Array",(function(e,t){l(this,{type:u,target:r(e),index:0,kind:t})}),(function(){var e=c(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),a.Arguments=a.Array,i("keys"),i("values"),i("entries")},82937:(e,t,n)=>{"use strict";var r=n(29638),i=n(62040).left;r({target:"Array",proto:!0,forced:n(31853)("reduce")},{reduce:function(e){return i(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},66403:(e,t,n)=>{var r=n(11502),i=n(56462).f,a=Function.prototype,s=a.toString,o=/^\s*function ([^ (]*)/,u="name";r&&!(u in a)&&i(a,u,{configurable:!0,get:function(){try{return s.call(this).match(o)[1]}catch(e){return""}}})},96609:(e,t,n)=>{var r=n(29638),i=n(71640);r({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},92274:(e,t,n)=>{var r=n(64246),i=n(45085),a=Object.prototype;i!==a.toString&&r(a,"toString",i,{unsafe:!0})},68268:(e,t,n)=>{var r=n(29638),i=n(7206);r({global:!0,forced:parseInt!=i},{parseInt:i})},42295:(e,t,n)=>{"use strict";var r=n(29638),i=n(44847);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},81874:(e,t,n)=>{"use strict";var r=n(50189).charAt,i=n(50684),a=n(30645),s="String Iterator",o=i.set,u=i.getterFor(s);a(String,"String",(function(e){o(this,{type:s,string:String(e),index:0})}),(function(){var e,t=u(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=r(n,i),t.index+=e.length,{value:e,done:!1})}))},52963:(e,t,n)=>{"use strict";var r=n(95453),i=n(4905),a=n(74479),s=n(64475),o=n(25528),u=n(41847);r("match",1,(function(e,t,n){return[function(t){var n=s(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var s=i(e),l=String(this);if(!s.global)return u(s,l);var c=s.unicode;s.lastIndex=0;for(var d,h=[],f=0;null!==(d=u(s,l));){var p=String(d[0]);h[f]=p,""===p&&(s.lastIndex=o(l,a(s.lastIndex),c)),f++}return 0===f?null:h}]}))},34994:(e,t,n)=>{"use strict";var r=n(95453),i=n(4905),a=n(87615),s=n(74479),o=n(90321),u=n(64475),l=n(25528),c=n(41847),d=Math.max,h=Math.min,f=Math.floor,p=/\$([$&'`]|\d\d?|<[^>]*>)/g,m=/\$([$&'`]|\d\d?)/g;r("replace",2,(function(e,t,n){return[function(n,r){var i=u(this),a=null==n?void 0:n[e];return void 0!==a?a.call(n,i,r):t.call(String(i),n,r)},function(e,a){var u=n(t,e,this,a);if(u.done)return u.value;var f=i(e),p=String(this),m="function"==typeof a;m||(a=String(a));var g=f.global;if(g){var v=f.unicode;f.lastIndex=0}for(var y=[];;){var _=c(f,p);if(null===_)break;if(y.push(_),!g)break;""===String(_[0])&&(f.lastIndex=l(p,s(f.lastIndex),v))}for(var b,T="",S=0,w=0;w<y.length;w++){_=y[w];for(var k=String(_[0]),E=d(h(o(_.index),p.length),0),C=[],x=1;x<_.length;x++)C.push(void 0===(b=_[x])?b:String(b));var I=_.groups;if(m){var A=[k].concat(C,E,p);void 0!==I&&A.push(I);var O=String(a.apply(void 0,A))}else O=r(k,p,E,C,I,a);E>=S&&(T+=p.slice(S,E)+O,S=E+k.length)}return T+p.slice(S)}];function r(e,n,r,i,s,o){var u=r+e.length,l=i.length,c=m;return void 0!==s&&(s=a(s),c=p),t.call(o,c,(function(t,a){var o;switch(a.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(u);case"<":o=s[a.slice(1,-1)];break;default:var c=+a;if(0===c)return t;if(c>l){var d=f(c/10);return 0===d?t:d<=l?void 0===i[d-1]?a.charAt(1):i[d-1]+a.charAt(1):t}o=i[c-1]}return void 0===o?"":o}))}}))},31341:(e,t,n)=>{"use strict";var r,i=n(45001),a=n(86846),s=n(81738),o=n(66606),u=n(53769),l=n(62366),c=n(50684).enforce,d=n(77650),h=!i.ActiveXObject&&"ActiveXObject"in i,f=Object.isExtensible,p=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},m=e.exports=o("WeakMap",p,u,!0,!0);if(d&&h){r=u.getConstructor(p,"WeakMap",!0),s.REQUIRED=!0;var g=m.prototype,v=g.delete,y=g.has,_=g.get,b=g.set;a(g,{delete:function(e){if(l(e)&&!f(e)){var t=c(this);return t.frozen||(t.frozen=new r),v.call(this,e)||t.frozen.delete(e)}return v.call(this,e)},has:function(e){if(l(e)&&!f(e)){var t=c(this);return t.frozen||(t.frozen=new r),y.call(this,e)||t.frozen.has(e)}return y.call(this,e)},get:function(e){if(l(e)&&!f(e)){var t=c(this);return t.frozen||(t.frozen=new r),y.call(this,e)?_.call(this,e):t.frozen.get(e)}return _.call(this,e)},set:function(e,t){if(l(e)&&!f(e)){var n=c(this);n.frozen||(n.frozen=new r),y.call(this,e)?b.call(this,e,t):n.frozen.set(e,t)}else b.call(this,e,t);return this}})}},98457:(e,t,n)=>{var r=n(45001),i=n(58514),a=n(16607),s=n(50430);for(var o in i){var u=r[o],l=u&&u.prototype;if(l&&l.forEach!==a)try{s(l,"forEach",a)}catch(e){l.forEach=a}}},54861:(e,t,n)=>{var r=n(45001),i=n(58514),a=n(48868),s=n(50430),o=n(46802),u=o("iterator"),l=o("toStringTag"),c=a.values;for(var d in i){var h=r[d],f=h&&h.prototype;if(f){if(f[u]!==c)try{s(f,u,c)}catch(e){f[u]=c}if(f[l]||s(f,l,d),i[d])for(var p in a)if(f[p]!==a[p])try{s(f,p,a[p])}catch(e){f[p]=a[p]}}}},3384:(e,t,n)=>{var r,i=void 0!==n.g?n.g:"undefined"!=typeof window?window:{},a=n(58421);"undefined"!=typeof document?r=document:(r=i["__GLOBAL_DOCUMENT_CACHE@4"])||(r=i["__GLOBAL_DOCUMENT_CACHE@4"]=a),e.exports=r},51562:(e,t,n)=>{var r;r="undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{},e.exports=r},63848:e=>{e.exports=function(e){if(!e)return!1;var n=t.call(e);return"[object Function]"===n||"function"==typeof e&&"[object RegExp]"!==n||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var t=Object.prototype.toString},19389:(e,t)=>{function n(e){if(e&&"object"==typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"==typeof e)return s[e];var n,a=String(e);return(n=r[a.toLowerCase()])?n:(n=i[a.toLowerCase()])||(1===a.length?a.charCodeAt(0):void 0)}n.isEventKey=function(e,t){if(e&&"object"==typeof e){var n=e.which||e.keyCode||e.charCode;if(null==n)return!1;if("string"==typeof t){var a;if(a=r[t.toLowerCase()])return a===n;if(a=i[t.toLowerCase()])return a===n}else if("number"==typeof t)return t===n;return!1}};var r=(t=e.exports=n).code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},i=t.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(a=97;a<123;a++)r[String.fromCharCode(a)]=a-32;for(var a=48;a<58;a++)r[a-48]=a;for(a=1;a<13;a++)r["f"+a]=a+111;for(a=0;a<10;a++)r["numpad "+a]=a+96;var s=t.names=t.title={};for(a in r)s[r[a]]=a;for(var o in i)r[o]=i[o]},40001:(e,t,n)=>{var r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,o=parseInt,u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l="object"==typeof self&&self&&self.Object===Object&&self,c=u||l||Function("return this")(),d=Object.prototype.toString,h=Math.max,f=Math.min,p=function(){return c.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=a.test(e);return n||s.test(e)?o(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,a,s,o,u,l=0,c=!1,d=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,a=i;return r=i=void 0,l=t,s=e.apply(a,n)}function _(e){var n=e-u;return void 0===u||n>=t||n<0||d&&e-l>=a}function b(){var e=p();if(_(e))return T(e);o=setTimeout(b,function(e){var n=t-(e-u);return d?f(n,a-(e-l)):n}(e))}function T(e){return o=void 0,v&&r?y(e):(r=i=void 0,s)}function S(){var e=p(),n=_(e);if(r=arguments,i=this,u=e,n){if(void 0===o)return function(e){return l=e,o=setTimeout(b,t),c?y(e):s}(u);if(d)return o=setTimeout(b,t),y(u)}return void 0===o&&(o=setTimeout(b,t)),s}return t=g(t)||0,m(n)&&(c=!!n.leading,a=(d="maxWait"in n)?h(g(n.maxWait)||0,t):a,v="trailing"in n?!!n.trailing:v),S.cancel=function(){void 0!==o&&clearTimeout(o),l=0,r=u=i=o=void 0},S.flush=function(){return void 0===o?s:T(p())},S}},98511:(e,t,n)=>{var r,i="__lodash_hash_undefined__",a="[object Function]",s="[object GeneratorFunction]",o=/^\[object .+?Constructor\]$/,u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l="object"==typeof self&&self&&self.Object===Object&&self,c=u||l||Function("return this")(),d=Array.prototype,h=Function.prototype,f=Object.prototype,p=c["__core-js_shared__"],m=(r=/[^.]+$/.exec(p&&p.keys&&p.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",g=h.toString,v=f.hasOwnProperty,y=f.toString,_=RegExp("^"+g.call(v).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),b=d.splice,T=I(c,"Map"),S=I(Object,"create");function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function k(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function E(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function C(e,t){for(var n,r,i=e.length;i--;)if((n=e[i][0])===(r=t)||n!=n&&r!=r)return i;return-1}function x(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function I(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!O(e)||m&&m in e)return!1;var t=function(e){var t=O(e)?y.call(e):"";return t==a||t==s}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?_:o;return t.test(function(e){if(null!=e){try{return g.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function A(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var s=e.apply(this,r);return n.cache=a.set(i,s),s};return n.cache=new(A.Cache||E),n}function O(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}w.prototype.clear=function(){this.__data__=S?S(null):{}},w.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},w.prototype.get=function(e){var t=this.__data__;if(S){var n=t[e];return n===i?void 0:n}return v.call(t,e)?t[e]:void 0},w.prototype.has=function(e){var t=this.__data__;return S?void 0!==t[e]:v.call(t,e)},w.prototype.set=function(e,t){return this.__data__[e]=S&&void 0===t?i:t,this},k.prototype.clear=function(){this.__data__=[]},k.prototype.delete=function(e){var t=this.__data__,n=C(t,e);return!(n<0||(n==t.length-1?t.pop():b.call(t,n,1),0))},k.prototype.get=function(e){var t=this.__data__,n=C(t,e);return n<0?void 0:t[n][1]},k.prototype.has=function(e){return C(this.__data__,e)>-1},k.prototype.set=function(e,t){var n=this.__data__,r=C(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},E.prototype.clear=function(){this.__data__={hash:new w,map:new(T||k),string:new w}},E.prototype.delete=function(e){return x(this,e).delete(e)},E.prototype.get=function(e){return x(this,e).get(e)},E.prototype.has=function(e){return x(this,e).has(e)},E.prototype.set=function(e,t){return x(this,e).set(e,t),this},A.Cache=E,e.exports=A},50200:(e,t,n)=>{var r="Expected a function",i=NaN,a="[object Symbol]",s=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt,d="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,f=d||h||Function("return this")(),p=Object.prototype.toString,m=Math.max,g=Math.min,v=function(){return f.Date.now()};function y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function _(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&p.call(e)==a}(e))return i;if(y(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=y(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(s,"");var n=u.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):o.test(e)?i:+e}e.exports=function(e,t,n){var i=!0,a=!0;if("function"!=typeof e)throw new TypeError(r);return y(n)&&(i="leading"in n?!!n.leading:i,a="trailing"in n?!!n.trailing:a),function(e,t,n){var i,a,s,o,u,l,c=0,d=!1,h=!1,f=!0;if("function"!=typeof e)throw new TypeError(r);function p(t){var n=i,r=a;return i=a=void 0,c=t,o=e.apply(r,n)}function b(e){var n=e-l;return void 0===l||n>=t||n<0||h&&e-c>=s}function T(){var e=v();if(b(e))return S(e);u=setTimeout(T,function(e){var n=t-(e-l);return h?g(n,s-(e-c)):n}(e))}function S(e){return u=void 0,f&&i?p(e):(i=a=void 0,o)}function w(){var e=v(),n=b(e);if(i=arguments,a=this,l=e,n){if(void 0===u)return function(e){return c=e,u=setTimeout(T,t),d?p(e):o}(l);if(h)return u=setTimeout(T,t),p(l)}return void 0===u&&(u=setTimeout(T,t)),o}return t=_(t)||0,y(n)&&(d=!!n.leading,s=(h="maxWait"in n)?m(_(n.maxWait)||0,t):s,f="trailing"in n?!!n.trailing:f),w.cancel=function(){void 0!==u&&clearTimeout(u),c=0,i=l=a=u=void 0},w.flush=function(){return void 0===u?o:S(v())},w}(e,t,{leading:i,maxWait:t,trailing:a})}},57258:e=>{var t=Math.pow(2,32);e.exports=function(e){var n=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:n.getUint32(4),timescale:n.getUint32(8)},i=12;0===r.version?(r.earliestPresentationTime=n.getUint32(i),r.firstOffset=n.getUint32(i+4),i+=8):(r.earliestPresentationTime=n.getUint32(i)*t+n.getUint32(i+4),r.firstOffset=n.getUint32(i+8)*t+n.getUint32(i+12),i+=16),i+=2;var a=n.getUint16(i);for(i+=2;a>0;i+=12,a--)r.references.push({referenceType:(128&e[i])>>>7,referencedSize:2147483647&n.getUint32(i),subsegmentDuration:n.getUint32(i+4),startsWithSap:!!(128&e[i+8]),sapType:(112&e[i+8])>>>4,sapDeltaTime:268435455&n.getUint32(i+8)});return r}},28195:e=>{var t,n,r,i,a,s,o,u=9e4;t=function(e){return e*u},n=function(e,t){return e*t},r=function(e){return e/u},i=function(e,t){return e/t},a=function(e,n){return t(i(e,n))},s=function(e,t){return n(r(e),t)},o=function(e,t,n){return r(n?e:e-t)},e.exports={ONE_SECOND_IN_TS:u,secondsToVideoTs:t,secondsToAudioTs:n,videoTsToSeconds:r,audioTsToSeconds:i,audioTsToVideoTs:a,videoTsToAudioTs:s,metadataTsToSeconds:o}},28534:(e,t,n)=>{"use strict";var r=n(32735);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=!1;function s(e,t){return a&&(a=!1,"<"!==t[0]&&e.push("\x3c!-- --\x3e")),"\x3c!-- --\x3e"===t?a=!0:e.push(t)}var o=Object.prototype.hasOwnProperty,u=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,l={},c={};function d(e){return!!o.call(c,e)||!o.call(l,e)&&(u.test(e)?c[e]=!0:(l[e]=!0,!1))}function h(e,t,n,r,i,a,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=s}var f={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){f[e]=new h(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];f[t]=new h(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){f[e]=new h(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){f[e]=new h(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){f[e]=new h(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){f[e]=new h(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){f[e]=new h(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){f[e]=new h(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){f[e]=new h(e,5,!1,e.toLowerCase(),null,!1,!1)}));var p=/[\-:]([a-z])/g;function m(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(p,m);f[t]=new h(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(p,m);f[t]=new h(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(p,m);f[t]=new h(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){f[e]=new h(e,1,!1,e.toLowerCase(),null,!1,!1)})),f.xlinkHref=new h("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){f[e]=new h(e,1,!1,e.toLowerCase(),null,!0,!0)}));var g={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},v=["Webkit","ms","Moz","O"];Object.keys(g).forEach((function(e){v.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),g[t]=g[e]}))}));var y=/["'&<>]/;function _(e){if("boolean"==typeof e||"number"==typeof e)return""+e;e=""+e;var t=y.exec(e);if(t){var n,r="",i=0;for(n=t.index;n<e.length;n++){switch(e.charCodeAt(n)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}i!==n&&(r+=e.substring(i,n)),i=n+1,r+=t}e=i!==n?r+e.substring(i,n):r}return e}var b=/([A-Z])/g,T=/^ms-/,S=Array.isArray;function w(e,t){return{insertionMode:e,selectedValue:t}}function k(e,t){""!==t&&e.push(_(t),"\x3c!-- --\x3e")}var E=new Map;function C(e,t,n){if("object"!=typeof n)throw Error(i(62));for(var r in t=!0,n)if(o.call(n,r)){var a=n[r];if(null!=a&&"boolean"!=typeof a&&""!==a){if(0===r.indexOf("--")){var s=_(r);a=_((""+a).trim())}else{s=r;var u=E.get(s);void 0!==u||(u=_(s.replace(b,"-$1").toLowerCase().replace(T,"-ms-")),E.set(s,u)),s=u,a="number"==typeof a?0===a||o.call(g,r)?""+a:a+"px":_((""+a).trim())}t?(t=!1,e.push(' style="',s,":",a)):e.push(";",s,":",a)}}t||e.push('"')}function x(e,t,n,r){switch(n){case"style":return void C(e,t,r);case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])if(null!==(t=f.hasOwnProperty(n)?f[n]:null)){switch(typeof r){case"function":case"symbol":return;case"boolean":if(!t.acceptsBooleans)return}switch(n=t.attributeName,t.type){case 3:r&&e.push(" ",n,'=""');break;case 4:!0===r?e.push(" ",n,'=""'):!1!==r&&e.push(" ",n,'="',_(r),'"');break;case 5:isNaN(r)||e.push(" ",n,'="',_(r),'"');break;case 6:!isNaN(r)&&1<=r&&e.push(" ",n,'="',_(r),'"');break;default:t.sanitizeURL&&(r=""+r),e.push(" ",n,'="',_(r),'"')}}else if(d(n)){switch(typeof r){case"function":case"symbol":return;case"boolean":if("data-"!==(t=n.toLowerCase().slice(0,5))&&"aria-"!==t)return}e.push(" ",n,'="',_(r),'"')}}function I(e,t,n){if(null!=t){if(null!=n)throw Error(i(60));if("object"!=typeof t||!("__html"in t))throw Error(i(61));null!=(t=t.__html)&&e.push(""+t)}}function A(e,t,n,r){e.push(L(n));var i,a=n=null;for(i in t)if(o.call(t,i)){var s=t[i];if(null!=s)switch(i){case"children":n=s;break;case"dangerouslySetInnerHTML":a=s;break;default:x(e,r,i,s)}}return e.push(">"),I(e,a,n),"string"==typeof n?(e.push(_(n)),null):n}var O=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,P=new Map;function L(e){var t=P.get(e);if(void 0===t){if(!O.test(e))throw Error(i(65,e));t="<"+e,P.set(e,t)}return t}function D(e,t,n){if(s(e,'\x3c!--$?--\x3e<template id="'),null===n)throw Error(i(395));return s(e,n),s(e,'"></template>')}var R=Object.assign,M=Symbol.for("react.element"),N=Symbol.for("react.portal"),U=Symbol.for("react.fragment"),F=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),j=Symbol.for("react.provider"),H=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),X=Symbol.for("react.scope"),$=Symbol.for("react.debug_trace_mode"),K=Symbol.for("react.legacy_hidden"),Z=Symbol.for("react.default_value"),Y=Symbol.iterator;function Q(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case U:return"Fragment";case N:return"Portal";case B:return"Profiler";case F:return"StrictMode";case q:return"Suspense";case W:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case H:return(e.displayName||"Context")+".Consumer";case j:return(e._context.displayName||"Context")+".Provider";case V:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case z:return null!==(t=e.displayName||null)?t:Q(e.type)||"Memo";case G:t=e._payload,e=e._init;try{return Q(e(t))}catch(e){}}return null}var J={};function ee(e,t){if(!(e=e.contextTypes))return J;var n,r={};for(n in e)r[n]=t[n];return r}var te=null;function ne(e,t){if(e!==t){e.context._currentValue2=e.parentValue,e=e.parent;var n=t.parent;if(null===e){if(null!==n)throw Error(i(401))}else{if(null===n)throw Error(i(401));ne(e,n)}t.context._currentValue2=t.value}}function re(e){e.context._currentValue2=e.parentValue,null!==(e=e.parent)&&re(e)}function ie(e){var t=e.parent;null!==t&&ie(t),e.context._currentValue2=e.value}function ae(e,t){if(e.context._currentValue2=e.parentValue,null===(e=e.parent))throw Error(i(402));e.depth===t.depth?ne(e,t):ae(e,t)}function se(e,t){var n=t.parent;if(null===n)throw Error(i(402));e.depth===n.depth?ne(e,n):se(e,n),t.context._currentValue2=t.value}function oe(e){var t=te;t!==e&&(null===t?ie(e):null===e?re(t):t.depth===e.depth?ne(t,e):t.depth>e.depth?ae(t,e):se(t,e),te=e)}var ue={isMounted:function(){return!1},enqueueSetState:function(e,t){null!==(e=e._reactInternals).queue&&e.queue.push(t)},enqueueReplaceState:function(e,t){(e=e._reactInternals).replace=!0,e.queue=[t]},enqueueForceUpdate:function(){}};function le(e,t,n,r){var i=void 0!==e.state?e.state:null;e.updater=ue,e.props=n,e.state=i;var a={queue:[],replace:!1};e._reactInternals=a;var s=t.contextType;if(e.context="object"==typeof s&&null!==s?s._currentValue2:r,"function"==typeof(s=t.getDerivedStateFromProps)&&(i=null==(s=s(n,i))?i:R({},i,s),e.state=i),"function"!=typeof t.getDerivedStateFromProps&&"function"!=typeof e.getSnapshotBeforeUpdate&&("function"==typeof e.UNSAFE_componentWillMount||"function"==typeof e.componentWillMount))if(t=e.state,"function"==typeof e.componentWillMount&&e.componentWillMount(),"function"==typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),t!==e.state&&ue.enqueueReplaceState(e,e.state,null),null!==a.queue&&0<a.queue.length)if(t=a.queue,s=a.replace,a.queue=null,a.replace=!1,s&&1===t.length)e.state=t[0];else{for(a=s?t[0]:e.state,i=!0,s=s?1:0;s<t.length;s++){var o=t[s];null!=(o="function"==typeof o?o.call(e,a,n,r):o)&&(i?(i=!1,a=R({},a,o)):R(a,o))}e.state=a}else a.queue=null}var ce={id:1,overflow:""};function de(e,t,n){var r=e.id;e=e.overflow;var i=32-he(r)-1;r&=~(1<<i),n+=1;var a=32-he(t)+i;if(30<a){var s=i-i%5;return a=(r&(1<<s)-1).toString(32),r>>=s,i-=s,{id:1<<32-he(t)+i|n<<i|r,overflow:a+e}}return{id:1<<a|n<<i|r,overflow:e}}var he=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(fe(e)/pe|0)|0},fe=Math.log,pe=Math.LN2,me="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},ge=null,ve=null,ye=null,_e=null,be=!1,Te=!1,Se=0,we=null,ke=0;function Ee(){if(null===ge)throw Error(i(321));return ge}function Ce(){if(0<ke)throw Error(i(312));return{memoizedState:null,queue:null,next:null}}function xe(){return null===_e?null===ye?(be=!1,ye=_e=Ce()):(be=!0,_e=ye):null===_e.next?(be=!1,_e=_e.next=Ce()):(be=!0,_e=_e.next),_e}function Ie(){ve=ge=null,Te=!1,ye=null,ke=0,_e=we=null}function Ae(e,t){return"function"==typeof t?t(e):t}function Oe(e,t,n){if(ge=Ee(),_e=xe(),be){var r=_e.queue;if(t=r.dispatch,null!==we&&void 0!==(n=we.get(r))){we.delete(r),r=_e.memoizedState;do{r=e(r,n.action),n=n.next}while(null!==n);return _e.memoizedState=r,[r,t]}return[_e.memoizedState,t]}return e=e===Ae?"function"==typeof t?t():t:void 0!==n?n(t):t,_e.memoizedState=e,e=(e=_e.queue={last:null,dispatch:null}).dispatch=Le.bind(null,ge,e),[_e.memoizedState,e]}function Pe(e,t){if(ge=Ee(),t=void 0===t?null:t,null!==(_e=xe())){var n=_e.memoizedState;if(null!==n&&null!==t){var r=n[1];e:if(null===r)r=!1;else{for(var i=0;i<r.length&&i<t.length;i++)if(!me(t[i],r[i])){r=!1;break e}r=!0}if(r)return n[0]}}return e=e(),_e.memoizedState=[e,t],e}function Le(e,t,n){if(25<=ke)throw Error(i(301));if(e===ge)if(Te=!0,e={action:n,next:null},null===we&&(we=new Map),void 0===(n=we.get(t)))we.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}}function De(){throw Error(i(394))}function Re(){}var Me={readContext:function(e){return e._currentValue2},useContext:function(e){return Ee(),e._currentValue2},useMemo:Pe,useReducer:Oe,useRef:function(e){ge=Ee();var t=(_e=xe()).memoizedState;return null===t?(e={current:e},_e.memoizedState=e):t},useState:function(e){return Oe(Ae,e)},useInsertionEffect:Re,useLayoutEffect:function(){},useCallback:function(e,t){return Pe((function(){return e}),t)},useImperativeHandle:Re,useEffect:Re,useDebugValue:Re,useDeferredValue:function(e){return Ee(),e},useTransition:function(){return Ee(),[!1,De]},useId:function(){var e=ve.treeContext,t=e.overflow;e=((e=e.id)&~(1<<32-he(e)-1)).toString(32)+t;var n=Ne;if(null===n)throw Error(i(404));return t=Se++,e=":"+n.idPrefix+"R"+e,0<t&&(e+="H"+t.toString(32)),e+":"},useMutableSource:function(e,t){return Ee(),t(e._source)},useSyncExternalStore:function(e,t,n){if(void 0===n)throw Error(i(407));return n()}},Ne=null,Ue=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function Fe(e){console.error(e)}function Be(){}function je(e,t,n,r,i,a,s,o){e.allPendingTasks++,null===n?e.pendingRootTasks++:n.pendingTasks++;var u={node:t,ping:function(){var t=e.pingedTasks;t.push(u),1===t.length&&tt(e)},blockedBoundary:n,blockedSegment:r,abortSet:i,legacyContext:a,context:s,treeContext:o};return i.add(u),u}function He(e,t,n,r){return{status:0,id:-1,index:t,parentFlushed:!1,chunks:[],children:[],formatContext:r,boundary:n}}function Ve(e,t){(e=e.onError)(t)}function qe(e,t){var n=e.onShellError;n(t),(n=e.onFatalError)(t),null!==e.destination?(e.status=2,e.destination.destroy(t)):(e.status=1,e.fatalError=t)}function We(e,t,n,r,i){for(ge={},ve=t,Se=0,e=n(r,i);Te;)Te=!1,Se=0,ke+=1,_e=null,e=n(r,i);return Ie(),e}function ze(e,t,n,r){var a=n.render(),s=r.childContextTypes;if(null!=s){var o=t.legacyContext;if("function"!=typeof n.getChildContext)r=o;else{for(var u in n=n.getChildContext())if(!(u in s))throw Error(i(108,Q(r)||"Unknown",u));r=R({},o,n)}t.legacyContext=r,$e(e,t,a),t.legacyContext=o}else $e(e,t,a)}function Ge(e,t){if(e&&e.defaultProps){for(var n in t=R({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function Xe(e,t,n,a,s){if("function"==typeof n)if(n.prototype&&n.prototype.isReactComponent){s=ee(n,t.legacyContext);var u=n.contextType;le(u=new n(a,"object"==typeof u&&null!==u?u._currentValue2:s),n,a,s),ze(e,t,u,n)}else{s=We(e,t,n,a,u=ee(n,t.legacyContext));var l=0!==Se;if("object"==typeof s&&null!==s&&"function"==typeof s.render&&void 0===s.$$typeof)le(s,n,a,u),ze(e,t,s,n);else if(l){a=t.treeContext,t.treeContext=de(a,1,0);try{$e(e,t,s)}finally{t.treeContext=a}}else $e(e,t,s)}else{if("string"!=typeof n){switch(n){case K:case $:case F:case B:case U:case W:return void $e(e,t,a.children);case X:throw Error(i(343));case q:e:{n=t.blockedBoundary,s=t.blockedSegment,u=a.fallback,a=a.children;var c={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:l=new Set},h=He(0,s.chunks.length,c,s.formatContext);s.children.push(h);var f=He(0,0,null,s.formatContext);f.parentFlushed=!0,t.blockedBoundary=c,t.blockedSegment=f;try{if(Ze(e,t,a),f.status=1,Je(c,f),0===c.pendingTasks)break e}catch(t){f.status=4,Ve(e,t),c.forceClientRender=!0}finally{t.blockedBoundary=n,t.blockedSegment=s}t=je(e,u,n,h,l,t.legacyContext,t.context,t.treeContext),e.pingedTasks.push(t)}return}if("object"==typeof n&&null!==n)switch(n.$$typeof){case V:if(a=We(e,t,n.render,a,s),0!==Se){n=t.treeContext,t.treeContext=de(n,1,0);try{$e(e,t,a)}finally{t.treeContext=n}}else $e(e,t,a);return;case z:return void Xe(e,t,n=n.type,a=Ge(n,a),s);case j:if(s=a.children,n=n._context,a=a.value,u=n._currentValue2,n._currentValue2=a,te=a={parent:l=te,depth:null===l?0:l.depth+1,context:n,parentValue:u,value:a},t.context=a,$e(e,t,s),null===(e=te))throw Error(i(403));return a=e.parentValue,e.context._currentValue2=a===Z?e.context._defaultValue:a,e=te=e.parent,void(t.context=e);case H:return void $e(e,t,a=(a=a.children)(n._currentValue2));case G:return void Xe(e,t,n=(s=n._init)(n._payload),a=Ge(n,a),void 0)}throw Error(i(130,null==n?n:typeof n,""))}switch(u=function(e,t,n,a,s){switch(t){case"select":e.push(L("select"));var u=null,l=null;for(p in n)if(o.call(n,p)){var c=n[p];if(null!=c)switch(p){case"children":u=c;break;case"dangerouslySetInnerHTML":l=c;break;case"defaultValue":case"value":break;default:x(e,a,p,c)}}return e.push(">"),I(e,l,u),u;case"option":l=s.selectedValue,e.push(L("option"));var h=c=null,f=null,p=null;for(u in n)if(o.call(n,u)&&null!=(t=n[u]))switch(u){case"children":c=t;break;case"selected":f=t;break;case"dangerouslySetInnerHTML":p=t;break;case"value":h=t;default:x(e,a,u,t)}if(null!=l)if(n=null!==h?""+h:function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(c),S(l)){for(a=0;a<l.length;a++)if(""+l[a]===n){e.push(' selected=""');break}}else""+l===n&&e.push(' selected=""');else f&&e.push(' selected=""');return e.push(">"),I(e,p,c),c;case"textarea":for(c in e.push(L("textarea")),p=l=u=null,n)if(o.call(n,c)&&null!=(h=n[c]))switch(c){case"children":p=h;break;case"value":u=h;break;case"defaultValue":l=h;break;case"dangerouslySetInnerHTML":throw Error(i(91));default:x(e,a,c,h)}if(null===u&&null!==l&&(u=l),e.push(">"),null!=p){if(null!=u)throw Error(i(92));if(S(p)&&1<p.length)throw Error(i(93));u=""+p}return"string"==typeof u&&"\n"===u[0]&&e.push("\n"),null!==u&&e.push(_(""+u)),null;case"input":for(l in e.push(L("input")),h=p=c=u=null,n)if(o.call(n,l)&&null!=(f=n[l]))switch(l){case"children":case"dangerouslySetInnerHTML":throw Error(i(399,"input"));case"defaultChecked":h=f;break;case"defaultValue":c=f;break;case"checked":p=f;break;case"value":u=f;break;default:x(e,a,l,f)}return null!==p?x(e,a,"checked",p):null!==h&&x(e,a,"checked",h),null!==u?x(e,a,"value",u):null!==c&&x(e,a,"value",c),e.push("/>"),null;case"menuitem":for(var m in e.push(L("menuitem")),n)if(o.call(n,m)&&null!=(u=n[m]))switch(m){case"children":case"dangerouslySetInnerHTML":throw Error(i(400));default:x(e,a,m,u)}return e.push(">"),null;case"listing":case"pre":for(h in e.push(L(t)),l=u=null,n)if(o.call(n,h)&&null!=(c=n[h]))switch(h){case"children":u=c;break;case"dangerouslySetInnerHTML":l=c;break;default:x(e,a,h,c)}if(e.push(">"),null!=l){if(null!=u)throw Error(i(60));if("object"!=typeof l||!("__html"in l))throw Error(i(61));null!=(n=l.__html)&&("string"==typeof n&&0<n.length&&"\n"===n[0]?e.push("\n",n):e.push(""+n))}return"string"==typeof u&&"\n"===u[0]&&e.push("\n"),u;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":for(var g in e.push(L(t)),n)if(o.call(n,g)&&null!=(u=n[g]))switch(g){case"children":case"dangerouslySetInnerHTML":throw Error(i(399,t));default:x(e,a,g,u)}return e.push("/>"),null;case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return A(e,n,t,a);case"html":return 0===s.insertionMode&&e.push("<!DOCTYPE html>"),A(e,n,t,a);default:if(-1===t.indexOf("-")&&"string"!=typeof n.is)return A(e,n,t,a);for(f in e.push(L(t)),l=u=null,n)if(o.call(n,f)&&null!=(c=n[f]))switch(f){case"children":u=c;break;case"dangerouslySetInnerHTML":l=c;break;case"style":C(e,a,c);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:d(f)&&"function"!=typeof c&&"symbol"!=typeof c&&e.push(" ",f,'="',_(c),'"')}return e.push(">"),I(e,l,u),u}}((s=t.blockedSegment).chunks,n,a,e.responseState,s.formatContext),l=s.formatContext,s.formatContext=function(e,t,n){switch(t){case"select":return w(1,null!=n.value?n.value:n.defaultValue);case"svg":return w(2,null);case"math":return w(3,null);case"foreignObject":return w(1,null);case"table":return w(4,null);case"thead":case"tbody":case"tfoot":return w(5,null);case"colgroup":return w(7,null);case"tr":return w(6,null)}return 4<=e.insertionMode||0===e.insertionMode?w(1,null):e}(l,n,a),Ze(e,t,u),s.formatContext=l,n){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:s.chunks.push("</",n,">")}}}function $e(e,t,n){if(t.node=n,"object"==typeof n&&null!==n){switch(n.$$typeof){case M:return void Xe(e,t,n.type,n.props,n.ref);case N:throw Error(i(257));case G:var r=n._init;return void $e(e,t,n=r(n._payload))}if(S(n))return void Ke(e,t,n);if((r=null===n||"object"!=typeof n?null:"function"==typeof(r=Y&&n[Y]||n["@@iterator"])?r:null)&&(r=r.call(n))){if(!(n=r.next()).done){var a=[];do{a.push(n.value),n=r.next()}while(!n.done);Ke(e,t,a)}return}throw e=Object.prototype.toString.call(n),Error(i(31,"[object Object]"===e?"object with keys {"+Object.keys(n).join(", ")+"}":e))}"string"==typeof n?(t=t.blockedSegment.chunks,e.responseState.generateStaticMarkup?t.push(_(n)):k(t,n)):"number"==typeof n&&(t=t.blockedSegment.chunks,n=""+n,e.responseState.generateStaticMarkup?t.push(_(n)):k(t,n))}function Ke(e,t,n){for(var r=n.length,i=0;i<r;i++){var a=t.treeContext;t.treeContext=de(a,r,i);try{Ze(e,t,n[i])}finally{t.treeContext=a}}}function Ze(e,t,n){var r=t.blockedSegment.formatContext,i=t.legacyContext,a=t.context;try{return $e(e,t,n)}catch(u){if(Ie(),"object"!=typeof u||null===u||"function"!=typeof u.then)throw t.blockedSegment.formatContext=r,t.legacyContext=i,t.context=a,oe(a),u;n=u;var s=t.blockedSegment,o=He(0,s.chunks.length,null,s.formatContext);s.children.push(o),e=je(e,t.node,t.blockedBoundary,o,t.abortSet,t.legacyContext,t.context,t.treeContext).ping,n.then(e,e),t.blockedSegment.formatContext=r,t.legacyContext=i,t.context=a,oe(a)}}function Ye(e){var t=e.blockedBoundary;(e=e.blockedSegment).status=3,et(this,t,e)}function Qe(e){var t=e.blockedBoundary;e.blockedSegment.status=3,null===t?(this.allPendingTasks--,2!==this.status&&(this.status=2,null!==this.destination&&this.destination.push(null))):(t.pendingTasks--,t.forceClientRender||(t.forceClientRender=!0,t.parentFlushed&&this.clientRenderedBoundaries.push(t)),t.fallbackAbortableTasks.forEach(Qe,this),t.fallbackAbortableTasks.clear(),this.allPendingTasks--,0===this.allPendingTasks&&(e=this.onAllReady)())}function Je(e,t){if(0===t.chunks.length&&1===t.children.length&&null===t.children[0].boundary){var n=t.children[0];n.id=t.id,n.parentFlushed=!0,1===n.status&&Je(e,n)}else e.completedSegments.push(t)}function et(e,t,n){if(null===t){if(n.parentFlushed){if(null!==e.completedRootSegment)throw Error(i(389));e.completedRootSegment=n}e.pendingRootTasks--,0===e.pendingRootTasks&&(e.onShellError=Be,(t=e.onShellReady)())}else t.pendingTasks--,t.forceClientRender||(0===t.pendingTasks?(n.parentFlushed&&1===n.status&&Je(t,n),t.parentFlushed&&e.completedBoundaries.push(t),t.fallbackAbortableTasks.forEach(Ye,e),t.fallbackAbortableTasks.clear()):n.parentFlushed&&1===n.status&&(Je(t,n),1===t.completedSegments.length&&t.parentFlushed&&e.partialBoundaries.push(t)));e.allPendingTasks--,0===e.allPendingTasks&&(e=e.onAllReady)()}function tt(e){if(2!==e.status){var t=te,n=Ue.current;Ue.current=Me;var r=Ne;Ne=e.responseState;try{var i,a=e.pingedTasks;for(i=0;i<a.length;i++){var s=a[i],o=e,u=s.blockedSegment;if(0===u.status){oe(s.context);try{$e(o,s,s.node),s.abortSet.delete(s),u.status=1,et(o,s.blockedBoundary,u)}catch(e){if(Ie(),"object"==typeof e&&null!==e&&"function"==typeof e.then){var l=s.ping;e.then(l,l)}else{s.abortSet.delete(s),u.status=4;var c=s.blockedBoundary,d=e;Ve(o,d),null===c?qe(o,d):(c.pendingTasks--,c.forceClientRender||(c.forceClientRender=!0,c.parentFlushed&&o.clientRenderedBoundaries.push(c))),o.allPendingTasks--,0===o.allPendingTasks&&(0,o.onAllReady)()}}}}a.splice(0,i),null!==e.destination&&ot(e,e.destination)}catch(t){Ve(e,t),qe(e,t)}finally{Ne=r,Ue.current=n,n===Me&&oe(t)}}}function nt(e,t,n){switch(n.parentFlushed=!0,n.status){case 0:var r=n.id=e.nextSegmentId++;return e=e.responseState,s(t,'<template id="'),s(t,e.placeholderPrefix),s(t,e=r.toString(16)),s(t,'"></template>');case 1:n.status=2;var a=!0;r=n.chunks;var o=0;n=n.children;for(var u=0;u<n.length;u++){for(a=n[u];o<a.index;o++)s(t,r[o]);a=rt(e,t,a)}for(;o<r.length-1;o++)s(t,r[o]);return o<r.length&&(a=s(t,r[o])),a;default:throw Error(i(390))}}function rt(e,t,n){var r=n.boundary;if(null===r)return nt(e,t,n);if(r.parentFlushed=!0,r.forceClientRender)return e.responseState.generateStaticMarkup||s(t,"\x3c!--$!--\x3e"),nt(e,t,n),!!e.responseState.generateStaticMarkup||s(t,"\x3c!--/$--\x3e");if(0<r.pendingTasks){r.rootSegmentID=e.nextSegmentId++,0<r.completedSegments.length&&e.partialBoundaries.push(r);var a=e.responseState,o=a.nextSuspenseID++;return a=a.boundaryPrefix+o.toString(16),r=r.id=a,D(t,e.responseState,r),nt(e,t,n),s(t,"\x3c!--/$--\x3e")}if(r.byteSize>e.progressiveChunkSize)return r.rootSegmentID=e.nextSegmentId++,e.completedBoundaries.push(r),D(t,e.responseState,r.id),nt(e,t,n),s(t,"\x3c!--/$--\x3e");if(e.responseState.generateStaticMarkup||s(t,"\x3c!--$--\x3e"),1!==(n=r.completedSegments).length)throw Error(i(391));return rt(e,t,n[0]),!!e.responseState.generateStaticMarkup||s(t,"\x3c!--/$--\x3e")}function it(e,t,n){return function(e,t,n,r){switch(n.insertionMode){case 0:case 1:return s(e,'<div hidden id="'),s(e,t.segmentPrefix),s(e,t=r.toString(16)),s(e,'">');case 2:return s(e,'<svg aria-hidden="true" style="display:none" id="'),s(e,t.segmentPrefix),s(e,t=r.toString(16)),s(e,'">');case 3:return s(e,'<math aria-hidden="true" style="display:none" id="'),s(e,t.segmentPrefix),s(e,t=r.toString(16)),s(e,'">');case 4:return s(e,'<table hidden id="'),s(e,t.segmentPrefix),s(e,t=r.toString(16)),s(e,'">');case 5:return s(e,'<table hidden><tbody id="'),s(e,t.segmentPrefix),s(e,t=r.toString(16)),s(e,'">');case 6:return s(e,'<table hidden><tr id="'),s(e,t.segmentPrefix),s(e,t=r.toString(16)),s(e,'">');case 7:return s(e,'<table hidden><colgroup id="'),s(e,t.segmentPrefix),s(e,t=r.toString(16)),s(e,'">');default:throw Error(i(397))}}(t,e.responseState,n.formatContext,n.id),rt(e,t,n),function(e,t){switch(t.insertionMode){case 0:case 1:return s(e,"</div>");case 2:return s(e,"</svg>");case 3:return s(e,"</math>");case 4:return s(e,"</table>");case 5:return s(e,"</tbody></table>");case 6:return s(e,"</tr></table>");case 7:return s(e,"</colgroup></table>");default:throw Error(i(397))}}(t,n.formatContext)}function at(e,t,n){for(var r=n.completedSegments,a=0;a<r.length;a++)st(e,t,n,r[a]);if(r.length=0,e=e.responseState,r=n.id,n=n.rootSegmentID,s(t,e.startInlineScript),e.sentCompleteBoundaryFunction?s(t,'$RC("'):(e.sentCompleteBoundaryFunction=!0,s(t,'function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("')),null===r)throw Error(i(395));return n=n.toString(16),s(t,r),s(t,'","'),s(t,e.segmentPrefix),s(t,n),s(t,'")<\/script>')}function st(e,t,n,r){if(2===r.status)return!0;var a=r.id;if(-1===a){if(-1===(r.id=n.rootSegmentID))throw Error(i(392));return it(e,t,r)}return it(e,t,r),s(t,(e=e.responseState).startInlineScript),e.sentCompleteSegmentFunction?s(t,'$RS("'):(e.sentCompleteSegmentFunction=!0,s(t,'function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("')),s(t,e.segmentPrefix),s(t,a=a.toString(16)),s(t,'","'),s(t,e.placeholderPrefix),s(t,a),s(t,'")<\/script>')}function ot(e,t){try{var n=e.completedRootSegment;if(null!==n&&0===e.pendingRootTasks){rt(e,t,n),e.completedRootSegment=null;var r=e.responseState.bootstrapChunks;for(n=0;n<r.length-1;n++)s(t,r[n]);n<r.length&&s(t,r[n])}var a,o=e.clientRenderedBoundaries;for(a=0;a<o.length;a++){r=t;var u=e.responseState,l=o[a].id;if(s(r,u.startInlineScript),u.sentClientRenderFunction?s(r,'$RX("'):(u.sentClientRenderFunction=!0,s(r,'function $RX(a){if(a=document.getElementById(a))a=a.previousSibling,a.data="$!",a._reactRetry&&a._reactRetry()};$RX("')),null===l)throw Error(i(395));if(s(r,l),!s(r,'")<\/script>'))return e.destination=null,a++,void o.splice(0,a)}o.splice(0,a);var c=e.completedBoundaries;for(a=0;a<c.length;a++)if(!at(e,t,c[a]))return e.destination=null,a++,void c.splice(0,a);c.splice(0,a);var d=e.partialBoundaries;for(a=0;a<d.length;a++){var h=d[a];e:{o=e,u=t;var f=h.completedSegments;for(l=0;l<f.length;l++)if(!st(o,u,h,f[l])){l++,f.splice(0,l);var p=!1;break e}f.splice(0,l),p=!0}if(!p)return e.destination=null,a++,void d.splice(0,a)}d.splice(0,a);var m=e.completedBoundaries;for(a=0;a<m.length;a++)if(!at(e,t,m[a]))return e.destination=null,a++,void m.splice(0,a);m.splice(0,a)}finally{0===e.allPendingTasks&&0===e.pingedTasks.length&&0===e.clientRenderedBoundaries.length&&0===e.completedBoundaries.length&&t.push(null)}}function ut(){}function lt(e,t,n){var r=!1,a=null,s="",o={push:function(e){return null!==e&&(s+=e),!0},destroy:function(e){r=!0,a=e}},u=!1;if(e=function(e,t,n,r,i,a,s,o,u){var l=[],c=new Set;return(n=He(t={destination:null,responseState:t,progressiveChunkSize:r,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:c,pingedTasks:l,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:void 0===i?Fe:i,onAllReady:Be,onShellReady:void 0===s?Be:s,onShellError:Be,onFatalError:Be},0,null,n)).parentFlushed=!0,e=je(t,e,null,n,c,J,null,ce),l.push(e),t}(e,function(e,t){return{bootstrapChunks:[],startInlineScript:"<script>",placeholderPrefix:(t=void 0===t?"":t)+"P:",segmentPrefix:t+"S:",boundaryPrefix:t+"B:",idPrefix:t,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1,generateStaticMarkup:e}}(n,t?t.identifierPrefix:void 0),{insertionMode:1,selectedValue:null},1/0,ut,0,(function(){u=!0})),tt(e),function(e){try{var t=e.abortableTasks;t.forEach(Qe,e),t.clear(),null!==e.destination&&ot(e,e.destination)}catch(t){Ve(e,t),qe(e,t)}}(e),1===e.status)e.status=2,o.destroy(e.fatalError);else if(2!==e.status&&null===e.destination){e.destination=o;try{ot(e,o)}catch(t){Ve(e,t),qe(e,t)}}if(r)throw a;if(!u)throw Error(i(426));return s}t.renderToNodeStream=function(){throw Error(i(207))},t.renderToStaticMarkup=function(e,t){return lt(e,t,!0)},t.renderToStaticNodeStream=function(){throw Error(i(208))},t.renderToString=function(e,t){return lt(e,t,!1)},t.version="18.1.0"},67392:(e,t,n)=>{"use strict";var r=n(32735);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=null,s=0;function o(e,t){if(0!==t.length)if(512<t.length)0<s&&(e.enqueue(new Uint8Array(a.buffer,0,s)),a=new Uint8Array(512),s=0),e.enqueue(t);else{var n=a.length-s;n<t.length&&(0===n?e.enqueue(a):(a.set(t.subarray(0,n),s),e.enqueue(a),t=t.subarray(n)),a=new Uint8Array(512),s=0),a.set(t,s),s+=t.length}}function u(e,t){return o(e,t),!0}function l(e){a&&0<s&&(e.enqueue(new Uint8Array(a.buffer,0,s)),a=null,s=0)}var c=new TextEncoder;function d(e){return c.encode(e)}function h(e){return c.encode(e)}function f(e,t){"function"==typeof e.error?e.error(t):e.close()}var p=Object.prototype.hasOwnProperty,m=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,g={},v={};function y(e){return!!p.call(v,e)||!p.call(g,e)&&(m.test(e)?v[e]=!0:(g[e]=!0,!1))}function _(e,t,n,r,i,a,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=s}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){b[e]=new _(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];b[t]=new _(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){b[e]=new _(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){b[e]=new _(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){b[e]=new _(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){b[e]=new _(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){b[e]=new _(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){b[e]=new _(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){b[e]=new _(e,5,!1,e.toLowerCase(),null,!1,!1)}));var T=/[\-:]([a-z])/g;function S(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(T,S);b[t]=new _(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(T,S);b[t]=new _(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(T,S);b[t]=new _(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){b[e]=new _(e,1,!1,e.toLowerCase(),null,!1,!1)})),b.xlinkHref=new _("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){b[e]=new _(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},k=["Webkit","ms","Moz","O"];Object.keys(w).forEach((function(e){k.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),w[t]=w[e]}))}));var E=/["'&<>]/;function C(e){if("boolean"==typeof e||"number"==typeof e)return""+e;e=""+e;var t=E.exec(e);if(t){var n,r="",i=0;for(n=t.index;n<e.length;n++){switch(e.charCodeAt(n)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}i!==n&&(r+=e.substring(i,n)),i=n+1,r+=t}e=i!==n?r+e.substring(i,n):r}return e}var x=/([A-Z])/g,I=/^ms-/,A=Array.isArray,O=h("<script>"),P=h("<\/script>"),L=h('<script src="'),D=h('<script type="module" src="'),R=h('" async=""><\/script>'),M=/(<\/|<)(s)(cript)/gi;function N(e,t,n,r){return t+("s"===n?"\\u0073":"\\u0053")+r}function U(e,t){return{insertionMode:e,selectedValue:t}}var F=h("\x3c!-- --\x3e"),B=new Map,j=h(' style="'),H=h(":"),V=h(";");function q(e,t,n){if("object"!=typeof n)throw Error(i(62));for(var r in t=!0,n)if(p.call(n,r)){var a=n[r];if(null!=a&&"boolean"!=typeof a&&""!==a){if(0===r.indexOf("--")){var s=d(C(r));a=d(C((""+a).trim()))}else{s=r;var o=B.get(s);void 0!==o||(o=h(C(s.replace(x,"-$1").toLowerCase().replace(I,"-ms-"))),B.set(s,o)),s=o,a="number"==typeof a?0===a||p.call(w,r)?d(""+a):d(a+"px"):d(C((""+a).trim()))}t?(t=!1,e.push(j,s,H,a)):e.push(V,s,H,a)}}t||e.push(G)}var W=h(" "),z=h('="'),G=h('"'),X=h('=""');function $(e,t,n,r){switch(n){case"style":return void q(e,t,r);case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])if(null!==(t=b.hasOwnProperty(n)?b[n]:null)){switch(typeof r){case"function":case"symbol":return;case"boolean":if(!t.acceptsBooleans)return}switch(n=d(t.attributeName),t.type){case 3:r&&e.push(W,n,X);break;case 4:!0===r?e.push(W,n,X):!1!==r&&e.push(W,n,z,d(C(r)),G);break;case 5:isNaN(r)||e.push(W,n,z,d(C(r)),G);break;case 6:!isNaN(r)&&1<=r&&e.push(W,n,z,d(C(r)),G);break;default:t.sanitizeURL&&(r=""+r),e.push(W,n,z,d(C(r)),G)}}else if(y(n)){switch(typeof r){case"function":case"symbol":return;case"boolean":if("data-"!==(t=n.toLowerCase().slice(0,5))&&"aria-"!==t)return}e.push(W,d(n),z,d(C(r)),G)}}var K=h(">"),Z=h("/>");function Y(e,t,n){if(null!=t){if(null!=n)throw Error(i(60));if("object"!=typeof t||!("__html"in t))throw Error(i(61));null!=(t=t.__html)&&e.push(d(""+t))}}var Q=h(' selected=""');function J(e,t,n,r){e.push(re(n));var i,a=n=null;for(i in t)if(p.call(t,i)){var s=t[i];if(null!=s)switch(i){case"children":n=s;break;case"dangerouslySetInnerHTML":a=s;break;default:$(e,r,i,s)}}return e.push(K),Y(e,a,n),"string"==typeof n?(e.push(d(C(n))),null):n}var ee=h("\n"),te=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,ne=new Map;function re(e){var t=ne.get(e);if(void 0===t){if(!te.test(e))throw Error(i(65,e));t=h("<"+e),ne.set(e,t)}return t}var ie=h("<!DOCTYPE html>");var ae=h("</"),se=h(">"),oe=h('<template id="'),ue=h('"></template>'),le=h("\x3c!--$--\x3e"),ce=h('\x3c!--$?--\x3e<template id="'),de=h('"></template>'),he=h("\x3c!--$!--\x3e"),fe=h("\x3c!--/$--\x3e");function pe(e,t,n){if(o(e,ce),null===n)throw Error(i(395));return o(e,n),u(e,de)}var me=h('<div hidden id="'),ge=h('">'),ve=h("</div>"),ye=h('<svg aria-hidden="true" style="display:none" id="'),_e=h('">'),be=h("</svg>"),Te=h('<math aria-hidden="true" style="display:none" id="'),Se=h('">'),we=h("</math>"),ke=h('<table hidden id="'),Ee=h('">'),Ce=h("</table>"),xe=h('<table hidden><tbody id="'),Ie=h('">'),Ae=h("</tbody></table>"),Oe=h('<table hidden><tr id="'),Pe=h('">'),Le=h("</tr></table>"),De=h('<table hidden><colgroup id="'),Re=h('">'),Me=h("</colgroup></table>"),Ne=h('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'),Ue=h('$RS("'),Fe=h('","'),Be=h('")<\/script>'),je=h('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("'),He=h('$RC("'),Ve=h('","'),qe=h('")<\/script>'),We=h('function $RX(a){if(a=document.getElementById(a))a=a.previousSibling,a.data="$!",a._reactRetry&&a._reactRetry()};$RX("'),ze=h('$RX("'),Ge=h('")<\/script>'),Xe=Object.assign,$e=Symbol.for("react.element"),Ke=Symbol.for("react.portal"),Ze=Symbol.for("react.fragment"),Ye=Symbol.for("react.strict_mode"),Qe=Symbol.for("react.profiler"),Je=Symbol.for("react.provider"),et=Symbol.for("react.context"),tt=Symbol.for("react.forward_ref"),nt=Symbol.for("react.suspense"),rt=Symbol.for("react.suspense_list"),it=Symbol.for("react.memo"),at=Symbol.for("react.lazy"),st=Symbol.for("react.scope"),ot=Symbol.for("react.debug_trace_mode"),ut=Symbol.for("react.legacy_hidden"),lt=Symbol.for("react.default_value"),ct=Symbol.iterator;function dt(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case Ze:return"Fragment";case Ke:return"Portal";case Qe:return"Profiler";case Ye:return"StrictMode";case nt:return"Suspense";case rt:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case et:return(e.displayName||"Context")+".Consumer";case Je:return(e._context.displayName||"Context")+".Provider";case tt:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case it:return null!==(t=e.displayName||null)?t:dt(e.type)||"Memo";case at:t=e._payload,e=e._init;try{return dt(e(t))}catch(e){}}return null}var ht={};function ft(e,t){if(!(e=e.contextTypes))return ht;var n,r={};for(n in e)r[n]=t[n];return r}var pt=null;function mt(e,t){if(e!==t){e.context._currentValue=e.parentValue,e=e.parent;var n=t.parent;if(null===e){if(null!==n)throw Error(i(401))}else{if(null===n)throw Error(i(401));mt(e,n)}t.context._currentValue=t.value}}function gt(e){e.context._currentValue=e.parentValue,null!==(e=e.parent)&>(e)}function vt(e){var t=e.parent;null!==t&&vt(t),e.context._currentValue=e.value}function yt(e,t){if(e.context._currentValue=e.parentValue,null===(e=e.parent))throw Error(i(402));e.depth===t.depth?mt(e,t):yt(e,t)}function _t(e,t){var n=t.parent;if(null===n)throw Error(i(402));e.depth===n.depth?mt(e,n):_t(e,n),t.context._currentValue=t.value}function bt(e){var t=pt;t!==e&&(null===t?vt(e):null===e?gt(t):t.depth===e.depth?mt(t,e):t.depth>e.depth?yt(t,e):_t(t,e),pt=e)}var Tt={isMounted:function(){return!1},enqueueSetState:function(e,t){null!==(e=e._reactInternals).queue&&e.queue.push(t)},enqueueReplaceState:function(e,t){(e=e._reactInternals).replace=!0,e.queue=[t]},enqueueForceUpdate:function(){}};function St(e,t,n,r){var i=void 0!==e.state?e.state:null;e.updater=Tt,e.props=n,e.state=i;var a={queue:[],replace:!1};e._reactInternals=a;var s=t.contextType;if(e.context="object"==typeof s&&null!==s?s._currentValue:r,"function"==typeof(s=t.getDerivedStateFromProps)&&(i=null==(s=s(n,i))?i:Xe({},i,s),e.state=i),"function"!=typeof t.getDerivedStateFromProps&&"function"!=typeof e.getSnapshotBeforeUpdate&&("function"==typeof e.UNSAFE_componentWillMount||"function"==typeof e.componentWillMount))if(t=e.state,"function"==typeof e.componentWillMount&&e.componentWillMount(),"function"==typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),t!==e.state&&Tt.enqueueReplaceState(e,e.state,null),null!==a.queue&&0<a.queue.length)if(t=a.queue,s=a.replace,a.queue=null,a.replace=!1,s&&1===t.length)e.state=t[0];else{for(a=s?t[0]:e.state,i=!0,s=s?1:0;s<t.length;s++){var o=t[s];null!=(o="function"==typeof o?o.call(e,a,n,r):o)&&(i?(i=!1,a=Xe({},a,o)):Xe(a,o))}e.state=a}else a.queue=null}var wt={id:1,overflow:""};function kt(e,t,n){var r=e.id;e=e.overflow;var i=32-Et(r)-1;r&=~(1<<i),n+=1;var a=32-Et(t)+i;if(30<a){var s=i-i%5;return a=(r&(1<<s)-1).toString(32),r>>=s,i-=s,{id:1<<32-Et(t)+i|n<<i|r,overflow:a+e}}return{id:1<<a|n<<i|r,overflow:e}}var Et=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(Ct(e)/xt|0)|0},Ct=Math.log,xt=Math.LN2,It="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},At=null,Ot=null,Pt=null,Lt=null,Dt=!1,Rt=!1,Mt=0,Nt=null,Ut=0;function Ft(){if(null===At)throw Error(i(321));return At}function Bt(){if(0<Ut)throw Error(i(312));return{memoizedState:null,queue:null,next:null}}function jt(){return null===Lt?null===Pt?(Dt=!1,Pt=Lt=Bt()):(Dt=!0,Lt=Pt):null===Lt.next?(Dt=!1,Lt=Lt.next=Bt()):(Dt=!0,Lt=Lt.next),Lt}function Ht(){Ot=At=null,Rt=!1,Pt=null,Ut=0,Lt=Nt=null}function Vt(e,t){return"function"==typeof t?t(e):t}function qt(e,t,n){if(At=Ft(),Lt=jt(),Dt){var r=Lt.queue;if(t=r.dispatch,null!==Nt&&void 0!==(n=Nt.get(r))){Nt.delete(r),r=Lt.memoizedState;do{r=e(r,n.action),n=n.next}while(null!==n);return Lt.memoizedState=r,[r,t]}return[Lt.memoizedState,t]}return e=e===Vt?"function"==typeof t?t():t:void 0!==n?n(t):t,Lt.memoizedState=e,e=(e=Lt.queue={last:null,dispatch:null}).dispatch=zt.bind(null,At,e),[Lt.memoizedState,e]}function Wt(e,t){if(At=Ft(),t=void 0===t?null:t,null!==(Lt=jt())){var n=Lt.memoizedState;if(null!==n&&null!==t){var r=n[1];e:if(null===r)r=!1;else{for(var i=0;i<r.length&&i<t.length;i++)if(!It(t[i],r[i])){r=!1;break e}r=!0}if(r)return n[0]}}return e=e(),Lt.memoizedState=[e,t],e}function zt(e,t,n){if(25<=Ut)throw Error(i(301));if(e===At)if(Rt=!0,e={action:n,next:null},null===Nt&&(Nt=new Map),void 0===(n=Nt.get(t)))Nt.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}}function Gt(){throw Error(i(394))}function Xt(){}var $t={readContext:function(e){return e._currentValue},useContext:function(e){return Ft(),e._currentValue},useMemo:Wt,useReducer:qt,useRef:function(e){At=Ft();var t=(Lt=jt()).memoizedState;return null===t?(e={current:e},Lt.memoizedState=e):t},useState:function(e){return qt(Vt,e)},useInsertionEffect:Xt,useLayoutEffect:function(){},useCallback:function(e,t){return Wt((function(){return e}),t)},useImperativeHandle:Xt,useEffect:Xt,useDebugValue:Xt,useDeferredValue:function(e){return Ft(),e},useTransition:function(){return Ft(),[!1,Gt]},useId:function(){var e=Ot.treeContext,t=e.overflow;e=((e=e.id)&~(1<<32-Et(e)-1)).toString(32)+t;var n=Kt;if(null===n)throw Error(i(404));return t=Mt++,e=":"+n.idPrefix+"R"+e,0<t&&(e+="H"+t.toString(32)),e+":"},useMutableSource:function(e,t){return Ft(),t(e._source)},useSyncExternalStore:function(e,t,n){if(void 0===n)throw Error(i(407));return n()}},Kt=null,Zt=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function Yt(e){console.error(e)}function Qt(){}function Jt(e,t,n,r,i,a,s,o){e.allPendingTasks++,null===n?e.pendingRootTasks++:n.pendingTasks++;var u={node:t,ping:function(){var t=e.pingedTasks;t.push(u),1===t.length&&mn(e)},blockedBoundary:n,blockedSegment:r,abortSet:i,legacyContext:a,context:s,treeContext:o};return i.add(u),u}function en(e,t,n,r){return{status:0,id:-1,index:t,parentFlushed:!1,chunks:[],children:[],formatContext:r,boundary:n}}function tn(e,t){(e=e.onError)(t)}function nn(e,t){var n=e.onShellError;n(t),(n=e.onFatalError)(t),null!==e.destination?(e.status=2,f(e.destination,t)):(e.status=1,e.fatalError=t)}function rn(e,t,n,r,i){for(At={},Ot=t,Mt=0,e=n(r,i);Rt;)Rt=!1,Mt=0,Ut+=1,Lt=null,e=n(r,i);return Ht(),e}function an(e,t,n,r){var a=n.render(),s=r.childContextTypes;if(null!=s){var o=t.legacyContext;if("function"!=typeof n.getChildContext)r=o;else{for(var u in n=n.getChildContext())if(!(u in s))throw Error(i(108,dt(r)||"Unknown",u));r=Xe({},o,n)}t.legacyContext=r,un(e,t,a),t.legacyContext=o}else un(e,t,a)}function sn(e,t){if(e&&e.defaultProps){for(var n in t=Xe({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function on(e,t,n,a,s){if("function"==typeof n)if(n.prototype&&n.prototype.isReactComponent){s=ft(n,t.legacyContext);var o=n.contextType;St(o=new n(a,"object"==typeof o&&null!==o?o._currentValue:s),n,a,s),an(e,t,o,n)}else{s=rn(e,t,n,a,o=ft(n,t.legacyContext));var u=0!==Mt;if("object"==typeof s&&null!==s&&"function"==typeof s.render&&void 0===s.$$typeof)St(s,n,a,o),an(e,t,s,n);else if(u){a=t.treeContext,t.treeContext=kt(a,1,0);try{un(e,t,s)}finally{t.treeContext=a}}else un(e,t,s)}else{if("string"!=typeof n){switch(n){case ut:case ot:case Ye:case Qe:case Ze:case rt:return void un(e,t,a.children);case st:throw Error(i(343));case nt:e:{n=t.blockedBoundary,s=t.blockedSegment,o=a.fallback,a=a.children;var l={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:u=new Set},c=en(0,s.chunks.length,l,s.formatContext);s.children.push(c);var h=en(0,0,null,s.formatContext);h.parentFlushed=!0,t.blockedBoundary=l,t.blockedSegment=h;try{if(cn(e,t,a),h.status=1,fn(l,h),0===l.pendingTasks)break e}catch(t){h.status=4,tn(e,t),l.forceClientRender=!0}finally{t.blockedBoundary=n,t.blockedSegment=s}t=Jt(e,o,n,c,u,t.legacyContext,t.context,t.treeContext),e.pingedTasks.push(t)}return}if("object"==typeof n&&null!==n)switch(n.$$typeof){case tt:if(a=rn(e,t,n.render,a,s),0!==Mt){n=t.treeContext,t.treeContext=kt(n,1,0);try{un(e,t,a)}finally{t.treeContext=n}}else un(e,t,a);return;case it:return void on(e,t,n=n.type,a=sn(n,a),s);case Je:if(s=a.children,n=n._context,a=a.value,o=n._currentValue,n._currentValue=a,pt=a={parent:u=pt,depth:null===u?0:u.depth+1,context:n,parentValue:o,value:a},t.context=a,un(e,t,s),null===(e=pt))throw Error(i(403));return a=e.parentValue,e.context._currentValue=a===lt?e.context._defaultValue:a,e=pt=e.parent,void(t.context=e);case et:return void un(e,t,a=(a=a.children)(n._currentValue));case at:return void on(e,t,n=(s=n._init)(n._payload),a=sn(n,a),void 0)}throw Error(i(130,null==n?n:typeof n,""))}switch(o=function(e,t,n,a,s){switch(t){case"select":e.push(re("select"));var o=null,u=null;for(f in n)if(p.call(n,f)){var l=n[f];if(null!=l)switch(f){case"children":o=l;break;case"dangerouslySetInnerHTML":u=l;break;case"defaultValue":case"value":break;default:$(e,a,f,l)}}return e.push(K),Y(e,u,o),o;case"option":u=s.selectedValue,e.push(re("option"));var c=l=null,h=null,f=null;for(o in n)if(p.call(n,o)&&null!=(t=n[o]))switch(o){case"children":l=t;break;case"selected":h=t;break;case"dangerouslySetInnerHTML":f=t;break;case"value":c=t;default:$(e,a,o,t)}if(null!=u)if(n=null!==c?""+c:function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(l),A(u)){for(a=0;a<u.length;a++)if(""+u[a]===n){e.push(Q);break}}else""+u===n&&e.push(Q);else h&&e.push(Q);return e.push(K),Y(e,f,l),l;case"textarea":for(l in e.push(re("textarea")),f=u=o=null,n)if(p.call(n,l)&&null!=(c=n[l]))switch(l){case"children":f=c;break;case"value":o=c;break;case"defaultValue":u=c;break;case"dangerouslySetInnerHTML":throw Error(i(91));default:$(e,a,l,c)}if(null===o&&null!==u&&(o=u),e.push(K),null!=f){if(null!=o)throw Error(i(92));if(A(f)&&1<f.length)throw Error(i(93));o=""+f}return"string"==typeof o&&"\n"===o[0]&&e.push(ee),null!==o&&e.push(d(C(""+o))),null;case"input":for(u in e.push(re("input")),c=f=l=o=null,n)if(p.call(n,u)&&null!=(h=n[u]))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(i(399,"input"));case"defaultChecked":c=h;break;case"defaultValue":l=h;break;case"checked":f=h;break;case"value":o=h;break;default:$(e,a,u,h)}return null!==f?$(e,a,"checked",f):null!==c&&$(e,a,"checked",c),null!==o?$(e,a,"value",o):null!==l&&$(e,a,"value",l),e.push(Z),null;case"menuitem":for(var m in e.push(re("menuitem")),n)if(p.call(n,m)&&null!=(o=n[m]))switch(m){case"children":case"dangerouslySetInnerHTML":throw Error(i(400));default:$(e,a,m,o)}return e.push(K),null;case"listing":case"pre":for(c in e.push(re(t)),u=o=null,n)if(p.call(n,c)&&null!=(l=n[c]))switch(c){case"children":o=l;break;case"dangerouslySetInnerHTML":u=l;break;default:$(e,a,c,l)}if(e.push(K),null!=u){if(null!=o)throw Error(i(60));if("object"!=typeof u||!("__html"in u))throw Error(i(61));null!=(n=u.__html)&&("string"==typeof n&&0<n.length&&"\n"===n[0]?e.push(ee,d(n)):e.push(d(""+n)))}return"string"==typeof o&&"\n"===o[0]&&e.push(ee),o;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":for(var g in e.push(re(t)),n)if(p.call(n,g)&&null!=(o=n[g]))switch(g){case"children":case"dangerouslySetInnerHTML":throw Error(i(399,t));default:$(e,a,g,o)}return e.push(Z),null;case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return J(e,n,t,a);case"html":return 0===s.insertionMode&&e.push(ie),J(e,n,t,a);default:if(-1===t.indexOf("-")&&"string"!=typeof n.is)return J(e,n,t,a);for(h in e.push(re(t)),u=o=null,n)if(p.call(n,h)&&null!=(l=n[h]))switch(h){case"children":o=l;break;case"dangerouslySetInnerHTML":u=l;break;case"style":q(e,a,l);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:y(h)&&"function"!=typeof l&&"symbol"!=typeof l&&e.push(W,d(h),z,d(C(l)),G)}return e.push(K),Y(e,u,o),o}}((s=t.blockedSegment).chunks,n,a,e.responseState,s.formatContext),u=s.formatContext,s.formatContext=function(e,t,n){switch(t){case"select":return U(1,null!=n.value?n.value:n.defaultValue);case"svg":return U(2,null);case"math":return U(3,null);case"foreignObject":return U(1,null);case"table":return U(4,null);case"thead":case"tbody":case"tfoot":return U(5,null);case"colgroup":return U(7,null);case"tr":return U(6,null)}return 4<=e.insertionMode||0===e.insertionMode?U(1,null):e}(u,n,a),cn(e,t,o),s.formatContext=u,n){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:s.chunks.push(ae,d(n),se)}}}function un(e,t,n){if(t.node=n,"object"==typeof n&&null!==n){switch(n.$$typeof){case $e:return void on(e,t,n.type,n.props,n.ref);case Ke:throw Error(i(257));case at:var r=n._init;return void un(e,t,n=r(n._payload))}if(A(n))return void ln(e,t,n);if((r=null===n||"object"!=typeof n?null:"function"==typeof(r=ct&&n[ct]||n["@@iterator"])?r:null)&&(r=r.call(n))){if(!(n=r.next()).done){var a=[];do{a.push(n.value),n=r.next()}while(!n.done);ln(e,t,a)}return}throw t=Object.prototype.toString.call(n),Error(i(31,"[object Object]"===t?"object with keys {"+Object.keys(n).join(", ")+"}":t))}"string"==typeof n?""!==n&&t.blockedSegment.chunks.push(d(C(n)),F):"number"==typeof n&&""!=(e=""+n)&&t.blockedSegment.chunks.push(d(C(e)),F)}function ln(e,t,n){for(var r=n.length,i=0;i<r;i++){var a=t.treeContext;t.treeContext=kt(a,r,i);try{cn(e,t,n[i])}finally{t.treeContext=a}}}function cn(e,t,n){var r=t.blockedSegment.formatContext,i=t.legacyContext,a=t.context;try{return un(e,t,n)}catch(u){if(Ht(),"object"!=typeof u||null===u||"function"!=typeof u.then)throw t.blockedSegment.formatContext=r,t.legacyContext=i,t.context=a,bt(a),u;n=u;var s=t.blockedSegment,o=en(0,s.chunks.length,null,s.formatContext);s.children.push(o),e=Jt(e,t.node,t.blockedBoundary,o,t.abortSet,t.legacyContext,t.context,t.treeContext).ping,n.then(e,e),t.blockedSegment.formatContext=r,t.legacyContext=i,t.context=a,bt(a)}}function dn(e){var t=e.blockedBoundary;(e=e.blockedSegment).status=3,pn(this,t,e)}function hn(e){var t=e.blockedBoundary;e.blockedSegment.status=3,null===t?(this.allPendingTasks--,2!==this.status&&(this.status=2,null!==this.destination&&this.destination.close())):(t.pendingTasks--,t.forceClientRender||(t.forceClientRender=!0,t.parentFlushed&&this.clientRenderedBoundaries.push(t)),t.fallbackAbortableTasks.forEach(hn,this),t.fallbackAbortableTasks.clear(),this.allPendingTasks--,0===this.allPendingTasks&&(e=this.onAllReady)())}function fn(e,t){if(0===t.chunks.length&&1===t.children.length&&null===t.children[0].boundary){var n=t.children[0];n.id=t.id,n.parentFlushed=!0,1===n.status&&fn(e,n)}else e.completedSegments.push(t)}function pn(e,t,n){if(null===t){if(n.parentFlushed){if(null!==e.completedRootSegment)throw Error(i(389));e.completedRootSegment=n}e.pendingRootTasks--,0===e.pendingRootTasks&&(e.onShellError=Qt,(t=e.onShellReady)())}else t.pendingTasks--,t.forceClientRender||(0===t.pendingTasks?(n.parentFlushed&&1===n.status&&fn(t,n),t.parentFlushed&&e.completedBoundaries.push(t),t.fallbackAbortableTasks.forEach(dn,e),t.fallbackAbortableTasks.clear()):n.parentFlushed&&1===n.status&&(fn(t,n),1===t.completedSegments.length&&t.parentFlushed&&e.partialBoundaries.push(t)));e.allPendingTasks--,0===e.allPendingTasks&&(e=e.onAllReady)()}function mn(e){if(2!==e.status){var t=pt,n=Zt.current;Zt.current=$t;var r=Kt;Kt=e.responseState;try{var i,a=e.pingedTasks;for(i=0;i<a.length;i++){var s=a[i],o=e,u=s.blockedSegment;if(0===u.status){bt(s.context);try{un(o,s,s.node),s.abortSet.delete(s),u.status=1,pn(o,s.blockedBoundary,u)}catch(e){if(Ht(),"object"==typeof e&&null!==e&&"function"==typeof e.then){var l=s.ping;e.then(l,l)}else{s.abortSet.delete(s),u.status=4;var c=s.blockedBoundary,d=e;tn(o,d),null===c?nn(o,d):(c.pendingTasks--,c.forceClientRender||(c.forceClientRender=!0,c.parentFlushed&&o.clientRenderedBoundaries.push(c))),o.allPendingTasks--,0===o.allPendingTasks&&(0,o.onAllReady)()}}}}a.splice(0,i),null!==e.destination&&Tn(e,e.destination)}catch(t){tn(e,t),nn(e,t)}finally{Kt=r,Zt.current=n,n===$t&&bt(t)}}}function gn(e,t,n){switch(n.parentFlushed=!0,n.status){case 0:var r=n.id=e.nextSegmentId++;return e=e.responseState,o(t,oe),o(t,e.placeholderPrefix),o(t,e=d(r.toString(16))),u(t,ue);case 1:n.status=2;var a=!0;r=n.chunks;var s=0;n=n.children;for(var l=0;l<n.length;l++){for(a=n[l];s<a.index;s++)o(t,r[s]);a=vn(e,t,a)}for(;s<r.length-1;s++)o(t,r[s]);return s<r.length&&(a=u(t,r[s])),a;default:throw Error(i(390))}}function vn(e,t,n){var r=n.boundary;if(null===r)return gn(e,t,n);if(r.parentFlushed=!0,r.forceClientRender)u(t,he),gn(e,t,n);else if(0<r.pendingTasks){r.rootSegmentID=e.nextSegmentId++,0<r.completedSegments.length&&e.partialBoundaries.push(r);var a=e.responseState,s=a.nextSuspenseID++;a=h(a.boundaryPrefix+s.toString(16)),r=r.id=a,pe(t,e.responseState,r),gn(e,t,n)}else if(r.byteSize>e.progressiveChunkSize)r.rootSegmentID=e.nextSegmentId++,e.completedBoundaries.push(r),pe(t,e.responseState,r.id),gn(e,t,n);else{if(u(t,le),1!==(n=r.completedSegments).length)throw Error(i(391));vn(e,t,n[0])}return u(t,fe)}function yn(e,t,n){return function(e,t,n,r){switch(n.insertionMode){case 0:case 1:return o(e,me),o(e,t.segmentPrefix),o(e,d(r.toString(16))),u(e,ge);case 2:return o(e,ye),o(e,t.segmentPrefix),o(e,d(r.toString(16))),u(e,_e);case 3:return o(e,Te),o(e,t.segmentPrefix),o(e,d(r.toString(16))),u(e,Se);case 4:return o(e,ke),o(e,t.segmentPrefix),o(e,d(r.toString(16))),u(e,Ee);case 5:return o(e,xe),o(e,t.segmentPrefix),o(e,d(r.toString(16))),u(e,Ie);case 6:return o(e,Oe),o(e,t.segmentPrefix),o(e,d(r.toString(16))),u(e,Pe);case 7:return o(e,De),o(e,t.segmentPrefix),o(e,d(r.toString(16))),u(e,Re);default:throw Error(i(397))}}(t,e.responseState,n.formatContext,n.id),vn(e,t,n),function(e,t){switch(t.insertionMode){case 0:case 1:return u(e,ve);case 2:return u(e,be);case 3:return u(e,we);case 4:return u(e,Ce);case 5:return u(e,Ae);case 6:return u(e,Le);case 7:return u(e,Me);default:throw Error(i(397))}}(t,n.formatContext)}function _n(e,t,n){for(var r=n.completedSegments,a=0;a<r.length;a++)bn(e,t,n,r[a]);if(r.length=0,e=e.responseState,r=n.id,n=n.rootSegmentID,o(t,e.startInlineScript),e.sentCompleteBoundaryFunction?o(t,He):(e.sentCompleteBoundaryFunction=!0,o(t,je)),null===r)throw Error(i(395));return n=d(n.toString(16)),o(t,r),o(t,Ve),o(t,e.segmentPrefix),o(t,n),u(t,qe)}function bn(e,t,n,r){if(2===r.status)return!0;var a=r.id;if(-1===a){if(-1===(r.id=n.rootSegmentID))throw Error(i(392));return yn(e,t,r)}return yn(e,t,r),o(t,(e=e.responseState).startInlineScript),e.sentCompleteSegmentFunction?o(t,Ue):(e.sentCompleteSegmentFunction=!0,o(t,Ne)),o(t,e.segmentPrefix),o(t,a=d(a.toString(16))),o(t,Fe),o(t,e.placeholderPrefix),o(t,a),u(t,Be)}function Tn(e,t){a=new Uint8Array(512),s=0;try{var n=e.completedRootSegment;if(null!==n&&0===e.pendingRootTasks){vn(e,t,n),e.completedRootSegment=null;var r=e.responseState.bootstrapChunks;for(n=0;n<r.length-1;n++)o(t,r[n]);n<r.length&&u(t,r[n])}var c,d=e.clientRenderedBoundaries;for(c=0;c<d.length;c++){r=t;var h=e.responseState,f=d[c].id;if(o(r,h.startInlineScript),h.sentClientRenderFunction?o(r,ze):(h.sentClientRenderFunction=!0,o(r,We)),null===f)throw Error(i(395));if(o(r,f),!u(r,Ge))return e.destination=null,c++,void d.splice(0,c)}d.splice(0,c);var p=e.completedBoundaries;for(c=0;c<p.length;c++)if(!_n(e,t,p[c]))return e.destination=null,c++,void p.splice(0,c);p.splice(0,c),l(t),a=new Uint8Array(512),s=0;var m=e.partialBoundaries;for(c=0;c<m.length;c++){var g=m[c];e:{d=e,h=t;var v=g.completedSegments;for(f=0;f<v.length;f++)if(!bn(d,h,g,v[f])){f++,v.splice(0,f);var y=!1;break e}v.splice(0,f),y=!0}if(!y)return e.destination=null,c++,void m.splice(0,c)}m.splice(0,c);var _=e.completedBoundaries;for(c=0;c<_.length;c++)if(!_n(e,t,_[c]))return e.destination=null,c++,void _.splice(0,c);_.splice(0,c)}finally{l(t),0===e.allPendingTasks&&0===e.pingedTasks.length&&0===e.clientRenderedBoundaries.length&&0===e.completedBoundaries.length&&t.close()}}function Sn(e){try{var t=e.abortableTasks;t.forEach(hn,e),t.clear(),null!==e.destination&&Tn(e,e.destination)}catch(t){tn(e,t),nn(e,t)}}t.renderToReadableStream=function(e,t){return new Promise((function(n,r){var i,a,s=new Promise((function(e,t){a=e,i=t})),o=function(e,t,n,r,i,a,s,o,u){var l=[],c=new Set;return(n=en(t={destination:null,responseState:t,progressiveChunkSize:void 0===r?12800:r,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:c,pingedTasks:l,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:void 0===i?Yt:i,onAllReady:void 0===a?Qt:a,onShellReady:void 0===s?Qt:s,onShellError:void 0===o?Qt:o,onFatalError:void 0===u?Qt:u},0,null,n)).parentFlushed=!0,e=Jt(t,e,null,n,c,ht,null,wt),l.push(e),t}(e,function(e,t,n,r,i){e=void 0===e?"":e,t=void 0===t?O:h('<script nonce="'+C(t)+'">');var a=[];if(void 0!==n&&a.push(t,d((""+n).replace(M,N)),P),void 0!==r)for(n=0;n<r.length;n++)a.push(L,d(C(r[n])),R);if(void 0!==i)for(r=0;r<i.length;r++)a.push(D,d(C(i[r])),R);return{bootstrapChunks:a,startInlineScript:t,placeholderPrefix:h(e+"P:"),segmentPrefix:h(e+"S:"),boundaryPrefix:e+"B:",idPrefix:e,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1}}(t?t.identifierPrefix:void 0,t?t.nonce:void 0,t?t.bootstrapScriptContent:void 0,t?t.bootstrapScripts:void 0,t?t.bootstrapModules:void 0),function(e){return U("http://www.w3.org/2000/svg"===e?2:"http://www.w3.org/1998/Math/MathML"===e?3:0,null)}(t?t.namespaceURI:void 0),t?t.progressiveChunkSize:void 0,t?t.onError:void 0,a,(function(){var e=new ReadableStream({type:"bytes",pull:function(e){if(1===o.status)o.status=2,f(e,o.fatalError);else if(2!==o.status&&null===o.destination){o.destination=e;try{Tn(o,e)}catch(e){tn(o,e),nn(o,e)}}},cancel:function(){Sn(o)}});e.allReady=s,n(e)}),(function(e){s.catch((function(){})),r(e)}),i);if(t&&t.signal){var u=t.signal,l=function(){Sn(o),u.removeEventListener("abort",l)};u.addEventListener("abort",l)}mn(o)}))},t.version="18.1.0"},74161:(e,t,n)=>{"use strict";var r,i;r=n(28534),i=n(67392),r.version,r.renderToString,t.uS=r.renderToStaticMarkup,r.renderToNodeStream,r.renderToStaticNodeStream,i.renderToReadableStream},8004:e=>{e.exports=function(e,t){var n,r=null;try{n=JSON.parse(e,t)}catch(e){r=e}return[r,n]}},18204:(e,t,n)=>{"use strict";n.d(t,{Z:()=>B}),n(94386),n(98457);var r=n(15206),i=n.n(r),a=(n(15296),n(48868),n(96609),n(92274),n(68268),n(81874),n(31341),n(54861),n(50200)),s=n.n(a),o=n(40001),u=n.n(o),l=n(98511),c=n.n(l),d=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];e.call(t,i[1],i[0])}},t}()}(),h="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,f=void 0!==n.g&&n.g.Math===Math?n.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),p="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(f):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)},m=["top","right","bottom","left","width","height","size","weight"],g="undefined"!=typeof MutationObserver,v=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,i=0;function a(){n&&(n=!1,e()),r&&o()}function s(){p(a)}function o(){var e=Date.now();if(n){if(e-i<2)return;r=!0}else n=!0,r=!1,setTimeout(s,t);i=e}return o}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){h&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),g?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){h&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;m.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),y=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},_=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||f},b=E(0,0,0,0);function T(e){return parseFloat(e)||0}function S(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+T(e["border-"+n+"-width"])}),0)}var w="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof _(e).SVGGraphicsElement}:function(e){return e instanceof _(e).SVGElement&&"function"==typeof e.getBBox};function k(e){return h?w(e)?function(e){var t=e.getBBox();return E(0,0,t.width,t.height)}(e):function(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return b;var r=_(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],a=e["padding-"+i];t[i]=T(a)}return t}(r),a=i.left+i.right,s=i.top+i.bottom,o=T(r.width),u=T(r.height);if("border-box"===r.boxSizing&&(Math.round(o+a)!==t&&(o-=S(r,"left","right")+a),Math.round(u+s)!==n&&(u-=S(r,"top","bottom")+s)),!function(e){return e===_(e).document.documentElement}(e)){var l=Math.round(o+a)-t,c=Math.round(u+s)-n;1!==Math.abs(l)&&(o-=l),1!==Math.abs(c)&&(u-=c)}return E(i.left,i.top,o,u)}(e):b}function E(e,t,n,r){return{x:e,y:t,width:n,height:r}}var C=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=E(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=k(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),x=function(e,t){var n,r,i,a,s,o,u,l=(r=(n=t).x,i=n.y,a=n.width,s=n.height,o="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(o.prototype),y(u,{x:r,y:i,width:a,height:s,top:i,right:r+a,bottom:s+i,left:r}),u);y(this,{target:e,contentRect:l})},I=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new d,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof _(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new C(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof _(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new x(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),A="undefined"!=typeof WeakMap?new WeakMap:new d,O=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=v.getInstance(),r=new I(t,n,this);A.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){O.prototype[e]=function(){var t;return(t=A.get(this))[e].apply(t,arguments)}}));const P=void 0!==f.ResizeObserver?f.ResizeObserver:O;n(82937),n(66403),n(42295),n(52963),n(34994);var L=null,D=null;function R(){if(null===L){if("undefined"==typeof document)return L=0;var e=document.body,t=document.createElement("div");t.classList.add("simplebar-hide-scrollbar"),e.appendChild(t);var n=t.getBoundingClientRect().right;e.removeChild(t),L=n}return L}i()&&window.addEventListener("resize",(function(){D!==window.devicePixelRatio&&(D=window.devicePixelRatio,L=null)}));var M=function(e){return Array.prototype.reduce.call(e,(function(e,t){var n=t.name.match(/data-simplebar-(.+)/);if(n){var r=n[1].replace(/\W+(.)/g,(function(e,t){return t.toUpperCase()}));switch(t.value){case"true":e[r]=!0;break;case"false":e[r]=!1;break;case void 0:e[r]=!0;break;default:e[r]=t.value}}return e}),{})};function N(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window}function U(e){return e&&e.ownerDocument?e.ownerDocument:document}var F=function(){function e(t,n){var r=this;this.onScroll=function(){var e=N(r.el);r.scrollXTicking||(e.requestAnimationFrame(r.scrollX),r.scrollXTicking=!0),r.scrollYTicking||(e.requestAnimationFrame(r.scrollY),r.scrollYTicking=!0)},this.scrollX=function(){r.axis.x.isOverflowing&&(r.showScrollbar("x"),r.positionScrollbar("x")),r.scrollXTicking=!1},this.scrollY=function(){r.axis.y.isOverflowing&&(r.showScrollbar("y"),r.positionScrollbar("y")),r.scrollYTicking=!1},this.onMouseEnter=function(){r.showScrollbar("x"),r.showScrollbar("y")},this.onMouseMove=function(e){r.mouseX=e.clientX,r.mouseY=e.clientY,(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseMoveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseMoveForAxis("y")},this.onMouseLeave=function(){r.onMouseMove.cancel(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseLeaveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseLeaveForAxis("y"),r.mouseX=-1,r.mouseY=-1},this.onWindowResize=function(){r.scrollbarWidth=r.getScrollbarWidth(),r.hideNativeScrollbar()},this.hideScrollbars=function(){r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.track.rect)||(r.axis.y.scrollbar.el.classList.remove(r.classNames.visible),r.axis.y.isVisible=!1),r.isWithinBounds(r.axis.x.track.rect)||(r.axis.x.scrollbar.el.classList.remove(r.classNames.visible),r.axis.x.isVisible=!1)},this.onPointerEvent=function(e){var t,n;r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&(t=r.isWithinBounds(r.axis.x.track.rect)),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&(n=r.isWithinBounds(r.axis.y.track.rect)),(t||n)&&(e.preventDefault(),e.stopPropagation(),"mousedown"===e.type&&(t&&(r.axis.x.scrollbar.rect=r.axis.x.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.x.scrollbar.rect)?r.onDragStart(e,"x"):r.onTrackClick(e,"x")),n&&(r.axis.y.scrollbar.rect=r.axis.y.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.scrollbar.rect)?r.onDragStart(e,"y"):r.onTrackClick(e,"y"))))},this.drag=function(t){var n=r.axis[r.draggedAxis].track,i=n.rect[r.axis[r.draggedAxis].sizeAttr],a=r.axis[r.draggedAxis].scrollbar,s=r.contentWrapperEl[r.axis[r.draggedAxis].scrollSizeAttr],o=parseInt(r.elStyles[r.axis[r.draggedAxis].sizeAttr],10);t.preventDefault(),t.stopPropagation();var u=(("y"===r.draggedAxis?t.pageY:t.pageX)-n.rect[r.axis[r.draggedAxis].offsetAttr]-r.axis[r.draggedAxis].dragOffset)/(i-a.size)*(s-o);"x"===r.draggedAxis&&(u=r.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?u-(i+a.size):u,u=r.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-u:u),r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr]=u},this.onEndDrag=function(e){var t=U(r.el),n=N(r.el);e.preventDefault(),e.stopPropagation(),r.el.classList.remove(r.classNames.dragging),t.removeEventListener("mousemove",r.drag,!0),t.removeEventListener("mouseup",r.onEndDrag,!0),r.removePreventClickId=n.setTimeout((function(){t.removeEventListener("click",r.preventClick,!0),t.removeEventListener("dblclick",r.preventClick,!0),r.removePreventClickId=null}))},this.preventClick=function(e){e.preventDefault(),e.stopPropagation()},this.el=t,this.minScrollbarWidth=20,this.options=Object.assign({},e.defaultOptions,{},n),this.classNames=Object.assign({},e.defaultOptions.classNames,{},this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,e.instances.has(this.el)||(this.recalculate=s()(this.recalculate.bind(this),64),this.onMouseMove=s()(this.onMouseMove.bind(this),64),this.hideScrollbars=u()(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=u()(this.onWindowResize.bind(this),64,{leading:!0}),e.getRtlHelpers=c()(e.getRtlHelpers),this.init())}e.getRtlHelpers=function(){var t=document.createElement("div");t.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var n=t.firstElementChild;document.body.appendChild(n);var r=n.firstElementChild;n.scrollLeft=0;var i=e.getOffset(n),a=e.getOffset(r);n.scrollLeft=999;var s=e.getOffset(r);return{isRtlScrollingInverted:i.left!==a.left&&a.left-s.left!=0,isRtlScrollbarInverted:i.left!==a.left}},e.getOffset=function(e){var t=e.getBoundingClientRect(),n=U(e),r=N(e);return{top:t.top+(r.pageYOffset||n.documentElement.scrollTop),left:t.left+(r.pageXOffset||n.documentElement.scrollLeft)}};var t=e.prototype;return t.init=function(){e.instances.set(this.el,this),i()&&(this.initDOM(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},t.initDOM=function(){var e=this;if(Array.prototype.filter.call(this.el.children,(function(t){return t.classList.contains(e.classNames.wrapper)})).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var t=document.createElement("div"),n=document.createElement("div");t.classList.add(this.classNames.track),n.classList.add(this.classNames.scrollbar),t.appendChild(n),this.axis.x.track.el=t.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=t.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},t.initListeners=function(){var e=this,t=N(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(t){e.el.addEventListener(t,e.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(t){e.el.addEventListener(t,e.onPointerEvent,{capture:!0,passive:!0})})),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),t.addEventListener("resize",this.onWindowResize);var n=!1,r=t.ResizeObserver||P;this.resizeObserver=new r((function(){n&&e.recalculate()})),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),t.requestAnimationFrame((function(){n=!0})),this.mutationObserver=new t.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},t.recalculate=function(){var e=N(this.el);this.elStyles=e.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction;var t=this.heightAutoObserverEl.offsetHeight<=1,n=this.heightAutoObserverEl.offsetWidth<=1,r=this.contentEl.offsetWidth,i=this.contentWrapperEl.offsetWidth,a=this.elStyles.overflowX,s=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var o=this.contentEl.scrollHeight,u=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=t?"auto":"100%",this.placeholderEl.style.width=n?r+"px":"auto",this.placeholderEl.style.height=o+"px";var l=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=u>r,this.axis.y.isOverflowing=o>l,this.axis.x.isOverflowing="hidden"!==a&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==s&&this.axis.y.isOverflowing,this.axis.x.forceVisible="x"===this.options.forceVisible||!0===this.options.forceVisible,this.axis.y.forceVisible="y"===this.options.forceVisible||!0===this.options.forceVisible,this.hideNativeScrollbar();var c=this.axis.x.isOverflowing?this.scrollbarWidth:0,d=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&u>i-d,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&o>l-c,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},t.getScrollbarSize=function(e){if(void 0===e&&(e="y"),!this.axis[e].isOverflowing)return 0;var t,n=this.contentEl[this.axis[e].scrollSizeAttr],r=this.axis[e].track.el[this.axis[e].offsetSizeAttr],i=r/n;return t=Math.max(~~(i*r),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(t=Math.min(t,this.options.scrollbarMaxSize)),t},t.positionScrollbar=function(t){if(void 0===t&&(t="y"),this.axis[t].isOverflowing){var n=this.contentWrapperEl[this.axis[t].scrollSizeAttr],r=this.axis[t].track.el[this.axis[t].offsetSizeAttr],i=parseInt(this.elStyles[this.axis[t].sizeAttr],10),a=this.axis[t].scrollbar,s=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],o=(s="x"===t&&this.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-s:s)/(n-i),u=~~((r-a.size)*o);u="x"===t&&this.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?u+(r-a.size):u,a.el.style.transform="x"===t?"translate3d("+u+"px, 0, 0)":"translate3d(0, "+u+"px, 0)"}},t.toggleTrackVisibility=function(e){void 0===e&&(e="y");var t=this.axis[e].track.el,n=this.axis[e].scrollbar.el;this.axis[e].isOverflowing||this.axis[e].forceVisible?(t.style.visibility="visible",this.contentWrapperEl.style[this.axis[e].overflowAttr]="scroll"):(t.style.visibility="hidden",this.contentWrapperEl.style[this.axis[e].overflowAttr]="hidden"),this.axis[e].isOverflowing?n.style.display="block":n.style.display="none"},t.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},t.onMouseMoveForAxis=function(e){void 0===e&&(e="y"),this.axis[e].track.rect=this.axis[e].track.el.getBoundingClientRect(),this.axis[e].scrollbar.rect=this.axis[e].scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis[e].scrollbar.rect)?this.axis[e].scrollbar.el.classList.add(this.classNames.hover):this.axis[e].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[e].track.rect)?(this.showScrollbar(e),this.axis[e].track.el.classList.add(this.classNames.hover)):this.axis[e].track.el.classList.remove(this.classNames.hover)},t.onMouseLeaveForAxis=function(e){void 0===e&&(e="y"),this.axis[e].track.el.classList.remove(this.classNames.hover),this.axis[e].scrollbar.el.classList.remove(this.classNames.hover)},t.showScrollbar=function(e){void 0===e&&(e="y");var t=this.axis[e].scrollbar.el;this.axis[e].isVisible||(t.classList.add(this.classNames.visible),this.axis[e].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},t.onDragStart=function(e,t){void 0===t&&(t="y");var n=U(this.el),r=N(this.el),i=this.axis[t].scrollbar,a="y"===t?e.pageY:e.pageX;this.axis[t].dragOffset=a-i.rect[this.axis[t].offsetAttr],this.draggedAxis=t,this.el.classList.add(this.classNames.dragging),n.addEventListener("mousemove",this.drag,!0),n.addEventListener("mouseup",this.onEndDrag,!0),null===this.removePreventClickId?(n.addEventListener("click",this.preventClick,!0),n.addEventListener("dblclick",this.preventClick,!0)):(r.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},t.onTrackClick=function(e,t){var n=this;if(void 0===t&&(t="y"),this.options.clickOnTrack){var r=N(this.el);this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect();var i=this.axis[t].scrollbar.rect[this.axis[t].offsetAttr],a=parseInt(this.elStyles[this.axis[t].sizeAttr],10),s=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],o=("y"===t?this.mouseY-i:this.mouseX-i)<0?-1:1,u=-1===o?s-a:s+a;!function e(){var i,a;-1===o?s>u&&(s-=n.options.clickOnTrackSpeed,n.contentWrapperEl.scrollTo(((i={})[n.axis[t].offsetAttr]=s,i)),r.requestAnimationFrame(e)):s<u&&(s+=n.options.clickOnTrackSpeed,n.contentWrapperEl.scrollTo(((a={})[n.axis[t].offsetAttr]=s,a)),r.requestAnimationFrame(e))}()}},t.getContentElement=function(){return this.contentEl},t.getScrollElement=function(){return this.contentWrapperEl},t.getScrollbarWidth=function(){try{return"none"===getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:R()}catch(e){return R()}},t.removeListeners=function(){var e=this,t=N(this.el);this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(t){e.el.removeEventListener(t,e.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(t){e.el.removeEventListener(t,e.onPointerEvent,{capture:!0,passive:!0})})),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.recalculate.cancel(),this.onMouseMove.cancel(),this.hideScrollbars.cancel(),this.onWindowResize.cancel()},t.unMount=function(){this.removeListeners(),e.instances.delete(this.el)},t.isWithinBounds=function(e){return this.mouseX>=e.left&&this.mouseX<=e.left+e.width&&this.mouseY>=e.top&&this.mouseY<=e.top+e.height},t.findChild=function(e,t){var n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;return Array.prototype.filter.call(e.children,(function(e){return n.call(e,t)}))[0]},e}();F.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,clickOnTrackSpeed:40,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3},F.instances=new WeakMap,F.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),(function(e){"init"===e.getAttribute("data-simplebar")||F.instances.has(e)||new F(e,M(e.attributes))}))},F.removeObserver=function(){this.globalObserver.disconnect()},F.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),"undefined"!=typeof MutationObserver&&(this.globalObserver=new MutationObserver(F.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))},F.handleMutations=function(e){e.forEach((function(e){Array.prototype.forEach.call(e.addedNodes,(function(e){1===e.nodeType&&(e.hasAttribute("data-simplebar")?!F.instances.has(e)&&new F(e,M(e.attributes)):Array.prototype.forEach.call(e.querySelectorAll("[data-simplebar]"),(function(e){"init"===e.getAttribute("data-simplebar")||F.instances.has(e)||new F(e,M(e.attributes))})))})),Array.prototype.forEach.call(e.removedNodes,(function(e){1===e.nodeType&&(e.hasAttribute('[data-simplebar="init"]')?F.instances.has(e)&&F.instances.get(e).unMount():Array.prototype.forEach.call(e.querySelectorAll('[data-simplebar="init"]'),(function(e){F.instances.has(e)&&F.instances.get(e).unMount()})))}))}))},F.getOptions=M,i()&&F.initHtmlApi();const B=F},31336:function(e){var t,n,r,i,a;t=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,n=/^(?=([^\/?#]*))\1([^]*)$/,r=/(?:\/|^)\.(?=\/)/g,i=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,a={buildAbsoluteURL:function(e,t,r){if(r=r||{},e=e.trim(),!(t=t.trim())){if(!r.alwaysNormalize)return e;var i=a.parseURL(e);if(!i)throw new Error("Error trying to parse base URL.");return i.path=a.normalizePath(i.path),a.buildURLFromParts(i)}var s=a.parseURL(t);if(!s)throw new Error("Error trying to parse relative URL.");if(s.scheme)return r.alwaysNormalize?(s.path=a.normalizePath(s.path),a.buildURLFromParts(s)):t;var o=a.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var u=n.exec(o.path);o.netLoc=u[1],o.path=u[2]}o.netLoc&&!o.path&&(o.path="/");var l={scheme:o.scheme,netLoc:s.netLoc,path:null,params:s.params,query:s.query,fragment:s.fragment};if(!s.netLoc&&(l.netLoc=o.netLoc,"/"!==s.path[0]))if(s.path){var c=o.path,d=c.substring(0,c.lastIndexOf("/")+1)+s.path;l.path=a.normalizePath(d)}else l.path=o.path,s.params||(l.params=o.params,s.query||(l.query=o.query));return null===l.path&&(l.path=r.alwaysNormalize?a.normalizePath(s.path):s.path),a.buildURLFromParts(l)},parseURL:function(e){var n=t.exec(e);return n?{scheme:n[1]||"",netLoc:n[2]||"",path:n[3]||"",params:n[4]||"",query:n[5]||"",fragment:n[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(r,"");e.length!==(e=e.replace(i,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=a},42612:(e,t,n)=>{"use strict";n.d(t,{Z:()=>yl});var r=n(51562),i=n.n(r),a=n(3384),s=n.n(a),o=n(20011),u=n(93173),l=n(23788),c=n(8004),d=n.n(c),h=n(19389),f=n.n(h),p=n(68942),m=n.n(p),g=n(83983),v=n.n(g),y=n(45901);function _(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_=function(){return!!e})()}var b=n(31336),T=n.n(b);const S=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=i().location&&i().location.href||"");var n="function"==typeof i().URL,r=/^\/\//.test(e),a=!i().location&&!/\/\//i.test(e);if(n?e=new(i().URL)(e,i().location||"http://example.com"):/\/\//i.test(e)||(e=T().buildAbsoluteURL(i().location&&i().location.href||"",e)),n){var s=new URL(t,e);return a?s.href.slice(18):r?s.href.slice(s.protocol.length):s.href}return T().buildAbsoluteURL(e,t)};var w=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(n,1),n>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,r=0;r<n;++r)t[r].call(this,arguments[1]);else for(var i=Array.prototype.slice.call(arguments,1),a=t.length,s=0;s<a;++s)t[s].apply(this,i)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}();function k(e){for(var t,n=(t=e,i().atob?i().atob(t):Buffer.from(t,"base64").toString("binary")),r=new Uint8Array(n.length),a=0;a<n.length;a++)r[a]=n.charCodeAt(a);return r}var E,C,x,I=function(e){function t(){var t;return(t=e.call(this)||this).buffer="",t}return(0,l.Z)(t,e),t.prototype.push=function(e){var t;for(this.buffer+=e,t=this.buffer.indexOf("\n");t>-1;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)},t}(w),A=String.fromCharCode(9),O=function(e){var t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||""),n={};return t[1]&&(n.length=parseInt(t[1],10)),t[2]&&(n.offset=parseInt(t[2],10)),n},P=function(e){for(var t,n=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),r={},i=n.length;i--;)""!==n[i]&&((t=/([^=]*)=(.*)/.exec(n[i]).slice(1))[0]=t[0].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^['"](.*)['"]$/g,"$1"),r[t[0]]=t[1]);return r},L=function(e){function t(){var t;return(t=e.call(this)||this).customParsers=[],t.tagMappers=[],t}(0,l.Z)(t,e);var n=t.prototype;return n.push=function(e){var t,n,r=this;0!==(e=e.trim()).length&&("#"===e[0]?this.tagMappers.reduce((function(t,n){var r=n(e);return r===e?t:t.concat([r])}),[e]).forEach((function(e){for(var i=0;i<r.customParsers.length;i++)if(r.customParsers[i].call(r,e))return;if(0===e.indexOf("#EXT"))if(e=e.replace("\r",""),t=/^#EXTM3U/.exec(e))r.trigger("data",{type:"tag",tagType:"m3u"});else{if(t=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(e))return n={type:"tag",tagType:"inf"},t[1]&&(n.duration=parseFloat(t[1])),t[2]&&(n.title=t[2]),void r.trigger("data",n);if(t=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"targetduration"},t[1]&&(n.duration=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"version"},t[1]&&(n.version=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return n={type:"tag",tagType:"media-sequence"},t[1]&&(n.number=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return n={type:"tag",tagType:"discontinuity-sequence"},t[1]&&(n.number=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(e))return n={type:"tag",tagType:"playlist-type"},t[1]&&(n.playlistType=t[1]),void r.trigger("data",n);if(t=/^#EXT-X-BYTERANGE:?(.*)?$/.exec(e))return n=(0,o.Z)(O(t[1]),{type:"tag",tagType:"byterange"}),void r.trigger("data",n);if(t=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(e))return n={type:"tag",tagType:"allow-cache"},t[1]&&(n.allowed=!/NO/.test(t[1])),void r.trigger("data",n);if(t=/^#EXT-X-MAP:?(.*)$/.exec(e)){if(n={type:"tag",tagType:"map"},t[1]){var a=P(t[1]);a.URI&&(n.uri=a.URI),a.BYTERANGE&&(n.byterange=O(a.BYTERANGE))}r.trigger("data",n)}else if(t=/^#EXT-X-STREAM-INF:?(.*)$/.exec(e)){if(n={type:"tag",tagType:"stream-inf"},t[1]){if(n.attributes=P(t[1]),n.attributes.RESOLUTION){var s=n.attributes.RESOLUTION.split("x"),u={};s[0]&&(u.width=parseInt(s[0],10)),s[1]&&(u.height=parseInt(s[1],10)),n.attributes.RESOLUTION=u}n.attributes.BANDWIDTH&&(n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)),n.attributes["PROGRAM-ID"]&&(n.attributes["PROGRAM-ID"]=parseInt(n.attributes["PROGRAM-ID"],10))}r.trigger("data",n)}else{if(t=/^#EXT-X-MEDIA:?(.*)$/.exec(e))return n={type:"tag",tagType:"media"},t[1]&&(n.attributes=P(t[1])),void r.trigger("data",n);if(t=/^#EXT-X-ENDLIST/.exec(e))r.trigger("data",{type:"tag",tagType:"endlist"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e))r.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(e))return n={type:"tag",tagType:"program-date-time"},t[1]&&(n.dateTimeString=t[1],n.dateTimeObject=new Date(t[1])),void r.trigger("data",n);if(t=/^#EXT-X-KEY:?(.*)$/.exec(e))return n={type:"tag",tagType:"key"},t[1]&&(n.attributes=P(t[1]),n.attributes.IV&&("0x"===n.attributes.IV.substring(0,2).toLowerCase()&&(n.attributes.IV=n.attributes.IV.substring(2)),n.attributes.IV=n.attributes.IV.match(/.{8}/g),n.attributes.IV[0]=parseInt(n.attributes.IV[0],16),n.attributes.IV[1]=parseInt(n.attributes.IV[1],16),n.attributes.IV[2]=parseInt(n.attributes.IV[2],16),n.attributes.IV[3]=parseInt(n.attributes.IV[3],16),n.attributes.IV=new Uint32Array(n.attributes.IV))),void r.trigger("data",n);if(t=/^#EXT-X-START:?(.*)$/.exec(e))return n={type:"tag",tagType:"start"},t[1]&&(n.attributes=P(t[1]),n.attributes["TIME-OFFSET"]=parseFloat(n.attributes["TIME-OFFSET"]),n.attributes.PRECISE=/YES/.test(n.attributes.PRECISE)),void r.trigger("data",n);if(t=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-out-cont"},t[1]?n.data=t[1]:n.data="",void r.trigger("data",n);if(t=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-out"},t[1]?n.data=t[1]:n.data="",void r.trigger("data",n);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-in"},t[1]?n.data=t[1]:n.data="",void r.trigger("data",n);if((t=/^#EXT-X-SKIP:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"skip"}).attributes=P(t[1]),n.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(n.attributes["SKIPPED-SEGMENTS"]=parseInt(n.attributes["SKIPPED-SEGMENTS"],10)),n.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(n.attributes["RECENTLY-REMOVED-DATERANGES"]=n.attributes["RECENTLY-REMOVED-DATERANGES"].split(A)),void r.trigger("data",n);if((t=/^#EXT-X-PART:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"part"}).attributes=P(t[1]),["DURATION"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseFloat(n.attributes[e]))})),["INDEPENDENT","GAP"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=/YES/.test(n.attributes[e]))})),n.attributes.hasOwnProperty("BYTERANGE")&&(n.attributes.byterange=O(n.attributes.BYTERANGE)),void r.trigger("data",n);if((t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"server-control"}).attributes=P(t[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseFloat(n.attributes[e]))})),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=/YES/.test(n.attributes[e]))})),void r.trigger("data",n);if((t=/^#EXT-X-PART-INF:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"part-inf"}).attributes=P(t[1]),["PART-TARGET"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseFloat(n.attributes[e]))})),void r.trigger("data",n);if((t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"preload-hint"}).attributes=P(t[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach((function(e){if(n.attributes.hasOwnProperty(e)){n.attributes[e]=parseInt(n.attributes[e],10);var t="BYTERANGE-LENGTH"===e?"length":"offset";n.attributes.byterange=n.attributes.byterange||{},n.attributes.byterange[t]=n.attributes[e],delete n.attributes[e]}})),void r.trigger("data",n);if((t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"rendition-report"}).attributes=P(t[1]),["LAST-MSN","LAST-PART"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseInt(n.attributes[e],10))})),void r.trigger("data",n);r.trigger("data",{type:"tag",data:e.slice(4)})}}}else r.trigger("data",{type:"comment",text:e.slice(1)})})):this.trigger("data",{type:"uri",uri:e}))},n.addParser=function(e){var t=this,n=e.expression,r=e.customType,i=e.dataParser,a=e.segment;"function"!=typeof i&&(i=function(e){return e}),this.customParsers.push((function(e){if(n.exec(e))return t.trigger("data",{type:"custom",data:i(e),customType:r,segment:a}),!0}))},n.addTagMapper=function(e){var t=e.expression,n=e.map;this.tagMappers.push((function(e){return t.test(e)?n(e):e}))},t}(w),D=function(e){var t={};return Object.keys(e).forEach((function(n){var r;t[(r=n,r.toLowerCase().replace(/-(\w)/g,(function(e){return e[1].toUpperCase()})))]=e[n]})),t},R=function(e){var t=e.serverControl,n=e.targetDuration,r=e.partTargetDuration;if(t){var i="#EXT-X-SERVER-CONTROL",a="holdBack",s="partHoldBack",o=n&&3*n,u=r&&2*r;n&&!t.hasOwnProperty(a)&&(t[a]=o,this.trigger("info",{message:i+" defaulting HOLD-BACK to targetDuration * 3 ("+o+")."})),o&&t[a]<o&&(this.trigger("warn",{message:i+" clamping HOLD-BACK ("+t[a]+") to targetDuration * 3 ("+o+")"}),t[a]=o),r&&!t.hasOwnProperty(s)&&(t[s]=3*r,this.trigger("info",{message:i+" defaulting PART-HOLD-BACK to partTargetDuration * 3 ("+t[s]+")."})),r&&t[s]<u&&(this.trigger("warn",{message:i+" clamping PART-HOLD-BACK ("+t[s]+") to partTargetDuration * 2 ("+u+")."}),t[s]=u)}},M=function(e){function t(){var t;(t=e.call(this)||this).lineStream=new I,t.parseStream=new L,t.lineStream.pipe(t.parseStream);var n,r,i=(0,u.Z)(t),a=[],s={},l=!1,c=function(){},d={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},h=0;t.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};var f=0,p=0;return t.on("end",(function(){s.uri||!s.parts&&!s.preloadHints||(!s.map&&n&&(s.map=n),!s.key&&r&&(s.key=r),s.timeline||"number"!=typeof h||(s.timeline=h),t.manifest.preloadSegment=s)})),t.parseStream.on("data",(function(e){var t,u;({tag:function(){({version:function(){e.version&&(this.manifest.version=e.version)},"allow-cache":function(){this.manifest.allowCache=e.allowed,"allowed"in e||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var t={};"length"in e&&(s.byterange=t,t.length=e.length,"offset"in e||(e.offset=f)),"offset"in e&&(s.byterange=t,t.offset=e.offset),f=t.offset+t.length},endlist:function(){this.manifest.endList=!0},inf:function(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),e.duration>0&&(s.duration=e.duration),0===e.duration&&(s.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=a},key:function(){if(e.attributes)if("NONE"!==e.attributes.METHOD)if(e.attributes.URI){if("com.apple.streamingkeydelivery"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:e.attributes});if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===e.attributes.KEYFORMAT)return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(e.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===e.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==e.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):e.attributes.KEYID&&"0x"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:k(e.attributes.URI.split(",")[1])})):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}));e.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),r={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},void 0!==e.attributes.IV&&(r.iv=e.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else r=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+e.number})},"discontinuity-sequence":function(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,h=e.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+e.number})},"playlist-type":function(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+e.playlist})},map:function(){n={},e.uri&&(n.uri=e.uri),e.byterange&&(n.byterange=e.byterange),r&&(n.key=r)},"stream-inf":function(){this.manifest.playlists=a,this.manifest.mediaGroups=this.manifest.mediaGroups||d,e.attributes?(s.attributes||(s.attributes={}),(0,o.Z)(s.attributes,e.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||d,e.attributes&&e.attributes.TYPE&&e.attributes["GROUP-ID"]&&e.attributes.NAME){var n=this.manifest.mediaGroups[e.attributes.TYPE];n[e.attributes["GROUP-ID"]]=n[e.attributes["GROUP-ID"]]||{},t=n[e.attributes["GROUP-ID"]],(u={default:/yes/i.test(e.attributes.DEFAULT)}).default?u.autoselect=!0:u.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(u.language=e.attributes.LANGUAGE),e.attributes.URI&&(u.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(u.instreamId=e.attributes["INSTREAM-ID"]),e.attributes.CHARACTERISTICS&&(u.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(u.forced=/yes/i.test(e.attributes.FORCED)),t[e.attributes.NAME]=u}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){h+=1,s.discontinuity=!0,this.manifest.discontinuityStarts.push(a.length)},"program-date-time":function(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),s.dateTimeString=e.dateTimeString,s.dateTimeObject=e.dateTimeObject},targetduration:function(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+e.duration}):(this.manifest.targetDuration=e.duration,R.call(this,this.manifest))},start:function(){e.attributes&&!isNaN(e.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:e.attributes["TIME-OFFSET"],precise:e.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out":function(){s.cueOut=e.data},"cue-out-cont":function(){s.cueOutCont=e.data},"cue-in":function(){s.cueIn=e.data},skip:function(){this.manifest.skip=D(e.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",e.attributes,["SKIPPED-SEGMENTS"])},part:function(){var t=this;l=!0;var n=this.manifest.segments.length,r=D(e.attributes);s.parts=s.parts||[],s.parts.push(r),r.byterange&&(r.byterange.hasOwnProperty("offset")||(r.byterange.offset=p),p=r.byterange.offset+r.byterange.length);var i=s.parts.length-1;this.warnOnMissingAttributes_("#EXT-X-PART #"+i+" for segment #"+n,e.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((function(e,n){e.hasOwnProperty("lastPart")||t.trigger("warn",{message:"#EXT-X-RENDITION-REPORT #"+n+" lacks required attribute(s): LAST-PART"})}))},"server-control":function(){var t=this.manifest.serverControl=D(e.attributes);t.hasOwnProperty("canBlockReload")||(t.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),R.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint":function(){var t=this.manifest.segments.length,n=D(e.attributes),r=n.type&&"PART"===n.type;s.preloadHints=s.preloadHints||[],s.preloadHints.push(n),n.byterange&&(n.byterange.hasOwnProperty("offset")||(n.byterange.offset=r?p:0,r&&(p=n.byterange.offset+n.byterange.length)));var i=s.preloadHints.length-1;if(this.warnOnMissingAttributes_("#EXT-X-PRELOAD-HINT #"+i+" for segment #"+t,e.attributes,["TYPE","URI"]),n.type)for(var a=0;a<s.preloadHints.length-1;a++){var o=s.preloadHints[a];o.type&&o.type===n.type&&this.trigger("warn",{message:"#EXT-X-PRELOAD-HINT #"+i+" for segment #"+t+" has the same TYPE "+n.type+" as preload hint #"+a})}},"rendition-report":function(){var t=D(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);var n=this.manifest.renditionReports.length-1,r=["LAST-MSN","URI"];l&&r.push("LAST-PART"),this.warnOnMissingAttributes_("#EXT-X-RENDITION-REPORT #"+n,e.attributes,r)},"part-inf":function(){this.manifest.partInf=D(e.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",e.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),R.call(this,this.manifest)}}[e.tagType]||c).call(i)},uri:function(){s.uri=e.uri,a.push(s),this.manifest.targetDuration&&!("duration"in s)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),s.duration=this.manifest.targetDuration),r&&(s.key=r),s.timeline=h,n&&(s.map=n),p=0,s={}},comment:function(){},custom:function(){e.segment?(s.custom=s.custom||{},s.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(i)})),t}(0,l.Z)(t,e);var n=t.prototype;return n.warnOnMissingAttributes_=function(e,t,n){var r=[];n.forEach((function(e){t.hasOwnProperty(e)||r.push(e)})),r.length&&this.trigger("warn",{message:e+" lacks required attribute(s): "+r.join(", ")})},n.push=function(e){this.lineStream.push(e)},n.end=function(){this.lineStream.push("\n"),this.trigger("end")},n.addParser=function(e){this.parseStream.addParser(e)},n.addTagMapper=function(e){this.parseStream.addTagMapper(e)},t}(w),N={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},U=["video","audio","text"],F=["Video","Audio","Text"],B=function(e){return e?e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e,t,n){return"avc1."+("00"+Number(t).toString(16)).slice(-2)+"00"+("00"+Number(n).toString(16)).slice(-2)})):e},j=function(e){void 0===e&&(e="");var t=e.split(","),n=[];return t.forEach((function(e){var t;e=e.trim(),U.forEach((function(r){var i=N[r].exec(e.toLowerCase());if(i&&!(i.length<=1)){t=r;var a=e.substring(0,i[1].length),s=e.replace(a,"");n.push({type:a,details:s,mediaType:r})}})),t||n.push({type:e,details:"",mediaType:"unknown"})})),n},H=function(e){return void 0===e&&(e=""),N.audio.test(e.trim().toLowerCase())},V=function(e){if(e&&"string"==typeof e){var t,n=e.toLowerCase().split(",").map((function(e){return B(e.trim())})),r="video";1===n.length&&H(n[0])?r="audio":1===n.length&&(void 0===(t=n[0])&&(t=""),N.text.test(t.trim().toLowerCase()))&&(r="application");var i="mp4";return n.every((function(e){return N.mp4.test(e)}))?i="mp4":n.every((function(e){return N.webm.test(e)}))?i="webm":n.every((function(e){return N.ogg.test(e)}))&&(i="ogg"),r+"/"+i+';codecs="'+e+'"'}},q=function(e){return void 0===e&&(e=""),i().MediaSource&&i().MediaSource.isTypeSupported&&i().MediaSource.isTypeSupported(V(e))||!1},W=function(e){return void 0===e&&(e=""),e.toLowerCase().split(",").every((function(e){e=e.trim();for(var t=0;t<F.length;t++)if(N["muxer"+F[t]].test(e))return!0;return!1}))},z="mp4a.40.2",G=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,X=/^application\/dash\+xml/i,$=function(e){return G.test(e)?"hls":X.test(e)?"dash":"application/vnd.videojs.vhs+json"===e?"vhs-json":null},K=n(73668),Z=function(e){return!!e&&"object"==typeof e},Y=function e(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.reduce((function(t,n){return"object"!=typeof n||Object.keys(n).forEach((function(r){Array.isArray(t[r])&&Array.isArray(n[r])?t[r]=t[r].concat(n[r]):Z(t[r])&&Z(n[r])?t[r]=e(t[r],n[r]):t[r]=n[r]})),t}),{})},Q=function(e){return e.reduce((function(e,t){return e.concat(t)}),[])},J=function(e){if(!e.length)return[];for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t},ee=function(e){var t=e.baseUrl,n=void 0===t?"":t,r=e.source,i=void 0===r?"":r,a=e.range,s=void 0===a?"":a,o=e.indexRange,u=void 0===o?"":o,l={uri:i,resolvedUri:S(n||"",i)};if(s||u){var c=(s||u).split("-"),d=parseInt(c[0],10),h=parseInt(c[1],10);l.byterange={length:h-d+1,offset:d}}return l},te=function(e){return e&&"number"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e},ne={static:function(e){var t=e.duration,n=e.timescale,r=void 0===n?1:n,i=e.sourceDuration,a=te(e.endNumber);return{start:0,end:"number"==typeof a?a:Math.ceil(i/(t/r))}},dynamic:function(e){var t=e.NOW,n=e.clientOffset,r=e.availabilityStartTime,i=e.timescale,a=void 0===i?1:i,s=e.duration,o=e.start,u=void 0===o?0:o,l=e.minimumUpdatePeriod,c=void 0===l?0:l,d=e.timeShiftBufferDepth,h=void 0===d?1/0:d,f=te(e.endNumber),p=(t+n)/1e3,m=r+u,g=p+c-m,v=Math.ceil(g*a/s),y=Math.floor((p-m-h)*a/s),_=Math.floor((p-m)*a/s);return{start:Math.max(0,y),end:"number"==typeof f?f:Math.min(v,_)}}},re=function(e){var t=e.type,n=void 0===t?"static":t,r=e.duration,i=e.timescale,a=void 0===i?1:i,s=e.sourceDuration,o=ne[n](e),u=function(e,t){for(var n=[],r=e;r<t;r++)n.push(r);return n}(o.start,o.end).map(function(e){return function(t,n){var r=e.duration,i=e.timescale,a=void 0===i?1:i,s=e.periodIndex,o=e.startNumber;return{number:(void 0===o?1:o)+t,duration:r/a,timeline:s,time:n*r}}}(e));if("static"===n){var l=u.length-1;u[l].duration=s-r/a*l}return u},ie=function(e){var t=e.baseUrl,n=e.initialization,r=void 0===n?{}:n,i=e.sourceDuration,a=e.indexRange,s=void 0===a?"":a,o=e.duration;if(!t)throw new Error("NO_BASE_URL");var u=ee({baseUrl:t,source:r.sourceURL,range:r.range}),l=ee({baseUrl:t,source:t,indexRange:s});if(l.map=u,o){var c=re(e);c.length&&(l.duration=c[0].duration,l.timeline=c[0].timeline)}else i&&(l.duration=i,l.timeline=0);return l.number=0,[l]},ae=function(e,t,n){for(var r=e.sidx.map?e.sidx.map:null,i=e.sidx.duration,a=e.timeline||0,s=e.sidx.byterange,o=s.offset+s.length,u=t.timescale,l=t.references.filter((function(e){return 1!==e.referenceType})),c=[],d=o+t.firstOffset,h=0;h<l.length;h++){var f=t.references[h],p=f.referencedSize,m=f.subsegmentDuration,g=ie({baseUrl:n,timescale:u,timeline:a,periodIndex:a,duration:m,sourceDuration:i,indexRange:d+"-"+(d+p-1)})[0];r&&(g.map=r),c.push(g),d+=p}return e.segments=c,e},se=function(e){return e&&e.uri+"-"+(n=(t=e.byterange).offset+t.length-1,t.offset+"-"+n);var t,n},oe=function(e){var t;return(t=e.reduce((function(e,t){var n,r=t.attributes.id+(t.attributes.lang||"");return e[r]?(t.segments[0]&&(t.segments[0].discontinuity=!0),(n=e[r].segments).push.apply(n,t.segments),t.attributes.contentProtection&&(e[r].attributes.contentProtection=t.attributes.contentProtection)):e[r]=t,e}),{}),Object.keys(t).map((function(e){return t[e]}))).map((function(e){var t;return e.discontinuityStarts=(t=e.segments,"discontinuity",t.reduce((function(e,t,n){return t.discontinuity&&e.push(n),e}),[])),e}))},ue=function(e,t){var n=se(e.sidx),r=n&&t[n]&&t[n].sidx;return r&&ae(e,r,e.sidx.resolvedUri),e},le=function(e,t){if(void 0===t&&(t={}),!Object.keys(t).length)return e;for(var n in e)e[n]=ue(e[n],t);return e},ce=function(e){var t,n=e.attributes,r=e.segments,i=e.sidx,a={attributes:(t={NAME:n.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:n.width,height:n.height},CODECS:n.codecs,BANDWIDTH:n.bandwidth},t["PROGRAM-ID"]=1,t),uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:"",targetDuration:n.duration,segments:r,mediaSequence:r.length?r[0].number:1};return n.contentProtection&&(a.contentProtection=n.contentProtection),i&&(a.sidx=i),a},de=function(e){var t=e.attributes;return"video/mp4"===t.mimeType||"video/webm"===t.mimeType||"video"===t.contentType},he=function(e){var t=e.attributes;return"audio/mp4"===t.mimeType||"audio/webm"===t.mimeType||"audio"===t.contentType},fe=function(e){var t=e.attributes;return"text/vtt"===t.mimeType||"text"===t.contentType},pe=function(e,t,n){var r=e.NOW,i=e.clientOffset,a=e.availabilityStartTime,s=e.timescale,o=void 0===s?1:s,u=e.start,l=void 0===u?0:u,c=e.minimumUpdatePeriod,d=(r+i)/1e3+(void 0===c?0:c)-(a+l);return Math.ceil((d*o-t)/n)},me=function(e,t){for(var n=e.type,r=void 0===n?"static":n,i=e.minimumUpdatePeriod,a=void 0===i?0:i,s=e.media,o=void 0===s?"":s,u=e.sourceDuration,l=e.timescale,c=void 0===l?1:l,d=e.startNumber,h=void 0===d?1:d,f=e.periodIndex,p=[],m=-1,g=0;g<t.length;g++){var v=t[g],y=v.d,_=v.r||0,b=v.t||0;m<0&&(m=b),b&&b>m&&(m=b);var T=void 0;if(_<0){var S=g+1;T=S===t.length?"dynamic"===r&&a>0&&o.indexOf("$Number$")>0?pe(e,m,y):(u*c-m)/y:(t[S].t-m)/y}else T=_+1;for(var w=h+p.length+T,k=h+p.length;k<w;)p.push({number:k,duration:y/c,time:m,timeline:f}),m+=y,k++}return p},ge=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,ve=function(e,t){return e.replace(ge,function(e){return function(t,n,r,i){if("$$"===t)return"$";if(void 0===e[n])return t;var a=""+e[n];return"RepresentationID"===n?a:(i=r?parseInt(i,10):1,a.length>=i?a:""+new Array(i-a.length+1).join("0")+a)}}(t))},ye=function(e,t){var n={RepresentationID:e.id,Bandwidth:e.bandwidth||0},r=e.initialization,i=void 0===r?{sourceURL:"",range:""}:r,a=ee({baseUrl:e.baseUrl,source:ve(i.sourceURL,n),range:i.range}),s=function(e,t){return e.duration||t?e.duration?re(e):me(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodIndex}]}(e,t);return s.map((function(t){n.Number=t.number,n.Time=t.time;var r=ve(e.media||"",n),i={uri:r,timeline:t.timeline,duration:t.duration,resolvedUri:S(e.baseUrl||"",r),map:a,number:t.number};return e.presentationTimeOffset&&(i.presentationTimeOffset=e.presentationTimeOffset),i}))},_e=function(e,t){var n=e.duration,r=e.segmentUrls,i=void 0===r?[]:r;if(!n&&!t||n&&t)throw new Error("SEGMENT_TIME_UNSPECIFIED");var a,s=i.map((function(t){return function(e,t){var n=e.baseUrl,r=e.initialization,i=void 0===r?{}:r,a=ee({baseUrl:n,source:i.sourceURL,range:i.range}),s=ee({baseUrl:n,source:t.media,range:t.mediaRange});return s.map=a,s}(e,t)}));return n&&(a=re(e)),t&&(a=me(e,t)),a.map((function(e,t){if(s[t]){var n=s[t];return n.timeline=e.timeline,n.duration=e.duration,n.number=e.number,n}})).filter((function(e){return e}))},be=function(e){var t,n,r=e.attributes,i=e.segmentInfo;i.template?(n=ye,t=Y(r,i.template),i.template.presentationTimeOffset&&(t.presentationTimeOffset=i.template.presentationTimeOffset/i.template.timescale)):i.base?(n=ie,t=Y(r,i.base)):i.list&&(n=_e,t=Y(r,i.list));var a={attributes:r};if(!n)return a;var s=n(t,i.timeline);if(t.duration){var o=t,u=o.duration,l=o.timescale,c=void 0===l?1:l;t.duration=u/c}else s.length?t.duration=s.reduce((function(e,t){return Math.max(e,Math.ceil(t.duration))}),0):t.duration=0;return a.attributes=t,a.segments=s,i.base&&t.indexRange&&(a.sidx=s[0],a.segments=[]),a},Te=function(e,t){return J(e.childNodes).filter((function(e){return e.tagName===t}))},Se=function(e){return e.textContent.trim()},we=function(e){var t=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(e);if(!t)return 0;var n=t.slice(1),r=n[0],i=n[1],a=n[2],s=n[3],o=n[4],u=n[5];return 31536e3*parseFloat(r||0)+2592e3*parseFloat(i||0)+86400*parseFloat(a||0)+3600*parseFloat(s||0)+60*parseFloat(o||0)+parseFloat(u||0)},ke={mediaPresentationDuration:function(e){return we(e)},availabilityStartTime:function(e){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(t=e)&&(t+="Z"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:function(e){return we(e)},suggestedPresentationDelay:function(e){return we(e)},type:function(e){return e},timeShiftBufferDepth:function(e){return we(e)},start:function(e){return we(e)},width:function(e){return parseInt(e,10)},height:function(e){return parseInt(e,10)},bandwidth:function(e){return parseInt(e,10)},startNumber:function(e){return parseInt(e,10)},timescale:function(e){return parseInt(e,10)},presentationTimeOffset:function(e){return parseInt(e,10)},duration:function(e){var t=parseInt(e,10);return isNaN(t)?we(e):t},d:function(e){return parseInt(e,10)},t:function(e){return parseInt(e,10)},r:function(e){return parseInt(e,10)},DEFAULT:function(e){return e}},Ee=function(e){return e&&e.attributes?J(e.attributes).reduce((function(e,t){var n=ke[t.name]||ke.DEFAULT;return e[t.name]=n(t.value),e}),{}):{}},Ce={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},xe=function(e,t){return t.length?Q(e.map((function(e){return t.map((function(t){return S(e,Se(t))}))}))):e},Ie=function(e){var t=Te(e,"SegmentTemplate")[0],n=Te(e,"SegmentList")[0],r=n&&Te(n,"SegmentURL").map((function(e){return Y({tag:"SegmentURL"},Ee(e))})),i=Te(e,"SegmentBase")[0],a=n||t,s=a&&Te(a,"SegmentTimeline")[0],o=n||i||t,u=o&&Te(o,"Initialization")[0],l=t&&Ee(t);l&&u?l.initialization=u&&Ee(u):l&&l.initialization&&(l.initialization={sourceURL:l.initialization});var c={template:l,timeline:s&&Te(s,"S").map((function(e){return Ee(e)})),list:n&&Y(Ee(n),{segmentUrls:r,initialization:Ee(u)}),base:i&&Y(Ee(i),{initialization:Ee(u)})};return Object.keys(c).forEach((function(e){c[e]||delete c[e]})),c},Ae=function(e,t){return function(n,r){var a=xe(t,Te(n,"BaseURL")),s=Ee(n),o=parseInt(s.id,10),u=i().isNaN(o)?r:o,l=Y(e,{periodIndex:u}),c=Te(n,"AdaptationSet"),d=Ie(n);return Q(c.map(function(e,t,n){return function(r){var i=Ee(r),a=xe(t,Te(r,"BaseURL")),s=Te(r,"Role")[0],o={role:Ee(s)},u=Y(e,i,o),l=Te(r,"Label")[0];if(l&&l.childNodes.length){var c=l.childNodes[0].nodeValue.trim();u=Y(u,{label:c})}var d=Te(r,"ContentProtection").reduce((function(e,t){var n=Ee(t),r=Ce[n.schemeIdUri];if(r){e[r]={attributes:n};var i=Te(t,"cenc:pssh")[0];if(i){var a=Se(i),s=a&&k(a);e[r].pssh=s}}return e}),{});Object.keys(d).length&&(u=Y(u,{contentProtection:d}));var h=Ie(r),f=Te(r,"Representation"),p=Y(n,h);return Q(f.map(function(e,t,n){return function(r){var i=Te(r,"BaseURL"),a=xe(t,i),s=Y(e,Ee(r)),o=Ie(r);return a.map((function(e){return{segmentInfo:Y(n,o),attributes:Y(s,{baseUrl:e})}}))}}(u,a,p)))}}(l,a,d)))}},Oe=function(e){if(""===e)throw new Error("DASH_EMPTY_MANIFEST");var t,n,r=new K.a;try{n=(t=r.parseFromString(e,"application/xml"))&&"MPD"===t.documentElement.tagName?t.documentElement:null}catch(e){}if(!n||n&&n.getElementsByTagName("parsererror").length>0)throw new Error("DASH_INVALID_XML");return n},Pe=function(e,t){void 0===t&&(t={});var n=function(e,t){void 0===t&&(t={});var n=t,r=n.manifestUri,i=void 0===r?"":r,a=n.NOW,s=void 0===a?Date.now():a,o=n.clientOffset,u=void 0===o?0:o,l=Te(e,"Period");if(!l.length)throw new Error("INVALID_NUMBER_OF_PERIOD");var c=Te(e,"Location"),d=Ee(e),h=xe([i],Te(e,"BaseURL"));return d.sourceDuration=d.mediaPresentationDuration||0,d.NOW=s,d.clientOffset=u,c.length&&(d.locations=c.map(Se)),{locations:d.locations,representationInfo:Q(l.map(Ae(d,h)))}}(Oe(e),t);return function(e,t,n){var r;if(void 0===n&&(n={}),!e.length)return{};var i=e[0].attributes,a=i.sourceDuration,s=i.type,o=void 0===s?"static":s,u=i.suggestedPresentationDelay,l=i.minimumUpdatePeriod,c=oe(e.filter(de)).map(ce),d=oe(e.filter(he)),h=e.filter(fe),f={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(r={AUDIO:{},VIDEO:{}},r["CLOSED-CAPTIONS"]={},r.SUBTITLES={},r),uri:"",duration:a,playlists:le(c,n)};l>=0&&(f.minimumUpdatePeriod=1e3*l),t&&(f.locations=t),"dynamic"===o&&(f.suggestedPresentationDelay=u);var p=0===f.playlists.length;return d.length&&(f.mediaGroups.AUDIO.audio=function(e,t,n){var r;void 0===t&&(t={}),void 0===n&&(n=!1);var i=e.reduce((function(e,i){var a=i.attributes.role&&i.attributes.role.value||"",s=i.attributes.lang||"",o=i.attributes.label||"main";if(s&&!i.attributes.label){var u=a?" ("+a+")":"";o=""+i.attributes.lang+u}e[o]||(e[o]={language:s,autoselect:!0,default:"main"===a,playlists:[],uri:""});var l=ue(function(e,t){var n,r=e.attributes,i=e.segments,a=e.sidx,s={attributes:(n={NAME:r.id,BANDWIDTH:r.bandwidth,CODECS:r.codecs},n["PROGRAM-ID"]=1,n),uri:"",endList:"static"===(r.type||"static"),timeline:r.periodIndex,resolvedUri:"",targetDuration:r.duration,segments:i,mediaSequence:i.length?i[0].number:1};return r.contentProtection&&(s.contentProtection=r.contentProtection),a&&(s.sidx=a),t&&(s.attributes.AUDIO="audio",s.attributes.SUBTITLES="subs"),s}(i,n),t);return e[o].playlists.push(l),void 0===r&&"main"===a&&((r=i).default=!0),e}),{});return r||(i[Object.keys(i)[0]].default=!0),i}(d,n,p)),h.length&&(f.mediaGroups.SUBTITLES.subs=function(e,t){return void 0===t&&(t={}),e.reduce((function(e,n){var r=n.attributes.lang||"text";return e[r]||(e[r]={language:r,default:!1,autoselect:!1,playlists:[],uri:""}),e[r].playlists.push(ue(function(e){var t,n=e.attributes,r=e.segments;void 0===r&&(r=[{uri:n.baseUrl,timeline:n.periodIndex,resolvedUri:n.baseUrl||"",duration:n.sourceDuration,number:0}],n.duration=n.sourceDuration);var i=((t={NAME:n.id,BANDWIDTH:n.bandwidth})["PROGRAM-ID"]=1,t);return n.codecs&&(i.CODECS=n.codecs),{attributes:i,uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:n.baseUrl||"",targetDuration:n.duration,segments:r,mediaSequence:r.length?r[0].number:1}}(n),t)),e}),{})}(h,n)),f}(n.representationInfo.map(be),n.locations,t.sidxMapping)},Le=n(57258),De=n.n(Le),Re=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||function(e){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer}(e)||e instanceof ArrayBuffer||(e="number"!=typeof e||"number"==typeof e&&e!=e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Me=i().BigInt||Number,Ne=[Me("0x1"),Me("0x100"),Me("0x10000"),Me("0x1000000"),Me("0x100000000"),Me("0x10000000000"),Me("0x1000000000000"),Me("0x100000000000000"),Me("0x10000000000000000")],Ue=(E=new Uint16Array([65484]),255===(C=new Uint8Array(E.buffer,E.byteOffset,E.byteLength))[0]||C[0],function(e,t){var n=void 0===t?{}:t,r=n.signed,i=void 0!==r&&r,a=n.le,s=void 0!==a&&a;e=Re(e);var o=s?"reduce":"reduceRight",u=(e[o]?e[o]:Array.prototype[o]).call(e,(function(t,n,r){var i=s?r:Math.abs(r+1-e.length);return t+Me(n)*Ne[i]}),Me(0));if(i){var l=Ne[e.length]/Me(2)-Me(1);(u=Me(u))>l&&(u-=l,u-=l,u-=Me(2))}return Number(u)}),Fe=function(e,t){if("string"!=typeof e&&e&&"function"==typeof e.toString&&(e=e.toString()),"string"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var n=new Uint8Array(e.length),r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n},Be=function(e,t,n){var r=void 0===n?{}:n,i=r.offset,a=void 0===i?0:i,s=r.mask,o=void 0===s?[]:s;e=Re(e);var u=(t=Re(t)).every?t.every:Array.prototype.every;return t.length&&e.length-a>=t.length&&u.call(t,(function(t,n){return t===(o[n]?o[n]&e[a+n]:e[a+n])}))},je=Re([73,68,51]),He=function e(t,n){return void 0===n&&(n=0),(t=Re(t)).length-n<10||!Be(t,je,{offset:n})?n:(n+=function(e,t){void 0===t&&(t=0);var n=(e=Re(e))[t+5],r=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&n)>>4?r+20:r+10}(t,n),e(t,n))},Ve=(new Uint8Array([79,112,117,115,72,101,97,100]),function(e){return"string"==typeof e?Fe(e):e}),qe=function(e){e=Re(e);for(var t=[],n=0;e.length>n;){var r=e[n],i=0,a=0,s=e[++a];for(a++;128&s;)i=(127&s)<<7,s=e[a],a++;i+=127&s;for(var o=0;o<x.length;o++){var u=x[o],l=u.id,c=u.parser;if(r===l){t.push(c(e.subarray(a,a+i)));break}}n+=i+a}return t};x=[{id:3,parser:function(e){var t={tag:3,id:e[0]<<8|e[1],flags:e[2],size:3,dependsOnEsId:0,ocrEsId:0,descriptors:[],url:""};if(128&t.flags&&(t.dependsOnEsId=e[t.size]<<8|e[t.size+1],t.size+=2),64&t.flags){var n=e[t.size];t.url=function(e){if(!e)return"";e=Array.prototype.slice.call(e);var t=String.fromCharCode.apply(null,Re(e));try{return decodeURIComponent(escape(t))}catch(e){}return t}(e.subarray(t.size+1,t.size+1+n)),t.size+=n}return 32&t.flags&&(t.ocrEsId=e[t.size]<<8|e[t.size+1],t.size+=2),t.descriptors=qe(e.subarray(t.size))||[],t}},{id:4,parser:function(e){return{tag:4,oti:e[0],streamType:e[1],bufferSize:e[2]<<16|e[3]<<8|e[4],maxBitrate:e[5]<<24|e[6]<<16|e[7]<<8|e[8],avgBitrate:e[9]<<24|e[10]<<16|e[11]<<8|e[12],descriptors:qe(e.subarray(13))}}},{id:5,parser:function(e){return{tag:5,bytes:e}}},{id:6,parser:function(e){return{tag:6,bytes:e}}}];var We=function e(t,n,r){void 0===r&&(r=!1),n=function(e){return Array.isArray(e)?e.map((function(e){return Ve(e)})):[Ve(e)]}(n),t=Re(t);var i=[];if(!n.length)return i;for(var a=0;a<t.length;){var s=(t[a]<<24|t[a+1]<<16|t[a+2]<<8|t[a+3])>>>0,o=t.subarray(a+4,a+8);if(0===s)break;var u=a+s;if(u>t.length){if(r)break;u=t.length}var l=t.subarray(a+8,u);Be(o,n[0])&&(1===n.length?i.push(l):i.push.apply(i,e(l,n.slice(1),r))),a=u}return i},ze={EBML:Re([26,69,223,163]),DocType:Re([66,130]),Segment:Re([24,83,128,103]),SegmentInfo:Re([21,73,169,102]),Tracks:Re([22,84,174,107]),Track:Re([174]),TrackNumber:Re([215]),DefaultDuration:Re([35,227,131]),TrackEntry:Re([174]),TrackType:Re([131]),FlagDefault:Re([136]),CodecID:Re([134]),CodecPrivate:Re([99,162]),VideoTrack:Re([224]),AudioTrack:Re([225]),Cluster:Re([31,67,182,117]),Timestamp:Re([231]),TimestampScale:Re([42,215,177]),BlockGroup:Re([160]),BlockDuration:Re([155]),Block:Re([161]),SimpleBlock:Re([163])},Ge=[128,64,32,16,8,4,2,1],Xe=function(e,t,n,r){void 0===n&&(n=!0),void 0===r&&(r=!1);var i=function(e){for(var t=1,n=0;n<Ge.length&&!(e&Ge[n]);n++)t++;return t}(e[t]),a=e.subarray(t,t+i);return n&&((a=Array.prototype.slice.call(e,t,t+i))[0]^=Ge[i-1]),{length:i,value:Ue(a,{signed:r}),bytes:a}},$e=function e(t){return"string"==typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):"number"==typeof t?function(e,t){var n=(void 0===t?{}:t).le,r=void 0!==n&&n;("bigint"!=typeof e&&"number"!=typeof e||"number"==typeof e&&e!=e)&&(e=0);for(var i,a=(i=e=Me(e),Math.ceil(function(e){return e.toString(2).length}(i)/8)),s=new Uint8Array(new ArrayBuffer(a)),o=0;o<a;o++){var u=r?o:Math.abs(o+1-s.length);s[u]=Number(e/Ne[o]&Me(255)),e<0&&(s[u]=Math.abs(~s[u]),s[u]-=0===o?1:2)}return s}(t):t},Ke=function e(t,n,r){if(r>=n.length)return n.length;var i=Xe(n,r,!1);if(Be(t.bytes,i.bytes))return r;var a=Xe(n,r+i.length);return e(t,n,r+a.length+a.value+i.length)},Ze=function e(t,n){n=function(e){return Array.isArray(e)?e.map((function(e){return $e(e)})):[$e(e)]}(n),t=Re(t);var r=[];if(!n.length)return r;for(var i=0;i<t.length;){var a=Xe(t,i,!1),s=Xe(t,i+a.length),o=i+a.length+s.length;127===s.value&&(s.value=Ke(a,t,o),s.value!==t.length&&(s.value-=o));var u=o+s.value>t.length?t.length:o+s.value,l=t.subarray(o,u);Be(n[0],a.bytes)&&(1===n.length?r.push(l):r=r.concat(e(l,n.slice(1)))),i+=a.length+s.length+l.length}return r},Ye=Re([0,0,0,1]),Qe=Re([0,0,1]),Je=Re([0,0,3]),et=function(e){for(var t=[],n=1;n<e.length-2;)Be(e.subarray(n,n+3),Je)&&(t.push(n+2),n++),n++;if(0===t.length)return e;var r=e.length-t.length,i=new Uint8Array(r),a=0;for(n=0;n<r;a++,n++)a===t[0]&&(a++,t.shift()),i[n]=e[a];return i},tt=function(e,t,n,r){void 0===r&&(r=1/0),e=Re(e),n=[].concat(n);for(var i,a=0,s=0;a<e.length&&(s<r||i);){var o=void 0;if(Be(e.subarray(a),Ye)?o=4:Be(e.subarray(a),Qe)&&(o=3),o){if(s++,i)return et(e.subarray(i,a));var u=void 0;"h264"===t?u=31&e[a+o]:"h265"===t&&(u=e[a+o]>>1&63),-1!==n.indexOf(u)&&(i=a+o),a+=o+("h264"===t?1:2)}else a++}return e.subarray(0,0)},nt={webm:Re([119,101,98,109]),matroska:Re([109,97,116,114,111,115,107,97]),flac:Re([102,76,97,67]),ogg:Re([79,103,103,83]),ac3:Re([11,119]),riff:Re([82,73,70,70]),avi:Re([65,86,73]),wav:Re([87,65,86,69]),"3gp":Re([102,116,121,112,51,103]),mp4:Re([102,116,121,112]),fmp4:Re([115,116,121,112]),mov:Re([102,116,121,112,113,116]),moov:Re([109,111,111,118]),moof:Re([109,111,111,102])},rt={aac:function(e){var t=He(e);return Be(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=He(e);return Be(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=Ze(e,[ze.EBML,ze.DocType])[0];return Be(t,nt.webm)},mkv:function(e){var t=Ze(e,[ze.EBML,ze.DocType])[0];return Be(t,nt.matroska)},mp4:function(e){return!rt["3gp"](e)&&!rt.mov(e)&&(!(!Be(e,nt.mp4,{offset:4})&&!Be(e,nt.fmp4,{offset:4}))||!(!Be(e,nt.moof,{offset:4})&&!Be(e,nt.moov,{offset:4}))||void 0)},mov:function(e){return Be(e,nt.mov,{offset:4})},"3gp":function(e){return Be(e,nt["3gp"],{offset:4})},ac3:function(e){var t=He(e);return Be(e,nt.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=He(e);return Be(e,nt.flac,{offset:t})},ogg:function(e){return Be(e,nt.ogg)},avi:function(e){return Be(e,nt.riff)&&Be(e,nt.avi,{offset:8})},wav:function(e){return Be(e,nt.riff)&&Be(e,nt.wav,{offset:8})},h264:function(e){return function(e,t,n){return tt(e,"h264",7,3)}(e).length},h265:function(e){return function(e,t,n){return tt(e,"h265",[32,33],3)}(e).length}},it=Object.keys(rt).filter((function(e){return"ts"!==e&&"h264"!==e&&"h265"!==e})).concat(["ts","h264","h265"]);it.forEach((function(e){var t=rt[e];rt[e]=function(e){return t(Re(e))}}));for(var at,st=rt,ot=function(e){e=Re(e);for(var t=0;t<it.length;t++){var n=it[t];if(st[n](e))return n}return""},ut=n(28195),lt="7.12.4",ct={prefixed:!0},dt=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]],ht=dt[0],ft=0;ft<dt.length;ft++)if(dt[ft][1]in s()){at=dt[ft];break}if(at){for(var pt=0;pt<at.length;pt++)ct[ht[pt]]=at[pt];ct.prefixed=at[0]!==ht[0]}var mt=[],gt=function e(t){var n,r="info",a=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n("log",r,t)};return n=function(e,t){return function(n,r,a){var s=t.levels[r],o=new RegExp("^("+s+")$");if("log"!==n&&a.unshift(n.toUpperCase()+":"),a.unshift(e+":"),mt){mt.push([].concat(a));var u=mt.length-1e3;mt.splice(0,u>0?u:0)}if(i().console){var l=i().console[n];l||"debug"!==n||(l=i().console.info||i().console.log),l&&s&&o.test(n)&&l[Array.isArray(a)?"apply":"call"](i().console,a)}}}(t,a),a.createLogger=function(n){return e(t+": "+n)},a.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:r},a.level=function(e){if("string"==typeof e){if(!a.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');r=e}return r},(a.history=function(){return mt?[].concat(mt):[]}).filter=function(e){return(mt||[]).filter((function(t){return new RegExp(".*"+e+".*").test(t[0])}))},a.history.clear=function(){mt&&(mt.length=0)},a.history.disable=function(){null!==mt&&(mt.length=0,mt=null)},a.history.enable=function(){null===mt&&(mt=[])},a.error=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("error",r,t)},a.warn=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("warn",r,t)},a.debug=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("debug",r,t)},a}("VIDEOJS"),vt=gt.createLogger,yt=Object.prototype.toString,_t=function(e){return St(e)?Object.keys(e):[]};function bt(e,t){_t(e).forEach((function(n){return t(e[n],n)}))}function Tt(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Object.assign?o.Z.apply(void 0,[e].concat(n)):(n.forEach((function(t){t&&bt(t,(function(t,n){e[n]=t}))})),e)}function St(e){return!!e&&"object"==typeof e}function wt(e){return St(e)&&"[object Object]"===yt.call(e)&&e.constructor===Object}function kt(e,t){if(!e||!t)return"";if("function"==typeof i().getComputedStyle){var n;try{n=i().getComputedStyle(e)}catch(e){return""}return n?n.getPropertyValue(t)||n[t]:""}return""}var Et,Ct,xt,It=i().navigator&&i().navigator.userAgent||"",At=/AppleWebKit\/([\d.]+)/i.exec(It),Ot=At?parseFloat(At.pop()):null,Pt=/iPod/i.test(It),Lt=(Et=It.match(/OS (\d+)_/i))&&Et[1]?Et[1]:null,Dt=/Android/i.test(It),Rt=function(){var e=It.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),n=e[2]&&parseFloat(e[2]);return t&&n?parseFloat(e[1]+"."+e[2]):t||null}(),Mt=Dt&&Rt<5&&Ot<537,Nt=/Firefox/i.test(It),Ut=/Edg/i.test(It),Ft=!Ut&&(/Chrome/i.test(It)||/CriOS/i.test(It)),Bt=function(){var e=It.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),jt=(Ct=/MSIE\s(\d+)\.\d/.exec(It),!(xt=Ct&&parseFloat(Ct[1]))&&/Trident\/7.0/i.test(It)&&/rv:11.0/.test(It)&&(xt=11),xt),Ht=/Safari/i.test(It)&&!Ft&&!Dt&&!Ut,Vt=/Windows/i.test(It),qt=Boolean(Yt()&&("ontouchstart"in i()||i().navigator.maxTouchPoints||i().DocumentTouch&&i().document instanceof i().DocumentTouch)),Wt=/iPad/i.test(It)||Ht&&qt&&!/iPhone/i.test(It),zt=/iPhone/i.test(It)&&!Wt,Gt=zt||Wt||Pt,Xt=(Ht||Gt)&&!Ft,$t=Object.freeze({__proto__:null,IS_IPOD:Pt,IOS_VERSION:Lt,IS_ANDROID:Dt,ANDROID_VERSION:Rt,IS_NATIVE_ANDROID:Mt,IS_FIREFOX:Nt,IS_EDGE:Ut,IS_CHROME:Ft,CHROME_VERSION:Bt,IE_VERSION:jt,IS_SAFARI:Ht,IS_WINDOWS:Vt,TOUCH_ENABLED:qt,IS_IPAD:Wt,IS_IPHONE:zt,IS_IOS:Gt,IS_ANY_SAFARI:Xt});function Kt(e){return"string"==typeof e&&Boolean(e.trim())}function Zt(e){if(e.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function Yt(){return s()===i().document}function Qt(e){return St(e)&&1===e.nodeType}function Jt(){try{return i().parent!==i().self}catch(e){return!0}}function en(e){return function(t,n){if(!Kt(t))return s()[e](null);Kt(n)&&(n=s().querySelector(n));var r=Qt(n)?n:s();return r[e]&&r[e](t)}}function tn(e,t,n,r){void 0===e&&(e="div"),void 0===t&&(t={}),void 0===n&&(n={});var i=s().createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){var n=t[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(gt.warn("Setting attributes in the second argument of createEl()\nhas been deprecated. Use the third argument instead.\ncreateEl(type, properties, attributes). Attempting to set "+e+" to "+n+"."),i.setAttribute(e,n)):"textContent"===e?nn(i,n):i[e]===n&&"tabIndex"!==e||(i[e]=n)})),Object.getOwnPropertyNames(n).forEach((function(e){i.setAttribute(e,n[e])})),r&&Sn(i,r),i}function nn(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function rn(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function an(e,t){return Zt(t),e.classList?e.classList.contains(t):(n=t,new RegExp("(^|\\s)"+n+"($|\\s)")).test(e.className);var n}function sn(e,t){return e.classList?e.classList.add(t):an(e,t)||(e.className=(e.className+" "+t).trim()),e}function on(e,t){return e.classList?e.classList.remove(t):(Zt(t),e.className=e.className.split(/\s+/).filter((function(e){return e!==t})).join(" ")),e}function un(e,t,n){var r=an(e,t);if("function"==typeof n&&(n=n(e,t)),"boolean"!=typeof n&&(n=!r),n!==r)return n?sn(e,t):on(e,t),e}function ln(e,t){Object.getOwnPropertyNames(t).forEach((function(n){var r=t[n];null==r||!1===r?e.removeAttribute(n):e.setAttribute(n,!0===r?"":r)}))}function cn(e){var t={};if(e&&e.attributes&&e.attributes.length>0)for(var n=e.attributes,r=n.length-1;r>=0;r--){var i=n[r].name,a=n[r].value;"boolean"!=typeof e[i]&&-1===",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+i+",")||(a=null!==a),t[i]=a}return t}function dn(e,t){return e.getAttribute(t)}function hn(e,t,n){e.setAttribute(t,n)}function fn(e,t){e.removeAttribute(t)}function pn(){s().body.focus(),s().onselectstart=function(){return!1}}function mn(){s().onselectstart=function(){return!0}}function gn(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach((function(e){void 0!==t[e]&&(n[e]=t[e])})),n.height||(n.height=parseFloat(kt(e,"height"))),n.width||(n.width=parseFloat(kt(e,"width"))),n}}function vn(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};for(var t=e.offsetWidth,n=e.offsetHeight,r=0,i=0;e.offsetParent&&e!==s()[ct.fullscreenElement];)r+=e.offsetLeft,i+=e.offsetTop,e=e.offsetParent;return{left:r,top:i,width:t,height:n}}function yn(e,t){var n={x:0,y:0};if(Gt)for(var r=e;r&&"html"!==r.nodeName.toLowerCase();){var i=kt(r,"transform");if(/^matrix/.test(i)){var a=i.slice(7,-1).split(/,\s/).map(Number);n.x+=a[4],n.y+=a[5]}else if(/^matrix3d/.test(i)){var s=i.slice(9,-1).split(/,\s/).map(Number);n.x+=s[12],n.y+=s[13]}r=r.parentNode}var o={},u=vn(t.target),l=vn(e),c=l.width,d=l.height,h=t.offsetY-(l.top-u.top),f=t.offsetX-(l.left-u.left);return t.changedTouches&&(f=t.changedTouches[0].pageX-l.left,h=t.changedTouches[0].pageY+l.top,Gt&&(f-=n.x,h-=n.y)),o.y=1-Math.max(0,Math.min(1,h/d)),o.x=Math.max(0,Math.min(1,f/c)),o}function _n(e){return St(e)&&3===e.nodeType}function bn(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function Tn(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((function(e){return"function"==typeof e&&(e=e()),Qt(e)||_n(e)?e:"string"==typeof e&&/\S/.test(e)?s().createTextNode(e):void 0})).filter((function(e){return e}))}function Sn(e,t){return Tn(t).forEach((function(t){return e.appendChild(t)})),e}function wn(e,t){return Sn(bn(e),t)}function kn(e){return void 0===e.button&&void 0===e.buttons||0===e.button&&void 0===e.buttons||"mouseup"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons}var En,Cn=en("querySelector"),xn=en("querySelectorAll"),In=Object.freeze({__proto__:null,isReal:Yt,isEl:Qt,isInFrame:Jt,createEl:tn,textContent:nn,prependTo:rn,hasClass:an,addClass:sn,removeClass:on,toggleClass:un,setAttributes:ln,getAttributes:cn,getAttribute:dn,setAttribute:hn,removeAttribute:fn,blockTextSelection:pn,unblockTextSelection:mn,getBoundingClientRect:gn,findPosition:vn,getPointerPosition:yn,isTextNode:_n,emptyEl:bn,normalizeContent:Tn,appendContent:Sn,insertContent:wn,isSingleLeftClick:kn,$:Cn,$$:xn}),An=!1,On=function(){if(!1!==En.options.autoSetup){var e=Array.prototype.slice.call(s().getElementsByTagName("video")),t=Array.prototype.slice.call(s().getElementsByTagName("audio")),n=Array.prototype.slice.call(s().getElementsByTagName("video-js")),r=e.concat(t,n);if(r&&r.length>0)for(var i=0,a=r.length;i<a;i++){var o=r[i];if(!o||!o.getAttribute){Pn(1);break}void 0===o.player&&null!==o.getAttribute("data-setup")&&En(o)}else An||Pn(1)}};function Pn(e,t){Yt()&&(t&&(En=t),i().setTimeout(On,e))}function Ln(){An=!0,i().removeEventListener("load",Ln)}Yt()&&("complete"===s().readyState?Ln():i().addEventListener("load",Ln));var Dn,Rn=function(e){var t=s().createElement("style");return t.className=e,t},Mn=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t},Nn=3;function Un(){return Nn++}i().WeakMap||(Dn=function(){function e(){this.vdata="vdata"+Math.floor(i().performance&&i().performance.now()||Date.now()),this.data={}}var t=e.prototype;return t.set=function(e,t){var n=e[this.vdata]||Un();return e[this.vdata]||(e[this.vdata]=n),this.data[n]=t,this},t.get=function(e){var t=e[this.vdata];if(t)return this.data[t];gt("We have no data for this element",e)},t.has=function(e){return e[this.vdata]in this.data},t.delete=function(e){var t=e[this.vdata];t&&(delete this.data[t],delete e[this.vdata])},e}());var Fn,Bn=i().WeakMap?new WeakMap:new Dn;function jn(e,t){if(Bn.has(e)){var n=Bn.get(e);0===n.handlers[t].length&&(delete n.handlers[t],e.removeEventListener?e.removeEventListener(t,n.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&Bn.delete(e)}}function Hn(e,t,n,r){n.forEach((function(n){e(t,n,r)}))}function Vn(e){if(e.fixed_)return e;function t(){return!0}function n(){return!1}if(!e||!e.isPropagationStopped){var r=e||i().event;for(var a in e={},r)"layerX"!==a&&"layerY"!==a&&"keyLocation"!==a&&"webkitMovementX"!==a&&"webkitMovementY"!==a&&("returnValue"===a&&r.preventDefault||(e[a]=r[a]));if(e.target||(e.target=e.srcElement||s()),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){r.preventDefault&&r.preventDefault(),e.returnValue=!1,r.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),e.cancelBubble=!0,r.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=n,e.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=n,null!==e.clientX&&void 0!==e.clientX){var o=s().documentElement,u=s().body;e.pageX=e.clientX+(o&&o.scrollLeft||u&&u.scrollLeft||0)-(o&&o.clientLeft||u&&u.clientLeft||0),e.pageY=e.clientY+(o&&o.scrollTop||u&&u.scrollTop||0)-(o&&o.clientTop||u&&u.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}var qn=function(){if("boolean"!=typeof Fn){Fn=!1;try{var e=Object.defineProperty({},"passive",{get:function(){Fn=!0}});i().addEventListener("test",null,e),i().removeEventListener("test",null,e)}catch(e){}}return Fn},Wn=["touchstart","touchmove"];function zn(e,t,n){if(Array.isArray(t))return Hn(zn,e,t,n);Bn.has(e)||Bn.set(e,{});var r=Bn.get(e);if(r.handlers||(r.handlers={}),r.handlers[t]||(r.handlers[t]=[]),n.guid||(n.guid=Un()),r.handlers[t].push(n),r.dispatcher||(r.disabled=!1,r.dispatcher=function(t,n){if(!r.disabled){t=Vn(t);var i=r.handlers[t.type];if(i)for(var a=i.slice(0),s=0,o=a.length;s<o&&!t.isImmediatePropagationStopped();s++)try{a[s].call(e,t,n)}catch(e){gt.error(e)}}}),1===r.handlers[t].length)if(e.addEventListener){var i=!1;qn()&&Wn.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,r.dispatcher,i)}else e.attachEvent&&e.attachEvent("on"+t,r.dispatcher)}function Gn(e,t,n){if(Bn.has(e)){var r=Bn.get(e);if(r.handlers){if(Array.isArray(t))return Hn(Gn,e,t,n);var i=function(e,t){r.handlers[t]=[],jn(e,t)};if(void 0!==t){var a=r.handlers[t];if(a)if(n){if(n.guid)for(var s=0;s<a.length;s++)a[s].guid===n.guid&&a.splice(s--,1);jn(e,t)}else i(e,t)}else for(var o in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},o)&&i(e,o)}}}function Xn(e,t,n){var r=Bn.has(e)?Bn.get(e):{},i=e.parentNode||e.ownerDocument;if("string"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Vn(t),r.dispatcher&&r.dispatcher.call(e,t,n),i&&!t.isPropagationStopped()&&!0===t.bubbles)Xn.call(null,i,t,n);else if(!i&&!t.defaultPrevented&&t.target&&t.target[t.type]){Bn.has(t.target)||Bn.set(t.target,{});var a=Bn.get(t.target);t.target[t.type]&&(a.disabled=!0,"function"==typeof t.target[t.type]&&t.target[t.type](),a.disabled=!1)}return!t.defaultPrevented}function $n(e,t,n){if(Array.isArray(t))return Hn($n,e,t,n);var r=function r(){Gn(e,t,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||Un(),zn(e,t,r)}function Kn(e,t,n){var r=function r(){Gn(e,t,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||Un(),zn(e,t,r)}var Zn,Yn=Object.freeze({__proto__:null,fixEvent:Vn,on:zn,off:Gn,trigger:Xn,one:$n,any:Kn}),Qn=30,Jn=function(e,t,n){t.guid||(t.guid=Un());var r=t.bind(e);return r.guid=n?n+"_"+t.guid:t.guid,r},er=function(e,t){var n=i().performance.now();return function(){var r=i().performance.now();r-n>=t&&(e.apply(void 0,arguments),n=r)}},tr=function(){};tr.prototype.allowedEvents_={},tr.prototype.on=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},zn(this,e,t),this.addEventListener=n},tr.prototype.addEventListener=tr.prototype.on,tr.prototype.off=function(e,t){Gn(this,e,t)},tr.prototype.removeEventListener=tr.prototype.off,tr.prototype.one=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},$n(this,e,t),this.addEventListener=n},tr.prototype.any=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},Kn(this,e,t),this.addEventListener=n},tr.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=Vn(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),Xn(this,e)},tr.prototype.dispatchEvent=tr.prototype.trigger,tr.prototype.queueTrigger=function(e){var t=this;Zn||(Zn=new Map);var n=e.type||e,r=Zn.get(this);r||(r=new Map,Zn.set(this,r));var a=r.get(n);r.delete(n),i().clearTimeout(a);var s=i().setTimeout((function(){0===r.size&&(r=null,Zn.delete(t)),t.trigger(e)}),0);r.set(n,s)};var nr=function(e){return"function"==typeof e.name?e.name():"string"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e},rr=function(e){return e instanceof tr||!!e.eventBusEl_&&["on","one","off","trigger"].every((function(t){return"function"==typeof e[t]}))},ir=function(e){return"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},ar=function(e,t,n){if(!e||!e.nodeName&&!rr(e))throw new Error("Invalid target for "+nr(t)+"#"+n+"; must be a DOM node or evented object.")},sr=function(e,t,n){if(!ir(e))throw new Error("Invalid event type for "+nr(t)+"#"+n+"; must be a non-empty string or array.")},or=function(e,t,n){if("function"!=typeof e)throw new Error("Invalid listener for "+nr(t)+"#"+n+"; must be a function.")},ur=function(e,t,n){var r,i,a,s=t.length<3||t[0]===e||t[0]===e.eventBusEl_;return s?(r=e.eventBusEl_,t.length>=3&&t.shift(),i=t[0],a=t[1]):(r=t[0],i=t[1],a=t[2]),ar(r,e,n),sr(i,e,n),or(a,e,n),{isTargetingSelf:s,target:r,type:i,listener:a=Jn(e,a)}},lr=function(e,t,n,r){ar(e,e,t),e.nodeName?Yn[t](e,n,r):e[t](n,r)},cr={on:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=ur(this,n,"on"),a=i.isTargetingSelf,s=i.target,o=i.type,u=i.listener;if(lr(s,"on",o,u),!a){var l=function(){return e.off(s,o,u)};l.guid=u.guid;var c=function(){return e.off("dispose",l)};c.guid=u.guid,lr(this,"on","dispose",l),lr(s,"on","dispose",c)}},one:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=ur(this,n,"one"),a=i.isTargetingSelf,s=i.target,o=i.type,u=i.listener;if(a)lr(s,"one",o,u);else{var l=function t(){e.off(s,o,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];u.apply(null,r)};l.guid=u.guid,lr(s,"one",o,l)}},any:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=ur(this,n,"any"),a=i.isTargetingSelf,s=i.target,o=i.type,u=i.listener;if(a)lr(s,"any",o,u);else{var l=function t(){e.off(s,o,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];u.apply(null,r)};l.guid=u.guid,lr(s,"any",o,l)}},off:function(e,t,n){if(!e||ir(e))Gn(this.eventBusEl_,e,t);else{var r=e,i=t;ar(r,this,"off"),sr(i,this,"off"),or(n,this,"off"),n=Jn(this,n),this.off("dispose",n),r.nodeName?(Gn(r,i,n),Gn(r,"dispose",n)):rr(r)&&(r.off(i,n),r.off("dispose",n))}},trigger:function(e,t){ar(this.eventBusEl_,this,"trigger");var n=e&&"string"!=typeof e?e.type:e;if(!ir(n)){var r="Invalid event type for "+nr(this)+"#trigger; must be a non-empty string or object with a type key that has a non-empty value.";if(!e)throw new Error(r);(this.log||gt).error(r)}return Xn(this.eventBusEl_,e,t)}};function dr(e,t){void 0===t&&(t={});var n=t.eventBusKey;if(n){if(!e[n].nodeName)throw new Error('The eventBusKey "'+n+'" does not refer to an element.');e.eventBusEl_=e[n]}else e.eventBusEl_=tn("span",{className:"vjs-event-bus"});return Tt(e,cr),e.eventedCallbacks&&e.eventedCallbacks.forEach((function(e){e()})),e.on("dispose",(function(){e.off(),i().setTimeout((function(){e.eventBusEl_=null}),0)})),e}var hr={state:{},setState:function(e){var t,n=this;return"function"==typeof e&&(e=e()),bt(e,(function(e,r){n.state[r]!==e&&((t=t||{})[r]={from:n.state[r],to:e}),n.state[r]=e})),t&&rr(this)&&this.trigger({changes:t,type:"statechanged"}),t}};function fr(e,t){return Tt(e,hr),e.state=Tt({},e.state,t),"function"==typeof e.handleStateChanged&&rr(e)&&e.on("statechanged",e.handleStateChanged),e}var pr=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toLowerCase()}))},mr=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))};function gr(){for(var e={},t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){t&&bt(t,(function(t,n){wt(t)?(wt(e[n])||(e[n]={}),e[n]=gr(e[n],t)):e[n]=t}))})),e}var vr=function(){function e(){this.map_={}}var t=e.prototype;return t.has=function(e){return e in this.map_},t.delete=function(e){var t=this.has(e);return delete this.map_[e],t},t.set=function(e,t){return this.map_[e]=t,this},t.forEach=function(e,t){for(var n in this.map_)e.call(t,this.map_[n],n,this)},e}(),yr=i().Map?i().Map:vr,_r=function(){function e(){this.set_={}}var t=e.prototype;return t.has=function(e){return e in this.set_},t.delete=function(e){var t=this.has(e);return delete this.set_[e],t},t.add=function(e){return this.set_[e]=1,this},t.forEach=function(e,t){for(var n in this.set_)e.call(t,n,n,this)},e}(),br=i().Set?i().Set:_r,Tr=function(){function e(e,t,n){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=gr({},this.options_),t=this.options_=gr(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){var r=e&&e.id&&e.id()||"no_player";this.id_=r+"_component_"+Un()}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),!1!==t.evented&&(dr(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),fr(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new br,this.setIntervalIds_=new br,this.rafIds_=new br,this.namedRafs_=new yr,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(n),!1!==t.reportTouchActivity&&this.enableTouchActivity()}var t=e.prototype;return t.dispose=function(){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(var e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),Bn.has(this.el_)&&Bn.delete(this.el_),this.el_=null),this.player_=null}},t.isDisposed=function(){return Boolean(this.isDisposed_)},t.player=function(){return this.player_},t.options=function(e){return e?(this.options_=gr(this.options_,e),this.options_):this.options_},t.el=function(){return this.el_},t.createEl=function(e,t,n){return tn(e,t,n)},t.localize=function(e,t,n){void 0===n&&(n=e);var r=this.player_.language&&this.player_.language(),i=this.player_.languages&&this.player_.languages(),a=i&&i[r],s=r&&r.split("-")[0],o=i&&i[s],u=n;return a&&a[e]?u=a[e]:o&&o[e]&&(u=o[e]),t&&(u=u.replace(/\{(\d+)\}/g,(function(e,n){var r=t[n-1],i=r;return void 0===r&&(i=e),i}))),u},t.handleLanguagechange=function(){},t.contentEl=function(){return this.contentEl_||this.el_},t.id=function(){return this.id_},t.name=function(){return this.name_},t.children=function(){return this.children_},t.getChildById=function(e){return this.childIndex_[e]},t.getChild=function(e){if(e)return this.childNameIndex_[e]},t.getDescendant=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.reduce((function(e,t){return e.concat(t)}),[]);for(var r=this,i=0;i<t.length;i++)if(!(r=r.getChild(t[i]))||!r.getChild)return;return r},t.addChild=function(t,n,r){var i,a;if(void 0===n&&(n={}),void 0===r&&(r=this.children_.length),"string"==typeof t){a=mr(t);var s=n.componentClass||a;n.name=a;var o=e.getComponent(s);if(!o)throw new Error("Component "+s+" does not exist");if("function"!=typeof o)return null;i=new o(this.player_||this,n)}else i=t;if(i.parentComponent_&&i.parentComponent_.removeChild(i),this.children_.splice(r,0,i),i.parentComponent_=this,"function"==typeof i.id&&(this.childIndex_[i.id()]=i),(a=a||i.name&&mr(i.name()))&&(this.childNameIndex_[a]=i,this.childNameIndex_[pr(a)]=i),"function"==typeof i.el&&i.el()){var u=null;this.children_[r+1]&&(this.children_[r+1].el_?u=this.children_[r+1].el_:Qt(this.children_[r+1])&&(u=this.children_[r+1])),this.contentEl().insertBefore(i.el(),u)}return i},t.removeChild=function(e){if("string"==typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===e){t=!0,this.children_.splice(n,1);break}if(t){e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[mr(e.name())]=null,this.childNameIndex_[pr(e.name())]=null;var r=e.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},t.initChildren=function(){var t=this,n=this.options_.children;if(n){var r,i=this.options_,a=e.getComponent("Tech");(r=Array.isArray(n)?n:Object.keys(n)).concat(Object.keys(this.options_).filter((function(e){return!r.some((function(t){return"string"==typeof t?e===t:e===t.name}))}))).map((function(e){var r,i;return"string"==typeof e?i=n[r=e]||t.options_[r]||{}:(r=e.name,i=e),{name:r,opts:i}})).filter((function(t){var n=e.getComponent(t.opts.componentClass||mr(t.name));return n&&!a.isTech(n)})).forEach((function(e){var n=e.name,r=e.opts;if(void 0!==i[n]&&(r=i[n]),!1!==r){!0===r&&(r={}),r.playerOptions=t.options_.playerOptions;var a=t.addChild(n,r);a&&(t[n]=a)}}))}},t.buildCSSClass=function(){return""},t.ready=function(e,t){if(void 0===t&&(t=!1),e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))},t.triggerReady=function(){this.isReady_=!0,this.setTimeout((function(){var e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger("ready")}),1)},t.$=function(e,t){return Cn(e,t||this.contentEl())},t.$$=function(e,t){return xn(e,t||this.contentEl())},t.hasClass=function(e){return an(this.el_,e)},t.addClass=function(e){sn(this.el_,e)},t.removeClass=function(e){on(this.el_,e)},t.toggleClass=function(e,t){un(this.el_,e,t)},t.show=function(){this.removeClass("vjs-hidden")},t.hide=function(){this.addClass("vjs-hidden")},t.lockShowing=function(){this.addClass("vjs-lock-showing")},t.unlockShowing=function(){this.removeClass("vjs-lock-showing")},t.getAttribute=function(e){return dn(this.el_,e)},t.setAttribute=function(e,t){hn(this.el_,e,t)},t.removeAttribute=function(e){fn(this.el_,e)},t.width=function(e,t){return this.dimension("width",e,t)},t.height=function(e,t){return this.dimension("height",e,t)},t.dimensions=function(e,t){this.width(e,!0),this.height(t)},t.dimension=function(e,t,n){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;var r=this.el_.style[e],i=r.indexOf("px");return-1!==i?parseInt(r.slice(0,i),10):parseInt(this.el_["offset"+mr(e)],10)},t.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if(t=kt(this.el_,e),0===(t=parseFloat(t))||isNaN(t)){var n="offset"+mr(e);t=this.el_[n]}return t},t.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},t.currentWidth=function(){return this.currentDimension("width")},t.currentHeight=function(){return this.currentDimension("height")},t.focus=function(){this.el_.focus()},t.blur=function(){this.el_.blur()},t.handleKeyDown=function(e){this.player_&&(e.stopPropagation(),this.player_.handleKeyDown(e))},t.handleKeyPress=function(e){this.handleKeyDown(e)},t.emitTapEvents=function(){var e,t=0,n=null;this.on("touchstart",(function(r){1===r.touches.length&&(n={pageX:r.touches[0].pageX,pageY:r.touches[0].pageY},t=i().performance.now(),e=!0)})),this.on("touchmove",(function(t){if(t.touches.length>1)e=!1;else if(n){var r=t.touches[0].pageX-n.pageX,i=t.touches[0].pageY-n.pageY;Math.sqrt(r*r+i*i)>10&&(e=!1)}}));var r=function(){e=!1};this.on("touchleave",r),this.on("touchcancel",r),this.on("touchend",(function(r){n=null,!0===e&&i().performance.now()-t<200&&(r.preventDefault(),this.trigger("tap"))}))},t.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e,t=Jn(this.player(),this.player().reportUserActivity);this.on("touchstart",(function(){t(),this.clearInterval(e),e=this.setInterval(t,250)}));var n=function(n){t(),this.clearInterval(e)};this.on("touchmove",t),this.on("touchend",n),this.on("touchcancel",n)}},t.setTimeout=function(e,t){var n,r=this;return e=Jn(this,e),this.clearTimersOnDispose_(),n=i().setTimeout((function(){r.setTimeoutIds_.has(n)&&r.setTimeoutIds_.delete(n),e()}),t),this.setTimeoutIds_.add(n),n},t.clearTimeout=function(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),i().clearTimeout(e)),e},t.setInterval=function(e,t){e=Jn(this,e),this.clearTimersOnDispose_();var n=i().setInterval(e,t);return this.setIntervalIds_.add(n),n},t.clearInterval=function(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),i().clearInterval(e)),e},t.requestAnimationFrame=function(e){var t,n=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),e=Jn(this,e),t=i().requestAnimationFrame((function(){n.rafIds_.has(t)&&n.rafIds_.delete(t),e()})),this.rafIds_.add(t),t):this.setTimeout(e,1e3/60)},t.requestNamedAnimationFrame=function(e,t){var n=this;if(!this.namedRafs_.has(e)){this.clearTimersOnDispose_(),t=Jn(this,t);var r=this.requestAnimationFrame((function(){t(),n.namedRafs_.has(e)&&n.namedRafs_.delete(e)}));return this.namedRafs_.set(e,r),e}},t.cancelNamedAnimationFrame=function(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))},t.cancelAnimationFrame=function(e){return this.supportsRaf_?(this.rafIds_.has(e)&&(this.rafIds_.delete(e),i().cancelAnimationFrame(e)),e):this.clearTimeout(e)},t.clearTimersOnDispose_=function(){var e=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",(function(){[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach((function(t){var n=t[0],r=t[1];e[n].forEach((function(t,n){return e[r](n)}))})),e.clearingTimersOnDispose_=!1})))},e.registerComponent=function(t,n){if("string"!=typeof t||!t)throw new Error('Illegal component name, "'+t+'"; must be a non-empty string.');var r=e.getComponent("Tech"),i=r&&r.isTech(n),a=e===n||e.prototype.isPrototypeOf(n.prototype);if(i||!a)throw new Error('Illegal component, "'+t+'"; '+(i?"techs must be registered using Tech.registerTech()":"must be a Component subclass")+".");t=mr(t),e.components_||(e.components_={});var s=e.getComponent("Player");if("Player"===t&&s&&s.players){var o=s.players,u=Object.keys(o);if(o&&u.length>0&&u.map((function(e){return o[e]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return e.components_[t]=n,e.components_[pr(t)]=n,n},e.getComponent=function(t){if(t&&e.components_)return e.components_[t]},e}();function Sr(e,t,n,r){return function(e,t,n){if("number"!=typeof t||t<0||t>n)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+n+").")}(e,r,n.length-1),n[r][t]}function wr(e){return void 0===e||0===e.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:Sr.bind(null,"start",0,e),end:Sr.bind(null,"end",1,e)}}function kr(e,t){return Array.isArray(e)?wr(e):void 0===e||void 0===t?wr():wr([[e,t]])}function Er(e,t){var n,r,i=0;if(!t)return 0;e&&e.length||(e=kr(0,0));for(var a=0;a<e.length;a++)n=e.start(a),(r=e.end(a))>t&&(r=t),i+=r-n;return i/t}function Cr(e){if(e instanceof Cr)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:St(e)&&("number"==typeof e.code&&(this.code=e.code),Tt(this,e)),this.message||(this.message=Cr.defaultMessages[this.code]||"")}Tr.prototype.supportsRaf_="function"==typeof i().requestAnimationFrame&&"function"==typeof i().cancelAnimationFrame,Tr.registerComponent("Component",Tr),Cr.prototype.code=0,Cr.prototype.message="",Cr.prototype.status=null,Cr.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Cr.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var xr=0;xr<Cr.errorTypes.length;xr++)Cr[Cr.errorTypes[xr]]=xr,Cr.prototype[Cr.errorTypes[xr]]=xr;function Ir(e){return null!=e&&"function"==typeof e.then}function Ar(e){Ir(e)&&e.then(null,(function(e){}))}var Or=function(e){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(t,n,r){return e[n]&&(t[n]=e[n]),t}),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})},Pr="vjs-modal-dialog",Lr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleKeyDown_=function(e){return r.handleKeyDown(e)},r.close_=function(e){return r.close(e)},r.opened_=r.hasBeenOpened_=r.hasBeenFilled_=!1,r.closeable(!r.options_.uncloseable),r.content(r.options_.content),r.contentEl_=tn("div",{className:Pr+"-content"},{role:"document"}),r.descEl_=tn("p",{className:Pr+"-description vjs-control-text",id:r.el().getAttribute("aria-describedby")}),nn(r.descEl_,r.description()),r.el_.appendChild(r.descEl_),r.el_.appendChild(r.contentEl_),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},n.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,e.prototype.dispose.call(this)},n.buildCSSClass=function(){return Pr+" vjs-hidden "+e.prototype.buildCSSClass.call(this)},n.label=function(){return this.localize(this.options_.label||"Modal Window")},n.description=function(){var e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e},n.open=function(){if(!this.opened_){var e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},n.opened=function(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_},n.close=function(){if(this.opened_){var e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},n.closeable=function(e){if("boolean"==typeof e){var t=this.closeable_=!!e,n=this.getChild("closeButton");if(t&&!n){var r=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=r,this.on(n,"close",this.close_)}!t&&n&&(this.off(n,"close",this.close_),this.removeChild(n),n.dispose())}return this.closeable_},n.fill=function(){this.fillWith(this.content())},n.fillWith=function(e){var t=this.contentEl(),n=t.parentNode,r=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(t),this.empty(),wn(t,e),this.trigger("modalfill"),r?n.insertBefore(t,r):n.appendChild(t);var i=this.getChild("closeButton");i&&n.appendChild(i.el_)},n.empty=function(){this.trigger("beforemodalempty"),bn(this.contentEl()),this.trigger("modalempty")},n.content=function(e){return void 0!==e&&(this.content_=e),this.content_},n.conditionalFocus_=function(){var e=s().activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())},n.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)},n.handleKeyDown=function(e){if(e.stopPropagation(),f().isEventKey(e,"Escape")&&this.closeable())return e.preventDefault(),void this.close();if(f().isEventKey(e,"Tab")){for(var t,n=this.focusableEls_(),r=this.el_.querySelector(":focus"),i=0;i<n.length;i++)if(r===n[i]){t=i;break}s().activeElement===this.el_&&(t=0),e.shiftKey&&0===t?(n[n.length-1].focus(),e.preventDefault()):e.shiftKey||t!==n.length-1||(n[0].focus(),e.preventDefault())}},n.focusableEls_=function(){var e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,(function(e){return(e instanceof i().HTMLAnchorElement||e instanceof i().HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof i().HTMLInputElement||e instanceof i().HTMLSelectElement||e instanceof i().HTMLTextAreaElement||e instanceof i().HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof i().HTMLIFrameElement||e instanceof i().HTMLObjectElement||e instanceof i().HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")}))},t}(Tr);Lr.prototype.options_={pauseOnOpen:!0,temporary:!0},Tr.registerComponent("ModalDialog",Lr);var Dr=function(e){function t(t){var n;void 0===t&&(t=[]),(n=e.call(this)||this).tracks_=[],Object.defineProperty((0,u.Z)(n),"length",{get:function(){return this.tracks_.length}});for(var r=0;r<t.length;r++)n.addTrack(t[r]);return n}(0,l.Z)(t,e);var n=t.prototype;return n.addTrack=function(e){var t=this,n=this.tracks_.length;""+n in this||Object.defineProperty(this,n,{get:function(){return this.tracks_[n]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=function(){t.trigger({track:e,type:"labelchange",target:t})},rr(e)&&e.addEventListener("labelchange",e.labelchange_)},n.removeTrack=function(e){for(var t,n=0,r=this.length;n<r;n++)if(this[n]===e){(t=this[n]).off&&t.off(),this.tracks_.splice(n,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})},n.getTrackById=function(e){for(var t=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===e){t=i;break}}return t},t}(tr);for(var Rr in Dr.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"},Dr.prototype.allowedEvents_)Dr.prototype["on"+Rr]=null;var Mr=function(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].enabled=!1)},Nr=function(e){function t(t){var n;void 0===t&&(t=[]);for(var r=t.length-1;r>=0;r--)if(t[r].enabled){Mr(t,t[r]);break}return(n=e.call(this,t)||this).changing_=!1,n}(0,l.Z)(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.enabled&&Mr(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.enabledChange_=function(){n.changing_||(n.changing_=!0,Mr(n,t),n.changing_=!1,n.trigger("change"))},t.addEventListener("enabledchange",t.enabledChange_))},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.enabledChange_&&(t.removeEventListener("enabledchange",t.enabledChange_),t.enabledChange_=null)},t}(Dr),Ur=function(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].selected=!1)},Fr=function(e){function t(t){var n;void 0===t&&(t=[]);for(var r=t.length-1;r>=0;r--)if(t[r].selected){Ur(t,t[r]);break}return(n=e.call(this,t)||this).changing_=!1,Object.defineProperty((0,u.Z)(n),"selectedIndex",{get:function(){for(var e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}}),n}(0,l.Z)(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.selected&&Ur(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.selectedChange_=function(){n.changing_||(n.changing_=!0,Ur(n,t),n.changing_=!1,n.trigger("change"))},t.addEventListener("selectedchange",t.selectedChange_))},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.selectedChange_&&(t.removeEventListener("selectedchange",t.selectedChange_),t.selectedChange_=null)},t}(Dr),Br=function(e){function t(){return e.apply(this,arguments)||this}(0,l.Z)(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;e.prototype.addTrack.call(this,t),this.queueChange_||(this.queueChange_=function(){return n.queueTrigger("change")}),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=function(){return n.trigger("selectedlanguagechange")}),t.addEventListener("modechange",this.queueChange_),-1===["metadata","chapters"].indexOf(t.kind)&&t.addEventListener("modechange",this.triggerSelectedlanguagechange_)},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&(this.queueChange_&&t.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&t.removeEventListener("modechange",this.triggerSelectedlanguagechange_))},t}(Dr),jr=function(){function e(e){void 0===e&&(e=[]),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var t=0,n=e.length;t<n;t++)this.addTrackElement_(e[t])}var t=e.prototype;return t.addTrackElement_=function(e){var t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)},t.getTrackElementByTrack_=function(e){for(var t,n=0,r=this.trackElements_.length;n<r;n++)if(e===this.trackElements_[n].track){t=this.trackElements_[n];break}return t},t.removeTrackElement_=function(e){for(var t=0,n=this.trackElements_.length;t<n;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&"function"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),"function"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}},e}(),Hr=function(){function e(t){e.prototype.setCues_.call(this,t),Object.defineProperty(this,"length",{get:function(){return this.length_}})}var t=e.prototype;return t.setCues_=function(e){var t=this.length||0,n=0,r=e.length;this.cues_=e,this.length_=e.length;var i=function(e){""+e in this||Object.defineProperty(this,""+e,{get:function(){return this.cues_[e]}})};if(t<r)for(n=t;n<r;n++)i.call(this,n)},t.getCueById=function(e){for(var t=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===e){t=i;break}}return t},e}(),Vr={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},qr={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Wr={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},zr={disabled:"disabled",hidden:"hidden",showing:"showing"},Gr=function(e){function t(t){var n;void 0===t&&(t={}),n=e.call(this)||this;var r={id:t.id||"vjs_track_"+Un(),kind:t.kind||"",language:t.language||""},i=t.label||"",a=function(e){Object.defineProperty((0,u.Z)(n),e,{get:function(){return r[e]},set:function(){}})};for(var s in r)a(s);return Object.defineProperty((0,u.Z)(n),"label",{get:function(){return i},set:function(e){e!==i&&(i=e,this.trigger("labelchange"))}}),n}return(0,l.Z)(t,e),t}(tr),Xr=function(e){var t=["protocol","hostname","port","pathname","search","hash","host"],n=s().createElement("a");n.href=e;var r,a=""===n.host&&"file:"!==n.protocol;a&&((r=s().createElement("div")).innerHTML='<a href="'+e+'"></a>',n=r.firstChild,r.setAttribute("style","display:none; position:absolute;"),s().body.appendChild(r));for(var o={},u=0;u<t.length;u++)o[t[u]]=n[t[u]];return"http:"===o.protocol&&(o.host=o.host.replace(/:80$/,"")),"https:"===o.protocol&&(o.host=o.host.replace(/:443$/,"")),o.protocol||(o.protocol=i().location.protocol),a&&s().body.removeChild(r),o},$r=function(e){if(!e.match(/^https?:\/\//)){var t=s().createElement("div");t.innerHTML='<a href="'+e+'">x</a>',e=t.firstChild.href}return e},Kr=function(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(e);if(t)return t.pop().toLowerCase()}return""},Zr=function(e,t){void 0===t&&(t=i().location);var n=Xr(e);return(":"===n.protocol?t.protocol:n.protocol)+n.host!==t.protocol+t.host},Yr=Object.freeze({__proto__:null,parseUrl:Xr,getAbsoluteURL:$r,getFileExtension:Kr,isCrossOrigin:Zr}),Qr=function(e,t){var n=new(i().WebVTT.Parser)(i(),i().vttjs,i().WebVTT.StringDecoder()),r=[];n.oncue=function(e){t.addCue(e)},n.onparsingerror=function(e){r.push(e)},n.onflush=function(){t.trigger({type:"loadeddata",target:t})},n.parse(e),r.length>0&&(i().console&&i().console.groupCollapsed&&i().console.groupCollapsed("Text Track parsing errors for "+t.src),r.forEach((function(e){return gt.error(e)})),i().console&&i().console.groupEnd&&i().console.groupEnd()),n.flush()},Jr=function(e,t){var n={uri:e},r=Zr(e);r&&(n.cors=r);var a="use-credentials"===t.tech_.crossOrigin();a&&(n.withCredentials=a),m()(n,Jn(this,(function(e,n,r){if(e)return gt.error(e,n);t.loaded_=!0,"function"!=typeof i().WebVTT?t.tech_&&t.tech_.any(["vttjsloaded","vttjserror"],(function(e){if("vttjserror"!==e.type)return Qr(r,t);gt.error("vttjs failed to load, stopping trying to process "+t.src)})):Qr(r,t)})))},ei=function(e){function t(t){var n;if(void 0===t&&(t={}),!t.tech)throw new Error("A tech was not provided.");var r=gr(t,{kind:Wr[t.kind]||"subtitles",language:t.language||t.srclang||""}),i=zr[r.mode]||"disabled",a=r.default;"metadata"!==r.kind&&"chapters"!==r.kind||(i="hidden"),(n=e.call(this,r)||this).tech_=r.tech,n.cues_=[],n.activeCues_=[],n.preload_=!1!==n.tech_.preloadTextTracks;var s=new Hr(n.cues_),o=new Hr(n.activeCues_),l=!1,c=Jn((0,u.Z)(n),(function(){this.tech_.isReady_&&!this.tech_.isDisposed()&&(this.activeCues=this.activeCues,l&&(this.trigger("cuechange"),l=!1))}));return n.tech_.one("dispose",(function(){n.tech_.off("timeupdate",c)})),"disabled"!==i&&n.tech_.on("timeupdate",c),Object.defineProperties((0,u.Z)(n),{default:{get:function(){return a},set:function(){}},mode:{get:function(){return i},set:function(e){zr[e]&&i!==e&&(i=e,this.preload_||"disabled"===i||0!==this.cues.length||Jr(this.src,this),this.tech_.off("timeupdate",c),"disabled"!==i&&this.tech_.on("timeupdate",c),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?s:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return o;for(var e=this.tech_.currentTime(),t=[],n=0,r=this.cues.length;n<r;n++){var i=this.cues[n];(i.startTime<=e&&i.endTime>=e||i.startTime===i.endTime&&i.startTime<=e&&i.startTime+.5>=e)&&t.push(i)}if(l=!1,t.length!==this.activeCues_.length)l=!0;else for(var a=0;a<t.length;a++)-1===this.activeCues_.indexOf(t[a])&&(l=!0);return this.activeCues_=t,o.setCues_(this.activeCues_),o},set:function(){}}}),r.src?(n.src=r.src,n.preload_||(n.loaded_=!0),(n.preload_||"subtitles"!==r.kind&&"captions"!==r.kind)&&Jr(n.src,(0,u.Z)(n))):n.loaded_=!0,n}(0,l.Z)(t,e);var n=t.prototype;return n.addCue=function(e){var t=e;if(i().vttjs&&!(e instanceof i().vttjs.VTTCue)){for(var n in t=new(i().vttjs.VTTCue)(e.startTime,e.endTime,e.text),e)n in t||(t[n]=e[n]);t.id=e.id,t.originalCue_=e}for(var r=this.tech_.textTracks(),a=0;a<r.length;a++)r[a]!==this&&r[a].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)},n.removeCue=function(e){for(var t=this.cues_.length;t--;){var n=this.cues_[t];if(n===e||n.originalCue_&&n.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}},t}(Gr);ei.prototype.allowedEvents_={cuechange:"cuechange"};var ti=function(e){function t(t){var n;void 0===t&&(t={});var r=gr(t,{kind:qr[t.kind]||""});n=e.call(this,r)||this;var i=!1;return Object.defineProperty((0,u.Z)(n),"enabled",{get:function(){return i},set:function(e){"boolean"==typeof e&&e!==i&&(i=e,this.trigger("enabledchange"))}}),r.enabled&&(n.enabled=r.enabled),n.loaded_=!0,n}return(0,l.Z)(t,e),t}(Gr),ni=function(e){function t(t){var n;void 0===t&&(t={});var r=gr(t,{kind:Vr[t.kind]||""});n=e.call(this,r)||this;var i=!1;return Object.defineProperty((0,u.Z)(n),"selected",{get:function(){return i},set:function(e){"boolean"==typeof e&&e!==i&&(i=e,this.trigger("selectedchange"))}}),r.selected&&(n.selected=r.selected),n}return(0,l.Z)(t,e),t}(Gr),ri=function(e){function t(t){var n,r;void 0===t&&(t={}),n=e.call(this)||this;var i=new ei(t);return n.kind=i.kind,n.src=i.src,n.srclang=i.language,n.label=i.label,n.default=i.default,Object.defineProperties((0,u.Z)(n),{readyState:{get:function(){return r}},track:{get:function(){return i}}}),r=0,i.addEventListener("loadeddata",(function(){r=2,n.trigger({type:"load",target:(0,u.Z)(n)})})),n}return(0,l.Z)(t,e),t}(tr);ri.prototype.allowedEvents_={load:"load"},ri.NONE=0,ri.LOADING=1,ri.LOADED=2,ri.ERROR=3;var ii={audio:{ListClass:Nr,TrackClass:ti,capitalName:"Audio"},video:{ListClass:Fr,TrackClass:ni,capitalName:"Video"},text:{ListClass:Br,TrackClass:ei,capitalName:"Text"}};Object.keys(ii).forEach((function(e){ii[e].getterName=e+"Tracks",ii[e].privateName=e+"Tracks_"}));var ai={remoteText:{ListClass:Br,TrackClass:ei,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:jr,TrackClass:ri,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},si=(0,o.Z)({},ii,ai);ai.names=Object.keys(ai),ii.names=Object.keys(ii),si.names=[].concat(ai.names).concat(ii.names);var oi=function(e){function t(t,n){var r;return void 0===t&&(t={}),void 0===n&&(n=function(){}),t.reportTouchActivity=!1,(r=e.call(this,null,t,n)||this).onDurationChange_=function(e){return r.onDurationChange(e)},r.trackProgress_=function(e){return r.trackProgress(e)},r.trackCurrentTime_=function(e){return r.trackCurrentTime(e)},r.stopTrackingCurrentTime_=function(e){return r.stopTrackingCurrentTime(e)},r.disposeSourceHandler_=function(e){return r.disposeSourceHandler(e)},r.hasStarted_=!1,r.on("playing",(function(){this.hasStarted_=!0})),r.on("loadstart",(function(){this.hasStarted_=!1})),si.names.forEach((function(e){var n=si[e];t&&t[n.getterName]&&(r[n.privateName]=t[n.getterName])})),r.featuresProgressEvents||r.manualProgressOn(),r.featuresTimeupdateEvents||r.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(e){!1===t["native"+e+"Tracks"]&&(r["featuresNative"+e+"Tracks"]=!1)})),!1===t.nativeCaptions||!1===t.nativeTextTracks?r.featuresNativeTextTracks=!1:!0!==t.nativeCaptions&&!0!==t.nativeTextTracks||(r.featuresNativeTextTracks=!0),r.featuresNativeTextTracks||r.emulateTextTracks(),r.preloadTextTracks=!1!==t.preloadTextTracks,r.autoRemoteTextTracks_=new si.text.ListClass,r.initTrackListeners(),t.nativeControlsForTouch||r.emitTapEvents(),r.constructor&&(r.name_=r.constructor.name||"Unknown Tech"),r}(0,l.Z)(t,e);var n=t.prototype;return n.triggerSourceset=function(e){var t=this;this.isReady_||this.one("ready",(function(){return t.setTimeout((function(){return t.triggerSourceset(e)}),1)})),this.trigger({src:e,type:"sourceset"})},n.manualProgressOn=function(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)},n.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)},n.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Jn(this,(function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)},n.onDurationChange=function(e){this.duration_=this.duration()},n.buffered=function(){return kr(0,0)},n.bufferedPercent=function(){return Er(this.buffered(),this.duration_)},n.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},n.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)},n.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)},n.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},n.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},n.dispose=function(){this.clearTracks(ii.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},n.clearTracks=function(e){var t=this;(e=[].concat(e)).forEach((function(e){for(var n=t[e+"Tracks"]()||[],r=n.length;r--;){var i=n[r];"text"===e&&t.removeRemoteTextTrack(i),n.removeTrack(i)}}))},n.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var n=e[t];this.removeRemoteTextTrack(n)}},n.reset=function(){},n.crossOrigin=function(){},n.setCrossOrigin=function(){},n.error=function(e){return void 0!==e&&(this.error_=new Cr(e),this.trigger("error")),this.error_},n.played=function(){return this.hasStarted_?kr(0,0):kr()},n.play=function(){},n.setScrubbing=function(){},n.scrubbing=function(){},n.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},n.initTrackListeners=function(){var e=this;ii.names.forEach((function(t){var n=ii[t],r=function(){e.trigger(t+"trackchange")},i=e[n.getterName]();i.addEventListener("removetrack",r),i.addEventListener("addtrack",r),e.on("dispose",(function(){i.removeEventListener("removetrack",r),i.removeEventListener("addtrack",r)}))}))},n.addWebVttScript_=function(){var e=this;if(!i().WebVTT)if(s().body.contains(this.el())){if(!this.options_["vtt.js"]&&wt(v())&&Object.keys(v()).length>0)return void this.trigger("vttjsloaded");var t=s().createElement("script");t.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",t.onload=function(){e.trigger("vttjsloaded")},t.onerror=function(){e.trigger("vttjserror")},this.on("dispose",(function(){t.onload=null,t.onerror=null})),i().WebVTT=!0,this.el().parentNode.appendChild(t)}else this.ready(this.addWebVttScript_)},n.emulateTextTracks=function(){var e=this,t=this.textTracks(),n=this.remoteTextTracks(),r=function(e){return t.addTrack(e.track)},i=function(e){return t.removeTrack(e.track)};n.on("addtrack",r),n.on("removetrack",i),this.addWebVttScript_();var a=function(){return e.trigger("texttrackchange")},s=function(){a();for(var e=0;e<t.length;e++){var n=t[e];n.removeEventListener("cuechange",a),"showing"===n.mode&&n.addEventListener("cuechange",a)}};s(),t.addEventListener("change",s),t.addEventListener("addtrack",s),t.addEventListener("removetrack",s),this.on("dispose",(function(){n.off("addtrack",r),n.off("removetrack",i),t.removeEventListener("change",s),t.removeEventListener("addtrack",s),t.removeEventListener("removetrack",s);for(var e=0;e<t.length;e++)t[e].removeEventListener("cuechange",a)}))},n.addTextTrack=function(e,t,n){if(!e)throw new Error("TextTrack kind is required but was not provided");return function(e,t,n,r,i){void 0===i&&(i={});var a=e.textTracks();i.kind=t,n&&(i.label=n),r&&(i.language=r),i.tech=e;var s=new si.text.TrackClass(i);return a.addTrack(s),s}(this,e,t,n)},n.createRemoteTextTrack=function(e){var t=gr(e,{tech:this});return new ai.remoteTextEl.TrackClass(t)},n.addRemoteTextTrack=function(e,t){var n=this;void 0===e&&(e={});var r=this.createRemoteTextTrack(e);return!0!==t&&!1!==t&&(gt.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),t=!0),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),!0!==t&&this.ready((function(){return n.autoRemoteTextTracks_.addTrack(r.track)})),r},n.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},n.getVideoPlaybackQuality=function(){return{}},n.requestPictureInPicture=function(){var e=this.options_.Promise||i().Promise;if(e)return e.reject()},n.disablePictureInPicture=function(){return!0},n.setDisablePictureInPicture=function(){},n.setPoster=function(){},n.playsinline=function(){},n.setPlaysinline=function(){},n.overrideNativeAudioTracks=function(){},n.overrideNativeVideoTracks=function(){},n.canPlayType=function(){return""},t.canPlayType=function(){return""},t.canPlaySource=function(e,n){return t.canPlayType(e.type)},t.isTech=function(e){return e.prototype instanceof t||e instanceof t||e===t},t.registerTech=function(e,n){if(t.techs_||(t.techs_={}),!t.isTech(n))throw new Error("Tech "+e+" must be a Tech");if(!t.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!t.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=mr(e),t.techs_[e]=n,t.techs_[pr(e)]=n,"Tech"!==e&&t.defaultTechOrder_.push(e),n},t.getTech=function(e){if(e)return t.techs_&&t.techs_[e]?t.techs_[e]:(e=mr(e),i()&&i().videojs&&i().videojs[e]?(gt.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),i().videojs[e]):void 0)},t}(Tr);si.names.forEach((function(e){var t=si[e];oi.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),oi.prototype.featuresVolumeControl=!0,oi.prototype.featuresMuteControl=!0,oi.prototype.featuresFullscreenResize=!1,oi.prototype.featuresPlaybackRate=!1,oi.prototype.featuresProgressEvents=!1,oi.prototype.featuresSourceset=!1,oi.prototype.featuresTimeupdateEvents=!1,oi.prototype.featuresNativeTextTracks=!1,oi.withSourceHandlers=function(e){e.registerSourceHandler=function(t,n){var r=e.sourceHandlers;r||(r=e.sourceHandlers=[]),void 0===n&&(n=r.length),r.splice(n,0,t)},e.canPlayType=function(t){for(var n,r=e.sourceHandlers||[],i=0;i<r.length;i++)if(n=r[i].canPlayType(t))return n;return""},e.selectSourceHandler=function(t,n){for(var r=e.sourceHandlers||[],i=0;i<r.length;i++)if(r[i].canHandleSource(t,n))return r[i];return null},e.canPlaySource=function(t,n){var r=e.selectSourceHandler(t,n);return r?r.canHandleSource(t,n):""},["seekable","seeking","duration"].forEach((function(e){var t=this[e];"function"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){var n=e.selectSourceHandler(t,this.options_);n||(e.nativeSourceHandler?n=e.nativeSourceHandler:gt.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),n!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=n.handleSource(t,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},Tr.registerComponent("Tech",oi),oi.registerTech("Tech",oi),oi.defaultTechOrder_=[];var ui={},li={},ci={};function di(e,t,n){e.setTimeout((function(){return vi(t,ui[t.type],n,e)}),1)}function hi(e,t,n,r){void 0===r&&(r=null);var i="call"+mr(n),a=e.reduce(gi(i),r),s=a===ci,o=s?null:t[n](a);return function(e,t,n,r){for(var i=e.length-1;i>=0;i--){var a=e[i];a[t]&&a[t](r,n)}}(e,n,o,s),o}var fi={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1},pi={setCurrentTime:1,setMuted:1,setVolume:1},mi={play:1,pause:1};function gi(e){return function(t,n){return t===ci?ci:n[e]?n[e](t):t}}function vi(e,t,n,r,i,a){void 0===e&&(e={}),void 0===t&&(t=[]),void 0===i&&(i=[]),void 0===a&&(a=!1);var s=t,o=s[0],u=s.slice(1);if("string"==typeof o)vi(e,ui[o],n,r,i,a);else if(o){var l=function(e,t){var n=li[e.id()],r=null;if(null==n)return r=t(e),li[e.id()]=[[t,r]],r;for(var i=0;i<n.length;i++){var a=n[i],s=a[0],o=a[1];s===t&&(r=o)}return null===r&&(r=t(e),n.push([t,r])),r}(r,o);if(!l.setSource)return i.push(l),vi(e,u,n,r,i,a);l.setSource(Tt({},e),(function(t,s){if(t)return vi(e,u,n,r,i,a);i.push(l),vi(s,e.type===s.type?u:ui[s.type],n,r,i,a)}))}else u.length?vi(e,u,n,r,i,a):a?n(e,i):vi(e,ui["*"],n,r,i,!0)}var yi={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},_i=function(e){void 0===e&&(e="");var t=Kr(e);return yi[t.toLowerCase()]||""},bi=function e(t){if(Array.isArray(t)){var n=[];t.forEach((function(t){t=e(t),Array.isArray(t)?n=n.concat(t):St(t)&&n.push(t)})),t=n}else t="string"==typeof t&&t.trim()?[Ti({src:t})]:St(t)&&"string"==typeof t.src&&t.src&&t.src.trim()?[Ti(t)]:[];return t};function Ti(e){if(!e.type){var t=_i(e.src);t&&(e.type=t)}return e}var Si=function(e){function t(t,n,r){var i,a=gr({createEl:!1},n);if(i=e.call(this,t,a,r)||this,n.playerOptions.sources&&0!==n.playerOptions.sources.length)t.src(n.playerOptions.sources);else for(var s=0,o=n.playerOptions.techOrder;s<o.length;s++){var u=mr(o[s]),l=oi.getTech(u);if(u||(l=Tr.getComponent(u)),l&&l.isSupported()){t.loadTech_(u);break}}return i}return(0,l.Z)(t,e),t}(Tr);Tr.registerComponent("MediaLoader",Si);var wi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleMouseOver_=function(e){return r.handleMouseOver(e)},r.handleMouseOut_=function(e){return r.handleMouseOut(e)},r.handleClick_=function(e){return r.handleClick(e)},r.handleKeyDown_=function(e){return r.handleKeyDown(e)},r.emitTapEvents(),r.enable(),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(t,n,r){void 0===t&&(t="div"),void 0===n&&(n={}),void 0===r&&(r={}),n=Tt({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},n),"button"===t&>.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead."),r=Tt({role:"button"},r),this.tabIndex_=n.tabIndex;var i=e.prototype.createEl.call(this,t,n,r);return this.createControlTextEl(i),i},n.dispose=function(){this.controlTextEl_=null,e.prototype.dispose.call(this)},n.createControlTextEl=function(e){return this.controlTextEl_=tn("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},n.controlText=function(e,t){if(void 0===t&&(t=this.el()),void 0===e)return this.controlText_||"Need Text";var n=this.localize(e);this.controlText_=e,nn(this.controlTextEl_,n),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute("title",n)},n.buildCSSClass=function(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)},n.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),void 0!==this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))},n.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),void 0!==this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)},n.handleLanguagechange=function(){this.controlText(this.controlText_)},n.handleClick=function(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)},n.handleKeyDown=function(t){f().isEventKey(t,"Space")||f().isEventKey(t,"Enter")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(Tr);Tr.registerComponent("ClickableComponent",wi);var ki=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update(),r.update_=function(e){return r.update(e)},t.on("posterchange",r.update_),r}(0,l.Z)(t,e);var n=t.prototype;return n.dispose=function(){this.player().off("posterchange",this.update_),e.prototype.dispose.call(this)},n.createEl=function(){return tn("div",{className:"vjs-poster",tabIndex:-1})},n.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},n.setSrc=function(e){var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t},n.handleClick=function(e){if(this.player_.controls()){var t=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;!this.player_.tech(!0)||(jt||Ut)&&t||this.player_.tech(!0).focus(),this.player_.paused()?Ar(this.player_.play()):this.player_.pause()}},t}(wi);Tr.registerComponent("PosterImage",ki);var Ei="#222",Ci={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function xi(e,t){var n;if(4===e.length)n=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");n=e.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+t+")"}function Ii(e,t,n){try{e.style[t]=n}catch(e){return}}var Ai=function(e){function t(t,n,r){var a;a=e.call(this,t,n,r)||this;var s=function(e){return a.updateDisplay(e)};return t.on("loadstart",(function(e){return a.toggleDisplay(e)})),t.on("texttrackchange",s),t.on("loadedmetadata",(function(e){return a.preselectTrack(e)})),t.ready(Jn((0,u.Z)(a),(function(){if(t.tech_&&t.tech_.featuresNativeTextTracks)this.hide();else{t.on("fullscreenchange",s),t.on("playerresize",s),i().addEventListener("orientationchange",s),t.on("dispose",(function(){return i().removeEventListener("orientationchange",s)}));for(var e=this.options_.playerOptions.tracks||[],n=0;n<e.length;n++)this.player_.addRemoteTextTrack(e[n],!0);this.preselectTrack()}}))),a}(0,l.Z)(t,e);var n=t.prototype;return n.preselectTrack=function(){for(var e,t,n,r={captions:1,subtitles:1},i=this.player_.textTracks(),a=this.player_.cache_.selectedLanguage,s=0;s<i.length;s++){var o=i[s];a&&a.enabled&&a.language&&a.language===o.language&&o.kind in r?o.kind===a.kind?n=o:n||(n=o):a&&!a.enabled?(n=null,e=null,t=null):o.default&&("descriptions"!==o.kind||e?o.kind in r&&!t&&(t=o):e=o)}n?n.mode="showing":t?t.mode="showing":e&&(e.mode="showing")},n.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},n.clearDisplay=function(){"function"==typeof i().WebVTT&&i().WebVTT.processCues(i(),[],this.el_)},n.updateDisplay=function(){var e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){for(var n=[],r=0;r<e.length;++r){var i=e[r];"showing"===i.mode&&n.push(i)}this.updateForTrack(n)}else{for(var a=null,s=null,o=e.length;o--;){var u=e[o];"showing"===u.mode&&("descriptions"===u.kind?a=u:s=u)}s?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(s)):a&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(a))}},n.updateDisplayState=function(e){for(var t=this.player_.textTrackSettings.getValues(),n=e.activeCues,r=n.length;r--;){var a=n[r];if(a){var s=a.displayState;if(t.color&&(s.firstChild.style.color=t.color),t.textOpacity&&Ii(s.firstChild,"color",xi(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(s.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Ii(s.firstChild,"backgroundColor",xi(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Ii(s,"backgroundColor",xi(t.windowColor,t.windowOpacity)):s.style.backgroundColor=t.windowColor),t.edgeStyle&&("dropshadow"===t.edgeStyle?s.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px "+Ei:"raised"===t.edgeStyle?s.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px "+Ei:"depressed"===t.edgeStyle?s.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px "+Ei:"uniform"===t.edgeStyle&&(s.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px "+Ei)),t.fontPercent&&1!==t.fontPercent){var o=i().parseFloat(s.style.fontSize);s.style.fontSize=o*t.fontPercent+"px",s.style.height="auto",s.style.top="auto"}t.fontFamily&&"default"!==t.fontFamily&&("small-caps"===t.fontFamily?s.firstChild.style.fontVariant="small-caps":s.firstChild.style.fontFamily=Ci[t.fontFamily])}}},n.updateForTrack=function(e){if(Array.isArray(e)||(e=[e]),"function"==typeof i().WebVTT&&!e.every((function(e){return!e.activeCues}))){for(var t=[],n=0;n<e.length;++n)for(var r=e[n],a=0;a<r.activeCues.length;++a)t.push(r.activeCues[a]);i().WebVTT.processCues(i(),t,this.el_);for(var s=0;s<e.length;++s){for(var o=e[s],u=0;u<o.activeCues.length;++u){var l=o.activeCues[u].displayState;sn(l,"vjs-text-track-cue"),sn(l,"vjs-text-track-cue-"+(o.language?o.language:s))}this.player_.textTrackSettings&&this.updateDisplayState(o)}}},t}(Tr);Tr.registerComponent("TextTrackDisplay",Ai);var Oi=function(e){function t(){return e.apply(this,arguments)||this}return(0,l.Z)(t,e),t.prototype.createEl=function(){var t=this.player_.isAudio(),n=this.localize(t?"Audio Player":"Video Player"),r=tn("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[n])}),i=e.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return i.appendChild(r),i},t}(Tr);Tr.registerComponent("LoadingSpinner",Oi);var Pi=function(e){function t(){return e.apply(this,arguments)||this}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={}),t=Tt({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},t),n=Tt({type:"button"},n);var r=Tr.prototype.createEl.call(this,"button",t,n);return this.createControlTextEl(r),r},n.addChild=function(e,t){void 0===t&&(t={});var n=this.constructor.name;return gt.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),Tr.prototype.addChild.call(this,e,t)},n.enable=function(){e.prototype.enable.call(this),this.el_.removeAttribute("disabled")},n.disable=function(){e.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},n.handleKeyDown=function(t){f().isEventKey(t,"Space")||f().isEventKey(t,"Enter")?t.stopPropagation():e.prototype.handleKeyDown.call(this,t)},t}(wi);Tr.registerComponent("Button",Pi);var Li=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).mouseused_=!1,r.on("mousedown",(function(e){return r.handleMouseDown(e)})),r}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-big-play-button"},n.handleClick=function(e){var t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY){var n=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;return Ar(t),void(!this.player_.tech(!0)||(jt||Ut)&&n||this.player_.tech(!0).focus())}var r=this.player_.getChild("controlBar"),i=r&&r.getChild("playToggle");if(i){var a=function(){return i.focus()};Ir(t)?t.then(a,(function(){})):this.setTimeout(a,1)}else this.player_.tech(!0).focus()},n.handleKeyDown=function(t){this.mouseused_=!1,e.prototype.handleKeyDown.call(this,t)},n.handleMouseDown=function(e){this.mouseused_=!0},t}(Pi);Li.prototype.controlText_="Play Video",Tr.registerComponent("BigPlayButton",Li);var Di=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).controlText(n&&n.controlText||r.localize("Close")),r}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},n.handleKeyDown=function(t){f().isEventKey(t,"Esc")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(Pi);Tr.registerComponent("CloseButton",Di);var Ri=function(e){function t(t,n){var r;return void 0===n&&(n={}),r=e.call(this,t,n)||this,n.replay=void 0===n.replay||n.replay,r.on(t,"play",(function(e){return r.handlePlay(e)})),r.on(t,"pause",(function(e){return r.handlePause(e)})),n.replay&&r.on(t,"ended",(function(e){return r.handleEnded(e)})),r}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){this.player_.paused()?Ar(this.player_.play()):this.player_.pause()},n.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},n.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},n.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},n.handleEnded=function(e){var t=this;this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",(function(e){return t.handleSeeked(e)}))},t}(Pi);Ri.prototype.controlText_="Play",Tr.registerComponent("PlayToggle",Ri);var Mi=function(e,t){e=e<0?0:e;var n=Math.floor(e%60),r=Math.floor(e/60%60),i=Math.floor(e/3600),a=Math.floor(t/60%60),s=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(i=r=n="-"),(i=i>0||s>0?i+":":"")+(r=((i||a>=10)&&r<10?"0"+r:r)+":")+(n<10?"0"+n:n)},Ni=Mi;function Ui(e,t){return void 0===t&&(t=e),Ni(e,t)}var Fi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,["timeupdate","ended"],(function(e){return r.updateContent(e)})),r.updateTextNode_(),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(){var t=this.buildCSSClass(),n=e.prototype.createEl.call(this,"div",{className:t+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text" role="presentation">'+this.localize(this.labelText_)+" </span>"});return this.contentEl_=tn("span",{className:t+"-display"},{"aria-live":"off",role:"presentation"}),n.appendChild(this.contentEl_),n},n.dispose=function(){this.contentEl_=null,this.textNode_=null,e.prototype.dispose.call(this)},n.updateTextNode_=function(e){var t=this;void 0===e&&(e=0),e=Ui(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",(function(){if(t.contentEl_){var e=t.textNode_;e&&t.contentEl_.firstChild!==e&&(e=null,gt.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),t.textNode_=s().createTextNode(t.formattedTime_),t.textNode_&&(e?t.contentEl_.replaceChild(t.textNode_,e):t.contentEl_.appendChild(t.textNode_))}})))},n.updateContent=function(e){},t}(Tr);Fi.prototype.labelText_="Time",Fi.prototype.controlText_="Time",Tr.registerComponent("TimeDisplay",Fi);var Bi=function(e){function t(){return e.apply(this,arguments)||this}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-current-time"},n.updateContent=function(e){var t;t=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)},t}(Fi);Bi.prototype.labelText_="Current Time",Bi.prototype.controlText_="Current Time",Tr.registerComponent("CurrentTimeDisplay",Bi);var ji=function(e){function t(t,n){var r,i=function(e){return r.updateContent(e)};return(r=e.call(this,t,n)||this).on(t,"durationchange",i),r.on(t,"loadstart",i),r.on(t,"loadedmetadata",i),r}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-duration"},n.updateContent=function(e){var t=this.player_.duration();this.updateTextNode_(t)},t}(Fi);ji.prototype.labelText_="Duration",ji.prototype.controlText_="Duration",Tr.registerComponent("DurationDisplay",ji);var Hi=function(e){function t(){return e.apply(this,arguments)||this}return(0,l.Z)(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"},{"aria-hidden":!0})},t}(Tr);Tr.registerComponent("TimeDivider",Hi);var Vi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"durationchange",(function(e){return r.updateContent(e)})),r}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-remaining-time"},n.createEl=function(){var t=e.prototype.createEl.call(this);return t.insertBefore(tn("span",{},{"aria-hidden":!0},"-"),this.contentEl_),t},n.updateContent=function(e){var t;"number"==typeof this.player_.duration()&&(t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t))},t}(Fi);Vi.prototype.labelText_="Remaining Time",Vi.prototype.controlText_="Remaining Time",Tr.registerComponent("RemainingTimeDisplay",Vi);var qi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).updateShowing(),r.on(r.player(),"durationchange",(function(e){return r.updateShowing(e)})),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=tn("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+" </span>"+this.localize("LIVE")},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},n.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},n.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},t}(Tr);Tr.registerComponent("LiveDisplay",qi);var Wi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).updateLiveEdgeStatus(),r.player_.liveTracker&&(r.updateLiveEdgeStatusHandler_=function(e){return r.updateLiveEdgeStatus(e)},r.on(r.player_.liveTracker,"liveedgechange",r.updateLiveEdgeStatusHandler_)),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=tn("span",{className:"vjs-seek-to-live-text",innerHTML:this.localize("LIVE")},{"aria-hidden":"true"}),t.appendChild(this.textEl_),t},n.updateLiveEdgeStatus=function(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))},n.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},n.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,e.prototype.dispose.call(this)},t}(Pi);Wi.prototype.controlText_="Seek to live, currently playing live",Tr.registerComponent("SeekToLive",Wi);var zi=function(e,t,n){return e=Number(e),Math.min(n,Math.max(t,isNaN(e)?t:e))},Gi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleMouseDown_=function(e){return r.handleMouseDown(e)},r.handleMouseUp_=function(e){return r.handleMouseUp(e)},r.handleKeyDown_=function(e){return r.handleKeyDown(e)},r.handleClick_=function(e){return r.handleClick(e)},r.handleMouseMove_=function(e){return r.handleMouseMove(e)},r.update_=function(e){return r.update(e)},r.bar=r.getChild(r.options_.barName),r.vertical(!!r.options_.vertical),r.enable(),r}(0,l.Z)(t,e);var n=t.prototype;return n.enabled=function(){return this.enabled_},n.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},n.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},n.createEl=function(t,n,r){return void 0===n&&(n={}),void 0===r&&(r={}),n.className=n.className+" vjs-slider",n=Tt({tabIndex:0},n),r=Tt({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},r),e.prototype.createEl.call(this,t,n,r)},n.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||Ft||e.preventDefault(),pn(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove_),this.on(t,"mouseup",this.handleMouseUp_),this.on(t,"touchmove",this.handleMouseMove_),this.on(t,"touchend",this.handleMouseUp_),this.handleMouseMove(e)},n.handleMouseMove=function(e){},n.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;mn(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.update()},n.update=function(){var e=this;if(this.el_&&this.bar){var t=this.getProgress();return t===this.progress_||(this.progress_=t,this.requestNamedAnimationFrame("Slider#update",(function(){var n=e.vertical()?"height":"width";e.bar.el().style[n]=(100*t).toFixed(2)+"%"}))),t}},n.getProgress=function(){return Number(zi(this.getPercent(),0,1).toFixed(4))},n.calculateDistance=function(e){var t=yn(this.el_,e);return this.vertical()?t.y:t.x},n.handleKeyDown=function(t){f().isEventKey(t,"Left")||f().isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepBack()):f().isEventKey(t,"Right")||f().isEventKey(t,"Up")?(t.preventDefault(),t.stopPropagation(),this.stepForward()):e.prototype.handleKeyDown.call(this,t)},n.handleClick=function(e){e.stopPropagation(),e.preventDefault()},n.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},t}(Tr);Tr.registerComponent("Slider",Gi);var Xi=function(e,t){return zi(e/t*100,0,100).toFixed(2)+"%"},$i=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).partEls_=[],r.on(t,"progress",(function(e){return r.update(e)})),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),n=tn("span",{className:"vjs-control-text"}),r=tn("span",{textContent:this.localize("Loaded")}),i=s().createTextNode(": ");return this.percentageEl_=tn("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),t.appendChild(n),n.appendChild(r),n.appendChild(i),n.appendChild(this.percentageEl_),t},n.dispose=function(){this.partEls_=null,this.percentageEl_=null,e.prototype.dispose.call(this)},n.update=function(e){var t=this;this.requestNamedAnimationFrame("LoadProgressBar#update",(function(){var e=t.player_.liveTracker,n=t.player_.buffered(),r=e&&e.isLive()?e.seekableEnd():t.player_.duration(),i=t.player_.bufferedEnd(),a=t.partEls_,s=Xi(i,r);t.percent_!==s&&(t.el_.style.width=s,nn(t.percentageEl_,s),t.percent_=s);for(var o=0;o<n.length;o++){var u=n.start(o),l=n.end(o),c=a[o];c||(c=t.el_.appendChild(tn()),a[o]=c),c.dataset.start===u&&c.dataset.end===l||(c.dataset.start=u,c.dataset.end=l,c.style.left=Xi(u,i),c.style.width=Xi(l-u,i))}for(var d=a.length;d>n.length;d--)t.el_.removeChild(a[d-1]);a.length=n.length}))},t}(Tr);Tr.registerComponent("LoadProgressBar",$i);var Ki=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=er(Jn((0,u.Z)(r),r.update),Qn),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},n.update=function(e,t,n){var r=vn(this.el_),i=gn(this.player_.el()),a=e.width*t;if(i&&r){var s=e.left-i.left+a,o=e.width-a+(i.right-e.right),u=r.width/2;s<u?u+=u-s:o<u&&(u=o),u<0?u=0:u>r.width&&(u=r.width),u=Math.round(u),this.el_.style.right="-"+u+"px",this.write(n)}},n.write=function(e){nn(this.el_,e)},n.updateTime=function(e,t,n,r){var i=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",(function(){var a,s=i.player_.duration();if(i.player_.liveTracker&&i.player_.liveTracker.isLive()){var o=i.player_.liveTracker.liveWindow(),u=o-t*o;a=(u<1?"":"-")+Ui(u,o)}else a=Ui(n,s);i.update(e,t,a),r&&r()}))},t}(Tr);Tr.registerComponent("TimeTooltip",Ki);var Zi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=er(Jn((0,u.Z)(r),r.update),Qn),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},n.update=function(e,t){var n=this.getChild("timeTooltip");if(n){var r=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();n.updateTime(e,t,r)}},t}(Tr);Zi.prototype.options_={children:[]},Gt||Dt||Zi.prototype.options_.children.push("timeTooltip"),Tr.registerComponent("PlayProgressBar",Zi);var Yi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=er(Jn((0,u.Z)(r),r.update),Qn),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},n.update=function(e,t){var n=this,r=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,r,(function(){n.el_.style.left=e.width*t+"px"}))},t}(Tr);Yi.prototype.options_={children:["timeTooltip"]},Tr.registerComponent("MouseTimeDisplay",Yi);var Qi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).setEventHandlers_(),r}(0,l.Z)(t,e);var n=t.prototype;return n.setEventHandlers_=function(){var e=this;this.update_=Jn(this,this.update),this.update=er(this.update_,Qn),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=function(t){return e.enableInterval_(t)},this.disableIntervalHandler_=function(t){return e.disableInterval_(t)},this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in s()&&"visibilityState"in s()&&this.on(s(),"visibilitychange",this.toggleVisibility_)},n.toggleVisibility_=function(e){"hidden"===s().visibilityState?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())},n.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,Qn))},n.disableInterval_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},n.update=function(t){var n=this;if("hidden"!==s().visibilityState){var r=e.prototype.update.call(this);return this.requestNamedAnimationFrame("SeekBar#update",(function(){var e=n.player_.ended()?n.player_.duration():n.getCurrentTime_(),t=n.player_.liveTracker,i=n.player_.duration();t&&t.isLive()&&(i=n.player_.liveTracker.liveCurrentTime()),n.percent_!==r&&(n.el_.setAttribute("aria-valuenow",(100*r).toFixed(2)),n.percent_=r),n.currentTime_===e&&n.duration_===i||(n.el_.setAttribute("aria-valuetext",n.localize("progress bar timing: currentTime={1} duration={2}",[Ui(e,i),Ui(i,i)],"{1} of {2}")),n.currentTime_=e,n.duration_=i),n.bar&&n.bar.update(gn(n.el()),n.getProgress())})),r}},n.userSeek_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)},n.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},n.getPercent=function(){var e,t=this.getCurrentTime_(),n=this.player_.liveTracker;return n&&n.isLive()?(e=(t-n.seekableStart())/n.liveWindow(),n.atLiveEdge()&&(e=1)):e=t/this.player_.duration(),e},n.handleMouseDown=function(t){kn(t)&&(t.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),e.prototype.handleMouseDown.call(this,t))},n.handleMouseMove=function(e){if(kn(e)){var t,n=this.calculateDistance(e),r=this.player_.liveTracker;if(r&&r.isLive()){if(n>=.99)return void r.seekToLiveEdge();var i=r.seekableStart(),a=r.liveCurrentTime();if((t=i+n*r.liveWindow())>=a&&(t=a),t<=i&&(t=i+.1),t===1/0)return}else(t=n*this.player_.duration())===this.player_.duration()&&(t-=.1);this.userSeek_(t)}},n.enable=function(){e.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},n.disable=function(){e.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},n.handleMouseUp=function(t){e.prototype.handleMouseUp.call(this,t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Ar(this.player_.play()):this.update_()},n.stepForward=function(){this.userSeek_(this.player_.currentTime()+5)},n.stepBack=function(){this.userSeek_(this.player_.currentTime()-5)},n.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},n.handleKeyDown=function(t){var n=this.player_.liveTracker;if(f().isEventKey(t,"Space")||f().isEventKey(t,"Enter"))t.preventDefault(),t.stopPropagation(),this.handleAction(t);else if(f().isEventKey(t,"Home"))t.preventDefault(),t.stopPropagation(),this.userSeek_(0);else if(f().isEventKey(t,"End"))t.preventDefault(),t.stopPropagation(),n&&n.isLive()?this.userSeek_(n.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(f()(t))){t.preventDefault(),t.stopPropagation();var r=10*(f().codes[f()(t)]-f().codes[0])/100;n&&n.isLive()?this.userSeek_(n.seekableStart()+n.liveWindow()*r):this.userSeek_(this.player_.duration()*r)}else f().isEventKey(t,"PgDn")?(t.preventDefault(),t.stopPropagation(),this.userSeek_(this.player_.currentTime()-60)):f().isEventKey(t,"PgUp")?(t.preventDefault(),t.stopPropagation(),this.userSeek_(this.player_.currentTime()+60)):e.prototype.handleKeyDown.call(this,t)},n.dispose=function(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in s()&&"visibilityState"in s()&&this.off(s(),"visibilitychange",this.toggleVisibility_),e.prototype.dispose.call(this)},t}(Gi);Qi.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},Gt||Dt||Qi.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Tr.registerComponent("SeekBar",Qi);var Ji=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleMouseMove=er(Jn((0,u.Z)(r),r.handleMouseMove),Qn),r.throttledHandleMouseSeek=er(Jn((0,u.Z)(r),r.handleMouseSeek),Qn),r.handleMouseUpHandler_=function(e){return r.handleMouseUp(e)},r.handleMouseDownHandler_=function(e){return r.handleMouseDown(e)},r.enable(),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},n.handleMouseMove=function(e){var t=this.getChild("seekBar");if(t){var n=t.getChild("playProgressBar"),r=t.getChild("mouseTimeDisplay");if(n||r){var i=t.el(),a=vn(i),s=yn(i,e).x;s=zi(s,0,1),r&&r.update(a,s),n&&n.update(a,t.getProgress())}}},n.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},n.enabled=function(){return this.enabled_},n.disable=function(){if(this.children().forEach((function(e){return e.disable&&e.disable()})),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,"mousemove",this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){var e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&Ar(this.player_.play())}},n.enable=function(){this.children().forEach((function(e){return e.enable&&e.enable()})),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},n.removeListenersAddedOnMousedownAndTouchstart=function(){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)},n.handleMouseDown=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)},n.handleMouseUp=function(e){var t=this.getChild("seekBar");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()},t}(Tr);Ji.prototype.options_={children:["seekBar"]},Tr.registerComponent("ProgressControl",Ji);var ea=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,["enterpictureinpicture","leavepictureinpicture"],(function(e){return r.handlePictureInPictureChange(e)})),r.on(t,["disablepictureinpicturechanged","loadedmetadata"],(function(e){return r.handlePictureInPictureEnabledChange(e)})),r.disable(),r}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-picture-in-picture-control "+e.prototype.buildCSSClass.call(this)},n.handlePictureInPictureEnabledChange=function(){s().pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()?this.enable():this.disable()},n.handlePictureInPictureChange=function(e){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange()},n.handleClick=function(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},t}(Pi);ea.prototype.controlText_="Picture-in-Picture",Tr.registerComponent("PictureInPictureToggle",ea);var ta=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"fullscreenchange",(function(e){return r.handleFullscreenChange(e)})),!1===s()[t.fsApi_.fullscreenEnabled]&&r.disable(),r}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)},n.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},n.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},t}(Pi);ta.prototype.controlText_="Fullscreen",Tr.registerComponent("FullscreenToggle",ta);var na=function(e){function t(){return e.apply(this,arguments)||this}return(0,l.Z)(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},t}(Tr);Tr.registerComponent("VolumeLevel",na);var ra=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=er(Jn((0,u.Z)(r),r.update),Qn),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})},n.update=function(e,t,n,r){if(!n){var i=gn(this.el_),a=gn(this.player_.el()),s=e.width*t;if(!a||!i)return;var o=e.left-a.left+s,u=e.width-s+(a.right-e.right),l=i.width/2;o<l?l+=l-o:u<l&&(l=u),l<0?l=0:l>i.width&&(l=i.width),this.el_.style.right="-"+l+"px"}this.write(r+"%")},n.write=function(e){nn(this.el_,e)},n.updateVolume=function(e,t,n,r,i){var a=this;this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",(function(){a.update(e,t,n,r.toFixed(0)),i&&i()}))},t}(Tr);Tr.registerComponent("VolumeLevelTooltip",ra);var ia=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=er(Jn((0,u.Z)(r),r.update),Qn),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},n.update=function(e,t,n){var r=this,i=100*t;this.getChild("volumeLevelTooltip").updateVolume(e,t,n,i,(function(){n?r.el_.style.bottom=e.height*t+"px":r.el_.style.left=e.width*t+"px"}))},t}(Tr);ia.prototype.options_={children:["volumeLevelTooltip"]},Tr.registerComponent("MouseVolumeLevelDisplay",ia);var aa=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on("slideractive",(function(e){return r.updateLastVolume_(e)})),r.on(t,"volumechange",(function(e){return r.updateARIAAttributes(e)})),t.ready((function(){return r.updateARIAAttributes()})),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},n.handleMouseDown=function(t){kn(t)&&e.prototype.handleMouseDown.call(this,t)},n.handleMouseMove=function(e){var t=this.getChild("mouseVolumeLevelDisplay");if(t){var n=this.el(),r=gn(n),i=this.vertical(),a=yn(n,e);a=i?a.y:a.x,a=zi(a,0,1),t.update(r,a,i)}kn(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},n.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},n.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},n.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},n.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},n.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},n.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},n.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",(function(){0===e.player_.volume()&&e.player_.lastVolume_(t)}))},t}(Gi);aa.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},Gt||Dt||aa.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),aa.prototype.playerEvent="volumechange",Tr.registerComponent("VolumeBar",aa);var sa=function(e){function t(t,n){var r;return void 0===n&&(n={}),n.vertical=n.vertical||!1,(void 0===n.volumeBar||wt(n.volumeBar))&&(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical),r=e.call(this,t,n)||this,function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}((0,u.Z)(r),t),r.throttledHandleMouseMove=er(Jn((0,u.Z)(r),r.handleMouseMove),Qn),r.handleMouseUpHandler_=function(e){return r.handleMouseUp(e)},r.on("mousedown",(function(e){return r.handleMouseDown(e)})),r.on("touchstart",(function(e){return r.handleMouseDown(e)})),r.on("mousemove",(function(e){return r.handleMouseMove(e)})),r.on(r.volumeBar,["focus","slideractive"],(function(){r.volumeBar.addClass("vjs-slider-active"),r.addClass("vjs-slider-active"),r.trigger("slideractive")})),r.on(r.volumeBar,["blur","sliderinactive"],(function(){r.volumeBar.removeClass("vjs-slider-active"),r.removeClass("vjs-slider-active"),r.trigger("sliderinactive")})),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},n.handleMouseDown=function(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)},n.handleMouseUp=function(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUpHandler_),this.off(t,"touchend",this.handleMouseUpHandler_)},n.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},t}(Tr);sa.prototype.options_={children:["volumeBar"]},Tr.registerComponent("VolumeControl",sa);var oa=function(e){function t(t,n){var r;return r=e.call(this,t,n)||this,function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}((0,u.Z)(r),t),r.on(t,["loadstart","volumechange"],(function(e){return r.update(e)})),r}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){var t=this.player_.volume(),n=this.player_.lastVolume_();if(0===t){var r=n<.1?.1:n;this.player_.volume(r),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},n.update=function(e){this.updateIcon_(),this.updateControlText_()},n.updateIcon_=function(){var e=this.player_.volume(),t=3;Gt&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var n=0;n<4;n++)on(this.el_,"vjs-vol-"+n);sn(this.el_,"vjs-vol-"+t)},n.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},t}(Pi);oa.prototype.controlText_="Mute",Tr.registerComponent("MuteToggle",oa);var ua=function(e){function t(t,n){var r;return void 0===n&&(n={}),void 0!==n.inline?n.inline=n.inline:n.inline=!0,(void 0===n.volumeControl||wt(n.volumeControl))&&(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline),(r=e.call(this,t,n)||this).handleKeyPressHandler_=function(e){return r.handleKeyPress(e)},r.on(t,["loadstart"],(function(e){return r.volumePanelState_(e)})),r.on(r.muteToggle,"keyup",(function(e){return r.handleKeyPress(e)})),r.on(r.volumeControl,"keyup",(function(e){return r.handleVolumeControlKeyUp(e)})),r.on("keydown",(function(e){return r.handleKeyPress(e)})),r.on("mouseover",(function(e){return r.handleMouseOver(e)})),r.on("mouseout",(function(e){return r.handleMouseOut(e)})),r.on(r.volumeControl,["slideractive"],r.sliderActive_),r.on(r.volumeControl,["sliderinactive"],r.sliderInactive_),r}(0,l.Z)(t,e);var n=t.prototype;return n.sliderActive_=function(){this.addClass("vjs-slider-active")},n.sliderInactive_=function(){this.removeClass("vjs-slider-active")},n.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},n.createEl=function(){var t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},n.dispose=function(){this.handleMouseOut(),e.prototype.dispose.call(this)},n.handleVolumeControlKeyUp=function(e){f().isEventKey(e,"Esc")&&this.muteToggle.focus()},n.handleMouseOver=function(e){this.addClass("vjs-hover"),zn(s(),"keyup",this.handleKeyPressHandler_)},n.handleMouseOut=function(e){this.removeClass("vjs-hover"),Gn(s(),"keyup",this.handleKeyPressHandler_)},n.handleKeyPress=function(e){f().isEventKey(e,"Esc")&&this.handleMouseOut()},t}(Tr);ua.prototype.options_={children:["muteToggle","volumeControl"]},Tr.registerComponent("VolumePanel",ua);var la=function(e){function t(t,n){var r;return r=e.call(this,t,n)||this,n&&(r.menuButton_=n.menuButton),r.focusedChild_=-1,r.on("keydown",(function(e){return r.handleKeyDown(e)})),r.boundHandleBlur_=function(e){return r.handleBlur(e)},r.boundHandleTapClick_=function(e){return r.handleTapClick(e)},r}(0,l.Z)(t,e);var n=t.prototype;return n.addEventListenerForItem=function(e){e instanceof Tr&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},n.removeEventListenerForItem=function(e){e instanceof Tr&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))},n.removeChild=function(t){"string"==typeof t&&(t=this.getChild(t)),this.removeEventListenerForItem(t),e.prototype.removeChild.call(this,t)},n.addItem=function(e){var t=this.addChild(e);t&&this.addEventListenerForItem(t)},n.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=tn(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var n=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return n.appendChild(this.contentEl_),zn(n,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),n},n.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,e.prototype.dispose.call(this)},n.handleBlur=function(e){var t=e.relatedTarget||s().activeElement;if(!this.children().some((function(e){return e.el()===t}))){var n=this.menuButton_;n&&n.buttonPressed_&&t!==n.el().firstChild&&n.unpressButton()}},n.handleTapClick=function(e){if(this.menuButton_){this.menuButton_.unpressButton();var t=this.children();if(!Array.isArray(t))return;var n=t.filter((function(t){return t.el()===e.target}))[0];if(!n)return;"CaptionSettingsMenuItem"!==n.name()&&this.menuButton_.focus()}},n.handleKeyDown=function(e){f().isEventKey(e,"Left")||f().isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(f().isEventKey(e,"Right")||f().isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())},n.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},n.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},n.focus=function(e){void 0===e&&(e=0);var t=this.children().slice();t.length&&t[0].hasClass("vjs-menu-title")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())},t}(Tr);Tr.registerComponent("Menu",la);var ca=function(e){function t(t,n){var r;void 0===n&&(n={}),(r=e.call(this,t,n)||this).menuButton_=new Pi(t,n),r.menuButton_.controlText(r.controlText_),r.menuButton_.el_.setAttribute("aria-haspopup","true");var i=Pi.prototype.buildCSSClass();r.menuButton_.el_.className=r.buildCSSClass()+" "+i,r.menuButton_.removeClass("vjs-control"),r.addChild(r.menuButton_),r.update(),r.enabled_=!0;var a=function(e){return r.handleClick(e)};return r.handleMenuKeyUp_=function(e){return r.handleMenuKeyUp(e)},r.on(r.menuButton_,"tap",a),r.on(r.menuButton_,"click",a),r.on(r.menuButton_,"keydown",(function(e){return r.handleKeyDown(e)})),r.on(r.menuButton_,"mouseenter",(function(){r.addClass("vjs-hover"),r.menu.show(),zn(s(),"keyup",r.handleMenuKeyUp_)})),r.on("mouseleave",(function(e){return r.handleMouseLeave(e)})),r.on("keydown",(function(e){return r.handleSubmenuKeyDown(e)})),r}(0,l.Z)(t,e);var n=t.prototype;return n.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},n.createMenu=function(){var e=new la(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=tn("li",{className:"vjs-menu-title",innerHTML:mr(this.options_.title),tabIndex:-1}),n=new Tr(this.player_,{el:t});e.addItem(n)}if(this.items=this.createItems(),this.items)for(var r=0;r<this.items.length;r++)e.addItem(this.items[r]);return e},n.createItems=function(){},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},n.buildWrapperCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+Pi.prototype.buildCSSClass()+" "+e.prototype.buildCSSClass.call(this)},n.buildCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+e.prototype.buildCSSClass.call(this)},n.controlText=function(e,t){return void 0===t&&(t=this.menuButton_.el()),this.menuButton_.controlText(e,t)},n.dispose=function(){this.handleMouseLeave(),e.prototype.dispose.call(this)},n.handleClick=function(e){this.buttonPressed_?this.unpressButton():this.pressButton()},n.handleMouseLeave=function(e){this.removeClass("vjs-hover"),Gn(s(),"keyup",this.handleMenuKeyUp_)},n.focus=function(){this.menuButton_.focus()},n.blur=function(){this.menuButton_.blur()},n.handleKeyDown=function(e){f().isEventKey(e,"Esc")||f().isEventKey(e,"Tab")?(this.buttonPressed_&&this.unpressButton(),f().isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus())):(f().isEventKey(e,"Up")||f().isEventKey(e,"Down"))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))},n.handleMenuKeyUp=function(e){(f().isEventKey(e,"Esc")||f().isEventKey(e,"Tab"))&&this.removeClass("vjs-hover")},n.handleSubmenuKeyPress=function(e){this.handleSubmenuKeyDown(e)},n.handleSubmenuKeyDown=function(e){(f().isEventKey(e,"Esc")||f().isEventKey(e,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),f().isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus()))},n.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),Gt&&Jt())return;this.menu.focus()}},n.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},n.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},n.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},t}(Tr);Tr.registerComponent("MenuButton",ca);var da=function(e){function t(t,n){var r,i=n.tracks;if((r=e.call(this,t,n)||this).items.length<=1&&r.hide(),!i)return(0,u.Z)(r);var a=Jn((0,u.Z)(r),r.update);return i.addEventListener("removetrack",a),i.addEventListener("addtrack",a),i.addEventListener("labelchange",a),r.player_.on("ready",a),r.player_.on("dispose",(function(){i.removeEventListener("removetrack",a),i.removeEventListener("addtrack",a),i.removeEventListener("labelchange",a)})),r}return(0,l.Z)(t,e),t}(ca);Tr.registerComponent("TrackButton",da);var ha=["Tab","Esc","Up","Down","Right","Left"],fa=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).selectable=n.selectable,r.isSelected_=n.selected||!1,r.multiSelectable=n.multiSelectable,r.selected(r.isSelected_),r.selectable?r.multiSelectable?r.el_.setAttribute("role","menuitemcheckbox"):r.el_.setAttribute("role","menuitemradio"):r.el_.setAttribute("role","menuitem"),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(t,n,r){return this.nonIconControl=!0,e.prototype.createEl.call(this,"li",Tt({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},n),r)},n.handleKeyDown=function(t){ha.some((function(e){return f().isEventKey(t,e)}))||e.prototype.handleKeyDown.call(this,t)},n.handleClick=function(e){this.selected(!0)},n.selected=function(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},t}(wi);Tr.registerComponent("MenuItem",fa);var pa=function(e){function t(t,n){var r,a=n.track,o=t.textTracks();n.label=a.label||a.language||"Unknown",n.selected="showing"===a.mode,(r=e.call(this,t,n)||this).track=a,r.kinds=(n.kinds||[n.kind||r.track.kind]).filter(Boolean);var l,c=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleTracksChange.apply((0,u.Z)(r),t)},d=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleSelectedLanguageChange.apply((0,u.Z)(r),t)};return t.on(["loadstart","texttrackchange"],c),o.addEventListener("change",c),o.addEventListener("selectedlanguagechange",d),r.on("dispose",(function(){t.off(["loadstart","texttrackchange"],c),o.removeEventListener("change",c),o.removeEventListener("selectedlanguagechange",d)})),void 0===o.onchange&&r.on(["tap","click"],(function(){if("object"!=typeof i().Event)try{l=new(i().Event)("change")}catch(e){}l||(l=s().createEvent("Event")).initEvent("change",!0,!0),o.dispatchEvent(l)})),r.handleTracksChange(),r}(0,l.Z)(t,e);var n=t.prototype;return n.handleClick=function(t){var n=this.track,r=this.player_.textTracks();if(e.prototype.handleClick.call(this,t),r)for(var i=0;i<r.length;i++){var a=r[i];-1!==this.kinds.indexOf(a.kind)&&(a===n?"showing"!==a.mode&&(a.mode="showing"):"disabled"!==a.mode&&(a.mode="disabled"))}},n.handleTracksChange=function(e){var t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)},n.handleSelectedLanguageChange=function(e){if("showing"===this.track.mode){var t=this.player_.cache_.selectedLanguage;if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},n.dispose=function(){this.track=null,e.prototype.dispose.call(this)},t}(fa);Tr.registerComponent("TextTrackMenuItem",pa);var ma=function(e){function t(t,n){return n.track={player:t,kind:n.kind,kinds:n.kinds,default:!1,mode:"disabled"},n.kinds||(n.kinds=[n.kind]),n.label?n.track.label=n.label:n.track.label=n.kinds.join(" and ")+" off",n.selectable=!0,n.multiSelectable=!1,e.call(this,t,n)||this}(0,l.Z)(t,e);var n=t.prototype;return n.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,i=t.length;r<i;r++){var a=t[r];if(this.options_.kinds.indexOf(a.kind)>-1&&"showing"===a.mode){n=!1;break}}n!==this.isSelected_&&this.selected(n)},n.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,i=t.length;r<i;r++){var a=t[r];if(["captions","descriptions","subtitles"].indexOf(a.kind)>-1&&"showing"===a.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(pa);Tr.registerComponent("OffTextTrackMenuItem",ma);var ga=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.textTracks(),e.call(this,t,n)||this}return(0,l.Z)(t,e),t.prototype.createItems=function(e,t){var n;void 0===e&&(e=[]),void 0===t&&(t=pa),this.label_&&(n=this.label_+" off"),e.push(new ma(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i<r.length;i++){var a=r[i];if(this.kinds_.indexOf(a.kind)>-1){var s=new t(this.player_,{track:a,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});s.addClass("vjs-"+a.kind+"-menu-item"),e.push(s)}}return e},t}(da);Tr.registerComponent("TextTrackButton",ga);var va=function(e){function t(t,n){var r,i=n.track,a=n.cue,s=t.currentTime();return n.selectable=!0,n.multiSelectable=!1,n.label=a.text,n.selected=a.startTime<=s&&s<a.endTime,(r=e.call(this,t,n)||this).track=i,r.cue=a,i.addEventListener("cuechange",Jn((0,u.Z)(r),r.update)),r}(0,l.Z)(t,e);var n=t.prototype;return n.handleClick=function(t){e.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},n.update=function(e){var t=this.cue,n=this.player_.currentTime();this.selected(t.startTime<=n&&n<t.endTime)},t}(fa);Tr.registerComponent("ChaptersTrackMenuItem",va);var ya=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildWrapperCSSClass.call(this)},n.update=function(t){this.track_&&(!t||"addtrack"!==t.type&&"removetrack"!==t.type)||this.setTrack(this.findChaptersTrack()),e.prototype.update.call(this)},n.setTrack=function(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";var n=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);n&&n.addEventListener("load",this.updateHandler_)}}},n.findChaptersTrack=function(){for(var e=this.player_.textTracks()||[],t=e.length-1;t>=0;t--){var n=e[t];if(n.kind===this.kind_)return n}},n.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(mr(this.kind_))},n.createMenu=function(){return this.options_.title=this.getMenuCaption(),e.prototype.createMenu.call(this)},n.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var n=0,r=t.length;n<r;n++){var i=t[n],a=new va(this.player_,{track:this.track_,cue:i});e.push(a)}return e},t}(ga);ya.prototype.kind_="chapters",ya.prototype.controlText_="Chapters",Tr.registerComponent("ChaptersButton",ya);var _a=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var a=t.textTracks(),s=Jn((0,u.Z)(i),i.handleTracksChange);return a.addEventListener("change",s),i.on("dispose",(function(){a.removeEventListener("change",s)})),i}(0,l.Z)(t,e);var n=t.prototype;return n.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!1,r=0,i=t.length;r<i;r++){var a=t[r];if(a.kind!==this.kind_&&"showing"===a.mode){n=!0;break}}n?this.disable():this.enable()},n.buildCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(ga);_a.prototype.kind_="descriptions",_a.prototype.controlText_="Descriptions",Tr.registerComponent("DescriptionsButton",_a);var ba=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(ga);ba.prototype.kind_="subtitles",ba.prototype.controlText_="Subtitles",Tr.registerComponent("SubtitlesButton",ba);var Ta=function(e){function t(t,n){var r;return n.track={player:t,kind:n.kind,label:n.kind+" settings",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="CaptionSettingsMenuItem",(r=e.call(this,t,n)||this).addClass("vjs-texttrack-settings"),r.controlText(", opens "+n.kind+" settings dialog"),r}return(0,l.Z)(t,e),t.prototype.handleClick=function(e){this.player().getChild("textTrackSettings").open()},t}(pa);Tr.registerComponent("CaptionSettingsMenuItem",Ta);var Sa=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-captions-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-captions-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new Ta(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t)},t}(ga);Sa.prototype.kind_="captions",Sa.prototype.controlText_="Captions",Tr.registerComponent("CaptionsButton",Sa);var wa=function(e){function t(){return e.apply(this,arguments)||this}return(0,l.Z)(t,e),t.prototype.createEl=function(t,n,r){var i='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"captions"===this.options_.track.kind&&(i+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n "),i+="</span>",e.prototype.createEl.call(this,t,Tt({innerHTML:i},n),r)},t}(pa);Tr.registerComponent("SubsCapsMenuItem",wa);var ka=function(e){function t(t,n){var r;return void 0===n&&(n={}),(r=e.call(this,t,n)||this).label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(r.player_.language_)>-1&&(r.label_="captions"),r.menuButton_.controlText(mr(r.label_)),r}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new Ta(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t,wa)},t}(ga);ka.prototype.kinds_=["captions","subtitles"],ka.prototype.controlText_="Subtitles",Tr.registerComponent("SubsCapsButton",ka);var Ea=function(e){function t(t,n){var r,i=n.track,a=t.audioTracks();n.label=i.label||i.language||"Unknown",n.selected=i.enabled,(r=e.call(this,t,n)||this).track=i,r.addClass("vjs-"+i.kind+"-menu-item");var s=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleTracksChange.apply((0,u.Z)(r),t)};return a.addEventListener("change",s),r.on("dispose",(function(){a.removeEventListener("change",s)})),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(t,n,r){var i='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"main-desc"===this.options_.track.kind&&(i+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Descriptions")+"</span>\n "),i+="</span>",e.prototype.createEl.call(this,t,Tt({innerHTML:i},n),r)},n.handleClick=function(t){e.prototype.handleClick.call(this,t),this.track.enabled=!0},n.handleTracksChange=function(e){this.selected(this.track.enabled)},t}(fa);Tr.registerComponent("AudioTrackMenuItem",Ea);var Ca=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.audioTracks(),e.call(this,t,n)||this}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-audio-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-audio-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(e){void 0===e&&(e=[]),this.hideThreshold_=1;for(var t=this.player_.audioTracks(),n=0;n<t.length;n++){var r=t[n];e.push(new Ea(this.player_,{track:r,selectable:!0,multiSelectable:!1}))}return e},t}(da);Ca.prototype.controlText_="Audio Track",Tr.registerComponent("AudioTrackButton",Ca);var xa=function(e){function t(t,n){var r,i=n.rate,a=parseFloat(i,10);return n.label=i,n.selected=1===a,n.selectable=!0,n.multiSelectable=!1,(r=e.call(this,t,n)||this).label=i,r.rate=a,r.on(t,"ratechange",(function(e){return r.update(e)})),r}(0,l.Z)(t,e);var n=t.prototype;return n.handleClick=function(t){e.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},n.update=function(e){this.selected(this.player().playbackRate()===this.rate)},t}(fa);xa.prototype.contentElType="button",Tr.registerComponent("PlaybackRateMenuItem",xa);var Ia=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).menuButton_.el_.setAttribute("aria-describedby",r.labelElId_),r.updateVisibility(),r.updateLabel(),r.on(t,"loadstart",(function(e){return r.updateVisibility(e)})),r.on(t,"ratechange",(function(e){return r.updateLabel(e)})),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this);return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=tn("div",{className:"vjs-playback-rate-value",id:this.labelElId_,innerHTML:"1x"}),t.appendChild(this.labelEl_),t},n.dispose=function(){this.labelEl_=null,e.prototype.dispose.call(this)},n.buildCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildWrapperCSSClass.call(this)},n.createMenu=function(){var e=new la(this.player()),t=this.playbackRates();if(t)for(var n=t.length-1;n>=0;n--)e.addChild(new xa(this.player(),{rate:t[n]+"x"}));return e},n.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},n.handleClick=function(e){for(var t=this.player().playbackRate(),n=this.playbackRates(),r=n[0],i=0;i<n.length;i++)if(n[i]>t){r=n[i];break}this.player().playbackRate(r)},n.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},n.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},n.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},n.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},t}(ca);Ia.prototype.controlText_="Playback Rate",Tr.registerComponent("PlaybackRateMenuButton",Ia);var Aa=function(e){function t(){return e.apply(this,arguments)||this}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},t}(Tr);Tr.registerComponent("Spacer",Aa);var Oa=function(e){function t(){return e.apply(this,arguments)||this}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)},n.createEl=function(){var t=e.prototype.createEl.call(this,{className:this.buildCSSClass()});return t.innerHTML=" ",t},t}(Aa);Tr.registerComponent("CustomControlSpacer",Oa);var Pa=function(e){function t(){return e.apply(this,arguments)||this}return(0,l.Z)(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(Tr);Pa.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in s()&&Pa.prototype.options_.children.splice(Pa.prototype.options_.children.length-1,0,"pictureInPictureToggle"),Tr.registerComponent("ControlBar",Pa);var La=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"error",(function(e){return r.open(e)})),r}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-error-display "+e.prototype.buildCSSClass.call(this)},n.content=function(){var e=this.player().error();return e?this.localize(e.message):""},t}(Lr);La.prototype.options_=(0,o.Z)({},Lr.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),Tr.registerComponent("ErrorDisplay",La);var Da="vjs-text-track-settings",Ra=["#000","Black"],Ma=["#00F","Blue"],Na=["#0FF","Cyan"],Ua=["#0F0","Green"],Fa=["#F0F","Magenta"],Ba=["#F00","Red"],ja=["#FFF","White"],Ha=["#FF0","Yellow"],Va=["1","Opaque"],qa=["0.5","Semi-Transparent"],Wa=["0","Transparent"],za={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Ra,ja,Ba,Ua,Ma,Ha,Fa,Na]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[Va,qa,Wa]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[ja,Ra,Ba,Ua,Ma,Ha,Fa,Na]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(e){return"1.00"===e?null:Number(e)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[Va,qa]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[Wa,qa,Va]}};function Ga(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}za.windowColor.options=za.backgroundColor.options;var Xa=function(e){function t(t,n){var r;return n.temporary=!1,(r=e.call(this,t,n)||this).updateDisplay=r.updateDisplay.bind((0,u.Z)(r)),r.fill(),r.hasBeenOpened_=r.hasBeenFilled_=!0,r.endDialog=tn("p",{className:"vjs-control-text",textContent:r.localize("End of dialog window.")}),r.el().appendChild(r.endDialog),r.setDefaults(),void 0===n.persistTextTrackSettings&&(r.options_.persistTextTrackSettings=r.options_.playerOptions.persistTextTrackSettings),r.on(r.$(".vjs-done-button"),"click",(function(){r.saveSettings(),r.close()})),r.on(r.$(".vjs-default-button"),"click",(function(){r.setDefaults(),r.updateDisplay()})),bt(za,(function(e){r.on(r.$(e.selector),"change",r.updateDisplay)})),r.options_.persistTextTrackSettings&&r.restoreSettings(),r}(0,l.Z)(t,e);var n=t.prototype;return n.dispose=function(){this.endDialog=null,e.prototype.dispose.call(this)},n.createElSelect_=function(e,t,n){var r=this;void 0===t&&(t=""),void 0===n&&(n="label");var i=za[e],a=i.id.replace("%s",this.id_),s=[t,a].join(" ").trim();return["<"+n+' id="'+a+'" class="'+("label"===n?"vjs-label":"")+'">',this.localize(i.label),"</"+n+">",'<select aria-labelledby="'+s+'">'].concat(i.options.map((function(e){var t=a+"-"+e[1].replace(/\W+/g,"");return['<option id="'+t+'" value="'+e[0]+'" ','aria-labelledby="'+s+" "+t+'">',r.localize(e[1]),"</option>"].join("")}))).concat("</select>").join("")},n.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",e),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",e),"</span>","</fieldset>"].join("")},n.createElBgColor_=function(){var e="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",e),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",e),"</span>","</fieldset>"].join("")},n.createElWinColor_=function(){var e="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",e),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",e),"</span>","</fieldset>"].join("")},n.createElColors_=function(){return tn("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},n.createElFont_=function(){return tn("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},n.createElControls_=function(){var e=this.localize("restore all settings to the default values");return tn("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+e+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+e+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},n.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},n.label=function(){return this.localize("Caption Settings Dialog")},n.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},n.buildCSSClass=function(){return e.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},n.getValues=function(){var e,t,n,r=this;return t=function(e,t,n){var i,a,s=(i=r.$(t.selector),a=t.parser,Ga(i.options[i.options.selectedIndex].value,a));return void 0!==s&&(e[n]=s),e},void 0===(n={})&&(n=0),_t(e=za).reduce((function(n,r){return t(n,e[r],r)}),n)},n.setValues=function(e){var t=this;bt(za,(function(n,r){!function(e,t,n){if(t)for(var r=0;r<e.options.length;r++)if(Ga(e.options[r].value,n)===t){e.selectedIndex=r;break}}(t.$(n.selector),e[r],n.parser)}))},n.setDefaults=function(){var e=this;bt(za,(function(t){var n=t.hasOwnProperty("default")?t.default:0;e.$(t.selector).selectedIndex=n}))},n.restoreSettings=function(){var e;try{e=JSON.parse(i().localStorage.getItem(Da))}catch(e){gt.warn(e)}e&&this.setValues(e)},n.saveSettings=function(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?i().localStorage.setItem(Da,JSON.stringify(e)):i().localStorage.removeItem(Da)}catch(e){gt.warn(e)}}},n.updateDisplay=function(){var e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()},n.conditionalBlur_=function(){this.previouslyActiveEl_=null;var e=this.player_.controlBar,t=e&&e.subsCapsButton,n=e&&e.captionsButton;t?t.focus():n&&n.focus()},t}(Lr);Tr.registerComponent("TextTrackSettings",Xa);var $a=function(e){function t(t,n){var r,a=n.ResizeObserver||i().ResizeObserver;null===n.ResizeObserver&&(a=!1);var s=gr({createEl:!a,reportTouchActivity:!1},n);return(r=e.call(this,t,s)||this).ResizeObserver=n.ResizeObserver||i().ResizeObserver,r.loadListener_=null,r.resizeObserver_=null,r.debouncedHandler_=function(e,t,n,r){var a;void 0===r&&(r=i());var s=function(){var t=this,n=arguments,i=function(){a=null,i=null,e.apply(t,n)};r.clearTimeout(a),a=r.setTimeout(i,100)};return s.cancel=function(){r.clearTimeout(a),a=null},s}((function(){r.resizeHandler()}),0,0,(0,u.Z)(r)),a?(r.resizeObserver_=new r.ResizeObserver(r.debouncedHandler_),r.resizeObserver_.observe(t.el())):(r.loadListener_=function(){if(r.el_&&r.el_.contentWindow){var e=r.debouncedHandler_,t=r.unloadListener_=function(){Gn(this,"resize",e),Gn(this,"unload",t),t=null};zn(r.el_.contentWindow,"unload",t),zn(r.el_.contentWindow,"resize",e)}},r.one("load",r.loadListener_)),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1},{"aria-hidden":"true"})},n.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},n.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,e.prototype.dispose.call(this)},t}(Tr);Tr.registerComponent("ResizeManager",$a);var Ka={trackingThreshold:30,liveTolerance:15},Za=function(e){function t(t,n){var r,i=gr(Ka,n,{createEl:!1});return(r=e.call(this,t,i)||this).handleVisibilityChange_=function(e){return r.handleVisibilityChange(e)},r.trackLiveHandler_=function(){return r.trackLive_()},r.handlePlay_=function(e){return r.handlePlay(e)},r.handleFirstTimeupdate_=function(e){return r.handleFirstTimeupdate(e)},r.handleSeeked_=function(e){return r.handleSeeked(e)},r.seekToLiveEdge_=function(e){return r.seekToLiveEdge(e)},r.reset_(),r.on(r.player_,"durationchange",(function(e){return r.handleDurationchange(e)})),r.one(r.player_,"canplay",(function(){return r.toggleTracking()})),jt&&"hidden"in s()&&"visibilityState"in s()&&r.on(s(),"visibilitychange",r.handleVisibilityChange_),r}(0,l.Z)(t,e);var n=t.prototype;return n.handleVisibilityChange=function(){this.player_.duration()===1/0&&(s().hidden?this.stopTracking():this.startTracking())},n.trackLive_=function(){var e=this.player_.seekable();if(e&&e.length){var t=Number(i().performance.now().toFixed(4)),n=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+n;var r=this.liveCurrentTime(),a=this.player_.currentTime(),s=this.player_.paused()||this.seekedBehindLive_||Math.abs(r-a)>this.options_.liveTolerance;this.timeupdateSeen_&&r!==1/0||(s=!1),s!==this.behindLiveEdge_&&(this.behindLiveEdge_=s,this.trigger("liveedgechange"))}},n.handleDurationchange=function(){this.toggleTracking()},n.toggleTracking=function(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())},n.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,Qn),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))},n.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)},n.handleSeeked=function(){var e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()},n.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)},n.reset_=function(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)},n.nextSeekedFromUser=function(){this.nextSeekedFromUser_=!0},n.stopTracking=function(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))},n.seekableEnd=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.end(n));return t.length?t.sort()[t.length-1]:1/0},n.seekableStart=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.start(n));return t.length?t.sort()[0]:0},n.liveWindow=function(){var e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()},n.isLive=function(){return this.isTracking()},n.atLiveEdge=function(){return!this.behindLiveEdge()},n.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},n.pastSeekEnd=function(){var e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_},n.behindLiveEdge=function(){return this.behindLiveEdge_},n.isTracking=function(){return"number"==typeof this.trackingInterval_},n.seekToLiveEdge=function(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))},n.dispose=function(){this.off(s(),"visibilitychange",this.handleVisibilityChange_),this.stopTracking(),e.prototype.dispose.call(this)},t}(Tr);Tr.registerComponent("LiveTracker",Za);var Ya,Qa=function(e){var t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;var n=e.$$("source"),r=[],i="";if(!n.length)return!1;for(var a=0;a<n.length;a++){var s=n[a].src;s&&-1===r.indexOf(s)&&r.push(s)}return!!r.length&&(1===r.length&&(i=r[0]),e.triggerSourceset(i),!0)},Ja=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(e){var t=s().createElement(this.nodeName.toLowerCase());t.innerHTML=e;for(var n=s().createDocumentFragment();t.childNodes.length;)n.appendChild(t.childNodes[0]);return this.innerText="",i().Element.prototype.appendChild.call(this,n),this.innerHTML}}),es=function(e,t){for(var n={},r=0;r<e.length&&!((n=Object.getOwnPropertyDescriptor(e[r],t))&&n.set&&n.get);r++);return n.enumerable=!0,n.configurable=!0,n},ts=function(e){var t=e.el();if(!t.resetSourceWatch_){var n={},r=function(e){return es([e.el(),i().HTMLMediaElement.prototype,i().Element.prototype,Ja],"innerHTML")}(e),a=function(n){return function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var s=n.apply(t,i);return Qa(e),s}};["append","appendChild","insertAdjacentHTML"].forEach((function(e){t[e]&&(n[e]=t[e],t[e]=a(n[e]))})),Object.defineProperty(t,"innerHTML",gr(r,{set:a(r.set)})),t.resetSourceWatch_=function(){t.resetSourceWatch_=null,Object.keys(n).forEach((function(e){t[e]=n[e]})),Object.defineProperty(t,"innerHTML",r)},e.one("sourceset",t.resetSourceWatch_)}},ns=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?$r(i().Element.prototype.getAttribute.call(this,"src")):""},set:function(e){return i().Element.prototype.setAttribute.call(this,"src",e),e}}),rs=function(e,t,n,r){void 0===r&&(r=!0);var i=function(n){return Object.defineProperty(e,t,{value:n,enumerable:!0,writable:!0})},a={configurable:!0,enumerable:!0,get:function(){var e=n();return i(e),e}};return r&&(a.set=i),Object.defineProperty(e,t,a)},is=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i=t.source,a=!1;if(i&&(r.el_.currentSrc!==i.src||t.tag&&3===t.tag.initNetworkState_)?r.setSource(i):r.handleLateInit_(r.el_),t.enableSourceset&&r.setupSourcesetHandling_(),r.isScrubbing_=!1,r.el_.hasChildNodes()){for(var s=r.el_.childNodes,o=s.length,u=[];o--;){var l=s[o];"track"===l.nodeName.toLowerCase()&&(r.featuresNativeTextTracks?(r.remoteTextTrackEls().addTrackElement_(l),r.remoteTextTracks().addTrack(l.track),r.textTracks().addTrack(l.track),a||r.el_.hasAttribute("crossorigin")||!Zr(l.src)||(a=!0)):u.push(l))}for(var c=0;c<u.length;c++)r.el_.removeChild(u[c])}return r.proxyNativeTracks_(),r.featuresNativeTextTracks&&a&>.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\nThis may prevent text tracks from loading."),r.restoreMetadataTracksInIOSNativePlayer_(),(qt||zt||Mt)&&!0===t.nativeControlsForTouch&&r.setControls(!0),r.proxyWebkitFullscreen_(),r.triggerReady(),r}(0,l.Z)(t,e);var n=t.prototype;return n.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),t.disposeMediaElement(this.el_),this.options_=null,e.prototype.dispose.call(this)},n.setupSourcesetHandling_=function(){!function(e){if(e.featuresSourceset){var t=e.el();if(!t.resetSourceset_){var n=function(e){return es([e.el(),i().HTMLMediaElement.prototype,ns],"src")}(e),r=t.setAttribute,a=t.load;Object.defineProperty(t,"src",gr(n,{set:function(r){var i=n.set.call(t,r);return e.triggerSourceset(t.src),i}})),t.setAttribute=function(n,i){var a=r.call(t,n,i);return/src/i.test(n)&&e.triggerSourceset(t.src),a},t.load=function(){var n=a.call(t);return Qa(e)||(e.triggerSourceset(""),ts(e)),n},t.currentSrc?e.triggerSourceset(t.currentSrc):Qa(e)||ts(e),t.resetSourceset_=function(){t.resetSourceset_=null,t.load=a,t.setAttribute=r,Object.defineProperty(t,"src",n),t.resetSourceWatch_&&t.resetSourceWatch_()}}}}(this)},n.restoreMetadataTracksInIOSNativePlayer_=function(){var e,t=this.textTracks(),n=function(){e=[];for(var n=0;n<t.length;n++){var r=t[n];"metadata"===r.kind&&e.push({track:r,storedMode:r.mode})}};n(),t.addEventListener("change",n),this.on("dispose",(function(){return t.removeEventListener("change",n)}));var r=function n(){for(var r=0;r<e.length;r++){var i=e[r];"disabled"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}t.removeEventListener("change",n)};this.on("webkitbeginfullscreen",(function(){t.removeEventListener("change",n),t.removeEventListener("change",r),t.addEventListener("change",r)})),this.on("webkitendfullscreen",(function(){t.removeEventListener("change",n),t.addEventListener("change",n),t.removeEventListener("change",r)}))},n.overrideNative_=function(e,t){var n=this;if(t===this["featuresNative"+e+"Tracks"]){var r=e.toLowerCase();this[r+"TracksListeners_"]&&Object.keys(this[r+"TracksListeners_"]).forEach((function(e){n.el()[r+"Tracks"].removeEventListener(e,n[r+"TracksListeners_"][e])})),this["featuresNative"+e+"Tracks"]=!t,this[r+"TracksListeners_"]=null,this.proxyNativeTracksForType_(r)}},n.overrideNativeAudioTracks=function(e){this.overrideNative_("Audio",e)},n.overrideNativeVideoTracks=function(e){this.overrideNative_("Video",e)},n.proxyNativeTracksForType_=function(e){var t=this,n=ii[e],r=this.el()[n.getterName],i=this[n.getterName]();if(this["featuresNative"+n.capitalName+"Tracks"]&&r&&r.addEventListener){var a={change:function(n){var r={type:"change",target:i,currentTarget:i,srcElement:i};i.trigger(r),"text"===e&&t[ai.remoteText.getterName]().trigger(r)},addtrack:function(e){i.addTrack(e.track)},removetrack:function(e){i.removeTrack(e.track)}},s=function(){for(var e=[],t=0;t<i.length;t++){for(var n=!1,a=0;a<r.length;a++)if(r[a]===i[t]){n=!0;break}n||e.push(i[t])}for(;e.length;)i.removeTrack(e.shift())};this[n.getterName+"Listeners_"]=a,Object.keys(a).forEach((function(e){var n=a[e];r.addEventListener(e,n),t.on("dispose",(function(t){return r.removeEventListener(e,n)}))})),this.on("loadstart",s),this.on("dispose",(function(e){return t.off("loadstart",s)}))}},n.proxyNativeTracks_=function(){var e=this;ii.names.forEach((function(t){e.proxyNativeTracksForType_(t)}))},n.createEl=function(){var e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){var n=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(n,e),t.disposeMediaElement(e),e=n}else{e=s().createElement("video");var r=gr({},this.options_.tag&&cn(this.options_.tag));qt&&!0===this.options_.nativeControlsForTouch||delete r.controls,ln(e,Tt(r,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&hn(e,"preload",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);for(var i=["loop","muted","playsinline","autoplay"],a=0;a<i.length;a++){var o=i[a],u=this.options_[o];void 0!==u&&(u?hn(e,o,o):fn(e,o),e[o]=u)}return e},n.handleLateInit_=function(e){if(0!==e.networkState&&3!==e.networkState){if(0===e.readyState){var t=!1,n=function(){t=!0};this.on("loadstart",n);var r=function(){t||this.trigger("loadstart")};return this.on("loadedmetadata",r),void this.ready((function(){this.off("loadstart",n),this.off("loadedmetadata",r),t||this.trigger("loadstart")}))}var i=["loadstart"];i.push("loadedmetadata"),e.readyState>=2&&i.push("loadeddata"),e.readyState>=3&&i.push("canplay"),e.readyState>=4&&i.push("canplaythrough"),this.ready((function(){i.forEach((function(e){this.trigger(e)}),this)}))}},n.setScrubbing=function(e){this.isScrubbing_=e},n.scrubbing=function(){return this.isScrubbing_},n.setCurrentTime=function(e){try{this.isScrubbing_&&this.el_.fastSeek&&Xt?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){gt(e,"Video is not ready. (Video.js)")}},n.duration=function(){var e=this;return this.el_.duration===1/0&&Dt&&Ft&&0===this.el_.currentTime?(this.on("timeupdate",(function t(){e.el_.currentTime>0&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",t))})),NaN):this.el_.duration||NaN},n.width=function(){return this.el_.offsetWidth},n.height=function(){return this.el_.offsetHeight},n.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen"in this.el_){var t=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},n=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",n),this.on("dispose",(function(){e.off("webkitbeginfullscreen",n),e.off("webkitendfullscreen",t)}))}},n.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var e=i().navigator&&i().navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},n.enterFullScreen=function(){var e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Ar(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}}),0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}},n.exitFullScreen=function(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))},n.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},n.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},n.reset=function(){t.resetMediaElement(this.el_)},n.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},n.setControls=function(e){this.el_.controls=!!e},n.addTextTrack=function(t,n,r){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,n,r):e.prototype.addTextTrack.call(this,t,n,r)},n.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return e.prototype.createRemoteTextTrack.call(this,t);var n=s().createElement("track");return t.kind&&(n.kind=t.kind),t.label&&(n.label=t.label),(t.language||t.srclang)&&(n.srclang=t.language||t.srclang),t.default&&(n.default=t.default),t.id&&(n.id=t.id),t.src&&(n.src=t.src),n},n.addRemoteTextTrack=function(t,n){var r=e.prototype.addRemoteTextTrack.call(this,t,n);return this.featuresNativeTextTracks&&this.el().appendChild(r),r},n.removeRemoteTextTrack=function(t){if(e.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var n=this.$$("track"),r=n.length;r--;)t!==n[r]&&t!==n[r].track||this.el().removeChild(n[r])},n.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),i().performance&&"function"==typeof i().performance.now?e.creationTime=i().performance.now():i().performance&&i().performance.timing&&"number"==typeof i().performance.timing.navigationStart&&(e.creationTime=i().Date.now()-i().performance.timing.navigationStart),e},t}(oi);rs(is,"TEST_VID",(function(){if(Yt()){var e=s().createElement("video"),t=s().createElement("track");return t.kind="captions",t.srclang="en",t.label="English",e.appendChild(t),e}})),is.isSupported=function(){try{is.TEST_VID.volume=.5}catch(e){return!1}return!(!is.TEST_VID||!is.TEST_VID.canPlayType)},is.canPlayType=function(e){return is.TEST_VID.canPlayType(e)},is.canPlaySource=function(e,t){return is.canPlayType(e.type)},is.canControlVolume=function(){try{var e=is.TEST_VID.volume;return is.TEST_VID.volume=e/2+.1,e!==is.TEST_VID.volume}catch(e){return!1}},is.canMuteVolume=function(){try{var e=is.TEST_VID.muted;return is.TEST_VID.muted=!e,is.TEST_VID.muted?hn(is.TEST_VID,"muted","muted"):fn(is.TEST_VID,"muted"),e!==is.TEST_VID.muted}catch(e){return!1}},is.canControlPlaybackRate=function(){if(Dt&&Ft&&Bt<58)return!1;try{var e=is.TEST_VID.playbackRate;return is.TEST_VID.playbackRate=e/2+.1,e!==is.TEST_VID.playbackRate}catch(e){return!1}},is.canOverrideAttributes=function(){try{var e=function(){};Object.defineProperty(s().createElement("video"),"src",{get:e,set:e}),Object.defineProperty(s().createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(s().createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(s().createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},is.supportsNativeTextTracks=function(){return Xt||Gt&&Ft},is.supportsNativeVideoTracks=function(){return!(!is.TEST_VID||!is.TEST_VID.videoTracks)},is.supportsNativeAudioTracks=function(){return!(!is.TEST_VID||!is.TEST_VID.audioTracks)},is.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresVolumeControl","canControlVolume"],["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach((function(e){var t=e[0],n=e[1];rs(is.prototype,t,(function(){return is[n]()}),!0)})),is.prototype.movingMediaElementInDOM=!Gt,is.prototype.featuresFullscreenResize=!0,is.prototype.featuresProgressEvents=!0,is.prototype.featuresTimeupdateEvents=!0,is.patchCanPlayType=function(){Rt>=4&&!Nt&&!Ft&&(Ya=is.TEST_VID&&is.TEST_VID.constructor.prototype.canPlayType,is.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&/^application\/(?:x-|vnd\.apple\.)mpegurl/i.test(e)?"maybe":Ya.call(this,e)})},is.unpatchCanPlayType=function(){var e=is.TEST_VID.constructor.prototype.canPlayType;return Ya&&(is.TEST_VID.constructor.prototype.canPlayType=Ya),e},is.patchCanPlayType(),is.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},is.resetMediaElement=function(e){if(e){for(var t=e.querySelectorAll("source"),n=t.length;n--;)e.removeChild(t[n]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(e){is.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){is.prototype["set"+mr(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach((function(e){is.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach((function(e){is.prototype["set"+mr(e)]=function(t){this.el_[e]=t}})),["pause","load","play"].forEach((function(e){is.prototype[e]=function(){return this.el_[e]()}})),oi.withSourceHandlers(is),is.nativeSourceHandler={},is.nativeSourceHandler.canPlayType=function(e){try{return is.TEST_VID.canPlayType(e)}catch(e){return""}},is.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return is.nativeSourceHandler.canPlayType(e.type);if(e.src){var n=Kr(e.src);return is.nativeSourceHandler.canPlayType("video/"+n)}return""},is.nativeSourceHandler.handleSource=function(e,t,n){t.setSrc(e.src)},is.nativeSourceHandler.dispose=function(){},is.registerSourceHandler(is.nativeSourceHandler),oi.registerTech("Html5",is);var as=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],ss={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},os=["tiny","xsmall","small","medium","large","xlarge","huge"],us={};os.forEach((function(e){var t="x"===e.charAt(0)?"x-"+e.substring(1):e;us[e]="vjs-layout-"+t}));var ls={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},cs=function(e){function t(n,r,i){var a;if(n.id=n.id||r.id||"vjs_video_"+Un(),(r=Tt(t.getTagSettings(n),r)).initChildren=!1,r.createEl=!1,r.evented=!1,r.reportTouchActivity=!1,!r.language)if("function"==typeof n.closest){var o=n.closest("[lang]");o&&o.getAttribute&&(r.language=o.getAttribute("lang"))}else for(var l=n;l&&1===l.nodeType;){if(cn(l).hasOwnProperty("lang")){r.language=l.getAttribute("lang");break}l=l.parentNode}if((a=e.call(this,null,r,i)||this).boundDocumentFullscreenChange_=function(e){return a.documentFullscreenChange_(e)},a.boundFullWindowOnEscKey_=function(e){return a.fullWindowOnEscKey(e)},a.boundUpdateStyleEl_=function(e){return a.updateStyleEl_(e)},a.boundApplyInitTime_=function(e){return a.applyInitTime_(e)},a.boundUpdateCurrentBreakpoint_=function(e){return a.updateCurrentBreakpoint_(e)},a.boundHandleTechClick_=function(e){return a.handleTechClick_(e)},a.boundHandleTechDoubleClick_=function(e){return a.handleTechDoubleClick_(e)},a.boundHandleTechTouchStart_=function(e){return a.handleTechTouchStart_(e)},a.boundHandleTechTouchMove_=function(e){return a.handleTechTouchMove_(e)},a.boundHandleTechTouchEnd_=function(e){return a.handleTechTouchEnd_(e)},a.boundHandleTechTap_=function(e){return a.handleTechTap_(e)},a.isFullscreen_=!1,a.log=vt(a.id_),a.fsApi_=ct,a.isPosterFromTech_=!1,a.queuedCallbacks_=[],a.isReady_=!1,a.hasStarted_=!1,a.userActive_=!1,a.debugEnabled_=!1,!a.options_||!a.options_.techOrder||!a.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(a.tag=n,a.tagAttributes=n&&cn(n),a.language(a.options_.language),r.languages){var c={};Object.getOwnPropertyNames(r.languages).forEach((function(e){c[e.toLowerCase()]=r.languages[e]})),a.languages_=c}else a.languages_=t.prototype.options_.languages;a.resetCache_(),a.poster_=r.poster||"",a.controls_=!!r.controls,n.controls=!1,n.removeAttribute("controls"),a.changingSrc_=!1,a.playCallbacks_=[],a.playTerminatedQueue_=[],n.hasAttribute("autoplay")?a.autoplay(!0):a.autoplay(a.options_.autoplay),r.plugins&&Object.keys(r.plugins).forEach((function(e){if("function"!=typeof a[e])throw new Error('plugin "'+e+'" does not exist')})),a.scrubbing_=!1,a.el_=a.createEl(),dr((0,u.Z)(a),{eventBusKey:"el_"}),a.fsApi_.requestFullscreen&&(zn(s(),a.fsApi_.fullscreenchange,a.boundDocumentFullscreenChange_),a.on(a.fsApi_.fullscreenchange,a.boundDocumentFullscreenChange_)),a.fluid_&&a.on(["playerreset","resize"],a.boundUpdateStyleEl_);var d=gr(a.options_);r.plugins&&Object.keys(r.plugins).forEach((function(e){a[e](r.plugins[e])})),r.debug&&a.debug(!0),a.options_.playerOptions=d,a.middleware_=[],a.initChildren(),a.isAudio("audio"===n.nodeName.toLowerCase()),a.controls()?a.addClass("vjs-controls-enabled"):a.addClass("vjs-controls-disabled"),a.el_.setAttribute("role","region"),a.isAudio()?a.el_.setAttribute("aria-label",a.localize("Audio Player")):a.el_.setAttribute("aria-label",a.localize("Video Player")),a.isAudio()&&a.addClass("vjs-audio"),a.flexNotSupported_()&&a.addClass("vjs-no-flex"),qt&&a.addClass("vjs-touch-enabled"),Gt||a.addClass("vjs-workinghover"),t.players[a.id_]=(0,u.Z)(a);var h=lt.split(".")[0];return a.addClass("vjs-v"+h),a.userActive(!0),a.reportUserActivity(),a.one("play",(function(e){return a.listenForUserActivity_(e)})),a.on("stageclick",(function(e){return a.handleStageClick_(e)})),a.on("keydown",(function(e){return a.handleKeyDown(e)})),a.on("languagechange",(function(e){return a.handleLanguagechange(e)})),a.breakpoints(a.options_.breakpoints),a.responsive(a.options_.responsive),a}(0,l.Z)(t,e);var n=t.prototype;return n.dispose=function(){var n=this;this.trigger("dispose"),this.off("dispose"),Gn(s(),this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),Gn(s(),"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),t.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),li[this.id()]=null,si.names.forEach((function(e){var t=si[e],r=n[t.getterName]();r&&r.off&&r.off()})),e.prototype.dispose.call(this)},n.createEl=function(){var t,n=this.tag,r=this.playerElIngest_=n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute("data-vjs-player"),a="video-js"===this.tag.tagName.toLowerCase();r?t=this.el_=n.parentNode:a||(t=this.el_=e.prototype.createEl.call(this,"div"));var o=cn(n);if(a){for(t=this.el_=n,n=this.tag=s().createElement("video");t.children.length;)n.appendChild(t.firstChild);an(t,"video-js")||sn(t,"video-js"),t.appendChild(n),r=this.playerElIngest_=t,Object.keys(t).forEach((function(e){try{n[e]=t[e]}catch(e){}}))}if(n.setAttribute("tabindex","-1"),o.tabindex="-1",(jt||Ft&&Vt)&&(n.setAttribute("role","application"),o.role="application"),n.removeAttribute("width"),n.removeAttribute("height"),"width"in o&&delete o.width,"height"in o&&delete o.height,Object.getOwnPropertyNames(o).forEach((function(e){a&&"class"===e||t.setAttribute(e,o[e]),a&&n.setAttribute(e,o[e])})),n.playerId=n.id,n.id+="_html5_api",n.className="vjs-tech",n.player=t.player=this,this.addClass("vjs-paused"),!0!==i().VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Rn("vjs-styles-dimensions");var u=Cn(".vjs-styles-defaults"),l=Cn("head");l.insertBefore(this.styleEl_,u?u.nextSibling:l.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);for(var c=n.getElementsByTagName("a"),d=0;d<c.length;d++){var h=c.item(d);sn(h,"vjs-hidden"),h.setAttribute("hidden","hidden")}return n.initNetworkState_=n.networkState,n.parentNode&&!r&&n.parentNode.insertBefore(t,n),rn(n,t),this.children_.unshift(n),this.el_.setAttribute("lang",this.language_),this.el_=t,t},n.crossOrigin=function(e){if(!e)return this.techGet_("crossOrigin");"anonymous"===e||"use-credentials"===e?this.techCall_("setCrossOrigin",e):gt.warn('crossOrigin must be "anonymous" or "use-credentials", given "'+e+'"')},n.width=function(e){return this.dimension("width",e)},n.height=function(e){return this.dimension("height",e)},n.dimension=function(e,t){var n=e+"_";if(void 0===t)return this[n]||0;if(""===t||"auto"===t)return this[n]=void 0,void this.updateStyleEl_();var r=parseFloat(t);isNaN(r)?gt.error('Improper value "'+t+'" supplied for for '+e):(this[n]=r,this.updateStyleEl_())},n.fluid=function(e){var t,n,r=this;if(void 0===e)return!!this.fluid_;this.fluid_=!!e,rr(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),n=function(){r.on(["playerreset","resize"],r.boundUpdateStyleEl_)},rr(t=this)?n():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(n))):this.removeClass("vjs-fluid"),this.updateStyleEl_()},n.fill=function(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},n.aspectRatio=function(e){if(void 0===e)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()},n.updateStyleEl_=function(){if(!0!==i().VIDEOJS_NO_DYNAMIC_STYLE){var e,t,n,r=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),a=r[1]/r[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/a:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*a,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),Mn(this.styleEl_,"\n ."+n+" {\n width: "+e+"px;\n height: "+t+"px;\n }\n\n ."+n+".vjs-fluid {\n padding-top: "+100*a+"%;\n }\n ")}else{var s="number"==typeof this.width_?this.width_:this.options_.width,o="number"==typeof this.height_?this.height_:this.options_.height,u=this.tech_&&this.tech_.el();u&&(s>=0&&(u.width=s),o>=0&&(u.height=o))}},n.loadTech_=function(e,t){var n=this;this.tech_&&this.unloadTech_();var r=mr(e),i=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==r&&this.tag&&(oi.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;var a={source:t,autoplay:"string"!=typeof this.autoplay()&&this.autoplay(),nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+i+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset,Promise:this.options_.Promise};si.names.forEach((function(e){var t=si[e];a[t.getterName]=n[t.privateName]})),Tt(a,this.options_[r]),Tt(a,this.options_[i]),Tt(a,this.options_[e.toLowerCase()]),this.tag&&(a.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(a.startTime=this.cache_.currentTime);var s,o,u=oi.getTech(e);if(!u)throw new Error("No Tech named '"+r+"' exists! '"+r+"' should be registered using videojs.registerTech()'");this.tech_=new u(a),this.tech_.ready(Jn(this,this.handleTechReady_),!0),s=this.textTracksJson_||[],o=this.tech_,s.forEach((function(e){var t=o.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((function(e){return t.addCue(e)}))})),o.textTracks(),as.forEach((function(e){n.on(n.tech_,e,(function(t){return n["handleTech"+mr(e)+"_"](t)}))})),Object.keys(ss).forEach((function(e){n.on(n.tech_,e,(function(t){0===n.tech_.playbackRate()&&n.tech_.seeking()?n.queuedCallbacks_.push({callback:n["handleTech"+ss[e]+"_"].bind(n),event:t}):n["handleTech"+ss[e]+"_"](t)}))})),this.on(this.tech_,"loadstart",(function(e){return n.handleTechLoadStart_(e)})),this.on(this.tech_,"sourceset",(function(e){return n.handleTechSourceset_(e)})),this.on(this.tech_,"waiting",(function(e){return n.handleTechWaiting_(e)})),this.on(this.tech_,"ended",(function(e){return n.handleTechEnded_(e)})),this.on(this.tech_,"seeking",(function(e){return n.handleTechSeeking_(e)})),this.on(this.tech_,"play",(function(e){return n.handleTechPlay_(e)})),this.on(this.tech_,"firstplay",(function(e){return n.handleTechFirstPlay_(e)})),this.on(this.tech_,"pause",(function(e){return n.handleTechPause_(e)})),this.on(this.tech_,"durationchange",(function(e){return n.handleTechDurationChange_(e)})),this.on(this.tech_,"fullscreenchange",(function(e,t){return n.handleTechFullscreenChange_(e,t)})),this.on(this.tech_,"fullscreenerror",(function(e,t){return n.handleTechFullscreenError_(e,t)})),this.on(this.tech_,"enterpictureinpicture",(function(e){return n.handleTechEnterPictureInPicture_(e)})),this.on(this.tech_,"leavepictureinpicture",(function(e){return n.handleTechLeavePictureInPicture_(e)})),this.on(this.tech_,"error",(function(e){return n.handleTechError_(e)})),this.on(this.tech_,"posterchange",(function(e){return n.handleTechPosterChange_(e)})),this.on(this.tech_,"textdata",(function(e){return n.handleTechTextData_(e)})),this.on(this.tech_,"ratechange",(function(e){return n.handleTechRateChange_(e)})),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===r&&this.tag||rn(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},n.unloadTech_=function(){var e,t,n,r=this;si.names.forEach((function(e){var t=si[e];r[t.privateName]=r[t.getterName]()})),this.textTracksJson_=(e=this.tech_,t=e.$$("track"),n=Array.prototype.map.call(t,(function(e){return e.track})),Array.prototype.map.call(t,(function(e){var t=Or(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===n.indexOf(e)})).map(Or))),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},n.tech=function(e){return void 0===e&>.warn("Using the tech directly can be dangerous. I hope you know what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_},n.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mouseup",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)},n.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"mouseup",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)},n.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},n.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(this.autoplay())},n.manualAutoplay_=function(e){var t=this;if(this.tech_&&"string"==typeof e){var n,r=function(){var e=t.muted();t.muted(!0);var n=function(){t.muted(e)};t.playTerminatedQueue_.push(n);var r=t.play();if(Ir(r))return r.catch(n)};if("any"===e&&!0!==this.muted()?Ir(n=this.play())&&(n=n.catch(r)):n="muted"===e&&!0!==this.muted()?r():this.play(),Ir(n))return n.then((function(){t.trigger({type:"autoplay-success",autoplay:e})})).catch((function(n){t.trigger({type:"autoplay-failure",autoplay:e})}))}},n.updateSourceCaches_=function(e){void 0===e&&(e="");var t=e,n="";"string"!=typeof t&&(t=e.src,n=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!n&&(n=function(e,t){if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;var n=e.cache_.sources.filter((function(e){return e.src===t}));if(n.length)return n[0].type;for(var r=e.$$("source"),i=0;i<r.length;i++){var a=r[i];if(a.type&&a.src&&a.src===t)return a.type}return _i(t)}(this,t)),this.cache_.source=gr({},e,{src:t,type:n});for(var r=this.cache_.sources.filter((function(e){return e.src&&e.src===t})),i=[],a=this.$$("source"),s=[],o=0;o<a.length;o++){var u=cn(a[o]);i.push(u),u.src&&u.src===t&&s.push(u.src)}s.length&&!r.length?this.cache_.sources=i:r.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t},n.handleTechSourceset_=function(e){var t=this;if(!this.changingSrc_){var n=function(e){return t.updateSourceCaches_(e)},r=this.currentSource().src,i=e.src;r&&!/^blob:/.test(r)&&/^blob:/.test(i)&&(!this.lastSource_||this.lastSource_.tech!==i&&this.lastSource_.player!==r)&&(n=function(){}),n(i),e.src||this.tech_.any(["sourceset","loadstart"],(function(e){if("sourceset"!==e.type){var n=t.techGet("currentSrc");t.lastSource_.tech=n,t.updateSourceCaches_(n)}}))}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})},n.hasStarted=function(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},n.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},n.handleTechRateChange_=function(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((function(e){return e.callback(e.event)})),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},n.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting");var t=this.currentTime();this.on("timeupdate",(function n(){t!==e.currentTime()&&(e.removeClass("vjs-waiting"),e.off("timeupdate",n))}))},n.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},n.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},n.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},n.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},n.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked")},n.handleTechFirstPlay_=function(){this.options_.starttime&&(gt.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},n.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},n.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},n.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},n.handleTechClick_=function(e){kn(e)&&this.controls_&&(this.paused()?Ar(this.play()):this.pause())},n.handleTechDoubleClick_=function(e){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),(function(t){return t.contains(e.target)}))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},n.handleTechTap_=function(){this.userActive(!this.userActive())},n.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},n.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},n.handleTechTouchEnd_=function(e){e.cancelable&&e.preventDefault()},n.handleStageClick_=function(){this.reportUserActivity()},n.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},n.documentFullscreenChange_=function(e){var t=e.target.player;if(!t||t===this){var n=this.el(),r=s()[this.fsApi_.fullscreenElement]===n;!r&&n.matches?r=n.matches(":"+this.fsApi_.fullscreen):!r&&n.msMatchesSelector&&(r=n.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(r)}},n.handleTechFullscreenChange_=function(e,t){t&&(t.nativeIOSFullscreen&&this.toggleClass("vjs-ios-native-fs"),this.isFullscreen(t.isFullscreen))},n.handleTechFullscreenError_=function(e,t){this.trigger("fullscreenerror",t)},n.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},n.handleTechEnterPictureInPicture_=function(e){this.isInPictureInPicture(!0)},n.handleTechLeavePictureInPicture_=function(e){this.isInPictureInPicture(!1)},n.handleTechError_=function(){var e=this.tech_.error();this.error(e)},n.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},n.getCache=function(){return this.cache_},n.resetCache_=function(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],volume:1}},n.techCall_=function(e,t){this.ready((function(){if(e in pi)return function(e,t,n,r){return t[n](e.reduce(gi(n),r))}(this.middleware_,this.tech_,e,t);if(e in mi)return hi(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw gt(e),e}}),!0)},n.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in fi)return function(e,t,n){return e.reduceRight(gi(n),t[n]())}(this.middleware_,this.tech_,e);if(e in mi)return hi(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw gt("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw gt("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw gt(t),t}}},n.play=function(){var e=this,t=this.options_.Promise||i().Promise;return t?new t((function(t){e.play_(t)})):this.play_()},n.play_=function(e){var t=this;void 0===e&&(e=Ar),this.playCallbacks_.push(e);var n=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc()));if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!n)return this.waitToPlay_=function(e){t.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(n||!Xt&&!Gt||this.load());var r=this.techGet_("play");null===r?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(r)},n.runPlayTerminatedQueue_=function(){var e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))},n.runPlayCallbacks_=function(e){var t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))},n.pause=function(){this.techCall_("pause")},n.paused=function(){return!1!==this.techGet_("paused")},n.played=function(){return this.techGet_("played")||kr(0,0)},n.scrubbing=function(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},n.currentTime=function(e){return void 0!==e?(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",e),void(this.cache_.initTime=0)):(this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),void this.one("canplay",this.boundApplyInitTime_))):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},n.applyInitTime_=function(){this.currentTime(this.cache_.initTime)},n.duration=function(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))},n.remainingTime=function(){return this.duration()-this.currentTime()},n.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},n.buffered=function(){var e=this.techGet_("buffered");return e&&e.length||(e=kr(0,0)),e},n.bufferedPercent=function(){return Er(this.buffered(),this.duration())},n.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),n=e.end(e.length-1);return n>t&&(n=t),n},n.volume=function(e){var t;return void 0!==e?(t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall_("setVolume",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)},n.muted=function(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)},n.defaultMuted=function(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},n.lastVolume_=function(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e},n.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},n.isFullscreen=function(e){if(void 0!==e){var t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()}return this.isFullscreen_},n.requestFullscreen=function(e){var t=this.options_.Promise||i().Promise;if(t){var n=this;return new t((function(t,r){function i(){n.off("fullscreenerror",s),n.off("fullscreenchange",a)}function a(){i(),t()}function s(e,t){i(),r(t)}n.one("fullscreenchange",a),n.one("fullscreenerror",s);var o=n.requestFullscreenHelper_(e);if(o)return o.then(i,i),o}))}return this.requestFullscreenHelper_()},n.requestFullscreenHelper_=function(e){var t,n=this;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){var r=this.el_[this.fsApi_.requestFullscreen](t);return r&&r.then((function(){return n.isFullscreen(!0)}),(function(){return n.isFullscreen(!1)})),r}this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):this.enterFullWindow()},n.exitFullscreen=function(){var e=this.options_.Promise||i().Promise;if(e){var t=this;return new e((function(e,n){function r(){t.off("fullscreenerror",a),t.off("fullscreenchange",i)}function i(){r(),e()}function a(e,t){r(),n(t)}t.one("fullscreenchange",i),t.one("fullscreenerror",a);var s=t.exitFullscreenHelper_();if(s)return s.then(r,r),s}))}return this.exitFullscreenHelper_()},n.exitFullscreenHelper_=function(){var e=this;if(this.fsApi_.requestFullscreen){var t=s()[this.fsApi_.exitFullscreen]();return t&&t.then((function(){return e.isFullscreen(!1)})),t}this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):this.exitFullWindow()},n.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=s().documentElement.style.overflow,zn(s(),"keydown",this.boundFullWindowOnEscKey_),s().documentElement.style.overflow="hidden",sn(s().body,"vjs-full-window"),this.trigger("enterFullWindow")},n.fullWindowOnEscKey=function(e){f().isEventKey(e,"Esc")&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())},n.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,Gn(s(),"keydown",this.boundFullWindowOnEscKey_),s().documentElement.style.overflow=this.docOrigOverflow,on(s().body,"vjs-full-window"),this.trigger("exitFullWindow")},n.disablePictureInPicture=function(e){if(void 0===e)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")},n.isInPictureInPicture=function(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},n.requestPictureInPicture=function(){if("pictureInPictureEnabled"in s()&&!1===this.disablePictureInPicture())return this.techGet_("requestPictureInPicture")},n.exitPictureInPicture=function(){if("pictureInPictureEnabled"in s())return s().exitPictureInPicture()},n.handleKeyDown=function(e){var t,n,r=this.options_.userActions;r&&r.hotkeys&&(t=this.el_.ownerDocument.activeElement,n=t.tagName.toLowerCase(),t.isContentEditable||("input"===n?-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(t.type):-1!==["textarea"].indexOf(n))||("function"==typeof r.hotkeys?r.hotkeys.call(this,e):this.handleHotkeys(e)))},n.handleHotkeys=function(e){var t=this.options_.userActions?this.options_.userActions.hotkeys:{},n=t.fullscreenKey,r=void 0===n?function(e){return f().isEventKey(e,"f")}:n,i=t.muteKey,a=void 0===i?function(e){return f().isEventKey(e,"m")}:i,o=t.playPauseKey,u=void 0===o?function(e){return f().isEventKey(e,"k")||f().isEventKey(e,"Space")}:o;if(r.call(this,e)){e.preventDefault(),e.stopPropagation();var l=Tr.getComponent("FullscreenToggle");!1!==s()[this.fsApi_.fullscreenEnabled]&&l.prototype.handleClick.call(this,e)}else a.call(this,e)?(e.preventDefault(),e.stopPropagation(),Tr.getComponent("MuteToggle").prototype.handleClick.call(this,e)):u.call(this,e)&&(e.preventDefault(),e.stopPropagation(),Tr.getComponent("PlayToggle").prototype.handleClick.call(this,e))},n.canPlayType=function(e){for(var t,n=0,r=this.options_.techOrder;n<r.length;n++){var i=r[n],a=oi.getTech(i);if(a||(a=Tr.getComponent(i)),a){if(a.isSupported()&&(t=a.canPlayType(e)))return t}else gt.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.')}return""},n.selectSource=function(e){var t,n,r=this,i=this.options_.techOrder.map((function(e){return[e,oi.getTech(e)]})).filter((function(e){var t=e[0],n=e[1];return n?n.isSupported():(gt.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),a=function(e,t,n){var r;return e.some((function(e){return t.some((function(t){if(r=n(e,t))return!0}))})),r},s=function(e,t){var n=e[0];if(e[1].canPlaySource(t,r.options_[n.toLowerCase()]))return{source:t,tech:n}};return t=this.options_.sourceOrder?a(e,i,(n=s,function(e,t){return n(t,e)})):a(i,e,s),t||!1},n.handleSrc_=function(e,t){var n=this;if(void 0===e)return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();var r=bi(e);if(r.length){if(this.changingSrc_=!0,t||(this.cache_.sources=r),this.updateSourceCaches_(r[0]),di(this,r[0],(function(e,i){var a,s;if(n.middleware_=i,t||(n.cache_.sources=r),n.updateSourceCaches_(e),n.src_(e))return r.length>1?n.handleSrc_(r.slice(1)):(n.changingSrc_=!1,n.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0),void n.triggerReady());a=i,s=n.tech_,a.forEach((function(e){return e.setTech&&e.setTech(s)}))})),this.options_.retryOnError&&r.length>1){var i=function(){n.error(null),n.handleSrc_(r.slice(1),!0)},a=function(){n.off("error",i)};this.one("error",i),this.one("playing",a),this.resetRetryOnError_=function(){n.off("error",i),n.off("playing",a)}}}else this.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0)},n.src=function(e){return this.handleSrc_(e,!1)},n.src_=function(e){var t,n,r=this,i=this.selectSource([e]);return!i||(t=i.tech,n=this.techName_,mr(t)!==mr(n)?(this.changingSrc_=!0,this.loadTech_(i.tech,i.source),this.tech_.ready((function(){r.changingSrc_=!1})),!1):(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1}),!0),!1))},n.load=function(){this.techCall_("load")},n.reset=function(){var e=this,t=this.options_.Promise||i().Promise;this.paused()||!t?this.doReset_():Ar(this.play().then((function(){return e.doReset_()})))},n.doReset_=function(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),rr(this)&&this.trigger("playerreset")},n.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},n.resetProgressBar_=function(){this.currentTime(0);var e=this.controlBar,t=e.durationDisplay,n=e.remainingTimeDisplay;t&&t.updateContent(),n&&n.updateContent()},n.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},n.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange")},n.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},n.currentSource=function(){return this.cache_.source||{}},n.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},n.currentType=function(){return this.currentSource()&&this.currentSource().type||""},n.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},n.autoplay=function(e){if(void 0===e)return this.options_.autoplay||!1;var t;"string"==typeof e&&/(any|play|muted)/.test(e)?(this.options_.autoplay=e,this.manualAutoplay_(e),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)},n.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},n.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},n.poster=function(e){if(void 0===e)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))},n.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},n.controls=function(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},n.usingNativeControls=function(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},n.error=function(e){if(void 0===e)return this.error_||null;if(this.options_.suppressNotSupportedError&&e&&4===e.code){var t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],t),void this.one("loadstart",(function(){this.off(["click","touchstart"],t)}))}if(null===e)return this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Cr(e),this.addClass("vjs-error"),gt.error("(CODE:"+this.error_.code+" "+Cr.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error")},n.reportUserActivity=function(e){this.userActivity_=!0},n.userActive=function(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},n.listenForUserActivity_=function(){var e,t,n,r=Jn(this,this.reportUserActivity),i=function(t){r(),this.clearInterval(e)};this.on("mousedown",(function(){r(),this.clearInterval(e),e=this.setInterval(r,250)})),this.on("mousemove",(function(e){e.screenX===t&&e.screenY===n||(t=e.screenX,n=e.screenY,r())})),this.on("mouseup",i),this.on("mouseleave",i);var a,s=this.getChild("controlBar");!s||Gt||Dt||(s.on("mouseenter",(function(e){this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout,this.player().options_.inactivityTimeout=0})),s.on("mouseleave",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on("keydown",r),this.on("keyup",r),this.setInterval((function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);var e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}}),250)},n.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},n.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},n.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},n.addTextTrack=function(e,t,n){if(this.tech_)return this.tech_.addTextTrack(e,t,n)},n.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},n.removeRemoteTextTrack=function(e){void 0===e&&(e={});var t=e.track;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)},n.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},n.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},n.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},n.language=function(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),rr(this)&&this.trigger("languagechange"))},n.languages=function(){return gr(t.prototype.options_.languages,this.languages_)},n.toJSON=function(){var e=gr(this.options_),t=e.tracks;e.tracks=[];for(var n=0;n<t.length;n++){var r=t[n];(r=gr(r)).player=void 0,e.tracks[n]=r}return e},n.createModal=function(e,t){var n=this;(t=t||{}).content=e||"";var r=new Lr(this,t);return this.addChild(r),r.on("dispose",(function(){n.removeChild(r)})),r.open(),r},n.updateCurrentBreakpoint_=function(){if(this.responsive())for(var e=this.currentBreakpoint(),t=this.currentWidth(),n=0;n<os.length;n++){var r=os[n];if(t<=this.breakpoints_[r]){if(e===r)return;e&&this.removeClass(us[e]),this.addClass(us[r]),this.breakpoint_=r;break}}},n.removeCurrentBreakpoint_=function(){var e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)},n.breakpoints=function(e){return void 0===e||(this.breakpoint_="",this.breakpoints_=Tt({},ls,e),this.updateCurrentBreakpoint_()),Tt(this.breakpoints_)},n.responsive=function(e){return void 0===e?this.responsive_:(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0},n.currentBreakpoint=function(){return this.breakpoint_},n.currentBreakpointClass=function(){return us[this.breakpoint_]||""},n.loadMedia=function(e,t){var n=this;if(e&&"object"==typeof e){this.reset(),this.cache_.media=gr(e);var r=this.cache_.media,i=r.artwork,a=r.poster,s=r.src,o=r.textTracks;!i&&a&&(this.cache_.media.artwork=[{src:a,type:_i(a)}]),s&&this.src(s),a&&this.poster(a),Array.isArray(o)&&o.forEach((function(e){return n.addRemoteTextTrack(e,!1)})),this.ready(t)}},n.getMedia=function(){if(!this.cache_.media){var e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(function(e){return{kind:e.kind,label:e.label,language:e.language,src:e.src}}))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:_i(t.poster)}]),t}return gr(this.cache_.media)},t.getTagSettings=function(e){var t={sources:[],tracks:[]},n=cn(e),r=n["data-setup"];if(an(e,"vjs-fill")&&(n.fill=!0),an(e,"vjs-fluid")&&(n.fluid=!0),null!==r){var i=d()(r||"{}"),a=i[0],s=i[1];a&>.error(a),Tt(n,s)}if(Tt(t,n),e.hasChildNodes())for(var o=e.childNodes,u=0,l=o.length;u<l;u++){var c=o[u],h=c.nodeName.toLowerCase();"source"===h?t.sources.push(cn(c)):"track"===h&&t.tracks.push(cn(c))}return t},n.flexNotSupported_=function(){var e=s().createElement("i");return!("flexBasis"in e.style||"webkitFlexBasis"in e.style||"mozFlexBasis"in e.style||"msFlexBasis"in e.style||"msFlexOrder"in e.style)},n.debug=function(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)},t}(Tr);si.names.forEach((function(e){var t=si[e];cs.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),cs.prototype.crossorigin=cs.prototype.crossOrigin,cs.players={};var ds=i().navigator;cs.prototype.options_={techOrder:oi.defaultTechOrder_,html5:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:ds&&(ds.languages&&ds.languages[0]||ds.userLanguage||ds.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1},["ended","seeking","seekable","networkState","readyState"].forEach((function(e){cs.prototype[e]=function(){return this.techGet_(e)}})),as.forEach((function(e){cs.prototype["handleTech"+mr(e)+"_"]=function(){return this.trigger(e)}})),Tr.registerComponent("Player",cs);var hs="plugin",fs="activePlugins_",ps={},ms=function(e){return ps.hasOwnProperty(e)},gs=function(e){return ms(e)?ps[e]:void 0},vs=function(e,t){e[fs]=e[fs]||{},e[fs][t]=!0},ys=function(e,t,n){var r=(n?"before":"")+"pluginsetup";e.trigger(r,t),e.trigger(r+":"+t.name,t)},_s=function(e,t){return t.prototype.name=e,function(){ys(this,{name:e,plugin:t,instance:null},!0);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var a=function(e,t,n){if(_())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&(0,y.Z)(i,n.prototype),i}(t,[this].concat(r));return this[e]=function(){return a},ys(this,a.getEventHash()),a}},bs=function(){function e(t){if(this.constructor===e)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=t,this.log||(this.log=this.player.log.createLogger(this.name)),dr(this),delete this.trigger,fr(this,this.constructor.defaultState),vs(t,this.name),this.dispose=this.dispose.bind(this),t.on("dispose",this.dispose)}var t=e.prototype;return t.version=function(){return this.constructor.VERSION},t.getEventHash=function(e){return void 0===e&&(e={}),e.name=this.name,e.plugin=this.constructor,e.instance=this,e},t.trigger=function(e,t){return void 0===t&&(t={}),Xn(this.eventBusEl_,e,this.getEventHash(t))},t.handleStateChanged=function(e){},t.dispose=function(){var e=this.name,t=this.player;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t[fs][e]=!1,this.player=this.state=null,t[e]=_s(e,ps[e])},e.isBasic=function(t){var n="string"==typeof t?gs(t):t;return"function"==typeof n&&!e.prototype.isPrototypeOf(n.prototype)},e.registerPlugin=function(t,n){if("string"!=typeof t)throw new Error('Illegal plugin name, "'+t+'", must be a string, was '+typeof t+".");if(ms(t))gt.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(cs.prototype.hasOwnProperty(t))throw new Error('Illegal plugin name, "'+t+'", cannot share a name with an existing player method!');if("function"!=typeof n)throw new Error('Illegal plugin for "'+t+'", must be a function, was '+typeof n+".");return ps[t]=n,t!==hs&&(e.isBasic(n)?cs.prototype[t]=function(e,t){var n=function(){ys(this,{name:e,plugin:t,instance:null},!0);var n=t.apply(this,arguments);return vs(this,e),ys(this,{name:e,plugin:t,instance:n}),n};return Object.keys(t).forEach((function(e){n[e]=t[e]})),n}(t,n):cs.prototype[t]=_s(t,n)),n},e.deregisterPlugin=function(e){if(e===hs)throw new Error("Cannot de-register base plugin.");ms(e)&&(delete ps[e],delete cs.prototype[e])},e.getPlugins=function(e){var t;return void 0===e&&(e=Object.keys(ps)),e.forEach((function(e){var n=gs(e);n&&((t=t||{})[e]=n)})),t},e.getPluginVersion=function(e){var t=gs(e);return t&&t.VERSION||""},e}();bs.getPlugin=gs,bs.BASE_PLUGIN_NAME=hs,bs.registerPlugin(hs,bs),cs.prototype.usingPlugin=function(e){return!!this[fs]&&!0===this[fs][e]},cs.prototype.hasPlugin=function(e){return!!ms(e)};var Ts=function(e){return 0===e.indexOf("#")?e.slice(1):e};function Ss(e,t,n){var r=Ss.getPlayer(e);if(r)return t&>.warn('Player "'+e+'" is already initialised. Options will not be applied.'),n&&r.ready(n),r;var i="string"==typeof e?Cn("#"+Ts(e)):e;if(!Qt(i))throw new TypeError("The element or ID supplied is not valid. (videojs)");i.ownerDocument.defaultView&&i.ownerDocument.body.contains(i)||gt.warn("The element supplied is not included in the DOM"),t=t||{},Ss.hooks("beforesetup").forEach((function(e){var n=e(i,gr(t));St(n)&&!Array.isArray(n)?t=gr(t,n):gt.error("please return an object in beforesetup hooks")}));var a=Tr.getComponent("Player");return r=new a(i,t,n),Ss.hooks("setup").forEach((function(e){return e(r)})),r}if(Ss.hooks_={},Ss.hooks=function(e,t){return Ss.hooks_[e]=Ss.hooks_[e]||[],t&&(Ss.hooks_[e]=Ss.hooks_[e].concat(t)),Ss.hooks_[e]},Ss.hook=function(e,t){Ss.hooks(e,t)},Ss.hookOnce=function(e,t){Ss.hooks(e,[].concat(t).map((function(t){return function n(){return Ss.removeHook(e,n),t.apply(void 0,arguments)}})))},Ss.removeHook=function(e,t){var n=Ss.hooks(e).indexOf(t);return!(n<=-1||(Ss.hooks_[e]=Ss.hooks_[e].slice(),Ss.hooks_[e].splice(n,1),0))},!0!==i().VIDEOJS_NO_DYNAMIC_STYLE&&Yt()){var ws=Cn(".vjs-styles-defaults");if(!ws){ws=Rn("vjs-styles-defaults");var ks=Cn("head");ks&&ks.insertBefore(ws,ks.firstChild),Mn(ws,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}Pn(1,Ss),Ss.VERSION=lt,Ss.options=cs.prototype.options_,Ss.getPlayers=function(){return cs.players},Ss.getPlayer=function(e){var t,n=cs.players;if("string"==typeof e){var r=Ts(e),i=n[r];if(i)return i;t=Cn("#"+r)}else t=e;if(Qt(t)){var a=t,s=a.player,o=a.playerId;if(s||n[o])return s||n[o]}},Ss.getAllPlayers=function(){return Object.keys(cs.players).map((function(e){return cs.players[e]})).filter(Boolean)},Ss.players=cs.players,Ss.getComponent=Tr.getComponent,Ss.registerComponent=function(e,t){oi.isTech(t)&>.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),Tr.registerComponent.call(Tr,e,t)},Ss.getTech=oi.getTech,Ss.registerTech=oi.registerTech,Ss.use=function(e,t){ui[e]=ui[e]||[],ui[e].push(t)},Object.defineProperty(Ss,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(Ss.middleware,"TERMINATOR",{value:ci,writeable:!1,enumerable:!0}),Ss.browser=$t,Ss.TOUCH_ENABLED=qt,Ss.extend=function(e,t){void 0===t&&(t={});var n=function(){e.apply(this,arguments)},r={};for(var i in"object"==typeof t?(t.constructor!==Object.prototype.constructor&&(n=t.constructor),r=t):"function"==typeof t&&(n=t),function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,y.Z)(e,t)}(n,e),e&&(n.super_=e),r)r.hasOwnProperty(i)&&(n.prototype[i]=r[i]);return n},Ss.mergeOptions=gr,Ss.bind=Jn,Ss.registerPlugin=bs.registerPlugin,Ss.deregisterPlugin=bs.deregisterPlugin,Ss.plugin=function(e,t){return gt.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),bs.registerPlugin(e,t)},Ss.getPlugins=bs.getPlugins,Ss.getPlugin=bs.getPlugin,Ss.getPluginVersion=bs.getPluginVersion,Ss.addLanguage=function(e,t){var n;return e=(""+e).toLowerCase(),Ss.options.languages=gr(Ss.options.languages,((n={})[e]=t,n)),Ss.options.languages[e]},Ss.log=gt,Ss.createLogger=vt,Ss.createTimeRange=Ss.createTimeRanges=kr,Ss.formatTime=Ui,Ss.setFormatTime=function(e){Ni=e},Ss.resetFormatTime=function(){Ni=Mi},Ss.parseUrl=Xr,Ss.isCrossOrigin=Zr,Ss.EventTarget=tr,Ss.on=zn,Ss.one=$n,Ss.off=Gn,Ss.trigger=Xn,Ss.xhr=m(),Ss.TextTrack=ei,Ss.AudioTrack=ti,Ss.VideoTrack=ni,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((function(e){Ss[e]=function(){return gt.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead"),In[e].apply(null,arguments)}})),Ss.computedStyle=kt,Ss.dom=In,Ss.url=Yr,Ss.defineLazyProperty=rs,Ss.addLanguage("en",{"Non-Fullscreen":"Exit Fullscreen"});var Es=S,Cs=function(e,t,n){return e&&n&&n.responseURL&&t!==n.responseURL?n.responseURL:t},xs=function(e){return Ss.log.debug?Ss.log.debug.bind(Ss,"VHS:",e+" >"):function(){}},Is=Ss.log,As=function(e,t){return e+"-"+t},Os=function(e){var t=e.onwarn,n=e.oninfo,r=e.manifestString,i=e.customTagParsers,a=void 0===i?[]:i,s=e.customTagMappers,o=void 0===s?[]:s,u=e.experimentalLLHLS,l=new M;t&&l.on("warn",t),n&&l.on("info",n),a.forEach((function(e){return l.addParser(e)})),o.forEach((function(e){return l.addTagMapper(e)})),l.push(r),l.end();var c=l.manifest;if(u||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach((function(e){c.hasOwnProperty(e)&&delete c[e]})),c.segments&&c.segments.forEach((function(e){["parts","preloadHints"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!c.targetDuration){var d=10;c.segments&&c.segments.length&&(d=c.segments.reduce((function(e,t){return Math.max(e,t.duration)}),0)),t&&t("manifest has no targetDuration defaulting to "+d),c.targetDuration=d}return c},Ps=function(e,t){e.mediaGroups&&["AUDIO","SUBTITLES"].forEach((function(n){if(e.mediaGroups[n])for(var r in e.mediaGroups[n])for(var i in e.mediaGroups[n][r]){var a=e.mediaGroups[n][r][i];t(a,n,r,i)}}))},Ls=function(e){var t=e.playlist,n=e.uri,r=e.id;t.id=r,n&&(t.uri=n),t.attributes=t.attributes||{}},Ds=function(e,t){e.uri=t;for(var n=0;n<e.playlists.length;n++)if(!e.playlists[n].uri){var r="placeholder-uri-"+n;e.playlists[n].uri=r}Ps(e,(function(t,n,r,i){var a="placeholder-uri-"+n+"-"+r+"-"+i;t.playlists&&t.playlists.length||(t.playlists=[(0,o.Z)({},t)]),t.playlists.forEach((function(t,n){var r=As(n,a);t.uri?t.resolvedUri=t.resolvedUri||Es(e.uri,t.uri):(t.uri=0===n?a:r,t.resolvedUri=t.uri),t.id=t.id||r,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t}))})),function(e){for(var t=e.playlists.length;t--;){var n=e.playlists[t];Ls({playlist:n,id:As(t,n.uri)}),n.resolvedUri=Es(e.uri,n.uri),e.playlists[n.id]=n,e.playlists[n.uri]=n,n.attributes.BANDWIDTH||Is.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}}(e),function(e){Ps(e,(function(t){t.uri&&(t.resolvedUri=Es(e.uri,t.uri))}))}(e)},Rs=Ss.mergeOptions,Ms=Ss.EventTarget,Ns=function(e,t){if(!e)return t;var n=Rs(e,t);if(e.parts&&!t.parts)delete n.parts;else if(e.parts&&t.parts)for(var r=0;r<t.parts.length;r++)e.parts&&e.parts[r]&&(n.parts[r]=Rs(e.parts[r],t.parts[r]));return n},Us=function(e,t){!e.resolvedUri&&e.uri&&(e.resolvedUri=Es(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=Es(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=Es(t,e.map.uri)),e.parts&&e.parts.length&&e.parts.forEach((function(e){e.resolvedUri||(e.resolvedUri=Es(t,e.uri))})),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach((function(e){e.resolvedUri||(e.resolvedUri=Es(t,e.uri))}))},Fs=function(e){var t=e.segments||[];return e.preloadSegment&&e.preloadSegment.parts&&t.push(e.preloadSegment),t},Bs=function(e,t){return e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence},js=function(e,t,n){void 0===n&&(n=Bs);var r=Rs(e,{}),i=r.playlists[t.id];if(!i)return null;if(n(i,t))return null;var a=Rs(i,t);t.segments=Fs(t),i.segments&&(a.segments=function(e,t,n){var r=e.slice(),i=t.slice();n=n||0;for(var a=Math.min(e.length,t.length+n),s=n;s<a;s++){var o=s-n;i[o]=Ns(r[s],i[o])}return i}(i.segments,t.segments,t.mediaSequence-i.mediaSequence)),a.segments.forEach((function(e){Us(e,a.resolvedUri)}));for(var s=0;s<r.playlists.length;s++)r.playlists[s].id===t.id&&(r.playlists[s]=a);return r.playlists[t.id]=a,r.playlists[t.uri]=a,Ps(e,(function(e,n,r,i){if(e.playlists)for(var a=0;a<e.playlists.length;a++)t.id===e.playlists[a].id&&(e.playlists[a]=t)})),r},Hs=function(e,t){var n=e.segments[e.segments.length-1],r=n&&n.parts&&n.parts[n.parts.length-1],i=r&&r.duration||n&&n.duration;return t&&i?1e3*i:500*(e.partTargetDuration||e.targetDuration||10)},Vs=function(e){function t(t,n,r){var i;if(void 0===r&&(r={}),i=e.call(this)||this,!t)throw new Error("A non-empty playlist URL or object is required");i.logger_=xs("PlaylistLoader");var a=r,s=a.withCredentials,o=void 0!==s&&s,u=a.handleManifestRedirects,l=void 0!==u&&u;i.src=t,i.vhs_=n,i.withCredentials=o,i.handleManifestRedirects=l;var c=n.options_;return i.customTagParsers=c&&c.customTagParsers||[],i.customTagMappers=c&&c.customTagMappers||[],i.experimentalLLHLS=c&&c.experimentalLLHLS||!1,i.state="HAVE_NOTHING",i.on("mediaupdatetimeout",(function(){"HAVE_METADATA"===i.state&&(i.state="HAVE_CURRENT_METADATA",i.request=i.vhs_.xhr({uri:Es(i.master.uri,i.media().uri),withCredentials:i.withCredentials},(function(e,t){if(i.request)return e?i.playlistRequestError(i.request,i.media(),"HAVE_METADATA"):void i.haveMetadata({playlistString:i.request.responseText,url:i.media().uri,id:i.media().id})})))})),i}(0,l.Z)(t,e);var n=t.prototype;return n.playlistRequestError=function(e,t,n){var r=t.uri,i=t.id;this.request=null,n&&(this.state=n),this.error={playlist:this.master.playlists[i],status:e.status,message:"HLS playlist request error at URL: "+r+".",responseText:e.responseText,code:e.status>=500?4:2},this.trigger("error")},n.haveMetadata=function(e){var t=this,n=e.playlistString,r=e.playlistObject,a=e.url,s=e.id;this.request=null,this.state="HAVE_METADATA";var o=r||Os({onwarn:function(e){var n=e.message;return t.logger_("m3u8-parser warn for "+s+": "+n)},oninfo:function(e){var n=e.message;return t.logger_("m3u8-parser info for "+s+": "+n)},manifestString:n,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,experimentalLLHLS:this.experimentalLLHLS});o.lastRequest=Date.now(),Ls({playlist:o,uri:a,id:s});var u=js(this.master,o);this.targetDuration=o.partTargetDuration||o.targetDuration,u?(this.master=u,this.media_=this.master.playlists[s]):this.trigger("playlistunchanged"),this.media().endList||(i().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=i().setTimeout((function(){t.trigger("mediaupdatetimeout")}),Hs(this.media(),!!u))),this.trigger("loadedplaylist")},n.dispose=function(){this.trigger("dispose"),this.stopRequest(),i().clearTimeout(this.mediaUpdateTimeout),i().clearTimeout(this.finalRenditionTimeout),this.off()},n.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},n.media=function(e,t){var n=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"==typeof e){if(!this.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.master.playlists[e]}if(i().clearTimeout(this.finalRenditionTimeout),t){var r=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=i().setTimeout(this.media.bind(this,e,!1),r)}else{var a=this.state,s=!this.media_||e.id!==this.media_.id,o=this.master.playlists[e.id];if(o&&o.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(s&&(this.trigger("mediachanging"),"HAVE_MASTER"===a?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(s){if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials},(function(t,r){if(n.request){if(e.lastRequest=Date.now(),e.resolvedUri=Cs(n.handleManifestRedirects,e.resolvedUri,r),t)return n.playlistRequestError(n.request,e,a);n.haveMetadata({playlistString:r.responseText,url:e.uri,id:e.id}),"HAVE_MASTER"===a?n.trigger("loadedmetadata"):n.trigger("mediachange")}}))}}},n.pause=function(){this.stopRequest(),i().clearTimeout(this.mediaUpdateTimeout),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")},n.load=function(e){var t=this;i().clearTimeout(this.mediaUpdateTimeout);var n=this.media();if(e){var r=n?(n.partTargetDuration||n.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=i().setTimeout((function(){return t.load()}),r)}else this.started?n&&!n.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()},n.start=function(){var e=this;if(this.started=!0,"object"==typeof this.src)return this.src.uri||(this.src.uri=i().location.href),this.src.resolvedUri=this.src.uri,void setTimeout((function(){e.setupInitialPlaylist(e.src)}),0);this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},(function(t,n){if(e.request){if(e.request=null,t)return e.error={status:n.status,message:"HLS playlist request error at URL: "+e.src+".",responseText:n.responseText,code:2},"HAVE_NOTHING"===e.state&&(e.started=!1),e.trigger("error");e.src=Cs(e.handleManifestRedirects,e.src,n);var r=Os({manifestString:n.responseText,customTagParsers:e.customTagParsers,customTagMappers:e.customTagMappers,experimentalLLHLS:e.experimentalLLHLS});e.setupInitialPlaylist(r)}}))},n.srcUri=function(){return"string"==typeof this.src?this.src:this.src.uri},n.setupInitialPlaylist=function(e){if(this.state="HAVE_MASTER",e.playlists)return this.master=e,Ds(this.master,this.srcUri()),e.playlists.forEach((function(e){e.segments=Fs(e),e.segments.forEach((function(t){Us(t,e.resolvedUri)}))})),this.trigger("loadedplaylist"),void(this.request||this.media(this.master.playlists[0]));var t=this.srcUri()||i().location.href;this.master=function(e,t){var n=As(0,t),r={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:i().location.href,resolvedUri:i().location.href,playlists:[{uri:t,id:n,resolvedUri:t,attributes:{}}]};return r.playlists[n]=r.playlists[0],r.playlists[t]=r.playlists[0],r}(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},t}(Ms),qs=1/30,Ws=.1,zs=function(e,t){var n,r=[];if(e&&e.length)for(n=0;n<e.length;n++)t(e.start(n),e.end(n))&&r.push([e.start(n),e.end(n)]);return Ss.createTimeRanges(r)},Gs=function(e,t){return zs(e,(function(e,n){return e-Ws<=t&&n+Ws>=t}))},Xs=function(e,t){return zs(e,(function(e){return e-qs>=t}))},$s=function(e){var t=[];if(!e||!e.length)return"";for(var n=0;n<e.length;n++)t.push(e.start(n)+" => "+e.end(n));return t.join(", ")},Ks=function(e){for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t},Zs=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},Ys=Ss.createTimeRange,Qs=function(e,t){if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;var n=t.segments&&t.segments.length&&t.segments[t.segments.length-1],r=n&&n.parts&&n.parts.length;return r&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:r&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},Js=function(e,t,n){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;var r=function(e,t){var n=0,r=t-e.mediaSequence,i=e.segments[r];if(i){if(void 0!==i.start)return{result:i.start,precise:!0};if(void 0!==i.end)return{result:i.end-i.duration,precise:!0}}for(;r--;){if(void 0!==(i=e.segments[r]).end)return{result:n+i.end,precise:!0};if(n+=i.duration,void 0!==i.start)return{result:n+i.start,precise:!0}}return{result:n,precise:!1}}(e,t);if(r.precise)return r.result;var i=function(e,t){for(var n,r=0,i=t-e.mediaSequence;i<e.segments.length;i++){if(void 0!==(n=e.segments[i]).start)return{result:n.start-r,precise:!0};if(r+=n.duration,void 0!==n.end)return{result:n.end-r,precise:!0}}return{result:-1,precise:!1}}(e,t);return i.precise?i.result:r.result+n},eo=function(e,t,n){if(!e)return 0;if("number"!=typeof n&&(n=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return i()[1/0]}return Js(e,t,n)},to=function(e,t,n){var r=0;if(t>n){var i=[n,t];t=i[0],n=i[1]}if(t<0){for(var a=t;a<Math.min(0,n);a++)r+=e.targetDuration;t=0}for(var s=t;s<n;s++)r+=e.segments[s].duration;return r},no=function(e,t,n,r){if(!e||!e.segments)return null;if(e.endList)return eo(e);if(null===t)return null;t=t||0;var i=Js(e,e.mediaSequence+e.segments.length,t);return n&&(i-=r="number"==typeof r?r:Qs(null,e)),Math.max(0,i)},ro=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},io=function(e){return e.excludeUntil&&e.excludeUntil===1/0},ao=function(e){var t=ro(e);return!e.disabled&&!t},so=function(e,t){return t.attributes&&t.attributes[e]},oo=function(e,t){if(1===e.playlists.length)return!0;var n=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((function(e){return!!ao(e)&&(e.attributes.BANDWIDTH||0)<n})).length},uo=function(e,t){return!(!e&&!t||!e&&t||e&&!t||e!==t&&(!e.id||!t.id||e.id!==t.id)&&(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)&&(!e.uri||!t.uri||e.uri!==t.uri))},lo=function(e,t){var n=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{},r=!1;for(var i in n){for(var a in n[i])if(r=t(n[i][a]))break;if(r)break}return!!r},co=function(e){if(!e||!e.playlists||!e.playlists.length)return lo(e,(function(e){return e.playlists&&e.playlists.length||e.uri}));for(var t=function(t){var n=e.playlists[t],r=n.attributes&&n.attributes.CODECS;return r&&r.split(",").every((function(e){return H(e)}))||lo(e,(function(e){return uo(n,e)}))?"continue":{v:!1}},n=0;n<e.playlists.length;n++){var r=t(n);if("continue"!==r&&"object"==typeof r)return r.v}return!0},ho={liveEdgeDelay:Qs,duration:eo,seekable:function(e,t,n){var r=t||0,i=no(e,t,!0,n);return null===i?Ys():Ys(r,i)},getMediaInfoForTime:function(e,t,n,r){var i=function(e){return(e.segments||[]).reduce((function(e,t,n){return t.parts?t.parts.forEach((function(t,r){e.push({duration:t.duration,segmentIndex:n,partIndex:r})})):e.push({duration:t.duration,segmentIndex:n,partIndex:null}),e}),[])}(e),a=t-r;if(a<0){if(n>0)for(var s=n-1;s>=0;s--){var o=i[s];if((a+=o.duration+qs)>0)return{mediaIndex:o.segmentIndex,startTime:r-to(e,n,o.segmentIndex),partIndex:o.partIndex}}return{mediaIndex:i[0]&&i[0].segmentIndex||0,partIndex:i[0]&&i[0].partIndex||null,startTime:t}}if(n<0){for(var u=n;u<0;u++)if((a-=e.targetDuration)<0)return{mediaIndex:i[0].segmentIndex,startTime:t};n=0}for(var l=n;l<i.length;l++){var c=i[l];if((a-=c.duration+qs)<0)return{mediaIndex:c.segmentIndex,startTime:r+to(e,n,c.segmentIndex),partIndex:c.partIndex}}return{mediaIndex:i[i.length-1].segmentIndex,partIndex:i[i.length-1].partIndex,startTime:t}},isEnabled:ao,isDisabled:function(e){return e.disabled},isBlacklisted:ro,isIncompatible:io,playlistEnd:no,isAes:function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:so,estimateSegmentRequestTime:function(e,t,n,r){return void 0===r&&(r=0),so("BANDWIDTH",n)?(e*n.attributes.BANDWIDTH-8*r)/t:NaN},isLowestEnabledRendition:oo,isAudioOnly:co,playlistMatch:uo},fo=Ss.xhr,po=Ss.mergeOptions,mo=function(e,t,n,r){var i="arraybuffer"===e.responseType?e.response:e.responseText;!t&&i&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=i.byteLength||i.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),n.headers&&(e.responseHeaders=n.headers),t&&"ETIMEDOUT"===t.code&&(e.timedout=!0),t||e.aborted||200===n.statusCode||206===n.statusCode||0===n.statusCode||(t=new Error("XHR Failed with a response of: "+(e&&(i||e.responseText)))),r(t,e)},go=function(){var e=function e(t,n){t=po({timeout:45e3},t);var r=e.beforeRequest||Ss.Vhs.xhr.beforeRequest;if(r&&"function"==typeof r){var i=r(t);i&&(t=i)}var a=(!0===Ss.Vhs.xhr.original?fo:Ss.Vhs.xhr)(t,(function(e,t){return mo(a,e,t,n)})),s=a.abort;return a.abort=function(){return a.aborted=!0,s.apply(a,arguments)},a.uri=t.uri,a.requestTime=Date.now(),a};return e.original=!0,e},vo=function(e){var t,n,r={};return e.byterange&&(r.Range=(n=(t=e.byterange).offset+t.length-1,"bytes="+t.offset+"-"+n)),r},yo=function(e,t){return e.start(t)+"-"+e.end(t)},_o=function(e,t){var n=e.toString(16);return"00".substring(0,2-n.length)+n+(t%2?" ":"")},bo=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},To=function(e){var t={};return Object.keys(e).forEach((function(n){var r=e[n];ArrayBuffer.isView(r)?t[n]={bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}:t[n]=r})),t},So=function(e){var t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},wo=function(e){return e.resolvedUri},ko=function(e){for(var t=Array.prototype.slice.call(e),n=16,r="",i=0;i<t.length/n;i++)r+=t.slice(i*n,i*n+n).map(_o).join("")+" "+t.slice(i*n,i*n+n).map(bo).join("")+"\n";return r},Eo=Object.freeze({__proto__:null,createTransferableMessage:To,initSegmentId:So,segmentKeyId:wo,hexDump:ko,tagDump:function(e){var t=e.bytes;return ko(t)},textRanges:function(e){var t,n="";for(t=0;t<e.length;t++)n+=yo(e,t)+" ";return n}}),Co=function e(t){var n=t.programTime,r=t.playlist,i=t.retryCount,a=void 0===i?2:i,s=t.seekTo,o=t.pauseAfterSeek,u=void 0===o||o,l=t.tech,c=t.callback;if(!c)throw new Error("seekToProgramTime: callback must be provided");if(void 0===n||!r||!s)return c({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!r.endList&&!l.hasStarted_)return c({message:"player must be playing a live stream to start buffering"});if(!function(e){if(!e.segments||0===e.segments.length)return!1;for(var t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0}(r))return c({message:"programDateTime tags must be provided in the manifest "+r.resolvedUri});var d=function(e,t){var n;try{n=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;var r=t.segments[0];if(n<r.dateTimeObject)return null;for(var i=0;i<t.segments.length-1&&(r=t.segments[i],!(n<t.segments[i+1].dateTimeObject));i++);var a,s=t.segments[t.segments.length-1],o=s.dateTimeObject,u=s.videoTimingInfo?(a=s.videoTimingInfo).transmuxedPresentationEnd-a.transmuxedPresentationStart-a.transmuxerPrependedSeconds:s.duration+.25*s.duration;return n>new Date(o.getTime()+1e3*u)?null:(n>o&&(r=s),{segment:r,estimatedStart:r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationStart:ho.duration(t,t.mediaSequence+t.segments.indexOf(r)),type:r.videoTimingInfo?"accurate":"estimate"})}(n,r);if(!d)return c({message:n+" was not found in the stream"});var h=d.segment,f=function(e,t){var n,r;try{n=new Date(e),r=new Date(t)}catch(e){}var i=n.getTime();return(r.getTime()-i)/1e3}(h.dateTimeObject,n);if("estimate"===d.type)return 0===a?c({message:n+" is not buffered yet. Try again"}):(s(d.estimatedStart+f),void l.one("seeked",(function(){e({programTime:n,playlist:r,retryCount:a-1,seekTo:s,pauseAfterSeek:u,tech:l,callback:c})})));var p=h.start+f;l.one("seeked",(function(){return c(null,l.currentTime())})),u&&l.pause(),s(p)},xo=function(e,t){if(4===e.readyState)return t()},Io=Ss.EventTarget,Ao=Ss.mergeOptions,Oo=function(e,t){if(!Bs(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(var n=0;n<e.segments.length;n++){var r=e.segments[n],i=t.segments[n];if(r.uri!==i.uri)return!1;if(r.byterange||i.byterange){var a=r.byterange,s=i.byterange;if(a&&!s||!a&&s)return!1;if(a.offset!==s.offset||a.length!==s.length)return!1}}return!0},Po=function(e,t){return(Boolean(!e.map&&!t.map)||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length))&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length},Lo=function(e,t){var n={};for(var r in e){var i=e[r].sidx;if(i){var a=se(i);if(!t[a])break;var s=t[a].sidxInfo;Po(s,i)&&(n[a]=t[a])}}return n},Do=function(e){function t(t,n,r,i){var a;void 0===r&&(r={}),(a=e.call(this)||this).masterPlaylistLoader_=i||(0,u.Z)(a),i||(a.isMaster_=!0);var s=r,o=s.withCredentials,l=void 0!==o&&o,c=s.handleManifestRedirects,d=void 0!==c&&c;if(a.vhs_=n,a.withCredentials=l,a.handleManifestRedirects=d,!t)throw new Error("A non-empty playlist URL or object is required");return a.on("minimumUpdatePeriod",(function(){a.refreshXml_()})),a.on("mediaupdatetimeout",(function(){a.refreshMedia_(a.media().id)})),a.state="HAVE_NOTHING",a.loadedPlaylists_={},a.logger_=xs("DashPlaylistLoader"),a.isMaster_?(a.masterPlaylistLoader_.srcUrl=t,a.masterPlaylistLoader_.sidxMapping_={}):a.childPlaylist_=t,a}(0,l.Z)(t,e);var n=t.prototype;return n.requestErrored_=function(e,t,n){return!this.request||(this.request=null,e?(this.error="object"!=typeof e||e instanceof Error?{status:t.status,message:"DASH request error at URL: "+t.uri,response:t.response,code:2}:e,n&&(this.state=n),this.trigger("error"),!0):void 0)},n.addSidxSegments_=function(e,t,n){var r=this,a=e.sidx&&se(e.sidx);if(e.sidx&&a&&!this.masterPlaylistLoader_.sidxMapping_[a]){var s=Cs(this.handleManifestRedirects,e.sidx.resolvedUri),o=function(i,s){if(!r.requestErrored_(i,s,t)){var o,u=r.masterPlaylistLoader_.sidxMapping_;try{o=De()(Re(s.response).subarray(8))}catch(e){return void r.requestErrored_(e,s,t)}return u[a]={sidxInfo:e.sidx,sidx:o},ae(e,o,e.sidx.resolvedUri),n(!0)}};this.request=function(e,t,n){var r,i=[],a=!1,s=function(e,t,r,i){return t.abort(),a=!0,n(e,t,r,i)},o=function(e,t){if(!a){if(e)return s(e,t,"",i);var n=t.responseText.substring(i&&i.byteLength||0,t.responseText.length);if(i=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t=t.filter((function(e){return e&&(e.byteLength||e.length)&&"string"!=typeof e})),t.length<=1)return Re(t[0]);var r=t.reduce((function(e,t,n){return e+(t.byteLength||t.length)}),0),i=new Uint8Array(r),a=0;return t.forEach((function(e){e=Re(e),i.set(e,a),a+=e.byteLength})),i}(i,Fe(n,!0)),r=r||He(i),i.length<10||r&&i.length<r+2)return xo(t,(function(){return s(e,t,"",i)}));var o=ot(i);return"ts"===o&&i.length<188||!o&&i.length<376?xo(t,(function(){return s(e,t,"",i)})):s(null,t,o,i)}},u={uri:e,beforeSend:function(e){e.overrideMimeType("text/plain; charset=x-user-defined"),e.addEventListener("progress",(function(t){return t.total,t.loaded,mo(e,null,{statusCode:e.status},o)}))}},l=t(u,(function(e,t){return mo(l,e,t,o)}));return l}(s,this.vhs_.xhr,(function(t,n,i,a){if(t)return o(t,n);if(!i||"mp4"!==i)return o({status:n.status,message:"Unsupported "+(i||"unknown")+" container type for sidx segment at URL: "+s,response:"",playlist:e,internal:!0,blacklistDuration:1/0,code:2},n);var u=e.sidx.byterange,l=u.offset,c=u.length;if(a.length>=c+l)return o(t,{response:a.subarray(l,l+c),status:n.status,uri:n.uri});r.request=r.vhs_.xhr({uri:s,responseType:"arraybuffer",headers:vo({byterange:e.sidx.byterange})},o)}))}else this.mediaRequest_=i().setTimeout((function(){return n(!1)}),0)},n.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},i().clearTimeout(this.minimumUpdatePeriodTimeout_),i().clearTimeout(this.mediaRequest_),i().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.off()},n.hasPendingRequest=function(){return this.request||this.mediaRequest_},n.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},n.media=function(e){var t=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var n=this.state;if("string"==typeof e){if(!this.masterPlaylistLoader_.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.masterPlaylistLoader_.master.playlists[e]}var r=!this.media_||e.id!==this.media_.id;if(r&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(r&&(this.trigger("mediachanging"),this.trigger("mediachange")));r&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,n,(function(r){t.haveMetadata({startingState:n,playlist:e})})))},n.haveMetadata=function(e){var t=e.startingState,n=e.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[n.id]=n,this.mediaRequest_=null,this.refreshMedia_(n.id),"HAVE_MASTER"===t?this.trigger("loadedmetadata"):this.trigger("mediachange")},n.pause=function(){this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),i().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMaster_&&(i().clearTimeout(this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_),this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)},n.load=function(e){var t=this;i().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;var n=this.media();if(e){var r=n?n.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=i().setTimeout((function(){return t.load()}),r)}else this.started?n&&!n.endList?(this.isMaster_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()},n.start=function(){var e=this;this.started=!0,this.isMaster_?this.requestMaster_((function(t,n){e.haveMaster_(),e.hasPendingRequest()||e.media_||e.media(e.masterPlaylistLoader_.master.playlists[0])})):this.mediaRequest_=i().setTimeout((function(){return e.haveMaster_()}),0)},n.requestMaster_=function(e){var t=this;this.request=this.vhs_.xhr({uri:this.masterPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},(function(n,r){if(!t.requestErrored_(n,r)){var i=r.responseText!==t.masterPlaylistLoader_.masterXml_;return t.masterPlaylistLoader_.masterXml_=r.responseText,r.responseHeaders&&r.responseHeaders.date?t.masterLoaded_=Date.parse(r.responseHeaders.date):t.masterLoaded_=Date.now(),t.masterPlaylistLoader_.srcUrl=Cs(t.handleManifestRedirects,t.masterPlaylistLoader_.srcUrl,r),i?(t.handleMaster_(),void t.syncClientServerClock_((function(){return e(r,i)}))):e(r,i)}"HAVE_NOTHING"===t.state&&(t.started=!1)}))},n.syncClientServerClock_=function(e){var t,n=this,r=(t=this.masterPlaylistLoader_.masterXml_,function(e){var t=Te(e,"UTCTiming")[0];if(!t)return null;var n=Ee(t);switch(n.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":n.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":n.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":n.method="DIRECT",n.value=Date.parse(n.value);break;default:throw new Error("UNSUPPORTED_UTC_TIMING_SCHEME")}return n}(Oe(t)));return null===r?(this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now(),e()):"DIRECT"===r.method?(this.masterPlaylistLoader_.clientOffset_=r.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:Es(this.masterPlaylistLoader_.srcUrl,r.value),method:r.method,withCredentials:this.withCredentials},(function(t,i){if(n.request){if(t)return n.masterPlaylistLoader_.clientOffset_=n.masterLoaded_-Date.now(),e();var a;a="HEAD"===r.method?i.responseHeaders&&i.responseHeaders.date?Date.parse(i.responseHeaders.date):n.masterLoaded_:Date.parse(i.responseText),n.masterPlaylistLoader_.clientOffset_=a-Date.now(),e()}})))},n.haveMaster_=function(){this.state="HAVE_MASTER",this.isMaster_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)},n.handleMaster_=function(){this.mediaRequest_=null;var e,t,n,r=(e={masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_},n=Pe(e.masterXml,{manifestUri:t=e.srcUrl,clientOffset:e.clientOffset,sidxMapping:e.sidxMapping}),Ds(n,t),n),i=this.masterPlaylistLoader_.master;i&&(r=function(e,t,n){for(var r=!0,i=Ao(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod}),a=0;a<t.playlists.length;a++){var s=t.playlists[a];if(s.sidx){var o=se(s.sidx);n&&n[o]&&n[o].sidx&&ae(s,n[o].sidx,s.sidx.resolvedUri)}var u=js(i,s,Oo);u&&(i=u,r=!1)}return Ps(t,(function(e,t,n,a){if(e.playlists&&e.playlists.length){var s=e.playlists[0].id,o=js(i,e.playlists[0],Oo);o&&((i=o).mediaGroups[t][n][a].playlists[0]=i.playlists[s],r=!1)}})),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(r=!1),r?null:i}(i,r,this.masterPlaylistLoader_.sidxMapping_)),this.masterPlaylistLoader_.master=r||i;var a=this.masterPlaylistLoader_.master.locations&&this.masterPlaylistLoader_.master.locations[0];return a&&a!==this.masterPlaylistLoader_.srcUrl&&(this.masterPlaylistLoader_.srcUrl=a),(!i||r&&r.minimumUpdatePeriod!==i.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),Boolean(r)},n.updateMinimumUpdatePeriodTimeout_=function(){var e=this.masterPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(i().clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);var t=e.master&&e.master.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),"number"!=typeof t||t<=0?t<0&&this.logger_("found invalid minimumUpdatePeriod of "+t+", not setting a timeout"):this.createMUPTimeout_(t)},n.createMUPTimeout_=function(e){var t=this.masterPlaylistLoader_;t.minimumUpdatePeriodTimeout_=i().setTimeout((function(){t.minimumUpdatePeriodTimeout_=null,t.trigger("minimumUpdatePeriod"),t.createMUPTimeout_(e)}),e)},n.refreshXml_=function(){var e=this;this.requestMaster_((function(t,n){var r,i,a;n&&(e.media_&&(e.media_=e.masterPlaylistLoader_.master.playlists[e.media_.id]),e.masterPlaylistLoader_.sidxMapping_=(r=e.masterPlaylistLoader_.master,i=e.masterPlaylistLoader_.sidxMapping_,a=Lo(r.playlists,i),Ps(r,(function(e,t,n,r){if(e.playlists&&e.playlists.length){var s=e.playlists;a=Ao(a,Lo(s,i))}})),a),e.addSidxSegments_(e.media(),e.state,(function(t){e.refreshMedia_(e.media().id)})))}))},n.refreshMedia_=function(e){var t=this;if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMaster_&&this.handleMaster_();var n=this.masterPlaylistLoader_.master.playlists,r=!this.media_||this.media_!==n[e];r?this.media_=n[e]:this.trigger("playlistunchanged"),this.mediaUpdateTimeout||function e(){t.media().endList||(t.mediaUpdateTimeout=i().setTimeout((function(){t.trigger("mediaupdatetimeout"),e()}),Hs(t.media(),Boolean(r))))}(),this.trigger("loadedplaylist")},t}(Io),Ro={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30},Mo=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},No=function(e){return function(){var t=function(e){try{return URL.createObjectURL(new Blob([e],{type:"application/javascript"}))}catch(n){var t=new BlobBuilder;return t.append(e),URL.createObjectURL(t.getBlob())}}(e),n=Mo(new Worker(t));n.objURL=t;var r=n.terminate;return n.on=n.addEventListener,n.off=n.removeEventListener,n.terminate=function(){return URL.revokeObjectURL(t),r.call(this)},n}},Uo=function(e){return"var browserWorkerPolyFill = "+Mo.toString()+";\nbrowserWorkerPolyFill(self);\n"+e},Fo=function(e){return e.toString().replace(/^function.+?{/,"").slice(0,-1)},Bo=Uo(Fo((function(){var e=function(){this.init=function(){var e={};this.on=function(t,n){e[t]||(e[t]=[]),e[t]=e[t].concat(n)},this.off=function(t,n){var r;return!!e[t]&&(r=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(r,1),r>-1)},this.trigger=function(t){var n,r,i,a;if(n=e[t])if(2===arguments.length)for(i=n.length,r=0;r<i;++r)n[r].call(this,arguments[1]);else{for(a=[],r=arguments.length,r=1;r<arguments.length;++r)a.push(arguments[r]);for(i=n.length,r=0;r<i;++r)n[r].apply(this,a)}},this.dispose=function(){e={}}}};e.prototype.pipe=function(e){return this.on("data",(function(t){e.push(t)})),this.on("done",(function(t){e.flush(t)})),this.on("partialdone",(function(t){e.partialFlush(t)})),this.on("endedtimeline",(function(t){e.endTimeline(t)})),this.on("reset",(function(t){e.reset(t)})),e},e.prototype.push=function(e){this.trigger("data",e)},e.prototype.flush=function(e){this.trigger("done",e)},e.prototype.partialFlush=function(e){this.trigger("partialdone",e)},e.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},e.prototype.reset=function(e){this.trigger("reset",e)};var t,n,r,i,a,s,o,u,l,c,d,h,f,p,m,g,v,y,_,b,T,S,w,k,E,C,x,I,A,O,P,L,D,R,M,N,U,F,B,j,H=e,V=Math.pow(2,32)-1;!function(){var e;if(S={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(e in S)S.hasOwnProperty(e)&&(S[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);w=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),E=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),k=new Uint8Array([0,0,0,1]),C=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),x=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),I={video:C,audio:x},P=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),O=new Uint8Array([0,0,0,0,0,0,0,0]),L=new Uint8Array([0,0,0,0,0,0,0,0]),D=L,R=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),M=L,A=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),t=function(e){var t,n,r=[],i=0;for(t=1;t<arguments.length;t++)r.push(arguments[t]);for(t=r.length;t--;)i+=r[t].byteLength;for(n=new Uint8Array(i+8),new DataView(n.buffer,n.byteOffset,n.byteLength).setUint32(0,n.byteLength),n.set(e,4),t=0,i=8;t<r.length;t++)n.set(r[t],i),i+=r[t].byteLength;return n},n=function(){return t(S.dinf,t(S.dref,P))},r=function(e){return t(S.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},m=function(e){return t(S.hdlr,I[e])},p=function(e){var n=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(n[12]=e.samplerate>>>24&255,n[13]=e.samplerate>>>16&255,n[14]=e.samplerate>>>8&255,n[15]=255&e.samplerate),t(S.mdhd,n)},f=function(e){return t(S.mdia,p(e),m(e.type),s(e))},a=function(e){return t(S.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},s=function(e){return t(S.minf,"video"===e.type?t(S.vmhd,A):t(S.smhd,O),n(),v(e))},o=function(e,n){for(var r=[],i=n.length;i--;)r[i]=_(n[i]);return t.apply(null,[S.moof,a(e)].concat(r))},u=function(e){for(var n=e.length,r=[];n--;)r[n]=d(e[n]);return t.apply(null,[S.moov,c(4294967295)].concat(r).concat(l(e)))},l=function(e){for(var n=e.length,r=[];n--;)r[n]=b(e[n]);return t.apply(null,[S.mvex].concat(r))},c=function(e){var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return t(S.mvhd,n)},g=function(e){var n,r,i=e.samples||[],a=new Uint8Array(4+i.length);for(r=0;r<i.length;r++)n=i[r].flags,a[r+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return t(S.sdtp,a)},v=function(e){return t(S.stbl,y(e),t(S.stts,M),t(S.stsc,D),t(S.stsz,R),t(S.stco,L))},y=function(e){return t(S.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===e.type?N(e):U(e))},N=function(e){var n,r,i=e.sps||[],a=e.pps||[],s=[],o=[];for(n=0;n<i.length;n++)s.push((65280&i[n].byteLength)>>>8),s.push(255&i[n].byteLength),s=s.concat(Array.prototype.slice.call(i[n]));for(n=0;n<a.length;n++)o.push((65280&a[n].byteLength)>>>8),o.push(255&a[n].byteLength),o=o.concat(Array.prototype.slice.call(a[n]));if(r=[S.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),t(S.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([i.length],s,[a.length],o))),t(S.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var u=e.sarRatio[0],l=e.sarRatio[1];r.push(t(S.pasp,new Uint8Array([(4278190080&u)>>24,(16711680&u)>>16,(65280&u)>>8,255&u,(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l])))}return t.apply(null,r)},U=function(e){return t(S.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),r(e))},h=function(e){var n=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return t(S.tkhd,n)},_=function(e){var n,r,i,a,s,o;return n=t(S.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),s=Math.floor(e.baseMediaDecodeTime/(V+1)),o=Math.floor(e.baseMediaDecodeTime%(V+1)),r=t(S.tfdt,new Uint8Array([1,0,0,0,s>>>24&255,s>>>16&255,s>>>8&255,255&s,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),"audio"===e.type?(i=T(e,92),t(S.traf,n,r,i)):(a=g(e),i=T(e,a.length+92),t(S.traf,n,r,i,a))},d=function(e){return e.duration=e.duration||4294967295,t(S.trak,h(e),f(e))},b=function(e){var n=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(n[n.length-1]=0),t(S.trex,n)},j=function(e,t){var n=0,r=0,i=0,a=0;return e.length&&(void 0!==e[0].duration&&(n=1),void 0!==e[0].size&&(r=2),void 0!==e[0].flags&&(i=4),void 0!==e[0].compositionTimeOffset&&(a=8)),[0,0,n|r|i|a,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},B=function(e,n){var r,i,a,s,o,u;for(n+=20+16*(s=e.samples||[]).length,a=j(s,n),(i=new Uint8Array(a.length+16*s.length)).set(a),r=a.length,u=0;u<s.length;u++)o=s[u],i[r++]=(4278190080&o.duration)>>>24,i[r++]=(16711680&o.duration)>>>16,i[r++]=(65280&o.duration)>>>8,i[r++]=255&o.duration,i[r++]=(4278190080&o.size)>>>24,i[r++]=(16711680&o.size)>>>16,i[r++]=(65280&o.size)>>>8,i[r++]=255&o.size,i[r++]=o.flags.isLeading<<2|o.flags.dependsOn,i[r++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,i[r++]=61440&o.flags.degradationPriority,i[r++]=15&o.flags.degradationPriority,i[r++]=(4278190080&o.compositionTimeOffset)>>>24,i[r++]=(16711680&o.compositionTimeOffset)>>>16,i[r++]=(65280&o.compositionTimeOffset)>>>8,i[r++]=255&o.compositionTimeOffset;return t(S.trun,i)},F=function(e,n){var r,i,a,s,o,u;for(n+=20+8*(s=e.samples||[]).length,a=j(s,n),(r=new Uint8Array(a.length+8*s.length)).set(a),i=a.length,u=0;u<s.length;u++)o=s[u],r[i++]=(4278190080&o.duration)>>>24,r[i++]=(16711680&o.duration)>>>16,r[i++]=(65280&o.duration)>>>8,r[i++]=255&o.duration,r[i++]=(4278190080&o.size)>>>24,r[i++]=(16711680&o.size)>>>16,r[i++]=(65280&o.size)>>>8,r[i++]=255&o.size;return t(S.trun,r)},T=function(e,t){return"audio"===e.type?F(e,t):B(e,t)},i=function(){return t(S.ftyp,w,k,w,E)};var q,W,z,G,X,$,K,Z,Y=function(e){return t(S.mdat,e)},Q=o,J=function(e,t){var n={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return n.dataOffset=t,n.compositionTimeOffset=e.pts-e.dts,n.duration=e.duration,n.size=4*e.length,n.size+=e.byteLength,e.keyFrame&&(n.flags.dependsOn=2,n.flags.isNonSyncSample=0),n},ee=[33,16,5,32,164,27],te=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],ne=function(e){for(var t=[];e--;)t.push(0);return t},re=9e4;$=function(e,t){return W(X(e,t))},K=function(e,t){return z(G(e),t)},Z=function(e,t,n){return G(n?e:e-t)};var ie=re,ae=W=function(e){return e*re},se=(z=function(e,t){return e*t},G=function(e){return e/re}),oe=(X=function(e,t){return e/t},$),ue=K,le=Z,ce=function(e,t,n,r){var i,a,s,o,u,l=0,c=0,d=0;if(t.length&&(i=oe(e.baseMediaDecodeTime,e.samplerate),a=Math.ceil(ie/(e.samplerate/1024)),n&&r&&(l=i-Math.max(n,r),d=(c=Math.floor(l/a))*a),!(c<1||d>45e3))){for((s=function(){if(!q){var e={96e3:[ee,[227,64],ne(154),[56]],88200:[ee,[231],ne(170),[56]],64e3:[ee,[248,192],ne(240),[56]],48e3:[ee,[255,192],ne(268),[55,148,128],ne(54),[112]],44100:[ee,[255,192],ne(268),[55,163,128],ne(84),[112]],32e3:[ee,[255,192],ne(268),[55,234],ne(226),[112]],24e3:[ee,[255,192],ne(268),[55,255,128],ne(268),[111,112],ne(126),[224]],16e3:[ee,[255,192],ne(268),[55,255,128],ne(268),[111,255],ne(269),[223,108],ne(195),[1,192]],12e3:[te,ne(268),[3,127,248],ne(268),[6,255,240],ne(268),[13,255,224],ne(268),[27,253,128],ne(259),[56]],11025:[te,ne(268),[3,127,248],ne(268),[6,255,240],ne(268),[13,255,224],ne(268),[27,255,192],ne(268),[55,175,128],ne(108),[112]],8e3:[te,ne(268),[3,121,16],ne(47),[7]]};t=e,q=Object.keys(t).reduce((function(e,n){return e[n]=new Uint8Array(t[n].reduce((function(e,t){return e.concat(t)}),[])),e}),{})}var t;return q}()[e.samplerate])||(s=t[0].data),o=0;o<c;o++)u=t[0],t.splice(0,0,{data:s,dts:u.dts-a,pts:u.pts-a});return e.baseMediaDecodeTime-=Math.floor(ue(d,e.samplerate)),d}},de=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},he=function(e,t){var n,r=e.minSegmentDts;return t||(r-=e.timelineStartInfo.dts),n=e.timelineStartInfo.baseMediaDecodeTime,n+=r,n=Math.max(0,n),"audio"===e.type&&(n*=e.samplerate/9e4,n=Math.floor(n)),n},fe=function(e,t){"number"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))},pe=function e(t){t=t||{},e.prototype.init.call(this),this.parse708captions_="boolean"!=typeof t.parse708captions||t.parse708captions,this.captionPackets_=[],this.ccStreams_=[new ke(0,0),new ke(0,1),new ke(1,0),new ke(1,1)],this.parse708captions_&&(this.cc708Stream_=new _e),this.reset(),this.ccStreams_.forEach((function(e){e.on("data",this.trigger.bind(this,"data")),e.on("partialdone",this.trigger.bind(this,"partialdone")),e.on("done",this.trigger.bind(this,"done"))}),this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};(pe.prototype=new H).push=function(e){var t,n,r;if("sei_rbsp"===e.nalUnitType&&(t=function(e){for(var t=0,n={payloadType:-1,payloadSize:0},r=0,i=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)r+=255,t++;for(r+=e[t++];255===e[t];)i+=255,t++;if(i+=e[t++],!n.payload&&4===r){if("GA94"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){n.payloadType=r,n.payloadSize=i,n.payload=e.subarray(t,t+i);break}n.payload=void 0}t+=i,r=0,i=0}return n}(e.escapedRBSP)).payload&&4===t.payloadType&&(n=function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)}(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));r=function(e,t){var n,r,i,a,s=[];if(!(64&t[0]))return s;for(r=31&t[0],n=0;n<r;n++)a={type:3&t[2+(i=3*n)],pts:e},4&t[i+2]&&(a.ccData=t[i+3]<<8|t[i+4],s.push(a));return s}(e.pts,n),this.captionPackets_=this.captionPackets_.concat(r),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},pe.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return"flush"===e?t.flush():t.partialFlush()}),this)},pe.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)}),this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},pe.prototype.flush=function(){return this.flushStream("flush")},pe.prototype.partialFlush=function(){return this.flushStream("partialFlush")},pe.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},pe.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},pe.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},pe.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},pe.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},pe.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var me={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},ge=function(e){return 32<=e&&e<=127||160<=e&&e<=255},ve=function(e){this.windowNum=e,this.reset()};ve.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},ve.prototype.getText=function(){return this.rows.join("\n")},ve.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},ve.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&"function"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},ve.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},ve.prototype.addText=function(e){this.rows[this.rowIdx]+=e},ve.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var ye=function(e){this.serviceNum=e,this.text="",this.currentWindow=new ve(-1),this.windows=[]};ye.prototype.init=function(e,t){this.startPts=e;for(var n=0;n<8;n++)this.windows[n]=new ve(n),"function"==typeof t&&(this.windows[n].beforeRowOverflow=t)},ye.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]};var _e=function e(){e.prototype.init.call(this);var t=this;this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(t.new708Packet(),t.add708Bytes(e)):(null===t.current708Packet&&t.new708Packet(),t.add708Bytes(e))}};_e.prototype=new H,_e.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},_e.prototype.add708Bytes=function(e){var t=e.ccData,n=t>>>8,r=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(n),this.current708Packet.data.push(r)},_e.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,n=null,r=null,i=0,a=t[i++];for(e.seq=a>>6,e.sizeCode=63&a;i<t.length;i++)r=31&(a=t[i++]),7==(n=a>>5)&&r>0&&(n=a=t[i++]),this.pushServiceBlock(n,i,r),r>0&&(i+=r-1)},_e.prototype.pushServiceBlock=function(e,t,n){var r,i=t,a=this.current708Packet.data,s=this.services[e];for(s||(s=this.initService(e,i));i<t+n&&i<a.length;i++)r=a[i],ge(r)?i=this.handleText(i,s):16===r?i=this.extendedCommands(i,s):128<=r&&r<=135?i=this.setCurrentWindow(i,s):152<=r&&r<=159?i=this.defineWindow(i,s):136===r?i=this.clearWindows(i,s):140===r?i=this.deleteWindows(i,s):137===r?i=this.displayWindows(i,s):138===r?i=this.hideWindows(i,s):139===r?i=this.toggleWindows(i,s):151===r?i=this.setWindowAttributes(i,s):144===r?i=this.setPenAttributes(i,s):145===r?i=this.setPenColor(i,s):146===r?i=this.setPenLocation(i,s):143===r?s=this.reset(i,s):8===r?s.currentWindow.backspace():12===r?s.currentWindow.clearText():13===r?s.currentWindow.pendingNewLine=!0:14===r?s.currentWindow.clearText():141===r&&i++},_e.prototype.extendedCommands=function(e,t){var n=this.current708Packet.data[++e];return ge(n)&&(e=this.handleText(e,t,!0)),e},_e.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},_e.prototype.initService=function(e,t){var n=this;return this.services[e]=new ye(e),this.services[e].init(this.getPts(t),(function(t){n.flushDisplayed(t,n.services[e])})),this.services[e]},_e.prototype.handleText=function(e,t,n){var r,i,a=this.current708Packet.data[e],s=(i=me[r=(n?4096:0)|a]||r,4096&r&&r===i?"":String.fromCharCode(i)),o=t.currentWindow;return o.pendingNewLine&&!o.isEmpty()&&o.newLine(this.getPts(e)),o.pendingNewLine=!1,o.addText(s),e},_e.prototype.setCurrentWindow=function(e,t){var n=7&this.current708Packet.data[e];return t.setCurrentWindow(n),e},_e.prototype.defineWindow=function(e,t){var n=this.current708Packet.data,r=n[e],i=7&r;t.setCurrentWindow(i);var a=t.currentWindow;return r=n[++e],a.visible=(32&r)>>5,a.rowLock=(16&r)>>4,a.columnLock=(8&r)>>3,a.priority=7&r,r=n[++e],a.relativePositioning=(128&r)>>7,a.anchorVertical=127&r,r=n[++e],a.anchorHorizontal=r,r=n[++e],a.anchorPoint=(240&r)>>4,a.rowCount=15&r,r=n[++e],a.columnCount=63&r,r=n[++e],a.windowStyle=(56&r)>>3,a.penStyle=7&r,a.virtualRowCount=a.rowCount+1,e},_e.prototype.setWindowAttributes=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.winAttr;return r=n[++e],i.fillOpacity=(192&r)>>6,i.fillRed=(48&r)>>4,i.fillGreen=(12&r)>>2,i.fillBlue=3&r,r=n[++e],i.borderType=(192&r)>>6,i.borderRed=(48&r)>>4,i.borderGreen=(12&r)>>2,i.borderBlue=3&r,r=n[++e],i.borderType+=(128&r)>>5,i.wordWrap=(64&r)>>6,i.printDirection=(48&r)>>4,i.scrollDirection=(12&r)>>2,i.justify=3&r,r=n[++e],i.effectSpeed=(240&r)>>4,i.effectDirection=(12&r)>>2,i.displayEffect=3&r,e},_e.prototype.flushDisplayed=function(e,t){for(var n=[],r=0;r<8;r++)t.windows[r].visible&&!t.windows[r].isEmpty()&&n.push(t.windows[r].getText());t.endPts=e,t.text=n.join("\n\n"),this.pushCaption(t),t.startPts=e},_e.prototype.pushCaption=function(e){""!==e.text&&(this.trigger("data",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:"cc708_"+e.serviceNum}),e.text="",e.startPts=e.endPts)},_e.prototype.displayWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&(t.windows[i].visible=1);return e},_e.prototype.hideWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&(t.windows[i].visible=0);return e},_e.prototype.toggleWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&(t.windows[i].visible^=1);return e},_e.prototype.clearWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&t.windows[i].clearText();return e},_e.prototype.deleteWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&t.windows[i].reset();return e},_e.prototype.setPenAttributes=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.penAttr;return r=n[++e],i.textTag=(240&r)>>4,i.offset=(12&r)>>2,i.penSize=3&r,r=n[++e],i.italics=(128&r)>>7,i.underline=(64&r)>>6,i.edgeType=(56&r)>>3,i.fontStyle=7&r,e},_e.prototype.setPenColor=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.penColor;return r=n[++e],i.fgOpacity=(192&r)>>6,i.fgRed=(48&r)>>4,i.fgGreen=(12&r)>>2,i.fgBlue=3&r,r=n[++e],i.bgOpacity=(192&r)>>6,i.bgRed=(48&r)>>4,i.bgGreen=(12&r)>>2,i.bgBlue=3&r,r=n[++e],i.edgeRed=(48&r)>>4,i.edgeGreen=(12&r)>>2,i.edgeBlue=3&r,e},_e.prototype.setPenLocation=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,r=n[++e],i.row=15&r,r=n[++e],i.column=63&r,e},_e.prototype.reset=function(e,t){var n=this.getPts(e);return this.flushDisplayed(n,t),this.initService(t.serviceNum,e)};var be={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Te=function(e){return null===e?"":(e=be[e]||e,String.fromCharCode(e))},Se=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],we=function(){for(var e=[],t=15;t--;)e.push("");return e},ke=function e(t,n){e.prototype.init.call(this),this.field_=t||0,this.dataChannel_=n||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,n,r,i,a;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),r=t>>>8,i=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),n=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=n,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=we();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=we();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=we()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(r,i))a=Te((r=(3&r)<<8)|i),this[this.mode_](e.pts,a),this.column_++;else if(this.isExtCharacter(r,i))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),a=Te((r=(3&r)<<8)|i),this[this.mode_](e.pts,a),this.column_++;else if(this.isMidRowCode(r,i))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14==(14&i)&&this.addFormatting(e.pts,["i"]),1==(1&i)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(r,i))this.column_+=3&i;else if(this.isPAC(r,i)){var s=Se.indexOf(7968&t);"rollUp"===this.mode_&&(s-this.rollUpRows_+1<0&&(s=this.rollUpRows_-1),this.setRollUp(e.pts,s)),s!==this.row_&&(this.clearFormatting(e.pts),this.row_=s),1&i&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16==(16&t)&&(this.column_=4*((14&t)>>1)),this.isColorPAC(i)&&14==(14&i)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(r)&&(0===i&&(i=null),a=Te(r),a+=Te(i),this[this.mode_](e.pts,a),this.column_+=a.length)}else this.lastControlCode_=null}};ke.prototype=new H,ke.prototype.flushDisplayed=function(e){var t=this.displayed_.map((function(e){try{return e.trim()}catch(e){return console.error("Skipping malformed caption."),""}})).join("\n").replace(/^\n+|\n+$/g,"");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})},ke.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=we(),this.nonDisplayed_=we(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},ke.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},ke.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},ke.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},ke.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},ke.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},ke.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},ke.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},ke.prototype.isNormalChar=function(e){return e>=32&&e<=127},ke.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=we(),this.displayed_=we()),void 0!==t&&t!==this.row_)for(var n=0;n<this.rollUpRows_;n++)this.displayed_[t-n]=this.displayed_[this.row_-n],this.displayed_[this.row_-n]="";void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},ke.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var n=t.reduce((function(e,t){return e+"<"+t+">"}),"");this[this.mode_](e,n)},ke.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+"</"+t+">"}),"");this.formatting_=[],this[this.mode_](e,t)}},ke.prototype.popOn=function(e,t){var n=this.nonDisplayed_[this.row_];n+=t,this.nonDisplayed_[this.row_]=n},ke.prototype.rollUp=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n},ke.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]="";for(e=this.row_+1;e<15;e++)this.displayed_[e]="";for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]=""},ke.prototype.paintOn=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n};var Ee={CaptionStream:pe,Cea608Stream:ke,Cea708Stream:_e},Ce={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},xe="shared",Ie=function(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e},Ae=function e(t){var n,r;e.prototype.init.call(this),this.type_=t||xe,this.push=function(e){this.type_!==xe&&e.type!==this.type_||(void 0===r&&(r=e.dts),e.dts=Ie(e.dts,r),e.pts=Ie(e.pts,r),n=e.dts,this.trigger("data",e))},this.flush=function(){r=n,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){r=void 0,n=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};Ae.prototype=new H;var Oe,Pe=Ae,Le=Ie,De=function(e,t,n){var r,i="";for(r=t;r<n;r++)i+="%"+("00"+e[r].toString(16)).slice(-2);return i},Re=function(e,t,n){return decodeURIComponent(De(e,t,n))},Me=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},Ne={TXXX:function(e){var t;if(3===e.data[0]){for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=Re(e.data,1,t),e.value=Re(e.data,t+1,e.data.length).replace(/\0*$/,"");break}e.data=e.value}},WXXX:function(e){var t;if(3===e.data[0])for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=Re(e.data,1,t),e.url=Re(e.data,t+1,e.data.length);break}},PRIV:function(e){var t,n;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=(n=e.data,unescape(De(n,0,t)));break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}};Oe=function(e){var t,n={debug:!(!e||!e.debug),descriptor:e&&e.descriptor},r=0,i=[],a=0;if(Oe.prototype.init.call(this),this.dispatchType=Ce.METADATA_STREAM_TYPE.toString(16),n.descriptor)for(t=0;t<n.descriptor.length;t++)this.dispatchType+=("00"+n.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,s,o,u,l;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(a=0,i.length=0),0===i.length&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0)))n.debug&&console.log("Skipping unrecognized metadata packet");else if(i.push(e),a+=e.data.byteLength,1===i.length&&(r=Me(e.data.subarray(6,10)),r+=10),!(a<r)){for(t={data:new Uint8Array(r),frames:[],pts:i[0].pts,dts:i[0].dts},l=0;l<r;)t.data.set(i[0].data.subarray(0,r-l),l),l+=i[0].data.byteLength,a-=i[0].data.byteLength,i.shift();s=10,64&t.data[5]&&(s+=4,s+=Me(t.data.subarray(10,14)),r-=Me(t.data.subarray(16,20)));do{if((o=Me(t.data.subarray(s+4,s+8)))<1)return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.");if((u={id:String.fromCharCode(t.data[s],t.data[s+1],t.data[s+2],t.data[s+3]),data:t.data.subarray(s+10,s+o+10)}).key=u.id,Ne[u.id]&&(Ne[u.id](u),"com.apple.streaming.transportStreamTimestamp"===u.owner)){var c=u.data,d=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;d*=4,d+=3&c[7],u.timeStamp=d,void 0===t.pts&&void 0===t.dts&&(t.pts=u.timeStamp,t.dts=u.timeStamp),this.trigger("timestamp",u)}t.frames.push(u),s+=10,s+=o}while(s<r);this.trigger("data",t)}}},Oe.prototype=new H;var Ue,Fe,Be,je=Oe,He=Pe,Ve=188;(Ue=function(){var e=new Uint8Array(Ve),t=0;Ue.prototype.init.call(this),this.push=function(n){var r,i=0,a=Ve;for(t?((r=new Uint8Array(n.byteLength+t)).set(e.subarray(0,t)),r.set(n,t),t=0):r=n;a<r.byteLength;)71!==r[i]||71!==r[a]?(i++,a++):(this.trigger("data",r.subarray(i,a)),i+=Ve,a+=Ve);i<r.byteLength&&(e.set(r.subarray(i),0),t=r.byteLength-i)},this.flush=function(){t===Ve&&71===e[0]&&(this.trigger("data",e),t=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){t=0,this.trigger("reset")}}).prototype=new H,Fe=function(){var e,t,n,r;Fe.prototype.init.call(this),r=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,r){var i=0;r.payloadUnitStartIndicator&&(i+=e[i]+1),"pat"===r.type?t(e.subarray(i),r):n(e.subarray(i),r)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],r.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=r.pmtPid},n=function(e,t){var n,i;if(1&e[5]){for(r.programMapTable={video:null,audio:null,"timed-metadata":{}},n=3+((15&e[1])<<8|e[2])-4,i=12+((15&e[10])<<8|e[11]);i<n;){var a=e[i],s=(31&e[i+1])<<8|e[i+2];a===Ce.H264_STREAM_TYPE&&null===r.programMapTable.video?r.programMapTable.video=s:a===Ce.ADTS_STREAM_TYPE&&null===r.programMapTable.audio?r.programMapTable.audio=s:a===Ce.METADATA_STREAM_TYPE&&(r.programMapTable["timed-metadata"][s]=a),i+=5+((15&e[i+3])<<8|e[i+4])}t.programMapTable=r.programMapTable}},this.push=function(t){var n={},r=4;if(n.payloadUnitStartIndicator=!!(64&t[1]),n.pid=31&t[1],n.pid<<=8,n.pid|=t[2],(48&t[3])>>>4>1&&(r+=t[r]+1),0===n.pid)n.type="pat",e(t.subarray(r),n),this.trigger("data",n);else if(n.pid===this.pmtPid)for(n.type="pmt",e(t.subarray(r),n),this.trigger("data",n);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,r,n]):this.processPes_(t,r,n)},this.processPes_=function(e,t,n){n.pid===this.programMapTable.video?n.streamType=Ce.H264_STREAM_TYPE:n.pid===this.programMapTable.audio?n.streamType=Ce.ADTS_STREAM_TYPE:n.streamType=this.programMapTable["timed-metadata"][n.pid],n.type="pes",n.data=e.subarray(t),this.trigger("data",n)}},Fe.prototype=new H,Fe.STREAM_TYPES={h264:27,adts:15},Be=function(){var e,t=this,n={data:[],size:0},r={data:[],size:0},i={data:[],size:0},a=function(e,n,r){var i,a,s=new Uint8Array(e.size),o={type:n},u=0,l=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,u=0;u<e.data.length;u++)a=e.data[u],s.set(a.data,l),l+=a.data.byteLength;var c,d,h,f;d=o,f=(c=s)[0]<<16|c[1]<<8|c[2],d.data=new Uint8Array,1===f&&(d.packetLength=6+(c[4]<<8|c[5]),d.dataAlignmentIndicator=0!=(4&c[6]),192&(h=c[7])&&(d.pts=(14&c[9])<<27|(255&c[10])<<20|(254&c[11])<<12|(255&c[12])<<5|(254&c[13])>>>3,d.pts*=4,d.pts+=(6&c[13])>>>1,d.dts=d.pts,64&h&&(d.dts=(14&c[14])<<27|(255&c[15])<<20|(254&c[16])<<12|(255&c[17])<<5|(254&c[18])>>>3,d.dts*=4,d.dts+=(6&c[18])>>>1)),d.data=c.subarray(9+c[8])),i="video"===n||o.packetLength<=e.size,(r||i)&&(e.size=0,e.data.length=0),i&&t.trigger("data",o)}};Be.prototype.init.call(this),this.push=function(s){({pat:function(){},pes:function(){var e,t;switch(s.streamType){case Ce.H264_STREAM_TYPE:e=n,t="video";break;case Ce.ADTS_STREAM_TYPE:e=r,t="audio";break;case Ce.METADATA_STREAM_TYPE:e=i,t="timed-metadata";break;default:return}s.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(s),e.size+=s.data.byteLength},pmt:function(){var n={type:"metadata",tracks:[]};null!==(e=s.programMapTable).video&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),t.trigger("data",n)}})[s.type]()},this.reset=function(){n.size=0,n.data.length=0,r.size=0,r.data.length=0,this.trigger("reset")},this.flushStreams_=function(){a(n,"video"),a(r,"audio"),a(i,"timed-metadata")},this.flush=function(){this.flushStreams_(),this.trigger("done")}},Be.prototype=new H;var qe={PAT_PID:0,MP2T_PACKET_LENGTH:Ve,TransportPacketStream:Ue,TransportParseStream:Fe,ElementaryStream:Be,TimestampRolloverStream:He,CaptionStream:Ee.CaptionStream,Cea608Stream:Ee.Cea608Stream,Cea708Stream:Ee.Cea708Stream,MetadataStream:je};for(var We in Ce)Ce.hasOwnProperty(We)&&(qe[We]=Ce[We]);var ze,Ge=qe,Xe=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];ze=function(e){var t,n=0;ze.prototype.init.call(this),this.push=function(r){var i,a,s,o,u,l,c=0;if(e||(n=0),"audio"===r.type)for(t?(o=t,(t=new Uint8Array(o.byteLength+r.data.byteLength)).set(o),t.set(r.data,o.byteLength)):t=r.data;c+5<t.length;)if(255===t[c]&&240==(246&t[c+1])){if(a=2*(1&~t[c+1]),i=(3&t[c+3])<<11|t[c+4]<<3|(224&t[c+5])>>5,l=9e4*(u=1024*(1+(3&t[c+6])))/Xe[(60&t[c+2])>>>2],s=c+i,t.byteLength<s)return;if(this.trigger("data",{pts:r.pts+n*l,dts:r.dts+n*l,sampleCount:u,audioobjecttype:1+(t[c+2]>>>6&3),channelcount:(1&t[c+2])<<2|(192&t[c+3])>>>6,samplerate:Xe[(60&t[c+2])>>>2],samplingfrequencyindex:(60&t[c+2])>>>2,samplesize:16,data:t.subarray(c+7+a,s)}),n++,t.byteLength===s)return void(t=void 0);t=t.subarray(s)}else c++},this.flush=function(){n=0,this.trigger("done")},this.reset=function(){t=void 0,this.trigger("reset")},this.endTimeline=function(){t=void 0,this.trigger("endedtimeline")}},ze.prototype=new H;var $e,Ke,Ze,Ye=ze,Qe=function(e){var t=e.byteLength,n=0,r=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+r},this.loadWord=function(){var i=e.byteLength-t,a=new Uint8Array(4),s=Math.min(4,t);if(0===s)throw new Error("no bytes available");a.set(e.subarray(i,i+s)),n=new DataView(a.buffer).getUint32(0),r=8*s,t-=s},this.skipBits=function(e){var i;r>e?(n<<=e,r-=e):(e-=r,e-=8*(i=Math.floor(e/8)),t-=i,this.loadWord(),n<<=e,r-=e)},this.readBits=function(e){var i=Math.min(r,e),a=n>>>32-i;return(r-=i)>0?n<<=i:t>0&&this.loadWord(),(i=e-i)>0?a<<i|this.readBits(i):a},this.skipLeadingZeros=function(){var e;for(e=0;e<r;++e)if(0!=(n&2147483648>>>e))return n<<=e,r-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};Ke=function(){var e,t,n=0;Ke.prototype.init.call(this),this.push=function(r){var i;t?((i=new Uint8Array(t.byteLength+r.data.byteLength)).set(t),i.set(r.data,t.byteLength),t=i):t=r.data;for(var a=t.byteLength;n<a-3;n++)if(1===t[n+2]){e=n+5;break}for(;e<a;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}n+3!==e-2&&this.trigger("data",t.subarray(n+3,e-2));do{e++}while(1!==t[e]&&e<a);n=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(n+3,e-2)),n=e-2,e+=3;break;default:e+=3}t=t.subarray(n),e-=n,n=0},this.reset=function(){t=null,n=0,this.trigger("reset")},this.flush=function(){t&&t.byteLength>3&&this.trigger("data",t.subarray(n+3)),t=null,n=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},Ke.prototype=new H,Ze={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},$e=function(){var e,t,n,r,i,a,s,o=new Ke;$e.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,n=e.pts,r=e.dts,o.push(e))},o.on("data",(function(s){var o={trackId:t,pts:n,dts:r,data:s};switch(31&s[0]){case 5:o.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:o.nalUnitType="sei_rbsp",o.escapedRBSP=i(s.subarray(1));break;case 7:o.nalUnitType="seq_parameter_set_rbsp",o.escapedRBSP=i(s.subarray(1)),o.config=a(o.escapedRBSP);break;case 8:o.nalUnitType="pic_parameter_set_rbsp";break;case 9:o.nalUnitType="access_unit_delimiter_rbsp"}e.trigger("data",o)})),o.on("done",(function(){e.trigger("done")})),o.on("partialdone",(function(){e.trigger("partialdone")})),o.on("reset",(function(){e.trigger("reset")})),o.on("endedtimeline",(function(){e.trigger("endedtimeline")})),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},s=function(e,t){var n,r=8,i=8;for(n=0;n<e;n++)0!==i&&(i=(r+t.readExpGolomb()+256)%256),r=0===i?r:i},i=function(e){for(var t,n,r=e.byteLength,i=[],a=1;a<r-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(i.push(a+2),a+=2):a++;if(0===i.length)return e;t=r-i.length,n=new Uint8Array(t);var s=0;for(a=0;a<t;s++,a++)s===i[0]&&(s++,i.shift()),n[a]=e[s];return n},a=function(e){var t,n,r,i,a,o,u,l,c,d,h,f,p,m=0,g=0,v=0,y=0,_=1;if(n=(t=new Qe(e)).readUnsignedByte(),i=t.readUnsignedByte(),r=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),Ze[n]&&(3===(a=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==a?8:12,p=0;p<h;p++)t.readBoolean()&&s(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),u=t.readUnsignedExpGolomb(),p=0;p<u;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),l=t.readUnsignedExpGolomb(),c=t.readUnsignedExpGolomb(),0===(d=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),v=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:f=[1,1];break;case 2:f=[12,11];break;case 3:f=[10,11];break;case 4:f=[16,11];break;case 5:f=[40,33];break;case 6:f=[24,11];break;case 7:f=[20,11];break;case 8:f=[32,11];break;case 9:f=[80,33];break;case 10:f=[18,11];break;case 11:f=[15,11];break;case 12:f=[64,33];break;case 13:f=[160,99];break;case 14:f=[4,3];break;case 15:f=[3,2];break;case 16:f=[2,1];break;case 255:f=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}f&&(_=f[0]/f[1])}return{profileIdc:n,levelIdc:r,profileCompatibility:i,width:Math.ceil((16*(l+1)-2*m-2*g)*_),height:(2-d)*(c+1)*16-2*v-2*y,sarRatio:f}}},$e.prototype=new H;var Je,et={H264Stream:$e,NalByteStream:Ke},tt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],nt=function(e,t){var n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return n=n>=0?n:0,(16&e[t+5])>>4?n+20:n+10},rt=function e(t,n){return t.length-n<10||t[n]!=="I".charCodeAt(0)||t[n+1]!=="D".charCodeAt(0)||t[n+2]!=="3".charCodeAt(0)?n:e(t,n+=nt(t,n))},it=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},at={isLikelyAacData:function(e){var t=rt(e,0);return e.length>=t+2&&255==(255&e[t])&&240==(240&e[t+1])&&16==(22&e[t+1])},parseId3TagSize:nt,parseAdtsSize:function(e,t){var n=(224&e[t+5])>>5,r=e[t+4]<<3;return 6144&e[t+3]|r|n},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240==(240&e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return tt[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,n,r;t=10,64&e[5]&&(t+=4,t+=it(e.subarray(10,14)));do{if((n=it(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){r=e.subarray(t+10,t+n+10);for(var i=0;i<r.byteLength;i++)if(0===r[i]){var a=unescape(function(e,t,n){var r,i="";for(r=0;r<n;r++)i+="%"+("00"+e[r].toString(16)).slice(-2);return i}(r,0,i));if("com.apple.streaming.transportStreamTimestamp"===a){var s=r.subarray(i+1),o=(1&s[3])<<30|s[4]<<22|s[5]<<14|s[6]<<6|s[7]>>>2;return(o*=4)+(3&s[7])}break}}t+=10,t+=n}while(t<e.byteLength);return null}};(Je=function(){var e=new Uint8Array,t=0;Je.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(n){var r,i,a,s,o=0,u=0;for(e.length?(s=e.length,(e=new Uint8Array(n.byteLength+s)).set(e.subarray(0,s)),e.set(n,s)):e=n;e.length-u>=3;)if(e[u]!=="I".charCodeAt(0)||e[u+1]!=="D".charCodeAt(0)||e[u+2]!=="3".charCodeAt(0))if(255!=(255&e[u])||240!=(240&e[u+1]))u++;else{if(e.length-u<7)break;if(u+(o=at.parseAdtsSize(e,u))>e.length)break;a={type:"audio",data:e.subarray(u,u+o),pts:t,dts:t},this.trigger("data",a),u+=o}else{if(e.length-u<10)break;if(u+(o=at.parseId3TagSize(e,u))>e.length)break;i={type:"timed-metadata",data:e.subarray(u,u+o)},this.trigger("data",i),u+=o}r=e.length-u,e=r>0?e.subarray(u):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){e=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new H;var st,ot,ut,lt,ct=Je,dt=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],ht=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],ft=et.H264Stream,pt=at.isLikelyAacData,mt=function(e,t){var n;if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},gt=function(e,t,n,r,i,a){return{start:{dts:e,pts:e+(n-t)},end:{dts:e+(r-t),pts:e+(i-n)},prependedContentDuration:a,baseMediaDecodeTime:e}};ot=function(e,t){var n=[],r=0,i=0,a=0,s=1/0;t=t||{},ot.prototype.init.call(this),this.push=function(t){fe(e,t),e&&dt.forEach((function(n){e[n]=t[n]})),n.push(t)},this.setEarliestDts=function(e){i=e},this.setVideoBaseMediaDecodeTime=function(e){s=e},this.setAudioAppendStart=function(e){a=e},this.flush=function(){var o,u,l,c,d,h,f;0!==n.length?(o=function(e,t,n){return t.minSegmentDts>=n?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=n&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))}(n,e,i),e.baseMediaDecodeTime=he(e,t.keepOriginalTimestamps),f=ce(e,o,a,s),e.samples=function(e){var t,n,r=[];for(t=0;t<e.length;t++)n=e[t],r.push({size:n.data.byteLength,duration:1024});return r}(o),l=Y(function(e){var t,n,r=0,i=new Uint8Array(function(e){var t,n=0;for(t=0;t<e.length;t++)n+=e[t].data.byteLength;return n}(e));for(t=0;t<e.length;t++)n=e[t],i.set(n.data,r),r+=n.data.byteLength;return i}(o)),n=[],u=Q(r,[e]),c=new Uint8Array(u.byteLength+l.byteLength),r++,c.set(u),c.set(l,u.byteLength),de(e),d=Math.ceil(9216e4/e.samplerate),o.length&&(h=o.length*d,this.trigger("segmentTimingInfo",gt(oe(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,f||0)),this.trigger("timingInfo",{start:o[0].pts,end:o[0].pts+h})),this.trigger("data",{track:e,boxes:c}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.reset=function(){de(e),n=[],this.trigger("reset")}},ot.prototype=new H,st=function(e,t){var n,r,i=0,a=[],s=[];t=t||{},st.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){fe(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||n||(n=t.config,e.sps=[t.data],ht.forEach((function(t){e[t]=n[t]}),this)),"pic_parameter_set_rbsp"!==t.nalUnitType||r||(r=t.data,e.pps=[t.data]),a.push(t)},this.flush=function(){for(var n,r,o,u,l,c,d,h,f=0;a.length&&"access_unit_delimiter_rbsp"!==a[0].nalUnitType;)a.shift();if(0===a.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(n=function(e){var t,n,r=[],i=[];for(i.byteLength=0,i.nalCount=0,i.duration=0,r.byteLength=0,t=0;t<e.length;t++)"access_unit_delimiter_rbsp"===(n=e[t]).nalUnitType?(r.length&&(r.duration=n.dts-r.dts,i.byteLength+=r.byteLength,i.nalCount+=r.length,i.duration+=r.duration,i.push(r)),(r=[n]).byteLength=n.data.byteLength,r.pts=n.pts,r.dts=n.dts):("slice_layer_without_partitioning_rbsp_idr"===n.nalUnitType&&(r.keyFrame=!0),r.duration=n.dts-r.dts,r.byteLength+=n.data.byteLength,r.push(n));return i.length&&(!r.duration||r.duration<=0)&&(r.duration=i[i.length-1].duration),i.byteLength+=r.byteLength,i.nalCount+=r.length,i.duration+=r.duration,i.push(r),i}(a),(o=function(e){var t,n,r=[],i=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=e[0].pts,r.dts=e[0].dts,i.byteLength=0,i.nalCount=0,i.duration=0,i.pts=e[0].pts,i.dts=e[0].dts,t=0;t<e.length;t++)(n=e[t]).keyFrame?(r.length&&(i.push(r),i.byteLength+=r.byteLength,i.nalCount+=r.nalCount,i.duration+=r.duration),(r=[n]).nalCount=n.length,r.byteLength=n.byteLength,r.pts=n.pts,r.dts=n.dts,r.duration=n.duration):(r.duration+=n.duration,r.nalCount+=n.length,r.byteLength+=n.byteLength,r.push(n));return i.length&&r.duration<=0&&(r.duration=i[i.length-1].duration),i.byteLength+=r.byteLength,i.nalCount+=r.nalCount,i.duration+=r.duration,i.push(r),i}(n))[0][0].keyFrame||((r=this.getGopForFusion_(a[0],e))?(f=r.duration,o.unshift(r),o.byteLength+=r.byteLength,o.nalCount+=r.nalCount,o.pts=r.pts,o.dts=r.dts,o.duration+=r.duration):o=function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e}(o)),s.length){var p;if(!(p=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),a=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");de(e),o=p}fe(e,o),e.samples=function(e,t){var n,r,i,a,s,o=t||0,u=[];for(n=0;n<e.length;n++)for(a=e[n],r=0;r<a.length;r++)s=a[r],o+=(i=J(s,o)).size,u.push(i);return u}(o),l=Y(function(e){var t,n,r,i,a,s,o=0,u=e.byteLength,l=e.nalCount,c=new Uint8Array(u+4*l),d=new DataView(c.buffer);for(t=0;t<e.length;t++)for(i=e[t],n=0;n<i.length;n++)for(a=i[n],r=0;r<a.length;r++)s=a[r],d.setUint32(o,s.data.byteLength),o+=4,c.set(s.data,o),o+=s.data.byteLength;return c}(o)),e.baseMediaDecodeTime=he(e,t.keepOriginalTimestamps),this.trigger("processedGopsInfo",o.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),d=o[0],h=o[o.length-1],this.trigger("segmentTimingInfo",gt(e.baseMediaDecodeTime,d.dts,d.pts,h.dts+h.duration,h.pts+h.duration,f)),this.trigger("timingInfo",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),a=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),u=Q(i,[e]),c=new Uint8Array(u.byteLength+l.byteLength),i++,c.set(u),c.set(l,u.byteLength),this.trigger("data",{track:e,boxes:c}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),a=[],this.gopCache_.length=0,s.length=0,this.trigger("reset")},this.resetStream_=function(){de(e),n=void 0,r=void 0},this.getGopForFusion_=function(t){var n,r,i,a,s,o=1/0;for(s=0;s<this.gopCache_.length;s++)i=(a=this.gopCache_[s]).gop,e.pps&&mt(e.pps[0],a.pps[0])&&e.sps&&mt(e.sps[0],a.sps[0])&&(i.dts<e.timelineStartInfo.dts||(n=t.dts-i.dts-i.duration)>=-1e4&&n<=45e3&&(!r||o>n)&&(r=a,o=n));return r?r.gop:null},this.alignGopsAtStart_=function(e){var t,n,r,i,a,o,u,l;for(a=e.byteLength,o=e.nalCount,u=e.duration,t=n=0;t<s.length&&n<e.length&&(r=s[t],i=e[n],r.pts!==i.pts);)i.pts>r.pts?t++:(n++,a-=i.byteLength,o-=i.nalCount,u-=i.duration);return 0===n?e:n===e.length?null:((l=e.slice(n)).byteLength=a,l.duration=u,l.nalCount=o,l.pts=l[0].pts,l.dts=l[0].dts,l)},this.alignGopsAtEnd_=function(e){var t,n,r,i,a,o,u;for(t=s.length-1,n=e.length-1,a=null,o=!1;t>=0&&n>=0;){if(r=s[t],i=e[n],r.pts===i.pts){o=!0;break}r.pts>i.pts?t--:(t===s.length-1&&(a=n),n--)}if(!o&&null===a)return null;if(0===(u=o?n:a))return e;var l=e.slice(u),c=l.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return l.byteLength=c.byteLength,l.duration=c.duration,l.nalCount=c.nalCount,l.pts=l[0].pts,l.dts=l[0].dts,l},this.alignGopsWith=function(e){s=e}},st.prototype=new H,lt=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,"boolean"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,lt.prototype.init.call(this),this.push=function(e){return e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void("audio"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}},lt.prototype=new H,lt.prototype.flush=function(e){var t,n,r,a,s=0,o={captions:[],captionStreams:{},metadata:[],info:{}},l=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(l=this.videoTrack.timelineStartInfo.pts,ht.forEach((function(e){o.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(l=this.audioTrack.timelineStartInfo.pts,dt.forEach((function(e){o.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?o.type=this.pendingTracks[0].type:o.type="combined",this.emittedTracks+=this.pendingTracks.length,r=function(e){var t,n=i(),r=u(e);return(t=new Uint8Array(n.byteLength+r.byteLength)).set(n),t.set(r,n.byteLength),t}(this.pendingTracks),o.initSegment=new Uint8Array(r.byteLength),o.initSegment.set(r),o.data=new Uint8Array(this.pendingBytes),a=0;a<this.pendingBoxes.length;a++)o.data.set(this.pendingBoxes[a],s),s+=this.pendingBoxes[a].byteLength;for(a=0;a<this.pendingCaptions.length;a++)(t=this.pendingCaptions[a]).startTime=le(t.startPts,l,this.keepOriginalTimestamps),t.endTime=le(t.endPts,l,this.keepOriginalTimestamps),o.captionStreams[t.stream]=!0,o.captions.push(t);for(a=0;a<this.pendingMetadata.length;a++)(n=this.pendingMetadata[a]).cueTime=le(n.pts,l,this.keepOriginalTimestamps),o.metadata.push(n);for(o.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",o),a=0;a<o.captions.length;a++)t=o.captions[a],this.trigger("caption",t);for(a=0;a<o.metadata.length;a++)n=o.metadata[a],this.trigger("id3Frame",n)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},lt.prototype.setRemux=function(e){this.remuxTracks=e},ut=function(e){var t,n,r=this,i=!0;ut.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var i={};this.transmuxPipeline_=i,i.type="aac",i.metadataStream=new Ge.MetadataStream,i.aacStream=new ct,i.audioTimestampRolloverStream=new Ge.TimestampRolloverStream("audio"),i.timedMetadataTimestampRolloverStream=new Ge.TimestampRolloverStream("timed-metadata"),i.adtsStream=new Ye,i.coalesceStream=new lt(e,i.metadataStream),i.headOfPipeline=i.aacStream,i.aacStream.pipe(i.audioTimestampRolloverStream).pipe(i.adtsStream),i.aacStream.pipe(i.timedMetadataTimestampRolloverStream).pipe(i.metadataStream).pipe(i.coalesceStream),i.metadataStream.on("timestamp",(function(e){i.aacStream.setTimestamp(e.timeStamp)})),i.aacStream.on("data",(function(a){"timed-metadata"!==a.type&&"audio"!==a.type||i.audioSegmentStream||(n=n||{timelineStartInfo:{baseMediaDecodeTime:r.baseMediaDecodeTime},codec:"adts",type:"audio"},i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new ot(n,e),i.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo")),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream),r.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t}))})),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var i={};this.transmuxPipeline_=i,i.type="ts",i.metadataStream=new Ge.MetadataStream,i.packetStream=new Ge.TransportPacketStream,i.parseStream=new Ge.TransportParseStream,i.elementaryStream=new Ge.ElementaryStream,i.timestampRolloverStream=new Ge.TimestampRolloverStream,i.adtsStream=new Ye,i.h264Stream=new ft,i.captionStream=new Ge.CaptionStream(e),i.coalesceStream=new lt(e,i.metadataStream),i.headOfPipeline=i.packetStream,i.packetStream.pipe(i.parseStream).pipe(i.elementaryStream).pipe(i.timestampRolloverStream),i.timestampRolloverStream.pipe(i.h264Stream),i.timestampRolloverStream.pipe(i.adtsStream),i.timestampRolloverStream.pipe(i.metadataStream).pipe(i.coalesceStream),i.h264Stream.pipe(i.captionStream).pipe(i.coalesceStream),i.elementaryStream.on("data",(function(a){var s;if("metadata"===a.type){for(s=a.tracks.length;s--;)t||"video"!==a.tracks[s].type?n||"audio"!==a.tracks[s].type||((n=a.tracks[s]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime):(t=a.tracks[s]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime;t&&!i.videoSegmentStream&&(i.coalesceStream.numberOfTracks++,i.videoSegmentStream=new st(t,e),i.videoSegmentStream.on("timelineStartInfo",(function(t){n&&!e.keepOriginalTimestamps&&(n.timelineStartInfo=t,i.audioSegmentStream.setEarliestDts(t.dts-r.baseMediaDecodeTime))})),i.videoSegmentStream.on("processedGopsInfo",r.trigger.bind(r,"gopInfo")),i.videoSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"videoSegmentTimingInfo")),i.videoSegmentStream.on("baseMediaDecodeTime",(function(e){n&&i.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),i.videoSegmentStream.on("timingInfo",r.trigger.bind(r,"videoTimingInfo")),i.h264Stream.pipe(i.videoSegmentStream).pipe(i.coalesceStream)),n&&!i.audioSegmentStream&&(i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new ot(n,e),i.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo")),i.audioSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"audioSegmentTimingInfo")),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream)),r.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t})}})),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("id3Frame",(function(e){e.dispatchType=i.metadataStream.dispatchType,r.trigger("id3Frame",e)})),i.coalesceStream.on("caption",this.trigger.bind(this,"caption")),i.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setBaseMediaDecodeTime=function(r){var i=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=r),n&&(n.timelineStartInfo.dts=void 0,n.timelineStartInfo.pts=void 0,de(n),i.audioTimestampRolloverStream&&i.audioTimestampRolloverStream.discontinuity()),t&&(i.videoSegmentStream&&(i.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,de(t),i.captionStream.reset()),i.timestampRolloverStream&&i.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){n&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var n=this.transmuxPipeline_;e.remux=t,n&&n.coalesceStream&&n.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.push=function(e){if(i){var t=pt(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),i=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){i=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},ut.prototype=new H;var vt,yt,_t,bt={Transmuxer:ut,VideoSegmentStream:st,AudioSegmentStream:ot,AUDIO_PROPERTIES:dt,VIDEO_PROPERTIES:ht,generateSegmentTimingInfo:gt},Tt=function(e){return e>>>0},St=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),(t+=String.fromCharCode(e[2]))+String.fromCharCode(e[3])},wt=Tt,kt=function e(t,n){var r,i,a,s,o,u=[];if(!n.length)return null;for(r=0;r<t.byteLength;)i=wt(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3]),a=St(t.subarray(r+4,r+8)),s=i>1?r+i:t.byteLength,a===n[0]&&(1===n.length?u.push(t.subarray(r+8,s)):(o=e(t.subarray(r+8,s),n.slice(1))).length&&(u=u.concat(o))),r=s;return u},Et=Tt,Ct=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},xt=function(e){for(var t,n,r=e.byteLength,i=[],a=1;a<r-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(i.push(a+2),a+=2):a++;if(0===i.length)return e;t=r-i.length,n=new Uint8Array(t);var s=0;for(a=0;a<t;s++,a++)s===i[0]&&(s++,i.shift()),n[a]=e[s];return n},It=Ee.CaptionStream,At=function(e,t){for(var n=e,r=0;r<t.length;r++){var i=t[r];if(n<i.size)return i;n-=i.size}return null},Ot=function(e,t){var n=kt(e,["moof","traf"]),r=kt(e,["mdat"]),i={},a=[];return r.forEach((function(e,t){var r=n[t];a.push({mdat:e,traf:r})})),a.forEach((function(e){var n,r,a=e.mdat,s=e.traf,o=function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:n.getUint32(4)},i=1&r.flags[2],a=2&r.flags[2],s=8&r.flags[2],o=16&r.flags[2],u=32&r.flags[2],l=65536&r.flags[0],c=131072&r.flags[0];return t=8,i&&(t+=4,r.baseDataOffset=n.getUint32(12),t+=4),a&&(r.sampleDescriptionIndex=n.getUint32(t),t+=4),s&&(r.defaultSampleDuration=n.getUint32(t),t+=4),o&&(r.defaultSampleSize=n.getUint32(t),t+=4),u&&(r.defaultSampleFlags=n.getUint32(t)),l&&(r.durationIsEmpty=!0),!i&&c&&(r.baseDataOffsetIsMoof=!0),r}(kt(s,["tfhd"])[0]),u=o.trackId,l=kt(s,["tfdt"]),c=l.length>0?function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4)),baseMediaDecodeTime:Et(e[4]<<24|e[5]<<16|e[6]<<8|e[7])};return 1===t.version&&(t.baseMediaDecodeTime*=Math.pow(2,32),t.baseMediaDecodeTime+=Et(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),t}(l[0]).baseMediaDecodeTime:0,d=kt(s,["trun"]);t===u&&d.length>0&&(n=function(e,t,n){var r=t,i=n.defaultSampleDuration||0,a=n.defaultSampleSize||0,s=n.trackId,o=[];return e.forEach((function(e){var t=function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},r=new DataView(e.buffer,e.byteOffset,e.byteLength),i=1&n.flags[2],a=4&n.flags[2],s=1&n.flags[1],o=2&n.flags[1],u=4&n.flags[1],l=8&n.flags[1],c=r.getUint32(4),d=8;for(i&&(n.dataOffset=r.getInt32(d),d+=4),a&&c&&(t={flags:Ct(e.subarray(d,d+4))},d+=4,s&&(t.duration=r.getUint32(d),d+=4),o&&(t.size=r.getUint32(d),d+=4),l&&(1===n.version?t.compositionTimeOffset=r.getInt32(d):t.compositionTimeOffset=r.getUint32(d),d+=4),n.samples.push(t),c--);c--;)t={},s&&(t.duration=r.getUint32(d),d+=4),o&&(t.size=r.getUint32(d),d+=4),u&&(t.flags=Ct(e.subarray(d,d+4)),d+=4),l&&(1===n.version?t.compositionTimeOffset=r.getInt32(d):t.compositionTimeOffset=r.getUint32(d),d+=4),n.samples.push(t);return n}(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=i),void 0===e.size&&(e.size=a),e.trackId=s,e.dts=r,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),e.pts=r+e.compositionTimeOffset,r+=e.duration})),o=o.concat(t)})),o}(d,c,o),r=function(e,t,n){var r,i,a,s,o=new DataView(e.buffer,e.byteOffset,e.byteLength),u=[];for(i=0;i+4<e.length;i+=a)if(a=o.getUint32(i),i+=4,!(a<=0))switch(31&e[i]){case 6:var l=e.subarray(i+1,i+1+a),c=At(i,t);if(r={nalUnitType:"sei_rbsp",size:a,data:l,escapedRBSP:xt(l),trackId:n},c)r.pts=c.pts,r.dts=c.dts,s=c;else{if(!s){console.log("We've encountered a nal unit without data. See mux.js#233.");break}r.pts=s.pts,r.dts=s.dts}u.push(r)}return u}(a,n,u),i[u]||(i[u]=[]),i[u]=i[u].concat(r))})),i},Pt=function(){var e,t,n,r,i,a,s=!1;this.isInitialized=function(){return s},this.init=function(t){e=new It,s=!0,a=!!t&&t.isPartial,e.on("data",(function(e){e.startTime=e.startPts/r,e.endTime=e.endPts/r,i.captions.push(e),i.captionStreams[e.stream]=!0}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&"object"==typeof t&&0===Object.keys(t).length||n===e[0]&&r===t[n])},this.parse=function(e,a,s){var o;if(!this.isInitialized())return null;if(!a||!s)return null;if(this.isNewInit(a,s))n=a[0],r=s[n];else if(null===n||!r)return t.push(e),null;for(;t.length>0;){var u=t.shift();this.parse(u,a,s)}return o=function(e,t,n){return null===t?null:{seiNals:Ot(e,t)[t],timescale:n}}(e,n,r),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),i):null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach((function(t){e.push(t)}))},this.flushStream=function(){if(!this.isInitialized())return null;a?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){i.captions=[],i.captionStreams={}},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],n=null,r=null,i?this.clearParsedCaptions():i={captions:[],captionStreams:{}},this.resetCaptionStream()},this.reset()},Lt=Tt,Dt=function(e){return("00"+e.toString(16)).slice(-2)};vt=function(e,t){var n,r,i;return n=kt(t,["moof","traf"]),r=[].concat.apply([],n.map((function(t){return kt(t,["tfhd"]).map((function(n){var r,i,a;return r=Lt(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),i=e[r]||9e4,a=kt(t,["tfdt"]).map((function(e){var t,n;return t=e[0],n=Lt(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),1===t&&(n*=Math.pow(2,32),n+=Lt(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),n}))[0],(a="number"!=typeof a||isNaN(a)?1/0:a)/i}))}))),i=Math.min.apply(null,r),isFinite(i)?i:0},_t=function(e){var t=0===e[0]?12:20;return Lt(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},yt=function(e){var t=kt(e,["moov","trak"]),n=[];return t.forEach((function(e){var t,r,i={},a=kt(e,["tkhd"])[0];a&&(r=(t=new DataView(a.buffer,a.byteOffset,a.byteLength)).getUint8(0),i.id=0===r?t.getUint32(12):t.getUint32(20));var s=kt(e,["mdia","hdlr"])[0];if(s){var o=St(s.subarray(8,12));i.type="vide"===o?"video":"soun"===o?"audio":o}var u=kt(e,["mdia","minf","stbl","stsd"])[0];if(u){var l=u.subarray(8);i.codec=St(l.subarray(4,8));var c,d=kt(l,[i.codec])[0];d&&(/^[a-z]vc[1-9]$/i.test(i.codec)?(c=d.subarray(78),"avcC"===St(c.subarray(4,8))&&c.length>11?(i.codec+=".",i.codec+=Dt(c[9]),i.codec+=Dt(c[10]),i.codec+=Dt(c[11])):i.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(i.codec)?(c=d.subarray(28),"esds"===St(c.subarray(4,8))&&c.length>20&&0!==c[19]?(i.codec+="."+Dt(c[19]),i.codec+="."+Dt(c[20]>>>2&63).replace(/^0/,"")):i.codec="mp4a.40.2"):i.codec=i.codec.toLowerCase())}var h=kt(e,["mdia","mdhd"])[0];h&&(i.timescale=_t(h)),n.push(i)})),n};var Rt=vt,Mt=yt,Nt=function(e){var t=31&e[1];return(t<<=8)|e[2]},Ut=function(e){return!!(64&e[1])},Ft=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},Bt=function(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},jt={parseType:function(e,t){var n=Nt(e);return 0===n?"pat":n===t?"pmt":t?"pes":null},parsePat:function(e){var t=Ut(e),n=4+Ft(e);return t&&(n+=e[n]+1),(31&e[n+10])<<8|e[n+11]},parsePmt:function(e){var t={},n=Ut(e),r=4+Ft(e);if(n&&(r+=e[r]+1),1&e[r+5]){var i;i=3+((15&e[r+1])<<8|e[r+2])-4;for(var a=12+((15&e[r+10])<<8|e[r+11]);a<i;){var s=r+a;t[(31&e[s+1])<<8|e[s+2]]=e[s],a+=5+((15&e[s+3])<<8|e[s+4])}return t}},parsePayloadUnitStartIndicator:Ut,parsePesType:function(e,t){switch(t[Nt(e)]){case Ce.H264_STREAM_TYPE:return"video";case Ce.ADTS_STREAM_TYPE:return"audio";case Ce.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!Ut(e))return null;var t=4+Ft(e);if(t>=e.byteLength)return null;var n,r=null;return 192&(n=e[t+7])&&((r={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,r.pts*=4,r.pts+=(6&e[t+13])>>>1,r.dts=r.pts,64&n&&(r.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,r.dts*=4,r.dts+=(6&e[t+18])>>>1)),r},videoPacketContainsKeyFrame:function(e){for(var t=4+Ft(e),n=e.subarray(t),r=0,i=0,a=!1;i<n.byteLength-3;i++)if(1===n[i+2]){r=i+5;break}for(;r<n.byteLength;)switch(n[r]){case 0:if(0!==n[r-1]){r+=2;break}if(0!==n[r-2]){r++;break}i+3!==r-2&&"slice_layer_without_partitioning_rbsp_idr"===Bt(31&n[i+3])&&(a=!0);do{r++}while(1!==n[r]&&r<n.length);i=r-2,r+=3;break;case 1:if(0!==n[r-1]||0!==n[r-2]){r+=3;break}"slice_layer_without_partitioning_rbsp_idr"===Bt(31&n[i+3])&&(a=!0),i=r-2,r+=3;break;default:r+=3}return n=n.subarray(i),r-=i,i=0,n&&n.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===Bt(31&n[i+3])&&(a=!0),a}},Ht=Le,Vt={};Vt.ts=jt,Vt.aac=at;var qt=ie,Wt=188,zt=71,Gt=function(e,t,n){for(var r,i,a,s,o=0,u=Wt,l=!1;u<=e.byteLength;)if(e[o]!==zt||e[u]!==zt&&u!==e.byteLength)o++,u++;else{if(r=e.subarray(o,u),"pes"===Vt.ts.parseType(r,t.pid)&&(i=Vt.ts.parsePesType(r,t.table),a=Vt.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(s=Vt.ts.parsePesTime(r))&&(s.type="audio",n.audio.push(s),l=!0)),l)break;o+=Wt,u+=Wt}for(o=(u=e.byteLength)-Wt,l=!1;o>=0;)if(e[o]!==zt||e[u]!==zt&&u!==e.byteLength)o--,u--;else{if(r=e.subarray(o,u),"pes"===Vt.ts.parseType(r,t.pid)&&(i=Vt.ts.parsePesType(r,t.table),a=Vt.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(s=Vt.ts.parsePesTime(r))&&(s.type="audio",n.audio.push(s),l=!0)),l)break;o-=Wt,u-=Wt}},Xt=function(e,t,n){for(var r,i,a,s,o,u,l,c=0,d=Wt,h=!1,f={data:[],size:0};d<e.byteLength;)if(e[c]!==zt||e[d]!==zt)c++,d++;else{if(r=e.subarray(c,d),"pes"===Vt.ts.parseType(r,t.pid)&&(i=Vt.ts.parsePesType(r,t.table),a=Vt.ts.parsePayloadUnitStartIndicator(r),"video"===i&&(a&&!h&&(s=Vt.ts.parsePesTime(r))&&(s.type="video",n.video.push(s),h=!0),!n.firstKeyFrame))){if(a&&0!==f.size){for(o=new Uint8Array(f.size),u=0;f.data.length;)l=f.data.shift(),o.set(l,u),u+=l.byteLength;if(Vt.ts.videoPacketContainsKeyFrame(o)){var p=Vt.ts.parsePesTime(o);p?(n.firstKeyFrame=p,n.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}f.size=0}f.data.push(r),f.size+=r.byteLength}if(h&&n.firstKeyFrame)break;c+=Wt,d+=Wt}for(c=(d=e.byteLength)-Wt,h=!1;c>=0;)if(e[c]!==zt||e[d]!==zt)c--,d--;else{if(r=e.subarray(c,d),"pes"===Vt.ts.parseType(r,t.pid)&&(i=Vt.ts.parsePesType(r,t.table),a=Vt.ts.parsePayloadUnitStartIndicator(r),"video"===i&&a&&(s=Vt.ts.parsePesTime(r))&&(s.type="video",n.video.push(s),h=!0)),h)break;c-=Wt,d-=Wt}},$t=function(e,t){var n;return n=Vt.aac.isLikelyAacData(e)?function(e){for(var t,n=!1,r=0,i=null,a=null,s=0,o=0;e.length-o>=3;){switch(Vt.aac.parseType(e,o)){case"timed-metadata":if(e.length-o<10){n=!0;break}if((s=Vt.aac.parseId3TagSize(e,o))>e.length){n=!0;break}null===a&&(t=e.subarray(o,o+s),a=Vt.aac.parseAacTimestamp(t)),o+=s;break;case"audio":if(e.length-o<7){n=!0;break}if((s=Vt.aac.parseAdtsSize(e,o))>e.length){n=!0;break}null===i&&(t=e.subarray(o,o+s),i=Vt.aac.parseSampleRate(t)),r++,o+=s;break;default:o++}if(n)return null}if(null===i||null===a)return null;var u=qt/i;return{audio:[{type:"audio",dts:a,pts:a},{type:"audio",dts:a+1024*r*u,pts:a+1024*r*u}]}}(e):function(e){var t={pid:null,table:null},n={};for(var r in function(e,t){for(var n,r=0,i=Wt;i<e.byteLength;)if(e[r]!==zt||e[i]!==zt)r++,i++;else{switch(n=e.subarray(r,i),Vt.ts.parseType(n,t.pid)){case"pat":t.pid||(t.pid=Vt.ts.parsePat(n));break;case"pmt":t.table||(t.table=Vt.ts.parsePmt(n))}if(t.pid&&t.table)return;r+=Wt,i+=Wt}}(e,t),t.table)if(t.table.hasOwnProperty(r))switch(t.table[r]){case Ce.H264_STREAM_TYPE:n.video=[],Xt(e,t,n),0===n.video.length&&delete n.video;break;case Ce.ADTS_STREAM_TYPE:n.audio=[],Gt(e,t,n),0===n.audio.length&&delete n.audio}return n}(e),n&&(n.audio||n.video)?(function(e,t){if(e.audio&&e.audio.length){var n=t;(void 0===n||isNaN(n))&&(n=e.audio[0].dts),e.audio.forEach((function(e){e.dts=Ht(e.dts,n),e.pts=Ht(e.pts,n),e.dtsTime=e.dts/qt,e.ptsTime=e.pts/qt}))}if(e.video&&e.video.length){var r=t;if((void 0===r||isNaN(r))&&(r=e.video[0].dts),e.video.forEach((function(e){e.dts=Ht(e.dts,r),e.pts=Ht(e.pts,r),e.dtsTime=e.dts/qt,e.ptsTime=e.pts/qt})),e.firstKeyFrame){var i=e.firstKeyFrame;i.dts=Ht(i.dts,r),i.pts=Ht(i.pts,r),i.dtsTime=i.dts/qt,i.ptsTime=i.pts/qt}}}(n,t),n):null},Kt=function(){function e(e,t){this.options=t||{},this.self=e,this.init()}var t=e.prototype;return t.init=function(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new bt.Transmuxer(this.options),function(e,t){t.on("data",(function(t){var n=t.initSegment;t.initSegment={data:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength};var r=t.data;t.data=r.buffer,e.postMessage({action:"data",segment:t,byteOffset:r.byteOffset,byteLength:r.byteLength},[t.data])})),t.on("done",(function(t){e.postMessage({action:"done"})})),t.on("gopInfo",(function(t){e.postMessage({action:"gopInfo",gopInfo:t})})),t.on("videoSegmentTimingInfo",(function(t){var n={start:{decode:se(t.start.dts),presentation:se(t.start.pts)},end:{decode:se(t.end.dts),presentation:se(t.end.pts)},baseMediaDecodeTime:se(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=se(t.prependedContentDuration)),e.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:n})})),t.on("audioSegmentTimingInfo",(function(t){var n={start:{decode:se(t.start.dts),presentation:se(t.start.pts)},end:{decode:se(t.end.dts),presentation:se(t.end.pts)},baseMediaDecodeTime:se(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=se(t.prependedContentDuration)),e.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:n})})),t.on("id3Frame",(function(t){e.postMessage({action:"id3Frame",id3Frame:t})})),t.on("caption",(function(t){e.postMessage({action:"caption",caption:t})})),t.on("trackinfo",(function(t){e.postMessage({action:"trackinfo",trackInfo:t})})),t.on("audioTimingInfo",(function(t){e.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:se(t.start),end:se(t.end)}})})),t.on("videoTimingInfo",(function(t){e.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:se(t.start),end:se(t.end)}})}))}(this.self,this.transmuxer)},t.pushMp4Captions=function(e){this.captionParser||(this.captionParser=new Pt,this.captionParser.init());var t=new Uint8Array(e.data,e.byteOffset,e.byteLength),n=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:"mp4Captions",captions:n&&n.captions||[],data:t.buffer},[t.buffer])},t.probeMp4StartTime=function(e){var t=e.timescales,n=e.data,r=Rt(t,n);this.self.postMessage({action:"probeMp4StartTime",startTime:r,data:n},[n.buffer])},t.probeMp4Tracks=function(e){var t=e.data,n=Mt(t);this.self.postMessage({action:"probeMp4Tracks",tracks:n,data:t},[t.buffer])},t.probeTs=function(e){var t=e.data,n=e.baseStartTime,r="number"!=typeof n||isNaN(n)?void 0:n*ie,i=$t(t,r),a=null;i&&((a={hasVideo:i.video&&2===i.video.length||!1,hasAudio:i.audio&&2===i.audio.length||!1}).hasVideo&&(a.videoStart=i.video[0].ptsTime),a.hasAudio&&(a.audioStart=i.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:a,data:t},[t.buffer])},t.clearAllMp4Captions=function(){this.captionParser&&this.captionParser.clearAllCaptions()},t.clearParsedMp4Captions=function(){this.captionParser&&this.captionParser.clearParsedCaptions()},t.push=function(e){var t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)},t.reset=function(){this.transmuxer.reset()},t.setTimestampOffset=function(e){var t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(ae(t)))},t.setAudioAppendStart=function(e){this.transmuxer.setAudioAppendStart(Math.ceil(ae(e.appendStart)))},t.setRemux=function(e){this.transmuxer.setRemux(e.remux)},t.flush=function(e){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})},t.endTimeline=function(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})},t.alignGopsWith=function(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())},e}();self.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new Kt(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new Kt(self)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}}))),jo=No(Bo),Ho=function(e){var t=e.transmuxer,n=e.bytes,r=e.audioAppendStart,i=e.gopsToAlignWith,a=e.remux,s=e.onData,o=e.onTrackInfo,u=e.onAudioTimingInfo,l=e.onVideoTimingInfo,c=e.onVideoSegmentTimingInfo,d=e.onAudioSegmentTimingInfo,h=e.onId3,f=e.onCaptions,p=e.onDone,m=e.onEndedTimeline,g=e.isEndOfTimeline,v={buffer:[]},y=g;if(t.onmessage=function(n){t.currentTransmux===e&&("data"===n.data.action&&function(e,t,n){var r=e.data.segment,i=r.type,a=r.initSegment,s=r.captions,o=r.captionStreams,u=r.metadata,l=r.videoFrameDtsTime,c=r.videoFramePtsTime;t.buffer.push({captions:s,captionStreams:o,metadata:u});var d=e.data.segment.boxes||{data:e.data.segment.data},h={type:i,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(a.data,a.byteOffset,a.byteLength)};void 0!==l&&(h.videoFrameDtsTime=l),void 0!==c&&(h.videoFramePtsTime=c),n(h)}(n,v,s),"trackinfo"===n.data.action&&o(n.data.trackInfo),"gopInfo"===n.data.action&&function(e,t){t.gopInfo=e.data.gopInfo}(n,v),"audioTimingInfo"===n.data.action&&u(n.data.audioTimingInfo),"videoTimingInfo"===n.data.action&&l(n.data.videoTimingInfo),"videoSegmentTimingInfo"===n.data.action&&c(n.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===n.data.action&&d(n.data.audioSegmentTimingInfo),"id3Frame"===n.data.action&&h([n.data.id3Frame],n.data.id3Frame.dispatchType),"caption"===n.data.action&&f(n.data.caption),"endedtimeline"===n.data.action&&(y=!1,m()),"transmuxed"===n.data.type&&(y||(t.onmessage=null,function(e){var t=e.transmuxedData,n=e.callback;t.buffer=[],n(t)}({transmuxedData:v,callback:p}),Vo(t))))},r&&t.postMessage({action:"setAudioAppendStart",appendStart:r}),Array.isArray(i)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:i}),void 0!==a&&t.postMessage({action:"setRemux",remux:a}),n.byteLength){var _=n instanceof ArrayBuffer?n:n.buffer,b=n instanceof ArrayBuffer?0:n.byteOffset;t.postMessage({action:"push",data:_,byteOffset:b,byteLength:n.byteLength},[_])}g&&t.postMessage({action:"endTimeline"}),t.postMessage({action:"flush"})},Vo=function(e){e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),"function"==typeof e.currentTransmux?e.currentTransmux():Ho(e.currentTransmux))},qo=function(e,t){e.postMessage({action:t}),Vo(e)},Wo=function(e){!function(e,t){if(!t.currentTransmux)return t.currentTransmux=e,void qo(t,e);t.transmuxQueue.push(qo.bind(null,t,e))}("reset",e)},zo=function(e){var t=e.transmuxer,n=e.endAction||e.action,r=e.callback,i=(0,o.Z)({},e,{endAction:null,transmuxer:null,callback:null});if(t.addEventListener("message",(function i(a){a.data.action===n&&(t.removeEventListener("message",i),a.data.data&&(a.data.data=new Uint8Array(a.data.data,e.byteOffset||0,e.byteLength||a.data.data.byteLength),e.data&&(e.data=a.data.data)),r(a.data))})),e.data){var a=e.data instanceof ArrayBuffer;i.byteOffset=a?0:e.data.byteOffset,i.byteLength=e.data.byteLength;var s=[a?e.data:e.data.buffer];t.postMessage(i,s)}else t.postMessage(i)},Go=-101,Xo=-102,$o=function(e){e.forEach((function(e){e.abort()}))},Ko=function(e,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:Go,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:Xo,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:2,xhr:t}:null},Zo=function(e){var t=e.segment,n=e.bytes,r=e.trackInfoFn,i=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,s=e.audioSegmentTimingInfoFn,o=e.id3Fn,u=e.captionsFn,l=e.isEndOfTimeline,c=e.endedTimelineFn,d=e.dataFn,h=e.doneFn,f=t.map&&t.map.tracks||{},p=Boolean(f.audio&&f.video),m=i.bind(null,t,"audio","start"),g=i.bind(null,t,"audio","end"),v=i.bind(null,t,"video","start"),y=i.bind(null,t,"video","end");zo({action:"probeTs",transmuxer:t.transmuxer,data:n,baseStartTime:t.baseStartTime,callback:function(e){t.bytes=n=e.data;var i=e.result;i&&(r(t,{hasAudio:i.hasAudio,hasVideo:i.hasVideo,isMuxed:p}),r=null,i.hasAudio&&!p&&m(i.audioStart),i.hasVideo&&v(i.videoStart),m=null,v=null),function(e){if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void Ho(e);e.transmuxer.transmuxQueue.push(e)}({bytes:n,transmuxer:t.transmuxer,audioAppendStart:t.audioAppendStart,gopsToAlignWith:t.gopsToAlignWith,remux:p,onData:function(e){e.type="combined"===e.type?"video":e.type,d(t,e)},onTrackInfo:function(e){r&&(p&&(e.isMuxed=!0),r(t,e))},onAudioTimingInfo:function(e){m&&void 0!==e.start&&(m(e.start),m=null),g&&void 0!==e.end&&g(e.end)},onVideoTimingInfo:function(e){v&&void 0!==e.start&&(v(e.start),v=null),y&&void 0!==e.end&&y(e.end)},onVideoSegmentTimingInfo:function(e){a(e)},onAudioSegmentTimingInfo:function(e){s(e)},onId3:function(e,n){o(t,e,n)},onCaptions:function(e){u(t,[e])},isEndOfTimeline:l,onEndedTimeline:function(){c()},onDone:function(e){h&&(e.type="combined"===e.type?"video":e.type,h(null,t,e))}})}})},Yo=function(e){var t=e.segment,n=e.bytes,r=e.trackInfoFn,i=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,s=e.audioSegmentTimingInfoFn,o=e.id3Fn,u=e.captionsFn,l=e.isEndOfTimeline,c=e.endedTimelineFn,d=e.dataFn,h=e.doneFn,f=new Uint8Array(n);if(function(e){return We(e,["moof"]).length>0}(f)){t.isFmp4=!0;var p=t.map.tracks,m={isFmp4:!0,hasVideo:!!p.video,hasAudio:!!p.audio};p.audio&&p.audio.codec&&"enca"!==p.audio.codec&&(m.audioCodec=p.audio.codec),p.video&&p.video.codec&&"encv"!==p.video.codec&&(m.videoCodec=p.video.codec),p.video&&p.audio&&(m.isMuxed=!0),r(t,m);var g=function(e){d(t,{data:f,type:m.hasAudio&&!m.isMuxed?"audio":"video"}),e&&e.length&&u(t,e),h(null,t,{})};zo({action:"probeMp4StartTime",timescales:t.map.timescales,data:f,transmuxer:t.transmuxer,callback:function(e){var r=e.data,a=e.startTime;n=r.buffer,t.bytes=f=r,m.hasAudio&&!m.isMuxed&&i(t,"audio","start",a),m.hasVideo&&i(t,"video","start",a),p.video&&r.byteLength&&t.transmuxer?zo({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:t.transmuxer,data:f,timescales:t.map.timescales,trackIds:[p.video.id],callback:function(e){n=e.data.buffer,t.bytes=f=e.data,g(e.captions)}}):g()}})}else if(t.transmuxer){if(void 0===t.container&&(t.container=ot(f)),"ts"!==t.container&&"aac"!==t.container)return r(t,{hasAudio:!1,hasVideo:!1}),void h(null,t,{});Zo({segment:t,bytes:n,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:u,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:h})}else h(null,t,{})},Qo=function(e){var t=e.xhr,n=e.xhrOptions,r=e.decryptionWorker,i=e.segment,a=e.abortFn,s=e.progressFn,o=e.trackInfoFn,u=e.timingInfoFn,l=e.videoSegmentTimingInfoFn,c=e.audioSegmentTimingInfoFn,d=e.id3Fn,h=e.captionsFn,f=e.isEndOfTimeline,p=e.endedTimelineFn,m=e.dataFn,g=e.doneFn,v=[],y=function(e){var t=e.activeXhrs,n=e.decryptionWorker,r=e.trackInfoFn,i=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,s=e.audioSegmentTimingInfoFn,o=e.id3Fn,u=e.captionsFn,l=e.isEndOfTimeline,c=e.endedTimelineFn,d=e.dataFn,h=e.doneFn,f=0,p=!1;return function(e,m){if(!p){if(e)return p=!0,$o(t),h(e,m);if((f+=1)===t.length){if(m.endOfAllRequests=Date.now(),m.encryptedBytes)return function(e){var t,n=e.decryptionWorker,r=e.segment,i=e.trackInfoFn,a=e.timingInfoFn,s=e.videoSegmentTimingInfoFn,o=e.audioSegmentTimingInfoFn,u=e.id3Fn,l=e.captionsFn,c=e.isEndOfTimeline,d=e.endedTimelineFn,h=e.dataFn,f=e.doneFn;n.addEventListener("message",(function e(t){if(t.data.source===r.requestId){n.removeEventListener("message",e);var p=t.data.decrypted;r.bytes=new Uint8Array(p.bytes,p.byteOffset,p.byteLength),Yo({segment:r,bytes:r.bytes,trackInfoFn:i,timingInfoFn:a,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:o,id3Fn:u,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:h,doneFn:f})}})),t=r.key.bytes.slice?r.key.bytes.slice():new Uint32Array(Array.prototype.slice.call(r.key.bytes)),n.postMessage(To({source:r.requestId,encrypted:r.encryptedBytes,key:t,iv:r.key.iv}),[r.encryptedBytes.buffer,t.buffer])}({decryptionWorker:n,segment:m,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:u,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:h});Yo({segment:m,bytes:m.bytes,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:u,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:h})}}}}({activeXhrs:v,decryptionWorker:r,trackInfoFn:o,timingInfoFn:u,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:h,isEndOfTimeline:f,endedTimelineFn:p,dataFn:m,doneFn:g});if(i.key&&!i.key.bytes){var _=Ss.mergeOptions(n,{uri:i.key.resolvedUri,responseType:"arraybuffer"}),b=function(e,t){return function(n,r){var i=r.response,a=Ko(n,r);if(a)return t(a,e);if(16!==i.byteLength)return t({status:r.status,message:"Invalid HLS key at URL: "+r.uri,code:2,xhr:r},e);var s=new DataView(i);return e.key.bytes=new Uint32Array([s.getUint32(0),s.getUint32(4),s.getUint32(8),s.getUint32(12)]),t(null,e)}}(i,y),T=t(_,b);v.push(T)}if(i.map&&!i.map.bytes){var S=Ss.mergeOptions(n,{uri:i.map.resolvedUri,responseType:"arraybuffer",headers:vo(i.map)}),w=function(e){var t=e.segment,n=e.finishProcessingFn;return function(e,r){var i=r.response,a=Ko(e,r);if(a)return n(a,t);if(0===i.byteLength)return n({status:r.status,message:"Empty HLS segment content at URL: "+r.uri,code:2,xhr:r},t);t.map.bytes=new Uint8Array(r.response);var s=ot(t.map.bytes);if("mp4"!==s)return n({status:r.status,message:"Found unsupported "+(s||"unknown")+" container for initialization segment at URL: "+r.uri,code:2,internal:!0,xhr:r},t);zo({action:"probeMp4Tracks",data:t.map.bytes,transmuxer:t.transmuxer,callback:function(e){var r=e.tracks,i=e.data;return t.map.bytes=i,r.forEach((function(e){t.map.tracks=t.map.tracks||{},t.map.tracks[e.type]||(t.map.tracks[e.type]=e,"number"==typeof e.id&&e.timescale&&(t.map.timescales=t.map.timescales||{},t.map.timescales[e.id]=e.timescale))})),n(null,t)}})}}({segment:i,finishProcessingFn:y}),k=t(S,w);v.push(k)}var E=Ss.mergeOptions(n,{uri:i.part&&i.part.resolvedUri||i.resolvedUri,responseType:"arraybuffer",headers:vo(i)}),C=t(E,function(e){var t=e.segment,n=e.finishProcessingFn,r=e.responseType;return function(e,i){var a=i.response,s=Ko(e,i);if(s)return n(s,t);var o="arraybuffer"!==r&&i.responseText?function(e){for(var t=new Uint8Array(new ArrayBuffer(e.length)),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t.buffer}(i.responseText.substring(t.lastReachedChar||0)):i.response;return 0===a.byteLength?n({status:i.status,message:"Empty HLS segment content at URL: "+i.uri,code:2,xhr:i},t):(t.stats=function(e){return{bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}}(i),t.key?t.encryptedBytes=new Uint8Array(o):t.bytes=new Uint8Array(o),n(null,t))}}({segment:i,finishProcessingFn:y,responseType:E.responseType}));C.addEventListener("progress",function(e){var t=e.segment,n=e.progressFn;return e.trackInfoFn,e.timingInfoFn,e.videoSegmentTimingInfoFn,e.audioSegmentTimingInfoFn,e.id3Fn,e.captionsFn,e.isEndOfTimeline,e.endedTimelineFn,e.dataFn,function(e){if(!e.target.aborted)return t.stats=Ss.mergeOptions(t.stats,(i=(r=e).target,(a={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-i.requestTime||0}).bytesReceived=r.loaded,a.bandwidth=Math.floor(a.bytesReceived/a.roundTripTime*8*1e3),a)),!t.stats.firstBytesReceivedAt&&t.stats.bytesReceived&&(t.stats.firstBytesReceivedAt=Date.now()),n(e,t);var r,i,a}}({segment:i,progressFn:s,trackInfoFn:o,timingInfoFn:u,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:h,isEndOfTimeline:f,endedTimelineFn:p,dataFn:m})),v.push(C);var x={};return v.forEach((function(e){e.addEventListener("loadend",function(e){var t=e.loadendState,n=e.abortFn;return function(e){e.target.aborted&&n&&!t.calledAbortFn&&(n(),t.calledAbortFn=!0)}}({loadendState:x,abortFn:a}))})),function(){return $o(v)}},Jo=xs("CodecUtils"),eu=function(e,t){var n=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&n.AUDIO&&e.mediaGroups.AUDIO[n.AUDIO]},tu=function(e){var t={};return e.forEach((function(e){var n=e.mediaType,r=e.type,i=e.details;t[n]=t[n]||[],t[n].push(B(""+r+i))})),Object.keys(t).forEach((function(e){if(t[e].length>1)return Jo("multiple "+e+" codecs found as attributes: "+t[e].join(", ")+". Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs."),void(t[e]=null);t[e]=t[e][0]})),t},nu=function(e){var t=0;return e.audio&&t++,e.video&&t++,t},ru=function(e,t){var n=t.attributes||{},r=tu(function(e){var t=e.attributes||{};if(t.CODECS)return j(t.CODECS)}(t)||[]);if(eu(e,t)&&!r.audio&&!function(e,t){if(!eu(e,t))return!0;var n=t.attributes||{},r=e.mediaGroups.AUDIO[n.AUDIO];for(var i in r)if(!r[i].uri&&!r[i].playlists)return!0;return!1}(e,t)){var i=tu(function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var n=e.mediaGroups.AUDIO[t];if(!n)return null;for(var r in n){var i=n[r];if(i.default&&i.playlists)return j(i.playlists[0].attributes.CODECS)}return null}(e,n.AUDIO)||[]);i.audio&&(r.audio=i.audio)}return r},iu=xs("PlaylistSelector"),au=function(e){if(e&&e.playlist){var t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||""})}},su=function(e,t){if(!e)return"";var n=i().getComputedStyle(e);return n?n[t]:""},ou=function(e,t){var n=e.slice();e.sort((function(e,r){var i=t(e,r);return 0===i?n.indexOf(e)-n.indexOf(r):i}))},uu=function(e,t){var n,r;return e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),n=n||i().Number.MAX_VALUE,t.attributes.BANDWIDTH&&(r=t.attributes.BANDWIDTH),n-(r||i().Number.MAX_VALUE)},lu=function(e,t,n,r,a,s){if(e){var o={bandwidth:t,width:n,height:r,limitRenditionByPlayerDimensions:a},u=e.playlists;ho.isAudioOnly(e)&&(u=s.getAudioTrackPlaylists_(),o.audioOnly=!0);var l=u.map((function(e){var t=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,n=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return{bandwidth:e.attributes&&e.attributes.BANDWIDTH||i().Number.MAX_VALUE,width:t,height:n,playlist:e}}));ou(l,(function(e,t){return e.bandwidth-t.bandwidth}));var c=(l=l.filter((function(e){return!ho.isIncompatible(e.playlist)}))).filter((function(e){return ho.isEnabled(e.playlist)}));c.length||(c=l.filter((function(e){return!ho.isDisabled(e.playlist)})));var d=c.filter((function(e){return e.bandwidth*Ro.BANDWIDTH_VARIANCE<t})),h=d[d.length-1],f=d.filter((function(e){return e.bandwidth===h.bandwidth}))[0];if(!1===a){var p=f||c[0]||l[0];if(p&&p.playlist){var m="sortedPlaylistReps";return f&&(m="bandwidthBestRep"),c[0]&&(m="enabledPlaylistReps"),iu("choosing "+au(p)+" using "+m+" with options",o),p.playlist}return iu("could not choose a playlist with options",o),null}var g=d.filter((function(e){return e.width&&e.height}));ou(g,(function(e,t){return e.width-t.width}));var v=g.filter((function(e){return e.width===n&&e.height===r}));h=v[v.length-1];var y,_,b,T=v.filter((function(e){return e.bandwidth===h.bandwidth}))[0];T||(_=(y=g.filter((function(e){return e.width>n||e.height>r}))).filter((function(e){return e.width===y[0].width&&e.height===y[0].height})),h=_[_.length-1],b=_.filter((function(e){return e.bandwidth===h.bandwidth}))[0]);var S=b||T||f||c[0]||l[0];if(S&&S.playlist){var w="sortedPlaylistReps";return b?w="resolutionPlusOneRep":T?w="resolutionBestRep":f?w="bandwidthBestRep":c[0]&&(w="enabledPlaylistReps"),iu("choosing "+au(S)+" using "+w+" with options",o),S.playlist}return iu("could not choose a playlist with options",o),null}},cu=function(){var e=this.useDevicePixelRatio&&i().devicePixelRatio||1;return lu(this.playlists.master,this.systemBandwidth,parseInt(su(this.tech_.el(),"width"),10)*e,parseInt(su(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)},du=function(e,t,n){var r,i;if(n&&n.cues)for(r=n.cues.length;r--;)(i=n.cues[r]).startTime>=e&&i.endTime<=t&&n.removeCue(i)},hu=function(e){return"number"==typeof e&&isFinite(e)},fu=1/60,pu=function(e){var t=e.startOfSegment,n=e.duration,r=e.segment,i=r.start,a=r.end,s=r.parts,o=e.playlist,u=o.mediaSequence,l=o.id,c=o.segments,d=void 0===c?[]:c,h=e.mediaIndex,f=e.partIndex,p=e.timeline,m=d.length-1,g="mediaIndex/partIndex increment";return e.getMediaInfoForTime?g="getMediaInfoForTime ("+e.getMediaInfoForTime+")":e.isSyncRequest&&(g="getSyncSegmentCandidate (isSyncRequest)"),(e.segment.uri?"segment":"pre-segment")+" ["+h+"/"+m+"]"+(f?" part ["+f+"/"+(s.length-1)+"]":"")+" mediaSequenceNumber ["+u+"/"+(u+m)+"] start/end ["+i+" => "+a+"] startOfSegment ["+t+"] duration ["+n+"] timeline ["+p+"] selected by ["+g+"] playlist ["+l+"]"},mu=function(e){return e+"TimingInfo"},gu=function(e){var t=e.timelineChangeController,n=e.currentTimeline,r=e.segmentTimeline,i=e.loaderType,a=e.audioDisabled;if(n===r)return!1;if("audio"===i){var s=t.lastTimelineChange({type:"main"});return!s||s.to!==r}if("main"===i&&a){var o=t.pendingTimelineChange({type:"audio"});return!o||o.to!==r}return!1},vu=function(e){var t=e.segmentDuration,n=e.maxDuration;return!!t&&Math.round(t)>n+qs},yu=function(e){function t(t,n){var r;if(r=e.call(this)||this,!t)throw new TypeError("Initialization settings are required");if("function"!=typeof t.currentTime)throw new TypeError("No currentTime getter specified");if(!t.mediaSource)throw new TypeError("No MediaSource specified");return r.bandwidth=t.bandwidth,r.throughput={rate:0,count:0},r.roundTrip=NaN,r.resetStats_(),r.mediaIndex=null,r.partIndex=null,r.hasPlayed_=t.hasPlayed,r.currentTime_=t.currentTime,r.seekable_=t.seekable,r.seeking_=t.seeking,r.duration_=t.duration,r.mediaSource_=t.mediaSource,r.vhs_=t.vhs,r.loaderType_=t.loaderType,r.currentMediaInfo_=void 0,r.startingMediaInfo_=void 0,r.segmentMetadataTrack_=t.segmentMetadataTrack,r.goalBufferLength_=t.goalBufferLength,r.sourceType_=t.sourceType,r.sourceUpdater_=t.sourceUpdater,r.inbandTextTracks_=t.inbandTextTracks,r.state_="INIT",r.timelineChangeController_=t.timelineChangeController,r.shouldSaveSegmentTimingInfo_=!0,r.parse708captions_=t.parse708captions,r.checkBufferTimeout_=null,r.error_=void 0,r.currentTimeline_=-1,r.pendingSegment_=null,r.xhrOptions_=null,r.pendingSegments_=[],r.audioDisabled_=!1,r.isPendingTimestampOffset_=!1,r.gopBuffer_=[],r.timeMapping_=0,r.safeAppend_=Ss.browser.IE_VERSION>=11,r.appendInitSegment_={audio:!0,video:!0},r.playlistOfLastInitSegment_={audio:null,video:null},r.callQueue_=[],r.loadQueue_=[],r.metadataQueue_={id3:[],caption:[]},r.waitingOnRemove_=!1,r.quotaExceededErrorRetryTimeout_=null,r.activeInitSegmentId_=null,r.initSegments_={},r.cacheEncryptionKeys_=t.cacheEncryptionKeys,r.keyCache_={},r.decrypter_=t.decrypter,r.syncController_=t.syncController,r.syncPoint_={segmentIndex:0,time:0},r.transmuxer_=r.createTransmuxer_(),r.triggerSyncInfoUpdate_=function(){return r.trigger("syncinfoupdate")},r.syncController_.on("syncinfoupdate",r.triggerSyncInfoUpdate_),r.mediaSource_.addEventListener("sourceopen",(function(){r.isEndOfStream_()||(r.ended_=!1)})),r.fetchAtBuffer_=!1,r.logger_=xs("SegmentLoader["+r.loaderType_+"]"),Object.defineProperty((0,u.Z)(r),"state",{get:function(){return this.state_},set:function(e){e!==this.state_&&(this.logger_(this.state_+" -> "+e),this.state_=e,this.trigger("statechange"))}}),r.sourceUpdater_.on("ready",(function(){r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),"main"===r.loaderType_&&r.timelineChangeController_.on("pendingtimelinechange",(function(){r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),"audio"===r.loaderType_&&r.timelineChangeController_.on("timelinechange",(function(){r.hasEnoughInfoToLoad_()&&r.processLoadQueue_(),r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),r}(0,l.Z)(t,e);var n=t.prototype;return n.createTransmuxer_=function(){return function(e){var t=new jo;t.currentTransmux=null,t.transmuxQueue=[];var n=t.terminate;return t.terminate=function(){return t.currentTransmux=null,t.transmuxQueue.length=0,n.call(t)},t.postMessage({action:"init",options:e}),t}({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_})},n.resetStats_=function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0},n.dispose=function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&i().clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()},n.setAudio=function(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())},n.abort=function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)},n.abort_=function(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,i().clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null},n.checkForAbort_=function(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)},n.error=function(e){return void 0!==e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_},n.endOfStream=function(){this.ended_=!0,this.transmuxer_&&Wo(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},n.buffered_=function(){if(!this.sourceUpdater_||!this.startingMediaInfo_)return Ss.createTimeRanges();if("main"===this.loaderType_){var e=this.startingMediaInfo_,t=e.hasAudio,n=e.hasVideo,r=e.isMuxed;if(n&&t&&!this.audioDisabled_&&!r)return this.sourceUpdater_.buffered();if(n)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()},n.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=So(e),r=this.initSegments_[n];return t&&!r&&e.bytes&&(this.initSegments_[n]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),r||e},n.segmentKey=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=wo(e),r=this.keyCache_[n];this.cacheEncryptionKeys_&&t&&!r&&e.bytes&&(this.keyCache_[n]=r={resolvedUri:e.resolvedUri,bytes:e.bytes});var i={resolvedUri:(r||e).resolvedUri};return r&&(i.bytes=r.bytes),i},n.couldBeginLoading_=function(){return this.playlist_&&!this.paused()},n.load=function(){if(this.monitorBuffer_(),this.playlist_)return"INIT"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY"))},n.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},n.playlist=function(e,t){if(void 0===t&&(t={}),e){var n=this.playlist_,r=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},"main"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));var i=null;if(n&&(n.id?i=n.id:n.uri&&(i=n.uri)),this.logger_("playlist update ["+i+" => "+(e.id||e.uri)+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!n||n.uri!==e.uri)return null!==this.mediaIndex&&this.resyncLoader(),this.currentMediaInfo_=void 0,void this.trigger("playlistupdate");var a=e.mediaSequence-n.mediaSequence;if(this.logger_("live window shift ["+a+"]"),null!==this.mediaIndex)if(this.mediaIndex-=a,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{var s=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!s.parts||!s.parts.length||!s.parts[this.partIndex])){var o=this.mediaIndex;this.logger_("currently processing part (index "+this.partIndex+") no longer exists."),this.resetLoader(),this.mediaIndex=o}}r&&(r.mediaIndex-=a,r.mediaIndex<0?(r.mediaIndex=null,r.partIndex=null):(r.mediaIndex>=0&&(r.segment=e.segments[r.mediaIndex]),r.partIndex>=0&&r.segment.parts&&(r.part=r.segment.parts[r.partIndex]))),this.syncController_.saveExpiredSegmentInfo(n,e)}},n.pause=function(){this.checkBufferTimeout_&&(i().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},n.paused=function(){return null===this.checkBufferTimeout_},n.resetEverything=function(e){this.ended_=!1,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"})},n.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},n.resyncLoader=function(){this.transmuxer_&&Wo(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})},n.remove=function(e,t,n,r){if(void 0===n&&(n=function(){}),void 0===r&&(r=!1),t===1/0&&(t=this.duration_()),t<=e)this.logger_("skipping remove because end ${end} is <= start ${start}");else if(this.sourceUpdater_&&this.startingMediaInfo_){var i=1,a=function(){0==--i&&n()};for(var s in!r&&this.audioDisabled_||(i++,this.sourceUpdater_.removeAudio(e,t,a)),(r||"main"===this.loaderType_)&&(this.gopBuffer_=function(e,t,n,r){for(var i=Math.ceil((t-r)*ut.ONE_SECOND_IN_TS),a=Math.ceil((n-r)*ut.ONE_SECOND_IN_TS),s=e.slice(),o=e.length;o--&&!(e[o].pts<=a););if(-1===o)return s;for(var u=o+1;u--&&!(e[u].pts<=i););return u=Math.max(u,0),s.splice(u,o-u+1),s}(this.gopBuffer_,e,t,this.timeMapping_),i++,this.sourceUpdater_.removeVideo(e,t,a)),this.inbandTextTracks_)du(e,t,this.inbandTextTracks_[s]);du(e,t,this.segmentMetadataTrack_),a()}else this.logger_("skipping remove because no source updater or starting media info")},n.monitorBuffer_=function(){this.checkBufferTimeout_&&i().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=i().setTimeout(this.monitorBufferTick_.bind(this),1)},n.monitorBufferTick_=function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&i().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=i().setTimeout(this.monitorBufferTick_.bind(this),500)},n.fillBuffer_=function(){if(!this.sourceUpdater_.updating()){var e=this.chooseNextRequest_();e&&("number"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e))}},n.isEndOfStream_=function(e,t,n){if(void 0===e&&(e=this.mediaIndex),void 0===t&&(t=this.playlist_),void 0===n&&(n=this.partIndex),!t||!this.mediaSource_)return!1;var r="number"==typeof e&&t.segments[e],i=e+1===t.segments.length,a=!r||!r.parts||n+1===r.parts.length;return t.endList&&"open"===this.mediaSource_.readyState&&i&&a},n.chooseNextRequest_=function(){var e=Zs(this.buffered_())||0,t=Math.max(0,e-this.currentTime_()),n=!this.hasPlayed_()&&t>=1,r=t>=this.goalBufferLength_(),i=this.playlist_.segments;if(!i.length||n||r)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_());var a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=function(e,t){var n=(void 0===t?{}:t).segments,r=void 0===n?[]:n;if(-1===e)return 0;var i=r.reduce((function(t,n,r){return n.timeline===e&&t.push(r),t}),[]);return i.length?i[Math.min(i.length-1,1)]:Math.max(r.length-1,0)}(this.currentTimeline_,this.playlist_);else if(null!==this.mediaIndex){var s=i[this.mediaIndex],o="number"==typeof this.partIndex?this.partIndex:-1;a.startOfSegment=s.end?s.end:e,s.parts&&s.parts[o+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=o+1):a.mediaIndex=this.mediaIndex+1}else{var u=ho.getMediaInfoForTime(this.playlist_,this.fetchAtBuffer_?e:this.currentTime_(),this.syncPoint_.segmentIndex,this.syncPoint_.time);a.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd":"currentTime",a.mediaIndex=u.mediaIndex,a.startOfSegment=u.startTime,a.partIndex=u.partIndex}var l=i[a.mediaIndex],c=l&&"number"==typeof a.partIndex&&l.parts&&l.parts[a.partIndex];if(!l||"number"==typeof a.partIndex&&!c)return null;"number"!=typeof a.partIndex&&l.parts&&(a.partIndex=0);var d=this.mediaSource_&&"ended"===this.mediaSource_.readyState;return a.mediaIndex>=i.length-1&&d&&!this.seeking_()?null:this.generateSegmentInfo_(a)},n.generateSegmentInfo_=function(e){var t=e.playlist,n=e.mediaIndex,r=e.startOfSegment,i=e.isSyncRequest,a=e.partIndex,s=e.forceTimestampOffset,o=e.getMediaInfoForTime,u=t.segments[n],l="number"==typeof a&&u.parts[a],c={requestId:"segment-loader-"+Math.random(),uri:l&&l.resolvedUri||u.resolvedUri,mediaIndex:n,partIndex:l?a:null,isSyncRequest:i,startOfSegment:r,playlist:t,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:u.timeline,duration:u.duration,segment:u,part:l,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:o},d=void 0!==s?s:this.isPendingTimestampOffset_;c.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:u.timeline,currentTimeline:this.currentTimeline_,startOfSegment:r,buffered:this.buffered_(),overrideCheck:d});var h=Zs(this.sourceUpdater_.audioBuffered());return"number"==typeof h&&(c.audioAppendStart=h-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(c.gopsToAlignWith=function(e,t,n){if(null==t||!e.length)return[];var r,i=Math.ceil((t-n+3)*ut.ONE_SECOND_IN_TS);for(r=0;r<e.length&&!(e[r].pts>i);r++);return e.slice(r)}(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),c},n.timestampOffsetForSegment_=function(e){return n=(t=e).segmentTimeline,r=t.currentTimeline,i=t.startOfSegment,a=t.buffered,t.overrideCheck||n!==r?n<r?i:a.length?a.end(a.length-1):i:null;var t,n,r,i,a},n.earlyAbortWhenNeeded_=function(e){if(!this.vhs_.tech_.paused()&&this.xhrOptions_.timeout&&this.playlist_.attributes.BANDWIDTH&&!(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)){var t=this.currentTime_(),n=e.bandwidth,r=this.pendingSegment_.duration,i=ho.estimateSegmentRequestTime(r,n,this.playlist_,e.bytesReceived),a=function(e,t,n){return void 0===n&&(n=1),((e.length?e.end(e.length-1):0)-t)/n}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(!(i<=a)){var s=function(e){var t=e.currentTime,n=e.bandwidth,r=e.duration,i=e.segmentDuration,a=e.timeUntilRebuffer,s=e.currentTimeline,o=e.syncController,u=e.master.playlists.filter((function(e){return!ho.isIncompatible(e)})),l=u.filter(ho.isEnabled);l.length||(l=u.filter((function(e){return!ho.isDisabled(e)})));var c=l.filter(ho.hasAttribute.bind(null,"BANDWIDTH")).map((function(e){var u=o.getSyncPoint(e,r,s,t)?1:2;return{playlist:e,rebufferingImpact:ho.estimateSegmentRequestTime(i,n,e)*u-a}})),d=c.filter((function(e){return e.rebufferingImpact<=0}));return ou(d,(function(e,t){return uu(t.playlist,e.playlist)})),d.length?d[0]:(ou(c,(function(e,t){return e.rebufferingImpact-t.rebufferingImpact})),c[0]||null)}({master:this.vhs_.playlists.master,currentTime:t,bandwidth:n,duration:this.duration_(),segmentDuration:r,timeUntilRebuffer:a,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(s){var o=i-a-s.rebufferingImpact,u=.5;a<=qs&&(u=1),!s.playlist||s.playlist.uri===this.playlist_.uri||o<u||(this.bandwidth=s.playlist.attributes.BANDWIDTH*Ro.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}}}},n.handleAbort_=function(e){this.logger_("Aborting "+pu(e)),this.mediaRequestsAborted+=1},n.handleProgress_=function(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger("progress")},n.handleTrackInfo_=function(e,t){this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;var n=Object.keys(e).sort(),r=Object.keys(t).sort();if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++){var a=n[i];if(a!==r[i])return!1;if(e[a]!==t[a])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_("trackinfo update",t),this.trigger("trackinfo")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()&&this.processCallQueue_()))},n.handleTimingInfo_=function(e,t,n,r){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)){var i=this.pendingSegment_,a=mu(t);i[a]=i[a]||{},i[a][n]=r,this.logger_("timinginfo: "+t+" - "+n+" - "+r),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}},n.handleCaptions_=function(e,t){var n=this;if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(0!==t.length)if(this.pendingSegment_.hasAppendedData_){var r=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),a={};t.forEach((function(e){a[e.stream]=a[e.stream]||{startTime:1/0,captions:[],endTime:0};var t=a[e.stream];t.startTime=Math.min(t.startTime,e.startTime+r),t.endTime=Math.max(t.endTime,e.endTime+r),t.captions.push(e)})),Object.keys(a).forEach((function(e){var t=a[e],s=t.startTime,o=t.endTime,u=t.captions,l=n.inbandTextTracks_;n.logger_("adding cues from "+s+" -> "+o+" for "+e),function(e,t,n){if(!e[n]){t.trigger({type:"usage",name:"vhs-608"}),t.trigger({type:"usage",name:"hls-608"});var r=t.textTracks().getTrackById(n);e[n]=r||t.addRemoteTextTrack({kind:"captions",id:n,label:n},!1).track}}(l,n.vhs_.tech_,e),du(s,o,l[e]),function(e){var t=e.inbandTextTracks,n=e.captionArray,r=e.timestampOffset;if(n){var a=i().WebKitDataCue||i().VTTCue;n.forEach((function(e){var n=e.stream;t[n].addCue(new a(e.startTime+r,e.endTime+r,e.text))}))}}({captionArray:u,inbandTextTracks:l,timestampOffset:r})})),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}else this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));else this.logger_("SegmentLoader received no captions from a caption event")},n.handleId3_=function(e,t,n){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(this.pendingSegment_.hasAppendedData_){var r=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();!function(e,t,n){e.metadataTrack_||(e.metadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,e.metadataTrack_.inBandMetadataTrackDispatchType=t)}(this.inbandTextTracks_,n,this.vhs_.tech_),function(e){var t=e.inbandTextTracks,n=e.metadataArray,r=e.timestampOffset,a=e.videoDuration;if(n){var s=i().WebKitDataCue||i().VTTCue,o=t.metadataTrack_;if(o&&(n.forEach((function(e){var t=e.cueTime+r;!("number"!=typeof t||i().isNaN(t)||t<0)&&t<1/0&&e.frames.forEach((function(e){var n=new s(t,t,e.value||e.url||e.data||"");n.frame=e,n.value=e,function(e){Object.defineProperties(e.frame,{id:{get:function(){return Ss.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key}},value:{get:function(){return Ss.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data}},privateData:{get:function(){return Ss.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data}}})}(n),o.addCue(n)}))})),o.cues&&o.cues.length)){for(var u=o.cues,l=[],c=0;c<u.length;c++)u[c]&&l.push(u[c]);var d=l.reduce((function(e,t){var n=e[t.startTime]||[];return n.push(t),e[t.startTime]=n,e}),{}),h=Object.keys(d).sort((function(e,t){return Number(e)-Number(t)}));h.forEach((function(e,t){var n=d[e],r=Number(h[t+1])||a;n.forEach((function(e){e.endTime=r}))}))}}}({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:r,videoDuration:this.duration_()})}else this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,n))},n.processMetadataQueue_=function(){this.metadataQueue_.id3.forEach((function(e){return e()})),this.metadataQueue_.caption.forEach((function(e){return e()})),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]},n.processCallQueue_=function(){var e=this.callQueue_;this.callQueue_=[],e.forEach((function(e){return e()}))},n.processLoadQueue_=function(){var e=this.loadQueue_;this.loadQueue_=[],e.forEach((function(e){return e()}))},n.hasEnoughInfoToLoad_=function(){if("audio"!==this.loaderType_)return!0;var e=this.pendingSegment_;return!(!e||this.currentMediaInfo_&&gu({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},n.hasEnoughInfoToAppend_=function(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;var e=this.pendingSegment_;if(!e||!e.trackInfo)return!1;var t=this.currentMediaInfo_,n=t.hasAudio,r=t.hasVideo,i=t.isMuxed;return!(r&&!e.videoTimingInfo||n&&!this.audioDisabled_&&!i&&!e.audioTimingInfo||gu({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},n.handleData_=function(e,t){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(!this.callQueue_.length&&this.hasEnoughInfoToAppend_()){var n=this.pendingSegment_;if(this.setTimeMapping_(n.timeline),this.updateMediaSecondsLoaded_(n.segment),"closed"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),n.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),n.isFmp4=e.isFmp4,n.timingInfo=n.timingInfo||{},n.isFmp4)this.trigger("fmp4"),n.timingInfo.start=n[mu(t.type)].start;else{var r,i="main"===this.loaderType_&&this.currentMediaInfo_.hasVideo;i&&(r=n.videoTimingInfo.start),n.timingInfo.start=this.trueSegmentStart_({currentStart:n.timingInfo.start,playlist:n.playlist,mediaIndex:n.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:i,firstVideoFrameTimeForData:r,videoTimingInfo:n.videoTimingInfo,audioTimingInfo:n.audioTimingInfo})}this.updateAppendInitSegmentStatus(n,t.type),this.updateSourceBufferTimestampOffset_(n),n.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(n,t)}}else this.callQueue_.push(this.handleData_.bind(this,e,t))},n.updateAppendInitSegmentStatus=function(e,t){"main"!==this.loaderType_||"number"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)},n.getInitSegmentAndUpdateState_=function(e){var t=e.type,n=e.initSegment,r=e.map,i=e.playlist;if(r){var a=So(r);if(this.activeInitSegmentId_===a)return null;n=this.initSegmentForMap(r,!0).bytes,this.activeInitSegmentId_=a}return n&&this.appendInitSegment_[t]?(this.playlistOfLastInitSegment_[t]=i,this.appendInitSegment_[t]=!1,this.activeInitSegmentId_=null,n):null},n.handleQuotaExceededError_=function(e,t){var n=this,r=e.segmentInfo,a=e.type,s=e.bytes,o=this.sourceUpdater_.audioBuffered(),u=this.sourceUpdater_.videoBuffered();o.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+Ks(o).join(", ")),u.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+Ks(u).join(", "));var l=o.length?o.start(0):0,c=o.length?o.end(o.length-1):0,d=u.length?u.start(0):0,h=u.length?u.end(u.length-1):0;if(c-l<=1&&h-d<=1)return this.logger_("On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: "+s.byteLength+", audio buffer: "+Ks(o).join(", ")+", video buffer: "+Ks(u).join(", ")+", "),this.error({message:"Quota exceeded error with append of a single segment of content",blacklistDuration:1/0}),void this.trigger("error");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:r,type:a,bytes:s}));var f=this.currentTime_()-1;this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to "+f),this.remove(0,f,(function(){n.logger_("On QUOTA_EXCEEDED_ERR, retrying append in 1s"),n.waitingOnRemove_=!1,n.quotaExceededErrorRetryTimeout_=i().setTimeout((function(){n.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),n.quotaExceededErrorRetryTimeout_=null,n.processCallQueue_()}),1e3)}),!0)},n.handleAppendError_=function(e,t){var n=e.segmentInfo,r=e.type,i=e.bytes;t&&(22!==t.code?(this.logger_("Received non QUOTA_EXCEEDED_ERR on append",t),this.error(r+" append of "+i.length+"b failed for segment #"+n.mediaIndex+" in playlist "+n.playlist.id),this.trigger("appenderror")):this.handleQuotaExceededError_({segmentInfo:n,type:r,bytes:i}))},n.appendToSourceBuffer_=function(e){var t,n,r,i=e.segmentInfo,a=e.type,s=e.initSegment,o=e.data,u=e.bytes;if(!u){var l=[o],c=o.byteLength;s&&(l.unshift(s),c+=s.byteLength),r=0,(t={bytes:c,segments:l}).bytes&&(n=new Uint8Array(t.bytes),t.segments.forEach((function(e){n.set(e,r),r+=e.byteLength}))),u=n}this.sourceUpdater_.appendBuffer({segmentInfo:i,type:a,bytes:u},this.handleAppendError_.bind(this,{segmentInfo:i,type:a,bytes:u}))},n.handleSegmentTimingInfo_=function(e,t,n){if(this.pendingSegment_&&t===this.pendingSegment_.requestId){var r=this.pendingSegment_.segment,i=e+"TimingInfo";r[i]||(r[i]={}),r[i].transmuxerPrependedSeconds=n.prependedContentDuration||0,r[i].transmuxedPresentationStart=n.start.presentation,r[i].transmuxedDecodeStart=n.start.decode,r[i].transmuxedPresentationEnd=n.end.presentation,r[i].transmuxedDecodeEnd=n.end.decode,r[i].baseMediaDecodeTime=n.baseMediaDecodeTime}},n.appendData_=function(e,t){var n=t.type,r=t.data;if(r&&r.byteLength&&("audio"!==n||!this.audioDisabled_)){var i=this.getInitSegmentAndUpdateState_({type:n,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:n,initSegment:i,data:r})}},n.loadSegment_=function(e){var t=this;this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),"number"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.hasEnoughInfoToLoad_()?this.updateTransmuxerAndRequestSegment_(e):this.loadQueue_.push((function(){var n=(0,o.Z)({},e,{forceTimestampOffset:!0});(0,o.Z)(e,t.generateSegmentInfo_(n)),t.isPendingTimestampOffset_=!1,t.updateTransmuxerAndRequestSegment_(e)}))},n.updateTransmuxerAndRequestSegment_=function(e){var t=this;this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));var n=this.createSimplifiedSegmentObj_(e),r=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),i=null!==this.mediaIndex,a=e.timeline!==this.currentTimeline_&&e.timeline>0,s=r||i&&a;this.logger_("Requesting "+pu(e)),n.map&&!n.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Qo({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:n,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:s,endedTimelineFn:function(){t.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this)})},n.trimBackBuffer_=function(e){var t=function(e,t,n){var r=t-Ro.BACK_BUFFER_LENGTH;e.length&&(r=Math.max(r,e.start(0)));var i=t-n;return Math.min(i,r)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)},n.createSimplifiedSegmentObj_=function(e){var t=e.segment,n=e.part,r={resolvedUri:n?n.resolvedUri:t.resolvedUri,byterange:n?n.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part},i=e.playlist.segments[e.mediaIndex-1];if(i&&i.timeline===t.timeline&&(i.videoTimingInfo?r.baseStartTime=i.videoTimingInfo.transmuxedDecodeEnd:i.audioTimingInfo&&(r.baseStartTime=i.audioTimingInfo.transmuxedDecodeEnd)),t.key){var a=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=a}return t.map&&(r.map=this.initSegmentForMap(t.map)),r},n.saveTransferStats_=function(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)},n.saveBandwidthRelatedStats_=function(e,t){this.pendingSegment_.byteLength=t.bytesReceived,e<fu?this.logger_("Ignoring segment's bandwidth because its duration of "+e+" is less than the min to record "+fu):(this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime)},n.handleTimeout_=function(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate")},n.segmentRequestFinished_=function(e,t,n){if(this.callQueue_.length)this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,n));else if(this.saveTransferStats_(t.stats),this.pendingSegment_&&t.requestId===this.pendingSegment_.requestId){if(e){if(this.pendingSegment_=null,this.state="READY",e.code===Xo)return;return this.pause(),e.code===Go?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error"))}var r=this.pendingSegment_;this.saveBandwidthRelatedStats_(r.duration,t.stats),r.endOfAllRequests=t.endOfAllRequests,n.gopInfo&&(this.gopBuffer_=function(e,t,n){if(!t.length)return e;if(n)return t.slice();for(var r=t[0].pts,i=0;i<e.length&&!(e[i].pts>=r);i++);return e.slice(0,i).concat(t)}(this.gopBuffer_,n.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(r)}},n.setTimeMapping_=function(e){var t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)},n.updateMediaSecondsLoaded_=function(e){"number"==typeof e.start&&"number"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration},n.shouldUpdateTransmuxerTimestampOffset_=function(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())},n.trueSegmentStart_=function(e){var t=e.currentStart,n=e.playlist,r=e.mediaIndex,i=e.firstVideoFrameTimeForData,a=e.currentVideoTimestampOffset,s=e.useVideoTimingInfo,o=e.videoTimingInfo,u=e.audioTimingInfo;if(void 0!==t)return t;if(!s)return u.start;var l=n.segments[r-1];return 0!==r&&l&&void 0!==l.start&&l.end===i+a?o.start:i},n.waitForAppendsToComplete_=function(e){if(!this.currentMediaInfo_)return this.error({message:"No starting media returned, likely due to an unsupported media format.",blacklistDuration:1/0}),void this.trigger("error");var t=this.currentMediaInfo_,n=t.hasAudio,r=t.hasVideo,i=t.isMuxed,a="main"===this.loaderType_&&r,s=!this.audioDisabled_&&n&&!i;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||"number"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);a&&e.waitingOnAppends++,s&&e.waitingOnAppends++,a&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),s&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))},n.checkAppendsDone_=function(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())},n.checkForIllegalMediaSwitch=function(e){var t=function(e,t,n){return"main"===e&&t&&n?n.hasAudio||n.hasVideo?t.hasVideo&&!n.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!t.hasVideo&&n.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null}(this.loaderType_,this.currentMediaInfo_,e);return!!t&&(this.error({message:t,blacklistDuration:1/0}),this.trigger("error"),!0)},n.updateSourceBufferTimestampOffset_=function(e){if(null!==e.timestampOffset&&"number"==typeof e.timingInfo.start&&!e.changedTimestampOffset&&"main"===this.loaderType_){var t=!1;e.timestampOffset-=e.timingInfo.start,e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger("timestampoffset")}},n.updateTimingInfoEnd_=function(e){e.timingInfo=e.timingInfo||{};var t="main"===this.loaderType_&&this.currentMediaInfo_.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;t&&(e.timingInfo.end="number"==typeof t.end?t.end:t.start+e.duration)},n.handleAppendsDone_=function(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var e=this.pendingSegment_;this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:"main"===this.loaderType_}),this.logger_("Appended "+pu(e));var t=function(e,t){if("hls"!==t)return null;var n,r,i,a,s=(n=e.audioTimingInfo,r=e.videoTimingInfo,i=n&&"number"==typeof n.start&&"number"==typeof n.end?n.end-n.start:0,a=r&&"number"==typeof r.start&&"number"==typeof r.end?r.end-r.start:0,Math.max(i,a));if(!s)return null;var o=e.playlist.targetDuration,u=vu({segmentDuration:s,maxDuration:2*o}),l=vu({segmentDuration:s,maxDuration:o}),c="Segment with index "+e.mediaIndex+" from playlist "+e.playlist.id+" has a duration of "+s+" when the reported duration is "+e.duration+" and the target duration is "+o+". For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1";return u||l?{severity:u?"warn":"info",message:c}:null}(e,this.sourceType_);if(t&&("warn"===t.severity?Ss.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",e.isSyncRequest)this.trigger("syncinfoupdate");else{this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),"main"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");var n=e.segment;n.end&&this.currentTime_()-n.end>3*e.playlist.targetDuration?this.resetEverything():(null!==this.mediaIndex&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),this.paused()||this.monitorBuffer_())}},n.recordThroughput_=function(e){if(e.duration<fu)this.logger_("Ignoring segment's throughput because its duration of "+e.duration+" is less than the min to record "+fu);else{var t=this.throughput.rate,n=Date.now()-e.endOfAllRequests+1,r=Math.floor(e.byteLength/n*8*1e3);this.throughput.rate+=(r-t)/++this.throughput.count}},n.addSegmentMetadataCue_=function(e){if(this.segmentMetadataTrack_){var t=e.segment,n=t.start,r=t.end;if(hu(n)&&hu(r)){du(n,r,this.segmentMetadataTrack_);var a=i().WebKitDataCue||i().VTTCue,s={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:n,end:r},o=new a(n,r,JSON.stringify(s));o.value=s,this.segmentMetadataTrack_.addCue(o)}}},t}(Ss.EventTarget);function _u(){}var bu,Tu=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))},Su=["video","audio"],wu=function(e,t){var n=t[e+"Buffer"];return n&&n.updating||t.queuePending[e]},ku=function e(t,n){if(0!==n.queue.length){var r=0,i=n.queue[r];if("mediaSource"!==i.type){if("mediaSource"!==t&&n.ready()&&"closed"!==n.mediaSource.readyState&&!wu(t,n)){if(i.type!==t){if(r=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];if("mediaSource"===r.type)return null;if(r.type===e)return n}return null}(t,n.queue),null===r)return;i=n.queue[r]}return n.queue.splice(r,1),n.queuePending[t]=i,i.action(t,n),i.doneFn?void 0:(n.queuePending[t]=null,void e(t,n))}}else n.updating()||"closed"===n.mediaSource.readyState||(n.queue.shift(),i.action(n),i.doneFn&&i.doneFn(),e("audio",n),e("video",n))}},Eu=function(e,t){var n=t[e+"Buffer"],r=Tu(e);n&&(n.removeEventListener("updateend",t["on"+r+"UpdateEnd_"]),n.removeEventListener("error",t["on"+r+"Error_"]),t.codecs[e]=null,t[e+"Buffer"]=null)},Cu=function(e,t){return e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t)},xu=function(e,t,n){return function(r,i){var a=i[r+"Buffer"];if(Cu(i.mediaSource,a)){i.logger_("Appending segment "+t.mediaIndex+"'s "+e.length+" bytes to "+r+"Buffer");try{a.appendBuffer(e)}catch(e){i.logger_("Error with code "+e.code+" "+(22===e.code?"(QUOTA_EXCEEDED_ERR) ":"")+"when appending segment "+t.mediaIndex+" to "+r+"Buffer"),i.queuePending[r]=null,n(e)}}}},Iu=function(e,t){return function(n,r){var i=r[n+"Buffer"];if(Cu(r.mediaSource,i)){r.logger_("Removing "+e+" to "+t+" from "+n+"Buffer");try{i.remove(e,t)}catch(i){r.logger_("Remove "+e+" to "+t+" from "+n+"Buffer failed")}}}},Au=function(e){return function(t,n){var r=n[t+"Buffer"];Cu(n.mediaSource,r)&&(n.logger_("Setting "+t+"timestampOffset to "+e),r.timestampOffset=e)}},Ou=function(e){return function(t,n){e()}},Pu=function(e){return function(t){if("open"===t.mediaSource.readyState){t.logger_("Calling mediaSource endOfStream("+(e||"")+")");try{t.mediaSource.endOfStream(e)}catch(e){Ss.log.warn("Failed to call media source endOfStream",e)}}}},Lu=function(e,t){return function(n){var r=Tu(e),i=V(t);n.logger_("Adding "+e+"Buffer with codec "+t+" to mediaSource");var a=n.mediaSource.addSourceBuffer(i);a.addEventListener("updateend",n["on"+r+"UpdateEnd_"]),a.addEventListener("error",n["on"+r+"Error_"]),n.codecs[e]=t,n[e+"Buffer"]=a}},Du=function(e){return function(t){var n=t[e+"Buffer"];if(Eu(e,t),Cu(t.mediaSource,n)){t.logger_("Removing "+e+"Buffer with codec "+t.codecs[e]+" from mediaSource");try{t.mediaSource.removeSourceBuffer(n)}catch(t){Ss.log.warn("Failed to removeSourceBuffer "+e+"Buffer",t)}}}},Ru=function(e){return function(t,n){var r=n[t+"Buffer"],i=V(e);Cu(n.mediaSource,r)&&n.codecs[t]!==e&&(n.logger_("changing "+t+"Buffer codec from "+n.codecs[t]+" to "+e),r.changeType(i),n.codecs[t]=e)}},Mu=function(e){var t=e.type,n=e.sourceUpdater,r=e.action,i=e.doneFn,a=e.name;n.queue.push({type:t,action:r,doneFn:i,name:a}),ku(t,n)},Nu=function(e,t){return function(n){if(t.queuePending[e]){var r=t.queuePending[e].doneFn;t.queuePending[e]=null,r&&r(t[e+"Error_"])}ku(e,t)}},Uu=function(e){function t(t){var n;return(n=e.call(this)||this).mediaSource=t,n.sourceopenListener_=function(){return ku("mediaSource",(0,u.Z)(n))},n.mediaSource.addEventListener("sourceopen",n.sourceopenListener_),n.logger_=xs("SourceUpdater"),n.audioTimestampOffset_=0,n.videoTimestampOffset_=0,n.queue=[],n.queuePending={audio:null,video:null},n.delayedAudioAppendQueue_=[],n.videoAppendQueued_=!1,n.codecs={},n.onVideoUpdateEnd_=Nu("video",(0,u.Z)(n)),n.onAudioUpdateEnd_=Nu("audio",(0,u.Z)(n)),n.onVideoError_=function(e){n.videoError_=e},n.onAudioError_=function(e){n.audioError_=e},n.createdSourceBuffers_=!1,n.initializedEme_=!1,n.triggeredReady_=!1,n}(0,l.Z)(t,e);var n=t.prototype;return n.initializedEme=function(){this.initializedEme_=!0,this.triggerReady()},n.hasCreatedSourceBuffers=function(){return this.createdSourceBuffers_},n.hasInitializedAnyEme=function(){return this.initializedEme_},n.ready=function(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()},n.createSourceBuffers=function(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())},n.triggerReady=function(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))},n.addSourceBuffer=function(e,t){Mu({type:"mediaSource",sourceUpdater:this,action:Lu(e,t),name:"addSourceBuffer"})},n.abort=function(e){Mu({type:e,sourceUpdater:this,action:function(e,t){if("open"===t.mediaSource.readyState){var n=t[e+"Buffer"];if(Cu(t.mediaSource,n)){t.logger_("calling abort on "+e+"Buffer");try{n.abort()}catch(t){Ss.log.warn("Failed to abort on "+e+"Buffer",t)}}}},name:"abort"})},n.removeSourceBuffer=function(e){this.canRemoveSourceBuffer()?Mu({type:"mediaSource",sourceUpdater:this,action:Du(e),name:"removeSourceBuffer"}):Ss.log.error("removeSourceBuffer is not supported!")},n.canRemoveSourceBuffer=function(){return!Ss.browser.IE_VERSION&&!Ss.browser.IS_FIREFOX&&i().MediaSource&&i().MediaSource.prototype&&"function"==typeof i().MediaSource.prototype.removeSourceBuffer},t.canChangeType=function(){return i().SourceBuffer&&i().SourceBuffer.prototype&&"function"==typeof i().SourceBuffer.prototype.changeType},n.canChangeType=function(){return this.constructor.canChangeType()},n.changeType=function(e,t){this.canChangeType()?Mu({type:e,sourceUpdater:this,action:Ru(t),name:"changeType"}):Ss.log.error("changeType is not supported!")},n.addOrChangeSourceBuffers=function(e){var t=this;if(!e||"object"!=typeof e||0===Object.keys(e).length)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach((function(n){var r=e[n];if(!t.hasCreatedSourceBuffers())return t.addSourceBuffer(n,r);t.canChangeType()&&t.changeType(n,r)}))},n.appendBuffer=function(e,t){var n=this,r=e.segmentInfo,i=e.type,a=e.bytes;if(this.processedAppend_=!0,"audio"===i&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_("delayed audio append of "+a.length+" until video append");if(Mu({type:i,sourceUpdater:this,action:xu(a,r||{mediaIndex:-1},t),doneFn:t,name:"appendBuffer"}),"video"===i){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;var s=this.delayedAudioAppendQueue_.slice();this.logger_("queuing delayed audio "+s.length+" appendBuffers"),this.delayedAudioAppendQueue_.length=0,s.forEach((function(e){n.appendBuffer.apply(n,e)}))}},n.audioBuffered=function(){return Cu(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Ss.createTimeRange()},n.videoBuffered=function(){return Cu(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Ss.createTimeRange()},n.buffered=function(){var e=Cu(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Cu(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){var n=null,r=null,i=0,a=[],s=[];if(!(e&&e.length&&t&&t.length))return Ss.createTimeRange();for(var o=e.length;o--;)a.push({time:e.start(o),type:"start"}),a.push({time:e.end(o),type:"end"});for(o=t.length;o--;)a.push({time:t.start(o),type:"start"}),a.push({time:t.end(o),type:"end"});for(a.sort((function(e,t){return e.time-t.time})),o=0;o<a.length;o++)"start"===a[o].type?2==++i&&(n=a[o].time):"end"===a[o].type&&1==--i&&(r=a[o].time),null!==n&&null!==r&&(s.push([n,r]),n=null,r=null);return Ss.createTimeRanges(s)}(this.audioBuffered(),this.videoBuffered())},n.setDuration=function(e,t){var n;void 0===t&&(t=_u),Mu({type:"mediaSource",sourceUpdater:this,action:(n=e,function(e){e.logger_("Setting mediaSource duration to "+n);try{e.mediaSource.duration=n}catch(e){Ss.log.warn("Failed to set media source duration",e)}}),name:"duration",doneFn:t})},n.endOfStream=function(e,t){void 0===e&&(e=null),void 0===t&&(t=_u),"string"!=typeof e&&(e=void 0),Mu({type:"mediaSource",sourceUpdater:this,action:Pu(e),name:"endOfStream",doneFn:t})},n.removeAudio=function(e,t,n){void 0===n&&(n=_u),this.audioBuffered().length&&0!==this.audioBuffered().end(0)?Mu({type:"audio",sourceUpdater:this,action:Iu(e,t),doneFn:n,name:"remove"}):n()},n.removeVideo=function(e,t,n){void 0===n&&(n=_u),this.videoBuffered().length&&0!==this.videoBuffered().end(0)?Mu({type:"video",sourceUpdater:this,action:Iu(e,t),doneFn:n,name:"remove"}):n()},n.updating=function(){return!(!wu("audio",this)&&!wu("video",this))},n.audioTimestampOffset=function(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(Mu({type:"audio",sourceUpdater:this,action:Au(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_},n.videoTimestampOffset=function(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset!==e&&(Mu({type:"video",sourceUpdater:this,action:Au(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_},n.audioQueueCallback=function(e){this.audioBuffer&&Mu({type:"audio",sourceUpdater:this,action:Ou(e),name:"callback"})},n.videoQueueCallback=function(e){this.videoBuffer&&Mu({type:"video",sourceUpdater:this,action:Ou(e),name:"callback"})},n.dispose=function(){var e=this;this.trigger("dispose"),Su.forEach((function(t){e.abort(t),e.canRemoveSourceBuffer()?e.removeSourceBuffer(t):e[t+"QueueCallback"]((function(){return Eu(t,e)}))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()},t}(Ss.EventTarget),Fu=function(e){return decodeURIComponent(escape(String.fromCharCode.apply(null,e)))},Bu=new Uint8Array("\n\n".split("").map((function(e){return e.charCodeAt(0)}))),ju=function(e){function t(t,n){var r;return void 0===n&&(n={}),(r=e.call(this,t,n)||this).mediaSource_=null,r.subtitlesTrack_=null,r.loaderType_="subtitle",r.featuresNativeTextTracks_=t.featuresNativeTextTracks,r.shouldSaveSegmentTimingInfo_=!1,r}(0,l.Z)(t,e);var n=t.prototype;return n.createTransmuxer_=function(){return null},n.buffered_=function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Ss.createTimeRanges();var e=this.subtitlesTrack_.cues,t=e[0].startTime,n=e[e.length-1].startTime;return Ss.createTimeRanges([[t,n]])},n.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=So(e),r=this.initSegments_[n];if(t&&!r&&e.bytes){var i=Bu.byteLength+e.bytes.byteLength,a=new Uint8Array(i);a.set(e.bytes),a.set(Bu,e.bytes.byteLength),this.initSegments_[n]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:a}}return r||e},n.couldBeginLoading_=function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()},n.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},n.track=function(e){return void 0===e||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_},n.remove=function(e,t){du(e,t,this.subtitlesTrack_)},n.fillBuffer_=function(){var e=this,t=this.chooseNextRequest_();if(t){if(null===this.syncController_.timestampOffsetForTimeline(t.timeline))return this.syncController_.one("timestampoffset",(function(){e.state="READY",e.paused()||e.monitorBuffer_()})),void(this.state="WAITING_ON_TIMELINE");this.loadSegment_(t)}},n.timestampOffsetForSegment_=function(){return null},n.chooseNextRequest_=function(){return this.skipEmptySegments_(e.prototype.chooseNextRequest_.call(this))},n.skipEmptySegments_=function(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e},n.stopForError=function(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")},n.segmentRequestFinished_=function(e,t,n){var r=this;if(this.subtitlesTrack_){if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return e.code===Go&&this.handleTimeout_(),e.code===Xo?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);var a=this.pendingSegment_;this.saveBandwidthRelatedStats_(a.duration,t.stats),this.state="APPENDING",this.trigger("appending");var s=a.segment;if(s.map&&(s.map.bytes=t.map.bytes),a.bytes=t.bytes,"function"!=typeof i().WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var o,u=function(){r.subtitlesTrack_.tech_.off("vttjsloaded",o),r.stopForError({message:"Error loading vtt.js"})};return o=function(){r.subtitlesTrack_.tech_.off("vttjserror",u),r.segmentRequestFinished_(e,t,n)},this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",o),void this.subtitlesTrack_.tech_.one("vttjserror",u)}s.requested=!0;try{this.parseVTTCues_(a)}catch(e){return void this.stopForError({message:e.message})}if(this.updateTimeMapping_(a,this.syncController_.timelines[a.timeline],this.playlist_),a.cues.length?a.timingInfo={start:a.cues[0].startTime,end:a.cues[a.cues.length-1].endTime}:a.timingInfo={start:a.startOfSegment,end:a.startOfSegment+a.duration},a.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");a.byteLength=a.bytes.byteLength,this.mediaSecondsLoaded+=s.duration,a.cues.forEach((function(e){r.subtitlesTrack_.addCue(r.featuresNativeTextTracks_?new(i().VTTCue)(e.startTime,e.endTime,e.text):e)})),function(e){var t=e.cues;if(t)for(var n=0;n<t.length;n++){for(var r=[],i=0,a=0;a<t.length;a++)t[n].startTime===t[a].startTime&&t[n].endTime===t[a].endTime&&t[n].text===t[a].text&&++i>1&&r.push(t[a]);r.length&&r.forEach((function(t){return e.removeCue(t)}))}}(this.subtitlesTrack_),this.handleAppendsDone_()}else this.state="READY"},n.handleData_=function(){},n.updateTimingInfoEnd_=function(){},n.parseVTTCues_=function(e){var t,n=!1;"function"==typeof i().TextDecoder?t=new(i().TextDecoder)("utf8"):(t=i().WebVTT.StringDecoder(),n=!0);var r=new(i().WebVTT.Parser)(i(),i().vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},r.oncue=e.cues.push.bind(e.cues),r.ontimestampmap=function(t){e.timestampmap=t},r.onparsingerror=function(e){Ss.log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){var a=e.segment.map.bytes;n&&(a=Fu(a)),r.parse(a)}var s=e.bytes;n&&(s=Fu(s)),r.parse(s),r.flush()},n.updateTimeMapping_=function(e,t,n){var r=e.segment;if(t)if(e.cues.length){var i=e.timestampmap,a=i.MPEGTS/ut.ONE_SECOND_IN_TS-i.LOCAL+t.mapping;if(e.cues.forEach((function(e){e.startTime+=a,e.endTime+=a})),!n.syncInfo){var s=e.cues[0].startTime,o=e.cues[e.cues.length-1].startTime;n.syncInfo={mediaSequence:n.mediaSequence+e.mediaIndex,time:Math.min(s,o-r.duration)}}}else r.empty=!0},t}(yu),Hu=function(e,t){for(var n=e.cues,r=0;r<n.length;r++){var i=n[r];if(t>=i.adStartTime&&t<=i.adEndTime)return i}return null},Vu=function(e,t,n){void 0===n&&(n=0);var r=t.segments;return t.endList||0===n?e:r.length-(e+1)},qu=[{name:"VOD",run:function(e,t,n,r,i){return n!==1/0?{time:0,segmentIndex:0}:null}},{name:"ProgramDateTime",run:function(e,t,n,r,i){if(!Object.keys(e.timelineToDatetimeMappings).length)return null;var a=t.segments||[],s=null,o=null;i=i||0;for(var u=0;u<a.length;u++){var l=Vu(u,t,i),c=a[l],d=e.timelineToDatetimeMappings[c.timeline];if(d&&c.dateTimeObject){var h=c.dateTimeObject.getTime()/1e3+d,f=Math.abs(i-h);if(null!==o&&(0===f||o<f))break;o=f,s={time:h,segmentIndex:l}}}return s}},{name:"Segment",run:function(e,t,n,r,i){var a=t.segments||[],s=null,o=null;i=i||0;for(var u=0;u<a.length;u++){var l=Vu(u,t,i),c=a[l];if(c.timeline===r&&void 0!==c.start){var d=Math.abs(i-c.start);if(null!==o&&o<d)break;(!s||null===o||o>=d)&&(o=d,s={time:c.start,segmentIndex:l})}}return s}},{name:"Discontinuity",run:function(e,t,n,r,i){var a=null;if(i=i||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var s=null,o=0;o<t.discontinuityStarts.length;o++){var u=t.discontinuityStarts[o],l=t.discontinuitySequence+o+1,c=e.discontinuities[l];if(c){var d=Math.abs(i-c.time);if(null!==s&&s<d)break;(!a||null===s||s>=d)&&(s=d,a={time:c.time,segmentIndex:u})}}return a}},{name:"Playlist",run:function(e,t,n,r,i){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence}:null}}],Wu=function(e){function t(t){var n;return(n=e.call(this)||this).timelines=[],n.discontinuities=[],n.timelineToDatetimeMappings={},n.logger_=xs("SyncController"),n}(0,l.Z)(t,e);var n=t.prototype;return n.getSyncPoint=function(e,t,n,r){var i=this.runStrategies_(e,t,n,r);return i.length?this.selectSyncPoint_(i,{key:"time",value:r}):null},n.getExpiredTime=function(e,t){if(!e||!e.segments)return null;var n=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!n.length)return null;var r=this.selectSyncPoint_(n,{key:"segmentIndex",value:0});return r.segmentIndex>0&&(r.time*=-1),Math.abs(r.time+to(e,r.segmentIndex,0))},n.runStrategies_=function(e,t,n,r){for(var i=[],a=0;a<qu.length;a++){var s=qu[a],o=s.run(this,e,t,n,r);o&&(o.strategy=s.name,i.push({strategy:s.name,syncPoint:o}))}return i},n.selectSyncPoint_=function(e,t){for(var n=e[0].syncPoint,r=Math.abs(e[0].syncPoint[t.key]-t.value),i=e[0].strategy,a=1;a<e.length;a++){var s=Math.abs(e[a].syncPoint[t.key]-t.value);s<r&&(r=s,n=e[a].syncPoint,i=e[a].strategy)}return this.logger_("syncPoint for ["+t.key+": "+t.value+"] chosen with strategy ["+i+"]: [time:"+n.time+", segmentIndex:"+n.segmentIndex+"]"),n},n.saveExpiredSegmentInfo=function(e,t){for(var n=t.mediaSequence-e.mediaSequence-1;n>=0;n--){var r=e.segments[n];if(r&&void 0!==r.start){t.syncInfo={mediaSequence:e.mediaSequence+n,time:r.start},this.logger_("playlist refresh sync: [time:"+t.syncInfo.time+", mediaSequence: "+t.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}},n.setDateTimeMappingForStart=function(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){var t=e.segments[0],n=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-n}},n.saveSegmentTimingInfo=function(e){var t=e.segmentInfo,n=e.shouldSaveTimelineMapping,r=this.calculateSegmentTimeMapping_(t,t.timingInfo,n),i=t.segment;r&&(this.saveDiscontinuitySyncInfo_(t),t.playlist.syncInfo||(t.playlist.syncInfo={mediaSequence:t.playlist.mediaSequence+t.mediaIndex,time:i.start}));var a=i.dateTimeObject;i.discontinuity&&n&&a&&(this.timelineToDatetimeMappings[i.timeline]=-a.getTime()/1e3)},n.timestampOffsetForTimeline=function(e){return void 0===this.timelines[e]?null:this.timelines[e].time},n.mappingForTimeline=function(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping},n.calculateSegmentTimeMapping_=function(e,t,n){var r=e.segment,i=this.timelines[e.timeline];if("number"==typeof e.timestampOffset)i={time:e.startOfSegment,mapping:e.startOfSegment-t.start},n&&(this.timelines[e.timeline]=i,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+e.timeline+": [time: "+i.time+"] [mapping: "+i.mapping+"]")),r.start=e.startOfSegment,r.end=t.end+i.mapping;else{if(!i)return!1;r.start=t.start+i.mapping,r.end=t.end+i.mapping}return!0},n.saveDiscontinuitySyncInfo_=function(e){var t=e.playlist,n=e.segment;if(n.discontinuity)this.discontinuities[n.timeline]={time:n.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(var r=0;r<t.discontinuityStarts.length;r++){var i=t.discontinuityStarts[r],a=t.discontinuitySequence+r+1,s=i-e.mediaIndex,o=Math.abs(s);if(!this.discontinuities[a]||this.discontinuities[a].accuracy>o){var u;u=s<0?n.start-to(t,e.mediaIndex,i):n.end+to(t,e.mediaIndex+1,i),this.discontinuities[a]={time:u,accuracy:o}}}},n.dispose=function(){this.trigger("dispose"),this.off()},t}(Ss.EventTarget),zu=function(e){function t(){var t;return(t=e.call(this)||this).pendingTimelineChanges_={},t.lastTimelineChanges_={},t}(0,l.Z)(t,e);var n=t.prototype;return n.clearPendingTimelineChange=function(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")},n.pendingTimelineChange=function(e){var t=e.type,n=e.from,r=e.to;return"number"==typeof n&&"number"==typeof r&&(this.pendingTimelineChanges_[t]={type:t,from:n,to:r},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[t]},n.lastTimelineChange=function(e){var t=e.type,n=e.from,r=e.to;return"number"==typeof n&&"number"==typeof r&&(this.lastTimelineChanges_[t]={type:t,from:n,to:r},delete this.pendingTimelineChanges_[t],this.trigger("timelinechange")),this.lastTimelineChanges_[t]},n.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},t}(Ss.EventTarget),Gu=Uo(Fo((function(){function e(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var t=e((function(e){function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0})),n=e((function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,t(n,r)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0})),r=e((function(e){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0})),i=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(n,1),n>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,r=0;r<n;++r)t[r].call(this,arguments[1]);else for(var i=Array.prototype.slice.call(arguments,1),a=t.length,s=0;s<a;++s)t[s].apply(this,i)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}(),a=null,s=function(){function e(e){var t,n,r;a||(a=function(){var e,t,n,r,i,a,s,o,u=[[[],[],[],[],[]],[[],[],[],[],[]]],l=u[0],c=u[1],d=l[4],h=c[4],f=[],p=[];for(e=0;e<256;e++)p[(f[e]=e<<1^283*(e>>7))^e]=e;for(t=n=0;!d[t];t^=r||1,n=p[n]||1)for(a=(a=n^n<<1^n<<2^n<<3^n<<4)>>8^255&a^99,d[t]=a,h[a]=t,o=16843009*f[i=f[r=f[t]]]^65537*i^257*r^16843008*t,s=257*f[a]^16843008*a,e=0;e<4;e++)l[e][t]=s=s<<24^s>>>8,c[e][a]=o=o<<24^o>>>8;for(e=0;e<5;e++)l[e]=l[e].slice(0),c[e]=c[e].slice(0);return u}()),this._tables=[[a[0][0].slice(),a[0][1].slice(),a[0][2].slice(),a[0][3].slice(),a[0][4].slice()],[a[1][0].slice(),a[1][1].slice(),a[1][2].slice(),a[1][3].slice(),a[1][4].slice()]];var i=this._tables[0][4],s=this._tables[1],o=e.length,u=1;if(4!==o&&6!==o&&8!==o)throw new Error("Invalid aes key size");var l=e.slice(0),c=[];for(this._key=[l,c],t=o;t<4*o+28;t++)r=l[t-1],(t%o==0||8===o&&t%o==4)&&(r=i[r>>>24]<<24^i[r>>16&255]<<16^i[r>>8&255]<<8^i[255&r],t%o==0&&(r=r<<8^r>>>24^u<<24,u=u<<1^283*(u>>7))),l[t]=l[t-o]^r;for(n=0;t;n++,t--)r=l[3&n?t:t-4],c[n]=t<=4||n<4?r:s[0][i[r>>>24]]^s[1][i[r>>16&255]]^s[2][i[r>>8&255]]^s[3][i[255&r]]}return e.prototype.decrypt=function(e,t,n,r,i,a){var s,o,u,l,c=this._key[1],d=e^c[0],h=r^c[1],f=n^c[2],p=t^c[3],m=c.length/4-2,g=4,v=this._tables[1],y=v[0],_=v[1],b=v[2],T=v[3],S=v[4];for(l=0;l<m;l++)s=y[d>>>24]^_[h>>16&255]^b[f>>8&255]^T[255&p]^c[g],o=y[h>>>24]^_[f>>16&255]^b[p>>8&255]^T[255&d]^c[g+1],u=y[f>>>24]^_[p>>16&255]^b[d>>8&255]^T[255&h]^c[g+2],p=y[p>>>24]^_[d>>16&255]^b[h>>8&255]^T[255&f]^c[g+3],g+=4,d=s,h=o,f=u;for(l=0;l<4;l++)i[(3&-l)+a]=S[d>>>24]<<24^S[h>>16&255]<<16^S[f>>8&255]<<8^S[255&p]^c[g++],s=d,d=h,h=f,f=p,p=s},e}(),o=function(e){function t(){var t;return(t=e.call(this,i)||this).jobs=[],t.delay=1,t.timeout_=null,t}r(t,e);var n=t.prototype;return n.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},n.push=function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},t}(i),u=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},l=function(){function e(t,n,r,i){var a=e.STEP,s=new Int32Array(t.buffer),l=new Uint8Array(t.byteLength),c=0;for(this.asyncStream_=new o,this.asyncStream_.push(this.decryptChunk_(s.subarray(c,c+a),n,r,l)),c=a;c<s.length;c+=a)r=new Uint32Array([u(s[c-4]),u(s[c-3]),u(s[c-2]),u(s[c-1])]),this.asyncStream_.push(this.decryptChunk_(s.subarray(c,c+a),n,r,l));this.asyncStream_.push((function(){var e;i(null,(e=l).subarray(0,e.byteLength-e[e.byteLength-1]))}))}return e.prototype.decryptChunk_=function(e,t,n,r){return function(){var i=function(e,t,n){var r,i,a,o,l,c,d,h,f,p=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),m=new s(Array.prototype.slice.call(t)),g=new Uint8Array(e.byteLength),v=new Int32Array(g.buffer);for(r=n[0],i=n[1],a=n[2],o=n[3],f=0;f<p.length;f+=4)l=u(p[f]),c=u(p[f+1]),d=u(p[f+2]),h=u(p[f+3]),m.decrypt(l,c,d,h,v,f),v[f]=u(v[f]^r),v[f+1]=u(v[f+1]^i),v[f+2]=u(v[f+2]^a),v[f+3]=u(v[f+3]^o),r=l,i=c,a=d,o=h;return g}(e,t,n);r.set(i,e.byteOffset)}},t(e,null,[{key:"STEP",get:function(){return 32e3}}]),e}();self.onmessage=function(e){var t=e.data,n=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),r=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),i=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new l(n,r,i,(function(e,n){var r,i;self.postMessage((r={source:t.source,decrypted:n},i={},Object.keys(r).forEach((function(e){var t=r[e];ArrayBuffer.isView(t)?i[e]={bytes:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength}:i[e]=t})),i),[n.buffer])}))}}))),Xu=No(Gu),$u=function(e){var t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},Ku=function(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Zu=function(e,t){t.activePlaylistLoader=e,e.load()},Yu={AUDIO:function(e,t){return function(){var n=t.segmentLoaders[e],r=t.mediaTypes[e],i=t.blacklistCurrentPlaylist;Ku(n,r);var a=r.activeTrack(),s=r.activeGroup(),o=(s.filter((function(e){return e.default}))[0]||s[0]).id,u=r.tracks[o];if(a!==u){for(var l in Ss.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),r.tracks)r.tracks[l].enabled=r.tracks[l]===u;r.onTrackChanged()}else i({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(e,t){return function(){var n=t.segmentLoaders[e],r=t.mediaTypes[e];Ss.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),Ku(n,r);var i=r.activeTrack();i&&(i.mode="disabled"),r.onTrackChanged()}}},Qu={AUDIO:function(e,t,n){if(t){var r=n.tech,i=n.requestOptions,a=n.segmentLoaders[e];t.on("loadedmetadata",(function(){var e=t.media();a.playlist(e,i),(!r.paused()||e.endList&&"none"!==r.preload())&&a.load()})),t.on("loadedplaylist",(function(){a.playlist(t.media(),i),r.paused()||a.load()})),t.on("error",Yu[e](e,n))}},SUBTITLES:function(e,t,n){var r=n.tech,i=n.requestOptions,a=n.segmentLoaders[e],s=n.mediaTypes[e];t.on("loadedmetadata",(function(){var e=t.media();a.playlist(e,i),a.track(s.activeTrack()),(!r.paused()||e.endList&&"none"!==r.preload())&&a.load()})),t.on("loadedplaylist",(function(){a.playlist(t.media(),i),r.paused()||a.load()})),t.on("error",Yu[e](e,n))}},Ju={AUDIO:function(e,t){var n=t.vhs,r=t.sourceType,i=t.segmentLoaders[e],a=t.requestOptions,s=t.master.mediaGroups,o=t.mediaTypes[e],u=o.groups,l=o.tracks,c=o.logger_,d=t.masterPlaylistLoader,h=co(d.master);for(var f in s[e]&&0!==Object.keys(s[e]).length||(s[e]={main:{default:{default:!0}}}),s[e])for(var p in u[f]||(u[f]=[]),s[e][f]){var m=s[e][f][p],g=void 0;if(h?(c("AUDIO group '"+f+"' label '"+p+"' is a master playlist"),m.isMasterPlaylist=!0,g=null):g="vhs-json"===r&&m.playlists?new Vs(m.playlists[0],n,a):m.resolvedUri?new Vs(m.resolvedUri,n,a):m.playlists&&"dash"===r?new Do(m.playlists[0],n,a,d):null,m=Ss.mergeOptions({id:p,playlistLoader:g},m),Qu[e](e,m.playlistLoader,t),u[f].push(m),void 0===l[p]){var v=new Ss.AudioTrack({id:p,kind:$u(m),enabled:!1,language:m.language,default:m.default,label:p});l[p]=v}}i.on("error",Yu[e](e,t))},SUBTITLES:function(e,t){var n=t.tech,r=t.vhs,i=t.sourceType,a=t.segmentLoaders[e],s=t.requestOptions,o=t.master.mediaGroups,u=t.mediaTypes[e],l=u.groups,c=u.tracks,d=t.masterPlaylistLoader;for(var h in o[e])for(var f in l[h]||(l[h]=[]),o[e][h])if(!o[e][h][f].forced){var p=o[e][h][f],m=void 0;if("hls"===i)m=new Vs(p.resolvedUri,r,s);else if("dash"===i){if(!p.playlists.filter((function(e){return e.excludeUntil!==1/0})).length)return;m=new Do(p.playlists[0],r,s,d)}else"vhs-json"===i&&(m=new Vs(p.playlists?p.playlists[0]:p.resolvedUri,r,s));if(p=Ss.mergeOptions({id:f,playlistLoader:m},p),Qu[e](e,p.playlistLoader,t),l[h].push(p),void 0===c[f]){var g=n.addRemoteTextTrack({id:f,kind:"subtitles",default:p.default&&p.autoselect,language:p.language,label:f},!1).track;c[f]=g}}a.on("error",Yu[e](e,t))},"CLOSED-CAPTIONS":function(e,t){var n=t.tech,r=t.master.mediaGroups,i=t.mediaTypes[e],a=i.groups,s=i.tracks;for(var o in r[e])for(var u in a[o]||(a[o]=[]),r[e][o]){var l=r[e][o][u];if(l.instreamId.match(/CC\d/)&&(a[o].push(Ss.mergeOptions({id:u},l)),void 0===s[u])){var c=n.addRemoteTextTrack({id:l.instreamId,kind:"captions",default:l.default&&l.autoselect,language:l.language,label:u},!1).track;s[u]=c}}}},el=function e(t,n){for(var r=0;r<t.length;r++){if(uo(n,t[r]))return!0;if(t[r].playlists&&e(t[r].playlists,n))return!0}return!1},tl={AUDIO:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var r in n)if(n[r].enabled)return n[r];return null}},SUBTITLES:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var r in n)if("showing"===n[r].mode||"hidden"===n[r].mode)return n[r];return null}}},nl=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred"],rl=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]},il=function(e){function t(t){var n;n=e.call(this)||this;var r=t.src,a=t.handleManifestRedirects,s=t.withCredentials,o=t.tech,l=t.bandwidth,c=t.externVhs,d=t.useCueTags,h=t.blacklistDuration,f=t.enableLowInitialPlaylist,p=t.sourceType,m=t.cacheEncryptionKeys,g=t.experimentalBufferBasedABR;if(!r)throw new Error("A non-empty playlist URL or JSON manifest string is required");bu=c,n.experimentalBufferBasedABR=Boolean(g),n.withCredentials=s,n.tech_=o,n.vhs_=o.vhs,n.sourceType_=p,n.useCueTags_=d,n.blacklistDuration=h,n.enableLowInitialPlaylist=f,n.useCueTags_&&(n.cueTagsTrack_=n.tech_.addTextTrack("metadata","ad-cues"),n.cueTagsTrack_.inBandMetadataTrackDispatchType=""),n.requestOptions_={withCredentials:s,handleManifestRedirects:a,timeout:null},n.on("error",n.pauseLoading),n.mediaTypes_=function(){var e={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:_u,activeTrack:_u,getActiveGroup:_u,onGroupChanged:_u,onTrackChanged:_u,lastTrack_:null,logger_:xs("MediaGroups["+t+"]")}})),e}(),n.mediaSource=new(i().MediaSource),n.handleDurationChange_=n.handleDurationChange_.bind((0,u.Z)(n)),n.handleSourceOpen_=n.handleSourceOpen_.bind((0,u.Z)(n)),n.handleSourceEnded_=n.handleSourceEnded_.bind((0,u.Z)(n)),n.mediaSource.addEventListener("durationchange",n.handleDurationChange_),n.mediaSource.addEventListener("sourceopen",n.handleSourceOpen_),n.mediaSource.addEventListener("sourceended",n.handleSourceEnded_),n.seekable_=Ss.createTimeRanges(),n.hasPlayed_=!1,n.syncController_=new Wu(t),n.segmentMetadataTrack_=o.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,n.decrypter_=new Xu,n.sourceUpdater_=new Uu(n.mediaSource),n.inbandTextTracks_={},n.timelineChangeController_=new zu;var v={vhs:n.vhs_,parse708captions:t.parse708captions,mediaSource:n.mediaSource,currentTime:n.tech_.currentTime.bind(n.tech_),seekable:function(){return n.seekable()},seeking:function(){return n.tech_.seeking()},duration:function(){return n.duration()},hasPlayed:function(){return n.hasPlayed_},goalBufferLength:function(){return n.goalBufferLength()},bandwidth:l,syncController:n.syncController_,decrypter:n.decrypter_,sourceType:n.sourceType_,inbandTextTracks:n.inbandTextTracks_,cacheEncryptionKeys:m,sourceUpdater:n.sourceUpdater_,timelineChangeController:n.timelineChangeController_};return n.masterPlaylistLoader_="dash"===n.sourceType_?new Do(r,n.vhs_,n.requestOptions_):new Vs(r,n.vhs_,n.requestOptions_),n.setupMasterPlaylistLoaderListeners_(),n.mainSegmentLoader_=new yu(Ss.mergeOptions(v,{segmentMetadataTrack:n.segmentMetadataTrack_,loaderType:"main"}),t),n.audioSegmentLoader_=new yu(Ss.mergeOptions(v,{loaderType:"audio"}),t),n.subtitleSegmentLoader_=new ju(Ss.mergeOptions(v,{loaderType:"vtt",featuresNativeTextTracks:n.tech_.featuresNativeTextTracks}),t),n.setupSegmentLoaderListeners_(),n.experimentalBufferBasedABR&&(n.masterPlaylistLoader_.one("loadedplaylist",(function(){return n.startABRTimer_()})),n.tech_.on("pause",(function(){return n.stopABRTimer_()})),n.tech_.on("play",(function(){return n.startABRTimer_()}))),nl.forEach((function(e){n[e+"_"]=rl.bind((0,u.Z)(n),e)})),n.logger_=xs("MPC"),n.triggeredFmp4Usage=!1,"none"===n.tech_.preload()?(n.loadOnPlay_=function(){n.loadOnPlay_=null,n.masterPlaylistLoader_.load()},n.tech_.one("play",n.loadOnPlay_)):n.masterPlaylistLoader_.load(),n}(0,l.Z)(t,e);var n=t.prototype;return n.checkABR_=function(){var e=this.selectPlaylist();this.shouldSwitchToMedia_(e)&&this.switchMedia_(e,"abr")},n.switchMedia_=function(e,t,n){var r=this.media(),i=r&&(r.id||r.uri),a=e.id||e.uri;i&&i!==a&&(this.logger_("switch media "+i+" -> "+a+" from "+t),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+t})),this.masterPlaylistLoader_.media(e,n)},n.startABRTimer_=function(){var e=this;this.stopABRTimer_(),this.abrTimer_=i().setInterval((function(){return e.checkABR_()}),250)},n.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(i().clearInterval(this.abrTimer_),this.abrTimer_=null)},n.getAudioTrackPlaylists_=function(){var e=this.master();if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return e&&e.playlists||[];var t,n=e.mediaGroups.AUDIO,r=Object.keys(n);if(Object.keys(this.mediaTypes_.AUDIO.groups).length)t=this.mediaTypes_.AUDIO.activeTrack();else{var i=n.main||r.length&&n[r[0]];for(var a in i)if(i[a].default){t={label:a};break}}if(!t)return[];var s=[];for(var o in n)if(n[o][t.label]){var u=n[o][t.label];u.playlists?s.push.apply(s,u.playlists):s.push(u)}return s},n.setupMasterPlaylistLoaderListeners_=function(){var e=this;this.masterPlaylistLoader_.on("loadedmetadata",(function(){var t=e.masterPlaylistLoader_.media(),n=1.5*t.targetDuration*1e3;oo(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=n,t.endList&&"none"!==e.tech_.preload()&&(e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load()),function(e){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){Ju[t](t,e)}));var t=e.mediaTypes,n=e.masterPlaylistLoader,r=e.tech,i=e.vhs,a=e.segmentLoaders,s=a.AUDIO,o=a.main;["AUDIO","SUBTITLES"].forEach((function(n){t[n].activeGroup=function(e,t){return function(n){var r=t.masterPlaylistLoader,i=t.mediaTypes[e].groups,a=r.media();if(!a)return null;var s=null;a.attributes[e]&&(s=i[a.attributes[e]]);var o=Object.keys(i);if(!s)if("AUDIO"===e&&o.length>1&&co(t.master))for(var u=0;u<o.length;u++){var l=i[o[u]];if(el(l,a)){s=l;break}}else i.main?s=i.main:1===o.length&&(s=i[o[0]]);return void 0===n?s:null!==n&&s&&s.filter((function(e){return e.id===n.id}))[0]||null}}(n,e),t[n].activeTrack=tl[n](n,e),t[n].onGroupChanged=function(e,t){return function(){var n=t.segmentLoaders,r=n[e],i=n.main,a=t.mediaTypes[e],s=a.activeTrack(),o=a.getActiveGroup(),u=a.activePlaylistLoader,l=a.lastGroup_;o&&l&&o.id===l.id||(a.lastGroup_=o,a.lastTrack_=s,Ku(r,a),o&&!o.isMasterPlaylist&&(o.playlistLoader?(r.resyncLoader(),Zu(o.playlistLoader,a)):u&&i.resetEverything()))}}(n,e),t[n].onGroupChanging=function(e,t){return function(){var n=t.segmentLoaders[e];t.mediaTypes[e].lastGroup_=null,n.abort(),n.pause()}}(n,e),t[n].onTrackChanged=function(e,t){return function(){var n=t.masterPlaylistLoader,r=t.segmentLoaders,i=r[e],a=r.main,s=t.mediaTypes[e],o=s.activeTrack(),u=s.getActiveGroup(),l=s.activePlaylistLoader,c=s.lastTrack_;if((!c||!o||c.id!==o.id)&&(s.lastGroup_=u,s.lastTrack_=o,Ku(i,s),u)){if(u.isMasterPlaylist){if(!o||!c||o.id===c.id)return;var d=t.vhs.masterPlaylistController_,h=d.selectPlaylist();if(d.media()===h)return;return s.logger_("track change. Switching master audio from "+c.id+" to "+o.id),n.pause(),a.resetEverything(),void d.fastQualityChange_(h)}if("AUDIO"===e){if(!u.playlistLoader)return a.setAudio(!0),void a.resetEverything();i.setAudio(!0),a.setAudio(!1)}l!==u.playlistLoader?(i.track&&i.track(o),i.resetEverything(),Zu(u.playlistLoader,s)):Zu(u.playlistLoader,s)}}}(n,e),t[n].getActiveGroup=function(e,t){var n=t.mediaTypes;return function(){var t=n[e].activeTrack();return t?n[e].activeGroup(t):null}}(n,e)}));var u=t.AUDIO.activeGroup();if(u){var l=(u.filter((function(e){return e.default}))[0]||u[0]).id;t.AUDIO.tracks[l].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged(),t.AUDIO.getActiveGroup().playlistLoader?(o.setAudio(!1),s.setAudio(!0)):o.setAudio(!0)}n.on("mediachange",(function(){["AUDIO","SUBTITLES"].forEach((function(e){return t[e].onGroupChanged()}))})),n.on("mediachanging",(function(){["AUDIO","SUBTITLES"].forEach((function(e){return t[e].onGroupChanging()}))}));var c=function(){t.AUDIO.onTrackChanged(),r.trigger({type:"usage",name:"vhs-audio-change"}),r.trigger({type:"usage",name:"hls-audio-change"})};for(var d in r.audioTracks().addEventListener("change",c),r.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),i.on("dispose",(function(){r.audioTracks().removeEventListener("change",c),r.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)})),r.clearTracks("audio"),t.AUDIO.tracks)r.audioTracks().addTrack(t.AUDIO.tracks[d])}({sourceType:e.sourceType_,segmentLoaders:{AUDIO:e.audioSegmentLoader_,SUBTITLES:e.subtitleSegmentLoader_,main:e.mainSegmentLoader_},tech:e.tech_,requestOptions:e.requestOptions_,masterPlaylistLoader:e.masterPlaylistLoader_,vhs:e.vhs_,master:e.master(),mediaTypes:e.mediaTypes_,blacklistCurrentPlaylist:e.blacklistCurrentPlaylist.bind(e)}),e.triggerPresenceUsage_(e.master(),t),e.setupFirstPlay(),!e.mediaTypes_.AUDIO.activePlaylistLoader||e.mediaTypes_.AUDIO.activePlaylistLoader.media()?e.trigger("selectedinitialmedia"):e.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",(function(){e.trigger("selectedinitialmedia")}))})),this.masterPlaylistLoader_.on("loadedplaylist",(function(){e.loadOnPlay_&&e.tech_.off("play",e.loadOnPlay_);var t=e.masterPlaylistLoader_.media();if(!t){var n;if(e.excludeUnsupportedVariants_(),e.enableLowInitialPlaylist&&(n=e.selectInitialPlaylist()),n||(n=e.selectPlaylist()),!n||!e.shouldSwitchToMedia_(n))return;if(e.initialMedia_=n,e.switchMedia_(e.initialMedia_,"initial"),"vhs-json"!==e.sourceType_||!e.initialMedia_.segments)return;t=e.initialMedia_}e.handleUpdatedMediaPlaylist(t)})),this.masterPlaylistLoader_.on("error",(function(){e.blacklistCurrentPlaylist(e.masterPlaylistLoader_.error)})),this.masterPlaylistLoader_.on("mediachanging",(function(){e.mainSegmentLoader_.abort(),e.mainSegmentLoader_.pause()})),this.masterPlaylistLoader_.on("mediachange",(function(){var t=e.masterPlaylistLoader_.media(),n=1.5*t.targetDuration*1e3;oo(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=n,e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load(),e.tech_.trigger({type:"mediachange",bubbles:!0})})),this.masterPlaylistLoader_.on("playlistunchanged",(function(){var t=e.masterPlaylistLoader_.media();"playlist-unchanged"!==t.lastExcludeReason_&&e.stuckAtPlaylistEnd_(t)&&(e.blacklistCurrentPlaylist({message:"Playlist no longer updating.",reason:"playlist-unchanged"}),e.tech_.trigger("playliststuck"))})),this.masterPlaylistLoader_.on("renditiondisabled",(function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})})),this.masterPlaylistLoader_.on("renditionenabled",(function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})}))},n.handleUpdatedMediaPlaylist=function(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())},n.triggerPresenceUsage_=function(e,t){var n=e.mediaGroups||{},r=!0,i=Object.keys(n.AUDIO);for(var a in n.AUDIO)for(var s in n.AUDIO[a])n.AUDIO[a][s].uri||(r=!1);r&&(this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),this.tech_.trigger({type:"usage",name:"hls-demuxed"})),Object.keys(n.SUBTITLES).length&&(this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),this.tech_.trigger({type:"usage",name:"hls-webvtt"})),bu.Playlist.isAes(t)&&(this.tech_.trigger({type:"usage",name:"vhs-aes"}),this.tech_.trigger({type:"usage",name:"hls-aes"})),i.length&&Object.keys(n.AUDIO[i[0]]).length>1&&(this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.tech_.trigger({type:"usage",name:"hls-alternate-audio"})),this.useCueTags_&&(this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"}),this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"}))},n.shouldSwitchToMedia_=function(e){var t=this.masterPlaylistLoader_.media(),n=this.tech_.buffered();return function(e){var t=e.currentPlaylist,n=e.nextPlaylist,r=e.forwardBuffer,i=e.bufferLowWaterLine,a=e.bufferHighWaterLine,s=e.duration,o=e.experimentalBufferBasedABR,u=e.log;if(!n)return Ss.log.warn("We received no playlist to switch to. Please check your stream."),!1;var l="allowing switch "+(t&&t.id||"null")+" -> "+n.id;if(!t||!t.endList)return u(l+" as current playlist "+(t?"is live":"is not set")),!0;if(n.id===t.id)return!1;var c=o?Ro.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Ro.MAX_BUFFER_LOW_WATER_LINE;if(s<c)return u(l+" as duration < max low water line ("+s+" < "+c+")"),!0;var d=n.attributes.BANDWIDTH,h=t.attributes.BANDWIDTH;if(d<h&&(!o||r<a)){var f=l+" as next bandwidth < current bandwidth ("+d+" < "+h+")";return o&&(f+=" and forwardBuffer < bufferHighWaterLine ("+r+" < "+a+")"),u(f),!0}if((!o||d>h)&&r>=i){var p=l+" as forwardBuffer >= bufferLowWaterLine ("+r+" >= "+i+")";return o&&(p+=" and next bandwidth > current bandwidth ("+d+" > "+h+")"),u(p),!0}return u("not "+l+" as no switching criteria met"),!1}({currentPlaylist:t,nextPlaylist:e,forwardBuffer:n.length?n.end(n.length-1)-this.tech_.currentTime():0,bufferLowWaterLine:this.bufferLowWaterLine(),bufferHighWaterLine:this.bufferHighWaterLine(),duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})},n.setupSegmentLoaderListeners_=function(){var e=this;this.experimentalBufferBasedABR||(this.mainSegmentLoader_.on("bandwidthupdate",(function(){var t=e.selectPlaylist();e.shouldSwitchToMedia_(t)&&e.switchMedia_(t,"bandwidthupdate"),e.tech_.trigger("bandwidthupdate")})),this.mainSegmentLoader_.on("progress",(function(){e.trigger("progress")}))),this.mainSegmentLoader_.on("error",(function(){e.blacklistCurrentPlaylist(e.mainSegmentLoader_.error())})),this.mainSegmentLoader_.on("appenderror",(function(){e.error=e.mainSegmentLoader_.error_,e.trigger("error")})),this.mainSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on("timestampoffset",(function(){e.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"}),e.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})})),this.audioSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.audioSegmentLoader_.on("appenderror",(function(){e.error=e.audioSegmentLoader_.error_,e.trigger("error")})),this.mainSegmentLoader_.on("ended",(function(){e.logger_("main segment loader ended"),e.onEndOfStream()})),this.mainSegmentLoader_.on("earlyabort",(function(t){e.experimentalBufferBasedABR||(e.delegateLoaders_("all",["abort"]),e.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120))}));var t=function(){if(!e.sourceUpdater_.hasCreatedSourceBuffers())return e.tryToCreateSourceBuffers_();var t=e.getCodecsOrExclude_();t&&e.sourceUpdater_.addOrChangeSourceBuffers(t)};this.mainSegmentLoader_.on("trackinfo",t),this.audioSegmentLoader_.on("trackinfo",t),this.mainSegmentLoader_.on("fmp4",(function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("fmp4",(function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("ended",(function(){e.logger_("audioSegmentLoader ended"),e.onEndOfStream()}))},n.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},n.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},n.smoothQualityChange_=function(e){void 0===e&&(e=this.selectPlaylist()),e!==this.masterPlaylistLoader_.media()&&(this.switchMedia_(e,"smooth-quality"),this.mainSegmentLoader_.resetLoader())},n.fastQualityChange_=function(e){var t=this;void 0===e&&(e=this.selectPlaylist()),e!==this.masterPlaylistLoader_.media()?(this.switchMedia_(e,"fast-quality"),this.mainSegmentLoader_.resetEverything((function(){Ss.browser.IE_VERSION||Ss.browser.IS_EDGE?t.tech_.setCurrentTime(t.tech_.currentTime()+.04):t.tech_.setCurrentTime(t.tech_.currentTime())}))):this.logger_("skipping fastQualityChange because new media is same as old")},n.play=function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();var e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}},n.setupFirstPlay=function(){var e=this,t=this.masterPlaylistLoader_.media();if(!t||this.tech_.paused()||this.hasPlayed_)return!1;if(!t.endList){var n=this.seekable();if(!n.length)return!1;if(Ss.browser.IE_VERSION&&0===this.tech_.readyState())return this.tech_.one("loadedmetadata",(function(){e.trigger("firstplay"),e.tech_.setCurrentTime(n.end(0)),e.hasPlayed_=!0})),!1;this.trigger("firstplay"),this.tech_.setCurrentTime(n.end(0))}return this.hasPlayed_=!0,this.load(),!0},n.handleSourceOpen_=function(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){var e=this.tech_.play();void 0!==e&&"function"==typeof e.then&&e.then(null,(function(e){}))}this.trigger("sourceopen")},n.handleSourceEnded_=function(){if(this.inbandTextTracks_.metadataTrack_){var e=this.inbandTextTracks_.metadataTrack_.cues;if(e&&e.length){var t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}}},n.handleDurationChange_=function(){this.tech_.trigger("durationchange")},n.onEndOfStream=function(){var e=this.mainSegmentLoader_.ended_;this.mediaTypes_.AUDIO.activePlaylistLoader&&(e=!this.mainSegmentLoader_.currentMediaInfo_||this.mainSegmentLoader_.currentMediaInfo_.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_),e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())},n.stuckAtPlaylistEnd_=function(e){if(!this.seekable().length)return!1;var t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;var n=bu.Playlist.playlistEnd(e,t),r=this.tech_.currentTime(),i=this.tech_.buffered();if(!i.length)return n-r<=Ws;var a=i.end(i.length-1);return a-r<=Ws&&n-a<=Ws},n.blacklistCurrentPlaylist=function(e,t){void 0===e&&(e={});var n=e.playlist||this.masterPlaylistLoader_.media();if(t=t||e.blacklistDuration||this.blacklistDuration,!n)return this.error=e,void("open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network"));var r=this.masterPlaylistLoader_.master.playlists,i=r.filter(ao),a=1===i.length&&i[0]===n;if(1===r.length&&t!==1/0)return Ss.log.warn("Problem encountered with playlist "+n.id+". Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(a);if(a){var s=!1;r.forEach((function(e){if(e!==n){var t=e.excludeUntil;void 0!==t&&t!==1/0&&(s=!0,delete e.excludeUntil)}})),s&&(Ss.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}n.excludeUntil=Date.now()+1e3*t,e.reason&&(n.lastExcludeReason_=e.reason),this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-blacklisted"}),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});var o=this.selectPlaylist();if(!o)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");var u=e.internal?this.logger_:Ss.log.warn,l=e.message?" "+e.message:"";u((e.internal?"Internal problem":"Problem")+" encountered with playlist "+n.id+"."+l+" Switching to playlist "+o.id+"."),o.attributes.AUDIO!==n.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),o.attributes.SUBTITLES!==n.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);var c=o.targetDuration/2*1e3||5e3,d="number"==typeof o.lastRequest&&Date.now()-o.lastRequest<=c;return this.switchMedia_(o,"exclude",a||d)},n.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},n.delegateLoaders_=function(e,t){var n=this,r=[],i="all"===e;(i||"main"===e)&&r.push(this.masterPlaylistLoader_);var a=[];(i||"audio"===e)&&a.push("AUDIO"),(i||"subtitle"===e)&&(a.push("CLOSED-CAPTIONS"),a.push("SUBTITLES")),a.forEach((function(e){var t=n.mediaTypes_[e]&&n.mediaTypes_[e].activePlaylistLoader;t&&r.push(t)})),["main","audio","subtitle"].forEach((function(t){var i=n[t+"SegmentLoader_"];!i||e!==t&&"all"!==e||r.push(i)})),r.forEach((function(e){return t.forEach((function(t){"function"==typeof e[t]&&e[t]()}))}))},n.setCurrentTime=function(e){var t=Gs(this.tech_.buffered(),e);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),void this.load()):0},n.duration=function(){if(!this.masterPlaylistLoader_)return 0;var e=this.masterPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:bu.Playlist.duration(e):1/0:0},n.seekable=function(){return this.seekable_},n.onSyncInfoUpdate_=function(){var e;if(this.masterPlaylistLoader_){var t=this.masterPlaylistLoader_.media();if(t){var n=this.syncController_.getExpiredTime(t,this.duration());if(null!==n){var r=this.masterPlaylistLoader_.master,i=bu.Playlist.seekable(t,n,bu.Playlist.liveEdgeDelay(r,t));if(0!==i.length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(t=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(n=this.syncController_.getExpiredTime(t,this.duration())))return;if(0===(e=bu.Playlist.seekable(t,n,bu.Playlist.liveEdgeDelay(r,t))).length)return}var a,s;this.seekable_&&this.seekable_.length&&(a=this.seekable_.end(0),s=this.seekable_.start(0)),e?e.start(0)>i.end(0)||i.start(0)>e.end(0)?this.seekable_=i:this.seekable_=Ss.createTimeRanges([[e.start(0)>i.start(0)?e.start(0):i.start(0),e.end(0)<i.end(0)?e.end(0):i.end(0)]]):this.seekable_=i,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===a&&this.seekable_.start(0)===s||(this.logger_("seekable updated ["+$s(this.seekable_)+"]"),this.tech_.trigger("seekablechanged"))}}}}},n.updateDuration=function(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),"open"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener("sourceopen",this.updateDuration_);if(e){var t=this.seekable();if(!t.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<t.end(t.length-1))&&this.sourceUpdater_.setDuration(t.end(t.length-1))}else{var n=this.tech_.buffered(),r=bu.Playlist.duration(this.masterPlaylistLoader_.media());n.length>0&&(r=Math.max(r,n.end(n.length-1))),this.mediaSource.duration!==r&&this.sourceUpdater_.setDuration(r)}},n.dispose=function(){var e=this;this.trigger("dispose"),this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach((function(t){var n=e.mediaTypes_[t].groups;for(var r in n)n[r].forEach((function(e){e.playlistLoader&&e.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()},n.master=function(){return this.masterPlaylistLoader_.master},n.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},n.areMediaTypesKnown_=function(){var e=!!this.mediaTypes_.AUDIO.activePlaylistLoader;return!(!this.mainSegmentLoader_.currentMediaInfo_||e&&!this.audioSegmentLoader_.currentMediaInfo_)},n.getCodecsOrExclude_=function(){var e=this,t={main:this.mainSegmentLoader_.currentMediaInfo_||{},audio:this.audioSegmentLoader_.currentMediaInfo_||{}};t.video=t.main;var n=ru(this.master(),this.media()),r={},i=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(t.main.hasVideo&&(r.video=n.video||t.main.videoCodec||"avc1.4d400d"),t.main.isMuxed&&(r.video+=","+(n.audio||t.main.audioCodec||z)),(t.main.hasAudio&&!t.main.isMuxed||t.audio.hasAudio||i)&&(r.audio=n.audio||t.main.audioCodec||t.audio.audioCodec||z,t.audio.isFmp4=t.main.hasAudio&&!t.main.isMuxed?t.main.isFmp4:t.audio.isFmp4),r.audio||r.video){var a,s={};if(["video","audio"].forEach((function(e){if(r.hasOwnProperty(e)&&(i=t[e].isFmp4,o=r[e],!(i?q(o):W(o)))){var n=t[e].isFmp4?"browser":"muxer";s[n]=s[n]||[],s[n].push(r[e]),"audio"===e&&(a=n)}var i,o})),i&&a&&this.media().attributes.AUDIO){var o=this.media().attributes.AUDIO;this.master().playlists.forEach((function(t){(t.attributes&&t.attributes.AUDIO)===o&&t!==e.media()&&(t.excludeUntil=1/0)})),this.logger_("excluding audio group "+o+" as "+a+' does not support codec(s): "'+r.audio+'"')}if(!Object.keys(s).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var u=[];if(["video","audio"].forEach((function(t){var n=(j(e.sourceUpdater_.codecs[t]||"")[0]||{}).type,i=(j(r[t]||"")[0]||{}).type;n&&i&&n.toLowerCase()!==i.toLowerCase()&&u.push('"'+e.sourceUpdater_.codecs[t]+'" -> "'+r[t]+'"')})),u.length)return void this.blacklistCurrentPlaylist({playlist:this.media(),message:"Codec switching not supported: "+u.join(", ")+".",blacklistDuration:1/0,internal:!0})}return r}var l=Object.keys(s).reduce((function(e,t){return e&&(e+=", "),e+(t+' does not support codec(s): "')+s[t].join(",")+'"'}),"")+".";this.blacklistCurrentPlaylist({playlist:this.media(),internal:!0,message:l,blacklistDuration:1/0})}else this.blacklistCurrentPlaylist({playlist:this.media(),message:"Could not determine codecs for playlist.",blacklistDuration:1/0})},n.tryToCreateSourceBuffers_=function(){if("open"===this.mediaSource.readyState&&!this.sourceUpdater_.hasCreatedSourceBuffers()&&this.areMediaTypesKnown_()){var e=this.getCodecsOrExclude_();if(e){this.sourceUpdater_.createSourceBuffers(e);var t=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(t)}}},n.excludeUnsupportedVariants_=function(){var e=this,t=this.master().playlists,n=[];Object.keys(t).forEach((function(r){var i=t[r];if(-1===n.indexOf(i.id)){n.push(i.id);var a=ru(e.master,i),s=[];!a.audio||W(a.audio)||q(a.audio)||s.push("audio codec "+a.audio),!a.video||W(a.video)||q(a.video)||s.push("video codec "+a.video),a.text&&"stpp.ttml.im1t"===a.text&&s.push("text codec "+a.text),s.length&&(i.excludeUntil=1/0,e.logger_("excluding "+i.id+" for unsupported: "+s.join(", ")))}}))},n.excludeIncompatibleVariants_=function(e){var t=this,n=[],r=this.master().playlists,i=tu(j(e)),a=nu(i),s=i.video&&j(i.video)[0]||null,o=i.audio&&j(i.audio)[0]||null;Object.keys(r).forEach((function(e){var i=r[e];if(-1===n.indexOf(i.id)&&i.excludeUntil!==1/0){n.push(i.id);var u=[],l=ru(t.masterPlaylistLoader_.master,i),c=nu(l);if(l.audio||l.video){if(c!==a&&u.push('codec count "'+c+'" !== "'+a+'"'),!t.sourceUpdater_.canChangeType()){var d=l.video&&j(l.video)[0]||null,h=l.audio&&j(l.audio)[0]||null;d&&s&&d.type.toLowerCase()!==s.type.toLowerCase()&&u.push('video codec "'+d.type+'" !== "'+s.type+'"'),h&&o&&h.type.toLowerCase()!==o.type.toLowerCase()&&u.push('audio codec "'+h.type+'" !== "'+o.type+'"')}u.length&&(i.excludeUntil=1/0,t.logger_("blacklisting "+i.id+": "+u.join(" && ")))}}}))},n.updateAdCues_=function(e){var t=0,n=this.seekable();n.length&&(t=n.start(0)),function(e,t,n){if(void 0===n&&(n=0),e.segments)for(var r,a=n,s=0;s<e.segments.length;s++){var o=e.segments[s];if(r||(r=Hu(t,a+o.duration/2)),r){if("cueIn"in o){r.endTime=a,r.adEndTime=a,a+=o.duration,r=null;continue}if(a<r.endTime){a+=o.duration;continue}r.endTime+=o.duration}else if("cueOut"in o&&((r=new(i().VTTCue)(a,a+o.duration,o.cueOut)).adStartTime=a,r.adEndTime=a+parseFloat(o.cueOut),t.addCue(r)),"cueOutCont"in o){var u=o.cueOutCont.split("/").map(parseFloat),l=u[0],c=u[1];(r=new(i().VTTCue)(a,a+o.duration,"")).adStartTime=a-l,r.adEndTime=r.adStartTime+c,t.addCue(r)}a+=o.duration}}(e,this.cueTagsTrack_,t)},n.goalBufferLength=function(){var e=this.tech_.currentTime(),t=Ro.GOAL_BUFFER_LENGTH,n=Ro.GOAL_BUFFER_LENGTH_RATE,r=Math.max(t,Ro.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*n,r)},n.bufferLowWaterLine=function(){var e=this.tech_.currentTime(),t=Ro.BUFFER_LOW_WATER_LINE,n=Ro.BUFFER_LOW_WATER_LINE_RATE,r=Math.max(t,Ro.MAX_BUFFER_LOW_WATER_LINE),i=Math.max(t,Ro.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*n,this.experimentalBufferBasedABR?i:r)},n.bufferHighWaterLine=function(){return Ro.BUFFER_HIGH_WATER_LINE},t}(Ss.EventTarget),al=function(e,t,n){var r,i,a,s=e.masterPlaylistController_,o=s[(e.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(s);if(t.attributes){var u=t.attributes.RESOLUTION;this.width=u&&u.width,this.height=u&&u.height,this.bandwidth=t.attributes.BANDWIDTH}this.codecs=ru(s.master(),t),this.playlist=t,this.id=n,this.enabled=(r=e.playlists,i=t.id,a=o,function(e){var t=r.master.playlists[i],n=io(t),s=ao(t);return void 0===e?s:(e?delete t.disabled:t.disabled=!0,e===s||n||(a(),e?r.trigger("renditionenabled"):r.trigger("renditiondisabled")),e)})},sl=["seeking","seeked","pause","playing","error"],ol=function(){function e(e){var t=this;this.masterPlaylistController_=e.masterPlaylistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=xs("PlaybackWatcher"),this.logger_("initialize");var n=function(){return t.monitorCurrentTime_()},r=function(){return t.monitorCurrentTime_()},a=function(){return t.techWaiting_()},s=function(){return t.cancelTimer_()},o=function(){return t.fixesBadSeeks_()},u=this.masterPlaylistController_,l=["main","subtitle","audio"],c={};l.forEach((function(e){c[e]={reset:function(){return t.resetSegmentDownloads_(e)},updateend:function(){return t.checkSegmentDownloads_(e)}},u[e+"SegmentLoader_"].on("appendsdone",c[e].updateend),u[e+"SegmentLoader_"].on("playlistupdate",c[e].reset),t.tech_.on(["seeked","seeking"],c[e].reset)})),this.tech_.on("seekablechanged",o),this.tech_.on("waiting",a),this.tech_.on(sl,s),this.tech_.on("canplay",r),this.tech_.one("play",n),this.dispose=function(){t.logger_("dispose"),t.tech_.off("seekablechanged",o),t.tech_.off("waiting",a),t.tech_.off(sl,s),t.tech_.off("canplay",r),t.tech_.off("play",n),l.forEach((function(e){u[e+"SegmentLoader_"].off("appendsdone",c[e].updateend),u[e+"SegmentLoader_"].off("playlistupdate",c[e].reset),t.tech_.off(["seeked","seeking"],c[e].reset)})),t.checkCurrentTimeTimeout_&&i().clearTimeout(t.checkCurrentTimeTimeout_),t.cancelTimer_()}}var t=e.prototype;return t.monitorCurrentTime_=function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&i().clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=i().setTimeout(this.monitorCurrentTime_.bind(this),250)},t.resetSegmentDownloads_=function(e){var t=this.masterPlaylistController_[e+"SegmentLoader_"];this[e+"StalledDownloads_"]>0&&this.logger_("resetting possible stalled download count for "+e+" loader"),this[e+"StalledDownloads_"]=0,this[e+"Buffered_"]=t.buffered_()},t.checkSegmentDownloads_=function(e){var t=this.masterPlaylistController_,n=t[e+"SegmentLoader_"],r=n.buffered_(),i=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e.start(n)!==t.start(n)||e.end(n)!==t.end(n))return!0;return!1}(this[e+"Buffered_"],r);this[e+"Buffered_"]=r,i?this.resetSegmentDownloads_(e):(this[e+"StalledDownloads_"]++,this.logger_("found #"+this[e+"StalledDownloads_"]+" "+e+" appends that did not increase buffer (possible stalled download)",{playlistId:n.playlist_&&n.playlist_.id,buffered:Ks(r)}),this[e+"StalledDownloads_"]<10||(this.logger_(e+" loader stalled download exclusion"),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:"vhs-"+e+"-download-exclusion"}),"subtitle"!==e&&t.blacklistCurrentPlaylist({message:"Excessive "+e+" segment downloading detected."},1/0)))},t.checkCurrentTime_=function(){if(this.tech_.seeking()&&this.fixesBadSeeks_())return this.consecutiveUpdates=0,void(this.lastRecordedTime=this.tech_.currentTime());if(!this.tech_.paused()&&!this.tech_.seeking()){var e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+Ws>=t.end(t.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}},t.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null},t.fixesBadSeeks_=function(){if(!this.tech_.seeking())return!1;var e,t=this.seekable(),n=this.tech_.currentTime();if(this.afterSeekableWindow_(t,n,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(e=t.end(t.length-1)),this.beforeSeekableWindow_(t,n)){var r=t.start(0);e=r+(r===t.end(0)?0:Ws)}if(void 0!==e)return this.logger_("Trying to seek outside of seekable at time "+n+" with seekable range "+$s(t)+". Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0;var i=this.tech_.buffered();return!!function(e){var t=e.buffered,n=e.targetDuration,r=e.currentTime;return!(!t.length||t.end(0)-t.start(0)<2*n||r>t.start(0)||!(t.start(0)-r<n))}({buffered:i,targetDuration:this.media().targetDuration,currentTime:n})&&(e=i.start(0)+Ws,this.logger_("Buffered region starts ("+i.start(0)+") just beyond seek point ("+n+"). Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0)},t.waiting_=function(){if(!this.techWaiting_()){var e=this.tech_.currentTime(),t=this.tech_.buffered(),n=Gs(t,e);return n.length&&e+3<=n.end(0)?(this.cancelTimer_(),this.tech_.setCurrentTime(e),this.logger_("Stopped at "+e+" while inside a buffered region ["+n.start(0)+" -> "+n.end(0)+"]. Attempting to resume playback by seeking to the current time."),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"}),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})):void 0}},t.techWaiting_=function(){var e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking()&&this.fixesBadSeeks_())return!0;if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(e,t)){var n=e.end(e.length-1);return this.logger_("Fell out of live window at time "+t+". Seeking to live point (seekable end) "+n),this.cancelTimer_(),this.tech_.setCurrentTime(n),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var r=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,i=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:r.audioBuffered(),videoBuffered:r.videoBuffered(),currentTime:t}))return this.cancelTimer_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;var a=Xs(i,t);if(a.length>0){var s=a.start(0)-t;return this.logger_("Stopped at "+t+", setting timer for "+s+", seeking to "+a.start(0)),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*s,t),!0}return!1},t.afterSeekableWindow_=function(e,t,n,r){if(void 0===r&&(r=!1),!e.length)return!1;var i=e.end(e.length-1)+Ws;return!n.endList&&r&&(i=e.end(e.length-1)+3*n.targetDuration),t>i},t.beforeSeekableWindow_=function(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)},t.videoUnderflow_=function(e){var t=e.videoBuffered,n=e.audioBuffered,r=e.currentTime;if(t){var i;if(t.length&&n.length){var a=Gs(t,r-3),s=Gs(t,r),o=Gs(n,r);o.length&&!s.length&&a.length&&(i={start:a.end(0),end:o.end(0)})}else Xs(t,r).length||(i=this.gapFromVideoUnderflow_(t,r));return!!i&&(this.logger_("Encountered a gap in video from "+i.start+" to "+i.end+". Seeking to current time "+r),!0)}},t.skipTheGap_=function(e){var t=this.tech_.buffered(),n=this.tech_.currentTime(),r=Xs(t,n);this.cancelTimer_(),0!==r.length&&n===e&&(this.logger_("skipTheGap_:","currentTime:",n,"scheduled currentTime:",e,"nextRange start:",r.start(0)),this.tech_.setCurrentTime(r.start(0)+qs),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"}),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))},t.gapFromVideoUnderflow_=function(e,t){for(var n=function(e){if(e.length<2)return Ss.createTimeRanges();for(var t=[],n=1;n<e.length;n++){var r=e.end(n-1),i=e.start(n);t.push([r,i])}return Ss.createTimeRanges(t)}(e),r=0;r<n.length;r++){var i=n.start(r),a=n.end(r);if(t-i<4&&t-i>2)return{start:i,end:a}}return null},e}(),ul={errorInterval:30,getSource:function(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},ll=function e(t,n){var r=0,i=0,a=Ss.mergeOptions(ul,n);t.ready((function(){t.trigger({type:"usage",name:"vhs-error-reload-initialized"}),t.trigger({type:"usage",name:"hls-error-reload-initialized"})}));var s=function(){i&&t.currentTime(i)},o=function(e){null!=e&&(i=t.duration()!==1/0&&t.currentTime()||0,t.one("loadedmetadata",s),t.src(e),t.trigger({type:"usage",name:"vhs-error-reload"}),t.trigger({type:"usage",name:"hls-error-reload"}),t.play())},u=function(){return Date.now()-r<1e3*a.errorInterval?(t.trigger({type:"usage",name:"vhs-error-reload-canceled"}),void t.trigger({type:"usage",name:"hls-error-reload-canceled"})):a.getSource&&"function"==typeof a.getSource?(r=Date.now(),a.getSource.call(t,o)):void Ss.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")},l=function e(){t.off("loadedmetadata",s),t.off("error",u),t.off("dispose",e)};t.on("error",u),t.on("dispose",l),t.reloadSourceOnError=function(n){l(),e(t,n)}},cl=function(e){ll(this,e)},dl="2.8.2",hl={PlaylistLoader:Vs,Playlist:ho,utils:Eo,STANDARD_PLAYLIST_SELECTOR:cu,INITIAL_PLAYLIST_SELECTOR:function(){var e=this,t=this.playlists.master.playlists.filter(ho.isEnabled);return ou(t,(function(e,t){return uu(e,t)})),t.filter((function(t){return!!ru(e.playlists.master,t).video}))[0]||null},lastBandwidthSelector:cu,movingAverageBandwidthSelector:function(e){var t=-1;if(e<0||e>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){var n=this.useDevicePixelRatio&&i().devicePixelRatio||1;return t<0&&(t=this.systemBandwidth),t=e*this.systemBandwidth+(1-e)*t,lu(this.playlists.master,t,parseInt(su(this.tech_.el(),"width"),10)*n,parseInt(su(this.tech_.el(),"height"),10)*n,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)}},comparePlaylistBandwidth:uu,comparePlaylistResolution:function(e,t){var n,r;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),n=n||i().Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(r=t.attributes.RESOLUTION.width),n===(r=r||i().Number.MAX_VALUE)&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:n-r},xhr:go()};Object.keys(Ro).forEach((function(e){Object.defineProperty(hl,e,{get:function(){return Ss.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),Ro[e]},set:function(t){Ss.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),"number"!=typeof t||t<0?Ss.log.warn("value of Vhs."+e+" must be greater than or equal to 0"):Ro[e]=t}})}));var fl="videojs-vhs",pl=function(e,t){for(var n=t.media(),r=-1,i=0;i<e.length;i++)if(e[i].id===n.id){r=i;break}e.selectedIndex_=r,e.trigger({selectedIndex:r,type:"change"})};hl.canPlaySource=function(){return Ss.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var ml=function(){if(!i().localStorage)return null;var e=i().localStorage.getItem(fl);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}};hl.supportsNativeHls=function(){if(!s()||!s().createElement)return!1;var e=s().createElement("video");return!!Ss.getTech("Html5").isSupported()&&["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),hl.supportsNativeDash=!!(s()&&s().createElement&&Ss.getTech("Html5").isSupported())&&/maybe|probably/i.test(s().createElement("video").canPlayType("application/dash+xml")),hl.supportsTypeNatively=function(e){return"hls"===e?hl.supportsNativeHls:"dash"===e&&hl.supportsNativeDash},hl.isSupported=function(){return Ss.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var gl=function(e){function t(t,n,r){var i;if(i=e.call(this,n,Ss.mergeOptions(r.hls,r.vhs))||this,r.hls&&Object.keys(r.hls).length&&Ss.log.warn("Using hls options is deprecated. Use vhs instead."),"number"==typeof r.initialBandwidth&&(i.options_.bandwidth=r.initialBandwidth),i.logger_=xs("VhsHandler"),n.options_&&n.options_.playerId){var a=Ss(n.options_.playerId);a.hasOwnProperty("hls")||Object.defineProperty(a,"hls",{get:function(){return Ss.log.warn("player.hls is deprecated. Use player.tech().vhs instead."),n.trigger({type:"usage",name:"hls-player-access"}),(0,u.Z)(i)},configurable:!0}),a.hasOwnProperty("vhs")||Object.defineProperty(a,"vhs",{get:function(){return Ss.log.warn("player.vhs is deprecated. Use player.tech().vhs instead."),n.trigger({type:"usage",name:"vhs-player-access"}),(0,u.Z)(i)},configurable:!0}),a.hasOwnProperty("dash")||Object.defineProperty(a,"dash",{get:function(){return Ss.log.warn("player.dash is deprecated. Use player.tech().vhs instead."),(0,u.Z)(i)},configurable:!0}),i.player_=a}if(i.tech_=n,i.source_=t,i.stats={},i.ignoreNextSeekingEvent_=!1,i.setOptions_(),i.options_.overrideNative&&n.overrideNativeAudioTracks&&n.overrideNativeVideoTracks)n.overrideNativeAudioTracks(!0),n.overrideNativeVideoTracks(!0);else if(i.options_.overrideNative&&(n.featuresNativeVideoTracks||n.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return i.on(s(),["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],(function(e){var t=s().fullscreenElement||s().webkitFullscreenElement||s().mozFullScreenElement||s().msFullscreenElement;t&&t.contains(i.tech_.el())&&i.masterPlaylistController_.smoothQualityChange_()})),i.on(i.tech_,"seeking",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),i.on(i.tech_,"error",(function(){this.tech_.error()&&this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()})),i.on(i.tech_,"play",i.play),i}(0,l.Z)(t,e);var n=t.prototype;return n.setOptions_=function(){var e=this;if(this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.handleManifestRedirects=!1!==this.options_.handleManifestRedirects,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.smoothQualityChange=this.options_.smoothQualityChange||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,"number"!=typeof this.options_.blacklistDuration&&(this.options_.blacklistDuration=300),"number"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){var t=ml();t&&t.bandwidth&&(this.options_.bandwidth=t.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-bandwidth-from-local-storage"})),t&&t.throughput&&(this.options_.throughput=t.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-throughput-from-local-storage"}))}"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Ro.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Ro.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","experimentalBufferBasedABR","liveRangeSafeTimeDelta","experimentalLLHLS"].forEach((function(t){void 0!==e.source_[t]&&(e.options_[t]=e.source_[t])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio},n.src=function(e,t){var n=this;if(e){var r;this.setOptions_(),this.options_.src=0===(r=this.source_.src).toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(r.substring(r.indexOf(",")+1)):r,this.options_.tech=this.tech_,this.options_.externVhs=hl,this.options_.sourceType=$(t),this.options_.seekTo=function(e){n.tech_.setCurrentTime(e)},this.masterPlaylistController_=new il(this.options_);var a=Ss.mergeOptions({liveRangeSafeTimeDelta:Ws},this.options_,{seekable:function(){return n.seekable()},media:function(){return n.masterPlaylistController_.media()},masterPlaylistController:this.masterPlaylistController_});this.playbackWatcher_=new ol(a),this.masterPlaylistController_.on("error",(function(){var e=Ss.players[n.tech_.options_.playerId],t=n.masterPlaylistController_.error;"object"!=typeof t||t.code?"string"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));var s=this.options_.experimentalBufferBasedABR?hl.movingAverageBandwidthSelector(.55):hl.STANDARD_PLAYLIST_SELECTOR;this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):s.bind(this),this.masterPlaylistController_.selectInitialPlaylist=hl.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.masterPlaylistController_.masterPlaylistLoader_,this.mediaSource=this.masterPlaylistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get:function(){return this.masterPlaylistController_.selectPlaylist},set:function(e){this.masterPlaylistController_.selectPlaylist=e.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=e,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.bandwidth},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=e,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var e,t=1/(this.bandwidth||1);return e=this.throughput>0?1/this.throughput:0,Math.floor(1/(t+e))},set:function(){Ss.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:function(){return n.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return n.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return n.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return n.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return n.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return n.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return n.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return n.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},buffered:{get:function(){return Ks(n.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return n.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return n.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return n.tech_.name_},enumerable:!0},duration:{get:function(){return n.tech_.duration()},enumerable:!0},master:{get:function(){return n.playlists.master},enumerable:!0},playerDimensions:{get:function(){return n.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return Ks(n.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return n.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",(function(){n.options_.useBandwidthFromLocalStorage&&function(e){if(!i().localStorage)return!1;var t=ml();t=t?Ss.mergeOptions(t,e):e;try{i().localStorage.setItem(fl,JSON.stringify(t))}catch(e){return!1}}({bandwidth:n.bandwidth,throughput:Math.round(n.throughput)})})),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var e;(e=n).representations=function(){var t=e.masterPlaylistController_.master(),n=co(t)?e.masterPlaylistController_.getAudioTrackPlaylists_():t.playlists;return n?n.filter((function(e){return!io(e)})).map((function(t,n){return new al(e,t,t.id)})):[]}})),this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",(function(){n.setupEme_()})),this.on(this.masterPlaylistController_,"progress",(function(){this.tech_.trigger("progress")})),this.on(this.masterPlaylistController_,"firstplay",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=i().URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}},n.setupEme_=function(){var e,t,n,r=this,i=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,a=(e={player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:i&&i.media()},t=e.player,!(!(n=function(e,t,n){if(!e)return e;var r={};t&&t.attributes&&t.attributes.CODECS&&(r=tu(j(t.attributes.CODECS))),n&&n.attributes&&n.attributes.CODECS&&(r.audio=n.attributes.CODECS);var i=V(r.video),a=V(r.audio),s={};for(var o in e)s[o]={},a&&(s[o].audioContentType=a),i&&(s[o].videoContentType=i),t.contentProtection&&t.contentProtection[o]&&t.contentProtection[o].pssh&&(s[o].pssh=t.contentProtection[o].pssh),"string"==typeof e[o]&&(s[o].url=e[o]);return Ss.mergeOptions(e,s)}(e.sourceKeySystems,e.media,e.audioMedia))||(t.currentSource().keySystems=n,n&&!t.eme&&(Ss.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),1))));11!==Ss.browser.IE_VERSION&&a?(this.logger_("waiting for EME key session creation"),function(e){var t=e.player,n=e.sourceKeySystems,r=e.audioMedia,i=e.mainPlaylists;if(!t.eme.initializeMediaKeys)return Promise.resolve();var a,s,o=(a=r?i.concat([r]):i,s=Object.keys(n),a.reduce((function(e,t){if(!t.contentProtection)return e;var n=s.reduce((function(e,n){var r=t.contentProtection[n];return r&&r.pssh&&(e[n]={pssh:r.pssh}),e}),{});return Object.keys(n).length&&e.push(n),e}),[])),u=[],l=[];return o.forEach((function(e){l.push(new Promise((function(e,n){t.tech_.one("keysessioncreated",e)}))),u.push(new Promise((function(n,r){t.eme.initializeMediaKeys({keySystems:e},(function(e){e?r(e):n()}))})))})),Promise.race([Promise.all(u),Promise.race(l)])}({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:i&&i.media(),mainPlaylists:this.playlists.master.playlists}).then((function(){r.logger_("created EME key session"),r.masterPlaylistController_.sourceUpdater_.initializedEme()})).catch((function(e){r.logger_("error while creating EME key session",e),r.player_.error({message:"Failed to initialize media keys for EME",code:3})}))):this.masterPlaylistController_.sourceUpdater_.initializedEme()},n.setupQualityLevels_=function(){var e=this,t=Ss.players[this.tech_.options_.playerId];t&&t.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=t.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var t,n;t=e.qualityLevels_,(n=e).representations().forEach((function(e){t.addQualityLevel(e)})),pl(t,n.playlists)})),this.playlists.on("mediachange",(function(){pl(e.qualityLevels_,e.playlists)})))},t.version=function(){return{"@videojs/http-streaming":dl,"mux.js":"5.11.0","mpd-parser":"0.16.0","m3u8-parser":"4.7.0","aes-decrypter":"3.1.2"}},n.version=function(){return this.constructor.version()},n.canChangeType=function(){return Uu.canChangeType()},n.play=function(){this.masterPlaylistController_.play()},n.setCurrentTime=function(e){this.masterPlaylistController_.setCurrentTime(e)},n.duration=function(){return this.masterPlaylistController_.duration()},n.seekable=function(){return this.masterPlaylistController_.seekable()},n.dispose=function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.player_&&(delete this.player_.vhs,delete this.player_.dash,delete this.player_.hls),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.tech_&&delete this.tech_.hls,this.mediaSourceUrl_&&i().URL.revokeObjectURL&&(i().URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),e.prototype.dispose.call(this)},n.convertToProgramTime=function(e,t){return function(e){var t=e.playlist,n=e.time,r=void 0===n?void 0:n,i=e.callback;if(!i)throw new Error("getProgramTime: callback must be provided");if(!t||void 0===r)return i({message:"getProgramTime: playlist and time must be provided"});var a=function(e,t){if(!t||!t.segments||0===t.segments.length)return null;for(var n,r=0,i=0;i<t.segments.length&&!(e<=(r=(n=t.segments[i]).videoTimingInfo?n.videoTimingInfo.transmuxedPresentationEnd:r+n.duration));i++);var a=t.segments[t.segments.length-1];if(a.videoTimingInfo&&a.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>r){if(e>r+.25*a.duration)return null;n=a}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:r-n.duration,type:n.videoTimingInfo?"accurate":"estimate"}}(r,t);if(!a)return i({message:"valid programTime was not found"});if("estimate"===a.type)return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:a.estimatedStart});var s={mediaSeconds:r},o=function(e,t){if(!t.dateTimeObject)return null;var n=t.videoTimingInfo.transmuxerPrependedSeconds,r=e-(t.videoTimingInfo.transmuxedPresentationStart+n);return new Date(t.dateTimeObject.getTime()+1e3*r)}(r,a.segment);return o&&(s.programDateTime=o.toISOString()),i(null,s)}({playlist:this.masterPlaylistController_.media(),time:e,callback:t})},n.seekToProgramTime=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=2),Co({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:r,pauseAfterSeek:n,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})},t}(Ss.getComponent("Component")),vl={name:"videojs-http-streaming",VERSION:dl,canHandleSource:function(e,t){void 0===t&&(t={});var n=Ss.mergeOptions(Ss.options,t);return vl.canPlayType(e.type,n)},handleSource:function(e,t,n){void 0===n&&(n={});var r=Ss.mergeOptions(Ss.options,n);return t.vhs=new gl(e,t,r),Ss.hasOwnProperty("hls")||Object.defineProperty(t,"hls",{get:function(){return Ss.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),t.vhs},configurable:!0}),t.vhs.xhr=go(),t.vhs.src(e.src,e.type),t.vhs},canPlayType:function(e,t){void 0===t&&(t={});var n=Ss.mergeOptions(Ss.options,t).vhs.overrideNative,r=void 0===n?!Ss.browser.IS_ANY_SAFARI:n,i=$(e);return!i||hl.supportsTypeNatively(i)&&!r?"":"maybe"}};q("avc1.4d400d,mp4a.40.2")&&Ss.getTech("Html5").registerSourceHandler(vl,0),Ss.VhsHandler=gl,Object.defineProperty(Ss,"HlsHandler",{get:function(){return Ss.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),gl},configurable:!0}),Ss.VhsSourceHandler=vl,Object.defineProperty(Ss,"HlsSourceHandler",{get:function(){return Ss.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),vl},configurable:!0}),Ss.Vhs=hl,Object.defineProperty(Ss,"Hls",{get:function(){return Ss.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),hl},configurable:!0}),Ss.use||(Ss.registerComponent("Hls",hl),Ss.registerComponent("Vhs",hl)),Ss.options.vhs=Ss.options.vhs||{},Ss.options.hls=Ss.options.hls||{},Ss.registerPlugin?Ss.registerPlugin("reloadSourceOnError",cl):Ss.plugin("reloadSourceOnError",cl);const yl=Ss},52002:(e,t,n)=>{"use strict";var r=n(42612),i=n(3384),a=n.n(i);function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var o=function e(t){var n=this;if(r.Z.browser.IS_IE8)for(var i in n=a().createElement("custom"),e.prototype)"constructor"!==i&&(n[i]=e.prototype[i]);return n.id=t.id,n.label=n.id,n.width=t.width,n.height=t.height,n.bitrate=t.bandwidth,n.enabled_=t.enabled,Object.defineProperty(n,"enabled",{get:function(){return n.enabled_()},set:function(e){n.enabled_(e)}}),n},u=function(e){var t,n;function i(){var t,n=s(s(t=e.call(this)||this));if(r.Z.browser.IS_IE8)for(var o in n=a().createElement("custom"),i.prototype)"constructor"!==o&&(n[o]=i.prototype[o]);return n.levels_=[],n.selectedIndex_=-1,Object.defineProperty(n,"selectedIndex",{get:function(){return n.selectedIndex_}}),Object.defineProperty(n,"length",{get:function(){return n.levels_.length}}),n||s(t)}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var u=i.prototype;return u.addQualityLevel=function(e){var t=this.getQualityLevelById(e.id);if(t)return t;var n=this.levels_.length;return t=new o(e),""+n in this||Object.defineProperty(this,n,{get:function(){return this.levels_[n]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:"addqualitylevel"}),t},u.removeQualityLevel=function(e){for(var t=null,n=0,r=this.length;n<r;n++)if(this[n]===e){t=this.levels_.splice(n,1)[0],this.selectedIndex_===n?this.selectedIndex_=-1:this.selectedIndex_>n&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t},u.getQualityLevelById=function(e){for(var t=0,n=this.length;t<n;t++){var r=this[t];if(r.id===e)return r}return null},u.dispose=function(){this.selectedIndex_=-1,this.levels_.length=0},i}(r.Z.EventTarget);for(var l in u.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"},u.prototype.allowedEvents_)u.prototype["on"+l]=null;var c="2.0.9",d=function(e){return t=this,r.Z.mergeOptions({},e),n=t.qualityLevels,i=new u,t.on("dispose",(function e(){i.dispose(),t.qualityLevels=n,t.off("dispose",e)})),t.qualityLevels=function(){return i},t.qualityLevels.VERSION=c,i;var t,n,i};(r.Z.registerPlugin||r.Z.plugin)("qualityLevels",d),d.VERSION=c},83983:(e,t,n)=>{var r=n(51562),i=e.exports={WebVTT:n(77735),VTTCue:n(65997),VTTRegion:n(17193)};r.vttjs=i,r.WebVTT=i.WebVTT;var a=i.VTTCue,s=i.VTTRegion,o=r.VTTCue,u=r.VTTRegion;i.shim=function(){r.VTTCue=a,r.VTTRegion=s},i.restore=function(){r.VTTCue=o,r.VTTRegion=u},r.VTTCue||i.shim()},77735:(e,t,n)=>{var r=n(3384),i=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function a(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function s(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+(0|r)/1e3}var n=e.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}function o(){this.values=i(null)}function u(e,t,n,r){var i=r?e.split(r):[e];for(var a in i)if("string"==typeof i[a]){var s=i[a].split(n);2===s.length&&t(s[0].trim(),s[1].trim())}}function l(e,t,n){var r=e;function i(){var t=s(e);if(null===t)throw new a(a.Errors.BadTimeStamp,"Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function l(){e=e.replace(/^\s+/,"")}if(l(),t.startTime=i(),l(),"--\x3e"!==e.substr(0,3))throw new a(a.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),l(),t.endTime=i(),l(),function(e,t){var r=new o;u(e,(function(e,t){switch(e){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===t){r.set(e,n[i].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),s=a[0];r.integer(e,s),r.percent(e,s)&&r.set("snapToLines",!1),r.alt(e,s,["auto"]),2===a.length&&r.alt("lineAlign",a[1],["start","center","end"]);break;case"position":a=t.split(","),r.percent(e,a[0]),2===a.length&&r.alt("positionAlign",a[1],["start","center","end"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start","center","end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");try{t.line=r.get("line","auto")}catch(e){}t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100);try{t.align=r.get("align","center")}catch(e){t.align=r.get("align","middle")}try{t.position=r.get("position","auto")}catch(e){t.position=r.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=r.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(e,t)}a.prototype=i(Error.prototype),a.prototype.constructor=a,a.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},o.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var c=r.createElement&&r.createElement("textarea"),d={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},h={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},f={v:"title",lang:"lang"},p={rt:"ruby"};function m(e,t){function n(){if(!t)return null;var e,n=t.match(/^([^<]*)(<[^>]*>?)?/);return e=n[1]?n[1]:n[2],t=t.substr(e.length),e}function r(e,t){return!p[t.localName]||p[t.localName]===e.localName}function i(t,n){var r=d[t];if(!r)return null;var i=e.document.createElement(r),a=f[t];return a&&n&&(i[a]=n.trim()),i}for(var a,o,u=e.document.createElement("div"),l=u,m=[];null!==(a=n());)if("<"!==a[0])l.appendChild(e.document.createTextNode((o=a,c.innerHTML=o,o=c.textContent,c.textContent="",o)));else{if("/"===a[1]){m.length&&m[m.length-1]===a.substr(2).replace(">","")&&(m.pop(),l=l.parentNode);continue}var g,v=s(a.substr(1,a.length-2));if(v){g=e.document.createProcessingInstruction("timestamp",v),l.appendChild(g);continue}var y=a.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!y)continue;if(!(g=i(y[1],y[3])))continue;if(!r(l,g))continue;if(y[2]){var _=y[2].split(".");_.forEach((function(e){var t=/^bg_/.test(e),n=t?e.slice(3):e;if(h.hasOwnProperty(n)){var r=t?"background-color":"color",i=h[n];g.style[r]=i}})),g.className=_.join(" ")}m.push(y[1]),l.appendChild(g),l=g}return u}var g=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function v(e){for(var t=0;t<g.length;t++){var n=g[t];if(e>=n[0]&&e<=n[1])return!0}return!1}function y(e){var t=[],n="";if(!e||!e.childNodes)return"ltr";function r(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function i(e){if(!e||!e.length)return null;var t=e.pop(),n=t.textContent||t.innerText;if(n){var a=n.match(/^.*(\n|\r)/);return a?(e.length=0,a[0]):n}return"ruby"===t.tagName?i(e):t.childNodes?(r(e,t),i(e)):void 0}for(r(t,e);n=i(t);)for(var a=0;a<n.length;a++)if(v(n.charCodeAt(a)))return"rtl";return"ltr"}function _(){}function b(e,t,n){_.call(this),this.cue=t,this.cueDiv=m(e,t.text);var r={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(r,this.cueDiv),this.div=e.document.createElement("div"),r={direction:y(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(r),this.div.appendChild(this.cueDiv);var i=0;switch(t.positionAlign){case"start":case"line-left":i=t.position;break;case"center":i=t.position-t.size/2;break;case"end":case"line-right":i=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(i,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(i,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function T(e){var t,n,r,i;if(e.div){n=e.div.offsetHeight,r=e.div.offsetWidth,i=e.div.offsetTop;var a=(a=e.div.childNodes)&&(a=a[0])&&a.getClientRects&&a.getClientRects();e=e.div.getBoundingClientRect(),t=a?Math.max(a[0]&&a[0].height||0,e.height/a.length):0}this.left=e.left,this.right=e.right,this.top=e.top||i,this.height=e.height||n,this.bottom=e.bottom||i+(e.height||n),this.width=e.width||r,this.lineHeight=void 0!==t?t:e.lineHeight}function S(e,t,n,r){var i=new T(t),a=t.cue,s=function(e){if("number"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,n=t.textTrackList,r=0,i=0;i<n.length&&n[i]!==t;i++)"showing"===n[i].mode&&r++;return-1*++r}(a),o=[];if(a.snapToLines){var u;switch(a.vertical){case"":o=["+y","-y"],u="height";break;case"rl":o=["+x","-x"],u="width";break;case"lr":o=["-x","+x"],u="width"}var l=i.lineHeight,c=l*Math.round(s),d=n[u]+l,h=o[0];Math.abs(c)>d&&(c=c<0?-1:1,c*=Math.ceil(d/l)*l),s<0&&(c+=""===a.vertical?n.height:n.width,o=o.reverse()),i.move(h,c)}else{var f=i.lineHeight/n.height*100;switch(a.lineAlign){case"center":s-=f/2;break;case"end":s-=f}switch(a.vertical){case"":t.applyStyles({top:t.formatStyle(s,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(s,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(s,"%")})}o=["+y","-x","+x","-y"],i=new T(t)}var p=function(e,t){for(var i,a=new T(e),s=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(n,t[o])||e.within(n)&&e.overlapsAny(r);)e.move(t[o]);if(e.within(n))return e;var u=e.intersectPercentage(n);s>u&&(i=new T(e),s=u),e=new T(a)}return i||a}(i,o);t.move(p.toCSSCompatValues(n))}function w(){}_.prototype.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},_.prototype.formatStyle=function(e,t){return 0===e?0:e+t},b.prototype=i(_.prototype),b.prototype.constructor=b,T.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},T.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},T.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},T.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},T.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},T.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},T.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},T.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,r=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||r,height:e.height||t,bottom:e.bottom||r+(e.height||t),width:e.width||n}},w.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},w.convertCueToDOMTree=function(e,t){return e&&t?m(e,t):null},w.processCues=function(e,t,n){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var r=e.document.createElement("div");if(r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin="1.5%",n.appendChild(r),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var i=[],a=T.getSimpleBoxPosition(r),s={font:Math.round(.05*a.height*100)/100+"px sans-serif"};!function(){for(var n,o,u=0;u<t.length;u++)o=t[u],n=new b(e,o,s),r.appendChild(n.div),S(0,n,a,i),o.displayState=n.div,i.push(T.getSimpleBoxPosition(n))}()}else for(var o=0;o<t.length;o++)r.appendChild(t[o].displayState)},w.Parser=function(e,t,n){n||(n=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=n||new TextDecoder("utf8"),this.regionList=[]},w.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof a))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t,n=this;function r(){for(var e=n.buffer,t=0;t<e.length&&"\r"!==e[t]&&"\n"!==e[t];)++t;var r=e.substr(0,t);return"\r"===e[t]&&++t,"\n"===e[t]&&++t,n.buffer=e.substr(t),r}e&&(n.buffer+=n.decoder.decode(e,{stream:!0}));try{var i;if("INITIAL"===n.state){if(!/\r\n|\n/.test(n.buffer))return this;var c=(i=r()).match(/^WEBVTT([ \t].*)?$/);if(!c||!c[0])throw new a(a.Errors.BadSignature);n.state="HEADER"}for(var d=!1;n.buffer;){if(!/\r\n|\n/.test(n.buffer))return this;switch(d?d=!1:i=r(),n.state){case"HEADER":/:/.test(i)?(t=i).match(/X-TIMESTAMP-MAP/)?u(t,(function(e,t){"X-TIMESTAMP-MAP"===e&&function(e){var t=new o;u(e,(function(e,n){switch(e){case"MPEGT":t.integer(e+"S",n);break;case"LOCA":t.set(e+"L",s(n))}}),/[^\d]:/,/,/),n.ontimestampmap&&n.ontimestampmap({MPEGTS:t.get("MPEGTS"),LOCAL:t.get("LOCAL")})}(t)}),/=/):u(t,(function(e,t){"Region"===e&&function(e){var t=new o;if(u(e,(function(e,n){switch(e){case"id":t.set(e,n);break;case"width":t.percent(e,n);break;case"lines":t.integer(e,n);break;case"regionanchor":case"viewportanchor":var r=n.split(",");if(2!==r.length)break;var i=new o;if(i.percent("x",r[0]),i.percent("y",r[1]),!i.has("x")||!i.has("y"))break;t.set(e+"X",i.get("x")),t.set(e+"Y",i.get("y"));break;case"scroll":t.alt(e,n,["up"])}}),/=/,/\s/),t.has("id")){var r=new(n.vttjs.VTTRegion||n.window.VTTRegion);r.width=t.get("width",100),r.lines=t.get("lines",3),r.regionAnchorX=t.get("regionanchorX",0),r.regionAnchorY=t.get("regionanchorY",100),r.viewportAnchorX=t.get("viewportanchorX",0),r.viewportAnchorY=t.get("viewportanchorY",100),r.scroll=t.get("scroll",""),n.onregion&&n.onregion(r),n.regionList.push({id:t.get("id"),region:r})}}(t)}),/:/):i||(n.state="ID");continue;case"NOTE":i||(n.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){n.state="NOTE";break}if(!i)continue;n.cue=new(n.vttjs.VTTCue||n.window.VTTCue)(0,0,"");try{n.cue.align="center"}catch(e){n.cue.align="middle"}if(n.state="CUE",-1===i.indexOf("--\x3e")){n.cue.id=i;continue}case"CUE":try{l(i,n.cue,n.regionList)}catch(e){n.reportOrThrowError(e),n.cue=null,n.state="BADCUE";continue}n.state="CUETEXT";continue;case"CUETEXT":var h=-1!==i.indexOf("--\x3e");if(!i||h&&(d=!0)){n.oncue&&n.oncue(n.cue),n.cue=null,n.state="ID";continue}n.cue.text&&(n.cue.text+="\n"),n.cue.text+=i.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":i||(n.state="ID");continue}}}catch(e){n.reportOrThrowError(e),"CUETEXT"===n.state&&n.cue&&n.oncue&&n.oncue(n.cue),n.cue=null,n.state="INITIAL"===n.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new a(a.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}},e.exports=w},65997:e=>{var t={"":1,lr:1,rl:1},n={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function r(e){return"string"==typeof e&&!!n[e.toLowerCase()]&&e.toLowerCase()}function i(e,n,i){this.hasBeenReset=!1;var a="",s=!1,o=e,u=n,l=i,c=null,d="",h=!0,f="auto",p="start",m="auto",g="auto",v=100,y="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return a},set:function(e){a=""+e}},pauseOnExit:{enumerable:!0,get:function(){return s},set:function(e){s=!!e}},startTime:{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");o=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");u=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return l},set:function(e){l=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return c},set:function(e){c=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return d},set:function(e){var n=function(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===n)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");d=n,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return h},set:function(e){h=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return f},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("Line: an invalid number or illegal string was specified.");f=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return p},set:function(e){var t=r(e);t?(p=t,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return m},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");m=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return g},set:function(e){var t=r(e);t?(g=t,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return v},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");v=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return y},set:function(e){var t=r(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");y=t,this.hasBeenReset=!0}}}),this.displayState=void 0}i.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=i},17193:e=>{var t={"":!0,up:!0};function n(e){return"number"==typeof e&&e>=0&&e<=100}e.exports=function(){var e=100,r=3,i=0,a=100,s=0,o=100,u="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!n(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return r},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");r=e}},regionAnchorY:{enumerable:!0,get:function(){return a},set:function(e){if(!n(e))throw new Error("RegionAnchorX must be between 0 and 100.");a=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!n(e))throw new Error("RegionAnchorY must be between 0 and 100.");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!n(e))throw new Error("ViewportAnchorY must be between 0 and 100.");o=e}},viewportAnchorX:{enumerable:!0,get:function(){return s},set:function(e){if(!n(e))throw new Error("ViewportAnchorX must be between 0 and 100.");s=e}},scroll:{enumerable:!0,get:function(){return u},set:function(e){var n=function(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}(e);!1===n?console.warn("Scroll: an invalid or illegal string was specified."):u=n}}})}},73668:(e,t,n)=>{function r(e){this.options=e||{locator:{}}}function i(){this.cdata=!1}function a(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function s(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function o(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function u(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}r.prototype.parseFromString=function(e,t){var n=this.options,r=new d,a=n.domBuilder||new i,o=n.errorHandler,u=n.locator,c=n.xmlns||{},h=/\/x?html?$/.test(t),f=h?l.entityMap:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return u&&a.setDocumentLocator(u),r.errorHandler=function(e,t,n){if(!e){if(t instanceof i)return t;e=t}var r={},a=e instanceof Function;function o(t){var i=e[t];!i&&a&&(i=2==e.length?function(n){e(t,n)}:e),r[t]=i&&function(e){i("[xmldom "+t+"]\t"+e+s(n))}||function(){}}return n=n||{},o("warning"),o("error"),o("fatalError"),r}(o,a,u),r.domBuilder=n.domBuilder||a,h&&(c[""]="http://www.w3.org/1999/xhtml"),c.xml=c.xml||"http://www.w3.org/XML/1998/namespace",e&&"string"==typeof e?r.parse(e,c,f):r.errorHandler.error("invalid doc source"),a.doc},i.prototype={startDocument:function(){this.doc=(new f).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.doc,s=i.createElementNS(e,n||t),o=r.length;u(this,s),this.currentElement=s,this.locator&&a(this.locator,s);for(var l=0;l<o;l++){e=r.getURI(l);var c=r.getValue(l),d=(n=r.getQName(l),i.createAttributeNS(e,n));this.locator&&a(r.getLocator(l),d),d.value=d.nodeValue=c,s.setAttributeNode(d)}},endElement:function(e,t,n){var r=this.currentElement;r.tagName,this.currentElement=r.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&a(this.locator,n),u(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=o.apply(this,arguments)){if(this.cdata)var r=this.doc.createCDATASection(e);else r=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(e)&&this.doc.appendChild(r),this.locator&&a(this.locator,r)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,n){e=o.apply(this,arguments);var r=this.doc.createComment(e);this.locator&&a(this.locator,r),u(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n){var r=this.doc.implementation;if(r&&r.createDocumentType){var i=r.createDocumentType(e,t,n);this.locator&&a(this.locator,i),u(this,i)}},warning:function(e){console.warn("[xmldom warning]\t"+e,s(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,s(this.locator))},fatalError:function(e){throw new h(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){i.prototype[e]=function(){return null}}));var l=n(70624),c=n(91186),d=c.XMLReader,h=c.ParseError,f=n(51676).DOMImplementation;n(51676),t.a=r},51676:(e,t)=>{function n(e,t){for(var n in e)t[n]=e[n]}function r(e,t){var r=e.prototype;if(!(r instanceof t)){function i(){}i.prototype=t.prototype,n(r,i=new i),e.prototype=r=i}r.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),r.constructor=e)}var i="http://www.w3.org/1999/xhtml",a={},s=a.ELEMENT_NODE=1,o=a.ATTRIBUTE_NODE=2,u=a.TEXT_NODE=3,l=a.CDATA_SECTION_NODE=4,c=a.ENTITY_REFERENCE_NODE=5,d=a.ENTITY_NODE=6,h=a.PROCESSING_INSTRUCTION_NODE=7,f=a.COMMENT_NODE=8,p=a.DOCUMENT_NODE=9,m=a.DOCUMENT_TYPE_NODE=10,g=a.DOCUMENT_FRAGMENT_NODE=11,v=a.NOTATION_NODE=12,y={},_={},b=(y.INDEX_SIZE_ERR=(_[1]="Index size error",1),y.DOMSTRING_SIZE_ERR=(_[2]="DOMString size error",2),y.HIERARCHY_REQUEST_ERR=(_[3]="Hierarchy request error",3)),T=(y.WRONG_DOCUMENT_ERR=(_[4]="Wrong document",4),y.INVALID_CHARACTER_ERR=(_[5]="Invalid character",5),y.NO_DATA_ALLOWED_ERR=(_[6]="No data allowed",6),y.NO_MODIFICATION_ALLOWED_ERR=(_[7]="No modification allowed",7),y.NOT_FOUND_ERR=(_[8]="Not found",8)),S=(y.NOT_SUPPORTED_ERR=(_[9]="Not supported",9),y.INUSE_ATTRIBUTE_ERR=(_[10]="Attribute in use",10));function w(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,_[e]),this.message=_[e],Error.captureStackTrace&&Error.captureStackTrace(this,w);return n.code=e,t&&(this.message=this.message+": "+t),n}function k(){}function E(e,t){this._node=e,this._refresh=t,C(this)}function C(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var r=e._refresh(e._node);re(e,"length",r.length),n(r,e),e._inc=t}}function x(){}function I(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function A(e,t,n,r){if(r?t[I(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&N(i,e,r),function(e,t,n){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&(t._nsMap[n.prefix?n.localName:""]=n.value)}(i,e,n))}}function O(e,t,n){var r=I(t,n);if(!(r>=0))throw w(T,new Error(e.tagName+"@"+n));for(var i=t.length-1;r<i;)t[r]=t[++r];if(t.length=i,e){var a=e.ownerDocument;a&&(N(a,e,n),n.ownerElement=null)}}function P(e){if(this._features={},e)for(var t in e)this._features=e[t]}function L(){}function D(e){return("<"==e?"<":">"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function R(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(R(e,t))return!0}while(e=e.nextSibling)}function M(){}function N(e,t,n,r){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&delete t._nsMap[n.prefix?n.localName:""]}function U(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,a=0;i;)r[a++]=i,i=i.nextSibling;r.length=a}}}function F(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,U(e.ownerDocument,e),t}function B(e,t,n){var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===g){var i=t.firstChild;if(null==i)return t;var a=t.lastChild}else i=a=t;var s=n?n.previousSibling:e.lastChild;i.previousSibling=s,a.nextSibling=n,s?s.nextSibling=i:e.firstChild=i,null==n?e.lastChild=a:n.previousSibling=a;do{i.parentNode=e}while(i!==a&&(i=i.nextSibling));return U(e.ownerDocument||e,e),t.nodeType==g&&(t.firstChild=t.lastChild=null),t}function j(){this._nsMap={}}function H(){}function V(){}function q(){}function W(){}function z(){}function G(){}function X(){}function $(){}function K(){}function Z(){}function Y(){}function Q(e,t){var n=[],r=9==this.nodeType&&this.documentElement||this,i=r.prefix,a=r.namespaceURI;if(a&&null==i&&null==(i=r.lookupPrefix(a)))var s=[{namespace:a,prefix:null}];return ee(this,n,e,t,s),n.join("")}function J(e,t,n){var r=e.prefix||"",i=e.namespaceURI;if(!r&&!i)return!1;if("xml"===r&&"http://www.w3.org/XML/1998/namespace"===i||"http://www.w3.org/2000/xmlns/"==i)return!1;for(var a=n.length;a--;){var s=n[a];if(s.prefix==r)return s.namespace!=i}return!0}function ee(e,t,n,r,a){if(r){if(!(e=r(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case s:a||(a=[]),a.length;var d=e.attributes,v=d.length,y=e.firstChild,_=e.tagName;n=i===e.namespaceURI||n,t.push("<",_);for(var b=0;b<v;b++)"xmlns"==(T=d.item(b)).prefix?a.push({prefix:T.localName,namespace:T.value}):"xmlns"==T.nodeName&&a.push({prefix:"",namespace:T.value});for(b=0;b<v;b++){var T;if(J(T=d.item(b),0,a)){var S=T.prefix||"",w=T.namespaceURI,k=S?" xmlns:"+S:" xmlns";t.push(k,'="',w,'"'),a.push({prefix:S,namespace:w})}ee(T,t,n,r,a)}if(J(e,0,a)&&(S=e.prefix||"",w=e.namespaceURI,k=S?" xmlns:"+S:" xmlns",t.push(k,'="',w,'"'),a.push({prefix:S,namespace:w})),y||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(_)){if(t.push(">"),n&&/^script$/i.test(_))for(;y;)y.data?t.push(y.data):ee(y,t,n,r,a),y=y.nextSibling;else for(;y;)ee(y,t,n,r,a),y=y.nextSibling;t.push("</",_,">")}else t.push("/>");return;case p:case g:for(y=e.firstChild;y;)ee(y,t,n,r,a),y=y.nextSibling;return;case o:return t.push(" ",e.name,'="',e.value.replace(/[&"]/g,D),'"');case u:return t.push(e.data.replace(/[<&]/g,D).replace(/]]>/g,"]]>"));case l:return t.push("<![CDATA[",e.data,"]]>");case f:return t.push("\x3c!--",e.data,"--\x3e");case m:var E=e.publicId,C=e.systemId;if(t.push("<!DOCTYPE ",e.name),E)t.push(" PUBLIC ",E),C&&"."!=C&&t.push(" ",C),t.push(">");else if(C&&"."!=C)t.push(" SYSTEM ",C,">");else{var x=e.internalSubset;x&&t.push(" [",x,"]"),t.push(">")}return;case h:return t.push("<?",e.target," ",e.data,"?>");case c:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function te(e,t,n){var r;switch(t.nodeType){case s:(r=t.cloneNode(!1)).ownerDocument=e;case g:break;case o:n=!0}if(r||(r=t.cloneNode(!1)),r.ownerDocument=e,r.parentNode=null,n)for(var i=t.firstChild;i;)r.appendChild(te(e,i,n)),i=i.nextSibling;return r}function ne(e,t,n){var r=new t.constructor;for(var i in t){var a=t[i];"object"!=typeof a&&a!=r[i]&&(r[i]=a)}switch(t.childNodes&&(r.childNodes=new k),r.ownerDocument=e,r.nodeType){case s:var u=t.attributes,l=r.attributes=new x,c=u.length;l._ownerElement=r;for(var d=0;d<c;d++)r.setAttributeNode(ne(e,u.item(d),!0));break;case o:n=!0}if(n)for(var h=t.firstChild;h;)r.appendChild(ne(e,h,n)),h=h.nextSibling;return r}function re(e,t,n){e[t]=n}y.INVALID_STATE_ERR=(_[11]="Invalid state",11),y.SYNTAX_ERR=(_[12]="Syntax error",12),y.INVALID_MODIFICATION_ERR=(_[13]="Invalid modification",13),y.NAMESPACE_ERR=(_[14]="Invalid namespace",14),y.INVALID_ACCESS_ERR=(_[15]="Invalid access",15),w.prototype=Error.prototype,n(y,w),k.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var n=[],r=0;r<this.length;r++)ee(this[r],n,e,t);return n.join("")}},E.prototype.item=function(e){return C(this),this[e]},r(E,k),x.prototype={length:0,item:k.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var n=this[t];if(n.nodeName==e)return n}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new w(S);var n=this.getNamedItem(e.nodeName);return A(this._ownerElement,this,e,n),n},setNamedItemNS:function(e){var t,n=e.ownerElement;if(n&&n!=this._ownerElement)throw new w(S);return t=this.getNamedItemNS(e.namespaceURI,e.localName),A(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return O(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);return O(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){for(var n=this.length;n--;){var r=this[n];if(r.localName==t&&r.namespaceURI==e)return r}return null}},P.prototype={hasFeature:function(e,t){var n=this._features[e.toLowerCase()];return!(!n||t&&!(t in n))},createDocument:function(e,t,n){var r=new M;if(r.implementation=this,r.childNodes=new k,r.doctype=n,n&&r.appendChild(n),t){var i=r.createElementNS(e,t);r.appendChild(i)}return r},createDocumentType:function(e,t,n){var r=new G;return r.name=e,r.nodeName=e,r.publicId=t,r.systemId=n,r}},L.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return B(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return F(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return ne(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==u&&e.nodeType==u?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var r in n)if(n[r]==e)return r;t=t.nodeType==o?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=t.nodeType==o?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},n(a,L),n(a,L.prototype),M.prototype={nodeName:"#document",nodeType:p,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==g){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return null==this.documentElement&&e.nodeType==s&&(this.documentElement=e),B(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),F(this,e)},importNode:function(e,t){return te(this,e,t)},getElementById:function(e){var t=null;return R(this.documentElement,(function(n){if(n.nodeType==s&&n.getAttribute("id")==e)return t=n,!0})),t},getElementsByClassName:function(e){var t=new RegExp("(^|\\s)"+e+"(\\s|$)");return new E(this,(function(e){var n=[];return R(e.documentElement,(function(r){r!==e&&r.nodeType==s&&t.test(r.getAttribute("class"))&&n.push(r)})),n}))},createElement:function(e){var t=new j;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new k,(t.attributes=new x)._ownerElement=t,t},createDocumentFragment:function(){var e=new Z;return e.ownerDocument=this,e.childNodes=new k,e},createTextNode:function(e){var t=new q;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new W;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new z;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new Y;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new H;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new K;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new j,r=t.split(":"),i=n.attributes=new x;return n.childNodes=new k,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,i._ownerElement=n,n},createAttributeNS:function(e,t){var n=new H,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},r(M,L),j.prototype={nodeType:s,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===g?this.insertBefore(e,null):function(e,t){var n=t.parentNode;if(n){var r=e.lastChild;n.removeChild(t),r=e.lastChild}return r=e.lastChild,t.parentNode=e,t.previousSibling=r,t.nextSibling=null,r?r.nextSibling=t:e.firstChild=t,e.lastChild=t,U(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new E(this,(function(t){var n=[];return R(t,(function(r){r===t||r.nodeType!=s||"*"!==e&&r.tagName!=e||n.push(r)})),n}))},getElementsByTagNameNS:function(e,t){return new E(this,(function(n){var r=[];return R(n,(function(i){i===n||i.nodeType!==s||"*"!==e&&i.namespaceURI!==e||"*"!==t&&i.localName!=t||r.push(i)})),r}))}},M.prototype.getElementsByTagName=j.prototype.getElementsByTagName,M.prototype.getElementsByTagNameNS=j.prototype.getElementsByTagNameNS,r(j,L),H.prototype.nodeType=o,r(H,L),V.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(_[b])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},r(V,L),q.prototype={nodeName:"#text",nodeType:u,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},r(q,V),W.prototype={nodeName:"#comment",nodeType:f},r(W,V),z.prototype={nodeName:"#cdata-section",nodeType:l},r(z,V),G.prototype.nodeType=m,r(G,L),X.prototype.nodeType=v,r(X,L),$.prototype.nodeType=d,r($,L),K.prototype.nodeType=c,r(K,L),Z.prototype.nodeName="#document-fragment",Z.prototype.nodeType=g,r(Z,L),Y.prototype.nodeType=h,r(Y,L),L.prototype.toString=Q;try{if(Object.defineProperty){function ie(e){switch(e.nodeType){case s:case g:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(ie(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(E.prototype,"length",{get:function(){return C(this),this.$$length}}),Object.defineProperty(L.prototype,"textContent",{get:function(){return ie(this)},set:function(e){switch(this.nodeType){case s:case g:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),re=function(e,t,n){e["$$"+t]=n}}}catch(ae){}t.DOMImplementation=P},70624:(e,t)=>{t.entityMap={lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}},91186:(e,t)=>{var n=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,r=new RegExp("[\\-\\.0-9"+n.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),i=new RegExp("^"+n.source+r.source+"*(?::"+n.source+r.source+"*)?$");function a(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,a)}function s(){}function o(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function u(e,t,n,r,i,a){function s(e,t,r){e in n.attributeNames&&a.fatalError("Attribute "+e+" redefined"),n.addValue(e,t,r)}for(var o,u=++t,l=0;;){var c=e.charAt(u);switch(c){case"=":if(1===l)o=e.slice(t,u),l=3;else{if(2!==l)throw new Error("attribute equal must after attrName");l=3}break;case"'":case'"':if(3===l||1===l){if(1===l&&(a.warning('attribute value must after "="'),o=e.slice(t,u)),t=u+1,!((u=e.indexOf(c,t))>0))throw new Error("attribute value no end '"+c+"' match");s(o,d=e.slice(t,u).replace(/&#?\w+;/g,i),t-1),l=5}else{if(4!=l)throw new Error('attribute value must after "="');s(o,d=e.slice(t,u).replace(/&#?\w+;/g,i),t),a.warning('attribute "'+o+'" missed start quot('+c+")!!"),t=u+1,l=5}break;case"/":switch(l){case 0:n.setTagName(e.slice(t,u));case 5:case 6:case 7:l=7,n.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),0==l&&n.setTagName(e.slice(t,u)),u;case">":switch(l){case 0:n.setTagName(e.slice(t,u));case 5:case 6:case 7:break;case 4:case 1:"/"===(d=e.slice(t,u)).slice(-1)&&(n.closed=!0,d=d.slice(0,-1));case 2:2===l&&(d=o),4==l?(a.warning('attribute "'+d+'" missed quot(")!'),s(o,d.replace(/&#?\w+;/g,i),t)):("http://www.w3.org/1999/xhtml"===r[""]&&d.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+d+'" missed value!! "'+d+'" instead!!'),s(d,d,t));break;case 3:throw new Error("attribute value missed!!")}return u;case"":c=" ";default:if(c<=" ")switch(l){case 0:n.setTagName(e.slice(t,u)),l=6;break;case 1:o=e.slice(t,u),l=2;break;case 4:var d=e.slice(t,u).replace(/&#?\w+;/g,i);a.warning('attribute "'+d+'" missed quot(")!!'),s(o,d,t);case 5:l=6}else switch(l){case 2:n.tagName,"http://www.w3.org/1999/xhtml"===r[""]&&o.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+o+'" missed value!! "'+o+'" instead2!!'),s(o,o,t),t=u,l=1;break;case 5:a.warning('attribute space is required"'+o+'"!!');case 6:l=1,t=u;break;case 3:l=4,t=u;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}u++}}function l(e,t,n){for(var r=e.tagName,i=null,a=e.length;a--;){var s=e[a],o=s.qName,u=s.value;if((f=o.indexOf(":"))>0)var l=s.prefix=o.slice(0,f),c=o.slice(f+1),d="xmlns"===l&&c;else c=o,l=null,d="xmlns"===o&&"";s.localName=c,!1!==d&&(null==i&&(i={},h(n,n={})),n[d]=i[d]=u,s.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(d,u))}for(a=e.length;a--;)(l=(s=e[a]).prefix)&&("xml"===l&&(s.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==l&&(s.uri=n[l||""]));var f;(f=r.indexOf(":"))>0?(l=e.prefix=r.slice(0,f),c=e.localName=r.slice(f+1)):(l=null,c=e.localName=r);var p=e.uri=n[l||""];if(t.startElement(p,c,r,e),!e.closed)return e.currentNSMap=n,e.localNSMap=i,!0;if(t.endElement(p,c,r),i)for(l in i)t.endPrefixMapping(l)}function c(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var a=e.indexOf("</"+n+">",t),s=e.substring(t+1,a);if(/[&<]/.test(s))return/^script$/i.test(n)?(i.characters(s,0,s.length),a):(s=s.replace(/&#?\w+;/g,r),i.characters(s,0,s.length),a)}return t+1}function d(e,t,n,r){var i=r[n];return null==i&&((i=e.lastIndexOf("</"+n+">"))<t&&(i=e.lastIndexOf("</"+n)),r[n]=i),i<t}function h(e,t){for(var n in e)t[n]=e[n]}function f(e,t,n,r){if("-"===e.charAt(t+2))return"-"===e.charAt(t+3)?(i=e.indexOf("--\x3e",t+4))>t?(n.comment(e,t+4,i-t-4),i+3):(r.error("Unclosed comment"),-1):-1;if("CDATA["==e.substr(t+3,6)){var i=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,i-t-9),n.endCDATA(),i+3}var a=function(e,t){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(i.lastIndex=t,i.exec(e);n=i.exec(e);)if(r.push(n),n[1])return r}(e,t),s=a.length;if(s>1&&/!doctype/i.test(a[0][0])){var o=a[1][0],u=!1,l=!1;s>3&&(/^public$/i.test(a[2][0])?(u=a[3][0],l=s>4&&a[4][0]):/^system$/i.test(a[2][0])&&(l=a[3][0]));var c=a[s-1];return n.startDTD(o,u,l),n.endDTD(),c.index+c[0].length}return-1}function p(e,t,n){var r=e.indexOf("?>",t);if(r){var i=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return i?(i[0].length,n.processingInstruction(i[1],i[2]),r+2):-1}return-1}function m(){this.attributeNames={}}a.prototype=new Error,a.prototype.name=a.name,s.prototype={parse:function(e,t,n){var r=this.domBuilder;r.startDocument(),h(t,t={}),function(e,t,n,r,i){function s(e){var t=e.slice(1,-1);return t in n?n[t]:"#"===t.charAt(0)?function(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}(parseInt(t.substr(1).replace("x","0x"))):(i.error("entity not found:"+e),e)}function h(t){if(t>w){var n=e.substring(w,t).replace(/&#?\w+;/g,s);b&&g(w),r.characters(n,0,t-w),w=t}}function g(t,n){for(;t>=y&&(n=_.exec(e));)v=n.index,y=v+n[0].length,b.lineNumber++;b.columnNumber=t-v+1}for(var v=0,y=0,_=/.*(?:\r\n?|\n)|.*$/g,b=r.locator,T=[{currentNSMap:t}],S={},w=0;;){try{var k=e.indexOf("<",w);if(k<0){if(!e.substr(w).match(/^\s*$/)){var E=r.doc,C=E.createTextNode(e.substr(w));E.appendChild(C),r.currentElement=C}return}switch(k>w&&h(k),e.charAt(k+1)){case"/":var x=e.indexOf(">",k+3),I=e.substring(k+2,x),A=T.pop();x<0?(I=e.substring(k+2).replace(/[\s<].*/,""),i.error("end tag name: "+I+" is not complete:"+A.tagName),x=k+1+I.length):I.match(/\s</)&&(I=I.replace(/[\s<].*/,""),i.error("end tag name: "+I+" maybe not complete"),x=k+1+I.length);var O=A.localNSMap,P=A.tagName==I;if(P||A.tagName&&A.tagName.toLowerCase()==I.toLowerCase()){if(r.endElement(A.uri,A.localName,I),O)for(var L in O)r.endPrefixMapping(L);P||i.fatalError("end tag name: "+I+" is not match the current start tagName:"+A.tagName)}else T.push(A);x++;break;case"?":b&&g(k),x=p(e,k,r);break;case"!":b&&g(k),x=f(e,k,r,i);break;default:b&&g(k);var D=new m,R=T[T.length-1].currentNSMap,M=(x=u(e,k,D,R,s,i),D.length);if(!D.closed&&d(e,x,D.tagName,S)&&(D.closed=!0,n.nbsp||i.warning("unclosed xml attribute")),b&&M){for(var N=o(b,{}),U=0;U<M;U++){var F=D[U];g(F.offset),F.locator=o(b,{})}r.locator=N,l(D,r,R)&&T.push(D),r.locator=b}else l(D,r,R)&&T.push(D);"http://www.w3.org/1999/xhtml"!==D.uri||D.closed?x++:x=c(e,x,D.tagName,s,r)}}catch(e){if(e instanceof a)throw e;i.error("element parse error: "+e),x=-1}x>w?w=x:h(Math.max(k,w)+1)}}(e,t,n,r,this.errorHandler),r.endDocument()}},m.prototype={setTagName:function(e){if(!i.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,n){if(!i.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},t.XMLReader=s,t.ParseError=a}}]);
|
|
1
|
+
/*! For license information please see 998-0bb9077175-reports.chunk.js.LICENSE.txt */
|
|
2
|
+
(self.webpackChunk_clickview_reports=self.webpackChunk_clickview_reports||[]).push([[998],{68942:(e,t,n)=>{"use strict";var r=n(51562),i=n(448),a=n(63848),s=function(e){var t={};return e?(e.trim().split("\n").forEach((function(e){var n=e.indexOf(":"),r=e.slice(0,n).trim().toLowerCase(),i=e.slice(n+1).trim();void 0===t[r]?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]})),t):t};function o(e,t,n){var r=e;return a(t)?(n=t,"string"==typeof e&&(r={uri:e})):r=i({},t,{uri:e}),r.callback=n,r}function u(e,t,n){return l(t=o(e,t,n))}function l(e){if(void 0===e.callback)throw new Error("callback argument missing");var t=!1,n=function(n,r,i){t||(t=!0,e.callback(n,r,i))};function r(){var e=void 0;if(e=c.response?c.response:c.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(e){}return null}(c),v)try{e=JSON.parse(e)}catch(e){}return e}function i(e){return clearTimeout(d),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,n(e,y)}function a(){if(!l){var t;clearTimeout(d),t=e.useXDR&&void 0===c.status?200:1223===c.status?204:c.status;var i=y,a=null;return 0!==t?(i={body:r(),statusCode:t,method:f,headers:{},url:h,rawRequest:c},c.getAllResponseHeaders&&(i.headers=s(c.getAllResponseHeaders()))):a=new Error("Internal XMLHttpRequest Error"),n(a,i,i.body)}}var o,l,c=e.xhr||null;c||(c=e.cors||e.useXDR?new u.XDomainRequest:new u.XMLHttpRequest);var d,h=c.url=e.uri||e.url,f=c.method=e.method||"GET",p=e.body||e.data,m=c.headers=e.headers||{},g=!!e.sync,v=!1,y={body:void 0,headers:{},statusCode:0,method:f,url:h,rawRequest:c};if("json"in e&&!1!==e.json&&(v=!0,m.accept||m.Accept||(m.Accept="application/json"),"GET"!==f&&"HEAD"!==f&&(m["content-type"]||m["Content-Type"]||(m["Content-Type"]="application/json"),p=JSON.stringify(!0===e.json?p:e.json))),c.onreadystatechange=function(){4===c.readyState&&setTimeout(a,0)},c.onload=a,c.onerror=i,c.onprogress=function(){},c.onabort=function(){l=!0},c.ontimeout=i,c.open(f,h,!g,e.username,e.password),g||(c.withCredentials=!!e.withCredentials),!g&&e.timeout>0&&(d=setTimeout((function(){if(!l){l=!0,c.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",i(e)}}),e.timeout)),c.setRequestHeader)for(o in m)m.hasOwnProperty(o)&&c.setRequestHeader(o,m[o]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(c.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(c),c.send(p||null),c}e.exports=u,e.exports.default=u,u.XMLHttpRequest=r.XMLHttpRequest||function(){},u.XDomainRequest="withCredentials"in new u.XMLHttpRequest?u.XMLHttpRequest:r.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],(function(e){u["delete"===e?"del":e]=function(t,n,r){return(n=o(t,n,r)).method=e.toUpperCase(),l(n)}}))},15206:e=>{var t=!("undefined"==typeof window||!window.document||!window.document.createElement);e.exports=t},232:function(e){e.exports=function(){"use strict";for(var e=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e<t?t:e>n?n:e},t={},n=0,r=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];n<r.length;n+=1){var i=r[n];t["[object "+i+"]"]=i.toLowerCase()}var a=function(e){return t[Object.prototype.toString.call(e)]||"object"},s=Math.PI,o={clip_rgb:function(t){t._clipped=!1,t._unclipped=t.slice(0);for(var n=0;n<=3;n++)n<3?((t[n]<0||t[n]>255)&&(t._clipped=!0),t[n]=e(t[n],0,255)):3===n&&(t[n]=e(t[n],0,1));return t},limit:e,type:a,unpack:function(e,t){return void 0===t&&(t=null),e.length>=3?Array.prototype.slice.call(e):"object"==a(e[0])&&t?t.split("").filter((function(t){return void 0!==e[0][t]})).map((function(t){return e[0][t]})):e[0]},last:function(e){if(e.length<2)return null;var t=e.length-1;return"string"==a(e[t])?e[t].toLowerCase():null},PI:s,TWOPI:2*s,PITHIRD:s/3,DEG2RAD:s/180,RAD2DEG:180/s},u={format:{},autodetect:[]},l=o.last,c=o.clip_rgb,d=o.type,h=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=this;if("object"===d(e[0])&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];var r=l(e),i=!1;if(!r){i=!0,u.sorted||(u.autodetect=u.autodetect.sort((function(e,t){return t.p-e.p})),u.sorted=!0);for(var a=0,s=u.autodetect;a<s.length;a+=1){var o=s[a];if(r=o.test.apply(o,e))break}}if(!u.format[r])throw new Error("unknown format: "+e);var h=u.format[r].apply(null,i?e:e.slice(0,-1));n._rgb=c(h),3===n._rgb.length&&n._rgb.push(1)};h.prototype.toString=function(){return"function"==d(this.hex)?this.hex():"["+this._rgb.join(",")+"]"};var f=h,p=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p.Color,[null].concat(e)))};p.Color=f,p.version="2.1.2";var m=p,g=o.unpack,v=Math.max,y=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=g(e,"rgb"),r=n[0],i=n[1],a=n[2],s=1-v(r/=255,v(i/=255,a/=255)),o=s<1?1/(1-s):0;return[(1-r-s)*o,(1-i-s)*o,(1-a-s)*o,s]},_=o.unpack,b=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=_(e,"cmyk"))[0],r=e[1],i=e[2],a=e[3],s=e.length>4?e[4]:1;return 1===a?[0,0,0,s]:[n>=1?0:255*(1-n)*(1-a),r>=1?0:255*(1-r)*(1-a),i>=1?0:255*(1-i)*(1-a),s]},T=o.unpack,S=o.type;f.prototype.cmyk=function(){return y(this._rgb)},m.cmyk=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["cmyk"])))},u.format.cmyk=b,u.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=T(e,"cmyk"),"array"===S(e)&&4===e.length)return"cmyk"}});var w=o.unpack,k=o.last,E=function(e){return Math.round(100*e)/100},C=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=w(e,"hsla"),r=k(e)||"lsa";return n[0]=E(n[0]||0),n[1]=E(100*n[1])+"%",n[2]=E(100*n[2])+"%","hsla"===r||n.length>3&&n[3]<1?(n[3]=n.length>3?n[3]:1,r="hsla"):n.length=3,r+"("+n.join(",")+")"},x=o.unpack,I=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=x(e,"rgba"))[0],r=e[1],i=e[2];n/=255,r/=255,i/=255;var a,s,o=Math.min(n,r,i),u=Math.max(n,r,i),l=(u+o)/2;return u===o?(a=0,s=Number.NaN):a=l<.5?(u-o)/(u+o):(u-o)/(2-u-o),n==u?s=(r-i)/(u-o):r==u?s=2+(i-n)/(u-o):i==u&&(s=4+(n-r)/(u-o)),(s*=60)<0&&(s+=360),e.length>3&&void 0!==e[3]?[s,a,l,e[3]]:[s,a,l]},A=o.unpack,O=o.last,P=Math.round,L=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=A(e,"rgba"),r=O(e)||"rgb";return"hsl"==r.substr(0,3)?C(I(n),r):(n[0]=P(n[0]),n[1]=P(n[1]),n[2]=P(n[2]),("rgba"===r||n.length>3&&n[3]<1)&&(n[3]=n.length>3?n[3]:1,r="rgba"),r+"("+n.slice(0,"rgb"===r?3:4).join(",")+")")},D=o.unpack,R=Math.round,M=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];var r,i,a,s=(t=D(t,"hsl"))[0],o=t[1],u=t[2];if(0===o)r=i=a=255*u;else{var l=[0,0,0],c=[0,0,0],d=u<.5?u*(1+o):u+o-u*o,h=2*u-d,f=s/360;l[0]=f+1/3,l[1]=f,l[2]=f-1/3;for(var p=0;p<3;p++)l[p]<0&&(l[p]+=1),l[p]>1&&(l[p]-=1),6*l[p]<1?c[p]=h+6*(d-h)*l[p]:2*l[p]<1?c[p]=d:3*l[p]<2?c[p]=h+(d-h)*(2/3-l[p])*6:c[p]=h;r=(e=[R(255*c[0]),R(255*c[1]),R(255*c[2])])[0],i=e[1],a=e[2]}return t.length>3?[r,i,a,t[3]]:[r,i,a,1]},N=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,U=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,F=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,B=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,j=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,H=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,V=Math.round,q=function(e){var t;if(e=e.toLowerCase().trim(),u.format.named)try{return u.format.named(e)}catch(e){}if(t=e.match(N)){for(var n=t.slice(1,4),r=0;r<3;r++)n[r]=+n[r];return n[3]=1,n}if(t=e.match(U)){for(var i=t.slice(1,5),a=0;a<4;a++)i[a]=+i[a];return i}if(t=e.match(F)){for(var s=t.slice(1,4),o=0;o<3;o++)s[o]=V(2.55*s[o]);return s[3]=1,s}if(t=e.match(B)){for(var l=t.slice(1,5),c=0;c<3;c++)l[c]=V(2.55*l[c]);return l[3]=+l[3],l}if(t=e.match(j)){var d=t.slice(1,4);d[1]*=.01,d[2]*=.01;var h=M(d);return h[3]=1,h}if(t=e.match(H)){var f=t.slice(1,4);f[1]*=.01,f[2]*=.01;var p=M(f);return p[3]=+t[4],p}};q.test=function(e){return N.test(e)||U.test(e)||F.test(e)||B.test(e)||j.test(e)||H.test(e)};var W=q,z=o.type;f.prototype.css=function(e){return L(this._rgb,e)},m.css=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["css"])))},u.format.css=W,u.autodetect.push({p:5,test:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(!t.length&&"string"===z(e)&&W.test(e))return"css"}});var G=o.unpack;u.format.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=G(e,"rgba");return n[0]*=255,n[1]*=255,n[2]*=255,n},m.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["gl"])))},f.prototype.gl=function(){var e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]};var X=o.unpack,$=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r=X(e,"rgb"),i=r[0],a=r[1],s=r[2],o=Math.min(i,a,s),u=Math.max(i,a,s),l=u-o,c=100*l/255,d=o/(255-l)*100;return 0===l?n=Number.NaN:(i===u&&(n=(a-s)/l),a===u&&(n=2+(s-i)/l),s===u&&(n=4+(i-a)/l),(n*=60)<0&&(n+=360)),[n,c,d]},K=o.unpack,Z=Math.floor,Y=function(){for(var e,t,n,r,i,a,s=[],o=arguments.length;o--;)s[o]=arguments[o];var u,l,c,d=(s=K(s,"hcg"))[0],h=s[1],f=s[2];f*=255;var p=255*h;if(0===h)u=l=c=f;else{360===d&&(d=0),d>360&&(d-=360),d<0&&(d+=360);var m=Z(d/=60),g=d-m,v=f*(1-h),y=v+p*(1-g),_=v+p*g,b=v+p;switch(m){case 0:u=(e=[b,_,v])[0],l=e[1],c=e[2];break;case 1:u=(t=[y,b,v])[0],l=t[1],c=t[2];break;case 2:u=(n=[v,b,_])[0],l=n[1],c=n[2];break;case 3:u=(r=[v,y,b])[0],l=r[1],c=r[2];break;case 4:u=(i=[_,v,b])[0],l=i[1],c=i[2];break;case 5:u=(a=[b,v,y])[0],l=a[1],c=a[2]}}return[u,l,c,s.length>3?s[3]:1]},Q=o.unpack,J=o.type;f.prototype.hcg=function(){return $(this._rgb)},m.hcg=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["hcg"])))},u.format.hcg=Y,u.autodetect.push({p:1,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Q(e,"hcg"),"array"===J(e)&&3===e.length)return"hcg"}});var ee=o.unpack,te=o.last,ne=Math.round,re=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=ee(e,"rgba"),r=n[0],i=n[1],a=n[2],s=n[3],o=te(e)||"auto";void 0===s&&(s=1),"auto"===o&&(o=s<1?"rgba":"rgb");var u="000000"+((r=ne(r))<<16|(i=ne(i))<<8|(a=ne(a))).toString(16);u=u.substr(u.length-6);var l="0"+ne(255*s).toString(16);switch(l=l.substr(l.length-2),o.toLowerCase()){case"rgba":return"#"+u+l;case"argb":return"#"+l+u;default:return"#"+u}},ie=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,ae=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,se=function(e){if(e.match(ie)){4!==e.length&&7!==e.length||(e=e.substr(1)),3===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var t=parseInt(e,16);return[t>>16,t>>8&255,255&t,1]}if(e.match(ae)){5!==e.length&&9!==e.length||(e=e.substr(1)),4===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);var n=parseInt(e,16);return[n>>24&255,n>>16&255,n>>8&255,Math.round((255&n)/255*100)/100]}throw new Error("unknown hex color: "+e)},oe=o.type;f.prototype.hex=function(e){return re(this._rgb,e)},m.hex=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["hex"])))},u.format.hex=se,u.autodetect.push({p:4,test:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(!t.length&&"string"===oe(e)&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return"hex"}});var ue=o.unpack,le=o.TWOPI,ce=Math.min,de=Math.sqrt,he=Math.acos,fe=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r=ue(e,"rgb"),i=r[0],a=r[1],s=r[2],o=ce(i/=255,a/=255,s/=255),u=(i+a+s)/3,l=u>0?1-o/u:0;return 0===l?n=NaN:(n=(i-a+(i-s))/2,n/=de((i-a)*(i-a)+(i-s)*(a-s)),n=he(n),s>a&&(n=le-n),n/=le),[360*n,l,u]},pe=o.unpack,me=o.limit,ge=o.TWOPI,ve=o.PITHIRD,ye=Math.cos,_e=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r,i,a=(e=pe(e,"hsi"))[0],s=e[1],o=e[2];return isNaN(a)&&(a=0),isNaN(s)&&(s=0),a>360&&(a-=360),a<0&&(a+=360),(a/=360)<1/3?r=1-((i=(1-s)/3)+(n=(1+s*ye(ge*a)/ye(ve-ge*a))/3)):a<2/3?i=1-((n=(1-s)/3)+(r=(1+s*ye(ge*(a-=1/3))/ye(ve-ge*a))/3)):n=1-((r=(1-s)/3)+(i=(1+s*ye(ge*(a-=2/3))/ye(ve-ge*a))/3)),[255*(n=me(o*n*3)),255*(r=me(o*r*3)),255*(i=me(o*i*3)),e.length>3?e[3]:1]},be=o.unpack,Te=o.type;f.prototype.hsi=function(){return fe(this._rgb)},m.hsi=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["hsi"])))},u.format.hsi=_e,u.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=be(e,"hsi"),"array"===Te(e)&&3===e.length)return"hsi"}});var Se=o.unpack,we=o.type;f.prototype.hsl=function(){return I(this._rgb)},m.hsl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["hsl"])))},u.format.hsl=M,u.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Se(e,"hsl"),"array"===we(e)&&3===e.length)return"hsl"}});var ke=o.unpack,Ee=Math.min,Ce=Math.max,xe=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r,i,a=(e=ke(e,"rgb"))[0],s=e[1],o=e[2],u=Ee(a,s,o),l=Ce(a,s,o),c=l-u;return i=l/255,0===l?(n=Number.NaN,r=0):(r=c/l,a===l&&(n=(s-o)/c),s===l&&(n=2+(o-a)/c),o===l&&(n=4+(a-s)/c),(n*=60)<0&&(n+=360)),[n,r,i]},Ie=o.unpack,Ae=Math.floor,Oe=function(){for(var e,t,n,r,i,a,s=[],o=arguments.length;o--;)s[o]=arguments[o];var u,l,c,d=(s=Ie(s,"hsv"))[0],h=s[1],f=s[2];if(f*=255,0===h)u=l=c=f;else{360===d&&(d=0),d>360&&(d-=360),d<0&&(d+=360);var p=Ae(d/=60),m=d-p,g=f*(1-h),v=f*(1-h*m),y=f*(1-h*(1-m));switch(p){case 0:u=(e=[f,y,g])[0],l=e[1],c=e[2];break;case 1:u=(t=[v,f,g])[0],l=t[1],c=t[2];break;case 2:u=(n=[g,f,y])[0],l=n[1],c=n[2];break;case 3:u=(r=[g,v,f])[0],l=r[1],c=r[2];break;case 4:u=(i=[y,g,f])[0],l=i[1],c=i[2];break;case 5:u=(a=[f,g,v])[0],l=a[1],c=a[2]}}return[u,l,c,s.length>3?s[3]:1]},Pe=o.unpack,Le=o.type;f.prototype.hsv=function(){return xe(this._rgb)},m.hsv=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["hsv"])))},u.format.hsv=Oe,u.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Pe(e,"hsv"),"array"===Le(e)&&3===e.length)return"hsv"}});var De=18,Re=.95047,Me=1,Ne=1.08883,Ue=.137931034,Fe=.206896552,Be=.12841855,je=.008856452,He=o.unpack,Ve=Math.pow,qe=function(e){return(e/=255)<=.04045?e/12.92:Ve((e+.055)/1.055,2.4)},We=function(e){return e>je?Ve(e,1/3):e/Be+Ue},ze=function(e,t,n){return e=qe(e),t=qe(t),n=qe(n),[We((.4124564*e+.3575761*t+.1804375*n)/Re),We((.2126729*e+.7151522*t+.072175*n)/Me),We((.0193339*e+.119192*t+.9503041*n)/Ne)]},Ge=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=He(e,"rgb"),r=n[0],i=n[1],a=n[2],s=ze(r,i,a),o=s[0],u=s[1],l=116*u-16;return[l<0?0:l,500*(o-u),200*(u-s[2])]},Xe=o.unpack,$e=Math.pow,Ke=function(e){return 255*(e<=.00304?12.92*e:1.055*$e(e,1/2.4)-.055)},Ze=function(e){return e>Fe?e*e*e:Be*(e-Ue)},Ye=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r,i,a=(e=Xe(e,"lab"))[0],s=e[1],o=e[2];return r=(a+16)/116,n=isNaN(s)?r:r+s/500,i=isNaN(o)?r:r-o/200,r=Me*Ze(r),n=Re*Ze(n),i=Ne*Ze(i),[Ke(3.2404542*n-1.5371385*r-.4985314*i),Ke(-.969266*n+1.8760108*r+.041556*i),Ke(.0556434*n-.2040259*r+1.0572252*i),e.length>3?e[3]:1]},Qe=o.unpack,Je=o.type;f.prototype.lab=function(){return Ge(this._rgb)},m.lab=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["lab"])))},u.format.lab=Ye,u.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Qe(e,"lab"),"array"===Je(e)&&3===e.length)return"lab"}});var et=o.unpack,tt=o.RAD2DEG,nt=Math.sqrt,rt=Math.atan2,it=Math.round,at=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=et(e,"lab"),r=n[0],i=n[1],a=n[2],s=nt(i*i+a*a),o=(rt(a,i)*tt+360)%360;return 0===it(1e4*s)&&(o=Number.NaN),[r,s,o]},st=o.unpack,ot=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=st(e,"rgb"),r=n[0],i=n[1],a=n[2],s=Ge(r,i,a),o=s[0],u=s[1],l=s[2];return at(o,u,l)},ut=o.unpack,lt=o.DEG2RAD,ct=Math.sin,dt=Math.cos,ht=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=ut(e,"lch"),r=n[0],i=n[1],a=n[2];return isNaN(a)&&(a=0),[r,dt(a*=lt)*i,ct(a)*i]},ft=o.unpack,pt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=ft(e,"lch"))[0],r=e[1],i=e[2],a=ht(n,r,i),s=a[0],o=a[1],u=a[2],l=Ye(s,o,u);return[l[0],l[1],l[2],e.length>3?e[3]:1]},mt=o.unpack,gt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=mt(e,"hcl").reverse();return pt.apply(void 0,n)},vt=o.unpack,yt=o.type;f.prototype.lch=function(){return ot(this._rgb)},f.prototype.hcl=function(){return ot(this._rgb).reverse()},m.lch=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["lch"])))},m.hcl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["hcl"])))},u.format.lch=pt,u.format.hcl=gt,["lch","hcl"].forEach((function(e){return u.autodetect.push({p:2,test:function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(t=vt(t,e),"array"===yt(t)&&3===t.length)return e}})}));var _t={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},bt=o.type;f.prototype.name=function(){for(var e=re(this._rgb,"rgb"),t=0,n=Object.keys(_t);t<n.length;t+=1){var r=n[t];if(_t[r]===e)return r.toLowerCase()}return e},u.format.named=function(e){if(e=e.toLowerCase(),_t[e])return se(_t[e]);throw new Error("unknown color name: "+e)},u.autodetect.push({p:5,test:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(!t.length&&"string"===bt(e)&&_t[e.toLowerCase()])return"named"}});var Tt=o.unpack,St=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=Tt(e,"rgb");return(n[0]<<16)+(n[1]<<8)+n[2]},wt=o.type,kt=o.type;f.prototype.num=function(){return St(this._rgb)},m.num=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["num"])))},u.format.num=function(e){if("number"==wt(e)&&e>=0&&e<=16777215)return[e>>16,e>>8&255,255&e,1];throw new Error("unknown num color: "+e)},u.autodetect.push({p:5,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(1===e.length&&"number"===kt(e[0])&&e[0]>=0&&e[0]<=16777215)return"num"}});var Et=o.unpack,Ct=o.type,xt=Math.round;f.prototype.rgb=function(e){return void 0===e&&(e=!0),!1===e?this._rgb.slice(0,3):this._rgb.slice(0,3).map(xt)},f.prototype.rgba=function(e){return void 0===e&&(e=!0),this._rgb.slice(0,4).map((function(t,n){return n<3?!1===e?t:xt(t):t}))},m.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["rgb"])))},u.format.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=Et(e,"rgba");return void 0===n[3]&&(n[3]=1),n},u.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Et(e,"rgba"),"array"===Ct(e)&&(3===e.length||4===e.length&&"number"==Ct(e[3])&&e[3]>=0&&e[3]<=1))return"rgb"}});var It=Math.log,At=function(e){var t,n,r,i=e/100;return i<66?(t=255,n=-155.25485562709179-.44596950469579133*(n=i-2)+104.49216199393888*It(n),r=i<20?0:.8274096064007395*(r=i-10)-254.76935184120902+115.67994401066147*It(r)):(t=351.97690566805693+.114206453784165*(t=i-55)-40.25366309332127*It(t),n=325.4494125711974+.07943456536662342*(n=i-50)-28.0852963507957*It(n),r=255),[t,n,r,1]},Ot=o.unpack,Pt=Math.round,Lt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n,r=Ot(e,"rgb"),i=r[0],a=r[2],s=1e3,o=4e4;o-s>.4;){var u=At(n=.5*(o+s));u[2]/u[0]>=a/i?o=n:s=n}return Pt(n)};f.prototype.temp=f.prototype.kelvin=f.prototype.temperature=function(){return Lt(this._rgb)},m.temp=m.kelvin=m.temperature=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f,[null].concat(e,["temp"])))},u.format.temp=u.format.kelvin=u.format.temperature=At;var Dt=o.type;f.prototype.alpha=function(e,t){return void 0===t&&(t=!1),void 0!==e&&"number"===Dt(e)?t?(this._rgb[3]=e,this):new f([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]},f.prototype.clipped=function(){return this._rgb._clipped||!1},f.prototype.darken=function(e){void 0===e&&(e=1);var t=this.lab();return t[0]-=De*e,new f(t,"lab").alpha(this.alpha(),!0)},f.prototype.brighten=function(e){return void 0===e&&(e=1),this.darken(-e)},f.prototype.darker=f.prototype.darken,f.prototype.brighter=f.prototype.brighten,f.prototype.get=function(e){var t=e.split("."),n=t[0],r=t[1],i=this[n]();if(r){var a=n.indexOf(r);if(a>-1)return i[a];throw new Error("unknown channel "+r+" in mode "+n)}return i};var Rt=o.type,Mt=Math.pow;f.prototype.luminance=function(e){if(void 0!==e&&"number"===Rt(e)){if(0===e)return new f([0,0,0,this._rgb[3]],"rgb");if(1===e)return new f([255,255,255,this._rgb[3]],"rgb");var t=this.luminance(),n=20,r=function(t,i){var a=t.interpolate(i,.5,"rgb"),s=a.luminance();return Math.abs(e-s)<1e-7||!n--?a:s>e?r(t,a):r(a,i)},i=(t>e?r(new f([0,0,0]),this):r(this,new f([255,255,255]))).rgb();return new f(i.concat([this._rgb[3]]))}return Nt.apply(void 0,this._rgb.slice(0,3))};var Nt=function(e,t,n){return.2126*(e=Ut(e))+.7152*(t=Ut(t))+.0722*Ut(n)},Ut=function(e){return(e/=255)<=.03928?e/12.92:Mt((e+.055)/1.055,2.4)},Ft={},Bt=o.type,jt=function(e,t,n){void 0===n&&(n=.5);for(var r=[],i=arguments.length-3;i-- >0;)r[i]=arguments[i+3];var a=r[0]||"lrgb";if(Ft[a]||r.length||(a=Object.keys(Ft)[0]),!Ft[a])throw new Error("interpolation mode "+a+" is not defined");return"object"!==Bt(e)&&(e=new f(e)),"object"!==Bt(t)&&(t=new f(t)),Ft[a](e,t,n).alpha(e.alpha()+n*(t.alpha()-e.alpha()))};f.prototype.mix=f.prototype.interpolate=function(e,t){void 0===t&&(t=.5);for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return jt.apply(void 0,[this,e,t].concat(n))},f.prototype.premultiply=function(e){void 0===e&&(e=!1);var t=this._rgb,n=t[3];return e?(this._rgb=[t[0]*n,t[1]*n,t[2]*n,n],this):new f([t[0]*n,t[1]*n,t[2]*n,n],"rgb")},f.prototype.saturate=function(e){void 0===e&&(e=1);var t=this.lch();return t[1]+=De*e,t[1]<0&&(t[1]=0),new f(t,"lch").alpha(this.alpha(),!0)},f.prototype.desaturate=function(e){return void 0===e&&(e=1),this.saturate(-e)};var Ht=o.type;f.prototype.set=function(e,t,n){void 0===n&&(n=!1);var r=e.split("."),i=r[0],a=r[1],s=this[i]();if(a){var o=i.indexOf(a);if(o>-1){if("string"==Ht(t))switch(t.charAt(0)){case"+":case"-":s[o]+=+t;break;case"*":s[o]*=+t.substr(1);break;case"/":s[o]/=+t.substr(1);break;default:s[o]=+t}else{if("number"!==Ht(t))throw new Error("unsupported value for Color.set");s[o]=t}var u=new f(s,i);return n?(this._rgb=u._rgb,this):u}throw new Error("unknown channel "+a+" in mode "+i)}return s};Ft.rgb=function(e,t,n){var r=e._rgb,i=t._rgb;return new f(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),"rgb")};var Vt=Math.sqrt,qt=Math.pow;Ft.lrgb=function(e,t,n){var r=e._rgb,i=r[0],a=r[1],s=r[2],o=t._rgb,u=o[0],l=o[1],c=o[2];return new f(Vt(qt(i,2)*(1-n)+qt(u,2)*n),Vt(qt(a,2)*(1-n)+qt(l,2)*n),Vt(qt(s,2)*(1-n)+qt(c,2)*n),"rgb")};Ft.lab=function(e,t,n){var r=e.lab(),i=t.lab();return new f(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),"lab")};var Wt=function(e,t,n,r){var i,a,s,o,u,l,c,d,h,p,m,g;return"hsl"===r?(s=e.hsl(),o=t.hsl()):"hsv"===r?(s=e.hsv(),o=t.hsv()):"hcg"===r?(s=e.hcg(),o=t.hcg()):"hsi"===r?(s=e.hsi(),o=t.hsi()):"lch"!==r&&"hcl"!==r||(r="hcl",s=e.hcl(),o=t.hcl()),"h"===r.substr(0,1)&&(u=(i=s)[0],c=i[1],h=i[2],l=(a=o)[0],d=a[1],p=a[2]),isNaN(u)||isNaN(l)?isNaN(u)?isNaN(l)?g=Number.NaN:(g=l,1!=h&&0!=h||"hsv"==r||(m=d)):(g=u,1!=p&&0!=p||"hsv"==r||(m=c)):g=u+n*(l>u&&l-u>180?l-(u+360):l<u&&u-l>180?l+360-u:l-u),void 0===m&&(m=c+n*(d-c)),new f([g,m,h+n*(p-h)],r)},zt=function(e,t,n){return Wt(e,t,n,"lch")};Ft.lch=zt,Ft.hcl=zt;Ft.num=function(e,t,n){var r=e.num(),i=t.num();return new f(r+n*(i-r),"num")};Ft.hcg=function(e,t,n){return Wt(e,t,n,"hcg")};Ft.hsi=function(e,t,n){return Wt(e,t,n,"hsi")};Ft.hsl=function(e,t,n){return Wt(e,t,n,"hsl")};Ft.hsv=function(e,t,n){return Wt(e,t,n,"hsv")};var Gt=o.clip_rgb,Xt=Math.pow,$t=Math.sqrt,Kt=Math.PI,Zt=Math.cos,Yt=Math.sin,Qt=Math.atan2,Jt=function(e,t){for(var n=e.length,r=[0,0,0,0],i=0;i<e.length;i++){var a=e[i],s=t[i]/n,o=a._rgb;r[0]+=Xt(o[0],2)*s,r[1]+=Xt(o[1],2)*s,r[2]+=Xt(o[2],2)*s,r[3]+=o[3]*s}return r[0]=$t(r[0]),r[1]=$t(r[1]),r[2]=$t(r[2]),r[3]>.9999999&&(r[3]=1),new f(Gt(r))},en=o.type,tn=Math.pow,nn=function(e){var t="rgb",n=m("#ccc"),r=0,i=[0,1],a=[],s=[0,0],o=!1,u=[],l=!1,c=0,d=1,h=!1,f={},p=!0,g=1,v=function(e){if((e=e||["#fff","#000"])&&"string"===en(e)&&m.brewer&&m.brewer[e.toLowerCase()]&&(e=m.brewer[e.toLowerCase()]),"array"===en(e)){1===e.length&&(e=[e[0],e[0]]),e=e.slice(0);for(var t=0;t<e.length;t++)e[t]=m(e[t]);a.length=0;for(var n=0;n<e.length;n++)a.push(n/(e.length-1))}return T(),u=e},y=function(e){return e},_=function(e){return e},b=function(e,r){var i,l;if(null==r&&(r=!1),isNaN(e)||null===e)return n;l=r?e:o&&o.length>2?function(e){if(null!=o){for(var t=o.length-1,n=0;n<t&&e>=o[n];)n++;return n-1}return 0}(e)/(o.length-2):d!==c?(e-c)/(d-c):1,l=_(l),r||(l=y(l)),1!==g&&(l=tn(l,g)),l=s[0]+l*(1-s[0]-s[1]),l=Math.min(1,Math.max(0,l));var h=Math.floor(1e4*l);if(p&&f[h])i=f[h];else{if("array"===en(u))for(var v=0;v<a.length;v++){var b=a[v];if(l<=b){i=u[v];break}if(l>=b&&v===a.length-1){i=u[v];break}if(l>b&&l<a[v+1]){l=(l-b)/(a[v+1]-b),i=m.interpolate(u[v],u[v+1],l,t);break}}else"function"===en(u)&&(i=u(l));p&&(f[h]=i)}return i},T=function(){return f={}};v(e);var S=function(e){var t=m(b(e));return l&&t[l]?t[l]():t};return S.classes=function(e){if(null!=e){if("array"===en(e))o=e,i=[e[0],e[e.length-1]];else{var t=m.analyze(i);o=0===e?[t.min,t.max]:m.limits(t,"e",e)}return S}return o},S.domain=function(e){if(!arguments.length)return i;c=e[0],d=e[e.length-1],a=[];var t=u.length;if(e.length===t&&c!==d)for(var n=0,r=Array.from(e);n<r.length;n+=1){var s=r[n];a.push((s-c)/(d-c))}else{for(var o=0;o<t;o++)a.push(o/(t-1));if(e.length>2){var l=e.map((function(t,n){return n/(e.length-1)})),h=e.map((function(e){return(e-c)/(d-c)}));h.every((function(e,t){return l[t]===e}))||(_=function(e){if(e<=0||e>=1)return e;for(var t=0;e>=h[t+1];)t++;var n=(e-h[t])/(h[t+1]-h[t]);return l[t]+n*(l[t+1]-l[t])})}}return i=[c,d],S},S.mode=function(e){return arguments.length?(t=e,T(),S):t},S.range=function(e,t){return v(e),S},S.out=function(e){return l=e,S},S.spread=function(e){return arguments.length?(r=e,S):r},S.correctLightness=function(e){return null==e&&(e=!0),h=e,T(),y=h?function(e){for(var t=b(0,!0).lab()[0],n=b(1,!0).lab()[0],r=t>n,i=b(e,!0).lab()[0],a=t+(n-t)*e,s=i-a,o=0,u=1,l=20;Math.abs(s)>.01&&l-- >0;)r&&(s*=-1),s<0?(o=e,e+=.5*(u-e)):(u=e,e+=.5*(o-e)),s=(i=b(e,!0).lab()[0])-a;return e}:function(e){return e},S},S.padding=function(e){return null!=e?("number"===en(e)&&(e=[e,e]),s=e,S):s},S.colors=function(t,n){arguments.length<2&&(n="hex");var r=[];if(0===arguments.length)r=u.slice(0);else if(1===t)r=[S(.5)];else if(t>1){var a=i[0],s=i[1]-a;r=function(e,t,n){for(var r=[],i=e<t,a=n?i?t+1:t-1:t,s=e;i?s<a:s>a;i?s++:s--)r.push(s);return r}(0,t,!1).map((function(e){return S(a+e/(t-1)*s)}))}else{e=[];var l=[];if(o&&o.length>2)for(var c=1,d=o.length,h=1<=d;h?c<d:c>d;h?c++:c--)l.push(.5*(o[c-1]+o[c]));else l=i;r=l.map((function(e){return S(e)}))}return m[n]&&(r=r.map((function(e){return e[n]()}))),r},S.cache=function(e){return null!=e?(p=e,S):p},S.gamma=function(e){return null!=e?(g=e,S):g},S.nodata=function(e){return null!=e?(n=m(e),S):n},S};var rn=function(e){var t,n,r,i,a,s,o;if(2===(e=e.map((function(e){return new f(e)}))).length)t=e.map((function(e){return e.lab()})),a=t[0],s=t[1],i=function(e){var t=[0,1,2].map((function(t){return a[t]+e*(s[t]-a[t])}));return new f(t,"lab")};else if(3===e.length)n=e.map((function(e){return e.lab()})),a=n[0],s=n[1],o=n[2],i=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*a[t]+2*(1-e)*e*s[t]+e*e*o[t]}));return new f(t,"lab")};else if(4===e.length){var u;r=e.map((function(e){return e.lab()})),a=r[0],s=r[1],o=r[2],u=r[3],i=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*(1-e)*a[t]+3*(1-e)*(1-e)*e*s[t]+3*(1-e)*e*e*o[t]+e*e*e*u[t]}));return new f(t,"lab")}}else if(5===e.length){var l=rn(e.slice(0,3)),c=rn(e.slice(2,5));i=function(e){return e<.5?l(2*e):c(2*(e-.5))}}return i},an=function(e,t,n){if(!an[n])throw new Error("unknown blend mode "+n);return an[n](e,t)},sn=function(e){return function(t,n){var r=m(n).rgb(),i=m(t).rgb();return m.rgb(e(r,i))}},on=function(e){return function(t,n){var r=[];return r[0]=e(t[0],n[0]),r[1]=e(t[1],n[1]),r[2]=e(t[2],n[2]),r}};an.normal=sn(on((function(e){return e}))),an.multiply=sn(on((function(e,t){return e*t/255}))),an.screen=sn(on((function(e,t){return 255*(1-(1-e/255)*(1-t/255))}))),an.overlay=sn(on((function(e,t){return t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255))}))),an.darken=sn(on((function(e,t){return e>t?t:e}))),an.lighten=sn(on((function(e,t){return e>t?e:t}))),an.dodge=sn(on((function(e,t){return 255===e||(e=t/255*255/(1-e/255))>255?255:e}))),an.burn=sn(on((function(e,t){return 255*(1-(1-t/255)/(e/255))})));for(var un=an,ln=o.type,cn=o.clip_rgb,dn=o.TWOPI,hn=Math.pow,fn=Math.sin,pn=Math.cos,mn=Math.floor,gn=Math.random,vn=Math.log,yn=Math.pow,_n=Math.floor,bn=Math.abs,Tn=function(e,t){void 0===t&&(t=null);var n={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===a(e)&&(e=Object.values(e)),e.forEach((function(e){t&&"object"===a(e)&&(e=e[t]),null==e||isNaN(e)||(n.values.push(e),n.sum+=e,e<n.min&&(n.min=e),e>n.max&&(n.max=e),n.count+=1)})),n.domain=[n.min,n.max],n.limits=function(e,t){return Sn(n,e,t)},n},Sn=function(e,t,n){void 0===t&&(t="equal"),void 0===n&&(n=7),"array"==a(e)&&(e=Tn(e));var r=e.min,i=e.max,s=e.values.sort((function(e,t){return e-t}));if(1===n)return[r,i];var o=[];if("c"===t.substr(0,1)&&(o.push(r),o.push(i)),"e"===t.substr(0,1)){o.push(r);for(var u=1;u<n;u++)o.push(r+u/n*(i-r));o.push(i)}else if("l"===t.substr(0,1)){if(r<=0)throw new Error("Logarithmic scales are only possible for values > 0");var l=Math.LOG10E*vn(r),c=Math.LOG10E*vn(i);o.push(r);for(var d=1;d<n;d++)o.push(yn(10,l+d/n*(c-l)));o.push(i)}else if("q"===t.substr(0,1)){o.push(r);for(var h=1;h<n;h++){var f=(s.length-1)*h/n,p=_n(f);if(p===f)o.push(s[p]);else{var m=f-p;o.push(s[p]*(1-m)+s[p+1]*m)}}o.push(i)}else if("k"===t.substr(0,1)){var g,v=s.length,y=new Array(v),_=new Array(n),b=!0,T=0,S=null;(S=[]).push(r);for(var w=1;w<n;w++)S.push(r+w/n*(i-r));for(S.push(i);b;){for(var k=0;k<n;k++)_[k]=0;for(var E=0;E<v;E++)for(var C=s[E],x=Number.MAX_VALUE,I=void 0,A=0;A<n;A++){var O=bn(S[A]-C);O<x&&(x=O,I=A),_[I]++,y[E]=I}for(var P=new Array(n),L=0;L<n;L++)P[L]=null;for(var D=0;D<v;D++)null===P[g=y[D]]?P[g]=s[D]:P[g]+=s[D];for(var R=0;R<n;R++)P[R]*=1/_[R];b=!1;for(var M=0;M<n;M++)if(P[M]!==S[M]){b=!0;break}S=P,++T>200&&(b=!1)}for(var N={},U=0;U<n;U++)N[U]=[];for(var F=0;F<v;F++)N[g=y[F]].push(s[F]);for(var B=[],j=0;j<n;j++)B.push(N[j][0]),B.push(N[j][N[j].length-1]);B=B.sort((function(e,t){return e-t})),o.push(B[0]);for(var H=1;H<B.length;H+=2){var V=B[H];isNaN(V)||-1!==o.indexOf(V)||o.push(V)}}return o},wn={analyze:Tn,limits:Sn},kn=Math.sqrt,En=Math.atan2,Cn=Math.abs,xn=Math.cos,In=Math.PI,An={cool:function(){return nn([m.hsl(180,1,.9),m.hsl(250,.7,.4)])},hot:function(){return nn(["#000","#f00","#ff0","#fff"]).mode("rgb")}},On={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Pn=0,Ln=Object.keys(On);Pn<Ln.length;Pn+=1){var Dn=Ln[Pn];On[Dn.toLowerCase()]=On[Dn]}var Rn=On;return m.average=function(e,t,n){void 0===t&&(t="lrgb"),void 0===n&&(n=null);var r=e.length;n||(n=Array.from(new Array(r)).map((function(){return 1})));var i=r/n.reduce((function(e,t){return e+t}));if(n.forEach((function(e,t){n[t]*=i})),e=e.map((function(e){return new f(e)})),"lrgb"===t)return Jt(e,n);for(var a=e.shift(),s=a.get(t),o=[],u=0,l=0,c=0;c<s.length;c++)if(s[c]=(s[c]||0)*n[0],o.push(isNaN(s[c])?0:n[0]),"h"===t.charAt(c)&&!isNaN(s[c])){var d=s[c]/180*Kt;u+=Zt(d)*n[0],l+=Yt(d)*n[0]}var h=a.alpha()*n[0];e.forEach((function(e,r){var i=e.get(t);h+=e.alpha()*n[r+1];for(var a=0;a<s.length;a++)if(!isNaN(i[a]))if(o[a]+=n[r+1],"h"===t.charAt(a)){var c=i[a]/180*Kt;u+=Zt(c)*n[r+1],l+=Yt(c)*n[r+1]}else s[a]+=i[a]*n[r+1]}));for(var p=0;p<s.length;p++)if("h"===t.charAt(p)){for(var m=Qt(l/o[p],u/o[p])/Kt*180;m<0;)m+=360;for(;m>=360;)m-=360;s[p]=m}else s[p]=s[p]/o[p];return h/=r,new f(s,t).alpha(h>.99999?1:h,!0)},m.bezier=function(e){var t=rn(e);return t.scale=function(){return nn(t)},t},m.blend=un,m.cubehelix=function(e,t,n,r,i){void 0===e&&(e=300),void 0===t&&(t=-1.5),void 0===n&&(n=1),void 0===r&&(r=1),void 0===i&&(i=[0,1]);var a,s=0;"array"===ln(i)?a=i[1]-i[0]:(a=0,i=[i,i]);var o=function(o){var u=dn*((e+120)/360+t*o),l=hn(i[0]+a*o,r),c=(0!==s?n[0]+o*s:n)*l*(1-l)/2,d=pn(u),h=fn(u);return m(cn([255*(l+c*(-.14861*d+1.78277*h)),255*(l+c*(-.29227*d-.90649*h)),255*(l+c*(1.97294*d)),1]))};return o.start=function(t){return null==t?e:(e=t,o)},o.rotations=function(e){return null==e?t:(t=e,o)},o.gamma=function(e){return null==e?r:(r=e,o)},o.hue=function(e){return null==e?n:("array"===ln(n=e)?0==(s=n[1]-n[0])&&(n=n[1]):s=0,o)},o.lightness=function(e){return null==e?i:("array"===ln(e)?(i=e,a=e[1]-e[0]):(i=[e,e],a=0),o)},o.scale=function(){return m.scale(o)},o.hue(n),o},m.mix=m.interpolate=jt,m.random=function(){for(var e="#",t=0;t<6;t++)e+="0123456789abcdef".charAt(mn(16*gn()));return new f(e,"hex")},m.scale=nn,m.analyze=wn.analyze,m.contrast=function(e,t){e=new f(e),t=new f(t);var n=e.luminance(),r=t.luminance();return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)},m.deltaE=function(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=1),e=new f(e),t=new f(t);for(var i=Array.from(e.lab()),a=i[0],s=i[1],o=i[2],u=Array.from(t.lab()),l=u[0],c=u[1],d=u[2],h=kn(s*s+o*o),p=kn(c*c+d*d),m=a<16?.511:.040975*a/(1+.01765*a),g=.0638*h/(1+.0131*h)+.638,v=h<1e-6?0:180*En(o,s)/In;v<0;)v+=360;for(;v>=360;)v-=360;var y=v>=164&&v<=345?.56+Cn(.2*xn(In*(v+168)/180)):.36+Cn(.4*xn(In*(v+35)/180)),_=h*h*h*h,b=kn(_/(_+1900)),T=g*(b*y+1-b),S=h-p,w=s-c,k=o-d,E=(a-l)/(n*m),C=S/(r*g);return kn(E*E+C*C+(w*w+k*k-S*S)/(T*T))},m.distance=function(e,t,n){void 0===n&&(n="lab"),e=new f(e),t=new f(t);var r=e.get(n),i=t.get(n),a=0;for(var s in r){var o=(r[s]||0)-(i[s]||0);a+=o*o}return Math.sqrt(a)},m.limits=wn.limits,m.valid=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];try{return new(Function.prototype.bind.apply(f,[null].concat(e))),!0}catch(e){return!1}},m.scales=An,m.colors=_t,m.brewer=Rn,m}()},94605:e=>{e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},29076:(e,t,n)=>{var r=n(62366);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},5822:(e,t,n)=>{var r=n(46802),i=n(22275),a=n(50430),s=r("unscopables"),o=Array.prototype;null==o[s]&&a(o,s,i(null)),e.exports=function(e){o[s][e]=!0}},25528:(e,t,n)=>{"use strict";var r=n(50189).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},72814:e=>{e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},4905:(e,t,n)=>{var r=n(62366);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},16607:(e,t,n)=>{"use strict";var r=n(72758).forEach,i=n(31853);e.exports=i("forEach")?function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}:[].forEach},5029:(e,t,n)=>{var r=n(40678),i=n(74479),a=n(6971),s=function(e){return function(t,n,s){var o,u=r(t),l=i(u.length),c=a(s,l);if(e&&n!=n){for(;l>c;)if((o=u[c++])!=o)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},72758:(e,t,n)=>{var r=n(17755),i=n(62901),a=n(87615),s=n(74479),o=n(17021),u=[].push,l=function(e){var t=1==e,n=2==e,l=3==e,c=4==e,d=6==e,h=5==e||d;return function(f,p,m,g){for(var v,y,_=a(f),b=i(_),T=r(p,m,3),S=s(b.length),w=0,k=g||o,E=t?k(f,S):n?k(f,0):void 0;S>w;w++)if((h||w in b)&&(y=T(v=b[w],w,_),e))if(t)E[w]=y;else if(y)switch(e){case 3:return!0;case 5:return v;case 6:return w;case 2:u.call(E,v)}else if(c)return!1;return d?-1:l||c?c:E}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6)}},95611:(e,t,n)=>{var r=n(25061),i=n(46802),a=n(24101),s=i("species");e.exports=function(e){return a>=51||!r((function(){var t=[];return(t.constructor={})[s]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},62040:(e,t,n)=>{var r=n(94605),i=n(87615),a=n(62901),s=n(74479),o=function(e){return function(t,n,o,u){r(n);var l=i(t),c=a(l),d=s(l.length),h=e?d-1:0,f=e?-1:1;if(o<2)for(;;){if(h in c){u=c[h],h+=f;break}if(h+=f,e?h<0:d<=h)throw TypeError("Reduce of empty array with no initial value")}for(;e?h>=0:d>h;h+=f)h in c&&(u=n(u,c[h],h,l));return u}};e.exports={left:o(!1),right:o(!0)}},17021:(e,t,n)=>{var r=n(62366),i=n(20119),a=n(46802)("species");e.exports=function(e,t){var n;return i(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[a])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},17755:(e,t,n)=>{var r=n(94605);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},35304:(e,t,n)=>{var r=n(4905);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var a=e.return;throw void 0!==a&&r(a.call(e)),t}}},13165:(e,t,n)=>{var r=n(46802)("iterator"),i=!1;try{var a=0,s={next:function(){return{done:!!a++}},return:function(){i=!0}};s[r]=function(){return this},Array.from(s,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var a={};a[r]=function(){return{next:function(){return{done:n=!0}}}},e(a)}catch(e){}return n}},75489:e=>{var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},20486:(e,t,n)=>{var r=n(75489),i=n(46802)("toStringTag"),a="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:a?r(t):"Object"==(s=r(t))&&"function"==typeof t.callee?"Arguments":s}},53769:(e,t,n)=>{"use strict";var r=n(86846),i=n(81738).getWeakData,a=n(4905),s=n(62366),o=n(72814),u=n(98971),l=n(72758),c=n(51900),d=n(50684),h=d.set,f=d.getterFor,p=l.find,m=l.findIndex,g=0,v=function(e){return e.frozen||(e.frozen=new y)},y=function(){this.entries=[]},_=function(e,t){return p(e.entries,(function(e){return e[0]===t}))};y.prototype={get:function(e){var t=_(this,e);if(t)return t[1]},has:function(e){return!!_(this,e)},set:function(e,t){var n=_(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=m(this.entries,(function(t){return t[0]===e}));return~t&&this.entries.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,l){var d=e((function(e,r){o(e,d,t),h(e,{type:t,id:g++,frozen:void 0}),null!=r&&u(r,e[l],e,n)})),p=f(t),m=function(e,t,n){var r=p(e),s=i(a(t),!0);return!0===s?v(r).set(t,n):s[r.id]=n,e};return r(d.prototype,{delete:function(e){var t=p(this);if(!s(e))return!1;var n=i(e);return!0===n?v(t).delete(e):n&&c(n,t.id)&&delete n[t.id]},has:function(e){var t=p(this);if(!s(e))return!1;var n=i(e);return!0===n?v(t).has(e):n&&c(n,t.id)}}),r(d.prototype,n?{get:function(e){var t=p(this);if(s(e)){var n=i(e);return!0===n?v(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return m(this,e,t)}}:{add:function(e){return m(this,e,!0)}}),d}}},66606:(e,t,n)=>{"use strict";var r=n(29638),i=n(45001),a=n(91092),s=n(96313),o=n(81738),u=n(98971),l=n(72814),c=n(62366),d=n(25061),h=n(13165),f=n(40606),p=n(3419);e.exports=function(e,t,n,m,g){var v=i[e],y=v&&v.prototype,_=v,b=m?"set":"add",T={},S=function(e){var t=y[e];s(y,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(g&&!c(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return g&&!c(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(g&&!c(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(a(e,"function"!=typeof v||!(g||y.forEach&&!d((function(){(new v).entries().next()})))))_=n.getConstructor(t,e,m,b),o.REQUIRED=!0;else if(a(e,!0)){var w=new _,k=w[b](g?{}:-0,1)!=w,E=d((function(){w.has(1)})),C=h((function(e){new v(e)})),x=!g&&d((function(){for(var e=new v,t=5;t--;)e[b](t,t);return!e.has(-0)}));C||((_=t((function(t,n){l(t,_,e);var r=p(new v,t,_);return null!=n&&u(n,r[b],r,m),r}))).prototype=y,y.constructor=_),(E||x)&&(S("delete"),S("has"),m&&S("get")),(x||k)&&S(b),g&&y.clear&&delete y.clear}return T[e]=_,r({global:!0,forced:_!=v},T),f(_,e),g||n.setStrong(_,e,m),_}},46810:(e,t,n)=>{var r=n(51900),i=n(62466),a=n(8117),s=n(56462);e.exports=function(e,t){for(var n=i(t),o=s.f,u=a.f,l=0;l<n.length;l++){var c=n[l];r(e,c)||o(e,c,u(t,c))}}},10149:(e,t,n)=>{var r=n(25061);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},62141:(e,t,n)=>{"use strict";var r=n(61151).IteratorPrototype,i=n(22275),a=n(86034),s=n(40606),o=n(80501),u=function(){return this};e.exports=function(e,t,n){var l=t+" Iterator";return e.prototype=i(r,{next:a(1,n)}),s(e,l,!1,!0),o[l]=u,e}},50430:(e,t,n)=>{var r=n(11502),i=n(56462),a=n(86034);e.exports=r?function(e,t,n){return i.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},86034:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},30645:(e,t,n)=>{"use strict";var r=n(29638),i=n(62141),a=n(64320),s=n(22848),o=n(40606),u=n(50430),l=n(96313),c=n(46802),d=n(20013),h=n(80501),f=n(61151),p=f.IteratorPrototype,m=f.BUGGY_SAFARI_ITERATORS,g=c("iterator"),v="keys",y="values",_="entries",b=function(){return this};e.exports=function(e,t,n,c,f,T,S){i(n,t,c);var w,k,E,C=function(e){if(e===f&&P)return P;if(!m&&e in A)return A[e];switch(e){case v:case y:case _:return function(){return new n(this,e)}}return function(){return new n(this)}},x=t+" Iterator",I=!1,A=e.prototype,O=A[g]||A["@@iterator"]||f&&A[f],P=!m&&O||C(f),L="Array"==t&&A.entries||O;if(L&&(w=a(L.call(new e)),p!==Object.prototype&&w.next&&(d||a(w)===p||(s?s(w,p):"function"!=typeof w[g]&&u(w,g,b)),o(w,x,!0,!0),d&&(h[x]=b))),f==y&&O&&O.name!==y&&(I=!0,P=function(){return O.call(this)}),d&&!S||A[g]===P||u(A,g,P),h[t]=P,f)if(k={values:C(y),keys:T?P:C(v),entries:C(_)},S)for(E in k)(m||I||!(E in A))&&l(A,E,k[E]);else r({target:t,proto:!0,forced:m||I},k);return k}},11502:(e,t,n)=>{var r=n(25061);e.exports=!r((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},36009:(e,t,n)=>{var r=n(45001),i=n(62366),a=r.document,s=i(a)&&i(a.createElement);e.exports=function(e){return s?a.createElement(e):{}}},58514:e=>{e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},72089:e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},29638:(e,t,n)=>{var r=n(45001),i=n(8117).f,a=n(50430),s=n(96313),o=n(88506),u=n(46810),l=n(91092);e.exports=function(e,t){var n,c,d,h,f,p=e.target,m=e.global,g=e.stat;if(n=m?r:g?r[p]||o(p,{}):(r[p]||{}).prototype)for(c in t){if(h=t[c],d=e.noTargetGet?(f=i(n,c))&&f.value:n[c],!l(m?c:p+(g?".":"#")+c,e.forced)&&void 0!==d){if(typeof h==typeof d)continue;u(h,d)}(e.sham||d&&d.sham)&&a(h,"sham",!0),s(n,c,h,e)}}},25061:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},95453:(e,t,n)=>{"use strict";var r=n(50430),i=n(96313),a=n(25061),s=n(46802),o=n(44847),u=s("species"),l=!a((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),c=!a((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,d){var h=s(e),f=!a((function(){var t={};return t[h]=function(){return 7},7!=""[e](t)})),p=f&&!a((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return t=!0,null},n[h](""),!t}));if(!f||!p||"replace"===e&&!l||"split"===e&&!c){var m=/./[h],g=n(h,""[e],(function(e,t,n,r,i){return t.exec===o?f&&!i?{done:!0,value:m.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}})),v=g[0],y=g[1];i(String.prototype,e,v),i(RegExp.prototype,h,2==t?function(e,t){return y.call(e,this,t)}:function(e){return y.call(e,this)}),d&&r(RegExp.prototype[h],"sham",!0)}}},98218:(e,t,n)=>{var r=n(25061);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},21501:(e,t,n)=>{var r=n(6809);e.exports=r("native-function-to-string",Function.toString)},3425:(e,t,n)=>{var r=n(53757),i=n(45001),a=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?a(r[e])||a(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},26354:(e,t,n)=>{var r=n(20486),i=n(80501),a=n(46802)("iterator");e.exports=function(e){if(null!=e)return e[a]||e["@@iterator"]||i[r(e)]}},45001:(e,t,n)=>{var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||Function("return this")()},51900:e=>{var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},92499:e=>{e.exports={}},12118:(e,t,n)=>{var r=n(3425);e.exports=r("document","documentElement")},17788:(e,t,n)=>{var r=n(11502),i=n(25061),a=n(36009);e.exports=!r&&!i((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},62901:(e,t,n)=>{var r=n(25061),i=n(75489),a="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?a.call(e,""):Object(e)}:Object},3419:(e,t,n)=>{var r=n(62366),i=n(22848);e.exports=function(e,t,n){var a,s;return i&&"function"==typeof(a=t.constructor)&&a!==n&&r(s=a.prototype)&&s!==n.prototype&&i(e,s),e}},81738:(e,t,n)=>{var r=n(92499),i=n(62366),a=n(51900),s=n(56462).f,o=n(41050),u=n(98218),l=o("meta"),c=0,d=Object.isExtensible||function(){return!0},h=function(e){s(e,l,{value:{objectID:"O"+ ++c,weakData:{}}})},f=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,l)){if(!d(e))return"F";if(!t)return"E";h(e)}return e[l].objectID},getWeakData:function(e,t){if(!a(e,l)){if(!d(e))return!0;if(!t)return!1;h(e)}return e[l].weakData},onFreeze:function(e){return u&&f.REQUIRED&&d(e)&&!a(e,l)&&h(e),e}};r[l]=!0},50684:(e,t,n)=>{var r,i,a,s=n(77650),o=n(45001),u=n(62366),l=n(50430),c=n(51900),d=n(61695),h=n(92499),f=o.WeakMap;if(s){var p=new f,m=p.get,g=p.has,v=p.set;r=function(e,t){return v.call(p,e,t),t},i=function(e){return m.call(p,e)||{}},a=function(e){return g.call(p,e)}}else{var y=d("state");h[y]=!0,r=function(e,t){return l(e,y,t),t},i=function(e){return c(e,y)?e[y]:{}},a=function(e){return c(e,y)}}e.exports={set:r,get:i,has:a,enforce:function(e){return a(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},55557:(e,t,n)=>{var r=n(46802),i=n(80501),a=r("iterator"),s=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||s[a]===e)}},20119:(e,t,n)=>{var r=n(75489);e.exports=Array.isArray||function(e){return"Array"==r(e)}},91092:(e,t,n)=>{var r=n(25061),i=/#|\.prototype\./,a=function(e,t){var n=o[s(e)];return n==l||n!=u&&("function"==typeof t?r(t):!!t)},s=a.normalize=function(e){return String(e).replace(i,".").toLowerCase()},o=a.data={},u=a.NATIVE="N",l=a.POLYFILL="P";e.exports=a},62366:e=>{e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},20013:e=>{e.exports=!1},98971:(e,t,n)=>{var r=n(4905),i=n(55557),a=n(74479),s=n(17755),o=n(26354),u=n(35304),l=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,n,c,d){var h,f,p,m,g,v,y,_=s(t,n,c?2:1);if(d)h=e;else{if("function"!=typeof(f=o(e)))throw TypeError("Target is not iterable");if(i(f)){for(p=0,m=a(e.length);m>p;p++)if((g=c?_(r(y=e[p])[0],y[1]):_(e[p]))&&g instanceof l)return g;return new l(!1)}h=f.call(e)}for(v=h.next;!(y=v.call(h)).done;)if("object"==typeof(g=u(h,_,y.value,c))&&g&&g instanceof l)return g;return new l(!1)}).stop=function(e){return new l(!0,e)}},61151:(e,t,n)=>{"use strict";var r,i,a,s=n(64320),o=n(50430),u=n(51900),l=n(46802),c=n(20013),d=l("iterator"),h=!1;[].keys&&("next"in(a=[].keys())?(i=s(s(a)))!==Object.prototype&&(r=i):h=!0),null==r&&(r={}),c||u(r,d)||o(r,d,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},80501:e=>{e.exports={}},99262:(e,t,n)=>{var r=n(25061);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},77650:(e,t,n)=>{var r=n(45001),i=n(21501),a=r.WeakMap;e.exports="function"==typeof a&&/native code/.test(i.call(a))},71640:(e,t,n)=>{"use strict";var r=n(11502),i=n(25061),a=n(89749),s=n(72822),o=n(49265),u=n(87615),l=n(62901),c=Object.assign;e.exports=!c||i((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=c({},e)[n]||a(c({},t)).join("")!=r}))?function(e,t){for(var n=u(e),i=arguments.length,c=1,d=s.f,h=o.f;i>c;)for(var f,p=l(arguments[c++]),m=d?a(p).concat(d(p)):a(p),g=m.length,v=0;g>v;)f=m[v++],r&&!h.call(p,f)||(n[f]=p[f]);return n}:c},22275:(e,t,n)=>{var r=n(4905),i=n(56191),a=n(72089),s=n(92499),o=n(12118),u=n(36009),l=n(61695)("IE_PROTO"),c="prototype",d=function(){},h=function(){var e,t=u("iframe"),n=a.length,r="script",i="java"+r+":";for(t.style.display="none",o.appendChild(t),t.src=String(i),(e=t.contentWindow.document).open(),e.write("<"+r+">document.F=Object</"+r+">"),e.close(),h=e.F;n--;)delete h[c][a[n]];return h()};e.exports=Object.create||function(e,t){var n;return null!==e?(d[c]=r(e),n=new d,d[c]=null,n[l]=e):n=h(),void 0===t?n:i(n,t)},s[l]=!0},56191:(e,t,n)=>{var r=n(11502),i=n(56462),a=n(4905),s=n(89749);e.exports=r?Object.defineProperties:function(e,t){a(e);for(var n,r=s(t),o=r.length,u=0;o>u;)i.f(e,n=r[u++],t[n]);return e}},56462:(e,t,n)=>{var r=n(11502),i=n(17788),a=n(4905),s=n(76973),o=Object.defineProperty;t.f=r?o:function(e,t,n){if(a(e),t=s(t,!0),a(n),i)try{return o(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},8117:(e,t,n)=>{var r=n(11502),i=n(49265),a=n(86034),s=n(40678),o=n(76973),u=n(51900),l=n(17788),c=Object.getOwnPropertyDescriptor;t.f=r?c:function(e,t){if(e=s(e),t=o(t,!0),l)try{return c(e,t)}catch(e){}if(u(e,t))return a(!i.f.call(e,t),e[t])}},59219:(e,t,n)=>{var r=n(23855),i=n(72089).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},72822:(e,t)=>{t.f=Object.getOwnPropertySymbols},64320:(e,t,n)=>{var r=n(51900),i=n(87615),a=n(61695),s=n(10149),o=a("IE_PROTO"),u=Object.prototype;e.exports=s?Object.getPrototypeOf:function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?u:null}},23855:(e,t,n)=>{var r=n(51900),i=n(40678),a=n(5029).indexOf,s=n(92499);e.exports=function(e,t){var n,o=i(e),u=0,l=[];for(n in o)!r(s,n)&&r(o,n)&&l.push(n);for(;t.length>u;)r(o,n=t[u++])&&(~a(l,n)||l.push(n));return l}},89749:(e,t,n)=>{var r=n(23855),i=n(72089);e.exports=Object.keys||function(e){return r(e,i)}},49265:(e,t)=>{"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);t.f=i?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},22848:(e,t,n)=>{var r=n(4905),i=n(29076);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,a){return r(n),i(a),t?e.call(n,a):n.__proto__=a,n}}():void 0)},45085:(e,t,n)=>{"use strict";var r=n(20486),i={};i[n(46802)("toStringTag")]="z",e.exports="[object z]"!==String(i)?function(){return"[object "+r(this)+"]"}:i.toString},62466:(e,t,n)=>{var r=n(3425),i=n(59219),a=n(72822),s=n(4905);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(s(e)),n=a.f;return n?t.concat(n(e)):t}},7206:(e,t,n)=>{var r=n(45001),i=n(9522).trim,a=n(49309),s=r.parseInt,o=/^[+-]?0[Xx]/,u=8!==s(a+"08")||22!==s(a+"0x16");e.exports=u?function(e,t){var n=i(String(e));return s(n,t>>>0||(o.test(n)?16:10))}:s},53757:(e,t,n)=>{e.exports=n(45001)},86846:(e,t,n)=>{var r=n(96313);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},96313:(e,t,n)=>{var r=n(45001),i=n(6809),a=n(50430),s=n(51900),o=n(88506),u=n(21501),l=n(50684),c=l.get,d=l.enforce,h=String(u).split("toString");i("inspectSource",(function(e){return u.call(e)})),(e.exports=function(e,t,n,i){var u=!!i&&!!i.unsafe,l=!!i&&!!i.enumerable,c=!!i&&!!i.noTargetGet;"function"==typeof n&&("string"!=typeof t||s(n,"name")||a(n,"name",t),d(n).source=h.join("string"==typeof t?t:"")),e!==r?(u?!c&&e[t]&&(l=!0):delete e[t],l?e[t]=n:a(e,t,n)):l?e[t]=n:o(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||u.call(this)}))},41847:(e,t,n)=>{var r=n(75489),i=n(44847);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var a=n.call(e,t);if("object"!=typeof a)throw TypeError("RegExp exec method returned something other than an Object or null");return a}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},44847:(e,t,n)=>{"use strict";var r,i,a=n(5268),s=RegExp.prototype.exec,o=String.prototype.replace,u=s,l=(r=/a/,i=/b*/g,s.call(r,"a"),s.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),c=void 0!==/()??/.exec("")[1];(l||c)&&(u=function(e){var t,n,r,i,u=this;return c&&(n=new RegExp("^"+u.source+"$(?!\\s)",a.call(u))),l&&(t=u.lastIndex),r=s.call(u,e),l&&r&&(u.lastIndex=u.global?r.index+r[0].length:t),c&&r&&r.length>1&&o.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),e.exports=u},5268:(e,t,n)=>{"use strict";var r=n(4905);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},64475:e=>{e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},88506:(e,t,n)=>{var r=n(45001),i=n(50430);e.exports=function(e,t){try{i(r,e,t)}catch(n){r[e]=t}return t}},40606:(e,t,n)=>{var r=n(56462).f,i=n(51900),a=n(46802)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,a)&&r(e,a,{configurable:!0,value:t})}},61695:(e,t,n)=>{var r=n(6809),i=n(41050),a=r("keys");e.exports=function(e){return a[e]||(a[e]=i(e))}},19982:(e,t,n)=>{var r=n(45001),i=n(88506),a="__core-js_shared__",s=r[a]||i(a,{});e.exports=s},6809:(e,t,n)=>{var r=n(20013),i=n(19982);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.4.0",mode:r?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},31853:(e,t,n)=>{"use strict";var r=n(25061);e.exports=function(e,t){var n=[][e];return!n||!r((function(){n.call(null,t||function(){throw 1},1)}))}},50189:(e,t,n)=>{var r=n(90321),i=n(64475),a=function(e){return function(t,n){var a,s,o=String(i(t)),u=r(n),l=o.length;return u<0||u>=l?e?"":void 0:(a=o.charCodeAt(u))<55296||a>56319||u+1===l||(s=o.charCodeAt(u+1))<56320||s>57343?e?o.charAt(u):a:e?o.slice(u,u+2):s-56320+(a-55296<<10)+65536}};e.exports={codeAt:a(!1),charAt:a(!0)}},9522:(e,t,n)=>{var r=n(64475),i="["+n(49309)+"]",a=RegExp("^"+i+i+"*"),s=RegExp(i+i+"*$"),o=function(e){return function(t){var n=String(r(t));return 1&e&&(n=n.replace(a,"")),2&e&&(n=n.replace(s,"")),n}};e.exports={start:o(1),end:o(2),trim:o(3)}},6971:(e,t,n)=>{var r=n(90321),i=Math.max,a=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):a(n,t)}},40678:(e,t,n)=>{var r=n(62901),i=n(64475);e.exports=function(e){return r(i(e))}},90321:e=>{var t=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:t)(e)}},74479:(e,t,n)=>{var r=n(90321),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},87615:(e,t,n)=>{var r=n(64475);e.exports=function(e){return Object(r(e))}},76973:(e,t,n)=>{var r=n(62366);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},41050:e=>{var t=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++t+n).toString(36)}},84583:(e,t,n)=>{var r=n(3425);e.exports=r("navigator","userAgent")||""},24101:(e,t,n)=>{var r,i,a=n(45001),s=n(84583),o=a.process,u=o&&o.versions,l=u&&u.v8;l?i=(r=l.split("."))[0]+r[1]:s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(i=r[1]),e.exports=i&&+i},46802:(e,t,n)=>{var r=n(45001),i=n(6809),a=n(41050),s=n(99262),o=r.Symbol,u=i("wks");e.exports=function(e){return u[e]||(u[e]=s&&o[e]||(s?o:a)("Symbol."+e))}},49309:e=>{e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},15296:(e,t,n)=>{"use strict";var r=n(29638),i=n(72758).filter;r({target:"Array",proto:!0,forced:!n(95611)("filter")},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},94386:(e,t,n)=>{"use strict";var r=n(29638),i=n(16607);r({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},48868:(e,t,n)=>{"use strict";var r=n(40678),i=n(5822),a=n(80501),s=n(50684),o=n(30645),u="Array Iterator",l=s.set,c=s.getterFor(u);e.exports=o(Array,"Array",(function(e,t){l(this,{type:u,target:r(e),index:0,kind:t})}),(function(){var e=c(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),a.Arguments=a.Array,i("keys"),i("values"),i("entries")},82937:(e,t,n)=>{"use strict";var r=n(29638),i=n(62040).left;r({target:"Array",proto:!0,forced:n(31853)("reduce")},{reduce:function(e){return i(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},66403:(e,t,n)=>{var r=n(11502),i=n(56462).f,a=Function.prototype,s=a.toString,o=/^\s*function ([^ (]*)/,u="name";r&&!(u in a)&&i(a,u,{configurable:!0,get:function(){try{return s.call(this).match(o)[1]}catch(e){return""}}})},96609:(e,t,n)=>{var r=n(29638),i=n(71640);r({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},92274:(e,t,n)=>{var r=n(96313),i=n(45085),a=Object.prototype;i!==a.toString&&r(a,"toString",i,{unsafe:!0})},68268:(e,t,n)=>{var r=n(29638),i=n(7206);r({global:!0,forced:parseInt!=i},{parseInt:i})},42295:(e,t,n)=>{"use strict";var r=n(29638),i=n(44847);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},81874:(e,t,n)=>{"use strict";var r=n(50189).charAt,i=n(50684),a=n(30645),s="String Iterator",o=i.set,u=i.getterFor(s);a(String,"String",(function(e){o(this,{type:s,string:String(e),index:0})}),(function(){var e,t=u(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=r(n,i),t.index+=e.length,{value:e,done:!1})}))},52963:(e,t,n)=>{"use strict";var r=n(95453),i=n(4905),a=n(74479),s=n(64475),o=n(25528),u=n(41847);r("match",1,(function(e,t,n){return[function(t){var n=s(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var s=i(e),l=String(this);if(!s.global)return u(s,l);var c=s.unicode;s.lastIndex=0;for(var d,h=[],f=0;null!==(d=u(s,l));){var p=String(d[0]);h[f]=p,""===p&&(s.lastIndex=o(l,a(s.lastIndex),c)),f++}return 0===f?null:h}]}))},34994:(e,t,n)=>{"use strict";var r=n(95453),i=n(4905),a=n(87615),s=n(74479),o=n(90321),u=n(64475),l=n(25528),c=n(41847),d=Math.max,h=Math.min,f=Math.floor,p=/\$([$&'`]|\d\d?|<[^>]*>)/g,m=/\$([$&'`]|\d\d?)/g;r("replace",2,(function(e,t,n){return[function(n,r){var i=u(this),a=null==n?void 0:n[e];return void 0!==a?a.call(n,i,r):t.call(String(i),n,r)},function(e,a){var u=n(t,e,this,a);if(u.done)return u.value;var f=i(e),p=String(this),m="function"==typeof a;m||(a=String(a));var g=f.global;if(g){var v=f.unicode;f.lastIndex=0}for(var y=[];;){var _=c(f,p);if(null===_)break;if(y.push(_),!g)break;""===String(_[0])&&(f.lastIndex=l(p,s(f.lastIndex),v))}for(var b,T="",S=0,w=0;w<y.length;w++){_=y[w];for(var k=String(_[0]),E=d(h(o(_.index),p.length),0),C=[],x=1;x<_.length;x++)C.push(void 0===(b=_[x])?b:String(b));var I=_.groups;if(m){var A=[k].concat(C,E,p);void 0!==I&&A.push(I);var O=String(a.apply(void 0,A))}else O=r(k,p,E,C,I,a);E>=S&&(T+=p.slice(S,E)+O,S=E+k.length)}return T+p.slice(S)}];function r(e,n,r,i,s,o){var u=r+e.length,l=i.length,c=m;return void 0!==s&&(s=a(s),c=p),t.call(o,c,(function(t,a){var o;switch(a.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(u);case"<":o=s[a.slice(1,-1)];break;default:var c=+a;if(0===c)return t;if(c>l){var d=f(c/10);return 0===d?t:d<=l?void 0===i[d-1]?a.charAt(1):i[d-1]+a.charAt(1):t}o=i[c-1]}return void 0===o?"":o}))}}))},31341:(e,t,n)=>{"use strict";var r,i=n(45001),a=n(86846),s=n(81738),o=n(66606),u=n(53769),l=n(62366),c=n(50684).enforce,d=n(77650),h=!i.ActiveXObject&&"ActiveXObject"in i,f=Object.isExtensible,p=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},m=e.exports=o("WeakMap",p,u,!0,!0);if(d&&h){r=u.getConstructor(p,"WeakMap",!0),s.REQUIRED=!0;var g=m.prototype,v=g.delete,y=g.has,_=g.get,b=g.set;a(g,{delete:function(e){if(l(e)&&!f(e)){var t=c(this);return t.frozen||(t.frozen=new r),v.call(this,e)||t.frozen.delete(e)}return v.call(this,e)},has:function(e){if(l(e)&&!f(e)){var t=c(this);return t.frozen||(t.frozen=new r),y.call(this,e)||t.frozen.has(e)}return y.call(this,e)},get:function(e){if(l(e)&&!f(e)){var t=c(this);return t.frozen||(t.frozen=new r),y.call(this,e)?_.call(this,e):t.frozen.get(e)}return _.call(this,e)},set:function(e,t){if(l(e)&&!f(e)){var n=c(this);n.frozen||(n.frozen=new r),y.call(this,e)?b.call(this,e,t):n.frozen.set(e,t)}else b.call(this,e,t);return this}})}},98457:(e,t,n)=>{var r=n(45001),i=n(58514),a=n(16607),s=n(50430);for(var o in i){var u=r[o],l=u&&u.prototype;if(l&&l.forEach!==a)try{s(l,"forEach",a)}catch(e){l.forEach=a}}},54861:(e,t,n)=>{var r=n(45001),i=n(58514),a=n(48868),s=n(50430),o=n(46802),u=o("iterator"),l=o("toStringTag"),c=a.values;for(var d in i){var h=r[d],f=h&&h.prototype;if(f){if(f[u]!==c)try{s(f,u,c)}catch(e){f[u]=c}if(f[l]||s(f,l,d),i[d])for(var p in a)if(f[p]!==a[p])try{s(f,p,a[p])}catch(e){f[p]=a[p]}}}},3384:(e,t,n)=>{var r,i=void 0!==n.g?n.g:"undefined"!=typeof window?window:{},a=n(58421);"undefined"!=typeof document?r=document:(r=i["__GLOBAL_DOCUMENT_CACHE@4"])||(r=i["__GLOBAL_DOCUMENT_CACHE@4"]=a),e.exports=r},51562:(e,t,n)=>{var r;r="undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{},e.exports=r},63848:e=>{e.exports=function(e){if(!e)return!1;var n=t.call(e);return"[object Function]"===n||"function"==typeof e&&"[object RegExp]"!==n||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var t=Object.prototype.toString},19389:(e,t)=>{function n(e){if(e&&"object"==typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"==typeof e)return s[e];var n,a=String(e);return(n=r[a.toLowerCase()])?n:(n=i[a.toLowerCase()])||(1===a.length?a.charCodeAt(0):void 0)}n.isEventKey=function(e,t){if(e&&"object"==typeof e){var n=e.which||e.keyCode||e.charCode;if(null==n)return!1;if("string"==typeof t){var a;if(a=r[t.toLowerCase()])return a===n;if(a=i[t.toLowerCase()])return a===n}else if("number"==typeof t)return t===n;return!1}};var r=(t=e.exports=n).code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},i=t.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(a=97;a<123;a++)r[String.fromCharCode(a)]=a-32;for(var a=48;a<58;a++)r[a-48]=a;for(a=1;a<13;a++)r["f"+a]=a+111;for(a=0;a<10;a++)r["numpad "+a]=a+96;var s=t.names=t.title={};for(a in r)s[r[a]]=a;for(var o in i)r[o]=i[o]},40001:(e,t,n)=>{var r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,o=parseInt,u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l="object"==typeof self&&self&&self.Object===Object&&self,c=u||l||Function("return this")(),d=Object.prototype.toString,h=Math.max,f=Math.min,p=function(){return c.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=a.test(e);return n||s.test(e)?o(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,a,s,o,u,l=0,c=!1,d=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,a=i;return r=i=void 0,l=t,s=e.apply(a,n)}function _(e){var n=e-u;return void 0===u||n>=t||n<0||d&&e-l>=a}function b(){var e=p();if(_(e))return T(e);o=setTimeout(b,function(e){var n=t-(e-u);return d?f(n,a-(e-l)):n}(e))}function T(e){return o=void 0,v&&r?y(e):(r=i=void 0,s)}function S(){var e=p(),n=_(e);if(r=arguments,i=this,u=e,n){if(void 0===o)return function(e){return l=e,o=setTimeout(b,t),c?y(e):s}(u);if(d)return o=setTimeout(b,t),y(u)}return void 0===o&&(o=setTimeout(b,t)),s}return t=g(t)||0,m(n)&&(c=!!n.leading,a=(d="maxWait"in n)?h(g(n.maxWait)||0,t):a,v="trailing"in n?!!n.trailing:v),S.cancel=function(){void 0!==o&&clearTimeout(o),l=0,r=u=i=o=void 0},S.flush=function(){return void 0===o?s:T(p())},S}},98511:(e,t,n)=>{var r,i="__lodash_hash_undefined__",a="[object Function]",s="[object GeneratorFunction]",o=/^\[object .+?Constructor\]$/,u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,l="object"==typeof self&&self&&self.Object===Object&&self,c=u||l||Function("return this")(),d=Array.prototype,h=Function.prototype,f=Object.prototype,p=c["__core-js_shared__"],m=(r=/[^.]+$/.exec(p&&p.keys&&p.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",g=h.toString,v=f.hasOwnProperty,y=f.toString,_=RegExp("^"+g.call(v).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),b=d.splice,T=I(c,"Map"),S=I(Object,"create");function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function k(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function E(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function C(e,t){for(var n,r,i=e.length;i--;)if((n=e[i][0])===(r=t)||n!=n&&r!=r)return i;return-1}function x(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function I(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!O(e)||m&&m in e)return!1;var t=function(e){var t=O(e)?y.call(e):"";return t==a||t==s}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?_:o;return t.test(function(e){if(null!=e){try{return g.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(n)?n:void 0}function A(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var s=e.apply(this,r);return n.cache=a.set(i,s),s};return n.cache=new(A.Cache||E),n}function O(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}w.prototype.clear=function(){this.__data__=S?S(null):{}},w.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},w.prototype.get=function(e){var t=this.__data__;if(S){var n=t[e];return n===i?void 0:n}return v.call(t,e)?t[e]:void 0},w.prototype.has=function(e){var t=this.__data__;return S?void 0!==t[e]:v.call(t,e)},w.prototype.set=function(e,t){return this.__data__[e]=S&&void 0===t?i:t,this},k.prototype.clear=function(){this.__data__=[]},k.prototype.delete=function(e){var t=this.__data__,n=C(t,e);return!(n<0||(n==t.length-1?t.pop():b.call(t,n,1),0))},k.prototype.get=function(e){var t=this.__data__,n=C(t,e);return n<0?void 0:t[n][1]},k.prototype.has=function(e){return C(this.__data__,e)>-1},k.prototype.set=function(e,t){var n=this.__data__,r=C(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},E.prototype.clear=function(){this.__data__={hash:new w,map:new(T||k),string:new w}},E.prototype.delete=function(e){return x(this,e).delete(e)},E.prototype.get=function(e){return x(this,e).get(e)},E.prototype.has=function(e){return x(this,e).has(e)},E.prototype.set=function(e,t){return x(this,e).set(e,t),this},A.Cache=E,e.exports=A},50200:(e,t,n)=>{var r="Expected a function",i=NaN,a="[object Symbol]",s=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt,d="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,f=d||h||Function("return this")(),p=Object.prototype.toString,m=Math.max,g=Math.min,v=function(){return f.Date.now()};function y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function _(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&p.call(e)==a}(e))return i;if(y(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=y(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(s,"");var n=u.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):o.test(e)?i:+e}e.exports=function(e,t,n){var i=!0,a=!0;if("function"!=typeof e)throw new TypeError(r);return y(n)&&(i="leading"in n?!!n.leading:i,a="trailing"in n?!!n.trailing:a),function(e,t,n){var i,a,s,o,u,l,c=0,d=!1,h=!1,f=!0;if("function"!=typeof e)throw new TypeError(r);function p(t){var n=i,r=a;return i=a=void 0,c=t,o=e.apply(r,n)}function b(e){var n=e-l;return void 0===l||n>=t||n<0||h&&e-c>=s}function T(){var e=v();if(b(e))return S(e);u=setTimeout(T,function(e){var n=t-(e-l);return h?g(n,s-(e-c)):n}(e))}function S(e){return u=void 0,f&&i?p(e):(i=a=void 0,o)}function w(){var e=v(),n=b(e);if(i=arguments,a=this,l=e,n){if(void 0===u)return function(e){return c=e,u=setTimeout(T,t),d?p(e):o}(l);if(h)return u=setTimeout(T,t),p(l)}return void 0===u&&(u=setTimeout(T,t)),o}return t=_(t)||0,y(n)&&(d=!!n.leading,s=(h="maxWait"in n)?m(_(n.maxWait)||0,t):s,f="trailing"in n?!!n.trailing:f),w.cancel=function(){void 0!==u&&clearTimeout(u),c=0,i=l=a=u=void 0},w.flush=function(){return void 0===u?o:S(v())},w}(e,t,{leading:i,maxWait:t,trailing:a})}},57258:e=>{var t=Math.pow(2,32);e.exports=function(e){var n=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:n.getUint32(4),timescale:n.getUint32(8)},i=12;0===r.version?(r.earliestPresentationTime=n.getUint32(i),r.firstOffset=n.getUint32(i+4),i+=8):(r.earliestPresentationTime=n.getUint32(i)*t+n.getUint32(i+4),r.firstOffset=n.getUint32(i+8)*t+n.getUint32(i+12),i+=16),i+=2;var a=n.getUint16(i);for(i+=2;a>0;i+=12,a--)r.references.push({referenceType:(128&e[i])>>>7,referencedSize:2147483647&n.getUint32(i),subsegmentDuration:n.getUint32(i+4),startsWithSap:!!(128&e[i+8]),sapType:(112&e[i+8])>>>4,sapDeltaTime:268435455&n.getUint32(i+8)});return r}},28195:e=>{var t,n,r,i,a,s,o,u=9e4;t=function(e){return e*u},n=function(e,t){return e*t},r=function(e){return e/u},i=function(e,t){return e/t},a=function(e,n){return t(i(e,n))},s=function(e,t){return n(r(e),t)},o=function(e,t,n){return r(n?e:e-t)},e.exports={ONE_SECOND_IN_TS:u,secondsToVideoTs:t,secondsToAudioTs:n,videoTsToSeconds:r,audioTsToSeconds:i,audioTsToVideoTs:a,videoTsToAudioTs:s,metadataTsToSeconds:o}},28534:(e,t,n)=>{"use strict";var r=n(32735);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=!1;function s(e,t){return a&&(a=!1,"<"!==t[0]&&e.push("\x3c!-- --\x3e")),"\x3c!-- --\x3e"===t?a=!0:e.push(t)}var o=Object.prototype.hasOwnProperty,u=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,l={},c={};function d(e){return!!o.call(c,e)||!o.call(l,e)&&(u.test(e)?c[e]=!0:(l[e]=!0,!1))}function h(e,t,n,r,i,a,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=s}var f={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){f[e]=new h(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];f[t]=new h(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){f[e]=new h(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){f[e]=new h(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){f[e]=new h(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){f[e]=new h(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){f[e]=new h(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){f[e]=new h(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){f[e]=new h(e,5,!1,e.toLowerCase(),null,!1,!1)}));var p=/[\-:]([a-z])/g;function m(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(p,m);f[t]=new h(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(p,m);f[t]=new h(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(p,m);f[t]=new h(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){f[e]=new h(e,1,!1,e.toLowerCase(),null,!1,!1)})),f.xlinkHref=new h("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){f[e]=new h(e,1,!1,e.toLowerCase(),null,!0,!0)}));var g={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},v=["Webkit","ms","Moz","O"];Object.keys(g).forEach((function(e){v.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),g[t]=g[e]}))}));var y=/["'&<>]/;function _(e){if("boolean"==typeof e||"number"==typeof e)return""+e;e=""+e;var t=y.exec(e);if(t){var n,r="",i=0;for(n=t.index;n<e.length;n++){switch(e.charCodeAt(n)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}i!==n&&(r+=e.substring(i,n)),i=n+1,r+=t}e=i!==n?r+e.substring(i,n):r}return e}var b=/([A-Z])/g,T=/^ms-/,S=Array.isArray;function w(e,t){return{insertionMode:e,selectedValue:t}}function k(e,t){""!==t&&e.push(_(t),"\x3c!-- --\x3e")}var E=new Map;function C(e,t,n){if("object"!=typeof n)throw Error(i(62));for(var r in t=!0,n)if(o.call(n,r)){var a=n[r];if(null!=a&&"boolean"!=typeof a&&""!==a){if(0===r.indexOf("--")){var s=_(r);a=_((""+a).trim())}else{s=r;var u=E.get(s);void 0!==u||(u=_(s.replace(b,"-$1").toLowerCase().replace(T,"-ms-")),E.set(s,u)),s=u,a="number"==typeof a?0===a||o.call(g,r)?""+a:a+"px":_((""+a).trim())}t?(t=!1,e.push(' style="',s,":",a)):e.push(";",s,":",a)}}t||e.push('"')}function x(e,t,n,r){switch(n){case"style":return void C(e,t,r);case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])if(null!==(t=f.hasOwnProperty(n)?f[n]:null)){switch(typeof r){case"function":case"symbol":return;case"boolean":if(!t.acceptsBooleans)return}switch(n=t.attributeName,t.type){case 3:r&&e.push(" ",n,'=""');break;case 4:!0===r?e.push(" ",n,'=""'):!1!==r&&e.push(" ",n,'="',_(r),'"');break;case 5:isNaN(r)||e.push(" ",n,'="',_(r),'"');break;case 6:!isNaN(r)&&1<=r&&e.push(" ",n,'="',_(r),'"');break;default:t.sanitizeURL&&(r=""+r),e.push(" ",n,'="',_(r),'"')}}else if(d(n)){switch(typeof r){case"function":case"symbol":return;case"boolean":if("data-"!==(t=n.toLowerCase().slice(0,5))&&"aria-"!==t)return}e.push(" ",n,'="',_(r),'"')}}function I(e,t,n){if(null!=t){if(null!=n)throw Error(i(60));if("object"!=typeof t||!("__html"in t))throw Error(i(61));null!=(t=t.__html)&&e.push(""+t)}}function A(e,t,n,r){e.push(L(n));var i,a=n=null;for(i in t)if(o.call(t,i)){var s=t[i];if(null!=s)switch(i){case"children":n=s;break;case"dangerouslySetInnerHTML":a=s;break;default:x(e,r,i,s)}}return e.push(">"),I(e,a,n),"string"==typeof n?(e.push(_(n)),null):n}var O=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,P=new Map;function L(e){var t=P.get(e);if(void 0===t){if(!O.test(e))throw Error(i(65,e));t="<"+e,P.set(e,t)}return t}function D(e,t,n){if(s(e,'\x3c!--$?--\x3e<template id="'),null===n)throw Error(i(395));return s(e,n),s(e,'"></template>')}var R=Object.assign,M=Symbol.for("react.element"),N=Symbol.for("react.portal"),U=Symbol.for("react.fragment"),F=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),j=Symbol.for("react.provider"),H=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),X=Symbol.for("react.scope"),$=Symbol.for("react.debug_trace_mode"),K=Symbol.for("react.legacy_hidden"),Z=Symbol.for("react.default_value"),Y=Symbol.iterator;function Q(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case U:return"Fragment";case N:return"Portal";case B:return"Profiler";case F:return"StrictMode";case q:return"Suspense";case W:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case H:return(e.displayName||"Context")+".Consumer";case j:return(e._context.displayName||"Context")+".Provider";case V:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case z:return null!==(t=e.displayName||null)?t:Q(e.type)||"Memo";case G:t=e._payload,e=e._init;try{return Q(e(t))}catch(e){}}return null}var J={};function ee(e,t){if(!(e=e.contextTypes))return J;var n,r={};for(n in e)r[n]=t[n];return r}var te=null;function ne(e,t){if(e!==t){e.context._currentValue2=e.parentValue,e=e.parent;var n=t.parent;if(null===e){if(null!==n)throw Error(i(401))}else{if(null===n)throw Error(i(401));ne(e,n)}t.context._currentValue2=t.value}}function re(e){e.context._currentValue2=e.parentValue,null!==(e=e.parent)&&re(e)}function ie(e){var t=e.parent;null!==t&&ie(t),e.context._currentValue2=e.value}function ae(e,t){if(e.context._currentValue2=e.parentValue,null===(e=e.parent))throw Error(i(402));e.depth===t.depth?ne(e,t):ae(e,t)}function se(e,t){var n=t.parent;if(null===n)throw Error(i(402));e.depth===n.depth?ne(e,n):se(e,n),t.context._currentValue2=t.value}function oe(e){var t=te;t!==e&&(null===t?ie(e):null===e?re(t):t.depth===e.depth?ne(t,e):t.depth>e.depth?ae(t,e):se(t,e),te=e)}var ue={isMounted:function(){return!1},enqueueSetState:function(e,t){null!==(e=e._reactInternals).queue&&e.queue.push(t)},enqueueReplaceState:function(e,t){(e=e._reactInternals).replace=!0,e.queue=[t]},enqueueForceUpdate:function(){}};function le(e,t,n,r){var i=void 0!==e.state?e.state:null;e.updater=ue,e.props=n,e.state=i;var a={queue:[],replace:!1};e._reactInternals=a;var s=t.contextType;if(e.context="object"==typeof s&&null!==s?s._currentValue2:r,"function"==typeof(s=t.getDerivedStateFromProps)&&(i=null==(s=s(n,i))?i:R({},i,s),e.state=i),"function"!=typeof t.getDerivedStateFromProps&&"function"!=typeof e.getSnapshotBeforeUpdate&&("function"==typeof e.UNSAFE_componentWillMount||"function"==typeof e.componentWillMount))if(t=e.state,"function"==typeof e.componentWillMount&&e.componentWillMount(),"function"==typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),t!==e.state&&ue.enqueueReplaceState(e,e.state,null),null!==a.queue&&0<a.queue.length)if(t=a.queue,s=a.replace,a.queue=null,a.replace=!1,s&&1===t.length)e.state=t[0];else{for(a=s?t[0]:e.state,i=!0,s=s?1:0;s<t.length;s++){var o=t[s];null!=(o="function"==typeof o?o.call(e,a,n,r):o)&&(i?(i=!1,a=R({},a,o)):R(a,o))}e.state=a}else a.queue=null}var ce={id:1,overflow:""};function de(e,t,n){var r=e.id;e=e.overflow;var i=32-he(r)-1;r&=~(1<<i),n+=1;var a=32-he(t)+i;if(30<a){var s=i-i%5;return a=(r&(1<<s)-1).toString(32),r>>=s,i-=s,{id:1<<32-he(t)+i|n<<i|r,overflow:a+e}}return{id:1<<a|n<<i|r,overflow:e}}var he=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(fe(e)/pe|0)|0},fe=Math.log,pe=Math.LN2,me="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},ge=null,ve=null,ye=null,_e=null,be=!1,Te=!1,Se=0,we=null,ke=0;function Ee(){if(null===ge)throw Error(i(321));return ge}function Ce(){if(0<ke)throw Error(i(312));return{memoizedState:null,queue:null,next:null}}function xe(){return null===_e?null===ye?(be=!1,ye=_e=Ce()):(be=!0,_e=ye):null===_e.next?(be=!1,_e=_e.next=Ce()):(be=!0,_e=_e.next),_e}function Ie(){ve=ge=null,Te=!1,ye=null,ke=0,_e=we=null}function Ae(e,t){return"function"==typeof t?t(e):t}function Oe(e,t,n){if(ge=Ee(),_e=xe(),be){var r=_e.queue;if(t=r.dispatch,null!==we&&void 0!==(n=we.get(r))){we.delete(r),r=_e.memoizedState;do{r=e(r,n.action),n=n.next}while(null!==n);return _e.memoizedState=r,[r,t]}return[_e.memoizedState,t]}return e=e===Ae?"function"==typeof t?t():t:void 0!==n?n(t):t,_e.memoizedState=e,e=(e=_e.queue={last:null,dispatch:null}).dispatch=Le.bind(null,ge,e),[_e.memoizedState,e]}function Pe(e,t){if(ge=Ee(),t=void 0===t?null:t,null!==(_e=xe())){var n=_e.memoizedState;if(null!==n&&null!==t){var r=n[1];e:if(null===r)r=!1;else{for(var i=0;i<r.length&&i<t.length;i++)if(!me(t[i],r[i])){r=!1;break e}r=!0}if(r)return n[0]}}return e=e(),_e.memoizedState=[e,t],e}function Le(e,t,n){if(25<=ke)throw Error(i(301));if(e===ge)if(Te=!0,e={action:n,next:null},null===we&&(we=new Map),void 0===(n=we.get(t)))we.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}}function De(){throw Error(i(394))}function Re(){}var Me={readContext:function(e){return e._currentValue2},useContext:function(e){return Ee(),e._currentValue2},useMemo:Pe,useReducer:Oe,useRef:function(e){ge=Ee();var t=(_e=xe()).memoizedState;return null===t?(e={current:e},_e.memoizedState=e):t},useState:function(e){return Oe(Ae,e)},useInsertionEffect:Re,useLayoutEffect:function(){},useCallback:function(e,t){return Pe((function(){return e}),t)},useImperativeHandle:Re,useEffect:Re,useDebugValue:Re,useDeferredValue:function(e){return Ee(),e},useTransition:function(){return Ee(),[!1,De]},useId:function(){var e=ve.treeContext,t=e.overflow;e=((e=e.id)&~(1<<32-he(e)-1)).toString(32)+t;var n=Ne;if(null===n)throw Error(i(404));return t=Se++,e=":"+n.idPrefix+"R"+e,0<t&&(e+="H"+t.toString(32)),e+":"},useMutableSource:function(e,t){return Ee(),t(e._source)},useSyncExternalStore:function(e,t,n){if(void 0===n)throw Error(i(407));return n()}},Ne=null,Ue=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function Fe(e){console.error(e)}function Be(){}function je(e,t,n,r,i,a,s,o){e.allPendingTasks++,null===n?e.pendingRootTasks++:n.pendingTasks++;var u={node:t,ping:function(){var t=e.pingedTasks;t.push(u),1===t.length&&tt(e)},blockedBoundary:n,blockedSegment:r,abortSet:i,legacyContext:a,context:s,treeContext:o};return i.add(u),u}function He(e,t,n,r){return{status:0,id:-1,index:t,parentFlushed:!1,chunks:[],children:[],formatContext:r,boundary:n}}function Ve(e,t){(e=e.onError)(t)}function qe(e,t){var n=e.onShellError;n(t),(n=e.onFatalError)(t),null!==e.destination?(e.status=2,e.destination.destroy(t)):(e.status=1,e.fatalError=t)}function We(e,t,n,r,i){for(ge={},ve=t,Se=0,e=n(r,i);Te;)Te=!1,Se=0,ke+=1,_e=null,e=n(r,i);return Ie(),e}function ze(e,t,n,r){var a=n.render(),s=r.childContextTypes;if(null!=s){var o=t.legacyContext;if("function"!=typeof n.getChildContext)r=o;else{for(var u in n=n.getChildContext())if(!(u in s))throw Error(i(108,Q(r)||"Unknown",u));r=R({},o,n)}t.legacyContext=r,$e(e,t,a),t.legacyContext=o}else $e(e,t,a)}function Ge(e,t){if(e&&e.defaultProps){for(var n in t=R({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function Xe(e,t,n,a,s){if("function"==typeof n)if(n.prototype&&n.prototype.isReactComponent){s=ee(n,t.legacyContext);var u=n.contextType;le(u=new n(a,"object"==typeof u&&null!==u?u._currentValue2:s),n,a,s),ze(e,t,u,n)}else{s=We(e,t,n,a,u=ee(n,t.legacyContext));var l=0!==Se;if("object"==typeof s&&null!==s&&"function"==typeof s.render&&void 0===s.$$typeof)le(s,n,a,u),ze(e,t,s,n);else if(l){a=t.treeContext,t.treeContext=de(a,1,0);try{$e(e,t,s)}finally{t.treeContext=a}}else $e(e,t,s)}else{if("string"!=typeof n){switch(n){case K:case $:case F:case B:case U:case W:return void $e(e,t,a.children);case X:throw Error(i(343));case q:e:{n=t.blockedBoundary,s=t.blockedSegment,u=a.fallback,a=a.children;var c={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:l=new Set},h=He(0,s.chunks.length,c,s.formatContext);s.children.push(h);var f=He(0,0,null,s.formatContext);f.parentFlushed=!0,t.blockedBoundary=c,t.blockedSegment=f;try{if(Ze(e,t,a),f.status=1,Je(c,f),0===c.pendingTasks)break e}catch(t){f.status=4,Ve(e,t),c.forceClientRender=!0}finally{t.blockedBoundary=n,t.blockedSegment=s}t=je(e,u,n,h,l,t.legacyContext,t.context,t.treeContext),e.pingedTasks.push(t)}return}if("object"==typeof n&&null!==n)switch(n.$$typeof){case V:if(a=We(e,t,n.render,a,s),0!==Se){n=t.treeContext,t.treeContext=de(n,1,0);try{$e(e,t,a)}finally{t.treeContext=n}}else $e(e,t,a);return;case z:return void Xe(e,t,n=n.type,a=Ge(n,a),s);case j:if(s=a.children,n=n._context,a=a.value,u=n._currentValue2,n._currentValue2=a,te=a={parent:l=te,depth:null===l?0:l.depth+1,context:n,parentValue:u,value:a},t.context=a,$e(e,t,s),null===(e=te))throw Error(i(403));return a=e.parentValue,e.context._currentValue2=a===Z?e.context._defaultValue:a,e=te=e.parent,void(t.context=e);case H:return void $e(e,t,a=(a=a.children)(n._currentValue2));case G:return void Xe(e,t,n=(s=n._init)(n._payload),a=Ge(n,a),void 0)}throw Error(i(130,null==n?n:typeof n,""))}switch(u=function(e,t,n,a,s){switch(t){case"select":e.push(L("select"));var u=null,l=null;for(p in n)if(o.call(n,p)){var c=n[p];if(null!=c)switch(p){case"children":u=c;break;case"dangerouslySetInnerHTML":l=c;break;case"defaultValue":case"value":break;default:x(e,a,p,c)}}return e.push(">"),I(e,l,u),u;case"option":l=s.selectedValue,e.push(L("option"));var h=c=null,f=null,p=null;for(u in n)if(o.call(n,u)&&null!=(t=n[u]))switch(u){case"children":c=t;break;case"selected":f=t;break;case"dangerouslySetInnerHTML":p=t;break;case"value":h=t;default:x(e,a,u,t)}if(null!=l)if(n=null!==h?""+h:function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(c),S(l)){for(a=0;a<l.length;a++)if(""+l[a]===n){e.push(' selected=""');break}}else""+l===n&&e.push(' selected=""');else f&&e.push(' selected=""');return e.push(">"),I(e,p,c),c;case"textarea":for(c in e.push(L("textarea")),p=l=u=null,n)if(o.call(n,c)&&null!=(h=n[c]))switch(c){case"children":p=h;break;case"value":u=h;break;case"defaultValue":l=h;break;case"dangerouslySetInnerHTML":throw Error(i(91));default:x(e,a,c,h)}if(null===u&&null!==l&&(u=l),e.push(">"),null!=p){if(null!=u)throw Error(i(92));if(S(p)&&1<p.length)throw Error(i(93));u=""+p}return"string"==typeof u&&"\n"===u[0]&&e.push("\n"),null!==u&&e.push(_(""+u)),null;case"input":for(l in e.push(L("input")),h=p=c=u=null,n)if(o.call(n,l)&&null!=(f=n[l]))switch(l){case"children":case"dangerouslySetInnerHTML":throw Error(i(399,"input"));case"defaultChecked":h=f;break;case"defaultValue":c=f;break;case"checked":p=f;break;case"value":u=f;break;default:x(e,a,l,f)}return null!==p?x(e,a,"checked",p):null!==h&&x(e,a,"checked",h),null!==u?x(e,a,"value",u):null!==c&&x(e,a,"value",c),e.push("/>"),null;case"menuitem":for(var m in e.push(L("menuitem")),n)if(o.call(n,m)&&null!=(u=n[m]))switch(m){case"children":case"dangerouslySetInnerHTML":throw Error(i(400));default:x(e,a,m,u)}return e.push(">"),null;case"listing":case"pre":for(h in e.push(L(t)),l=u=null,n)if(o.call(n,h)&&null!=(c=n[h]))switch(h){case"children":u=c;break;case"dangerouslySetInnerHTML":l=c;break;default:x(e,a,h,c)}if(e.push(">"),null!=l){if(null!=u)throw Error(i(60));if("object"!=typeof l||!("__html"in l))throw Error(i(61));null!=(n=l.__html)&&("string"==typeof n&&0<n.length&&"\n"===n[0]?e.push("\n",n):e.push(""+n))}return"string"==typeof u&&"\n"===u[0]&&e.push("\n"),u;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":for(var g in e.push(L(t)),n)if(o.call(n,g)&&null!=(u=n[g]))switch(g){case"children":case"dangerouslySetInnerHTML":throw Error(i(399,t));default:x(e,a,g,u)}return e.push("/>"),null;case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return A(e,n,t,a);case"html":return 0===s.insertionMode&&e.push("<!DOCTYPE html>"),A(e,n,t,a);default:if(-1===t.indexOf("-")&&"string"!=typeof n.is)return A(e,n,t,a);for(f in e.push(L(t)),l=u=null,n)if(o.call(n,f)&&null!=(c=n[f]))switch(f){case"children":u=c;break;case"dangerouslySetInnerHTML":l=c;break;case"style":C(e,a,c);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:d(f)&&"function"!=typeof c&&"symbol"!=typeof c&&e.push(" ",f,'="',_(c),'"')}return e.push(">"),I(e,l,u),u}}((s=t.blockedSegment).chunks,n,a,e.responseState,s.formatContext),l=s.formatContext,s.formatContext=function(e,t,n){switch(t){case"select":return w(1,null!=n.value?n.value:n.defaultValue);case"svg":return w(2,null);case"math":return w(3,null);case"foreignObject":return w(1,null);case"table":return w(4,null);case"thead":case"tbody":case"tfoot":return w(5,null);case"colgroup":return w(7,null);case"tr":return w(6,null)}return 4<=e.insertionMode||0===e.insertionMode?w(1,null):e}(l,n,a),Ze(e,t,u),s.formatContext=l,n){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:s.chunks.push("</",n,">")}}}function $e(e,t,n){if(t.node=n,"object"==typeof n&&null!==n){switch(n.$$typeof){case M:return void Xe(e,t,n.type,n.props,n.ref);case N:throw Error(i(257));case G:var r=n._init;return void $e(e,t,n=r(n._payload))}if(S(n))return void Ke(e,t,n);if((r=null===n||"object"!=typeof n?null:"function"==typeof(r=Y&&n[Y]||n["@@iterator"])?r:null)&&(r=r.call(n))){if(!(n=r.next()).done){var a=[];do{a.push(n.value),n=r.next()}while(!n.done);Ke(e,t,a)}return}throw e=Object.prototype.toString.call(n),Error(i(31,"[object Object]"===e?"object with keys {"+Object.keys(n).join(", ")+"}":e))}"string"==typeof n?(t=t.blockedSegment.chunks,e.responseState.generateStaticMarkup?t.push(_(n)):k(t,n)):"number"==typeof n&&(t=t.blockedSegment.chunks,n=""+n,e.responseState.generateStaticMarkup?t.push(_(n)):k(t,n))}function Ke(e,t,n){for(var r=n.length,i=0;i<r;i++){var a=t.treeContext;t.treeContext=de(a,r,i);try{Ze(e,t,n[i])}finally{t.treeContext=a}}}function Ze(e,t,n){var r=t.blockedSegment.formatContext,i=t.legacyContext,a=t.context;try{return $e(e,t,n)}catch(u){if(Ie(),"object"!=typeof u||null===u||"function"!=typeof u.then)throw t.blockedSegment.formatContext=r,t.legacyContext=i,t.context=a,oe(a),u;n=u;var s=t.blockedSegment,o=He(0,s.chunks.length,null,s.formatContext);s.children.push(o),e=je(e,t.node,t.blockedBoundary,o,t.abortSet,t.legacyContext,t.context,t.treeContext).ping,n.then(e,e),t.blockedSegment.formatContext=r,t.legacyContext=i,t.context=a,oe(a)}}function Ye(e){var t=e.blockedBoundary;(e=e.blockedSegment).status=3,et(this,t,e)}function Qe(e){var t=e.blockedBoundary;e.blockedSegment.status=3,null===t?(this.allPendingTasks--,2!==this.status&&(this.status=2,null!==this.destination&&this.destination.push(null))):(t.pendingTasks--,t.forceClientRender||(t.forceClientRender=!0,t.parentFlushed&&this.clientRenderedBoundaries.push(t)),t.fallbackAbortableTasks.forEach(Qe,this),t.fallbackAbortableTasks.clear(),this.allPendingTasks--,0===this.allPendingTasks&&(e=this.onAllReady)())}function Je(e,t){if(0===t.chunks.length&&1===t.children.length&&null===t.children[0].boundary){var n=t.children[0];n.id=t.id,n.parentFlushed=!0,1===n.status&&Je(e,n)}else e.completedSegments.push(t)}function et(e,t,n){if(null===t){if(n.parentFlushed){if(null!==e.completedRootSegment)throw Error(i(389));e.completedRootSegment=n}e.pendingRootTasks--,0===e.pendingRootTasks&&(e.onShellError=Be,(t=e.onShellReady)())}else t.pendingTasks--,t.forceClientRender||(0===t.pendingTasks?(n.parentFlushed&&1===n.status&&Je(t,n),t.parentFlushed&&e.completedBoundaries.push(t),t.fallbackAbortableTasks.forEach(Ye,e),t.fallbackAbortableTasks.clear()):n.parentFlushed&&1===n.status&&(Je(t,n),1===t.completedSegments.length&&t.parentFlushed&&e.partialBoundaries.push(t)));e.allPendingTasks--,0===e.allPendingTasks&&(e=e.onAllReady)()}function tt(e){if(2!==e.status){var t=te,n=Ue.current;Ue.current=Me;var r=Ne;Ne=e.responseState;try{var i,a=e.pingedTasks;for(i=0;i<a.length;i++){var s=a[i],o=e,u=s.blockedSegment;if(0===u.status){oe(s.context);try{$e(o,s,s.node),s.abortSet.delete(s),u.status=1,et(o,s.blockedBoundary,u)}catch(e){if(Ie(),"object"==typeof e&&null!==e&&"function"==typeof e.then){var l=s.ping;e.then(l,l)}else{s.abortSet.delete(s),u.status=4;var c=s.blockedBoundary,d=e;Ve(o,d),null===c?qe(o,d):(c.pendingTasks--,c.forceClientRender||(c.forceClientRender=!0,c.parentFlushed&&o.clientRenderedBoundaries.push(c))),o.allPendingTasks--,0===o.allPendingTasks&&(0,o.onAllReady)()}}}}a.splice(0,i),null!==e.destination&&ot(e,e.destination)}catch(t){Ve(e,t),qe(e,t)}finally{Ne=r,Ue.current=n,n===Me&&oe(t)}}}function nt(e,t,n){switch(n.parentFlushed=!0,n.status){case 0:var r=n.id=e.nextSegmentId++;return e=e.responseState,s(t,'<template id="'),s(t,e.placeholderPrefix),s(t,e=r.toString(16)),s(t,'"></template>');case 1:n.status=2;var a=!0;r=n.chunks;var o=0;n=n.children;for(var u=0;u<n.length;u++){for(a=n[u];o<a.index;o++)s(t,r[o]);a=rt(e,t,a)}for(;o<r.length-1;o++)s(t,r[o]);return o<r.length&&(a=s(t,r[o])),a;default:throw Error(i(390))}}function rt(e,t,n){var r=n.boundary;if(null===r)return nt(e,t,n);if(r.parentFlushed=!0,r.forceClientRender)return e.responseState.generateStaticMarkup||s(t,"\x3c!--$!--\x3e"),nt(e,t,n),!!e.responseState.generateStaticMarkup||s(t,"\x3c!--/$--\x3e");if(0<r.pendingTasks){r.rootSegmentID=e.nextSegmentId++,0<r.completedSegments.length&&e.partialBoundaries.push(r);var a=e.responseState,o=a.nextSuspenseID++;return a=a.boundaryPrefix+o.toString(16),r=r.id=a,D(t,e.responseState,r),nt(e,t,n),s(t,"\x3c!--/$--\x3e")}if(r.byteSize>e.progressiveChunkSize)return r.rootSegmentID=e.nextSegmentId++,e.completedBoundaries.push(r),D(t,e.responseState,r.id),nt(e,t,n),s(t,"\x3c!--/$--\x3e");if(e.responseState.generateStaticMarkup||s(t,"\x3c!--$--\x3e"),1!==(n=r.completedSegments).length)throw Error(i(391));return rt(e,t,n[0]),!!e.responseState.generateStaticMarkup||s(t,"\x3c!--/$--\x3e")}function it(e,t,n){return function(e,t,n,r){switch(n.insertionMode){case 0:case 1:return s(e,'<div hidden id="'),s(e,t.segmentPrefix),s(e,t=r.toString(16)),s(e,'">');case 2:return s(e,'<svg aria-hidden="true" style="display:none" id="'),s(e,t.segmentPrefix),s(e,t=r.toString(16)),s(e,'">');case 3:return s(e,'<math aria-hidden="true" style="display:none" id="'),s(e,t.segmentPrefix),s(e,t=r.toString(16)),s(e,'">');case 4:return s(e,'<table hidden id="'),s(e,t.segmentPrefix),s(e,t=r.toString(16)),s(e,'">');case 5:return s(e,'<table hidden><tbody id="'),s(e,t.segmentPrefix),s(e,t=r.toString(16)),s(e,'">');case 6:return s(e,'<table hidden><tr id="'),s(e,t.segmentPrefix),s(e,t=r.toString(16)),s(e,'">');case 7:return s(e,'<table hidden><colgroup id="'),s(e,t.segmentPrefix),s(e,t=r.toString(16)),s(e,'">');default:throw Error(i(397))}}(t,e.responseState,n.formatContext,n.id),rt(e,t,n),function(e,t){switch(t.insertionMode){case 0:case 1:return s(e,"</div>");case 2:return s(e,"</svg>");case 3:return s(e,"</math>");case 4:return s(e,"</table>");case 5:return s(e,"</tbody></table>");case 6:return s(e,"</tr></table>");case 7:return s(e,"</colgroup></table>");default:throw Error(i(397))}}(t,n.formatContext)}function at(e,t,n){for(var r=n.completedSegments,a=0;a<r.length;a++)st(e,t,n,r[a]);if(r.length=0,e=e.responseState,r=n.id,n=n.rootSegmentID,s(t,e.startInlineScript),e.sentCompleteBoundaryFunction?s(t,'$RC("'):(e.sentCompleteBoundaryFunction=!0,s(t,'function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("')),null===r)throw Error(i(395));return n=n.toString(16),s(t,r),s(t,'","'),s(t,e.segmentPrefix),s(t,n),s(t,'")<\/script>')}function st(e,t,n,r){if(2===r.status)return!0;var a=r.id;if(-1===a){if(-1===(r.id=n.rootSegmentID))throw Error(i(392));return it(e,t,r)}return it(e,t,r),s(t,(e=e.responseState).startInlineScript),e.sentCompleteSegmentFunction?s(t,'$RS("'):(e.sentCompleteSegmentFunction=!0,s(t,'function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("')),s(t,e.segmentPrefix),s(t,a=a.toString(16)),s(t,'","'),s(t,e.placeholderPrefix),s(t,a),s(t,'")<\/script>')}function ot(e,t){try{var n=e.completedRootSegment;if(null!==n&&0===e.pendingRootTasks){rt(e,t,n),e.completedRootSegment=null;var r=e.responseState.bootstrapChunks;for(n=0;n<r.length-1;n++)s(t,r[n]);n<r.length&&s(t,r[n])}var a,o=e.clientRenderedBoundaries;for(a=0;a<o.length;a++){r=t;var u=e.responseState,l=o[a].id;if(s(r,u.startInlineScript),u.sentClientRenderFunction?s(r,'$RX("'):(u.sentClientRenderFunction=!0,s(r,'function $RX(a){if(a=document.getElementById(a))a=a.previousSibling,a.data="$!",a._reactRetry&&a._reactRetry()};$RX("')),null===l)throw Error(i(395));if(s(r,l),!s(r,'")<\/script>'))return e.destination=null,a++,void o.splice(0,a)}o.splice(0,a);var c=e.completedBoundaries;for(a=0;a<c.length;a++)if(!at(e,t,c[a]))return e.destination=null,a++,void c.splice(0,a);c.splice(0,a);var d=e.partialBoundaries;for(a=0;a<d.length;a++){var h=d[a];e:{o=e,u=t;var f=h.completedSegments;for(l=0;l<f.length;l++)if(!st(o,u,h,f[l])){l++,f.splice(0,l);var p=!1;break e}f.splice(0,l),p=!0}if(!p)return e.destination=null,a++,void d.splice(0,a)}d.splice(0,a);var m=e.completedBoundaries;for(a=0;a<m.length;a++)if(!at(e,t,m[a]))return e.destination=null,a++,void m.splice(0,a);m.splice(0,a)}finally{0===e.allPendingTasks&&0===e.pingedTasks.length&&0===e.clientRenderedBoundaries.length&&0===e.completedBoundaries.length&&t.push(null)}}function ut(){}function lt(e,t,n){var r=!1,a=null,s="",o={push:function(e){return null!==e&&(s+=e),!0},destroy:function(e){r=!0,a=e}},u=!1;if(e=function(e,t,n,r,i,a,s,o,u){var l=[],c=new Set;return(n=He(t={destination:null,responseState:t,progressiveChunkSize:r,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:c,pingedTasks:l,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:void 0===i?Fe:i,onAllReady:Be,onShellReady:void 0===s?Be:s,onShellError:Be,onFatalError:Be},0,null,n)).parentFlushed=!0,e=je(t,e,null,n,c,J,null,ce),l.push(e),t}(e,function(e,t){return{bootstrapChunks:[],startInlineScript:"<script>",placeholderPrefix:(t=void 0===t?"":t)+"P:",segmentPrefix:t+"S:",boundaryPrefix:t+"B:",idPrefix:t,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1,generateStaticMarkup:e}}(n,t?t.identifierPrefix:void 0),{insertionMode:1,selectedValue:null},1/0,ut,0,(function(){u=!0})),tt(e),function(e){try{var t=e.abortableTasks;t.forEach(Qe,e),t.clear(),null!==e.destination&&ot(e,e.destination)}catch(t){Ve(e,t),qe(e,t)}}(e),1===e.status)e.status=2,o.destroy(e.fatalError);else if(2!==e.status&&null===e.destination){e.destination=o;try{ot(e,o)}catch(t){Ve(e,t),qe(e,t)}}if(r)throw a;if(!u)throw Error(i(426));return s}t.renderToNodeStream=function(){throw Error(i(207))},t.renderToStaticMarkup=function(e,t){return lt(e,t,!0)},t.renderToStaticNodeStream=function(){throw Error(i(208))},t.renderToString=function(e,t){return lt(e,t,!1)},t.version="18.1.0"},67392:(e,t,n)=>{"use strict";var r=n(32735);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=null,s=0;function o(e,t){if(0!==t.length)if(512<t.length)0<s&&(e.enqueue(new Uint8Array(a.buffer,0,s)),a=new Uint8Array(512),s=0),e.enqueue(t);else{var n=a.length-s;n<t.length&&(0===n?e.enqueue(a):(a.set(t.subarray(0,n),s),e.enqueue(a),t=t.subarray(n)),a=new Uint8Array(512),s=0),a.set(t,s),s+=t.length}}function u(e,t){return o(e,t),!0}function l(e){a&&0<s&&(e.enqueue(new Uint8Array(a.buffer,0,s)),a=null,s=0)}var c=new TextEncoder;function d(e){return c.encode(e)}function h(e){return c.encode(e)}function f(e,t){"function"==typeof e.error?e.error(t):e.close()}var p=Object.prototype.hasOwnProperty,m=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,g={},v={};function y(e){return!!p.call(v,e)||!p.call(g,e)&&(m.test(e)?v[e]=!0:(g[e]=!0,!1))}function _(e,t,n,r,i,a,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=s}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){b[e]=new _(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];b[t]=new _(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){b[e]=new _(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){b[e]=new _(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){b[e]=new _(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){b[e]=new _(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){b[e]=new _(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){b[e]=new _(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){b[e]=new _(e,5,!1,e.toLowerCase(),null,!1,!1)}));var T=/[\-:]([a-z])/g;function S(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(T,S);b[t]=new _(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(T,S);b[t]=new _(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(T,S);b[t]=new _(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){b[e]=new _(e,1,!1,e.toLowerCase(),null,!1,!1)})),b.xlinkHref=new _("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){b[e]=new _(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},k=["Webkit","ms","Moz","O"];Object.keys(w).forEach((function(e){k.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),w[t]=w[e]}))}));var E=/["'&<>]/;function C(e){if("boolean"==typeof e||"number"==typeof e)return""+e;e=""+e;var t=E.exec(e);if(t){var n,r="",i=0;for(n=t.index;n<e.length;n++){switch(e.charCodeAt(n)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}i!==n&&(r+=e.substring(i,n)),i=n+1,r+=t}e=i!==n?r+e.substring(i,n):r}return e}var x=/([A-Z])/g,I=/^ms-/,A=Array.isArray,O=h("<script>"),P=h("<\/script>"),L=h('<script src="'),D=h('<script type="module" src="'),R=h('" async=""><\/script>'),M=/(<\/|<)(s)(cript)/gi;function N(e,t,n,r){return t+("s"===n?"\\u0073":"\\u0053")+r}function U(e,t){return{insertionMode:e,selectedValue:t}}var F=h("\x3c!-- --\x3e"),B=new Map,j=h(' style="'),H=h(":"),V=h(";");function q(e,t,n){if("object"!=typeof n)throw Error(i(62));for(var r in t=!0,n)if(p.call(n,r)){var a=n[r];if(null!=a&&"boolean"!=typeof a&&""!==a){if(0===r.indexOf("--")){var s=d(C(r));a=d(C((""+a).trim()))}else{s=r;var o=B.get(s);void 0!==o||(o=h(C(s.replace(x,"-$1").toLowerCase().replace(I,"-ms-"))),B.set(s,o)),s=o,a="number"==typeof a?0===a||p.call(w,r)?d(""+a):d(a+"px"):d(C((""+a).trim()))}t?(t=!1,e.push(j,s,H,a)):e.push(V,s,H,a)}}t||e.push(G)}var W=h(" "),z=h('="'),G=h('"'),X=h('=""');function $(e,t,n,r){switch(n){case"style":return void q(e,t,r);case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])if(null!==(t=b.hasOwnProperty(n)?b[n]:null)){switch(typeof r){case"function":case"symbol":return;case"boolean":if(!t.acceptsBooleans)return}switch(n=d(t.attributeName),t.type){case 3:r&&e.push(W,n,X);break;case 4:!0===r?e.push(W,n,X):!1!==r&&e.push(W,n,z,d(C(r)),G);break;case 5:isNaN(r)||e.push(W,n,z,d(C(r)),G);break;case 6:!isNaN(r)&&1<=r&&e.push(W,n,z,d(C(r)),G);break;default:t.sanitizeURL&&(r=""+r),e.push(W,n,z,d(C(r)),G)}}else if(y(n)){switch(typeof r){case"function":case"symbol":return;case"boolean":if("data-"!==(t=n.toLowerCase().slice(0,5))&&"aria-"!==t)return}e.push(W,d(n),z,d(C(r)),G)}}var K=h(">"),Z=h("/>");function Y(e,t,n){if(null!=t){if(null!=n)throw Error(i(60));if("object"!=typeof t||!("__html"in t))throw Error(i(61));null!=(t=t.__html)&&e.push(d(""+t))}}var Q=h(' selected=""');function J(e,t,n,r){e.push(re(n));var i,a=n=null;for(i in t)if(p.call(t,i)){var s=t[i];if(null!=s)switch(i){case"children":n=s;break;case"dangerouslySetInnerHTML":a=s;break;default:$(e,r,i,s)}}return e.push(K),Y(e,a,n),"string"==typeof n?(e.push(d(C(n))),null):n}var ee=h("\n"),te=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,ne=new Map;function re(e){var t=ne.get(e);if(void 0===t){if(!te.test(e))throw Error(i(65,e));t=h("<"+e),ne.set(e,t)}return t}var ie=h("<!DOCTYPE html>");var ae=h("</"),se=h(">"),oe=h('<template id="'),ue=h('"></template>'),le=h("\x3c!--$--\x3e"),ce=h('\x3c!--$?--\x3e<template id="'),de=h('"></template>'),he=h("\x3c!--$!--\x3e"),fe=h("\x3c!--/$--\x3e");function pe(e,t,n){if(o(e,ce),null===n)throw Error(i(395));return o(e,n),u(e,de)}var me=h('<div hidden id="'),ge=h('">'),ve=h("</div>"),ye=h('<svg aria-hidden="true" style="display:none" id="'),_e=h('">'),be=h("</svg>"),Te=h('<math aria-hidden="true" style="display:none" id="'),Se=h('">'),we=h("</math>"),ke=h('<table hidden id="'),Ee=h('">'),Ce=h("</table>"),xe=h('<table hidden><tbody id="'),Ie=h('">'),Ae=h("</tbody></table>"),Oe=h('<table hidden><tr id="'),Pe=h('">'),Le=h("</tr></table>"),De=h('<table hidden><colgroup id="'),Re=h('">'),Me=h("</colgroup></table>"),Ne=h('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'),Ue=h('$RS("'),Fe=h('","'),Be=h('")<\/script>'),je=h('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("'),He=h('$RC("'),Ve=h('","'),qe=h('")<\/script>'),We=h('function $RX(a){if(a=document.getElementById(a))a=a.previousSibling,a.data="$!",a._reactRetry&&a._reactRetry()};$RX("'),ze=h('$RX("'),Ge=h('")<\/script>'),Xe=Object.assign,$e=Symbol.for("react.element"),Ke=Symbol.for("react.portal"),Ze=Symbol.for("react.fragment"),Ye=Symbol.for("react.strict_mode"),Qe=Symbol.for("react.profiler"),Je=Symbol.for("react.provider"),et=Symbol.for("react.context"),tt=Symbol.for("react.forward_ref"),nt=Symbol.for("react.suspense"),rt=Symbol.for("react.suspense_list"),it=Symbol.for("react.memo"),at=Symbol.for("react.lazy"),st=Symbol.for("react.scope"),ot=Symbol.for("react.debug_trace_mode"),ut=Symbol.for("react.legacy_hidden"),lt=Symbol.for("react.default_value"),ct=Symbol.iterator;function dt(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case Ze:return"Fragment";case Ke:return"Portal";case Qe:return"Profiler";case Ye:return"StrictMode";case nt:return"Suspense";case rt:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case et:return(e.displayName||"Context")+".Consumer";case Je:return(e._context.displayName||"Context")+".Provider";case tt:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case it:return null!==(t=e.displayName||null)?t:dt(e.type)||"Memo";case at:t=e._payload,e=e._init;try{return dt(e(t))}catch(e){}}return null}var ht={};function ft(e,t){if(!(e=e.contextTypes))return ht;var n,r={};for(n in e)r[n]=t[n];return r}var pt=null;function mt(e,t){if(e!==t){e.context._currentValue=e.parentValue,e=e.parent;var n=t.parent;if(null===e){if(null!==n)throw Error(i(401))}else{if(null===n)throw Error(i(401));mt(e,n)}t.context._currentValue=t.value}}function gt(e){e.context._currentValue=e.parentValue,null!==(e=e.parent)&>(e)}function vt(e){var t=e.parent;null!==t&&vt(t),e.context._currentValue=e.value}function yt(e,t){if(e.context._currentValue=e.parentValue,null===(e=e.parent))throw Error(i(402));e.depth===t.depth?mt(e,t):yt(e,t)}function _t(e,t){var n=t.parent;if(null===n)throw Error(i(402));e.depth===n.depth?mt(e,n):_t(e,n),t.context._currentValue=t.value}function bt(e){var t=pt;t!==e&&(null===t?vt(e):null===e?gt(t):t.depth===e.depth?mt(t,e):t.depth>e.depth?yt(t,e):_t(t,e),pt=e)}var Tt={isMounted:function(){return!1},enqueueSetState:function(e,t){null!==(e=e._reactInternals).queue&&e.queue.push(t)},enqueueReplaceState:function(e,t){(e=e._reactInternals).replace=!0,e.queue=[t]},enqueueForceUpdate:function(){}};function St(e,t,n,r){var i=void 0!==e.state?e.state:null;e.updater=Tt,e.props=n,e.state=i;var a={queue:[],replace:!1};e._reactInternals=a;var s=t.contextType;if(e.context="object"==typeof s&&null!==s?s._currentValue:r,"function"==typeof(s=t.getDerivedStateFromProps)&&(i=null==(s=s(n,i))?i:Xe({},i,s),e.state=i),"function"!=typeof t.getDerivedStateFromProps&&"function"!=typeof e.getSnapshotBeforeUpdate&&("function"==typeof e.UNSAFE_componentWillMount||"function"==typeof e.componentWillMount))if(t=e.state,"function"==typeof e.componentWillMount&&e.componentWillMount(),"function"==typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),t!==e.state&&Tt.enqueueReplaceState(e,e.state,null),null!==a.queue&&0<a.queue.length)if(t=a.queue,s=a.replace,a.queue=null,a.replace=!1,s&&1===t.length)e.state=t[0];else{for(a=s?t[0]:e.state,i=!0,s=s?1:0;s<t.length;s++){var o=t[s];null!=(o="function"==typeof o?o.call(e,a,n,r):o)&&(i?(i=!1,a=Xe({},a,o)):Xe(a,o))}e.state=a}else a.queue=null}var wt={id:1,overflow:""};function kt(e,t,n){var r=e.id;e=e.overflow;var i=32-Et(r)-1;r&=~(1<<i),n+=1;var a=32-Et(t)+i;if(30<a){var s=i-i%5;return a=(r&(1<<s)-1).toString(32),r>>=s,i-=s,{id:1<<32-Et(t)+i|n<<i|r,overflow:a+e}}return{id:1<<a|n<<i|r,overflow:e}}var Et=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(Ct(e)/xt|0)|0},Ct=Math.log,xt=Math.LN2,It="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},At=null,Ot=null,Pt=null,Lt=null,Dt=!1,Rt=!1,Mt=0,Nt=null,Ut=0;function Ft(){if(null===At)throw Error(i(321));return At}function Bt(){if(0<Ut)throw Error(i(312));return{memoizedState:null,queue:null,next:null}}function jt(){return null===Lt?null===Pt?(Dt=!1,Pt=Lt=Bt()):(Dt=!0,Lt=Pt):null===Lt.next?(Dt=!1,Lt=Lt.next=Bt()):(Dt=!0,Lt=Lt.next),Lt}function Ht(){Ot=At=null,Rt=!1,Pt=null,Ut=0,Lt=Nt=null}function Vt(e,t){return"function"==typeof t?t(e):t}function qt(e,t,n){if(At=Ft(),Lt=jt(),Dt){var r=Lt.queue;if(t=r.dispatch,null!==Nt&&void 0!==(n=Nt.get(r))){Nt.delete(r),r=Lt.memoizedState;do{r=e(r,n.action),n=n.next}while(null!==n);return Lt.memoizedState=r,[r,t]}return[Lt.memoizedState,t]}return e=e===Vt?"function"==typeof t?t():t:void 0!==n?n(t):t,Lt.memoizedState=e,e=(e=Lt.queue={last:null,dispatch:null}).dispatch=zt.bind(null,At,e),[Lt.memoizedState,e]}function Wt(e,t){if(At=Ft(),t=void 0===t?null:t,null!==(Lt=jt())){var n=Lt.memoizedState;if(null!==n&&null!==t){var r=n[1];e:if(null===r)r=!1;else{for(var i=0;i<r.length&&i<t.length;i++)if(!It(t[i],r[i])){r=!1;break e}r=!0}if(r)return n[0]}}return e=e(),Lt.memoizedState=[e,t],e}function zt(e,t,n){if(25<=Ut)throw Error(i(301));if(e===At)if(Rt=!0,e={action:n,next:null},null===Nt&&(Nt=new Map),void 0===(n=Nt.get(t)))Nt.set(t,e);else{for(t=n;null!==t.next;)t=t.next;t.next=e}}function Gt(){throw Error(i(394))}function Xt(){}var $t={readContext:function(e){return e._currentValue},useContext:function(e){return Ft(),e._currentValue},useMemo:Wt,useReducer:qt,useRef:function(e){At=Ft();var t=(Lt=jt()).memoizedState;return null===t?(e={current:e},Lt.memoizedState=e):t},useState:function(e){return qt(Vt,e)},useInsertionEffect:Xt,useLayoutEffect:function(){},useCallback:function(e,t){return Wt((function(){return e}),t)},useImperativeHandle:Xt,useEffect:Xt,useDebugValue:Xt,useDeferredValue:function(e){return Ft(),e},useTransition:function(){return Ft(),[!1,Gt]},useId:function(){var e=Ot.treeContext,t=e.overflow;e=((e=e.id)&~(1<<32-Et(e)-1)).toString(32)+t;var n=Kt;if(null===n)throw Error(i(404));return t=Mt++,e=":"+n.idPrefix+"R"+e,0<t&&(e+="H"+t.toString(32)),e+":"},useMutableSource:function(e,t){return Ft(),t(e._source)},useSyncExternalStore:function(e,t,n){if(void 0===n)throw Error(i(407));return n()}},Kt=null,Zt=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function Yt(e){console.error(e)}function Qt(){}function Jt(e,t,n,r,i,a,s,o){e.allPendingTasks++,null===n?e.pendingRootTasks++:n.pendingTasks++;var u={node:t,ping:function(){var t=e.pingedTasks;t.push(u),1===t.length&&mn(e)},blockedBoundary:n,blockedSegment:r,abortSet:i,legacyContext:a,context:s,treeContext:o};return i.add(u),u}function en(e,t,n,r){return{status:0,id:-1,index:t,parentFlushed:!1,chunks:[],children:[],formatContext:r,boundary:n}}function tn(e,t){(e=e.onError)(t)}function nn(e,t){var n=e.onShellError;n(t),(n=e.onFatalError)(t),null!==e.destination?(e.status=2,f(e.destination,t)):(e.status=1,e.fatalError=t)}function rn(e,t,n,r,i){for(At={},Ot=t,Mt=0,e=n(r,i);Rt;)Rt=!1,Mt=0,Ut+=1,Lt=null,e=n(r,i);return Ht(),e}function an(e,t,n,r){var a=n.render(),s=r.childContextTypes;if(null!=s){var o=t.legacyContext;if("function"!=typeof n.getChildContext)r=o;else{for(var u in n=n.getChildContext())if(!(u in s))throw Error(i(108,dt(r)||"Unknown",u));r=Xe({},o,n)}t.legacyContext=r,un(e,t,a),t.legacyContext=o}else un(e,t,a)}function sn(e,t){if(e&&e.defaultProps){for(var n in t=Xe({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function on(e,t,n,a,s){if("function"==typeof n)if(n.prototype&&n.prototype.isReactComponent){s=ft(n,t.legacyContext);var o=n.contextType;St(o=new n(a,"object"==typeof o&&null!==o?o._currentValue:s),n,a,s),an(e,t,o,n)}else{s=rn(e,t,n,a,o=ft(n,t.legacyContext));var u=0!==Mt;if("object"==typeof s&&null!==s&&"function"==typeof s.render&&void 0===s.$$typeof)St(s,n,a,o),an(e,t,s,n);else if(u){a=t.treeContext,t.treeContext=kt(a,1,0);try{un(e,t,s)}finally{t.treeContext=a}}else un(e,t,s)}else{if("string"!=typeof n){switch(n){case ut:case ot:case Ye:case Qe:case Ze:case rt:return void un(e,t,a.children);case st:throw Error(i(343));case nt:e:{n=t.blockedBoundary,s=t.blockedSegment,o=a.fallback,a=a.children;var l={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:u=new Set},c=en(0,s.chunks.length,l,s.formatContext);s.children.push(c);var h=en(0,0,null,s.formatContext);h.parentFlushed=!0,t.blockedBoundary=l,t.blockedSegment=h;try{if(cn(e,t,a),h.status=1,fn(l,h),0===l.pendingTasks)break e}catch(t){h.status=4,tn(e,t),l.forceClientRender=!0}finally{t.blockedBoundary=n,t.blockedSegment=s}t=Jt(e,o,n,c,u,t.legacyContext,t.context,t.treeContext),e.pingedTasks.push(t)}return}if("object"==typeof n&&null!==n)switch(n.$$typeof){case tt:if(a=rn(e,t,n.render,a,s),0!==Mt){n=t.treeContext,t.treeContext=kt(n,1,0);try{un(e,t,a)}finally{t.treeContext=n}}else un(e,t,a);return;case it:return void on(e,t,n=n.type,a=sn(n,a),s);case Je:if(s=a.children,n=n._context,a=a.value,o=n._currentValue,n._currentValue=a,pt=a={parent:u=pt,depth:null===u?0:u.depth+1,context:n,parentValue:o,value:a},t.context=a,un(e,t,s),null===(e=pt))throw Error(i(403));return a=e.parentValue,e.context._currentValue=a===lt?e.context._defaultValue:a,e=pt=e.parent,void(t.context=e);case et:return void un(e,t,a=(a=a.children)(n._currentValue));case at:return void on(e,t,n=(s=n._init)(n._payload),a=sn(n,a),void 0)}throw Error(i(130,null==n?n:typeof n,""))}switch(o=function(e,t,n,a,s){switch(t){case"select":e.push(re("select"));var o=null,u=null;for(f in n)if(p.call(n,f)){var l=n[f];if(null!=l)switch(f){case"children":o=l;break;case"dangerouslySetInnerHTML":u=l;break;case"defaultValue":case"value":break;default:$(e,a,f,l)}}return e.push(K),Y(e,u,o),o;case"option":u=s.selectedValue,e.push(re("option"));var c=l=null,h=null,f=null;for(o in n)if(p.call(n,o)&&null!=(t=n[o]))switch(o){case"children":l=t;break;case"selected":h=t;break;case"dangerouslySetInnerHTML":f=t;break;case"value":c=t;default:$(e,a,o,t)}if(null!=u)if(n=null!==c?""+c:function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(l),A(u)){for(a=0;a<u.length;a++)if(""+u[a]===n){e.push(Q);break}}else""+u===n&&e.push(Q);else h&&e.push(Q);return e.push(K),Y(e,f,l),l;case"textarea":for(l in e.push(re("textarea")),f=u=o=null,n)if(p.call(n,l)&&null!=(c=n[l]))switch(l){case"children":f=c;break;case"value":o=c;break;case"defaultValue":u=c;break;case"dangerouslySetInnerHTML":throw Error(i(91));default:$(e,a,l,c)}if(null===o&&null!==u&&(o=u),e.push(K),null!=f){if(null!=o)throw Error(i(92));if(A(f)&&1<f.length)throw Error(i(93));o=""+f}return"string"==typeof o&&"\n"===o[0]&&e.push(ee),null!==o&&e.push(d(C(""+o))),null;case"input":for(u in e.push(re("input")),c=f=l=o=null,n)if(p.call(n,u)&&null!=(h=n[u]))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(i(399,"input"));case"defaultChecked":c=h;break;case"defaultValue":l=h;break;case"checked":f=h;break;case"value":o=h;break;default:$(e,a,u,h)}return null!==f?$(e,a,"checked",f):null!==c&&$(e,a,"checked",c),null!==o?$(e,a,"value",o):null!==l&&$(e,a,"value",l),e.push(Z),null;case"menuitem":for(var m in e.push(re("menuitem")),n)if(p.call(n,m)&&null!=(o=n[m]))switch(m){case"children":case"dangerouslySetInnerHTML":throw Error(i(400));default:$(e,a,m,o)}return e.push(K),null;case"listing":case"pre":for(c in e.push(re(t)),u=o=null,n)if(p.call(n,c)&&null!=(l=n[c]))switch(c){case"children":o=l;break;case"dangerouslySetInnerHTML":u=l;break;default:$(e,a,c,l)}if(e.push(K),null!=u){if(null!=o)throw Error(i(60));if("object"!=typeof u||!("__html"in u))throw Error(i(61));null!=(n=u.__html)&&("string"==typeof n&&0<n.length&&"\n"===n[0]?e.push(ee,d(n)):e.push(d(""+n)))}return"string"==typeof o&&"\n"===o[0]&&e.push(ee),o;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":for(var g in e.push(re(t)),n)if(p.call(n,g)&&null!=(o=n[g]))switch(g){case"children":case"dangerouslySetInnerHTML":throw Error(i(399,t));default:$(e,a,g,o)}return e.push(Z),null;case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return J(e,n,t,a);case"html":return 0===s.insertionMode&&e.push(ie),J(e,n,t,a);default:if(-1===t.indexOf("-")&&"string"!=typeof n.is)return J(e,n,t,a);for(h in e.push(re(t)),u=o=null,n)if(p.call(n,h)&&null!=(l=n[h]))switch(h){case"children":o=l;break;case"dangerouslySetInnerHTML":u=l;break;case"style":q(e,a,l);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:y(h)&&"function"!=typeof l&&"symbol"!=typeof l&&e.push(W,d(h),z,d(C(l)),G)}return e.push(K),Y(e,u,o),o}}((s=t.blockedSegment).chunks,n,a,e.responseState,s.formatContext),u=s.formatContext,s.formatContext=function(e,t,n){switch(t){case"select":return U(1,null!=n.value?n.value:n.defaultValue);case"svg":return U(2,null);case"math":return U(3,null);case"foreignObject":return U(1,null);case"table":return U(4,null);case"thead":case"tbody":case"tfoot":return U(5,null);case"colgroup":return U(7,null);case"tr":return U(6,null)}return 4<=e.insertionMode||0===e.insertionMode?U(1,null):e}(u,n,a),cn(e,t,o),s.formatContext=u,n){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:s.chunks.push(ae,d(n),se)}}}function un(e,t,n){if(t.node=n,"object"==typeof n&&null!==n){switch(n.$$typeof){case $e:return void on(e,t,n.type,n.props,n.ref);case Ke:throw Error(i(257));case at:var r=n._init;return void un(e,t,n=r(n._payload))}if(A(n))return void ln(e,t,n);if((r=null===n||"object"!=typeof n?null:"function"==typeof(r=ct&&n[ct]||n["@@iterator"])?r:null)&&(r=r.call(n))){if(!(n=r.next()).done){var a=[];do{a.push(n.value),n=r.next()}while(!n.done);ln(e,t,a)}return}throw t=Object.prototype.toString.call(n),Error(i(31,"[object Object]"===t?"object with keys {"+Object.keys(n).join(", ")+"}":t))}"string"==typeof n?""!==n&&t.blockedSegment.chunks.push(d(C(n)),F):"number"==typeof n&&""!=(e=""+n)&&t.blockedSegment.chunks.push(d(C(e)),F)}function ln(e,t,n){for(var r=n.length,i=0;i<r;i++){var a=t.treeContext;t.treeContext=kt(a,r,i);try{cn(e,t,n[i])}finally{t.treeContext=a}}}function cn(e,t,n){var r=t.blockedSegment.formatContext,i=t.legacyContext,a=t.context;try{return un(e,t,n)}catch(u){if(Ht(),"object"!=typeof u||null===u||"function"!=typeof u.then)throw t.blockedSegment.formatContext=r,t.legacyContext=i,t.context=a,bt(a),u;n=u;var s=t.blockedSegment,o=en(0,s.chunks.length,null,s.formatContext);s.children.push(o),e=Jt(e,t.node,t.blockedBoundary,o,t.abortSet,t.legacyContext,t.context,t.treeContext).ping,n.then(e,e),t.blockedSegment.formatContext=r,t.legacyContext=i,t.context=a,bt(a)}}function dn(e){var t=e.blockedBoundary;(e=e.blockedSegment).status=3,pn(this,t,e)}function hn(e){var t=e.blockedBoundary;e.blockedSegment.status=3,null===t?(this.allPendingTasks--,2!==this.status&&(this.status=2,null!==this.destination&&this.destination.close())):(t.pendingTasks--,t.forceClientRender||(t.forceClientRender=!0,t.parentFlushed&&this.clientRenderedBoundaries.push(t)),t.fallbackAbortableTasks.forEach(hn,this),t.fallbackAbortableTasks.clear(),this.allPendingTasks--,0===this.allPendingTasks&&(e=this.onAllReady)())}function fn(e,t){if(0===t.chunks.length&&1===t.children.length&&null===t.children[0].boundary){var n=t.children[0];n.id=t.id,n.parentFlushed=!0,1===n.status&&fn(e,n)}else e.completedSegments.push(t)}function pn(e,t,n){if(null===t){if(n.parentFlushed){if(null!==e.completedRootSegment)throw Error(i(389));e.completedRootSegment=n}e.pendingRootTasks--,0===e.pendingRootTasks&&(e.onShellError=Qt,(t=e.onShellReady)())}else t.pendingTasks--,t.forceClientRender||(0===t.pendingTasks?(n.parentFlushed&&1===n.status&&fn(t,n),t.parentFlushed&&e.completedBoundaries.push(t),t.fallbackAbortableTasks.forEach(dn,e),t.fallbackAbortableTasks.clear()):n.parentFlushed&&1===n.status&&(fn(t,n),1===t.completedSegments.length&&t.parentFlushed&&e.partialBoundaries.push(t)));e.allPendingTasks--,0===e.allPendingTasks&&(e=e.onAllReady)()}function mn(e){if(2!==e.status){var t=pt,n=Zt.current;Zt.current=$t;var r=Kt;Kt=e.responseState;try{var i,a=e.pingedTasks;for(i=0;i<a.length;i++){var s=a[i],o=e,u=s.blockedSegment;if(0===u.status){bt(s.context);try{un(o,s,s.node),s.abortSet.delete(s),u.status=1,pn(o,s.blockedBoundary,u)}catch(e){if(Ht(),"object"==typeof e&&null!==e&&"function"==typeof e.then){var l=s.ping;e.then(l,l)}else{s.abortSet.delete(s),u.status=4;var c=s.blockedBoundary,d=e;tn(o,d),null===c?nn(o,d):(c.pendingTasks--,c.forceClientRender||(c.forceClientRender=!0,c.parentFlushed&&o.clientRenderedBoundaries.push(c))),o.allPendingTasks--,0===o.allPendingTasks&&(0,o.onAllReady)()}}}}a.splice(0,i),null!==e.destination&&Tn(e,e.destination)}catch(t){tn(e,t),nn(e,t)}finally{Kt=r,Zt.current=n,n===$t&&bt(t)}}}function gn(e,t,n){switch(n.parentFlushed=!0,n.status){case 0:var r=n.id=e.nextSegmentId++;return e=e.responseState,o(t,oe),o(t,e.placeholderPrefix),o(t,e=d(r.toString(16))),u(t,ue);case 1:n.status=2;var a=!0;r=n.chunks;var s=0;n=n.children;for(var l=0;l<n.length;l++){for(a=n[l];s<a.index;s++)o(t,r[s]);a=vn(e,t,a)}for(;s<r.length-1;s++)o(t,r[s]);return s<r.length&&(a=u(t,r[s])),a;default:throw Error(i(390))}}function vn(e,t,n){var r=n.boundary;if(null===r)return gn(e,t,n);if(r.parentFlushed=!0,r.forceClientRender)u(t,he),gn(e,t,n);else if(0<r.pendingTasks){r.rootSegmentID=e.nextSegmentId++,0<r.completedSegments.length&&e.partialBoundaries.push(r);var a=e.responseState,s=a.nextSuspenseID++;a=h(a.boundaryPrefix+s.toString(16)),r=r.id=a,pe(t,e.responseState,r),gn(e,t,n)}else if(r.byteSize>e.progressiveChunkSize)r.rootSegmentID=e.nextSegmentId++,e.completedBoundaries.push(r),pe(t,e.responseState,r.id),gn(e,t,n);else{if(u(t,le),1!==(n=r.completedSegments).length)throw Error(i(391));vn(e,t,n[0])}return u(t,fe)}function yn(e,t,n){return function(e,t,n,r){switch(n.insertionMode){case 0:case 1:return o(e,me),o(e,t.segmentPrefix),o(e,d(r.toString(16))),u(e,ge);case 2:return o(e,ye),o(e,t.segmentPrefix),o(e,d(r.toString(16))),u(e,_e);case 3:return o(e,Te),o(e,t.segmentPrefix),o(e,d(r.toString(16))),u(e,Se);case 4:return o(e,ke),o(e,t.segmentPrefix),o(e,d(r.toString(16))),u(e,Ee);case 5:return o(e,xe),o(e,t.segmentPrefix),o(e,d(r.toString(16))),u(e,Ie);case 6:return o(e,Oe),o(e,t.segmentPrefix),o(e,d(r.toString(16))),u(e,Pe);case 7:return o(e,De),o(e,t.segmentPrefix),o(e,d(r.toString(16))),u(e,Re);default:throw Error(i(397))}}(t,e.responseState,n.formatContext,n.id),vn(e,t,n),function(e,t){switch(t.insertionMode){case 0:case 1:return u(e,ve);case 2:return u(e,be);case 3:return u(e,we);case 4:return u(e,Ce);case 5:return u(e,Ae);case 6:return u(e,Le);case 7:return u(e,Me);default:throw Error(i(397))}}(t,n.formatContext)}function _n(e,t,n){for(var r=n.completedSegments,a=0;a<r.length;a++)bn(e,t,n,r[a]);if(r.length=0,e=e.responseState,r=n.id,n=n.rootSegmentID,o(t,e.startInlineScript),e.sentCompleteBoundaryFunction?o(t,He):(e.sentCompleteBoundaryFunction=!0,o(t,je)),null===r)throw Error(i(395));return n=d(n.toString(16)),o(t,r),o(t,Ve),o(t,e.segmentPrefix),o(t,n),u(t,qe)}function bn(e,t,n,r){if(2===r.status)return!0;var a=r.id;if(-1===a){if(-1===(r.id=n.rootSegmentID))throw Error(i(392));return yn(e,t,r)}return yn(e,t,r),o(t,(e=e.responseState).startInlineScript),e.sentCompleteSegmentFunction?o(t,Ue):(e.sentCompleteSegmentFunction=!0,o(t,Ne)),o(t,e.segmentPrefix),o(t,a=d(a.toString(16))),o(t,Fe),o(t,e.placeholderPrefix),o(t,a),u(t,Be)}function Tn(e,t){a=new Uint8Array(512),s=0;try{var n=e.completedRootSegment;if(null!==n&&0===e.pendingRootTasks){vn(e,t,n),e.completedRootSegment=null;var r=e.responseState.bootstrapChunks;for(n=0;n<r.length-1;n++)o(t,r[n]);n<r.length&&u(t,r[n])}var c,d=e.clientRenderedBoundaries;for(c=0;c<d.length;c++){r=t;var h=e.responseState,f=d[c].id;if(o(r,h.startInlineScript),h.sentClientRenderFunction?o(r,ze):(h.sentClientRenderFunction=!0,o(r,We)),null===f)throw Error(i(395));if(o(r,f),!u(r,Ge))return e.destination=null,c++,void d.splice(0,c)}d.splice(0,c);var p=e.completedBoundaries;for(c=0;c<p.length;c++)if(!_n(e,t,p[c]))return e.destination=null,c++,void p.splice(0,c);p.splice(0,c),l(t),a=new Uint8Array(512),s=0;var m=e.partialBoundaries;for(c=0;c<m.length;c++){var g=m[c];e:{d=e,h=t;var v=g.completedSegments;for(f=0;f<v.length;f++)if(!bn(d,h,g,v[f])){f++,v.splice(0,f);var y=!1;break e}v.splice(0,f),y=!0}if(!y)return e.destination=null,c++,void m.splice(0,c)}m.splice(0,c);var _=e.completedBoundaries;for(c=0;c<_.length;c++)if(!_n(e,t,_[c]))return e.destination=null,c++,void _.splice(0,c);_.splice(0,c)}finally{l(t),0===e.allPendingTasks&&0===e.pingedTasks.length&&0===e.clientRenderedBoundaries.length&&0===e.completedBoundaries.length&&t.close()}}function Sn(e){try{var t=e.abortableTasks;t.forEach(hn,e),t.clear(),null!==e.destination&&Tn(e,e.destination)}catch(t){tn(e,t),nn(e,t)}}t.renderToReadableStream=function(e,t){return new Promise((function(n,r){var i,a,s=new Promise((function(e,t){a=e,i=t})),o=function(e,t,n,r,i,a,s,o,u){var l=[],c=new Set;return(n=en(t={destination:null,responseState:t,progressiveChunkSize:void 0===r?12800:r,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:c,pingedTasks:l,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:void 0===i?Yt:i,onAllReady:void 0===a?Qt:a,onShellReady:void 0===s?Qt:s,onShellError:void 0===o?Qt:o,onFatalError:void 0===u?Qt:u},0,null,n)).parentFlushed=!0,e=Jt(t,e,null,n,c,ht,null,wt),l.push(e),t}(e,function(e,t,n,r,i){e=void 0===e?"":e,t=void 0===t?O:h('<script nonce="'+C(t)+'">');var a=[];if(void 0!==n&&a.push(t,d((""+n).replace(M,N)),P),void 0!==r)for(n=0;n<r.length;n++)a.push(L,d(C(r[n])),R);if(void 0!==i)for(r=0;r<i.length;r++)a.push(D,d(C(i[r])),R);return{bootstrapChunks:a,startInlineScript:t,placeholderPrefix:h(e+"P:"),segmentPrefix:h(e+"S:"),boundaryPrefix:e+"B:",idPrefix:e,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1}}(t?t.identifierPrefix:void 0,t?t.nonce:void 0,t?t.bootstrapScriptContent:void 0,t?t.bootstrapScripts:void 0,t?t.bootstrapModules:void 0),function(e){return U("http://www.w3.org/2000/svg"===e?2:"http://www.w3.org/1998/Math/MathML"===e?3:0,null)}(t?t.namespaceURI:void 0),t?t.progressiveChunkSize:void 0,t?t.onError:void 0,a,(function(){var e=new ReadableStream({type:"bytes",pull:function(e){if(1===o.status)o.status=2,f(e,o.fatalError);else if(2!==o.status&&null===o.destination){o.destination=e;try{Tn(o,e)}catch(e){tn(o,e),nn(o,e)}}},cancel:function(){Sn(o)}});e.allReady=s,n(e)}),(function(e){s.catch((function(){})),r(e)}),i);if(t&&t.signal){var u=t.signal,l=function(){Sn(o),u.removeEventListener("abort",l)};u.addEventListener("abort",l)}mn(o)}))},t.version="18.1.0"},74161:(e,t,n)=>{"use strict";var r,i;r=n(28534),i=n(67392),r.version,r.renderToString,t.uS=r.renderToStaticMarkup,r.renderToNodeStream,r.renderToStaticNodeStream,i.renderToReadableStream},8004:e=>{e.exports=function(e,t){var n,r=null;try{n=JSON.parse(e,t)}catch(e){r=e}return[r,n]}},18204:(e,t,n)=>{"use strict";n.d(t,{Z:()=>B}),n(94386),n(98457);var r=n(15206),i=n.n(r),a=(n(15296),n(48868),n(96609),n(92274),n(68268),n(81874),n(31341),n(54861),n(50200)),s=n.n(a),o=n(40001),u=n.n(o),l=n(98511),c=n.n(l),d=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];e.call(t,i[1],i[0])}},t}()}(),h="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,f=void 0!==n.g&&n.g.Math===Math?n.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),p="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(f):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)},m=["top","right","bottom","left","width","height","size","weight"],g="undefined"!=typeof MutationObserver,v=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,i=0;function a(){n&&(n=!1,e()),r&&o()}function s(){p(a)}function o(){var e=Date.now();if(n){if(e-i<2)return;r=!0}else n=!0,r=!1,setTimeout(s,t);i=e}return o}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){h&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),g?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){h&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;m.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),y=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},_=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||f},b=E(0,0,0,0);function T(e){return parseFloat(e)||0}function S(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+T(e["border-"+n+"-width"])}),0)}var w="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof _(e).SVGGraphicsElement}:function(e){return e instanceof _(e).SVGElement&&"function"==typeof e.getBBox};function k(e){return h?w(e)?function(e){var t=e.getBBox();return E(0,0,t.width,t.height)}(e):function(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return b;var r=_(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],a=e["padding-"+i];t[i]=T(a)}return t}(r),a=i.left+i.right,s=i.top+i.bottom,o=T(r.width),u=T(r.height);if("border-box"===r.boxSizing&&(Math.round(o+a)!==t&&(o-=S(r,"left","right")+a),Math.round(u+s)!==n&&(u-=S(r,"top","bottom")+s)),!function(e){return e===_(e).document.documentElement}(e)){var l=Math.round(o+a)-t,c=Math.round(u+s)-n;1!==Math.abs(l)&&(o-=l),1!==Math.abs(c)&&(u-=c)}return E(i.left,i.top,o,u)}(e):b}function E(e,t,n,r){return{x:e,y:t,width:n,height:r}}var C=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=E(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=k(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),x=function(e,t){var n,r,i,a,s,o,u,l=(r=(n=t).x,i=n.y,a=n.width,s=n.height,o="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(o.prototype),y(u,{x:r,y:i,width:a,height:s,top:i,right:r+a,bottom:s+i,left:r}),u);y(this,{target:e,contentRect:l})},I=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new d,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof _(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new C(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof _(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new x(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),A="undefined"!=typeof WeakMap?new WeakMap:new d,O=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=v.getInstance(),r=new I(t,n,this);A.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){O.prototype[e]=function(){var t;return(t=A.get(this))[e].apply(t,arguments)}}));const P=void 0!==f.ResizeObserver?f.ResizeObserver:O;n(82937),n(66403),n(42295),n(52963),n(34994);var L=null,D=null;function R(){if(null===L){if("undefined"==typeof document)return L=0;var e=document.body,t=document.createElement("div");t.classList.add("simplebar-hide-scrollbar"),e.appendChild(t);var n=t.getBoundingClientRect().right;e.removeChild(t),L=n}return L}i()&&window.addEventListener("resize",(function(){D!==window.devicePixelRatio&&(D=window.devicePixelRatio,L=null)}));var M=function(e){return Array.prototype.reduce.call(e,(function(e,t){var n=t.name.match(/data-simplebar-(.+)/);if(n){var r=n[1].replace(/\W+(.)/g,(function(e,t){return t.toUpperCase()}));switch(t.value){case"true":e[r]=!0;break;case"false":e[r]=!1;break;case void 0:e[r]=!0;break;default:e[r]=t.value}}return e}),{})};function N(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window}function U(e){return e&&e.ownerDocument?e.ownerDocument:document}var F=function(){function e(t,n){var r=this;this.onScroll=function(){var e=N(r.el);r.scrollXTicking||(e.requestAnimationFrame(r.scrollX),r.scrollXTicking=!0),r.scrollYTicking||(e.requestAnimationFrame(r.scrollY),r.scrollYTicking=!0)},this.scrollX=function(){r.axis.x.isOverflowing&&(r.showScrollbar("x"),r.positionScrollbar("x")),r.scrollXTicking=!1},this.scrollY=function(){r.axis.y.isOverflowing&&(r.showScrollbar("y"),r.positionScrollbar("y")),r.scrollYTicking=!1},this.onMouseEnter=function(){r.showScrollbar("x"),r.showScrollbar("y")},this.onMouseMove=function(e){r.mouseX=e.clientX,r.mouseY=e.clientY,(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseMoveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseMoveForAxis("y")},this.onMouseLeave=function(){r.onMouseMove.cancel(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseLeaveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseLeaveForAxis("y"),r.mouseX=-1,r.mouseY=-1},this.onWindowResize=function(){r.scrollbarWidth=r.getScrollbarWidth(),r.hideNativeScrollbar()},this.hideScrollbars=function(){r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.track.rect)||(r.axis.y.scrollbar.el.classList.remove(r.classNames.visible),r.axis.y.isVisible=!1),r.isWithinBounds(r.axis.x.track.rect)||(r.axis.x.scrollbar.el.classList.remove(r.classNames.visible),r.axis.x.isVisible=!1)},this.onPointerEvent=function(e){var t,n;r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&(t=r.isWithinBounds(r.axis.x.track.rect)),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&(n=r.isWithinBounds(r.axis.y.track.rect)),(t||n)&&(e.preventDefault(),e.stopPropagation(),"mousedown"===e.type&&(t&&(r.axis.x.scrollbar.rect=r.axis.x.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.x.scrollbar.rect)?r.onDragStart(e,"x"):r.onTrackClick(e,"x")),n&&(r.axis.y.scrollbar.rect=r.axis.y.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.scrollbar.rect)?r.onDragStart(e,"y"):r.onTrackClick(e,"y"))))},this.drag=function(t){var n=r.axis[r.draggedAxis].track,i=n.rect[r.axis[r.draggedAxis].sizeAttr],a=r.axis[r.draggedAxis].scrollbar,s=r.contentWrapperEl[r.axis[r.draggedAxis].scrollSizeAttr],o=parseInt(r.elStyles[r.axis[r.draggedAxis].sizeAttr],10);t.preventDefault(),t.stopPropagation();var u=(("y"===r.draggedAxis?t.pageY:t.pageX)-n.rect[r.axis[r.draggedAxis].offsetAttr]-r.axis[r.draggedAxis].dragOffset)/(i-a.size)*(s-o);"x"===r.draggedAxis&&(u=r.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?u-(i+a.size):u,u=r.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-u:u),r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr]=u},this.onEndDrag=function(e){var t=U(r.el),n=N(r.el);e.preventDefault(),e.stopPropagation(),r.el.classList.remove(r.classNames.dragging),t.removeEventListener("mousemove",r.drag,!0),t.removeEventListener("mouseup",r.onEndDrag,!0),r.removePreventClickId=n.setTimeout((function(){t.removeEventListener("click",r.preventClick,!0),t.removeEventListener("dblclick",r.preventClick,!0),r.removePreventClickId=null}))},this.preventClick=function(e){e.preventDefault(),e.stopPropagation()},this.el=t,this.minScrollbarWidth=20,this.options=Object.assign({},e.defaultOptions,{},n),this.classNames=Object.assign({},e.defaultOptions.classNames,{},this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,e.instances.has(this.el)||(this.recalculate=s()(this.recalculate.bind(this),64),this.onMouseMove=s()(this.onMouseMove.bind(this),64),this.hideScrollbars=u()(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=u()(this.onWindowResize.bind(this),64,{leading:!0}),e.getRtlHelpers=c()(e.getRtlHelpers),this.init())}e.getRtlHelpers=function(){var t=document.createElement("div");t.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var n=t.firstElementChild;document.body.appendChild(n);var r=n.firstElementChild;n.scrollLeft=0;var i=e.getOffset(n),a=e.getOffset(r);n.scrollLeft=999;var s=e.getOffset(r);return{isRtlScrollingInverted:i.left!==a.left&&a.left-s.left!=0,isRtlScrollbarInverted:i.left!==a.left}},e.getOffset=function(e){var t=e.getBoundingClientRect(),n=U(e),r=N(e);return{top:t.top+(r.pageYOffset||n.documentElement.scrollTop),left:t.left+(r.pageXOffset||n.documentElement.scrollLeft)}};var t=e.prototype;return t.init=function(){e.instances.set(this.el,this),i()&&(this.initDOM(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},t.initDOM=function(){var e=this;if(Array.prototype.filter.call(this.el.children,(function(t){return t.classList.contains(e.classNames.wrapper)})).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var t=document.createElement("div"),n=document.createElement("div");t.classList.add(this.classNames.track),n.classList.add(this.classNames.scrollbar),t.appendChild(n),this.axis.x.track.el=t.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=t.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},t.initListeners=function(){var e=this,t=N(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(t){e.el.addEventListener(t,e.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(t){e.el.addEventListener(t,e.onPointerEvent,{capture:!0,passive:!0})})),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),t.addEventListener("resize",this.onWindowResize);var n=!1,r=t.ResizeObserver||P;this.resizeObserver=new r((function(){n&&e.recalculate()})),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),t.requestAnimationFrame((function(){n=!0})),this.mutationObserver=new t.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},t.recalculate=function(){var e=N(this.el);this.elStyles=e.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction;var t=this.heightAutoObserverEl.offsetHeight<=1,n=this.heightAutoObserverEl.offsetWidth<=1,r=this.contentEl.offsetWidth,i=this.contentWrapperEl.offsetWidth,a=this.elStyles.overflowX,s=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var o=this.contentEl.scrollHeight,u=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=t?"auto":"100%",this.placeholderEl.style.width=n?r+"px":"auto",this.placeholderEl.style.height=o+"px";var l=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=u>r,this.axis.y.isOverflowing=o>l,this.axis.x.isOverflowing="hidden"!==a&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==s&&this.axis.y.isOverflowing,this.axis.x.forceVisible="x"===this.options.forceVisible||!0===this.options.forceVisible,this.axis.y.forceVisible="y"===this.options.forceVisible||!0===this.options.forceVisible,this.hideNativeScrollbar();var c=this.axis.x.isOverflowing?this.scrollbarWidth:0,d=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&u>i-d,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&o>l-c,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},t.getScrollbarSize=function(e){if(void 0===e&&(e="y"),!this.axis[e].isOverflowing)return 0;var t,n=this.contentEl[this.axis[e].scrollSizeAttr],r=this.axis[e].track.el[this.axis[e].offsetSizeAttr],i=r/n;return t=Math.max(~~(i*r),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(t=Math.min(t,this.options.scrollbarMaxSize)),t},t.positionScrollbar=function(t){if(void 0===t&&(t="y"),this.axis[t].isOverflowing){var n=this.contentWrapperEl[this.axis[t].scrollSizeAttr],r=this.axis[t].track.el[this.axis[t].offsetSizeAttr],i=parseInt(this.elStyles[this.axis[t].sizeAttr],10),a=this.axis[t].scrollbar,s=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],o=(s="x"===t&&this.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-s:s)/(n-i),u=~~((r-a.size)*o);u="x"===t&&this.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?u+(r-a.size):u,a.el.style.transform="x"===t?"translate3d("+u+"px, 0, 0)":"translate3d(0, "+u+"px, 0)"}},t.toggleTrackVisibility=function(e){void 0===e&&(e="y");var t=this.axis[e].track.el,n=this.axis[e].scrollbar.el;this.axis[e].isOverflowing||this.axis[e].forceVisible?(t.style.visibility="visible",this.contentWrapperEl.style[this.axis[e].overflowAttr]="scroll"):(t.style.visibility="hidden",this.contentWrapperEl.style[this.axis[e].overflowAttr]="hidden"),this.axis[e].isOverflowing?n.style.display="block":n.style.display="none"},t.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},t.onMouseMoveForAxis=function(e){void 0===e&&(e="y"),this.axis[e].track.rect=this.axis[e].track.el.getBoundingClientRect(),this.axis[e].scrollbar.rect=this.axis[e].scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis[e].scrollbar.rect)?this.axis[e].scrollbar.el.classList.add(this.classNames.hover):this.axis[e].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[e].track.rect)?(this.showScrollbar(e),this.axis[e].track.el.classList.add(this.classNames.hover)):this.axis[e].track.el.classList.remove(this.classNames.hover)},t.onMouseLeaveForAxis=function(e){void 0===e&&(e="y"),this.axis[e].track.el.classList.remove(this.classNames.hover),this.axis[e].scrollbar.el.classList.remove(this.classNames.hover)},t.showScrollbar=function(e){void 0===e&&(e="y");var t=this.axis[e].scrollbar.el;this.axis[e].isVisible||(t.classList.add(this.classNames.visible),this.axis[e].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},t.onDragStart=function(e,t){void 0===t&&(t="y");var n=U(this.el),r=N(this.el),i=this.axis[t].scrollbar,a="y"===t?e.pageY:e.pageX;this.axis[t].dragOffset=a-i.rect[this.axis[t].offsetAttr],this.draggedAxis=t,this.el.classList.add(this.classNames.dragging),n.addEventListener("mousemove",this.drag,!0),n.addEventListener("mouseup",this.onEndDrag,!0),null===this.removePreventClickId?(n.addEventListener("click",this.preventClick,!0),n.addEventListener("dblclick",this.preventClick,!0)):(r.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},t.onTrackClick=function(e,t){var n=this;if(void 0===t&&(t="y"),this.options.clickOnTrack){var r=N(this.el);this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect();var i=this.axis[t].scrollbar.rect[this.axis[t].offsetAttr],a=parseInt(this.elStyles[this.axis[t].sizeAttr],10),s=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],o=("y"===t?this.mouseY-i:this.mouseX-i)<0?-1:1,u=-1===o?s-a:s+a;!function e(){var i,a;-1===o?s>u&&(s-=n.options.clickOnTrackSpeed,n.contentWrapperEl.scrollTo(((i={})[n.axis[t].offsetAttr]=s,i)),r.requestAnimationFrame(e)):s<u&&(s+=n.options.clickOnTrackSpeed,n.contentWrapperEl.scrollTo(((a={})[n.axis[t].offsetAttr]=s,a)),r.requestAnimationFrame(e))}()}},t.getContentElement=function(){return this.contentEl},t.getScrollElement=function(){return this.contentWrapperEl},t.getScrollbarWidth=function(){try{return"none"===getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:R()}catch(e){return R()}},t.removeListeners=function(){var e=this,t=N(this.el);this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(t){e.el.removeEventListener(t,e.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(t){e.el.removeEventListener(t,e.onPointerEvent,{capture:!0,passive:!0})})),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.recalculate.cancel(),this.onMouseMove.cancel(),this.hideScrollbars.cancel(),this.onWindowResize.cancel()},t.unMount=function(){this.removeListeners(),e.instances.delete(this.el)},t.isWithinBounds=function(e){return this.mouseX>=e.left&&this.mouseX<=e.left+e.width&&this.mouseY>=e.top&&this.mouseY<=e.top+e.height},t.findChild=function(e,t){var n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;return Array.prototype.filter.call(e.children,(function(e){return n.call(e,t)}))[0]},e}();F.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,clickOnTrackSpeed:40,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3},F.instances=new WeakMap,F.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),(function(e){"init"===e.getAttribute("data-simplebar")||F.instances.has(e)||new F(e,M(e.attributes))}))},F.removeObserver=function(){this.globalObserver.disconnect()},F.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),"undefined"!=typeof MutationObserver&&(this.globalObserver=new MutationObserver(F.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))},F.handleMutations=function(e){e.forEach((function(e){Array.prototype.forEach.call(e.addedNodes,(function(e){1===e.nodeType&&(e.hasAttribute("data-simplebar")?!F.instances.has(e)&&new F(e,M(e.attributes)):Array.prototype.forEach.call(e.querySelectorAll("[data-simplebar]"),(function(e){"init"===e.getAttribute("data-simplebar")||F.instances.has(e)||new F(e,M(e.attributes))})))})),Array.prototype.forEach.call(e.removedNodes,(function(e){1===e.nodeType&&(e.hasAttribute('[data-simplebar="init"]')?F.instances.has(e)&&F.instances.get(e).unMount():Array.prototype.forEach.call(e.querySelectorAll('[data-simplebar="init"]'),(function(e){F.instances.has(e)&&F.instances.get(e).unMount()})))}))}))},F.getOptions=M,i()&&F.initHtmlApi();const B=F},31336:function(e){var t,n,r,i,a;t=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,n=/^(?=([^\/?#]*))\1([^]*)$/,r=/(?:\/|^)\.(?=\/)/g,i=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,a={buildAbsoluteURL:function(e,t,r){if(r=r||{},e=e.trim(),!(t=t.trim())){if(!r.alwaysNormalize)return e;var i=a.parseURL(e);if(!i)throw new Error("Error trying to parse base URL.");return i.path=a.normalizePath(i.path),a.buildURLFromParts(i)}var s=a.parseURL(t);if(!s)throw new Error("Error trying to parse relative URL.");if(s.scheme)return r.alwaysNormalize?(s.path=a.normalizePath(s.path),a.buildURLFromParts(s)):t;var o=a.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var u=n.exec(o.path);o.netLoc=u[1],o.path=u[2]}o.netLoc&&!o.path&&(o.path="/");var l={scheme:o.scheme,netLoc:s.netLoc,path:null,params:s.params,query:s.query,fragment:s.fragment};if(!s.netLoc&&(l.netLoc=o.netLoc,"/"!==s.path[0]))if(s.path){var c=o.path,d=c.substring(0,c.lastIndexOf("/")+1)+s.path;l.path=a.normalizePath(d)}else l.path=o.path,s.params||(l.params=o.params,s.query||(l.query=o.query));return null===l.path&&(l.path=r.alwaysNormalize?a.normalizePath(s.path):s.path),a.buildURLFromParts(l)},parseURL:function(e){var n=t.exec(e);return n?{scheme:n[1]||"",netLoc:n[2]||"",path:n[3]||"",params:n[4]||"",query:n[5]||"",fragment:n[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(r,"");e.length!==(e=e.replace(i,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=a},42612:(e,t,n)=>{"use strict";n.d(t,{Z:()=>yl});var r=n(51562),i=n.n(r),a=n(3384),s=n.n(a),o=n(20011),u=n(93173),l=n(23788),c=n(8004),d=n.n(c),h=n(19389),f=n.n(h),p=n(68942),m=n.n(p),g=n(83983),v=n.n(g),y=n(45901);function _(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_=function(){return!!e})()}var b=n(31336),T=n.n(b);const S=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=i().location&&i().location.href||"");var n="function"==typeof i().URL,r=/^\/\//.test(e),a=!i().location&&!/\/\//i.test(e);if(n?e=new(i().URL)(e,i().location||"http://example.com"):/\/\//i.test(e)||(e=T().buildAbsoluteURL(i().location&&i().location.href||"",e)),n){var s=new URL(t,e);return a?s.href.slice(18):r?s.href.slice(s.protocol.length):s.href}return T().buildAbsoluteURL(e,t)};var w=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(n,1),n>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,r=0;r<n;++r)t[r].call(this,arguments[1]);else for(var i=Array.prototype.slice.call(arguments,1),a=t.length,s=0;s<a;++s)t[s].apply(this,i)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}();function k(e){for(var t,n=(t=e,i().atob?i().atob(t):Buffer.from(t,"base64").toString("binary")),r=new Uint8Array(n.length),a=0;a<n.length;a++)r[a]=n.charCodeAt(a);return r}var E,C,x,I=function(e){function t(){var t;return(t=e.call(this)||this).buffer="",t}return(0,l.Z)(t,e),t.prototype.push=function(e){var t;for(this.buffer+=e,t=this.buffer.indexOf("\n");t>-1;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)},t}(w),A=String.fromCharCode(9),O=function(e){var t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||""),n={};return t[1]&&(n.length=parseInt(t[1],10)),t[2]&&(n.offset=parseInt(t[2],10)),n},P=function(e){for(var t,n=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),r={},i=n.length;i--;)""!==n[i]&&((t=/([^=]*)=(.*)/.exec(n[i]).slice(1))[0]=t[0].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^['"](.*)['"]$/g,"$1"),r[t[0]]=t[1]);return r},L=function(e){function t(){var t;return(t=e.call(this)||this).customParsers=[],t.tagMappers=[],t}(0,l.Z)(t,e);var n=t.prototype;return n.push=function(e){var t,n,r=this;0!==(e=e.trim()).length&&("#"===e[0]?this.tagMappers.reduce((function(t,n){var r=n(e);return r===e?t:t.concat([r])}),[e]).forEach((function(e){for(var i=0;i<r.customParsers.length;i++)if(r.customParsers[i].call(r,e))return;if(0===e.indexOf("#EXT"))if(e=e.replace("\r",""),t=/^#EXTM3U/.exec(e))r.trigger("data",{type:"tag",tagType:"m3u"});else{if(t=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(e))return n={type:"tag",tagType:"inf"},t[1]&&(n.duration=parseFloat(t[1])),t[2]&&(n.title=t[2]),void r.trigger("data",n);if(t=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"targetduration"},t[1]&&(n.duration=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"version"},t[1]&&(n.version=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return n={type:"tag",tagType:"media-sequence"},t[1]&&(n.number=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return n={type:"tag",tagType:"discontinuity-sequence"},t[1]&&(n.number=parseInt(t[1],10)),void r.trigger("data",n);if(t=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(e))return n={type:"tag",tagType:"playlist-type"},t[1]&&(n.playlistType=t[1]),void r.trigger("data",n);if(t=/^#EXT-X-BYTERANGE:?(.*)?$/.exec(e))return n=(0,o.Z)(O(t[1]),{type:"tag",tagType:"byterange"}),void r.trigger("data",n);if(t=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(e))return n={type:"tag",tagType:"allow-cache"},t[1]&&(n.allowed=!/NO/.test(t[1])),void r.trigger("data",n);if(t=/^#EXT-X-MAP:?(.*)$/.exec(e)){if(n={type:"tag",tagType:"map"},t[1]){var a=P(t[1]);a.URI&&(n.uri=a.URI),a.BYTERANGE&&(n.byterange=O(a.BYTERANGE))}r.trigger("data",n)}else if(t=/^#EXT-X-STREAM-INF:?(.*)$/.exec(e)){if(n={type:"tag",tagType:"stream-inf"},t[1]){if(n.attributes=P(t[1]),n.attributes.RESOLUTION){var s=n.attributes.RESOLUTION.split("x"),u={};s[0]&&(u.width=parseInt(s[0],10)),s[1]&&(u.height=parseInt(s[1],10)),n.attributes.RESOLUTION=u}n.attributes.BANDWIDTH&&(n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)),n.attributes["PROGRAM-ID"]&&(n.attributes["PROGRAM-ID"]=parseInt(n.attributes["PROGRAM-ID"],10))}r.trigger("data",n)}else{if(t=/^#EXT-X-MEDIA:?(.*)$/.exec(e))return n={type:"tag",tagType:"media"},t[1]&&(n.attributes=P(t[1])),void r.trigger("data",n);if(t=/^#EXT-X-ENDLIST/.exec(e))r.trigger("data",{type:"tag",tagType:"endlist"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e))r.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(e))return n={type:"tag",tagType:"program-date-time"},t[1]&&(n.dateTimeString=t[1],n.dateTimeObject=new Date(t[1])),void r.trigger("data",n);if(t=/^#EXT-X-KEY:?(.*)$/.exec(e))return n={type:"tag",tagType:"key"},t[1]&&(n.attributes=P(t[1]),n.attributes.IV&&("0x"===n.attributes.IV.substring(0,2).toLowerCase()&&(n.attributes.IV=n.attributes.IV.substring(2)),n.attributes.IV=n.attributes.IV.match(/.{8}/g),n.attributes.IV[0]=parseInt(n.attributes.IV[0],16),n.attributes.IV[1]=parseInt(n.attributes.IV[1],16),n.attributes.IV[2]=parseInt(n.attributes.IV[2],16),n.attributes.IV[3]=parseInt(n.attributes.IV[3],16),n.attributes.IV=new Uint32Array(n.attributes.IV))),void r.trigger("data",n);if(t=/^#EXT-X-START:?(.*)$/.exec(e))return n={type:"tag",tagType:"start"},t[1]&&(n.attributes=P(t[1]),n.attributes["TIME-OFFSET"]=parseFloat(n.attributes["TIME-OFFSET"]),n.attributes.PRECISE=/YES/.test(n.attributes.PRECISE)),void r.trigger("data",n);if(t=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-out-cont"},t[1]?n.data=t[1]:n.data="",void r.trigger("data",n);if(t=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-out"},t[1]?n.data=t[1]:n.data="",void r.trigger("data",n);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-in"},t[1]?n.data=t[1]:n.data="",void r.trigger("data",n);if((t=/^#EXT-X-SKIP:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"skip"}).attributes=P(t[1]),n.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(n.attributes["SKIPPED-SEGMENTS"]=parseInt(n.attributes["SKIPPED-SEGMENTS"],10)),n.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(n.attributes["RECENTLY-REMOVED-DATERANGES"]=n.attributes["RECENTLY-REMOVED-DATERANGES"].split(A)),void r.trigger("data",n);if((t=/^#EXT-X-PART:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"part"}).attributes=P(t[1]),["DURATION"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseFloat(n.attributes[e]))})),["INDEPENDENT","GAP"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=/YES/.test(n.attributes[e]))})),n.attributes.hasOwnProperty("BYTERANGE")&&(n.attributes.byterange=O(n.attributes.BYTERANGE)),void r.trigger("data",n);if((t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"server-control"}).attributes=P(t[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseFloat(n.attributes[e]))})),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=/YES/.test(n.attributes[e]))})),void r.trigger("data",n);if((t=/^#EXT-X-PART-INF:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"part-inf"}).attributes=P(t[1]),["PART-TARGET"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseFloat(n.attributes[e]))})),void r.trigger("data",n);if((t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"preload-hint"}).attributes=P(t[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach((function(e){if(n.attributes.hasOwnProperty(e)){n.attributes[e]=parseInt(n.attributes[e],10);var t="BYTERANGE-LENGTH"===e?"length":"offset";n.attributes.byterange=n.attributes.byterange||{},n.attributes.byterange[t]=n.attributes[e],delete n.attributes[e]}})),void r.trigger("data",n);if((t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"rendition-report"}).attributes=P(t[1]),["LAST-MSN","LAST-PART"].forEach((function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseInt(n.attributes[e],10))})),void r.trigger("data",n);r.trigger("data",{type:"tag",data:e.slice(4)})}}}else r.trigger("data",{type:"comment",text:e.slice(1)})})):this.trigger("data",{type:"uri",uri:e}))},n.addParser=function(e){var t=this,n=e.expression,r=e.customType,i=e.dataParser,a=e.segment;"function"!=typeof i&&(i=function(e){return e}),this.customParsers.push((function(e){if(n.exec(e))return t.trigger("data",{type:"custom",data:i(e),customType:r,segment:a}),!0}))},n.addTagMapper=function(e){var t=e.expression,n=e.map;this.tagMappers.push((function(e){return t.test(e)?n(e):e}))},t}(w),D=function(e){var t={};return Object.keys(e).forEach((function(n){var r;t[(r=n,r.toLowerCase().replace(/-(\w)/g,(function(e){return e[1].toUpperCase()})))]=e[n]})),t},R=function(e){var t=e.serverControl,n=e.targetDuration,r=e.partTargetDuration;if(t){var i="#EXT-X-SERVER-CONTROL",a="holdBack",s="partHoldBack",o=n&&3*n,u=r&&2*r;n&&!t.hasOwnProperty(a)&&(t[a]=o,this.trigger("info",{message:i+" defaulting HOLD-BACK to targetDuration * 3 ("+o+")."})),o&&t[a]<o&&(this.trigger("warn",{message:i+" clamping HOLD-BACK ("+t[a]+") to targetDuration * 3 ("+o+")"}),t[a]=o),r&&!t.hasOwnProperty(s)&&(t[s]=3*r,this.trigger("info",{message:i+" defaulting PART-HOLD-BACK to partTargetDuration * 3 ("+t[s]+")."})),r&&t[s]<u&&(this.trigger("warn",{message:i+" clamping PART-HOLD-BACK ("+t[s]+") to partTargetDuration * 2 ("+u+")."}),t[s]=u)}},M=function(e){function t(){var t;(t=e.call(this)||this).lineStream=new I,t.parseStream=new L,t.lineStream.pipe(t.parseStream);var n,r,i=(0,u.Z)(t),a=[],s={},l=!1,c=function(){},d={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},h=0;t.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};var f=0,p=0;return t.on("end",(function(){s.uri||!s.parts&&!s.preloadHints||(!s.map&&n&&(s.map=n),!s.key&&r&&(s.key=r),s.timeline||"number"!=typeof h||(s.timeline=h),t.manifest.preloadSegment=s)})),t.parseStream.on("data",(function(e){var t,u;({tag:function(){({version:function(){e.version&&(this.manifest.version=e.version)},"allow-cache":function(){this.manifest.allowCache=e.allowed,"allowed"in e||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var t={};"length"in e&&(s.byterange=t,t.length=e.length,"offset"in e||(e.offset=f)),"offset"in e&&(s.byterange=t,t.offset=e.offset),f=t.offset+t.length},endlist:function(){this.manifest.endList=!0},inf:function(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),e.duration>0&&(s.duration=e.duration),0===e.duration&&(s.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=a},key:function(){if(e.attributes)if("NONE"!==e.attributes.METHOD)if(e.attributes.URI){if("com.apple.streamingkeydelivery"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:e.attributes});if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===e.attributes.KEYFORMAT)return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(e.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===e.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==e.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):e.attributes.KEYID&&"0x"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:k(e.attributes.URI.split(",")[1])})):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}));e.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),r={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},void 0!==e.attributes.IV&&(r.iv=e.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else r=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+e.number})},"discontinuity-sequence":function(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,h=e.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+e.number})},"playlist-type":function(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+e.playlist})},map:function(){n={},e.uri&&(n.uri=e.uri),e.byterange&&(n.byterange=e.byterange),r&&(n.key=r)},"stream-inf":function(){this.manifest.playlists=a,this.manifest.mediaGroups=this.manifest.mediaGroups||d,e.attributes?(s.attributes||(s.attributes={}),(0,o.Z)(s.attributes,e.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||d,e.attributes&&e.attributes.TYPE&&e.attributes["GROUP-ID"]&&e.attributes.NAME){var n=this.manifest.mediaGroups[e.attributes.TYPE];n[e.attributes["GROUP-ID"]]=n[e.attributes["GROUP-ID"]]||{},t=n[e.attributes["GROUP-ID"]],(u={default:/yes/i.test(e.attributes.DEFAULT)}).default?u.autoselect=!0:u.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(u.language=e.attributes.LANGUAGE),e.attributes.URI&&(u.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(u.instreamId=e.attributes["INSTREAM-ID"]),e.attributes.CHARACTERISTICS&&(u.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(u.forced=/yes/i.test(e.attributes.FORCED)),t[e.attributes.NAME]=u}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){h+=1,s.discontinuity=!0,this.manifest.discontinuityStarts.push(a.length)},"program-date-time":function(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),s.dateTimeString=e.dateTimeString,s.dateTimeObject=e.dateTimeObject},targetduration:function(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+e.duration}):(this.manifest.targetDuration=e.duration,R.call(this,this.manifest))},start:function(){e.attributes&&!isNaN(e.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:e.attributes["TIME-OFFSET"],precise:e.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out":function(){s.cueOut=e.data},"cue-out-cont":function(){s.cueOutCont=e.data},"cue-in":function(){s.cueIn=e.data},skip:function(){this.manifest.skip=D(e.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",e.attributes,["SKIPPED-SEGMENTS"])},part:function(){var t=this;l=!0;var n=this.manifest.segments.length,r=D(e.attributes);s.parts=s.parts||[],s.parts.push(r),r.byterange&&(r.byterange.hasOwnProperty("offset")||(r.byterange.offset=p),p=r.byterange.offset+r.byterange.length);var i=s.parts.length-1;this.warnOnMissingAttributes_("#EXT-X-PART #"+i+" for segment #"+n,e.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((function(e,n){e.hasOwnProperty("lastPart")||t.trigger("warn",{message:"#EXT-X-RENDITION-REPORT #"+n+" lacks required attribute(s): LAST-PART"})}))},"server-control":function(){var t=this.manifest.serverControl=D(e.attributes);t.hasOwnProperty("canBlockReload")||(t.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),R.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint":function(){var t=this.manifest.segments.length,n=D(e.attributes),r=n.type&&"PART"===n.type;s.preloadHints=s.preloadHints||[],s.preloadHints.push(n),n.byterange&&(n.byterange.hasOwnProperty("offset")||(n.byterange.offset=r?p:0,r&&(p=n.byterange.offset+n.byterange.length)));var i=s.preloadHints.length-1;if(this.warnOnMissingAttributes_("#EXT-X-PRELOAD-HINT #"+i+" for segment #"+t,e.attributes,["TYPE","URI"]),n.type)for(var a=0;a<s.preloadHints.length-1;a++){var o=s.preloadHints[a];o.type&&o.type===n.type&&this.trigger("warn",{message:"#EXT-X-PRELOAD-HINT #"+i+" for segment #"+t+" has the same TYPE "+n.type+" as preload hint #"+a})}},"rendition-report":function(){var t=D(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);var n=this.manifest.renditionReports.length-1,r=["LAST-MSN","URI"];l&&r.push("LAST-PART"),this.warnOnMissingAttributes_("#EXT-X-RENDITION-REPORT #"+n,e.attributes,r)},"part-inf":function(){this.manifest.partInf=D(e.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",e.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),R.call(this,this.manifest)}}[e.tagType]||c).call(i)},uri:function(){s.uri=e.uri,a.push(s),this.manifest.targetDuration&&!("duration"in s)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),s.duration=this.manifest.targetDuration),r&&(s.key=r),s.timeline=h,n&&(s.map=n),p=0,s={}},comment:function(){},custom:function(){e.segment?(s.custom=s.custom||{},s.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(i)})),t}(0,l.Z)(t,e);var n=t.prototype;return n.warnOnMissingAttributes_=function(e,t,n){var r=[];n.forEach((function(e){t.hasOwnProperty(e)||r.push(e)})),r.length&&this.trigger("warn",{message:e+" lacks required attribute(s): "+r.join(", ")})},n.push=function(e){this.lineStream.push(e)},n.end=function(){this.lineStream.push("\n"),this.trigger("end")},n.addParser=function(e){this.parseStream.addParser(e)},n.addTagMapper=function(e){this.parseStream.addTagMapper(e)},t}(w),N={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},U=["video","audio","text"],F=["Video","Audio","Text"],B=function(e){return e?e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e,t,n){return"avc1."+("00"+Number(t).toString(16)).slice(-2)+"00"+("00"+Number(n).toString(16)).slice(-2)})):e},j=function(e){void 0===e&&(e="");var t=e.split(","),n=[];return t.forEach((function(e){var t;e=e.trim(),U.forEach((function(r){var i=N[r].exec(e.toLowerCase());if(i&&!(i.length<=1)){t=r;var a=e.substring(0,i[1].length),s=e.replace(a,"");n.push({type:a,details:s,mediaType:r})}})),t||n.push({type:e,details:"",mediaType:"unknown"})})),n},H=function(e){return void 0===e&&(e=""),N.audio.test(e.trim().toLowerCase())},V=function(e){if(e&&"string"==typeof e){var t,n=e.toLowerCase().split(",").map((function(e){return B(e.trim())})),r="video";1===n.length&&H(n[0])?r="audio":1===n.length&&(void 0===(t=n[0])&&(t=""),N.text.test(t.trim().toLowerCase()))&&(r="application");var i="mp4";return n.every((function(e){return N.mp4.test(e)}))?i="mp4":n.every((function(e){return N.webm.test(e)}))?i="webm":n.every((function(e){return N.ogg.test(e)}))&&(i="ogg"),r+"/"+i+';codecs="'+e+'"'}},q=function(e){return void 0===e&&(e=""),i().MediaSource&&i().MediaSource.isTypeSupported&&i().MediaSource.isTypeSupported(V(e))||!1},W=function(e){return void 0===e&&(e=""),e.toLowerCase().split(",").every((function(e){e=e.trim();for(var t=0;t<F.length;t++)if(N["muxer"+F[t]].test(e))return!0;return!1}))},z="mp4a.40.2",G=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,X=/^application\/dash\+xml/i,$=function(e){return G.test(e)?"hls":X.test(e)?"dash":"application/vnd.videojs.vhs+json"===e?"vhs-json":null},K=n(73668),Z=function(e){return!!e&&"object"==typeof e},Y=function e(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.reduce((function(t,n){return"object"!=typeof n||Object.keys(n).forEach((function(r){Array.isArray(t[r])&&Array.isArray(n[r])?t[r]=t[r].concat(n[r]):Z(t[r])&&Z(n[r])?t[r]=e(t[r],n[r]):t[r]=n[r]})),t}),{})},Q=function(e){return e.reduce((function(e,t){return e.concat(t)}),[])},J=function(e){if(!e.length)return[];for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t},ee=function(e){var t=e.baseUrl,n=void 0===t?"":t,r=e.source,i=void 0===r?"":r,a=e.range,s=void 0===a?"":a,o=e.indexRange,u=void 0===o?"":o,l={uri:i,resolvedUri:S(n||"",i)};if(s||u){var c=(s||u).split("-"),d=parseInt(c[0],10),h=parseInt(c[1],10);l.byterange={length:h-d+1,offset:d}}return l},te=function(e){return e&&"number"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e},ne={static:function(e){var t=e.duration,n=e.timescale,r=void 0===n?1:n,i=e.sourceDuration,a=te(e.endNumber);return{start:0,end:"number"==typeof a?a:Math.ceil(i/(t/r))}},dynamic:function(e){var t=e.NOW,n=e.clientOffset,r=e.availabilityStartTime,i=e.timescale,a=void 0===i?1:i,s=e.duration,o=e.start,u=void 0===o?0:o,l=e.minimumUpdatePeriod,c=void 0===l?0:l,d=e.timeShiftBufferDepth,h=void 0===d?1/0:d,f=te(e.endNumber),p=(t+n)/1e3,m=r+u,g=p+c-m,v=Math.ceil(g*a/s),y=Math.floor((p-m-h)*a/s),_=Math.floor((p-m)*a/s);return{start:Math.max(0,y),end:"number"==typeof f?f:Math.min(v,_)}}},re=function(e){var t=e.type,n=void 0===t?"static":t,r=e.duration,i=e.timescale,a=void 0===i?1:i,s=e.sourceDuration,o=ne[n](e),u=function(e,t){for(var n=[],r=e;r<t;r++)n.push(r);return n}(o.start,o.end).map(function(e){return function(t,n){var r=e.duration,i=e.timescale,a=void 0===i?1:i,s=e.periodIndex,o=e.startNumber;return{number:(void 0===o?1:o)+t,duration:r/a,timeline:s,time:n*r}}}(e));if("static"===n){var l=u.length-1;u[l].duration=s-r/a*l}return u},ie=function(e){var t=e.baseUrl,n=e.initialization,r=void 0===n?{}:n,i=e.sourceDuration,a=e.indexRange,s=void 0===a?"":a,o=e.duration;if(!t)throw new Error("NO_BASE_URL");var u=ee({baseUrl:t,source:r.sourceURL,range:r.range}),l=ee({baseUrl:t,source:t,indexRange:s});if(l.map=u,o){var c=re(e);c.length&&(l.duration=c[0].duration,l.timeline=c[0].timeline)}else i&&(l.duration=i,l.timeline=0);return l.number=0,[l]},ae=function(e,t,n){for(var r=e.sidx.map?e.sidx.map:null,i=e.sidx.duration,a=e.timeline||0,s=e.sidx.byterange,o=s.offset+s.length,u=t.timescale,l=t.references.filter((function(e){return 1!==e.referenceType})),c=[],d=o+t.firstOffset,h=0;h<l.length;h++){var f=t.references[h],p=f.referencedSize,m=f.subsegmentDuration,g=ie({baseUrl:n,timescale:u,timeline:a,periodIndex:a,duration:m,sourceDuration:i,indexRange:d+"-"+(d+p-1)})[0];r&&(g.map=r),c.push(g),d+=p}return e.segments=c,e},se=function(e){return e&&e.uri+"-"+(n=(t=e.byterange).offset+t.length-1,t.offset+"-"+n);var t,n},oe=function(e){var t;return(t=e.reduce((function(e,t){var n,r=t.attributes.id+(t.attributes.lang||"");return e[r]?(t.segments[0]&&(t.segments[0].discontinuity=!0),(n=e[r].segments).push.apply(n,t.segments),t.attributes.contentProtection&&(e[r].attributes.contentProtection=t.attributes.contentProtection)):e[r]=t,e}),{}),Object.keys(t).map((function(e){return t[e]}))).map((function(e){var t;return e.discontinuityStarts=(t=e.segments,"discontinuity",t.reduce((function(e,t,n){return t.discontinuity&&e.push(n),e}),[])),e}))},ue=function(e,t){var n=se(e.sidx),r=n&&t[n]&&t[n].sidx;return r&&ae(e,r,e.sidx.resolvedUri),e},le=function(e,t){if(void 0===t&&(t={}),!Object.keys(t).length)return e;for(var n in e)e[n]=ue(e[n],t);return e},ce=function(e){var t,n=e.attributes,r=e.segments,i=e.sidx,a={attributes:(t={NAME:n.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:n.width,height:n.height},CODECS:n.codecs,BANDWIDTH:n.bandwidth},t["PROGRAM-ID"]=1,t),uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:"",targetDuration:n.duration,segments:r,mediaSequence:r.length?r[0].number:1};return n.contentProtection&&(a.contentProtection=n.contentProtection),i&&(a.sidx=i),a},de=function(e){var t=e.attributes;return"video/mp4"===t.mimeType||"video/webm"===t.mimeType||"video"===t.contentType},he=function(e){var t=e.attributes;return"audio/mp4"===t.mimeType||"audio/webm"===t.mimeType||"audio"===t.contentType},fe=function(e){var t=e.attributes;return"text/vtt"===t.mimeType||"text"===t.contentType},pe=function(e,t,n){var r=e.NOW,i=e.clientOffset,a=e.availabilityStartTime,s=e.timescale,o=void 0===s?1:s,u=e.start,l=void 0===u?0:u,c=e.minimumUpdatePeriod,d=(r+i)/1e3+(void 0===c?0:c)-(a+l);return Math.ceil((d*o-t)/n)},me=function(e,t){for(var n=e.type,r=void 0===n?"static":n,i=e.minimumUpdatePeriod,a=void 0===i?0:i,s=e.media,o=void 0===s?"":s,u=e.sourceDuration,l=e.timescale,c=void 0===l?1:l,d=e.startNumber,h=void 0===d?1:d,f=e.periodIndex,p=[],m=-1,g=0;g<t.length;g++){var v=t[g],y=v.d,_=v.r||0,b=v.t||0;m<0&&(m=b),b&&b>m&&(m=b);var T=void 0;if(_<0){var S=g+1;T=S===t.length?"dynamic"===r&&a>0&&o.indexOf("$Number$")>0?pe(e,m,y):(u*c-m)/y:(t[S].t-m)/y}else T=_+1;for(var w=h+p.length+T,k=h+p.length;k<w;)p.push({number:k,duration:y/c,time:m,timeline:f}),m+=y,k++}return p},ge=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,ve=function(e,t){return e.replace(ge,function(e){return function(t,n,r,i){if("$$"===t)return"$";if(void 0===e[n])return t;var a=""+e[n];return"RepresentationID"===n?a:(i=r?parseInt(i,10):1,a.length>=i?a:""+new Array(i-a.length+1).join("0")+a)}}(t))},ye=function(e,t){var n={RepresentationID:e.id,Bandwidth:e.bandwidth||0},r=e.initialization,i=void 0===r?{sourceURL:"",range:""}:r,a=ee({baseUrl:e.baseUrl,source:ve(i.sourceURL,n),range:i.range}),s=function(e,t){return e.duration||t?e.duration?re(e):me(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodIndex}]}(e,t);return s.map((function(t){n.Number=t.number,n.Time=t.time;var r=ve(e.media||"",n),i={uri:r,timeline:t.timeline,duration:t.duration,resolvedUri:S(e.baseUrl||"",r),map:a,number:t.number};return e.presentationTimeOffset&&(i.presentationTimeOffset=e.presentationTimeOffset),i}))},_e=function(e,t){var n=e.duration,r=e.segmentUrls,i=void 0===r?[]:r;if(!n&&!t||n&&t)throw new Error("SEGMENT_TIME_UNSPECIFIED");var a,s=i.map((function(t){return function(e,t){var n=e.baseUrl,r=e.initialization,i=void 0===r?{}:r,a=ee({baseUrl:n,source:i.sourceURL,range:i.range}),s=ee({baseUrl:n,source:t.media,range:t.mediaRange});return s.map=a,s}(e,t)}));return n&&(a=re(e)),t&&(a=me(e,t)),a.map((function(e,t){if(s[t]){var n=s[t];return n.timeline=e.timeline,n.duration=e.duration,n.number=e.number,n}})).filter((function(e){return e}))},be=function(e){var t,n,r=e.attributes,i=e.segmentInfo;i.template?(n=ye,t=Y(r,i.template),i.template.presentationTimeOffset&&(t.presentationTimeOffset=i.template.presentationTimeOffset/i.template.timescale)):i.base?(n=ie,t=Y(r,i.base)):i.list&&(n=_e,t=Y(r,i.list));var a={attributes:r};if(!n)return a;var s=n(t,i.timeline);if(t.duration){var o=t,u=o.duration,l=o.timescale,c=void 0===l?1:l;t.duration=u/c}else s.length?t.duration=s.reduce((function(e,t){return Math.max(e,Math.ceil(t.duration))}),0):t.duration=0;return a.attributes=t,a.segments=s,i.base&&t.indexRange&&(a.sidx=s[0],a.segments=[]),a},Te=function(e,t){return J(e.childNodes).filter((function(e){return e.tagName===t}))},Se=function(e){return e.textContent.trim()},we=function(e){var t=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(e);if(!t)return 0;var n=t.slice(1),r=n[0],i=n[1],a=n[2],s=n[3],o=n[4],u=n[5];return 31536e3*parseFloat(r||0)+2592e3*parseFloat(i||0)+86400*parseFloat(a||0)+3600*parseFloat(s||0)+60*parseFloat(o||0)+parseFloat(u||0)},ke={mediaPresentationDuration:function(e){return we(e)},availabilityStartTime:function(e){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(t=e)&&(t+="Z"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:function(e){return we(e)},suggestedPresentationDelay:function(e){return we(e)},type:function(e){return e},timeShiftBufferDepth:function(e){return we(e)},start:function(e){return we(e)},width:function(e){return parseInt(e,10)},height:function(e){return parseInt(e,10)},bandwidth:function(e){return parseInt(e,10)},startNumber:function(e){return parseInt(e,10)},timescale:function(e){return parseInt(e,10)},presentationTimeOffset:function(e){return parseInt(e,10)},duration:function(e){var t=parseInt(e,10);return isNaN(t)?we(e):t},d:function(e){return parseInt(e,10)},t:function(e){return parseInt(e,10)},r:function(e){return parseInt(e,10)},DEFAULT:function(e){return e}},Ee=function(e){return e&&e.attributes?J(e.attributes).reduce((function(e,t){var n=ke[t.name]||ke.DEFAULT;return e[t.name]=n(t.value),e}),{}):{}},Ce={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},xe=function(e,t){return t.length?Q(e.map((function(e){return t.map((function(t){return S(e,Se(t))}))}))):e},Ie=function(e){var t=Te(e,"SegmentTemplate")[0],n=Te(e,"SegmentList")[0],r=n&&Te(n,"SegmentURL").map((function(e){return Y({tag:"SegmentURL"},Ee(e))})),i=Te(e,"SegmentBase")[0],a=n||t,s=a&&Te(a,"SegmentTimeline")[0],o=n||i||t,u=o&&Te(o,"Initialization")[0],l=t&&Ee(t);l&&u?l.initialization=u&&Ee(u):l&&l.initialization&&(l.initialization={sourceURL:l.initialization});var c={template:l,timeline:s&&Te(s,"S").map((function(e){return Ee(e)})),list:n&&Y(Ee(n),{segmentUrls:r,initialization:Ee(u)}),base:i&&Y(Ee(i),{initialization:Ee(u)})};return Object.keys(c).forEach((function(e){c[e]||delete c[e]})),c},Ae=function(e,t){return function(n,r){var a=xe(t,Te(n,"BaseURL")),s=Ee(n),o=parseInt(s.id,10),u=i().isNaN(o)?r:o,l=Y(e,{periodIndex:u}),c=Te(n,"AdaptationSet"),d=Ie(n);return Q(c.map(function(e,t,n){return function(r){var i=Ee(r),a=xe(t,Te(r,"BaseURL")),s=Te(r,"Role")[0],o={role:Ee(s)},u=Y(e,i,o),l=Te(r,"Label")[0];if(l&&l.childNodes.length){var c=l.childNodes[0].nodeValue.trim();u=Y(u,{label:c})}var d=Te(r,"ContentProtection").reduce((function(e,t){var n=Ee(t),r=Ce[n.schemeIdUri];if(r){e[r]={attributes:n};var i=Te(t,"cenc:pssh")[0];if(i){var a=Se(i),s=a&&k(a);e[r].pssh=s}}return e}),{});Object.keys(d).length&&(u=Y(u,{contentProtection:d}));var h=Ie(r),f=Te(r,"Representation"),p=Y(n,h);return Q(f.map(function(e,t,n){return function(r){var i=Te(r,"BaseURL"),a=xe(t,i),s=Y(e,Ee(r)),o=Ie(r);return a.map((function(e){return{segmentInfo:Y(n,o),attributes:Y(s,{baseUrl:e})}}))}}(u,a,p)))}}(l,a,d)))}},Oe=function(e){if(""===e)throw new Error("DASH_EMPTY_MANIFEST");var t,n,r=new K.a;try{n=(t=r.parseFromString(e,"application/xml"))&&"MPD"===t.documentElement.tagName?t.documentElement:null}catch(e){}if(!n||n&&n.getElementsByTagName("parsererror").length>0)throw new Error("DASH_INVALID_XML");return n},Pe=function(e,t){void 0===t&&(t={});var n=function(e,t){void 0===t&&(t={});var n=t,r=n.manifestUri,i=void 0===r?"":r,a=n.NOW,s=void 0===a?Date.now():a,o=n.clientOffset,u=void 0===o?0:o,l=Te(e,"Period");if(!l.length)throw new Error("INVALID_NUMBER_OF_PERIOD");var c=Te(e,"Location"),d=Ee(e),h=xe([i],Te(e,"BaseURL"));return d.sourceDuration=d.mediaPresentationDuration||0,d.NOW=s,d.clientOffset=u,c.length&&(d.locations=c.map(Se)),{locations:d.locations,representationInfo:Q(l.map(Ae(d,h)))}}(Oe(e),t);return function(e,t,n){var r;if(void 0===n&&(n={}),!e.length)return{};var i=e[0].attributes,a=i.sourceDuration,s=i.type,o=void 0===s?"static":s,u=i.suggestedPresentationDelay,l=i.minimumUpdatePeriod,c=oe(e.filter(de)).map(ce),d=oe(e.filter(he)),h=e.filter(fe),f={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(r={AUDIO:{},VIDEO:{}},r["CLOSED-CAPTIONS"]={},r.SUBTITLES={},r),uri:"",duration:a,playlists:le(c,n)};l>=0&&(f.minimumUpdatePeriod=1e3*l),t&&(f.locations=t),"dynamic"===o&&(f.suggestedPresentationDelay=u);var p=0===f.playlists.length;return d.length&&(f.mediaGroups.AUDIO.audio=function(e,t,n){var r;void 0===t&&(t={}),void 0===n&&(n=!1);var i=e.reduce((function(e,i){var a=i.attributes.role&&i.attributes.role.value||"",s=i.attributes.lang||"",o=i.attributes.label||"main";if(s&&!i.attributes.label){var u=a?" ("+a+")":"";o=""+i.attributes.lang+u}e[o]||(e[o]={language:s,autoselect:!0,default:"main"===a,playlists:[],uri:""});var l=ue(function(e,t){var n,r=e.attributes,i=e.segments,a=e.sidx,s={attributes:(n={NAME:r.id,BANDWIDTH:r.bandwidth,CODECS:r.codecs},n["PROGRAM-ID"]=1,n),uri:"",endList:"static"===(r.type||"static"),timeline:r.periodIndex,resolvedUri:"",targetDuration:r.duration,segments:i,mediaSequence:i.length?i[0].number:1};return r.contentProtection&&(s.contentProtection=r.contentProtection),a&&(s.sidx=a),t&&(s.attributes.AUDIO="audio",s.attributes.SUBTITLES="subs"),s}(i,n),t);return e[o].playlists.push(l),void 0===r&&"main"===a&&((r=i).default=!0),e}),{});return r||(i[Object.keys(i)[0]].default=!0),i}(d,n,p)),h.length&&(f.mediaGroups.SUBTITLES.subs=function(e,t){return void 0===t&&(t={}),e.reduce((function(e,n){var r=n.attributes.lang||"text";return e[r]||(e[r]={language:r,default:!1,autoselect:!1,playlists:[],uri:""}),e[r].playlists.push(ue(function(e){var t,n=e.attributes,r=e.segments;void 0===r&&(r=[{uri:n.baseUrl,timeline:n.periodIndex,resolvedUri:n.baseUrl||"",duration:n.sourceDuration,number:0}],n.duration=n.sourceDuration);var i=((t={NAME:n.id,BANDWIDTH:n.bandwidth})["PROGRAM-ID"]=1,t);return n.codecs&&(i.CODECS=n.codecs),{attributes:i,uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:n.baseUrl||"",targetDuration:n.duration,segments:r,mediaSequence:r.length?r[0].number:1}}(n),t)),e}),{})}(h,n)),f}(n.representationInfo.map(be),n.locations,t.sidxMapping)},Le=n(57258),De=n.n(Le),Re=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||function(e){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer}(e)||e instanceof ArrayBuffer||(e="number"!=typeof e||"number"==typeof e&&e!=e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Me=i().BigInt||Number,Ne=[Me("0x1"),Me("0x100"),Me("0x10000"),Me("0x1000000"),Me("0x100000000"),Me("0x10000000000"),Me("0x1000000000000"),Me("0x100000000000000"),Me("0x10000000000000000")],Ue=(E=new Uint16Array([65484]),255===(C=new Uint8Array(E.buffer,E.byteOffset,E.byteLength))[0]||C[0],function(e,t){var n=void 0===t?{}:t,r=n.signed,i=void 0!==r&&r,a=n.le,s=void 0!==a&&a;e=Re(e);var o=s?"reduce":"reduceRight",u=(e[o]?e[o]:Array.prototype[o]).call(e,(function(t,n,r){var i=s?r:Math.abs(r+1-e.length);return t+Me(n)*Ne[i]}),Me(0));if(i){var l=Ne[e.length]/Me(2)-Me(1);(u=Me(u))>l&&(u-=l,u-=l,u-=Me(2))}return Number(u)}),Fe=function(e,t){if("string"!=typeof e&&e&&"function"==typeof e.toString&&(e=e.toString()),"string"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var n=new Uint8Array(e.length),r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n},Be=function(e,t,n){var r=void 0===n?{}:n,i=r.offset,a=void 0===i?0:i,s=r.mask,o=void 0===s?[]:s;e=Re(e);var u=(t=Re(t)).every?t.every:Array.prototype.every;return t.length&&e.length-a>=t.length&&u.call(t,(function(t,n){return t===(o[n]?o[n]&e[a+n]:e[a+n])}))},je=Re([73,68,51]),He=function e(t,n){return void 0===n&&(n=0),(t=Re(t)).length-n<10||!Be(t,je,{offset:n})?n:(n+=function(e,t){void 0===t&&(t=0);var n=(e=Re(e))[t+5],r=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&n)>>4?r+20:r+10}(t,n),e(t,n))},Ve=(new Uint8Array([79,112,117,115,72,101,97,100]),function(e){return"string"==typeof e?Fe(e):e}),qe=function(e){e=Re(e);for(var t=[],n=0;e.length>n;){var r=e[n],i=0,a=0,s=e[++a];for(a++;128&s;)i=(127&s)<<7,s=e[a],a++;i+=127&s;for(var o=0;o<x.length;o++){var u=x[o],l=u.id,c=u.parser;if(r===l){t.push(c(e.subarray(a,a+i)));break}}n+=i+a}return t};x=[{id:3,parser:function(e){var t={tag:3,id:e[0]<<8|e[1],flags:e[2],size:3,dependsOnEsId:0,ocrEsId:0,descriptors:[],url:""};if(128&t.flags&&(t.dependsOnEsId=e[t.size]<<8|e[t.size+1],t.size+=2),64&t.flags){var n=e[t.size];t.url=function(e){if(!e)return"";e=Array.prototype.slice.call(e);var t=String.fromCharCode.apply(null,Re(e));try{return decodeURIComponent(escape(t))}catch(e){}return t}(e.subarray(t.size+1,t.size+1+n)),t.size+=n}return 32&t.flags&&(t.ocrEsId=e[t.size]<<8|e[t.size+1],t.size+=2),t.descriptors=qe(e.subarray(t.size))||[],t}},{id:4,parser:function(e){return{tag:4,oti:e[0],streamType:e[1],bufferSize:e[2]<<16|e[3]<<8|e[4],maxBitrate:e[5]<<24|e[6]<<16|e[7]<<8|e[8],avgBitrate:e[9]<<24|e[10]<<16|e[11]<<8|e[12],descriptors:qe(e.subarray(13))}}},{id:5,parser:function(e){return{tag:5,bytes:e}}},{id:6,parser:function(e){return{tag:6,bytes:e}}}];var We=function e(t,n,r){void 0===r&&(r=!1),n=function(e){return Array.isArray(e)?e.map((function(e){return Ve(e)})):[Ve(e)]}(n),t=Re(t);var i=[];if(!n.length)return i;for(var a=0;a<t.length;){var s=(t[a]<<24|t[a+1]<<16|t[a+2]<<8|t[a+3])>>>0,o=t.subarray(a+4,a+8);if(0===s)break;var u=a+s;if(u>t.length){if(r)break;u=t.length}var l=t.subarray(a+8,u);Be(o,n[0])&&(1===n.length?i.push(l):i.push.apply(i,e(l,n.slice(1),r))),a=u}return i},ze={EBML:Re([26,69,223,163]),DocType:Re([66,130]),Segment:Re([24,83,128,103]),SegmentInfo:Re([21,73,169,102]),Tracks:Re([22,84,174,107]),Track:Re([174]),TrackNumber:Re([215]),DefaultDuration:Re([35,227,131]),TrackEntry:Re([174]),TrackType:Re([131]),FlagDefault:Re([136]),CodecID:Re([134]),CodecPrivate:Re([99,162]),VideoTrack:Re([224]),AudioTrack:Re([225]),Cluster:Re([31,67,182,117]),Timestamp:Re([231]),TimestampScale:Re([42,215,177]),BlockGroup:Re([160]),BlockDuration:Re([155]),Block:Re([161]),SimpleBlock:Re([163])},Ge=[128,64,32,16,8,4,2,1],Xe=function(e,t,n,r){void 0===n&&(n=!0),void 0===r&&(r=!1);var i=function(e){for(var t=1,n=0;n<Ge.length&&!(e&Ge[n]);n++)t++;return t}(e[t]),a=e.subarray(t,t+i);return n&&((a=Array.prototype.slice.call(e,t,t+i))[0]^=Ge[i-1]),{length:i,value:Ue(a,{signed:r}),bytes:a}},$e=function e(t){return"string"==typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):"number"==typeof t?function(e,t){var n=(void 0===t?{}:t).le,r=void 0!==n&&n;("bigint"!=typeof e&&"number"!=typeof e||"number"==typeof e&&e!=e)&&(e=0);for(var i,a=(i=e=Me(e),Math.ceil(function(e){return e.toString(2).length}(i)/8)),s=new Uint8Array(new ArrayBuffer(a)),o=0;o<a;o++){var u=r?o:Math.abs(o+1-s.length);s[u]=Number(e/Ne[o]&Me(255)),e<0&&(s[u]=Math.abs(~s[u]),s[u]-=0===o?1:2)}return s}(t):t},Ke=function e(t,n,r){if(r>=n.length)return n.length;var i=Xe(n,r,!1);if(Be(t.bytes,i.bytes))return r;var a=Xe(n,r+i.length);return e(t,n,r+a.length+a.value+i.length)},Ze=function e(t,n){n=function(e){return Array.isArray(e)?e.map((function(e){return $e(e)})):[$e(e)]}(n),t=Re(t);var r=[];if(!n.length)return r;for(var i=0;i<t.length;){var a=Xe(t,i,!1),s=Xe(t,i+a.length),o=i+a.length+s.length;127===s.value&&(s.value=Ke(a,t,o),s.value!==t.length&&(s.value-=o));var u=o+s.value>t.length?t.length:o+s.value,l=t.subarray(o,u);Be(n[0],a.bytes)&&(1===n.length?r.push(l):r=r.concat(e(l,n.slice(1)))),i+=a.length+s.length+l.length}return r},Ye=Re([0,0,0,1]),Qe=Re([0,0,1]),Je=Re([0,0,3]),et=function(e){for(var t=[],n=1;n<e.length-2;)Be(e.subarray(n,n+3),Je)&&(t.push(n+2),n++),n++;if(0===t.length)return e;var r=e.length-t.length,i=new Uint8Array(r),a=0;for(n=0;n<r;a++,n++)a===t[0]&&(a++,t.shift()),i[n]=e[a];return i},tt=function(e,t,n,r){void 0===r&&(r=1/0),e=Re(e),n=[].concat(n);for(var i,a=0,s=0;a<e.length&&(s<r||i);){var o=void 0;if(Be(e.subarray(a),Ye)?o=4:Be(e.subarray(a),Qe)&&(o=3),o){if(s++,i)return et(e.subarray(i,a));var u=void 0;"h264"===t?u=31&e[a+o]:"h265"===t&&(u=e[a+o]>>1&63),-1!==n.indexOf(u)&&(i=a+o),a+=o+("h264"===t?1:2)}else a++}return e.subarray(0,0)},nt={webm:Re([119,101,98,109]),matroska:Re([109,97,116,114,111,115,107,97]),flac:Re([102,76,97,67]),ogg:Re([79,103,103,83]),ac3:Re([11,119]),riff:Re([82,73,70,70]),avi:Re([65,86,73]),wav:Re([87,65,86,69]),"3gp":Re([102,116,121,112,51,103]),mp4:Re([102,116,121,112]),fmp4:Re([115,116,121,112]),mov:Re([102,116,121,112,113,116]),moov:Re([109,111,111,118]),moof:Re([109,111,111,102])},rt={aac:function(e){var t=He(e);return Be(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=He(e);return Be(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=Ze(e,[ze.EBML,ze.DocType])[0];return Be(t,nt.webm)},mkv:function(e){var t=Ze(e,[ze.EBML,ze.DocType])[0];return Be(t,nt.matroska)},mp4:function(e){return!rt["3gp"](e)&&!rt.mov(e)&&(!(!Be(e,nt.mp4,{offset:4})&&!Be(e,nt.fmp4,{offset:4}))||!(!Be(e,nt.moof,{offset:4})&&!Be(e,nt.moov,{offset:4}))||void 0)},mov:function(e){return Be(e,nt.mov,{offset:4})},"3gp":function(e){return Be(e,nt["3gp"],{offset:4})},ac3:function(e){var t=He(e);return Be(e,nt.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=He(e);return Be(e,nt.flac,{offset:t})},ogg:function(e){return Be(e,nt.ogg)},avi:function(e){return Be(e,nt.riff)&&Be(e,nt.avi,{offset:8})},wav:function(e){return Be(e,nt.riff)&&Be(e,nt.wav,{offset:8})},h264:function(e){return function(e,t,n){return tt(e,"h264",7,3)}(e).length},h265:function(e){return function(e,t,n){return tt(e,"h265",[32,33],3)}(e).length}},it=Object.keys(rt).filter((function(e){return"ts"!==e&&"h264"!==e&&"h265"!==e})).concat(["ts","h264","h265"]);it.forEach((function(e){var t=rt[e];rt[e]=function(e){return t(Re(e))}}));for(var at,st=rt,ot=function(e){e=Re(e);for(var t=0;t<it.length;t++){var n=it[t];if(st[n](e))return n}return""},ut=n(28195),lt="7.12.4",ct={prefixed:!0},dt=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]],ht=dt[0],ft=0;ft<dt.length;ft++)if(dt[ft][1]in s()){at=dt[ft];break}if(at){for(var pt=0;pt<at.length;pt++)ct[ht[pt]]=at[pt];ct.prefixed=at[0]!==ht[0]}var mt=[],gt=function e(t){var n,r="info",a=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n("log",r,t)};return n=function(e,t){return function(n,r,a){var s=t.levels[r],o=new RegExp("^("+s+")$");if("log"!==n&&a.unshift(n.toUpperCase()+":"),a.unshift(e+":"),mt){mt.push([].concat(a));var u=mt.length-1e3;mt.splice(0,u>0?u:0)}if(i().console){var l=i().console[n];l||"debug"!==n||(l=i().console.info||i().console.log),l&&s&&o.test(n)&&l[Array.isArray(a)?"apply":"call"](i().console,a)}}}(t,a),a.createLogger=function(n){return e(t+": "+n)},a.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:r},a.level=function(e){if("string"==typeof e){if(!a.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');r=e}return r},(a.history=function(){return mt?[].concat(mt):[]}).filter=function(e){return(mt||[]).filter((function(t){return new RegExp(".*"+e+".*").test(t[0])}))},a.history.clear=function(){mt&&(mt.length=0)},a.history.disable=function(){null!==mt&&(mt.length=0,mt=null)},a.history.enable=function(){null===mt&&(mt=[])},a.error=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("error",r,t)},a.warn=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("warn",r,t)},a.debug=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return n("debug",r,t)},a}("VIDEOJS"),vt=gt.createLogger,yt=Object.prototype.toString,_t=function(e){return St(e)?Object.keys(e):[]};function bt(e,t){_t(e).forEach((function(n){return t(e[n],n)}))}function Tt(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Object.assign?o.Z.apply(void 0,[e].concat(n)):(n.forEach((function(t){t&&bt(t,(function(t,n){e[n]=t}))})),e)}function St(e){return!!e&&"object"==typeof e}function wt(e){return St(e)&&"[object Object]"===yt.call(e)&&e.constructor===Object}function kt(e,t){if(!e||!t)return"";if("function"==typeof i().getComputedStyle){var n;try{n=i().getComputedStyle(e)}catch(e){return""}return n?n.getPropertyValue(t)||n[t]:""}return""}var Et,Ct,xt,It=i().navigator&&i().navigator.userAgent||"",At=/AppleWebKit\/([\d.]+)/i.exec(It),Ot=At?parseFloat(At.pop()):null,Pt=/iPod/i.test(It),Lt=(Et=It.match(/OS (\d+)_/i))&&Et[1]?Et[1]:null,Dt=/Android/i.test(It),Rt=function(){var e=It.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),n=e[2]&&parseFloat(e[2]);return t&&n?parseFloat(e[1]+"."+e[2]):t||null}(),Mt=Dt&&Rt<5&&Ot<537,Nt=/Firefox/i.test(It),Ut=/Edg/i.test(It),Ft=!Ut&&(/Chrome/i.test(It)||/CriOS/i.test(It)),Bt=function(){var e=It.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),jt=(Ct=/MSIE\s(\d+)\.\d/.exec(It),!(xt=Ct&&parseFloat(Ct[1]))&&/Trident\/7.0/i.test(It)&&/rv:11.0/.test(It)&&(xt=11),xt),Ht=/Safari/i.test(It)&&!Ft&&!Dt&&!Ut,Vt=/Windows/i.test(It),qt=Boolean(Yt()&&("ontouchstart"in i()||i().navigator.maxTouchPoints||i().DocumentTouch&&i().document instanceof i().DocumentTouch)),Wt=/iPad/i.test(It)||Ht&&qt&&!/iPhone/i.test(It),zt=/iPhone/i.test(It)&&!Wt,Gt=zt||Wt||Pt,Xt=(Ht||Gt)&&!Ft,$t=Object.freeze({__proto__:null,IS_IPOD:Pt,IOS_VERSION:Lt,IS_ANDROID:Dt,ANDROID_VERSION:Rt,IS_NATIVE_ANDROID:Mt,IS_FIREFOX:Nt,IS_EDGE:Ut,IS_CHROME:Ft,CHROME_VERSION:Bt,IE_VERSION:jt,IS_SAFARI:Ht,IS_WINDOWS:Vt,TOUCH_ENABLED:qt,IS_IPAD:Wt,IS_IPHONE:zt,IS_IOS:Gt,IS_ANY_SAFARI:Xt});function Kt(e){return"string"==typeof e&&Boolean(e.trim())}function Zt(e){if(e.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function Yt(){return s()===i().document}function Qt(e){return St(e)&&1===e.nodeType}function Jt(){try{return i().parent!==i().self}catch(e){return!0}}function en(e){return function(t,n){if(!Kt(t))return s()[e](null);Kt(n)&&(n=s().querySelector(n));var r=Qt(n)?n:s();return r[e]&&r[e](t)}}function tn(e,t,n,r){void 0===e&&(e="div"),void 0===t&&(t={}),void 0===n&&(n={});var i=s().createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){var n=t[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(gt.warn("Setting attributes in the second argument of createEl()\nhas been deprecated. Use the third argument instead.\ncreateEl(type, properties, attributes). Attempting to set "+e+" to "+n+"."),i.setAttribute(e,n)):"textContent"===e?nn(i,n):i[e]===n&&"tabIndex"!==e||(i[e]=n)})),Object.getOwnPropertyNames(n).forEach((function(e){i.setAttribute(e,n[e])})),r&&Sn(i,r),i}function nn(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function rn(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function an(e,t){return Zt(t),e.classList?e.classList.contains(t):(n=t,new RegExp("(^|\\s)"+n+"($|\\s)")).test(e.className);var n}function sn(e,t){return e.classList?e.classList.add(t):an(e,t)||(e.className=(e.className+" "+t).trim()),e}function on(e,t){return e.classList?e.classList.remove(t):(Zt(t),e.className=e.className.split(/\s+/).filter((function(e){return e!==t})).join(" ")),e}function un(e,t,n){var r=an(e,t);if("function"==typeof n&&(n=n(e,t)),"boolean"!=typeof n&&(n=!r),n!==r)return n?sn(e,t):on(e,t),e}function ln(e,t){Object.getOwnPropertyNames(t).forEach((function(n){var r=t[n];null==r||!1===r?e.removeAttribute(n):e.setAttribute(n,!0===r?"":r)}))}function cn(e){var t={};if(e&&e.attributes&&e.attributes.length>0)for(var n=e.attributes,r=n.length-1;r>=0;r--){var i=n[r].name,a=n[r].value;"boolean"!=typeof e[i]&&-1===",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+i+",")||(a=null!==a),t[i]=a}return t}function dn(e,t){return e.getAttribute(t)}function hn(e,t,n){e.setAttribute(t,n)}function fn(e,t){e.removeAttribute(t)}function pn(){s().body.focus(),s().onselectstart=function(){return!1}}function mn(){s().onselectstart=function(){return!0}}function gn(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach((function(e){void 0!==t[e]&&(n[e]=t[e])})),n.height||(n.height=parseFloat(kt(e,"height"))),n.width||(n.width=parseFloat(kt(e,"width"))),n}}function vn(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};for(var t=e.offsetWidth,n=e.offsetHeight,r=0,i=0;e.offsetParent&&e!==s()[ct.fullscreenElement];)r+=e.offsetLeft,i+=e.offsetTop,e=e.offsetParent;return{left:r,top:i,width:t,height:n}}function yn(e,t){var n={x:0,y:0};if(Gt)for(var r=e;r&&"html"!==r.nodeName.toLowerCase();){var i=kt(r,"transform");if(/^matrix/.test(i)){var a=i.slice(7,-1).split(/,\s/).map(Number);n.x+=a[4],n.y+=a[5]}else if(/^matrix3d/.test(i)){var s=i.slice(9,-1).split(/,\s/).map(Number);n.x+=s[12],n.y+=s[13]}r=r.parentNode}var o={},u=vn(t.target),l=vn(e),c=l.width,d=l.height,h=t.offsetY-(l.top-u.top),f=t.offsetX-(l.left-u.left);return t.changedTouches&&(f=t.changedTouches[0].pageX-l.left,h=t.changedTouches[0].pageY+l.top,Gt&&(f-=n.x,h-=n.y)),o.y=1-Math.max(0,Math.min(1,h/d)),o.x=Math.max(0,Math.min(1,f/c)),o}function _n(e){return St(e)&&3===e.nodeType}function bn(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function Tn(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((function(e){return"function"==typeof e&&(e=e()),Qt(e)||_n(e)?e:"string"==typeof e&&/\S/.test(e)?s().createTextNode(e):void 0})).filter((function(e){return e}))}function Sn(e,t){return Tn(t).forEach((function(t){return e.appendChild(t)})),e}function wn(e,t){return Sn(bn(e),t)}function kn(e){return void 0===e.button&&void 0===e.buttons||0===e.button&&void 0===e.buttons||"mouseup"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons}var En,Cn=en("querySelector"),xn=en("querySelectorAll"),In=Object.freeze({__proto__:null,isReal:Yt,isEl:Qt,isInFrame:Jt,createEl:tn,textContent:nn,prependTo:rn,hasClass:an,addClass:sn,removeClass:on,toggleClass:un,setAttributes:ln,getAttributes:cn,getAttribute:dn,setAttribute:hn,removeAttribute:fn,blockTextSelection:pn,unblockTextSelection:mn,getBoundingClientRect:gn,findPosition:vn,getPointerPosition:yn,isTextNode:_n,emptyEl:bn,normalizeContent:Tn,appendContent:Sn,insertContent:wn,isSingleLeftClick:kn,$:Cn,$$:xn}),An=!1,On=function(){if(!1!==En.options.autoSetup){var e=Array.prototype.slice.call(s().getElementsByTagName("video")),t=Array.prototype.slice.call(s().getElementsByTagName("audio")),n=Array.prototype.slice.call(s().getElementsByTagName("video-js")),r=e.concat(t,n);if(r&&r.length>0)for(var i=0,a=r.length;i<a;i++){var o=r[i];if(!o||!o.getAttribute){Pn(1);break}void 0===o.player&&null!==o.getAttribute("data-setup")&&En(o)}else An||Pn(1)}};function Pn(e,t){Yt()&&(t&&(En=t),i().setTimeout(On,e))}function Ln(){An=!0,i().removeEventListener("load",Ln)}Yt()&&("complete"===s().readyState?Ln():i().addEventListener("load",Ln));var Dn,Rn=function(e){var t=s().createElement("style");return t.className=e,t},Mn=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t},Nn=3;function Un(){return Nn++}i().WeakMap||(Dn=function(){function e(){this.vdata="vdata"+Math.floor(i().performance&&i().performance.now()||Date.now()),this.data={}}var t=e.prototype;return t.set=function(e,t){var n=e[this.vdata]||Un();return e[this.vdata]||(e[this.vdata]=n),this.data[n]=t,this},t.get=function(e){var t=e[this.vdata];if(t)return this.data[t];gt("We have no data for this element",e)},t.has=function(e){return e[this.vdata]in this.data},t.delete=function(e){var t=e[this.vdata];t&&(delete this.data[t],delete e[this.vdata])},e}());var Fn,Bn=i().WeakMap?new WeakMap:new Dn;function jn(e,t){if(Bn.has(e)){var n=Bn.get(e);0===n.handlers[t].length&&(delete n.handlers[t],e.removeEventListener?e.removeEventListener(t,n.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&Bn.delete(e)}}function Hn(e,t,n,r){n.forEach((function(n){e(t,n,r)}))}function Vn(e){if(e.fixed_)return e;function t(){return!0}function n(){return!1}if(!e||!e.isPropagationStopped){var r=e||i().event;for(var a in e={},r)"layerX"!==a&&"layerY"!==a&&"keyLocation"!==a&&"webkitMovementX"!==a&&"webkitMovementY"!==a&&("returnValue"===a&&r.preventDefault||(e[a]=r[a]));if(e.target||(e.target=e.srcElement||s()),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){r.preventDefault&&r.preventDefault(),e.returnValue=!1,r.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),e.cancelBubble=!0,r.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=n,e.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=n,null!==e.clientX&&void 0!==e.clientX){var o=s().documentElement,u=s().body;e.pageX=e.clientX+(o&&o.scrollLeft||u&&u.scrollLeft||0)-(o&&o.clientLeft||u&&u.clientLeft||0),e.pageY=e.clientY+(o&&o.scrollTop||u&&u.scrollTop||0)-(o&&o.clientTop||u&&u.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}var qn=function(){if("boolean"!=typeof Fn){Fn=!1;try{var e=Object.defineProperty({},"passive",{get:function(){Fn=!0}});i().addEventListener("test",null,e),i().removeEventListener("test",null,e)}catch(e){}}return Fn},Wn=["touchstart","touchmove"];function zn(e,t,n){if(Array.isArray(t))return Hn(zn,e,t,n);Bn.has(e)||Bn.set(e,{});var r=Bn.get(e);if(r.handlers||(r.handlers={}),r.handlers[t]||(r.handlers[t]=[]),n.guid||(n.guid=Un()),r.handlers[t].push(n),r.dispatcher||(r.disabled=!1,r.dispatcher=function(t,n){if(!r.disabled){t=Vn(t);var i=r.handlers[t.type];if(i)for(var a=i.slice(0),s=0,o=a.length;s<o&&!t.isImmediatePropagationStopped();s++)try{a[s].call(e,t,n)}catch(e){gt.error(e)}}}),1===r.handlers[t].length)if(e.addEventListener){var i=!1;qn()&&Wn.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,r.dispatcher,i)}else e.attachEvent&&e.attachEvent("on"+t,r.dispatcher)}function Gn(e,t,n){if(Bn.has(e)){var r=Bn.get(e);if(r.handlers){if(Array.isArray(t))return Hn(Gn,e,t,n);var i=function(e,t){r.handlers[t]=[],jn(e,t)};if(void 0!==t){var a=r.handlers[t];if(a)if(n){if(n.guid)for(var s=0;s<a.length;s++)a[s].guid===n.guid&&a.splice(s--,1);jn(e,t)}else i(e,t)}else for(var o in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},o)&&i(e,o)}}}function Xn(e,t,n){var r=Bn.has(e)?Bn.get(e):{},i=e.parentNode||e.ownerDocument;if("string"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Vn(t),r.dispatcher&&r.dispatcher.call(e,t,n),i&&!t.isPropagationStopped()&&!0===t.bubbles)Xn.call(null,i,t,n);else if(!i&&!t.defaultPrevented&&t.target&&t.target[t.type]){Bn.has(t.target)||Bn.set(t.target,{});var a=Bn.get(t.target);t.target[t.type]&&(a.disabled=!0,"function"==typeof t.target[t.type]&&t.target[t.type](),a.disabled=!1)}return!t.defaultPrevented}function $n(e,t,n){if(Array.isArray(t))return Hn($n,e,t,n);var r=function r(){Gn(e,t,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||Un(),zn(e,t,r)}function Kn(e,t,n){var r=function r(){Gn(e,t,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||Un(),zn(e,t,r)}var Zn,Yn=Object.freeze({__proto__:null,fixEvent:Vn,on:zn,off:Gn,trigger:Xn,one:$n,any:Kn}),Qn=30,Jn=function(e,t,n){t.guid||(t.guid=Un());var r=t.bind(e);return r.guid=n?n+"_"+t.guid:t.guid,r},er=function(e,t){var n=i().performance.now();return function(){var r=i().performance.now();r-n>=t&&(e.apply(void 0,arguments),n=r)}},tr=function(){};tr.prototype.allowedEvents_={},tr.prototype.on=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},zn(this,e,t),this.addEventListener=n},tr.prototype.addEventListener=tr.prototype.on,tr.prototype.off=function(e,t){Gn(this,e,t)},tr.prototype.removeEventListener=tr.prototype.off,tr.prototype.one=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},$n(this,e,t),this.addEventListener=n},tr.prototype.any=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},Kn(this,e,t),this.addEventListener=n},tr.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=Vn(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),Xn(this,e)},tr.prototype.dispatchEvent=tr.prototype.trigger,tr.prototype.queueTrigger=function(e){var t=this;Zn||(Zn=new Map);var n=e.type||e,r=Zn.get(this);r||(r=new Map,Zn.set(this,r));var a=r.get(n);r.delete(n),i().clearTimeout(a);var s=i().setTimeout((function(){0===r.size&&(r=null,Zn.delete(t)),t.trigger(e)}),0);r.set(n,s)};var nr=function(e){return"function"==typeof e.name?e.name():"string"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e},rr=function(e){return e instanceof tr||!!e.eventBusEl_&&["on","one","off","trigger"].every((function(t){return"function"==typeof e[t]}))},ir=function(e){return"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},ar=function(e,t,n){if(!e||!e.nodeName&&!rr(e))throw new Error("Invalid target for "+nr(t)+"#"+n+"; must be a DOM node or evented object.")},sr=function(e,t,n){if(!ir(e))throw new Error("Invalid event type for "+nr(t)+"#"+n+"; must be a non-empty string or array.")},or=function(e,t,n){if("function"!=typeof e)throw new Error("Invalid listener for "+nr(t)+"#"+n+"; must be a function.")},ur=function(e,t,n){var r,i,a,s=t.length<3||t[0]===e||t[0]===e.eventBusEl_;return s?(r=e.eventBusEl_,t.length>=3&&t.shift(),i=t[0],a=t[1]):(r=t[0],i=t[1],a=t[2]),ar(r,e,n),sr(i,e,n),or(a,e,n),{isTargetingSelf:s,target:r,type:i,listener:a=Jn(e,a)}},lr=function(e,t,n,r){ar(e,e,t),e.nodeName?Yn[t](e,n,r):e[t](n,r)},cr={on:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=ur(this,n,"on"),a=i.isTargetingSelf,s=i.target,o=i.type,u=i.listener;if(lr(s,"on",o,u),!a){var l=function(){return e.off(s,o,u)};l.guid=u.guid;var c=function(){return e.off("dispose",l)};c.guid=u.guid,lr(this,"on","dispose",l),lr(s,"on","dispose",c)}},one:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=ur(this,n,"one"),a=i.isTargetingSelf,s=i.target,o=i.type,u=i.listener;if(a)lr(s,"one",o,u);else{var l=function t(){e.off(s,o,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];u.apply(null,r)};l.guid=u.guid,lr(s,"one",o,l)}},any:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=ur(this,n,"any"),a=i.isTargetingSelf,s=i.target,o=i.type,u=i.listener;if(a)lr(s,"any",o,u);else{var l=function t(){e.off(s,o,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];u.apply(null,r)};l.guid=u.guid,lr(s,"any",o,l)}},off:function(e,t,n){if(!e||ir(e))Gn(this.eventBusEl_,e,t);else{var r=e,i=t;ar(r,this,"off"),sr(i,this,"off"),or(n,this,"off"),n=Jn(this,n),this.off("dispose",n),r.nodeName?(Gn(r,i,n),Gn(r,"dispose",n)):rr(r)&&(r.off(i,n),r.off("dispose",n))}},trigger:function(e,t){ar(this.eventBusEl_,this,"trigger");var n=e&&"string"!=typeof e?e.type:e;if(!ir(n)){var r="Invalid event type for "+nr(this)+"#trigger; must be a non-empty string or object with a type key that has a non-empty value.";if(!e)throw new Error(r);(this.log||gt).error(r)}return Xn(this.eventBusEl_,e,t)}};function dr(e,t){void 0===t&&(t={});var n=t.eventBusKey;if(n){if(!e[n].nodeName)throw new Error('The eventBusKey "'+n+'" does not refer to an element.');e.eventBusEl_=e[n]}else e.eventBusEl_=tn("span",{className:"vjs-event-bus"});return Tt(e,cr),e.eventedCallbacks&&e.eventedCallbacks.forEach((function(e){e()})),e.on("dispose",(function(){e.off(),i().setTimeout((function(){e.eventBusEl_=null}),0)})),e}var hr={state:{},setState:function(e){var t,n=this;return"function"==typeof e&&(e=e()),bt(e,(function(e,r){n.state[r]!==e&&((t=t||{})[r]={from:n.state[r],to:e}),n.state[r]=e})),t&&rr(this)&&this.trigger({changes:t,type:"statechanged"}),t}};function fr(e,t){return Tt(e,hr),e.state=Tt({},e.state,t),"function"==typeof e.handleStateChanged&&rr(e)&&e.on("statechanged",e.handleStateChanged),e}var pr=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toLowerCase()}))},mr=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))};function gr(){for(var e={},t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){t&&bt(t,(function(t,n){wt(t)?(wt(e[n])||(e[n]={}),e[n]=gr(e[n],t)):e[n]=t}))})),e}var vr=function(){function e(){this.map_={}}var t=e.prototype;return t.has=function(e){return e in this.map_},t.delete=function(e){var t=this.has(e);return delete this.map_[e],t},t.set=function(e,t){return this.map_[e]=t,this},t.forEach=function(e,t){for(var n in this.map_)e.call(t,this.map_[n],n,this)},e}(),yr=i().Map?i().Map:vr,_r=function(){function e(){this.set_={}}var t=e.prototype;return t.has=function(e){return e in this.set_},t.delete=function(e){var t=this.has(e);return delete this.set_[e],t},t.add=function(e){return this.set_[e]=1,this},t.forEach=function(e,t){for(var n in this.set_)e.call(t,n,n,this)},e}(),br=i().Set?i().Set:_r,Tr=function(){function e(e,t,n){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=gr({},this.options_),t=this.options_=gr(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){var r=e&&e.id&&e.id()||"no_player";this.id_=r+"_component_"+Un()}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),!1!==t.evented&&(dr(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),fr(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new br,this.setIntervalIds_=new br,this.rafIds_=new br,this.namedRafs_=new yr,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(n),!1!==t.reportTouchActivity&&this.enableTouchActivity()}var t=e.prototype;return t.dispose=function(){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(var e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),Bn.has(this.el_)&&Bn.delete(this.el_),this.el_=null),this.player_=null}},t.isDisposed=function(){return Boolean(this.isDisposed_)},t.player=function(){return this.player_},t.options=function(e){return e?(this.options_=gr(this.options_,e),this.options_):this.options_},t.el=function(){return this.el_},t.createEl=function(e,t,n){return tn(e,t,n)},t.localize=function(e,t,n){void 0===n&&(n=e);var r=this.player_.language&&this.player_.language(),i=this.player_.languages&&this.player_.languages(),a=i&&i[r],s=r&&r.split("-")[0],o=i&&i[s],u=n;return a&&a[e]?u=a[e]:o&&o[e]&&(u=o[e]),t&&(u=u.replace(/\{(\d+)\}/g,(function(e,n){var r=t[n-1],i=r;return void 0===r&&(i=e),i}))),u},t.handleLanguagechange=function(){},t.contentEl=function(){return this.contentEl_||this.el_},t.id=function(){return this.id_},t.name=function(){return this.name_},t.children=function(){return this.children_},t.getChildById=function(e){return this.childIndex_[e]},t.getChild=function(e){if(e)return this.childNameIndex_[e]},t.getDescendant=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.reduce((function(e,t){return e.concat(t)}),[]);for(var r=this,i=0;i<t.length;i++)if(!(r=r.getChild(t[i]))||!r.getChild)return;return r},t.addChild=function(t,n,r){var i,a;if(void 0===n&&(n={}),void 0===r&&(r=this.children_.length),"string"==typeof t){a=mr(t);var s=n.componentClass||a;n.name=a;var o=e.getComponent(s);if(!o)throw new Error("Component "+s+" does not exist");if("function"!=typeof o)return null;i=new o(this.player_||this,n)}else i=t;if(i.parentComponent_&&i.parentComponent_.removeChild(i),this.children_.splice(r,0,i),i.parentComponent_=this,"function"==typeof i.id&&(this.childIndex_[i.id()]=i),(a=a||i.name&&mr(i.name()))&&(this.childNameIndex_[a]=i,this.childNameIndex_[pr(a)]=i),"function"==typeof i.el&&i.el()){var u=null;this.children_[r+1]&&(this.children_[r+1].el_?u=this.children_[r+1].el_:Qt(this.children_[r+1])&&(u=this.children_[r+1])),this.contentEl().insertBefore(i.el(),u)}return i},t.removeChild=function(e){if("string"==typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===e){t=!0,this.children_.splice(n,1);break}if(t){e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[mr(e.name())]=null,this.childNameIndex_[pr(e.name())]=null;var r=e.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},t.initChildren=function(){var t=this,n=this.options_.children;if(n){var r,i=this.options_,a=e.getComponent("Tech");(r=Array.isArray(n)?n:Object.keys(n)).concat(Object.keys(this.options_).filter((function(e){return!r.some((function(t){return"string"==typeof t?e===t:e===t.name}))}))).map((function(e){var r,i;return"string"==typeof e?i=n[r=e]||t.options_[r]||{}:(r=e.name,i=e),{name:r,opts:i}})).filter((function(t){var n=e.getComponent(t.opts.componentClass||mr(t.name));return n&&!a.isTech(n)})).forEach((function(e){var n=e.name,r=e.opts;if(void 0!==i[n]&&(r=i[n]),!1!==r){!0===r&&(r={}),r.playerOptions=t.options_.playerOptions;var a=t.addChild(n,r);a&&(t[n]=a)}}))}},t.buildCSSClass=function(){return""},t.ready=function(e,t){if(void 0===t&&(t=!1),e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))},t.triggerReady=function(){this.isReady_=!0,this.setTimeout((function(){var e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger("ready")}),1)},t.$=function(e,t){return Cn(e,t||this.contentEl())},t.$$=function(e,t){return xn(e,t||this.contentEl())},t.hasClass=function(e){return an(this.el_,e)},t.addClass=function(e){sn(this.el_,e)},t.removeClass=function(e){on(this.el_,e)},t.toggleClass=function(e,t){un(this.el_,e,t)},t.show=function(){this.removeClass("vjs-hidden")},t.hide=function(){this.addClass("vjs-hidden")},t.lockShowing=function(){this.addClass("vjs-lock-showing")},t.unlockShowing=function(){this.removeClass("vjs-lock-showing")},t.getAttribute=function(e){return dn(this.el_,e)},t.setAttribute=function(e,t){hn(this.el_,e,t)},t.removeAttribute=function(e){fn(this.el_,e)},t.width=function(e,t){return this.dimension("width",e,t)},t.height=function(e,t){return this.dimension("height",e,t)},t.dimensions=function(e,t){this.width(e,!0),this.height(t)},t.dimension=function(e,t,n){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;var r=this.el_.style[e],i=r.indexOf("px");return-1!==i?parseInt(r.slice(0,i),10):parseInt(this.el_["offset"+mr(e)],10)},t.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if(t=kt(this.el_,e),0===(t=parseFloat(t))||isNaN(t)){var n="offset"+mr(e);t=this.el_[n]}return t},t.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},t.currentWidth=function(){return this.currentDimension("width")},t.currentHeight=function(){return this.currentDimension("height")},t.focus=function(){this.el_.focus()},t.blur=function(){this.el_.blur()},t.handleKeyDown=function(e){this.player_&&(e.stopPropagation(),this.player_.handleKeyDown(e))},t.handleKeyPress=function(e){this.handleKeyDown(e)},t.emitTapEvents=function(){var e,t=0,n=null;this.on("touchstart",(function(r){1===r.touches.length&&(n={pageX:r.touches[0].pageX,pageY:r.touches[0].pageY},t=i().performance.now(),e=!0)})),this.on("touchmove",(function(t){if(t.touches.length>1)e=!1;else if(n){var r=t.touches[0].pageX-n.pageX,i=t.touches[0].pageY-n.pageY;Math.sqrt(r*r+i*i)>10&&(e=!1)}}));var r=function(){e=!1};this.on("touchleave",r),this.on("touchcancel",r),this.on("touchend",(function(r){n=null,!0===e&&i().performance.now()-t<200&&(r.preventDefault(),this.trigger("tap"))}))},t.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e,t=Jn(this.player(),this.player().reportUserActivity);this.on("touchstart",(function(){t(),this.clearInterval(e),e=this.setInterval(t,250)}));var n=function(n){t(),this.clearInterval(e)};this.on("touchmove",t),this.on("touchend",n),this.on("touchcancel",n)}},t.setTimeout=function(e,t){var n,r=this;return e=Jn(this,e),this.clearTimersOnDispose_(),n=i().setTimeout((function(){r.setTimeoutIds_.has(n)&&r.setTimeoutIds_.delete(n),e()}),t),this.setTimeoutIds_.add(n),n},t.clearTimeout=function(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),i().clearTimeout(e)),e},t.setInterval=function(e,t){e=Jn(this,e),this.clearTimersOnDispose_();var n=i().setInterval(e,t);return this.setIntervalIds_.add(n),n},t.clearInterval=function(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),i().clearInterval(e)),e},t.requestAnimationFrame=function(e){var t,n=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),e=Jn(this,e),t=i().requestAnimationFrame((function(){n.rafIds_.has(t)&&n.rafIds_.delete(t),e()})),this.rafIds_.add(t),t):this.setTimeout(e,1e3/60)},t.requestNamedAnimationFrame=function(e,t){var n=this;if(!this.namedRafs_.has(e)){this.clearTimersOnDispose_(),t=Jn(this,t);var r=this.requestAnimationFrame((function(){t(),n.namedRafs_.has(e)&&n.namedRafs_.delete(e)}));return this.namedRafs_.set(e,r),e}},t.cancelNamedAnimationFrame=function(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))},t.cancelAnimationFrame=function(e){return this.supportsRaf_?(this.rafIds_.has(e)&&(this.rafIds_.delete(e),i().cancelAnimationFrame(e)),e):this.clearTimeout(e)},t.clearTimersOnDispose_=function(){var e=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",(function(){[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach((function(t){var n=t[0],r=t[1];e[n].forEach((function(t,n){return e[r](n)}))})),e.clearingTimersOnDispose_=!1})))},e.registerComponent=function(t,n){if("string"!=typeof t||!t)throw new Error('Illegal component name, "'+t+'"; must be a non-empty string.');var r=e.getComponent("Tech"),i=r&&r.isTech(n),a=e===n||e.prototype.isPrototypeOf(n.prototype);if(i||!a)throw new Error('Illegal component, "'+t+'"; '+(i?"techs must be registered using Tech.registerTech()":"must be a Component subclass")+".");t=mr(t),e.components_||(e.components_={});var s=e.getComponent("Player");if("Player"===t&&s&&s.players){var o=s.players,u=Object.keys(o);if(o&&u.length>0&&u.map((function(e){return o[e]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return e.components_[t]=n,e.components_[pr(t)]=n,n},e.getComponent=function(t){if(t&&e.components_)return e.components_[t]},e}();function Sr(e,t,n,r){return function(e,t,n){if("number"!=typeof t||t<0||t>n)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+n+").")}(e,r,n.length-1),n[r][t]}function wr(e){return void 0===e||0===e.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:Sr.bind(null,"start",0,e),end:Sr.bind(null,"end",1,e)}}function kr(e,t){return Array.isArray(e)?wr(e):void 0===e||void 0===t?wr():wr([[e,t]])}function Er(e,t){var n,r,i=0;if(!t)return 0;e&&e.length||(e=kr(0,0));for(var a=0;a<e.length;a++)n=e.start(a),(r=e.end(a))>t&&(r=t),i+=r-n;return i/t}function Cr(e){if(e instanceof Cr)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:St(e)&&("number"==typeof e.code&&(this.code=e.code),Tt(this,e)),this.message||(this.message=Cr.defaultMessages[this.code]||"")}Tr.prototype.supportsRaf_="function"==typeof i().requestAnimationFrame&&"function"==typeof i().cancelAnimationFrame,Tr.registerComponent("Component",Tr),Cr.prototype.code=0,Cr.prototype.message="",Cr.prototype.status=null,Cr.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Cr.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var xr=0;xr<Cr.errorTypes.length;xr++)Cr[Cr.errorTypes[xr]]=xr,Cr.prototype[Cr.errorTypes[xr]]=xr;function Ir(e){return null!=e&&"function"==typeof e.then}function Ar(e){Ir(e)&&e.then(null,(function(e){}))}var Or=function(e){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(t,n,r){return e[n]&&(t[n]=e[n]),t}),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})},Pr="vjs-modal-dialog",Lr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleKeyDown_=function(e){return r.handleKeyDown(e)},r.close_=function(e){return r.close(e)},r.opened_=r.hasBeenOpened_=r.hasBeenFilled_=!1,r.closeable(!r.options_.uncloseable),r.content(r.options_.content),r.contentEl_=tn("div",{className:Pr+"-content"},{role:"document"}),r.descEl_=tn("p",{className:Pr+"-description vjs-control-text",id:r.el().getAttribute("aria-describedby")}),nn(r.descEl_,r.description()),r.el_.appendChild(r.descEl_),r.el_.appendChild(r.contentEl_),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},n.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,e.prototype.dispose.call(this)},n.buildCSSClass=function(){return Pr+" vjs-hidden "+e.prototype.buildCSSClass.call(this)},n.label=function(){return this.localize(this.options_.label||"Modal Window")},n.description=function(){var e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e},n.open=function(){if(!this.opened_){var e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},n.opened=function(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_},n.close=function(){if(this.opened_){var e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},n.closeable=function(e){if("boolean"==typeof e){var t=this.closeable_=!!e,n=this.getChild("closeButton");if(t&&!n){var r=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=r,this.on(n,"close",this.close_)}!t&&n&&(this.off(n,"close",this.close_),this.removeChild(n),n.dispose())}return this.closeable_},n.fill=function(){this.fillWith(this.content())},n.fillWith=function(e){var t=this.contentEl(),n=t.parentNode,r=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(t),this.empty(),wn(t,e),this.trigger("modalfill"),r?n.insertBefore(t,r):n.appendChild(t);var i=this.getChild("closeButton");i&&n.appendChild(i.el_)},n.empty=function(){this.trigger("beforemodalempty"),bn(this.contentEl()),this.trigger("modalempty")},n.content=function(e){return void 0!==e&&(this.content_=e),this.content_},n.conditionalFocus_=function(){var e=s().activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())},n.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)},n.handleKeyDown=function(e){if(e.stopPropagation(),f().isEventKey(e,"Escape")&&this.closeable())return e.preventDefault(),void this.close();if(f().isEventKey(e,"Tab")){for(var t,n=this.focusableEls_(),r=this.el_.querySelector(":focus"),i=0;i<n.length;i++)if(r===n[i]){t=i;break}s().activeElement===this.el_&&(t=0),e.shiftKey&&0===t?(n[n.length-1].focus(),e.preventDefault()):e.shiftKey||t!==n.length-1||(n[0].focus(),e.preventDefault())}},n.focusableEls_=function(){var e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,(function(e){return(e instanceof i().HTMLAnchorElement||e instanceof i().HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof i().HTMLInputElement||e instanceof i().HTMLSelectElement||e instanceof i().HTMLTextAreaElement||e instanceof i().HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof i().HTMLIFrameElement||e instanceof i().HTMLObjectElement||e instanceof i().HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")}))},t}(Tr);Lr.prototype.options_={pauseOnOpen:!0,temporary:!0},Tr.registerComponent("ModalDialog",Lr);var Dr=function(e){function t(t){var n;void 0===t&&(t=[]),(n=e.call(this)||this).tracks_=[],Object.defineProperty((0,u.Z)(n),"length",{get:function(){return this.tracks_.length}});for(var r=0;r<t.length;r++)n.addTrack(t[r]);return n}(0,l.Z)(t,e);var n=t.prototype;return n.addTrack=function(e){var t=this,n=this.tracks_.length;""+n in this||Object.defineProperty(this,n,{get:function(){return this.tracks_[n]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=function(){t.trigger({track:e,type:"labelchange",target:t})},rr(e)&&e.addEventListener("labelchange",e.labelchange_)},n.removeTrack=function(e){for(var t,n=0,r=this.length;n<r;n++)if(this[n]===e){(t=this[n]).off&&t.off(),this.tracks_.splice(n,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})},n.getTrackById=function(e){for(var t=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===e){t=i;break}}return t},t}(tr);for(var Rr in Dr.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"},Dr.prototype.allowedEvents_)Dr.prototype["on"+Rr]=null;var Mr=function(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].enabled=!1)},Nr=function(e){function t(t){var n;void 0===t&&(t=[]);for(var r=t.length-1;r>=0;r--)if(t[r].enabled){Mr(t,t[r]);break}return(n=e.call(this,t)||this).changing_=!1,n}(0,l.Z)(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.enabled&&Mr(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.enabledChange_=function(){n.changing_||(n.changing_=!0,Mr(n,t),n.changing_=!1,n.trigger("change"))},t.addEventListener("enabledchange",t.enabledChange_))},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.enabledChange_&&(t.removeEventListener("enabledchange",t.enabledChange_),t.enabledChange_=null)},t}(Dr),Ur=function(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].selected=!1)},Fr=function(e){function t(t){var n;void 0===t&&(t=[]);for(var r=t.length-1;r>=0;r--)if(t[r].selected){Ur(t,t[r]);break}return(n=e.call(this,t)||this).changing_=!1,Object.defineProperty((0,u.Z)(n),"selectedIndex",{get:function(){for(var e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}}),n}(0,l.Z)(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.selected&&Ur(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.selectedChange_=function(){n.changing_||(n.changing_=!0,Ur(n,t),n.changing_=!1,n.trigger("change"))},t.addEventListener("selectedchange",t.selectedChange_))},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.selectedChange_&&(t.removeEventListener("selectedchange",t.selectedChange_),t.selectedChange_=null)},t}(Dr),Br=function(e){function t(){return e.apply(this,arguments)||this}(0,l.Z)(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;e.prototype.addTrack.call(this,t),this.queueChange_||(this.queueChange_=function(){return n.queueTrigger("change")}),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=function(){return n.trigger("selectedlanguagechange")}),t.addEventListener("modechange",this.queueChange_),-1===["metadata","chapters"].indexOf(t.kind)&&t.addEventListener("modechange",this.triggerSelectedlanguagechange_)},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&(this.queueChange_&&t.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&t.removeEventListener("modechange",this.triggerSelectedlanguagechange_))},t}(Dr),jr=function(){function e(e){void 0===e&&(e=[]),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var t=0,n=e.length;t<n;t++)this.addTrackElement_(e[t])}var t=e.prototype;return t.addTrackElement_=function(e){var t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)},t.getTrackElementByTrack_=function(e){for(var t,n=0,r=this.trackElements_.length;n<r;n++)if(e===this.trackElements_[n].track){t=this.trackElements_[n];break}return t},t.removeTrackElement_=function(e){for(var t=0,n=this.trackElements_.length;t<n;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&"function"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),"function"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}},e}(),Hr=function(){function e(t){e.prototype.setCues_.call(this,t),Object.defineProperty(this,"length",{get:function(){return this.length_}})}var t=e.prototype;return t.setCues_=function(e){var t=this.length||0,n=0,r=e.length;this.cues_=e,this.length_=e.length;var i=function(e){""+e in this||Object.defineProperty(this,""+e,{get:function(){return this.cues_[e]}})};if(t<r)for(n=t;n<r;n++)i.call(this,n)},t.getCueById=function(e){for(var t=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===e){t=i;break}}return t},e}(),Vr={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},qr={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Wr={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},zr={disabled:"disabled",hidden:"hidden",showing:"showing"},Gr=function(e){function t(t){var n;void 0===t&&(t={}),n=e.call(this)||this;var r={id:t.id||"vjs_track_"+Un(),kind:t.kind||"",language:t.language||""},i=t.label||"",a=function(e){Object.defineProperty((0,u.Z)(n),e,{get:function(){return r[e]},set:function(){}})};for(var s in r)a(s);return Object.defineProperty((0,u.Z)(n),"label",{get:function(){return i},set:function(e){e!==i&&(i=e,this.trigger("labelchange"))}}),n}return(0,l.Z)(t,e),t}(tr),Xr=function(e){var t=["protocol","hostname","port","pathname","search","hash","host"],n=s().createElement("a");n.href=e;var r,a=""===n.host&&"file:"!==n.protocol;a&&((r=s().createElement("div")).innerHTML='<a href="'+e+'"></a>',n=r.firstChild,r.setAttribute("style","display:none; position:absolute;"),s().body.appendChild(r));for(var o={},u=0;u<t.length;u++)o[t[u]]=n[t[u]];return"http:"===o.protocol&&(o.host=o.host.replace(/:80$/,"")),"https:"===o.protocol&&(o.host=o.host.replace(/:443$/,"")),o.protocol||(o.protocol=i().location.protocol),a&&s().body.removeChild(r),o},$r=function(e){if(!e.match(/^https?:\/\//)){var t=s().createElement("div");t.innerHTML='<a href="'+e+'">x</a>',e=t.firstChild.href}return e},Kr=function(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(e);if(t)return t.pop().toLowerCase()}return""},Zr=function(e,t){void 0===t&&(t=i().location);var n=Xr(e);return(":"===n.protocol?t.protocol:n.protocol)+n.host!==t.protocol+t.host},Yr=Object.freeze({__proto__:null,parseUrl:Xr,getAbsoluteURL:$r,getFileExtension:Kr,isCrossOrigin:Zr}),Qr=function(e,t){var n=new(i().WebVTT.Parser)(i(),i().vttjs,i().WebVTT.StringDecoder()),r=[];n.oncue=function(e){t.addCue(e)},n.onparsingerror=function(e){r.push(e)},n.onflush=function(){t.trigger({type:"loadeddata",target:t})},n.parse(e),r.length>0&&(i().console&&i().console.groupCollapsed&&i().console.groupCollapsed("Text Track parsing errors for "+t.src),r.forEach((function(e){return gt.error(e)})),i().console&&i().console.groupEnd&&i().console.groupEnd()),n.flush()},Jr=function(e,t){var n={uri:e},r=Zr(e);r&&(n.cors=r);var a="use-credentials"===t.tech_.crossOrigin();a&&(n.withCredentials=a),m()(n,Jn(this,(function(e,n,r){if(e)return gt.error(e,n);t.loaded_=!0,"function"!=typeof i().WebVTT?t.tech_&&t.tech_.any(["vttjsloaded","vttjserror"],(function(e){if("vttjserror"!==e.type)return Qr(r,t);gt.error("vttjs failed to load, stopping trying to process "+t.src)})):Qr(r,t)})))},ei=function(e){function t(t){var n;if(void 0===t&&(t={}),!t.tech)throw new Error("A tech was not provided.");var r=gr(t,{kind:Wr[t.kind]||"subtitles",language:t.language||t.srclang||""}),i=zr[r.mode]||"disabled",a=r.default;"metadata"!==r.kind&&"chapters"!==r.kind||(i="hidden"),(n=e.call(this,r)||this).tech_=r.tech,n.cues_=[],n.activeCues_=[],n.preload_=!1!==n.tech_.preloadTextTracks;var s=new Hr(n.cues_),o=new Hr(n.activeCues_),l=!1,c=Jn((0,u.Z)(n),(function(){this.tech_.isReady_&&!this.tech_.isDisposed()&&(this.activeCues=this.activeCues,l&&(this.trigger("cuechange"),l=!1))}));return n.tech_.one("dispose",(function(){n.tech_.off("timeupdate",c)})),"disabled"!==i&&n.tech_.on("timeupdate",c),Object.defineProperties((0,u.Z)(n),{default:{get:function(){return a},set:function(){}},mode:{get:function(){return i},set:function(e){zr[e]&&i!==e&&(i=e,this.preload_||"disabled"===i||0!==this.cues.length||Jr(this.src,this),this.tech_.off("timeupdate",c),"disabled"!==i&&this.tech_.on("timeupdate",c),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?s:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return o;for(var e=this.tech_.currentTime(),t=[],n=0,r=this.cues.length;n<r;n++){var i=this.cues[n];(i.startTime<=e&&i.endTime>=e||i.startTime===i.endTime&&i.startTime<=e&&i.startTime+.5>=e)&&t.push(i)}if(l=!1,t.length!==this.activeCues_.length)l=!0;else for(var a=0;a<t.length;a++)-1===this.activeCues_.indexOf(t[a])&&(l=!0);return this.activeCues_=t,o.setCues_(this.activeCues_),o},set:function(){}}}),r.src?(n.src=r.src,n.preload_||(n.loaded_=!0),(n.preload_||"subtitles"!==r.kind&&"captions"!==r.kind)&&Jr(n.src,(0,u.Z)(n))):n.loaded_=!0,n}(0,l.Z)(t,e);var n=t.prototype;return n.addCue=function(e){var t=e;if(i().vttjs&&!(e instanceof i().vttjs.VTTCue)){for(var n in t=new(i().vttjs.VTTCue)(e.startTime,e.endTime,e.text),e)n in t||(t[n]=e[n]);t.id=e.id,t.originalCue_=e}for(var r=this.tech_.textTracks(),a=0;a<r.length;a++)r[a]!==this&&r[a].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)},n.removeCue=function(e){for(var t=this.cues_.length;t--;){var n=this.cues_[t];if(n===e||n.originalCue_&&n.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}},t}(Gr);ei.prototype.allowedEvents_={cuechange:"cuechange"};var ti=function(e){function t(t){var n;void 0===t&&(t={});var r=gr(t,{kind:qr[t.kind]||""});n=e.call(this,r)||this;var i=!1;return Object.defineProperty((0,u.Z)(n),"enabled",{get:function(){return i},set:function(e){"boolean"==typeof e&&e!==i&&(i=e,this.trigger("enabledchange"))}}),r.enabled&&(n.enabled=r.enabled),n.loaded_=!0,n}return(0,l.Z)(t,e),t}(Gr),ni=function(e){function t(t){var n;void 0===t&&(t={});var r=gr(t,{kind:Vr[t.kind]||""});n=e.call(this,r)||this;var i=!1;return Object.defineProperty((0,u.Z)(n),"selected",{get:function(){return i},set:function(e){"boolean"==typeof e&&e!==i&&(i=e,this.trigger("selectedchange"))}}),r.selected&&(n.selected=r.selected),n}return(0,l.Z)(t,e),t}(Gr),ri=function(e){function t(t){var n,r;void 0===t&&(t={}),n=e.call(this)||this;var i=new ei(t);return n.kind=i.kind,n.src=i.src,n.srclang=i.language,n.label=i.label,n.default=i.default,Object.defineProperties((0,u.Z)(n),{readyState:{get:function(){return r}},track:{get:function(){return i}}}),r=0,i.addEventListener("loadeddata",(function(){r=2,n.trigger({type:"load",target:(0,u.Z)(n)})})),n}return(0,l.Z)(t,e),t}(tr);ri.prototype.allowedEvents_={load:"load"},ri.NONE=0,ri.LOADING=1,ri.LOADED=2,ri.ERROR=3;var ii={audio:{ListClass:Nr,TrackClass:ti,capitalName:"Audio"},video:{ListClass:Fr,TrackClass:ni,capitalName:"Video"},text:{ListClass:Br,TrackClass:ei,capitalName:"Text"}};Object.keys(ii).forEach((function(e){ii[e].getterName=e+"Tracks",ii[e].privateName=e+"Tracks_"}));var ai={remoteText:{ListClass:Br,TrackClass:ei,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:jr,TrackClass:ri,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},si=(0,o.Z)({},ii,ai);ai.names=Object.keys(ai),ii.names=Object.keys(ii),si.names=[].concat(ai.names).concat(ii.names);var oi=function(e){function t(t,n){var r;return void 0===t&&(t={}),void 0===n&&(n=function(){}),t.reportTouchActivity=!1,(r=e.call(this,null,t,n)||this).onDurationChange_=function(e){return r.onDurationChange(e)},r.trackProgress_=function(e){return r.trackProgress(e)},r.trackCurrentTime_=function(e){return r.trackCurrentTime(e)},r.stopTrackingCurrentTime_=function(e){return r.stopTrackingCurrentTime(e)},r.disposeSourceHandler_=function(e){return r.disposeSourceHandler(e)},r.hasStarted_=!1,r.on("playing",(function(){this.hasStarted_=!0})),r.on("loadstart",(function(){this.hasStarted_=!1})),si.names.forEach((function(e){var n=si[e];t&&t[n.getterName]&&(r[n.privateName]=t[n.getterName])})),r.featuresProgressEvents||r.manualProgressOn(),r.featuresTimeupdateEvents||r.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(e){!1===t["native"+e+"Tracks"]&&(r["featuresNative"+e+"Tracks"]=!1)})),!1===t.nativeCaptions||!1===t.nativeTextTracks?r.featuresNativeTextTracks=!1:!0!==t.nativeCaptions&&!0!==t.nativeTextTracks||(r.featuresNativeTextTracks=!0),r.featuresNativeTextTracks||r.emulateTextTracks(),r.preloadTextTracks=!1!==t.preloadTextTracks,r.autoRemoteTextTracks_=new si.text.ListClass,r.initTrackListeners(),t.nativeControlsForTouch||r.emitTapEvents(),r.constructor&&(r.name_=r.constructor.name||"Unknown Tech"),r}(0,l.Z)(t,e);var n=t.prototype;return n.triggerSourceset=function(e){var t=this;this.isReady_||this.one("ready",(function(){return t.setTimeout((function(){return t.triggerSourceset(e)}),1)})),this.trigger({src:e,type:"sourceset"})},n.manualProgressOn=function(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)},n.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)},n.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Jn(this,(function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)},n.onDurationChange=function(e){this.duration_=this.duration()},n.buffered=function(){return kr(0,0)},n.bufferedPercent=function(){return Er(this.buffered(),this.duration_)},n.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},n.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)},n.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)},n.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},n.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},n.dispose=function(){this.clearTracks(ii.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},n.clearTracks=function(e){var t=this;(e=[].concat(e)).forEach((function(e){for(var n=t[e+"Tracks"]()||[],r=n.length;r--;){var i=n[r];"text"===e&&t.removeRemoteTextTrack(i),n.removeTrack(i)}}))},n.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var n=e[t];this.removeRemoteTextTrack(n)}},n.reset=function(){},n.crossOrigin=function(){},n.setCrossOrigin=function(){},n.error=function(e){return void 0!==e&&(this.error_=new Cr(e),this.trigger("error")),this.error_},n.played=function(){return this.hasStarted_?kr(0,0):kr()},n.play=function(){},n.setScrubbing=function(){},n.scrubbing=function(){},n.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},n.initTrackListeners=function(){var e=this;ii.names.forEach((function(t){var n=ii[t],r=function(){e.trigger(t+"trackchange")},i=e[n.getterName]();i.addEventListener("removetrack",r),i.addEventListener("addtrack",r),e.on("dispose",(function(){i.removeEventListener("removetrack",r),i.removeEventListener("addtrack",r)}))}))},n.addWebVttScript_=function(){var e=this;if(!i().WebVTT)if(s().body.contains(this.el())){if(!this.options_["vtt.js"]&&wt(v())&&Object.keys(v()).length>0)return void this.trigger("vttjsloaded");var t=s().createElement("script");t.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",t.onload=function(){e.trigger("vttjsloaded")},t.onerror=function(){e.trigger("vttjserror")},this.on("dispose",(function(){t.onload=null,t.onerror=null})),i().WebVTT=!0,this.el().parentNode.appendChild(t)}else this.ready(this.addWebVttScript_)},n.emulateTextTracks=function(){var e=this,t=this.textTracks(),n=this.remoteTextTracks(),r=function(e){return t.addTrack(e.track)},i=function(e){return t.removeTrack(e.track)};n.on("addtrack",r),n.on("removetrack",i),this.addWebVttScript_();var a=function(){return e.trigger("texttrackchange")},s=function(){a();for(var e=0;e<t.length;e++){var n=t[e];n.removeEventListener("cuechange",a),"showing"===n.mode&&n.addEventListener("cuechange",a)}};s(),t.addEventListener("change",s),t.addEventListener("addtrack",s),t.addEventListener("removetrack",s),this.on("dispose",(function(){n.off("addtrack",r),n.off("removetrack",i),t.removeEventListener("change",s),t.removeEventListener("addtrack",s),t.removeEventListener("removetrack",s);for(var e=0;e<t.length;e++)t[e].removeEventListener("cuechange",a)}))},n.addTextTrack=function(e,t,n){if(!e)throw new Error("TextTrack kind is required but was not provided");return function(e,t,n,r,i){void 0===i&&(i={});var a=e.textTracks();i.kind=t,n&&(i.label=n),r&&(i.language=r),i.tech=e;var s=new si.text.TrackClass(i);return a.addTrack(s),s}(this,e,t,n)},n.createRemoteTextTrack=function(e){var t=gr(e,{tech:this});return new ai.remoteTextEl.TrackClass(t)},n.addRemoteTextTrack=function(e,t){var n=this;void 0===e&&(e={});var r=this.createRemoteTextTrack(e);return!0!==t&&!1!==t&&(gt.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),t=!0),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),!0!==t&&this.ready((function(){return n.autoRemoteTextTracks_.addTrack(r.track)})),r},n.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},n.getVideoPlaybackQuality=function(){return{}},n.requestPictureInPicture=function(){var e=this.options_.Promise||i().Promise;if(e)return e.reject()},n.disablePictureInPicture=function(){return!0},n.setDisablePictureInPicture=function(){},n.setPoster=function(){},n.playsinline=function(){},n.setPlaysinline=function(){},n.overrideNativeAudioTracks=function(){},n.overrideNativeVideoTracks=function(){},n.canPlayType=function(){return""},t.canPlayType=function(){return""},t.canPlaySource=function(e,n){return t.canPlayType(e.type)},t.isTech=function(e){return e.prototype instanceof t||e instanceof t||e===t},t.registerTech=function(e,n){if(t.techs_||(t.techs_={}),!t.isTech(n))throw new Error("Tech "+e+" must be a Tech");if(!t.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!t.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=mr(e),t.techs_[e]=n,t.techs_[pr(e)]=n,"Tech"!==e&&t.defaultTechOrder_.push(e),n},t.getTech=function(e){if(e)return t.techs_&&t.techs_[e]?t.techs_[e]:(e=mr(e),i()&&i().videojs&&i().videojs[e]?(gt.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),i().videojs[e]):void 0)},t}(Tr);si.names.forEach((function(e){var t=si[e];oi.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),oi.prototype.featuresVolumeControl=!0,oi.prototype.featuresMuteControl=!0,oi.prototype.featuresFullscreenResize=!1,oi.prototype.featuresPlaybackRate=!1,oi.prototype.featuresProgressEvents=!1,oi.prototype.featuresSourceset=!1,oi.prototype.featuresTimeupdateEvents=!1,oi.prototype.featuresNativeTextTracks=!1,oi.withSourceHandlers=function(e){e.registerSourceHandler=function(t,n){var r=e.sourceHandlers;r||(r=e.sourceHandlers=[]),void 0===n&&(n=r.length),r.splice(n,0,t)},e.canPlayType=function(t){for(var n,r=e.sourceHandlers||[],i=0;i<r.length;i++)if(n=r[i].canPlayType(t))return n;return""},e.selectSourceHandler=function(t,n){for(var r=e.sourceHandlers||[],i=0;i<r.length;i++)if(r[i].canHandleSource(t,n))return r[i];return null},e.canPlaySource=function(t,n){var r=e.selectSourceHandler(t,n);return r?r.canHandleSource(t,n):""},["seekable","seeking","duration"].forEach((function(e){var t=this[e];"function"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(t){var n=e.selectSourceHandler(t,this.options_);n||(e.nativeSourceHandler?n=e.nativeSourceHandler:gt.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),n!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=n.handleSource(t,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},Tr.registerComponent("Tech",oi),oi.registerTech("Tech",oi),oi.defaultTechOrder_=[];var ui={},li={},ci={};function di(e,t,n){e.setTimeout((function(){return vi(t,ui[t.type],n,e)}),1)}function hi(e,t,n,r){void 0===r&&(r=null);var i="call"+mr(n),a=e.reduce(gi(i),r),s=a===ci,o=s?null:t[n](a);return function(e,t,n,r){for(var i=e.length-1;i>=0;i--){var a=e[i];a[t]&&a[t](r,n)}}(e,n,o,s),o}var fi={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1},pi={setCurrentTime:1,setMuted:1,setVolume:1},mi={play:1,pause:1};function gi(e){return function(t,n){return t===ci?ci:n[e]?n[e](t):t}}function vi(e,t,n,r,i,a){void 0===e&&(e={}),void 0===t&&(t=[]),void 0===i&&(i=[]),void 0===a&&(a=!1);var s=t,o=s[0],u=s.slice(1);if("string"==typeof o)vi(e,ui[o],n,r,i,a);else if(o){var l=function(e,t){var n=li[e.id()],r=null;if(null==n)return r=t(e),li[e.id()]=[[t,r]],r;for(var i=0;i<n.length;i++){var a=n[i],s=a[0],o=a[1];s===t&&(r=o)}return null===r&&(r=t(e),n.push([t,r])),r}(r,o);if(!l.setSource)return i.push(l),vi(e,u,n,r,i,a);l.setSource(Tt({},e),(function(t,s){if(t)return vi(e,u,n,r,i,a);i.push(l),vi(s,e.type===s.type?u:ui[s.type],n,r,i,a)}))}else u.length?vi(e,u,n,r,i,a):a?n(e,i):vi(e,ui["*"],n,r,i,!0)}var yi={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},_i=function(e){void 0===e&&(e="");var t=Kr(e);return yi[t.toLowerCase()]||""},bi=function e(t){if(Array.isArray(t)){var n=[];t.forEach((function(t){t=e(t),Array.isArray(t)?n=n.concat(t):St(t)&&n.push(t)})),t=n}else t="string"==typeof t&&t.trim()?[Ti({src:t})]:St(t)&&"string"==typeof t.src&&t.src&&t.src.trim()?[Ti(t)]:[];return t};function Ti(e){if(!e.type){var t=_i(e.src);t&&(e.type=t)}return e}var Si=function(e){function t(t,n,r){var i,a=gr({createEl:!1},n);if(i=e.call(this,t,a,r)||this,n.playerOptions.sources&&0!==n.playerOptions.sources.length)t.src(n.playerOptions.sources);else for(var s=0,o=n.playerOptions.techOrder;s<o.length;s++){var u=mr(o[s]),l=oi.getTech(u);if(u||(l=Tr.getComponent(u)),l&&l.isSupported()){t.loadTech_(u);break}}return i}return(0,l.Z)(t,e),t}(Tr);Tr.registerComponent("MediaLoader",Si);var wi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleMouseOver_=function(e){return r.handleMouseOver(e)},r.handleMouseOut_=function(e){return r.handleMouseOut(e)},r.handleClick_=function(e){return r.handleClick(e)},r.handleKeyDown_=function(e){return r.handleKeyDown(e)},r.emitTapEvents(),r.enable(),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(t,n,r){void 0===t&&(t="div"),void 0===n&&(n={}),void 0===r&&(r={}),n=Tt({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},n),"button"===t&>.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead."),r=Tt({role:"button"},r),this.tabIndex_=n.tabIndex;var i=e.prototype.createEl.call(this,t,n,r);return this.createControlTextEl(i),i},n.dispose=function(){this.controlTextEl_=null,e.prototype.dispose.call(this)},n.createControlTextEl=function(e){return this.controlTextEl_=tn("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},n.controlText=function(e,t){if(void 0===t&&(t=this.el()),void 0===e)return this.controlText_||"Need Text";var n=this.localize(e);this.controlText_=e,nn(this.controlTextEl_,n),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute("title",n)},n.buildCSSClass=function(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)},n.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),void 0!==this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))},n.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),void 0!==this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)},n.handleLanguagechange=function(){this.controlText(this.controlText_)},n.handleClick=function(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)},n.handleKeyDown=function(t){f().isEventKey(t,"Space")||f().isEventKey(t,"Enter")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(Tr);Tr.registerComponent("ClickableComponent",wi);var ki=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update(),r.update_=function(e){return r.update(e)},t.on("posterchange",r.update_),r}(0,l.Z)(t,e);var n=t.prototype;return n.dispose=function(){this.player().off("posterchange",this.update_),e.prototype.dispose.call(this)},n.createEl=function(){return tn("div",{className:"vjs-poster",tabIndex:-1})},n.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},n.setSrc=function(e){var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t},n.handleClick=function(e){if(this.player_.controls()){var t=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;!this.player_.tech(!0)||(jt||Ut)&&t||this.player_.tech(!0).focus(),this.player_.paused()?Ar(this.player_.play()):this.player_.pause()}},t}(wi);Tr.registerComponent("PosterImage",ki);var Ei="#222",Ci={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function xi(e,t){var n;if(4===e.length)n=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");n=e.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+t+")"}function Ii(e,t,n){try{e.style[t]=n}catch(e){return}}var Ai=function(e){function t(t,n,r){var a;a=e.call(this,t,n,r)||this;var s=function(e){return a.updateDisplay(e)};return t.on("loadstart",(function(e){return a.toggleDisplay(e)})),t.on("texttrackchange",s),t.on("loadedmetadata",(function(e){return a.preselectTrack(e)})),t.ready(Jn((0,u.Z)(a),(function(){if(t.tech_&&t.tech_.featuresNativeTextTracks)this.hide();else{t.on("fullscreenchange",s),t.on("playerresize",s),i().addEventListener("orientationchange",s),t.on("dispose",(function(){return i().removeEventListener("orientationchange",s)}));for(var e=this.options_.playerOptions.tracks||[],n=0;n<e.length;n++)this.player_.addRemoteTextTrack(e[n],!0);this.preselectTrack()}}))),a}(0,l.Z)(t,e);var n=t.prototype;return n.preselectTrack=function(){for(var e,t,n,r={captions:1,subtitles:1},i=this.player_.textTracks(),a=this.player_.cache_.selectedLanguage,s=0;s<i.length;s++){var o=i[s];a&&a.enabled&&a.language&&a.language===o.language&&o.kind in r?o.kind===a.kind?n=o:n||(n=o):a&&!a.enabled?(n=null,e=null,t=null):o.default&&("descriptions"!==o.kind||e?o.kind in r&&!t&&(t=o):e=o)}n?n.mode="showing":t?t.mode="showing":e&&(e.mode="showing")},n.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},n.clearDisplay=function(){"function"==typeof i().WebVTT&&i().WebVTT.processCues(i(),[],this.el_)},n.updateDisplay=function(){var e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){for(var n=[],r=0;r<e.length;++r){var i=e[r];"showing"===i.mode&&n.push(i)}this.updateForTrack(n)}else{for(var a=null,s=null,o=e.length;o--;){var u=e[o];"showing"===u.mode&&("descriptions"===u.kind?a=u:s=u)}s?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(s)):a&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(a))}},n.updateDisplayState=function(e){for(var t=this.player_.textTrackSettings.getValues(),n=e.activeCues,r=n.length;r--;){var a=n[r];if(a){var s=a.displayState;if(t.color&&(s.firstChild.style.color=t.color),t.textOpacity&&Ii(s.firstChild,"color",xi(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(s.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Ii(s.firstChild,"backgroundColor",xi(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Ii(s,"backgroundColor",xi(t.windowColor,t.windowOpacity)):s.style.backgroundColor=t.windowColor),t.edgeStyle&&("dropshadow"===t.edgeStyle?s.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px "+Ei:"raised"===t.edgeStyle?s.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px "+Ei:"depressed"===t.edgeStyle?s.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px "+Ei:"uniform"===t.edgeStyle&&(s.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px "+Ei)),t.fontPercent&&1!==t.fontPercent){var o=i().parseFloat(s.style.fontSize);s.style.fontSize=o*t.fontPercent+"px",s.style.height="auto",s.style.top="auto"}t.fontFamily&&"default"!==t.fontFamily&&("small-caps"===t.fontFamily?s.firstChild.style.fontVariant="small-caps":s.firstChild.style.fontFamily=Ci[t.fontFamily])}}},n.updateForTrack=function(e){if(Array.isArray(e)||(e=[e]),"function"==typeof i().WebVTT&&!e.every((function(e){return!e.activeCues}))){for(var t=[],n=0;n<e.length;++n)for(var r=e[n],a=0;a<r.activeCues.length;++a)t.push(r.activeCues[a]);i().WebVTT.processCues(i(),t,this.el_);for(var s=0;s<e.length;++s){for(var o=e[s],u=0;u<o.activeCues.length;++u){var l=o.activeCues[u].displayState;sn(l,"vjs-text-track-cue"),sn(l,"vjs-text-track-cue-"+(o.language?o.language:s))}this.player_.textTrackSettings&&this.updateDisplayState(o)}}},t}(Tr);Tr.registerComponent("TextTrackDisplay",Ai);var Oi=function(e){function t(){return e.apply(this,arguments)||this}return(0,l.Z)(t,e),t.prototype.createEl=function(){var t=this.player_.isAudio(),n=this.localize(t?"Audio Player":"Video Player"),r=tn("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[n])}),i=e.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return i.appendChild(r),i},t}(Tr);Tr.registerComponent("LoadingSpinner",Oi);var Pi=function(e){function t(){return e.apply(this,arguments)||this}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={}),t=Tt({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},t),n=Tt({type:"button"},n);var r=Tr.prototype.createEl.call(this,"button",t,n);return this.createControlTextEl(r),r},n.addChild=function(e,t){void 0===t&&(t={});var n=this.constructor.name;return gt.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),Tr.prototype.addChild.call(this,e,t)},n.enable=function(){e.prototype.enable.call(this),this.el_.removeAttribute("disabled")},n.disable=function(){e.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},n.handleKeyDown=function(t){f().isEventKey(t,"Space")||f().isEventKey(t,"Enter")?t.stopPropagation():e.prototype.handleKeyDown.call(this,t)},t}(wi);Tr.registerComponent("Button",Pi);var Li=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).mouseused_=!1,r.on("mousedown",(function(e){return r.handleMouseDown(e)})),r}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-big-play-button"},n.handleClick=function(e){var t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY){var n=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;return Ar(t),void(!this.player_.tech(!0)||(jt||Ut)&&n||this.player_.tech(!0).focus())}var r=this.player_.getChild("controlBar"),i=r&&r.getChild("playToggle");if(i){var a=function(){return i.focus()};Ir(t)?t.then(a,(function(){})):this.setTimeout(a,1)}else this.player_.tech(!0).focus()},n.handleKeyDown=function(t){this.mouseused_=!1,e.prototype.handleKeyDown.call(this,t)},n.handleMouseDown=function(e){this.mouseused_=!0},t}(Pi);Li.prototype.controlText_="Play Video",Tr.registerComponent("BigPlayButton",Li);var Di=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).controlText(n&&n.controlText||r.localize("Close")),r}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},n.handleKeyDown=function(t){f().isEventKey(t,"Esc")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(Pi);Tr.registerComponent("CloseButton",Di);var Ri=function(e){function t(t,n){var r;return void 0===n&&(n={}),r=e.call(this,t,n)||this,n.replay=void 0===n.replay||n.replay,r.on(t,"play",(function(e){return r.handlePlay(e)})),r.on(t,"pause",(function(e){return r.handlePause(e)})),n.replay&&r.on(t,"ended",(function(e){return r.handleEnded(e)})),r}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){this.player_.paused()?Ar(this.player_.play()):this.player_.pause()},n.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},n.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},n.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},n.handleEnded=function(e){var t=this;this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",(function(e){return t.handleSeeked(e)}))},t}(Pi);Ri.prototype.controlText_="Play",Tr.registerComponent("PlayToggle",Ri);var Mi=function(e,t){e=e<0?0:e;var n=Math.floor(e%60),r=Math.floor(e/60%60),i=Math.floor(e/3600),a=Math.floor(t/60%60),s=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(i=r=n="-"),(i=i>0||s>0?i+":":"")+(r=((i||a>=10)&&r<10?"0"+r:r)+":")+(n<10?"0"+n:n)},Ni=Mi;function Ui(e,t){return void 0===t&&(t=e),Ni(e,t)}var Fi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,["timeupdate","ended"],(function(e){return r.updateContent(e)})),r.updateTextNode_(),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(){var t=this.buildCSSClass(),n=e.prototype.createEl.call(this,"div",{className:t+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text" role="presentation">'+this.localize(this.labelText_)+" </span>"});return this.contentEl_=tn("span",{className:t+"-display"},{"aria-live":"off",role:"presentation"}),n.appendChild(this.contentEl_),n},n.dispose=function(){this.contentEl_=null,this.textNode_=null,e.prototype.dispose.call(this)},n.updateTextNode_=function(e){var t=this;void 0===e&&(e=0),e=Ui(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",(function(){if(t.contentEl_){var e=t.textNode_;e&&t.contentEl_.firstChild!==e&&(e=null,gt.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),t.textNode_=s().createTextNode(t.formattedTime_),t.textNode_&&(e?t.contentEl_.replaceChild(t.textNode_,e):t.contentEl_.appendChild(t.textNode_))}})))},n.updateContent=function(e){},t}(Tr);Fi.prototype.labelText_="Time",Fi.prototype.controlText_="Time",Tr.registerComponent("TimeDisplay",Fi);var Bi=function(e){function t(){return e.apply(this,arguments)||this}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-current-time"},n.updateContent=function(e){var t;t=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)},t}(Fi);Bi.prototype.labelText_="Current Time",Bi.prototype.controlText_="Current Time",Tr.registerComponent("CurrentTimeDisplay",Bi);var ji=function(e){function t(t,n){var r,i=function(e){return r.updateContent(e)};return(r=e.call(this,t,n)||this).on(t,"durationchange",i),r.on(t,"loadstart",i),r.on(t,"loadedmetadata",i),r}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-duration"},n.updateContent=function(e){var t=this.player_.duration();this.updateTextNode_(t)},t}(Fi);ji.prototype.labelText_="Duration",ji.prototype.controlText_="Duration",Tr.registerComponent("DurationDisplay",ji);var Hi=function(e){function t(){return e.apply(this,arguments)||this}return(0,l.Z)(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"},{"aria-hidden":!0})},t}(Tr);Tr.registerComponent("TimeDivider",Hi);var Vi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"durationchange",(function(e){return r.updateContent(e)})),r}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-remaining-time"},n.createEl=function(){var t=e.prototype.createEl.call(this);return t.insertBefore(tn("span",{},{"aria-hidden":!0},"-"),this.contentEl_),t},n.updateContent=function(e){var t;"number"==typeof this.player_.duration()&&(t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t))},t}(Fi);Vi.prototype.labelText_="Remaining Time",Vi.prototype.controlText_="Remaining Time",Tr.registerComponent("RemainingTimeDisplay",Vi);var qi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).updateShowing(),r.on(r.player(),"durationchange",(function(e){return r.updateShowing(e)})),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=tn("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+" </span>"+this.localize("LIVE")},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},n.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},n.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},t}(Tr);Tr.registerComponent("LiveDisplay",qi);var Wi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).updateLiveEdgeStatus(),r.player_.liveTracker&&(r.updateLiveEdgeStatusHandler_=function(e){return r.updateLiveEdgeStatus(e)},r.on(r.player_.liveTracker,"liveedgechange",r.updateLiveEdgeStatusHandler_)),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=tn("span",{className:"vjs-seek-to-live-text",innerHTML:this.localize("LIVE")},{"aria-hidden":"true"}),t.appendChild(this.textEl_),t},n.updateLiveEdgeStatus=function(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))},n.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},n.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,e.prototype.dispose.call(this)},t}(Pi);Wi.prototype.controlText_="Seek to live, currently playing live",Tr.registerComponent("SeekToLive",Wi);var zi=function(e,t,n){return e=Number(e),Math.min(n,Math.max(t,isNaN(e)?t:e))},Gi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleMouseDown_=function(e){return r.handleMouseDown(e)},r.handleMouseUp_=function(e){return r.handleMouseUp(e)},r.handleKeyDown_=function(e){return r.handleKeyDown(e)},r.handleClick_=function(e){return r.handleClick(e)},r.handleMouseMove_=function(e){return r.handleMouseMove(e)},r.update_=function(e){return r.update(e)},r.bar=r.getChild(r.options_.barName),r.vertical(!!r.options_.vertical),r.enable(),r}(0,l.Z)(t,e);var n=t.prototype;return n.enabled=function(){return this.enabled_},n.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},n.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},n.createEl=function(t,n,r){return void 0===n&&(n={}),void 0===r&&(r={}),n.className=n.className+" vjs-slider",n=Tt({tabIndex:0},n),r=Tt({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},r),e.prototype.createEl.call(this,t,n,r)},n.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||Ft||e.preventDefault(),pn(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove_),this.on(t,"mouseup",this.handleMouseUp_),this.on(t,"touchmove",this.handleMouseMove_),this.on(t,"touchend",this.handleMouseUp_),this.handleMouseMove(e)},n.handleMouseMove=function(e){},n.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;mn(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.update()},n.update=function(){var e=this;if(this.el_&&this.bar){var t=this.getProgress();return t===this.progress_||(this.progress_=t,this.requestNamedAnimationFrame("Slider#update",(function(){var n=e.vertical()?"height":"width";e.bar.el().style[n]=(100*t).toFixed(2)+"%"}))),t}},n.getProgress=function(){return Number(zi(this.getPercent(),0,1).toFixed(4))},n.calculateDistance=function(e){var t=yn(this.el_,e);return this.vertical()?t.y:t.x},n.handleKeyDown=function(t){f().isEventKey(t,"Left")||f().isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepBack()):f().isEventKey(t,"Right")||f().isEventKey(t,"Up")?(t.preventDefault(),t.stopPropagation(),this.stepForward()):e.prototype.handleKeyDown.call(this,t)},n.handleClick=function(e){e.stopPropagation(),e.preventDefault()},n.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},t}(Tr);Tr.registerComponent("Slider",Gi);var Xi=function(e,t){return zi(e/t*100,0,100).toFixed(2)+"%"},$i=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).partEls_=[],r.on(t,"progress",(function(e){return r.update(e)})),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),n=tn("span",{className:"vjs-control-text"}),r=tn("span",{textContent:this.localize("Loaded")}),i=s().createTextNode(": ");return this.percentageEl_=tn("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),t.appendChild(n),n.appendChild(r),n.appendChild(i),n.appendChild(this.percentageEl_),t},n.dispose=function(){this.partEls_=null,this.percentageEl_=null,e.prototype.dispose.call(this)},n.update=function(e){var t=this;this.requestNamedAnimationFrame("LoadProgressBar#update",(function(){var e=t.player_.liveTracker,n=t.player_.buffered(),r=e&&e.isLive()?e.seekableEnd():t.player_.duration(),i=t.player_.bufferedEnd(),a=t.partEls_,s=Xi(i,r);t.percent_!==s&&(t.el_.style.width=s,nn(t.percentageEl_,s),t.percent_=s);for(var o=0;o<n.length;o++){var u=n.start(o),l=n.end(o),c=a[o];c||(c=t.el_.appendChild(tn()),a[o]=c),c.dataset.start===u&&c.dataset.end===l||(c.dataset.start=u,c.dataset.end=l,c.style.left=Xi(u,i),c.style.width=Xi(l-u,i))}for(var d=a.length;d>n.length;d--)t.el_.removeChild(a[d-1]);a.length=n.length}))},t}(Tr);Tr.registerComponent("LoadProgressBar",$i);var Ki=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=er(Jn((0,u.Z)(r),r.update),Qn),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},n.update=function(e,t,n){var r=vn(this.el_),i=gn(this.player_.el()),a=e.width*t;if(i&&r){var s=e.left-i.left+a,o=e.width-a+(i.right-e.right),u=r.width/2;s<u?u+=u-s:o<u&&(u=o),u<0?u=0:u>r.width&&(u=r.width),u=Math.round(u),this.el_.style.right="-"+u+"px",this.write(n)}},n.write=function(e){nn(this.el_,e)},n.updateTime=function(e,t,n,r){var i=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",(function(){var a,s=i.player_.duration();if(i.player_.liveTracker&&i.player_.liveTracker.isLive()){var o=i.player_.liveTracker.liveWindow(),u=o-t*o;a=(u<1?"":"-")+Ui(u,o)}else a=Ui(n,s);i.update(e,t,a),r&&r()}))},t}(Tr);Tr.registerComponent("TimeTooltip",Ki);var Zi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=er(Jn((0,u.Z)(r),r.update),Qn),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},n.update=function(e,t){var n=this.getChild("timeTooltip");if(n){var r=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();n.updateTime(e,t,r)}},t}(Tr);Zi.prototype.options_={children:[]},Gt||Dt||Zi.prototype.options_.children.push("timeTooltip"),Tr.registerComponent("PlayProgressBar",Zi);var Yi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=er(Jn((0,u.Z)(r),r.update),Qn),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},n.update=function(e,t){var n=this,r=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,r,(function(){n.el_.style.left=e.width*t+"px"}))},t}(Tr);Yi.prototype.options_={children:["timeTooltip"]},Tr.registerComponent("MouseTimeDisplay",Yi);var Qi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).setEventHandlers_(),r}(0,l.Z)(t,e);var n=t.prototype;return n.setEventHandlers_=function(){var e=this;this.update_=Jn(this,this.update),this.update=er(this.update_,Qn),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=function(t){return e.enableInterval_(t)},this.disableIntervalHandler_=function(t){return e.disableInterval_(t)},this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in s()&&"visibilityState"in s()&&this.on(s(),"visibilitychange",this.toggleVisibility_)},n.toggleVisibility_=function(e){"hidden"===s().visibilityState?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())},n.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,Qn))},n.disableInterval_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},n.update=function(t){var n=this;if("hidden"!==s().visibilityState){var r=e.prototype.update.call(this);return this.requestNamedAnimationFrame("SeekBar#update",(function(){var e=n.player_.ended()?n.player_.duration():n.getCurrentTime_(),t=n.player_.liveTracker,i=n.player_.duration();t&&t.isLive()&&(i=n.player_.liveTracker.liveCurrentTime()),n.percent_!==r&&(n.el_.setAttribute("aria-valuenow",(100*r).toFixed(2)),n.percent_=r),n.currentTime_===e&&n.duration_===i||(n.el_.setAttribute("aria-valuetext",n.localize("progress bar timing: currentTime={1} duration={2}",[Ui(e,i),Ui(i,i)],"{1} of {2}")),n.currentTime_=e,n.duration_=i),n.bar&&n.bar.update(gn(n.el()),n.getProgress())})),r}},n.userSeek_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)},n.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},n.getPercent=function(){var e,t=this.getCurrentTime_(),n=this.player_.liveTracker;return n&&n.isLive()?(e=(t-n.seekableStart())/n.liveWindow(),n.atLiveEdge()&&(e=1)):e=t/this.player_.duration(),e},n.handleMouseDown=function(t){kn(t)&&(t.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),e.prototype.handleMouseDown.call(this,t))},n.handleMouseMove=function(e){if(kn(e)){var t,n=this.calculateDistance(e),r=this.player_.liveTracker;if(r&&r.isLive()){if(n>=.99)return void r.seekToLiveEdge();var i=r.seekableStart(),a=r.liveCurrentTime();if((t=i+n*r.liveWindow())>=a&&(t=a),t<=i&&(t=i+.1),t===1/0)return}else(t=n*this.player_.duration())===this.player_.duration()&&(t-=.1);this.userSeek_(t)}},n.enable=function(){e.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},n.disable=function(){e.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},n.handleMouseUp=function(t){e.prototype.handleMouseUp.call(this,t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Ar(this.player_.play()):this.update_()},n.stepForward=function(){this.userSeek_(this.player_.currentTime()+5)},n.stepBack=function(){this.userSeek_(this.player_.currentTime()-5)},n.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},n.handleKeyDown=function(t){var n=this.player_.liveTracker;if(f().isEventKey(t,"Space")||f().isEventKey(t,"Enter"))t.preventDefault(),t.stopPropagation(),this.handleAction(t);else if(f().isEventKey(t,"Home"))t.preventDefault(),t.stopPropagation(),this.userSeek_(0);else if(f().isEventKey(t,"End"))t.preventDefault(),t.stopPropagation(),n&&n.isLive()?this.userSeek_(n.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(f()(t))){t.preventDefault(),t.stopPropagation();var r=10*(f().codes[f()(t)]-f().codes[0])/100;n&&n.isLive()?this.userSeek_(n.seekableStart()+n.liveWindow()*r):this.userSeek_(this.player_.duration()*r)}else f().isEventKey(t,"PgDn")?(t.preventDefault(),t.stopPropagation(),this.userSeek_(this.player_.currentTime()-60)):f().isEventKey(t,"PgUp")?(t.preventDefault(),t.stopPropagation(),this.userSeek_(this.player_.currentTime()+60)):e.prototype.handleKeyDown.call(this,t)},n.dispose=function(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in s()&&"visibilityState"in s()&&this.off(s(),"visibilitychange",this.toggleVisibility_),e.prototype.dispose.call(this)},t}(Gi);Qi.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},Gt||Dt||Qi.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Tr.registerComponent("SeekBar",Qi);var Ji=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleMouseMove=er(Jn((0,u.Z)(r),r.handleMouseMove),Qn),r.throttledHandleMouseSeek=er(Jn((0,u.Z)(r),r.handleMouseSeek),Qn),r.handleMouseUpHandler_=function(e){return r.handleMouseUp(e)},r.handleMouseDownHandler_=function(e){return r.handleMouseDown(e)},r.enable(),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},n.handleMouseMove=function(e){var t=this.getChild("seekBar");if(t){var n=t.getChild("playProgressBar"),r=t.getChild("mouseTimeDisplay");if(n||r){var i=t.el(),a=vn(i),s=yn(i,e).x;s=zi(s,0,1),r&&r.update(a,s),n&&n.update(a,t.getProgress())}}},n.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},n.enabled=function(){return this.enabled_},n.disable=function(){if(this.children().forEach((function(e){return e.disable&&e.disable()})),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,"mousemove",this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){var e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&Ar(this.player_.play())}},n.enable=function(){this.children().forEach((function(e){return e.enable&&e.enable()})),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},n.removeListenersAddedOnMousedownAndTouchstart=function(){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)},n.handleMouseDown=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)},n.handleMouseUp=function(e){var t=this.getChild("seekBar");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()},t}(Tr);Ji.prototype.options_={children:["seekBar"]},Tr.registerComponent("ProgressControl",Ji);var ea=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,["enterpictureinpicture","leavepictureinpicture"],(function(e){return r.handlePictureInPictureChange(e)})),r.on(t,["disablepictureinpicturechanged","loadedmetadata"],(function(e){return r.handlePictureInPictureEnabledChange(e)})),r.disable(),r}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-picture-in-picture-control "+e.prototype.buildCSSClass.call(this)},n.handlePictureInPictureEnabledChange=function(){s().pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()?this.enable():this.disable()},n.handlePictureInPictureChange=function(e){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange()},n.handleClick=function(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},t}(Pi);ea.prototype.controlText_="Picture-in-Picture",Tr.registerComponent("PictureInPictureToggle",ea);var ta=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"fullscreenchange",(function(e){return r.handleFullscreenChange(e)})),!1===s()[t.fsApi_.fullscreenEnabled]&&r.disable(),r}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)},n.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},n.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},t}(Pi);ta.prototype.controlText_="Fullscreen",Tr.registerComponent("FullscreenToggle",ta);var na=function(e){function t(){return e.apply(this,arguments)||this}return(0,l.Z)(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},t}(Tr);Tr.registerComponent("VolumeLevel",na);var ra=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=er(Jn((0,u.Z)(r),r.update),Qn),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})},n.update=function(e,t,n,r){if(!n){var i=gn(this.el_),a=gn(this.player_.el()),s=e.width*t;if(!a||!i)return;var o=e.left-a.left+s,u=e.width-s+(a.right-e.right),l=i.width/2;o<l?l+=l-o:u<l&&(l=u),l<0?l=0:l>i.width&&(l=i.width),this.el_.style.right="-"+l+"px"}this.write(r+"%")},n.write=function(e){nn(this.el_,e)},n.updateVolume=function(e,t,n,r,i){var a=this;this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",(function(){a.update(e,t,n,r.toFixed(0)),i&&i()}))},t}(Tr);Tr.registerComponent("VolumeLevelTooltip",ra);var ia=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=er(Jn((0,u.Z)(r),r.update),Qn),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},n.update=function(e,t,n){var r=this,i=100*t;this.getChild("volumeLevelTooltip").updateVolume(e,t,n,i,(function(){n?r.el_.style.bottom=e.height*t+"px":r.el_.style.left=e.width*t+"px"}))},t}(Tr);ia.prototype.options_={children:["volumeLevelTooltip"]},Tr.registerComponent("MouseVolumeLevelDisplay",ia);var aa=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on("slideractive",(function(e){return r.updateLastVolume_(e)})),r.on(t,"volumechange",(function(e){return r.updateARIAAttributes(e)})),t.ready((function(){return r.updateARIAAttributes()})),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},n.handleMouseDown=function(t){kn(t)&&e.prototype.handleMouseDown.call(this,t)},n.handleMouseMove=function(e){var t=this.getChild("mouseVolumeLevelDisplay");if(t){var n=this.el(),r=gn(n),i=this.vertical(),a=yn(n,e);a=i?a.y:a.x,a=zi(a,0,1),t.update(r,a,i)}kn(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},n.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},n.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},n.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},n.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},n.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},n.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},n.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",(function(){0===e.player_.volume()&&e.player_.lastVolume_(t)}))},t}(Gi);aa.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},Gt||Dt||aa.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),aa.prototype.playerEvent="volumechange",Tr.registerComponent("VolumeBar",aa);var sa=function(e){function t(t,n){var r;return void 0===n&&(n={}),n.vertical=n.vertical||!1,(void 0===n.volumeBar||wt(n.volumeBar))&&(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical),r=e.call(this,t,n)||this,function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}((0,u.Z)(r),t),r.throttledHandleMouseMove=er(Jn((0,u.Z)(r),r.handleMouseMove),Qn),r.handleMouseUpHandler_=function(e){return r.handleMouseUp(e)},r.on("mousedown",(function(e){return r.handleMouseDown(e)})),r.on("touchstart",(function(e){return r.handleMouseDown(e)})),r.on("mousemove",(function(e){return r.handleMouseMove(e)})),r.on(r.volumeBar,["focus","slideractive"],(function(){r.volumeBar.addClass("vjs-slider-active"),r.addClass("vjs-slider-active"),r.trigger("slideractive")})),r.on(r.volumeBar,["blur","sliderinactive"],(function(){r.volumeBar.removeClass("vjs-slider-active"),r.removeClass("vjs-slider-active"),r.trigger("sliderinactive")})),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},n.handleMouseDown=function(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)},n.handleMouseUp=function(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUpHandler_),this.off(t,"touchend",this.handleMouseUpHandler_)},n.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},t}(Tr);sa.prototype.options_={children:["volumeBar"]},Tr.registerComponent("VolumeControl",sa);var oa=function(e){function t(t,n){var r;return r=e.call(this,t,n)||this,function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}((0,u.Z)(r),t),r.on(t,["loadstart","volumechange"],(function(e){return r.update(e)})),r}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){var t=this.player_.volume(),n=this.player_.lastVolume_();if(0===t){var r=n<.1?.1:n;this.player_.volume(r),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},n.update=function(e){this.updateIcon_(),this.updateControlText_()},n.updateIcon_=function(){var e=this.player_.volume(),t=3;Gt&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var n=0;n<4;n++)on(this.el_,"vjs-vol-"+n);sn(this.el_,"vjs-vol-"+t)},n.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},t}(Pi);oa.prototype.controlText_="Mute",Tr.registerComponent("MuteToggle",oa);var ua=function(e){function t(t,n){var r;return void 0===n&&(n={}),void 0!==n.inline?n.inline=n.inline:n.inline=!0,(void 0===n.volumeControl||wt(n.volumeControl))&&(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline),(r=e.call(this,t,n)||this).handleKeyPressHandler_=function(e){return r.handleKeyPress(e)},r.on(t,["loadstart"],(function(e){return r.volumePanelState_(e)})),r.on(r.muteToggle,"keyup",(function(e){return r.handleKeyPress(e)})),r.on(r.volumeControl,"keyup",(function(e){return r.handleVolumeControlKeyUp(e)})),r.on("keydown",(function(e){return r.handleKeyPress(e)})),r.on("mouseover",(function(e){return r.handleMouseOver(e)})),r.on("mouseout",(function(e){return r.handleMouseOut(e)})),r.on(r.volumeControl,["slideractive"],r.sliderActive_),r.on(r.volumeControl,["sliderinactive"],r.sliderInactive_),r}(0,l.Z)(t,e);var n=t.prototype;return n.sliderActive_=function(){this.addClass("vjs-slider-active")},n.sliderInactive_=function(){this.removeClass("vjs-slider-active")},n.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},n.createEl=function(){var t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},n.dispose=function(){this.handleMouseOut(),e.prototype.dispose.call(this)},n.handleVolumeControlKeyUp=function(e){f().isEventKey(e,"Esc")&&this.muteToggle.focus()},n.handleMouseOver=function(e){this.addClass("vjs-hover"),zn(s(),"keyup",this.handleKeyPressHandler_)},n.handleMouseOut=function(e){this.removeClass("vjs-hover"),Gn(s(),"keyup",this.handleKeyPressHandler_)},n.handleKeyPress=function(e){f().isEventKey(e,"Esc")&&this.handleMouseOut()},t}(Tr);ua.prototype.options_={children:["muteToggle","volumeControl"]},Tr.registerComponent("VolumePanel",ua);var la=function(e){function t(t,n){var r;return r=e.call(this,t,n)||this,n&&(r.menuButton_=n.menuButton),r.focusedChild_=-1,r.on("keydown",(function(e){return r.handleKeyDown(e)})),r.boundHandleBlur_=function(e){return r.handleBlur(e)},r.boundHandleTapClick_=function(e){return r.handleTapClick(e)},r}(0,l.Z)(t,e);var n=t.prototype;return n.addEventListenerForItem=function(e){e instanceof Tr&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},n.removeEventListenerForItem=function(e){e instanceof Tr&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))},n.removeChild=function(t){"string"==typeof t&&(t=this.getChild(t)),this.removeEventListenerForItem(t),e.prototype.removeChild.call(this,t)},n.addItem=function(e){var t=this.addChild(e);t&&this.addEventListenerForItem(t)},n.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=tn(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var n=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return n.appendChild(this.contentEl_),zn(n,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),n},n.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,e.prototype.dispose.call(this)},n.handleBlur=function(e){var t=e.relatedTarget||s().activeElement;if(!this.children().some((function(e){return e.el()===t}))){var n=this.menuButton_;n&&n.buttonPressed_&&t!==n.el().firstChild&&n.unpressButton()}},n.handleTapClick=function(e){if(this.menuButton_){this.menuButton_.unpressButton();var t=this.children();if(!Array.isArray(t))return;var n=t.filter((function(t){return t.el()===e.target}))[0];if(!n)return;"CaptionSettingsMenuItem"!==n.name()&&this.menuButton_.focus()}},n.handleKeyDown=function(e){f().isEventKey(e,"Left")||f().isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(f().isEventKey(e,"Right")||f().isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())},n.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},n.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},n.focus=function(e){void 0===e&&(e=0);var t=this.children().slice();t.length&&t[0].hasClass("vjs-menu-title")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())},t}(Tr);Tr.registerComponent("Menu",la);var ca=function(e){function t(t,n){var r;void 0===n&&(n={}),(r=e.call(this,t,n)||this).menuButton_=new Pi(t,n),r.menuButton_.controlText(r.controlText_),r.menuButton_.el_.setAttribute("aria-haspopup","true");var i=Pi.prototype.buildCSSClass();r.menuButton_.el_.className=r.buildCSSClass()+" "+i,r.menuButton_.removeClass("vjs-control"),r.addChild(r.menuButton_),r.update(),r.enabled_=!0;var a=function(e){return r.handleClick(e)};return r.handleMenuKeyUp_=function(e){return r.handleMenuKeyUp(e)},r.on(r.menuButton_,"tap",a),r.on(r.menuButton_,"click",a),r.on(r.menuButton_,"keydown",(function(e){return r.handleKeyDown(e)})),r.on(r.menuButton_,"mouseenter",(function(){r.addClass("vjs-hover"),r.menu.show(),zn(s(),"keyup",r.handleMenuKeyUp_)})),r.on("mouseleave",(function(e){return r.handleMouseLeave(e)})),r.on("keydown",(function(e){return r.handleSubmenuKeyDown(e)})),r}(0,l.Z)(t,e);var n=t.prototype;return n.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},n.createMenu=function(){var e=new la(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=tn("li",{className:"vjs-menu-title",innerHTML:mr(this.options_.title),tabIndex:-1}),n=new Tr(this.player_,{el:t});e.addItem(n)}if(this.items=this.createItems(),this.items)for(var r=0;r<this.items.length;r++)e.addItem(this.items[r]);return e},n.createItems=function(){},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},n.buildWrapperCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+Pi.prototype.buildCSSClass()+" "+e.prototype.buildCSSClass.call(this)},n.buildCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+e.prototype.buildCSSClass.call(this)},n.controlText=function(e,t){return void 0===t&&(t=this.menuButton_.el()),this.menuButton_.controlText(e,t)},n.dispose=function(){this.handleMouseLeave(),e.prototype.dispose.call(this)},n.handleClick=function(e){this.buttonPressed_?this.unpressButton():this.pressButton()},n.handleMouseLeave=function(e){this.removeClass("vjs-hover"),Gn(s(),"keyup",this.handleMenuKeyUp_)},n.focus=function(){this.menuButton_.focus()},n.blur=function(){this.menuButton_.blur()},n.handleKeyDown=function(e){f().isEventKey(e,"Esc")||f().isEventKey(e,"Tab")?(this.buttonPressed_&&this.unpressButton(),f().isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus())):(f().isEventKey(e,"Up")||f().isEventKey(e,"Down"))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))},n.handleMenuKeyUp=function(e){(f().isEventKey(e,"Esc")||f().isEventKey(e,"Tab"))&&this.removeClass("vjs-hover")},n.handleSubmenuKeyPress=function(e){this.handleSubmenuKeyDown(e)},n.handleSubmenuKeyDown=function(e){(f().isEventKey(e,"Esc")||f().isEventKey(e,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),f().isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus()))},n.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),Gt&&Jt())return;this.menu.focus()}},n.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},n.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},n.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},t}(Tr);Tr.registerComponent("MenuButton",ca);var da=function(e){function t(t,n){var r,i=n.tracks;if((r=e.call(this,t,n)||this).items.length<=1&&r.hide(),!i)return(0,u.Z)(r);var a=Jn((0,u.Z)(r),r.update);return i.addEventListener("removetrack",a),i.addEventListener("addtrack",a),i.addEventListener("labelchange",a),r.player_.on("ready",a),r.player_.on("dispose",(function(){i.removeEventListener("removetrack",a),i.removeEventListener("addtrack",a),i.removeEventListener("labelchange",a)})),r}return(0,l.Z)(t,e),t}(ca);Tr.registerComponent("TrackButton",da);var ha=["Tab","Esc","Up","Down","Right","Left"],fa=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).selectable=n.selectable,r.isSelected_=n.selected||!1,r.multiSelectable=n.multiSelectable,r.selected(r.isSelected_),r.selectable?r.multiSelectable?r.el_.setAttribute("role","menuitemcheckbox"):r.el_.setAttribute("role","menuitemradio"):r.el_.setAttribute("role","menuitem"),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(t,n,r){return this.nonIconControl=!0,e.prototype.createEl.call(this,"li",Tt({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},n),r)},n.handleKeyDown=function(t){ha.some((function(e){return f().isEventKey(t,e)}))||e.prototype.handleKeyDown.call(this,t)},n.handleClick=function(e){this.selected(!0)},n.selected=function(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},t}(wi);Tr.registerComponent("MenuItem",fa);var pa=function(e){function t(t,n){var r,a=n.track,o=t.textTracks();n.label=a.label||a.language||"Unknown",n.selected="showing"===a.mode,(r=e.call(this,t,n)||this).track=a,r.kinds=(n.kinds||[n.kind||r.track.kind]).filter(Boolean);var l,c=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleTracksChange.apply((0,u.Z)(r),t)},d=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleSelectedLanguageChange.apply((0,u.Z)(r),t)};return t.on(["loadstart","texttrackchange"],c),o.addEventListener("change",c),o.addEventListener("selectedlanguagechange",d),r.on("dispose",(function(){t.off(["loadstart","texttrackchange"],c),o.removeEventListener("change",c),o.removeEventListener("selectedlanguagechange",d)})),void 0===o.onchange&&r.on(["tap","click"],(function(){if("object"!=typeof i().Event)try{l=new(i().Event)("change")}catch(e){}l||(l=s().createEvent("Event")).initEvent("change",!0,!0),o.dispatchEvent(l)})),r.handleTracksChange(),r}(0,l.Z)(t,e);var n=t.prototype;return n.handleClick=function(t){var n=this.track,r=this.player_.textTracks();if(e.prototype.handleClick.call(this,t),r)for(var i=0;i<r.length;i++){var a=r[i];-1!==this.kinds.indexOf(a.kind)&&(a===n?"showing"!==a.mode&&(a.mode="showing"):"disabled"!==a.mode&&(a.mode="disabled"))}},n.handleTracksChange=function(e){var t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)},n.handleSelectedLanguageChange=function(e){if("showing"===this.track.mode){var t=this.player_.cache_.selectedLanguage;if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},n.dispose=function(){this.track=null,e.prototype.dispose.call(this)},t}(fa);Tr.registerComponent("TextTrackMenuItem",pa);var ma=function(e){function t(t,n){return n.track={player:t,kind:n.kind,kinds:n.kinds,default:!1,mode:"disabled"},n.kinds||(n.kinds=[n.kind]),n.label?n.track.label=n.label:n.track.label=n.kinds.join(" and ")+" off",n.selectable=!0,n.multiSelectable=!1,e.call(this,t,n)||this}(0,l.Z)(t,e);var n=t.prototype;return n.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,i=t.length;r<i;r++){var a=t[r];if(this.options_.kinds.indexOf(a.kind)>-1&&"showing"===a.mode){n=!1;break}}n!==this.isSelected_&&this.selected(n)},n.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),n=!0,r=0,i=t.length;r<i;r++){var a=t[r];if(["captions","descriptions","subtitles"].indexOf(a.kind)>-1&&"showing"===a.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(pa);Tr.registerComponent("OffTextTrackMenuItem",ma);var ga=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.textTracks(),e.call(this,t,n)||this}return(0,l.Z)(t,e),t.prototype.createItems=function(e,t){var n;void 0===e&&(e=[]),void 0===t&&(t=pa),this.label_&&(n=this.label_+" off"),e.push(new ma(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i<r.length;i++){var a=r[i];if(this.kinds_.indexOf(a.kind)>-1){var s=new t(this.player_,{track:a,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});s.addClass("vjs-"+a.kind+"-menu-item"),e.push(s)}}return e},t}(da);Tr.registerComponent("TextTrackButton",ga);var va=function(e){function t(t,n){var r,i=n.track,a=n.cue,s=t.currentTime();return n.selectable=!0,n.multiSelectable=!1,n.label=a.text,n.selected=a.startTime<=s&&s<a.endTime,(r=e.call(this,t,n)||this).track=i,r.cue=a,i.addEventListener("cuechange",Jn((0,u.Z)(r),r.update)),r}(0,l.Z)(t,e);var n=t.prototype;return n.handleClick=function(t){e.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},n.update=function(e){var t=this.cue,n=this.player_.currentTime();this.selected(t.startTime<=n&&n<t.endTime)},t}(fa);Tr.registerComponent("ChaptersTrackMenuItem",va);var ya=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildWrapperCSSClass.call(this)},n.update=function(t){this.track_&&(!t||"addtrack"!==t.type&&"removetrack"!==t.type)||this.setTrack(this.findChaptersTrack()),e.prototype.update.call(this)},n.setTrack=function(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";var n=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);n&&n.addEventListener("load",this.updateHandler_)}}},n.findChaptersTrack=function(){for(var e=this.player_.textTracks()||[],t=e.length-1;t>=0;t--){var n=e[t];if(n.kind===this.kind_)return n}},n.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(mr(this.kind_))},n.createMenu=function(){return this.options_.title=this.getMenuCaption(),e.prototype.createMenu.call(this)},n.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var n=0,r=t.length;n<r;n++){var i=t[n],a=new va(this.player_,{track:this.track_,cue:i});e.push(a)}return e},t}(ga);ya.prototype.kind_="chapters",ya.prototype.controlText_="Chapters",Tr.registerComponent("ChaptersButton",ya);var _a=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var a=t.textTracks(),s=Jn((0,u.Z)(i),i.handleTracksChange);return a.addEventListener("change",s),i.on("dispose",(function(){a.removeEventListener("change",s)})),i}(0,l.Z)(t,e);var n=t.prototype;return n.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!1,r=0,i=t.length;r<i;r++){var a=t[r];if(a.kind!==this.kind_&&"showing"===a.mode){n=!0;break}}n?this.disable():this.enable()},n.buildCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(ga);_a.prototype.kind_="descriptions",_a.prototype.controlText_="Descriptions",Tr.registerComponent("DescriptionsButton",_a);var ba=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(ga);ba.prototype.kind_="subtitles",ba.prototype.controlText_="Subtitles",Tr.registerComponent("SubtitlesButton",ba);var Ta=function(e){function t(t,n){var r;return n.track={player:t,kind:n.kind,label:n.kind+" settings",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="CaptionSettingsMenuItem",(r=e.call(this,t,n)||this).addClass("vjs-texttrack-settings"),r.controlText(", opens "+n.kind+" settings dialog"),r}return(0,l.Z)(t,e),t.prototype.handleClick=function(e){this.player().getChild("textTrackSettings").open()},t}(pa);Tr.registerComponent("CaptionSettingsMenuItem",Ta);var Sa=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-captions-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-captions-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new Ta(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t)},t}(ga);Sa.prototype.kind_="captions",Sa.prototype.controlText_="Captions",Tr.registerComponent("CaptionsButton",Sa);var wa=function(e){function t(){return e.apply(this,arguments)||this}return(0,l.Z)(t,e),t.prototype.createEl=function(t,n,r){var i='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"captions"===this.options_.track.kind&&(i+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n "),i+="</span>",e.prototype.createEl.call(this,t,Tt({innerHTML:i},n),r)},t}(pa);Tr.registerComponent("SubsCapsMenuItem",wa);var ka=function(e){function t(t,n){var r;return void 0===n&&(n={}),(r=e.call(this,t,n)||this).label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(r.player_.language_)>-1&&(r.label_="captions"),r.menuButton_.controlText(mr(r.label_)),r}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new Ta(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t,wa)},t}(ga);ka.prototype.kinds_=["captions","subtitles"],ka.prototype.controlText_="Subtitles",Tr.registerComponent("SubsCapsButton",ka);var Ea=function(e){function t(t,n){var r,i=n.track,a=t.audioTracks();n.label=i.label||i.language||"Unknown",n.selected=i.enabled,(r=e.call(this,t,n)||this).track=i,r.addClass("vjs-"+i.kind+"-menu-item");var s=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleTracksChange.apply((0,u.Z)(r),t)};return a.addEventListener("change",s),r.on("dispose",(function(){a.removeEventListener("change",s)})),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(t,n,r){var i='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"main-desc"===this.options_.track.kind&&(i+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Descriptions")+"</span>\n "),i+="</span>",e.prototype.createEl.call(this,t,Tt({innerHTML:i},n),r)},n.handleClick=function(t){e.prototype.handleClick.call(this,t),this.track.enabled=!0},n.handleTracksChange=function(e){this.selected(this.track.enabled)},t}(fa);Tr.registerComponent("AudioTrackMenuItem",Ea);var Ca=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.audioTracks(),e.call(this,t,n)||this}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-audio-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-audio-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(e){void 0===e&&(e=[]),this.hideThreshold_=1;for(var t=this.player_.audioTracks(),n=0;n<t.length;n++){var r=t[n];e.push(new Ea(this.player_,{track:r,selectable:!0,multiSelectable:!1}))}return e},t}(da);Ca.prototype.controlText_="Audio Track",Tr.registerComponent("AudioTrackButton",Ca);var xa=function(e){function t(t,n){var r,i=n.rate,a=parseFloat(i,10);return n.label=i,n.selected=1===a,n.selectable=!0,n.multiSelectable=!1,(r=e.call(this,t,n)||this).label=i,r.rate=a,r.on(t,"ratechange",(function(e){return r.update(e)})),r}(0,l.Z)(t,e);var n=t.prototype;return n.handleClick=function(t){e.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},n.update=function(e){this.selected(this.player().playbackRate()===this.rate)},t}(fa);xa.prototype.contentElType="button",Tr.registerComponent("PlaybackRateMenuItem",xa);var Ia=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).menuButton_.el_.setAttribute("aria-describedby",r.labelElId_),r.updateVisibility(),r.updateLabel(),r.on(t,"loadstart",(function(e){return r.updateVisibility(e)})),r.on(t,"ratechange",(function(e){return r.updateLabel(e)})),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this);return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=tn("div",{className:"vjs-playback-rate-value",id:this.labelElId_,innerHTML:"1x"}),t.appendChild(this.labelEl_),t},n.dispose=function(){this.labelEl_=null,e.prototype.dispose.call(this)},n.buildCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildWrapperCSSClass.call(this)},n.createMenu=function(){var e=new la(this.player()),t=this.playbackRates();if(t)for(var n=t.length-1;n>=0;n--)e.addChild(new xa(this.player(),{rate:t[n]+"x"}));return e},n.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},n.handleClick=function(e){for(var t=this.player().playbackRate(),n=this.playbackRates(),r=n[0],i=0;i<n.length;i++)if(n[i]>t){r=n[i];break}this.player().playbackRate(r)},n.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},n.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},n.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},n.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},t}(ca);Ia.prototype.controlText_="Playback Rate",Tr.registerComponent("PlaybackRateMenuButton",Ia);var Aa=function(e){function t(){return e.apply(this,arguments)||this}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},t}(Tr);Tr.registerComponent("Spacer",Aa);var Oa=function(e){function t(){return e.apply(this,arguments)||this}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)},n.createEl=function(){var t=e.prototype.createEl.call(this,{className:this.buildCSSClass()});return t.innerHTML=" ",t},t}(Aa);Tr.registerComponent("CustomControlSpacer",Oa);var Pa=function(e){function t(){return e.apply(this,arguments)||this}return(0,l.Z)(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(Tr);Pa.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in s()&&Pa.prototype.options_.children.splice(Pa.prototype.options_.children.length-1,0,"pictureInPictureToggle"),Tr.registerComponent("ControlBar",Pa);var La=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"error",(function(e){return r.open(e)})),r}(0,l.Z)(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-error-display "+e.prototype.buildCSSClass.call(this)},n.content=function(){var e=this.player().error();return e?this.localize(e.message):""},t}(Lr);La.prototype.options_=(0,o.Z)({},Lr.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),Tr.registerComponent("ErrorDisplay",La);var Da="vjs-text-track-settings",Ra=["#000","Black"],Ma=["#00F","Blue"],Na=["#0FF","Cyan"],Ua=["#0F0","Green"],Fa=["#F0F","Magenta"],Ba=["#F00","Red"],ja=["#FFF","White"],Ha=["#FF0","Yellow"],Va=["1","Opaque"],qa=["0.5","Semi-Transparent"],Wa=["0","Transparent"],za={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Ra,ja,Ba,Ua,Ma,Ha,Fa,Na]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[Va,qa,Wa]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[ja,Ra,Ba,Ua,Ma,Ha,Fa,Na]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(e){return"1.00"===e?null:Number(e)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[Va,qa]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[Wa,qa,Va]}};function Ga(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}za.windowColor.options=za.backgroundColor.options;var Xa=function(e){function t(t,n){var r;return n.temporary=!1,(r=e.call(this,t,n)||this).updateDisplay=r.updateDisplay.bind((0,u.Z)(r)),r.fill(),r.hasBeenOpened_=r.hasBeenFilled_=!0,r.endDialog=tn("p",{className:"vjs-control-text",textContent:r.localize("End of dialog window.")}),r.el().appendChild(r.endDialog),r.setDefaults(),void 0===n.persistTextTrackSettings&&(r.options_.persistTextTrackSettings=r.options_.playerOptions.persistTextTrackSettings),r.on(r.$(".vjs-done-button"),"click",(function(){r.saveSettings(),r.close()})),r.on(r.$(".vjs-default-button"),"click",(function(){r.setDefaults(),r.updateDisplay()})),bt(za,(function(e){r.on(r.$(e.selector),"change",r.updateDisplay)})),r.options_.persistTextTrackSettings&&r.restoreSettings(),r}(0,l.Z)(t,e);var n=t.prototype;return n.dispose=function(){this.endDialog=null,e.prototype.dispose.call(this)},n.createElSelect_=function(e,t,n){var r=this;void 0===t&&(t=""),void 0===n&&(n="label");var i=za[e],a=i.id.replace("%s",this.id_),s=[t,a].join(" ").trim();return["<"+n+' id="'+a+'" class="'+("label"===n?"vjs-label":"")+'">',this.localize(i.label),"</"+n+">",'<select aria-labelledby="'+s+'">'].concat(i.options.map((function(e){var t=a+"-"+e[1].replace(/\W+/g,"");return['<option id="'+t+'" value="'+e[0]+'" ','aria-labelledby="'+s+" "+t+'">',r.localize(e[1]),"</option>"].join("")}))).concat("</select>").join("")},n.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",e),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",e),"</span>","</fieldset>"].join("")},n.createElBgColor_=function(){var e="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",e),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",e),"</span>","</fieldset>"].join("")},n.createElWinColor_=function(){var e="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",e),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",e),"</span>","</fieldset>"].join("")},n.createElColors_=function(){return tn("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},n.createElFont_=function(){return tn("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},n.createElControls_=function(){var e=this.localize("restore all settings to the default values");return tn("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+e+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+e+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},n.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},n.label=function(){return this.localize("Caption Settings Dialog")},n.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},n.buildCSSClass=function(){return e.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},n.getValues=function(){var e,t,n,r=this;return t=function(e,t,n){var i,a,s=(i=r.$(t.selector),a=t.parser,Ga(i.options[i.options.selectedIndex].value,a));return void 0!==s&&(e[n]=s),e},void 0===(n={})&&(n=0),_t(e=za).reduce((function(n,r){return t(n,e[r],r)}),n)},n.setValues=function(e){var t=this;bt(za,(function(n,r){!function(e,t,n){if(t)for(var r=0;r<e.options.length;r++)if(Ga(e.options[r].value,n)===t){e.selectedIndex=r;break}}(t.$(n.selector),e[r],n.parser)}))},n.setDefaults=function(){var e=this;bt(za,(function(t){var n=t.hasOwnProperty("default")?t.default:0;e.$(t.selector).selectedIndex=n}))},n.restoreSettings=function(){var e;try{e=JSON.parse(i().localStorage.getItem(Da))}catch(e){gt.warn(e)}e&&this.setValues(e)},n.saveSettings=function(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?i().localStorage.setItem(Da,JSON.stringify(e)):i().localStorage.removeItem(Da)}catch(e){gt.warn(e)}}},n.updateDisplay=function(){var e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()},n.conditionalBlur_=function(){this.previouslyActiveEl_=null;var e=this.player_.controlBar,t=e&&e.subsCapsButton,n=e&&e.captionsButton;t?t.focus():n&&n.focus()},t}(Lr);Tr.registerComponent("TextTrackSettings",Xa);var $a=function(e){function t(t,n){var r,a=n.ResizeObserver||i().ResizeObserver;null===n.ResizeObserver&&(a=!1);var s=gr({createEl:!a,reportTouchActivity:!1},n);return(r=e.call(this,t,s)||this).ResizeObserver=n.ResizeObserver||i().ResizeObserver,r.loadListener_=null,r.resizeObserver_=null,r.debouncedHandler_=function(e,t,n,r){var a;void 0===r&&(r=i());var s=function(){var t=this,n=arguments,i=function(){a=null,i=null,e.apply(t,n)};r.clearTimeout(a),a=r.setTimeout(i,100)};return s.cancel=function(){r.clearTimeout(a),a=null},s}((function(){r.resizeHandler()}),0,0,(0,u.Z)(r)),a?(r.resizeObserver_=new r.ResizeObserver(r.debouncedHandler_),r.resizeObserver_.observe(t.el())):(r.loadListener_=function(){if(r.el_&&r.el_.contentWindow){var e=r.debouncedHandler_,t=r.unloadListener_=function(){Gn(this,"resize",e),Gn(this,"unload",t),t=null};zn(r.el_.contentWindow,"unload",t),zn(r.el_.contentWindow,"resize",e)}},r.one("load",r.loadListener_)),r}(0,l.Z)(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1},{"aria-hidden":"true"})},n.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},n.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,e.prototype.dispose.call(this)},t}(Tr);Tr.registerComponent("ResizeManager",$a);var Ka={trackingThreshold:30,liveTolerance:15},Za=function(e){function t(t,n){var r,i=gr(Ka,n,{createEl:!1});return(r=e.call(this,t,i)||this).handleVisibilityChange_=function(e){return r.handleVisibilityChange(e)},r.trackLiveHandler_=function(){return r.trackLive_()},r.handlePlay_=function(e){return r.handlePlay(e)},r.handleFirstTimeupdate_=function(e){return r.handleFirstTimeupdate(e)},r.handleSeeked_=function(e){return r.handleSeeked(e)},r.seekToLiveEdge_=function(e){return r.seekToLiveEdge(e)},r.reset_(),r.on(r.player_,"durationchange",(function(e){return r.handleDurationchange(e)})),r.one(r.player_,"canplay",(function(){return r.toggleTracking()})),jt&&"hidden"in s()&&"visibilityState"in s()&&r.on(s(),"visibilitychange",r.handleVisibilityChange_),r}(0,l.Z)(t,e);var n=t.prototype;return n.handleVisibilityChange=function(){this.player_.duration()===1/0&&(s().hidden?this.stopTracking():this.startTracking())},n.trackLive_=function(){var e=this.player_.seekable();if(e&&e.length){var t=Number(i().performance.now().toFixed(4)),n=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+n;var r=this.liveCurrentTime(),a=this.player_.currentTime(),s=this.player_.paused()||this.seekedBehindLive_||Math.abs(r-a)>this.options_.liveTolerance;this.timeupdateSeen_&&r!==1/0||(s=!1),s!==this.behindLiveEdge_&&(this.behindLiveEdge_=s,this.trigger("liveedgechange"))}},n.handleDurationchange=function(){this.toggleTracking()},n.toggleTracking=function(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())},n.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,Qn),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))},n.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)},n.handleSeeked=function(){var e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()},n.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)},n.reset_=function(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)},n.nextSeekedFromUser=function(){this.nextSeekedFromUser_=!0},n.stopTracking=function(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))},n.seekableEnd=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.end(n));return t.length?t.sort()[t.length-1]:1/0},n.seekableStart=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.start(n));return t.length?t.sort()[0]:0},n.liveWindow=function(){var e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()},n.isLive=function(){return this.isTracking()},n.atLiveEdge=function(){return!this.behindLiveEdge()},n.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},n.pastSeekEnd=function(){var e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_},n.behindLiveEdge=function(){return this.behindLiveEdge_},n.isTracking=function(){return"number"==typeof this.trackingInterval_},n.seekToLiveEdge=function(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))},n.dispose=function(){this.off(s(),"visibilitychange",this.handleVisibilityChange_),this.stopTracking(),e.prototype.dispose.call(this)},t}(Tr);Tr.registerComponent("LiveTracker",Za);var Ya,Qa=function(e){var t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;var n=e.$$("source"),r=[],i="";if(!n.length)return!1;for(var a=0;a<n.length;a++){var s=n[a].src;s&&-1===r.indexOf(s)&&r.push(s)}return!!r.length&&(1===r.length&&(i=r[0]),e.triggerSourceset(i),!0)},Ja=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(e){var t=s().createElement(this.nodeName.toLowerCase());t.innerHTML=e;for(var n=s().createDocumentFragment();t.childNodes.length;)n.appendChild(t.childNodes[0]);return this.innerText="",i().Element.prototype.appendChild.call(this,n),this.innerHTML}}),es=function(e,t){for(var n={},r=0;r<e.length&&!((n=Object.getOwnPropertyDescriptor(e[r],t))&&n.set&&n.get);r++);return n.enumerable=!0,n.configurable=!0,n},ts=function(e){var t=e.el();if(!t.resetSourceWatch_){var n={},r=function(e){return es([e.el(),i().HTMLMediaElement.prototype,i().Element.prototype,Ja],"innerHTML")}(e),a=function(n){return function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var s=n.apply(t,i);return Qa(e),s}};["append","appendChild","insertAdjacentHTML"].forEach((function(e){t[e]&&(n[e]=t[e],t[e]=a(n[e]))})),Object.defineProperty(t,"innerHTML",gr(r,{set:a(r.set)})),t.resetSourceWatch_=function(){t.resetSourceWatch_=null,Object.keys(n).forEach((function(e){t[e]=n[e]})),Object.defineProperty(t,"innerHTML",r)},e.one("sourceset",t.resetSourceWatch_)}},ns=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?$r(i().Element.prototype.getAttribute.call(this,"src")):""},set:function(e){return i().Element.prototype.setAttribute.call(this,"src",e),e}}),rs=function(e,t,n,r){void 0===r&&(r=!0);var i=function(n){return Object.defineProperty(e,t,{value:n,enumerable:!0,writable:!0})},a={configurable:!0,enumerable:!0,get:function(){var e=n();return i(e),e}};return r&&(a.set=i),Object.defineProperty(e,t,a)},is=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i=t.source,a=!1;if(i&&(r.el_.currentSrc!==i.src||t.tag&&3===t.tag.initNetworkState_)?r.setSource(i):r.handleLateInit_(r.el_),t.enableSourceset&&r.setupSourcesetHandling_(),r.isScrubbing_=!1,r.el_.hasChildNodes()){for(var s=r.el_.childNodes,o=s.length,u=[];o--;){var l=s[o];"track"===l.nodeName.toLowerCase()&&(r.featuresNativeTextTracks?(r.remoteTextTrackEls().addTrackElement_(l),r.remoteTextTracks().addTrack(l.track),r.textTracks().addTrack(l.track),a||r.el_.hasAttribute("crossorigin")||!Zr(l.src)||(a=!0)):u.push(l))}for(var c=0;c<u.length;c++)r.el_.removeChild(u[c])}return r.proxyNativeTracks_(),r.featuresNativeTextTracks&&a&>.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\nThis may prevent text tracks from loading."),r.restoreMetadataTracksInIOSNativePlayer_(),(qt||zt||Mt)&&!0===t.nativeControlsForTouch&&r.setControls(!0),r.proxyWebkitFullscreen_(),r.triggerReady(),r}(0,l.Z)(t,e);var n=t.prototype;return n.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),t.disposeMediaElement(this.el_),this.options_=null,e.prototype.dispose.call(this)},n.setupSourcesetHandling_=function(){!function(e){if(e.featuresSourceset){var t=e.el();if(!t.resetSourceset_){var n=function(e){return es([e.el(),i().HTMLMediaElement.prototype,ns],"src")}(e),r=t.setAttribute,a=t.load;Object.defineProperty(t,"src",gr(n,{set:function(r){var i=n.set.call(t,r);return e.triggerSourceset(t.src),i}})),t.setAttribute=function(n,i){var a=r.call(t,n,i);return/src/i.test(n)&&e.triggerSourceset(t.src),a},t.load=function(){var n=a.call(t);return Qa(e)||(e.triggerSourceset(""),ts(e)),n},t.currentSrc?e.triggerSourceset(t.currentSrc):Qa(e)||ts(e),t.resetSourceset_=function(){t.resetSourceset_=null,t.load=a,t.setAttribute=r,Object.defineProperty(t,"src",n),t.resetSourceWatch_&&t.resetSourceWatch_()}}}}(this)},n.restoreMetadataTracksInIOSNativePlayer_=function(){var e,t=this.textTracks(),n=function(){e=[];for(var n=0;n<t.length;n++){var r=t[n];"metadata"===r.kind&&e.push({track:r,storedMode:r.mode})}};n(),t.addEventListener("change",n),this.on("dispose",(function(){return t.removeEventListener("change",n)}));var r=function n(){for(var r=0;r<e.length;r++){var i=e[r];"disabled"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}t.removeEventListener("change",n)};this.on("webkitbeginfullscreen",(function(){t.removeEventListener("change",n),t.removeEventListener("change",r),t.addEventListener("change",r)})),this.on("webkitendfullscreen",(function(){t.removeEventListener("change",n),t.addEventListener("change",n),t.removeEventListener("change",r)}))},n.overrideNative_=function(e,t){var n=this;if(t===this["featuresNative"+e+"Tracks"]){var r=e.toLowerCase();this[r+"TracksListeners_"]&&Object.keys(this[r+"TracksListeners_"]).forEach((function(e){n.el()[r+"Tracks"].removeEventListener(e,n[r+"TracksListeners_"][e])})),this["featuresNative"+e+"Tracks"]=!t,this[r+"TracksListeners_"]=null,this.proxyNativeTracksForType_(r)}},n.overrideNativeAudioTracks=function(e){this.overrideNative_("Audio",e)},n.overrideNativeVideoTracks=function(e){this.overrideNative_("Video",e)},n.proxyNativeTracksForType_=function(e){var t=this,n=ii[e],r=this.el()[n.getterName],i=this[n.getterName]();if(this["featuresNative"+n.capitalName+"Tracks"]&&r&&r.addEventListener){var a={change:function(n){var r={type:"change",target:i,currentTarget:i,srcElement:i};i.trigger(r),"text"===e&&t[ai.remoteText.getterName]().trigger(r)},addtrack:function(e){i.addTrack(e.track)},removetrack:function(e){i.removeTrack(e.track)}},s=function(){for(var e=[],t=0;t<i.length;t++){for(var n=!1,a=0;a<r.length;a++)if(r[a]===i[t]){n=!0;break}n||e.push(i[t])}for(;e.length;)i.removeTrack(e.shift())};this[n.getterName+"Listeners_"]=a,Object.keys(a).forEach((function(e){var n=a[e];r.addEventListener(e,n),t.on("dispose",(function(t){return r.removeEventListener(e,n)}))})),this.on("loadstart",s),this.on("dispose",(function(e){return t.off("loadstart",s)}))}},n.proxyNativeTracks_=function(){var e=this;ii.names.forEach((function(t){e.proxyNativeTracksForType_(t)}))},n.createEl=function(){var e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){var n=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(n,e),t.disposeMediaElement(e),e=n}else{e=s().createElement("video");var r=gr({},this.options_.tag&&cn(this.options_.tag));qt&&!0===this.options_.nativeControlsForTouch||delete r.controls,ln(e,Tt(r,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&hn(e,"preload",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);for(var i=["loop","muted","playsinline","autoplay"],a=0;a<i.length;a++){var o=i[a],u=this.options_[o];void 0!==u&&(u?hn(e,o,o):fn(e,o),e[o]=u)}return e},n.handleLateInit_=function(e){if(0!==e.networkState&&3!==e.networkState){if(0===e.readyState){var t=!1,n=function(){t=!0};this.on("loadstart",n);var r=function(){t||this.trigger("loadstart")};return this.on("loadedmetadata",r),void this.ready((function(){this.off("loadstart",n),this.off("loadedmetadata",r),t||this.trigger("loadstart")}))}var i=["loadstart"];i.push("loadedmetadata"),e.readyState>=2&&i.push("loadeddata"),e.readyState>=3&&i.push("canplay"),e.readyState>=4&&i.push("canplaythrough"),this.ready((function(){i.forEach((function(e){this.trigger(e)}),this)}))}},n.setScrubbing=function(e){this.isScrubbing_=e},n.scrubbing=function(){return this.isScrubbing_},n.setCurrentTime=function(e){try{this.isScrubbing_&&this.el_.fastSeek&&Xt?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){gt(e,"Video is not ready. (Video.js)")}},n.duration=function(){var e=this;return this.el_.duration===1/0&&Dt&&Ft&&0===this.el_.currentTime?(this.on("timeupdate",(function t(){e.el_.currentTime>0&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",t))})),NaN):this.el_.duration||NaN},n.width=function(){return this.el_.offsetWidth},n.height=function(){return this.el_.offsetHeight},n.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen"in this.el_){var t=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},n=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",n),this.on("dispose",(function(){e.off("webkitbeginfullscreen",n),e.off("webkitendfullscreen",t)}))}},n.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var e=i().navigator&&i().navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},n.enterFullScreen=function(){var e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Ar(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}}),0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}},n.exitFullScreen=function(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))},n.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},n.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},n.reset=function(){t.resetMediaElement(this.el_)},n.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},n.setControls=function(e){this.el_.controls=!!e},n.addTextTrack=function(t,n,r){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,n,r):e.prototype.addTextTrack.call(this,t,n,r)},n.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return e.prototype.createRemoteTextTrack.call(this,t);var n=s().createElement("track");return t.kind&&(n.kind=t.kind),t.label&&(n.label=t.label),(t.language||t.srclang)&&(n.srclang=t.language||t.srclang),t.default&&(n.default=t.default),t.id&&(n.id=t.id),t.src&&(n.src=t.src),n},n.addRemoteTextTrack=function(t,n){var r=e.prototype.addRemoteTextTrack.call(this,t,n);return this.featuresNativeTextTracks&&this.el().appendChild(r),r},n.removeRemoteTextTrack=function(t){if(e.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var n=this.$$("track"),r=n.length;r--;)t!==n[r]&&t!==n[r].track||this.el().removeChild(n[r])},n.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),i().performance&&"function"==typeof i().performance.now?e.creationTime=i().performance.now():i().performance&&i().performance.timing&&"number"==typeof i().performance.timing.navigationStart&&(e.creationTime=i().Date.now()-i().performance.timing.navigationStart),e},t}(oi);rs(is,"TEST_VID",(function(){if(Yt()){var e=s().createElement("video"),t=s().createElement("track");return t.kind="captions",t.srclang="en",t.label="English",e.appendChild(t),e}})),is.isSupported=function(){try{is.TEST_VID.volume=.5}catch(e){return!1}return!(!is.TEST_VID||!is.TEST_VID.canPlayType)},is.canPlayType=function(e){return is.TEST_VID.canPlayType(e)},is.canPlaySource=function(e,t){return is.canPlayType(e.type)},is.canControlVolume=function(){try{var e=is.TEST_VID.volume;return is.TEST_VID.volume=e/2+.1,e!==is.TEST_VID.volume}catch(e){return!1}},is.canMuteVolume=function(){try{var e=is.TEST_VID.muted;return is.TEST_VID.muted=!e,is.TEST_VID.muted?hn(is.TEST_VID,"muted","muted"):fn(is.TEST_VID,"muted"),e!==is.TEST_VID.muted}catch(e){return!1}},is.canControlPlaybackRate=function(){if(Dt&&Ft&&Bt<58)return!1;try{var e=is.TEST_VID.playbackRate;return is.TEST_VID.playbackRate=e/2+.1,e!==is.TEST_VID.playbackRate}catch(e){return!1}},is.canOverrideAttributes=function(){try{var e=function(){};Object.defineProperty(s().createElement("video"),"src",{get:e,set:e}),Object.defineProperty(s().createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(s().createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(s().createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},is.supportsNativeTextTracks=function(){return Xt||Gt&&Ft},is.supportsNativeVideoTracks=function(){return!(!is.TEST_VID||!is.TEST_VID.videoTracks)},is.supportsNativeAudioTracks=function(){return!(!is.TEST_VID||!is.TEST_VID.audioTracks)},is.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresVolumeControl","canControlVolume"],["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach((function(e){var t=e[0],n=e[1];rs(is.prototype,t,(function(){return is[n]()}),!0)})),is.prototype.movingMediaElementInDOM=!Gt,is.prototype.featuresFullscreenResize=!0,is.prototype.featuresProgressEvents=!0,is.prototype.featuresTimeupdateEvents=!0,is.patchCanPlayType=function(){Rt>=4&&!Nt&&!Ft&&(Ya=is.TEST_VID&&is.TEST_VID.constructor.prototype.canPlayType,is.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&/^application\/(?:x-|vnd\.apple\.)mpegurl/i.test(e)?"maybe":Ya.call(this,e)})},is.unpatchCanPlayType=function(){var e=is.TEST_VID.constructor.prototype.canPlayType;return Ya&&(is.TEST_VID.constructor.prototype.canPlayType=Ya),e},is.patchCanPlayType(),is.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},is.resetMediaElement=function(e){if(e){for(var t=e.querySelectorAll("source"),n=t.length;n--;)e.removeChild(t[n]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(e){is.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){is.prototype["set"+mr(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach((function(e){is.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach((function(e){is.prototype["set"+mr(e)]=function(t){this.el_[e]=t}})),["pause","load","play"].forEach((function(e){is.prototype[e]=function(){return this.el_[e]()}})),oi.withSourceHandlers(is),is.nativeSourceHandler={},is.nativeSourceHandler.canPlayType=function(e){try{return is.TEST_VID.canPlayType(e)}catch(e){return""}},is.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return is.nativeSourceHandler.canPlayType(e.type);if(e.src){var n=Kr(e.src);return is.nativeSourceHandler.canPlayType("video/"+n)}return""},is.nativeSourceHandler.handleSource=function(e,t,n){t.setSrc(e.src)},is.nativeSourceHandler.dispose=function(){},is.registerSourceHandler(is.nativeSourceHandler),oi.registerTech("Html5",is);var as=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],ss={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},os=["tiny","xsmall","small","medium","large","xlarge","huge"],us={};os.forEach((function(e){var t="x"===e.charAt(0)?"x-"+e.substring(1):e;us[e]="vjs-layout-"+t}));var ls={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},cs=function(e){function t(n,r,i){var a;if(n.id=n.id||r.id||"vjs_video_"+Un(),(r=Tt(t.getTagSettings(n),r)).initChildren=!1,r.createEl=!1,r.evented=!1,r.reportTouchActivity=!1,!r.language)if("function"==typeof n.closest){var o=n.closest("[lang]");o&&o.getAttribute&&(r.language=o.getAttribute("lang"))}else for(var l=n;l&&1===l.nodeType;){if(cn(l).hasOwnProperty("lang")){r.language=l.getAttribute("lang");break}l=l.parentNode}if((a=e.call(this,null,r,i)||this).boundDocumentFullscreenChange_=function(e){return a.documentFullscreenChange_(e)},a.boundFullWindowOnEscKey_=function(e){return a.fullWindowOnEscKey(e)},a.boundUpdateStyleEl_=function(e){return a.updateStyleEl_(e)},a.boundApplyInitTime_=function(e){return a.applyInitTime_(e)},a.boundUpdateCurrentBreakpoint_=function(e){return a.updateCurrentBreakpoint_(e)},a.boundHandleTechClick_=function(e){return a.handleTechClick_(e)},a.boundHandleTechDoubleClick_=function(e){return a.handleTechDoubleClick_(e)},a.boundHandleTechTouchStart_=function(e){return a.handleTechTouchStart_(e)},a.boundHandleTechTouchMove_=function(e){return a.handleTechTouchMove_(e)},a.boundHandleTechTouchEnd_=function(e){return a.handleTechTouchEnd_(e)},a.boundHandleTechTap_=function(e){return a.handleTechTap_(e)},a.isFullscreen_=!1,a.log=vt(a.id_),a.fsApi_=ct,a.isPosterFromTech_=!1,a.queuedCallbacks_=[],a.isReady_=!1,a.hasStarted_=!1,a.userActive_=!1,a.debugEnabled_=!1,!a.options_||!a.options_.techOrder||!a.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(a.tag=n,a.tagAttributes=n&&cn(n),a.language(a.options_.language),r.languages){var c={};Object.getOwnPropertyNames(r.languages).forEach((function(e){c[e.toLowerCase()]=r.languages[e]})),a.languages_=c}else a.languages_=t.prototype.options_.languages;a.resetCache_(),a.poster_=r.poster||"",a.controls_=!!r.controls,n.controls=!1,n.removeAttribute("controls"),a.changingSrc_=!1,a.playCallbacks_=[],a.playTerminatedQueue_=[],n.hasAttribute("autoplay")?a.autoplay(!0):a.autoplay(a.options_.autoplay),r.plugins&&Object.keys(r.plugins).forEach((function(e){if("function"!=typeof a[e])throw new Error('plugin "'+e+'" does not exist')})),a.scrubbing_=!1,a.el_=a.createEl(),dr((0,u.Z)(a),{eventBusKey:"el_"}),a.fsApi_.requestFullscreen&&(zn(s(),a.fsApi_.fullscreenchange,a.boundDocumentFullscreenChange_),a.on(a.fsApi_.fullscreenchange,a.boundDocumentFullscreenChange_)),a.fluid_&&a.on(["playerreset","resize"],a.boundUpdateStyleEl_);var d=gr(a.options_);r.plugins&&Object.keys(r.plugins).forEach((function(e){a[e](r.plugins[e])})),r.debug&&a.debug(!0),a.options_.playerOptions=d,a.middleware_=[],a.initChildren(),a.isAudio("audio"===n.nodeName.toLowerCase()),a.controls()?a.addClass("vjs-controls-enabled"):a.addClass("vjs-controls-disabled"),a.el_.setAttribute("role","region"),a.isAudio()?a.el_.setAttribute("aria-label",a.localize("Audio Player")):a.el_.setAttribute("aria-label",a.localize("Video Player")),a.isAudio()&&a.addClass("vjs-audio"),a.flexNotSupported_()&&a.addClass("vjs-no-flex"),qt&&a.addClass("vjs-touch-enabled"),Gt||a.addClass("vjs-workinghover"),t.players[a.id_]=(0,u.Z)(a);var h=lt.split(".")[0];return a.addClass("vjs-v"+h),a.userActive(!0),a.reportUserActivity(),a.one("play",(function(e){return a.listenForUserActivity_(e)})),a.on("stageclick",(function(e){return a.handleStageClick_(e)})),a.on("keydown",(function(e){return a.handleKeyDown(e)})),a.on("languagechange",(function(e){return a.handleLanguagechange(e)})),a.breakpoints(a.options_.breakpoints),a.responsive(a.options_.responsive),a}(0,l.Z)(t,e);var n=t.prototype;return n.dispose=function(){var n=this;this.trigger("dispose"),this.off("dispose"),Gn(s(),this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),Gn(s(),"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),t.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),li[this.id()]=null,si.names.forEach((function(e){var t=si[e],r=n[t.getterName]();r&&r.off&&r.off()})),e.prototype.dispose.call(this)},n.createEl=function(){var t,n=this.tag,r=this.playerElIngest_=n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute("data-vjs-player"),a="video-js"===this.tag.tagName.toLowerCase();r?t=this.el_=n.parentNode:a||(t=this.el_=e.prototype.createEl.call(this,"div"));var o=cn(n);if(a){for(t=this.el_=n,n=this.tag=s().createElement("video");t.children.length;)n.appendChild(t.firstChild);an(t,"video-js")||sn(t,"video-js"),t.appendChild(n),r=this.playerElIngest_=t,Object.keys(t).forEach((function(e){try{n[e]=t[e]}catch(e){}}))}if(n.setAttribute("tabindex","-1"),o.tabindex="-1",(jt||Ft&&Vt)&&(n.setAttribute("role","application"),o.role="application"),n.removeAttribute("width"),n.removeAttribute("height"),"width"in o&&delete o.width,"height"in o&&delete o.height,Object.getOwnPropertyNames(o).forEach((function(e){a&&"class"===e||t.setAttribute(e,o[e]),a&&n.setAttribute(e,o[e])})),n.playerId=n.id,n.id+="_html5_api",n.className="vjs-tech",n.player=t.player=this,this.addClass("vjs-paused"),!0!==i().VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Rn("vjs-styles-dimensions");var u=Cn(".vjs-styles-defaults"),l=Cn("head");l.insertBefore(this.styleEl_,u?u.nextSibling:l.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);for(var c=n.getElementsByTagName("a"),d=0;d<c.length;d++){var h=c.item(d);sn(h,"vjs-hidden"),h.setAttribute("hidden","hidden")}return n.initNetworkState_=n.networkState,n.parentNode&&!r&&n.parentNode.insertBefore(t,n),rn(n,t),this.children_.unshift(n),this.el_.setAttribute("lang",this.language_),this.el_=t,t},n.crossOrigin=function(e){if(!e)return this.techGet_("crossOrigin");"anonymous"===e||"use-credentials"===e?this.techCall_("setCrossOrigin",e):gt.warn('crossOrigin must be "anonymous" or "use-credentials", given "'+e+'"')},n.width=function(e){return this.dimension("width",e)},n.height=function(e){return this.dimension("height",e)},n.dimension=function(e,t){var n=e+"_";if(void 0===t)return this[n]||0;if(""===t||"auto"===t)return this[n]=void 0,void this.updateStyleEl_();var r=parseFloat(t);isNaN(r)?gt.error('Improper value "'+t+'" supplied for for '+e):(this[n]=r,this.updateStyleEl_())},n.fluid=function(e){var t,n,r=this;if(void 0===e)return!!this.fluid_;this.fluid_=!!e,rr(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),n=function(){r.on(["playerreset","resize"],r.boundUpdateStyleEl_)},rr(t=this)?n():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(n))):this.removeClass("vjs-fluid"),this.updateStyleEl_()},n.fill=function(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},n.aspectRatio=function(e){if(void 0===e)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()},n.updateStyleEl_=function(){if(!0!==i().VIDEOJS_NO_DYNAMIC_STYLE){var e,t,n,r=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),a=r[1]/r[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/a:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*a,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),Mn(this.styleEl_,"\n ."+n+" {\n width: "+e+"px;\n height: "+t+"px;\n }\n\n ."+n+".vjs-fluid {\n padding-top: "+100*a+"%;\n }\n ")}else{var s="number"==typeof this.width_?this.width_:this.options_.width,o="number"==typeof this.height_?this.height_:this.options_.height,u=this.tech_&&this.tech_.el();u&&(s>=0&&(u.width=s),o>=0&&(u.height=o))}},n.loadTech_=function(e,t){var n=this;this.tech_&&this.unloadTech_();var r=mr(e),i=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==r&&this.tag&&(oi.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;var a={source:t,autoplay:"string"!=typeof this.autoplay()&&this.autoplay(),nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+i+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset,Promise:this.options_.Promise};si.names.forEach((function(e){var t=si[e];a[t.getterName]=n[t.privateName]})),Tt(a,this.options_[r]),Tt(a,this.options_[i]),Tt(a,this.options_[e.toLowerCase()]),this.tag&&(a.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(a.startTime=this.cache_.currentTime);var s,o,u=oi.getTech(e);if(!u)throw new Error("No Tech named '"+r+"' exists! '"+r+"' should be registered using videojs.registerTech()'");this.tech_=new u(a),this.tech_.ready(Jn(this,this.handleTechReady_),!0),s=this.textTracksJson_||[],o=this.tech_,s.forEach((function(e){var t=o.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((function(e){return t.addCue(e)}))})),o.textTracks(),as.forEach((function(e){n.on(n.tech_,e,(function(t){return n["handleTech"+mr(e)+"_"](t)}))})),Object.keys(ss).forEach((function(e){n.on(n.tech_,e,(function(t){0===n.tech_.playbackRate()&&n.tech_.seeking()?n.queuedCallbacks_.push({callback:n["handleTech"+ss[e]+"_"].bind(n),event:t}):n["handleTech"+ss[e]+"_"](t)}))})),this.on(this.tech_,"loadstart",(function(e){return n.handleTechLoadStart_(e)})),this.on(this.tech_,"sourceset",(function(e){return n.handleTechSourceset_(e)})),this.on(this.tech_,"waiting",(function(e){return n.handleTechWaiting_(e)})),this.on(this.tech_,"ended",(function(e){return n.handleTechEnded_(e)})),this.on(this.tech_,"seeking",(function(e){return n.handleTechSeeking_(e)})),this.on(this.tech_,"play",(function(e){return n.handleTechPlay_(e)})),this.on(this.tech_,"firstplay",(function(e){return n.handleTechFirstPlay_(e)})),this.on(this.tech_,"pause",(function(e){return n.handleTechPause_(e)})),this.on(this.tech_,"durationchange",(function(e){return n.handleTechDurationChange_(e)})),this.on(this.tech_,"fullscreenchange",(function(e,t){return n.handleTechFullscreenChange_(e,t)})),this.on(this.tech_,"fullscreenerror",(function(e,t){return n.handleTechFullscreenError_(e,t)})),this.on(this.tech_,"enterpictureinpicture",(function(e){return n.handleTechEnterPictureInPicture_(e)})),this.on(this.tech_,"leavepictureinpicture",(function(e){return n.handleTechLeavePictureInPicture_(e)})),this.on(this.tech_,"error",(function(e){return n.handleTechError_(e)})),this.on(this.tech_,"posterchange",(function(e){return n.handleTechPosterChange_(e)})),this.on(this.tech_,"textdata",(function(e){return n.handleTechTextData_(e)})),this.on(this.tech_,"ratechange",(function(e){return n.handleTechRateChange_(e)})),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===r&&this.tag||rn(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},n.unloadTech_=function(){var e,t,n,r=this;si.names.forEach((function(e){var t=si[e];r[t.privateName]=r[t.getterName]()})),this.textTracksJson_=(e=this.tech_,t=e.$$("track"),n=Array.prototype.map.call(t,(function(e){return e.track})),Array.prototype.map.call(t,(function(e){var t=Or(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===n.indexOf(e)})).map(Or))),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},n.tech=function(e){return void 0===e&>.warn("Using the tech directly can be dangerous. I hope you know what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_},n.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mouseup",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)},n.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"mouseup",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)},n.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},n.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(this.autoplay())},n.manualAutoplay_=function(e){var t=this;if(this.tech_&&"string"==typeof e){var n,r=function(){var e=t.muted();t.muted(!0);var n=function(){t.muted(e)};t.playTerminatedQueue_.push(n);var r=t.play();if(Ir(r))return r.catch(n)};if("any"===e&&!0!==this.muted()?Ir(n=this.play())&&(n=n.catch(r)):n="muted"===e&&!0!==this.muted()?r():this.play(),Ir(n))return n.then((function(){t.trigger({type:"autoplay-success",autoplay:e})})).catch((function(n){t.trigger({type:"autoplay-failure",autoplay:e})}))}},n.updateSourceCaches_=function(e){void 0===e&&(e="");var t=e,n="";"string"!=typeof t&&(t=e.src,n=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!n&&(n=function(e,t){if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;var n=e.cache_.sources.filter((function(e){return e.src===t}));if(n.length)return n[0].type;for(var r=e.$$("source"),i=0;i<r.length;i++){var a=r[i];if(a.type&&a.src&&a.src===t)return a.type}return _i(t)}(this,t)),this.cache_.source=gr({},e,{src:t,type:n});for(var r=this.cache_.sources.filter((function(e){return e.src&&e.src===t})),i=[],a=this.$$("source"),s=[],o=0;o<a.length;o++){var u=cn(a[o]);i.push(u),u.src&&u.src===t&&s.push(u.src)}s.length&&!r.length?this.cache_.sources=i:r.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t},n.handleTechSourceset_=function(e){var t=this;if(!this.changingSrc_){var n=function(e){return t.updateSourceCaches_(e)},r=this.currentSource().src,i=e.src;r&&!/^blob:/.test(r)&&/^blob:/.test(i)&&(!this.lastSource_||this.lastSource_.tech!==i&&this.lastSource_.player!==r)&&(n=function(){}),n(i),e.src||this.tech_.any(["sourceset","loadstart"],(function(e){if("sourceset"!==e.type){var n=t.techGet("currentSrc");t.lastSource_.tech=n,t.updateSourceCaches_(n)}}))}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})},n.hasStarted=function(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},n.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},n.handleTechRateChange_=function(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((function(e){return e.callback(e.event)})),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},n.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting");var t=this.currentTime();this.on("timeupdate",(function n(){t!==e.currentTime()&&(e.removeClass("vjs-waiting"),e.off("timeupdate",n))}))},n.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},n.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},n.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},n.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},n.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked")},n.handleTechFirstPlay_=function(){this.options_.starttime&&(gt.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},n.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},n.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},n.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},n.handleTechClick_=function(e){kn(e)&&this.controls_&&(this.paused()?Ar(this.play()):this.pause())},n.handleTechDoubleClick_=function(e){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),(function(t){return t.contains(e.target)}))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},n.handleTechTap_=function(){this.userActive(!this.userActive())},n.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},n.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},n.handleTechTouchEnd_=function(e){e.cancelable&&e.preventDefault()},n.handleStageClick_=function(){this.reportUserActivity()},n.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},n.documentFullscreenChange_=function(e){var t=e.target.player;if(!t||t===this){var n=this.el(),r=s()[this.fsApi_.fullscreenElement]===n;!r&&n.matches?r=n.matches(":"+this.fsApi_.fullscreen):!r&&n.msMatchesSelector&&(r=n.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(r)}},n.handleTechFullscreenChange_=function(e,t){t&&(t.nativeIOSFullscreen&&this.toggleClass("vjs-ios-native-fs"),this.isFullscreen(t.isFullscreen))},n.handleTechFullscreenError_=function(e,t){this.trigger("fullscreenerror",t)},n.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},n.handleTechEnterPictureInPicture_=function(e){this.isInPictureInPicture(!0)},n.handleTechLeavePictureInPicture_=function(e){this.isInPictureInPicture(!1)},n.handleTechError_=function(){var e=this.tech_.error();this.error(e)},n.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},n.getCache=function(){return this.cache_},n.resetCache_=function(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],volume:1}},n.techCall_=function(e,t){this.ready((function(){if(e in pi)return function(e,t,n,r){return t[n](e.reduce(gi(n),r))}(this.middleware_,this.tech_,e,t);if(e in mi)return hi(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw gt(e),e}}),!0)},n.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in fi)return function(e,t,n){return e.reduceRight(gi(n),t[n]())}(this.middleware_,this.tech_,e);if(e in mi)return hi(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw gt("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw gt("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw gt(t),t}}},n.play=function(){var e=this,t=this.options_.Promise||i().Promise;return t?new t((function(t){e.play_(t)})):this.play_()},n.play_=function(e){var t=this;void 0===e&&(e=Ar),this.playCallbacks_.push(e);var n=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc()));if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!n)return this.waitToPlay_=function(e){t.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(n||!Xt&&!Gt||this.load());var r=this.techGet_("play");null===r?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(r)},n.runPlayTerminatedQueue_=function(){var e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))},n.runPlayCallbacks_=function(e){var t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))},n.pause=function(){this.techCall_("pause")},n.paused=function(){return!1!==this.techGet_("paused")},n.played=function(){return this.techGet_("played")||kr(0,0)},n.scrubbing=function(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},n.currentTime=function(e){return void 0!==e?(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",e),void(this.cache_.initTime=0)):(this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),void this.one("canplay",this.boundApplyInitTime_))):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},n.applyInitTime_=function(){this.currentTime(this.cache_.initTime)},n.duration=function(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))},n.remainingTime=function(){return this.duration()-this.currentTime()},n.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},n.buffered=function(){var e=this.techGet_("buffered");return e&&e.length||(e=kr(0,0)),e},n.bufferedPercent=function(){return Er(this.buffered(),this.duration())},n.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),n=e.end(e.length-1);return n>t&&(n=t),n},n.volume=function(e){var t;return void 0!==e?(t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall_("setVolume",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)},n.muted=function(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)},n.defaultMuted=function(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},n.lastVolume_=function(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e},n.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},n.isFullscreen=function(e){if(void 0!==e){var t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()}return this.isFullscreen_},n.requestFullscreen=function(e){var t=this.options_.Promise||i().Promise;if(t){var n=this;return new t((function(t,r){function i(){n.off("fullscreenerror",s),n.off("fullscreenchange",a)}function a(){i(),t()}function s(e,t){i(),r(t)}n.one("fullscreenchange",a),n.one("fullscreenerror",s);var o=n.requestFullscreenHelper_(e);if(o)return o.then(i,i),o}))}return this.requestFullscreenHelper_()},n.requestFullscreenHelper_=function(e){var t,n=this;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){var r=this.el_[this.fsApi_.requestFullscreen](t);return r&&r.then((function(){return n.isFullscreen(!0)}),(function(){return n.isFullscreen(!1)})),r}this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):this.enterFullWindow()},n.exitFullscreen=function(){var e=this.options_.Promise||i().Promise;if(e){var t=this;return new e((function(e,n){function r(){t.off("fullscreenerror",a),t.off("fullscreenchange",i)}function i(){r(),e()}function a(e,t){r(),n(t)}t.one("fullscreenchange",i),t.one("fullscreenerror",a);var s=t.exitFullscreenHelper_();if(s)return s.then(r,r),s}))}return this.exitFullscreenHelper_()},n.exitFullscreenHelper_=function(){var e=this;if(this.fsApi_.requestFullscreen){var t=s()[this.fsApi_.exitFullscreen]();return t&&t.then((function(){return e.isFullscreen(!1)})),t}this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):this.exitFullWindow()},n.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=s().documentElement.style.overflow,zn(s(),"keydown",this.boundFullWindowOnEscKey_),s().documentElement.style.overflow="hidden",sn(s().body,"vjs-full-window"),this.trigger("enterFullWindow")},n.fullWindowOnEscKey=function(e){f().isEventKey(e,"Esc")&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())},n.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,Gn(s(),"keydown",this.boundFullWindowOnEscKey_),s().documentElement.style.overflow=this.docOrigOverflow,on(s().body,"vjs-full-window"),this.trigger("exitFullWindow")},n.disablePictureInPicture=function(e){if(void 0===e)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")},n.isInPictureInPicture=function(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},n.requestPictureInPicture=function(){if("pictureInPictureEnabled"in s()&&!1===this.disablePictureInPicture())return this.techGet_("requestPictureInPicture")},n.exitPictureInPicture=function(){if("pictureInPictureEnabled"in s())return s().exitPictureInPicture()},n.handleKeyDown=function(e){var t,n,r=this.options_.userActions;r&&r.hotkeys&&(t=this.el_.ownerDocument.activeElement,n=t.tagName.toLowerCase(),t.isContentEditable||("input"===n?-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(t.type):-1!==["textarea"].indexOf(n))||("function"==typeof r.hotkeys?r.hotkeys.call(this,e):this.handleHotkeys(e)))},n.handleHotkeys=function(e){var t=this.options_.userActions?this.options_.userActions.hotkeys:{},n=t.fullscreenKey,r=void 0===n?function(e){return f().isEventKey(e,"f")}:n,i=t.muteKey,a=void 0===i?function(e){return f().isEventKey(e,"m")}:i,o=t.playPauseKey,u=void 0===o?function(e){return f().isEventKey(e,"k")||f().isEventKey(e,"Space")}:o;if(r.call(this,e)){e.preventDefault(),e.stopPropagation();var l=Tr.getComponent("FullscreenToggle");!1!==s()[this.fsApi_.fullscreenEnabled]&&l.prototype.handleClick.call(this,e)}else a.call(this,e)?(e.preventDefault(),e.stopPropagation(),Tr.getComponent("MuteToggle").prototype.handleClick.call(this,e)):u.call(this,e)&&(e.preventDefault(),e.stopPropagation(),Tr.getComponent("PlayToggle").prototype.handleClick.call(this,e))},n.canPlayType=function(e){for(var t,n=0,r=this.options_.techOrder;n<r.length;n++){var i=r[n],a=oi.getTech(i);if(a||(a=Tr.getComponent(i)),a){if(a.isSupported()&&(t=a.canPlayType(e)))return t}else gt.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.')}return""},n.selectSource=function(e){var t,n,r=this,i=this.options_.techOrder.map((function(e){return[e,oi.getTech(e)]})).filter((function(e){var t=e[0],n=e[1];return n?n.isSupported():(gt.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),a=function(e,t,n){var r;return e.some((function(e){return t.some((function(t){if(r=n(e,t))return!0}))})),r},s=function(e,t){var n=e[0];if(e[1].canPlaySource(t,r.options_[n.toLowerCase()]))return{source:t,tech:n}};return t=this.options_.sourceOrder?a(e,i,(n=s,function(e,t){return n(t,e)})):a(i,e,s),t||!1},n.handleSrc_=function(e,t){var n=this;if(void 0===e)return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();var r=bi(e);if(r.length){if(this.changingSrc_=!0,t||(this.cache_.sources=r),this.updateSourceCaches_(r[0]),di(this,r[0],(function(e,i){var a,s;if(n.middleware_=i,t||(n.cache_.sources=r),n.updateSourceCaches_(e),n.src_(e))return r.length>1?n.handleSrc_(r.slice(1)):(n.changingSrc_=!1,n.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0),void n.triggerReady());a=i,s=n.tech_,a.forEach((function(e){return e.setTech&&e.setTech(s)}))})),this.options_.retryOnError&&r.length>1){var i=function(){n.error(null),n.handleSrc_(r.slice(1),!0)},a=function(){n.off("error",i)};this.one("error",i),this.one("playing",a),this.resetRetryOnError_=function(){n.off("error",i),n.off("playing",a)}}}else this.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0)},n.src=function(e){return this.handleSrc_(e,!1)},n.src_=function(e){var t,n,r=this,i=this.selectSource([e]);return!i||(t=i.tech,n=this.techName_,mr(t)!==mr(n)?(this.changingSrc_=!0,this.loadTech_(i.tech,i.source),this.tech_.ready((function(){r.changingSrc_=!1})),!1):(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1}),!0),!1))},n.load=function(){this.techCall_("load")},n.reset=function(){var e=this,t=this.options_.Promise||i().Promise;this.paused()||!t?this.doReset_():Ar(this.play().then((function(){return e.doReset_()})))},n.doReset_=function(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),rr(this)&&this.trigger("playerreset")},n.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},n.resetProgressBar_=function(){this.currentTime(0);var e=this.controlBar,t=e.durationDisplay,n=e.remainingTimeDisplay;t&&t.updateContent(),n&&n.updateContent()},n.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},n.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange")},n.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},n.currentSource=function(){return this.cache_.source||{}},n.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},n.currentType=function(){return this.currentSource()&&this.currentSource().type||""},n.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},n.autoplay=function(e){if(void 0===e)return this.options_.autoplay||!1;var t;"string"==typeof e&&/(any|play|muted)/.test(e)?(this.options_.autoplay=e,this.manualAutoplay_(e),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)},n.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},n.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},n.poster=function(e){if(void 0===e)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))},n.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},n.controls=function(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},n.usingNativeControls=function(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},n.error=function(e){if(void 0===e)return this.error_||null;if(this.options_.suppressNotSupportedError&&e&&4===e.code){var t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],t),void this.one("loadstart",(function(){this.off(["click","touchstart"],t)}))}if(null===e)return this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Cr(e),this.addClass("vjs-error"),gt.error("(CODE:"+this.error_.code+" "+Cr.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error")},n.reportUserActivity=function(e){this.userActivity_=!0},n.userActive=function(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},n.listenForUserActivity_=function(){var e,t,n,r=Jn(this,this.reportUserActivity),i=function(t){r(),this.clearInterval(e)};this.on("mousedown",(function(){r(),this.clearInterval(e),e=this.setInterval(r,250)})),this.on("mousemove",(function(e){e.screenX===t&&e.screenY===n||(t=e.screenX,n=e.screenY,r())})),this.on("mouseup",i),this.on("mouseleave",i);var a,s=this.getChild("controlBar");!s||Gt||Dt||(s.on("mouseenter",(function(e){this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout,this.player().options_.inactivityTimeout=0})),s.on("mouseleave",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on("keydown",r),this.on("keyup",r),this.setInterval((function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);var e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}}),250)},n.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},n.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},n.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},n.addTextTrack=function(e,t,n){if(this.tech_)return this.tech_.addTextTrack(e,t,n)},n.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},n.removeRemoteTextTrack=function(e){void 0===e&&(e={});var t=e.track;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)},n.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},n.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},n.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},n.language=function(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),rr(this)&&this.trigger("languagechange"))},n.languages=function(){return gr(t.prototype.options_.languages,this.languages_)},n.toJSON=function(){var e=gr(this.options_),t=e.tracks;e.tracks=[];for(var n=0;n<t.length;n++){var r=t[n];(r=gr(r)).player=void 0,e.tracks[n]=r}return e},n.createModal=function(e,t){var n=this;(t=t||{}).content=e||"";var r=new Lr(this,t);return this.addChild(r),r.on("dispose",(function(){n.removeChild(r)})),r.open(),r},n.updateCurrentBreakpoint_=function(){if(this.responsive())for(var e=this.currentBreakpoint(),t=this.currentWidth(),n=0;n<os.length;n++){var r=os[n];if(t<=this.breakpoints_[r]){if(e===r)return;e&&this.removeClass(us[e]),this.addClass(us[r]),this.breakpoint_=r;break}}},n.removeCurrentBreakpoint_=function(){var e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)},n.breakpoints=function(e){return void 0===e||(this.breakpoint_="",this.breakpoints_=Tt({},ls,e),this.updateCurrentBreakpoint_()),Tt(this.breakpoints_)},n.responsive=function(e){return void 0===e?this.responsive_:(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0},n.currentBreakpoint=function(){return this.breakpoint_},n.currentBreakpointClass=function(){return us[this.breakpoint_]||""},n.loadMedia=function(e,t){var n=this;if(e&&"object"==typeof e){this.reset(),this.cache_.media=gr(e);var r=this.cache_.media,i=r.artwork,a=r.poster,s=r.src,o=r.textTracks;!i&&a&&(this.cache_.media.artwork=[{src:a,type:_i(a)}]),s&&this.src(s),a&&this.poster(a),Array.isArray(o)&&o.forEach((function(e){return n.addRemoteTextTrack(e,!1)})),this.ready(t)}},n.getMedia=function(){if(!this.cache_.media){var e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(function(e){return{kind:e.kind,label:e.label,language:e.language,src:e.src}}))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:_i(t.poster)}]),t}return gr(this.cache_.media)},t.getTagSettings=function(e){var t={sources:[],tracks:[]},n=cn(e),r=n["data-setup"];if(an(e,"vjs-fill")&&(n.fill=!0),an(e,"vjs-fluid")&&(n.fluid=!0),null!==r){var i=d()(r||"{}"),a=i[0],s=i[1];a&>.error(a),Tt(n,s)}if(Tt(t,n),e.hasChildNodes())for(var o=e.childNodes,u=0,l=o.length;u<l;u++){var c=o[u],h=c.nodeName.toLowerCase();"source"===h?t.sources.push(cn(c)):"track"===h&&t.tracks.push(cn(c))}return t},n.flexNotSupported_=function(){var e=s().createElement("i");return!("flexBasis"in e.style||"webkitFlexBasis"in e.style||"mozFlexBasis"in e.style||"msFlexBasis"in e.style||"msFlexOrder"in e.style)},n.debug=function(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)},t}(Tr);si.names.forEach((function(e){var t=si[e];cs.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),cs.prototype.crossorigin=cs.prototype.crossOrigin,cs.players={};var ds=i().navigator;cs.prototype.options_={techOrder:oi.defaultTechOrder_,html5:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:ds&&(ds.languages&&ds.languages[0]||ds.userLanguage||ds.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1},["ended","seeking","seekable","networkState","readyState"].forEach((function(e){cs.prototype[e]=function(){return this.techGet_(e)}})),as.forEach((function(e){cs.prototype["handleTech"+mr(e)+"_"]=function(){return this.trigger(e)}})),Tr.registerComponent("Player",cs);var hs="plugin",fs="activePlugins_",ps={},ms=function(e){return ps.hasOwnProperty(e)},gs=function(e){return ms(e)?ps[e]:void 0},vs=function(e,t){e[fs]=e[fs]||{},e[fs][t]=!0},ys=function(e,t,n){var r=(n?"before":"")+"pluginsetup";e.trigger(r,t),e.trigger(r+":"+t.name,t)},_s=function(e,t){return t.prototype.name=e,function(){ys(this,{name:e,plugin:t,instance:null},!0);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var a=function(e,t,n){if(_())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&(0,y.Z)(i,n.prototype),i}(t,[this].concat(r));return this[e]=function(){return a},ys(this,a.getEventHash()),a}},bs=function(){function e(t){if(this.constructor===e)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=t,this.log||(this.log=this.player.log.createLogger(this.name)),dr(this),delete this.trigger,fr(this,this.constructor.defaultState),vs(t,this.name),this.dispose=this.dispose.bind(this),t.on("dispose",this.dispose)}var t=e.prototype;return t.version=function(){return this.constructor.VERSION},t.getEventHash=function(e){return void 0===e&&(e={}),e.name=this.name,e.plugin=this.constructor,e.instance=this,e},t.trigger=function(e,t){return void 0===t&&(t={}),Xn(this.eventBusEl_,e,this.getEventHash(t))},t.handleStateChanged=function(e){},t.dispose=function(){var e=this.name,t=this.player;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t[fs][e]=!1,this.player=this.state=null,t[e]=_s(e,ps[e])},e.isBasic=function(t){var n="string"==typeof t?gs(t):t;return"function"==typeof n&&!e.prototype.isPrototypeOf(n.prototype)},e.registerPlugin=function(t,n){if("string"!=typeof t)throw new Error('Illegal plugin name, "'+t+'", must be a string, was '+typeof t+".");if(ms(t))gt.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(cs.prototype.hasOwnProperty(t))throw new Error('Illegal plugin name, "'+t+'", cannot share a name with an existing player method!');if("function"!=typeof n)throw new Error('Illegal plugin for "'+t+'", must be a function, was '+typeof n+".");return ps[t]=n,t!==hs&&(e.isBasic(n)?cs.prototype[t]=function(e,t){var n=function(){ys(this,{name:e,plugin:t,instance:null},!0);var n=t.apply(this,arguments);return vs(this,e),ys(this,{name:e,plugin:t,instance:n}),n};return Object.keys(t).forEach((function(e){n[e]=t[e]})),n}(t,n):cs.prototype[t]=_s(t,n)),n},e.deregisterPlugin=function(e){if(e===hs)throw new Error("Cannot de-register base plugin.");ms(e)&&(delete ps[e],delete cs.prototype[e])},e.getPlugins=function(e){var t;return void 0===e&&(e=Object.keys(ps)),e.forEach((function(e){var n=gs(e);n&&((t=t||{})[e]=n)})),t},e.getPluginVersion=function(e){var t=gs(e);return t&&t.VERSION||""},e}();bs.getPlugin=gs,bs.BASE_PLUGIN_NAME=hs,bs.registerPlugin(hs,bs),cs.prototype.usingPlugin=function(e){return!!this[fs]&&!0===this[fs][e]},cs.prototype.hasPlugin=function(e){return!!ms(e)};var Ts=function(e){return 0===e.indexOf("#")?e.slice(1):e};function Ss(e,t,n){var r=Ss.getPlayer(e);if(r)return t&>.warn('Player "'+e+'" is already initialised. Options will not be applied.'),n&&r.ready(n),r;var i="string"==typeof e?Cn("#"+Ts(e)):e;if(!Qt(i))throw new TypeError("The element or ID supplied is not valid. (videojs)");i.ownerDocument.defaultView&&i.ownerDocument.body.contains(i)||gt.warn("The element supplied is not included in the DOM"),t=t||{},Ss.hooks("beforesetup").forEach((function(e){var n=e(i,gr(t));St(n)&&!Array.isArray(n)?t=gr(t,n):gt.error("please return an object in beforesetup hooks")}));var a=Tr.getComponent("Player");return r=new a(i,t,n),Ss.hooks("setup").forEach((function(e){return e(r)})),r}if(Ss.hooks_={},Ss.hooks=function(e,t){return Ss.hooks_[e]=Ss.hooks_[e]||[],t&&(Ss.hooks_[e]=Ss.hooks_[e].concat(t)),Ss.hooks_[e]},Ss.hook=function(e,t){Ss.hooks(e,t)},Ss.hookOnce=function(e,t){Ss.hooks(e,[].concat(t).map((function(t){return function n(){return Ss.removeHook(e,n),t.apply(void 0,arguments)}})))},Ss.removeHook=function(e,t){var n=Ss.hooks(e).indexOf(t);return!(n<=-1||(Ss.hooks_[e]=Ss.hooks_[e].slice(),Ss.hooks_[e].splice(n,1),0))},!0!==i().VIDEOJS_NO_DYNAMIC_STYLE&&Yt()){var ws=Cn(".vjs-styles-defaults");if(!ws){ws=Rn("vjs-styles-defaults");var ks=Cn("head");ks&&ks.insertBefore(ws,ks.firstChild),Mn(ws,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}Pn(1,Ss),Ss.VERSION=lt,Ss.options=cs.prototype.options_,Ss.getPlayers=function(){return cs.players},Ss.getPlayer=function(e){var t,n=cs.players;if("string"==typeof e){var r=Ts(e),i=n[r];if(i)return i;t=Cn("#"+r)}else t=e;if(Qt(t)){var a=t,s=a.player,o=a.playerId;if(s||n[o])return s||n[o]}},Ss.getAllPlayers=function(){return Object.keys(cs.players).map((function(e){return cs.players[e]})).filter(Boolean)},Ss.players=cs.players,Ss.getComponent=Tr.getComponent,Ss.registerComponent=function(e,t){oi.isTech(t)&>.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),Tr.registerComponent.call(Tr,e,t)},Ss.getTech=oi.getTech,Ss.registerTech=oi.registerTech,Ss.use=function(e,t){ui[e]=ui[e]||[],ui[e].push(t)},Object.defineProperty(Ss,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(Ss.middleware,"TERMINATOR",{value:ci,writeable:!1,enumerable:!0}),Ss.browser=$t,Ss.TOUCH_ENABLED=qt,Ss.extend=function(e,t){void 0===t&&(t={});var n=function(){e.apply(this,arguments)},r={};for(var i in"object"==typeof t?(t.constructor!==Object.prototype.constructor&&(n=t.constructor),r=t):"function"==typeof t&&(n=t),function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,y.Z)(e,t)}(n,e),e&&(n.super_=e),r)r.hasOwnProperty(i)&&(n.prototype[i]=r[i]);return n},Ss.mergeOptions=gr,Ss.bind=Jn,Ss.registerPlugin=bs.registerPlugin,Ss.deregisterPlugin=bs.deregisterPlugin,Ss.plugin=function(e,t){return gt.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),bs.registerPlugin(e,t)},Ss.getPlugins=bs.getPlugins,Ss.getPlugin=bs.getPlugin,Ss.getPluginVersion=bs.getPluginVersion,Ss.addLanguage=function(e,t){var n;return e=(""+e).toLowerCase(),Ss.options.languages=gr(Ss.options.languages,((n={})[e]=t,n)),Ss.options.languages[e]},Ss.log=gt,Ss.createLogger=vt,Ss.createTimeRange=Ss.createTimeRanges=kr,Ss.formatTime=Ui,Ss.setFormatTime=function(e){Ni=e},Ss.resetFormatTime=function(){Ni=Mi},Ss.parseUrl=Xr,Ss.isCrossOrigin=Zr,Ss.EventTarget=tr,Ss.on=zn,Ss.one=$n,Ss.off=Gn,Ss.trigger=Xn,Ss.xhr=m(),Ss.TextTrack=ei,Ss.AudioTrack=ti,Ss.VideoTrack=ni,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((function(e){Ss[e]=function(){return gt.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead"),In[e].apply(null,arguments)}})),Ss.computedStyle=kt,Ss.dom=In,Ss.url=Yr,Ss.defineLazyProperty=rs,Ss.addLanguage("en",{"Non-Fullscreen":"Exit Fullscreen"});var Es=S,Cs=function(e,t,n){return e&&n&&n.responseURL&&t!==n.responseURL?n.responseURL:t},xs=function(e){return Ss.log.debug?Ss.log.debug.bind(Ss,"VHS:",e+" >"):function(){}},Is=Ss.log,As=function(e,t){return e+"-"+t},Os=function(e){var t=e.onwarn,n=e.oninfo,r=e.manifestString,i=e.customTagParsers,a=void 0===i?[]:i,s=e.customTagMappers,o=void 0===s?[]:s,u=e.experimentalLLHLS,l=new M;t&&l.on("warn",t),n&&l.on("info",n),a.forEach((function(e){return l.addParser(e)})),o.forEach((function(e){return l.addTagMapper(e)})),l.push(r),l.end();var c=l.manifest;if(u||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach((function(e){c.hasOwnProperty(e)&&delete c[e]})),c.segments&&c.segments.forEach((function(e){["parts","preloadHints"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!c.targetDuration){var d=10;c.segments&&c.segments.length&&(d=c.segments.reduce((function(e,t){return Math.max(e,t.duration)}),0)),t&&t("manifest has no targetDuration defaulting to "+d),c.targetDuration=d}return c},Ps=function(e,t){e.mediaGroups&&["AUDIO","SUBTITLES"].forEach((function(n){if(e.mediaGroups[n])for(var r in e.mediaGroups[n])for(var i in e.mediaGroups[n][r]){var a=e.mediaGroups[n][r][i];t(a,n,r,i)}}))},Ls=function(e){var t=e.playlist,n=e.uri,r=e.id;t.id=r,n&&(t.uri=n),t.attributes=t.attributes||{}},Ds=function(e,t){e.uri=t;for(var n=0;n<e.playlists.length;n++)if(!e.playlists[n].uri){var r="placeholder-uri-"+n;e.playlists[n].uri=r}Ps(e,(function(t,n,r,i){var a="placeholder-uri-"+n+"-"+r+"-"+i;t.playlists&&t.playlists.length||(t.playlists=[(0,o.Z)({},t)]),t.playlists.forEach((function(t,n){var r=As(n,a);t.uri?t.resolvedUri=t.resolvedUri||Es(e.uri,t.uri):(t.uri=0===n?a:r,t.resolvedUri=t.uri),t.id=t.id||r,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t}))})),function(e){for(var t=e.playlists.length;t--;){var n=e.playlists[t];Ls({playlist:n,id:As(t,n.uri)}),n.resolvedUri=Es(e.uri,n.uri),e.playlists[n.id]=n,e.playlists[n.uri]=n,n.attributes.BANDWIDTH||Is.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}}(e),function(e){Ps(e,(function(t){t.uri&&(t.resolvedUri=Es(e.uri,t.uri))}))}(e)},Rs=Ss.mergeOptions,Ms=Ss.EventTarget,Ns=function(e,t){if(!e)return t;var n=Rs(e,t);if(e.parts&&!t.parts)delete n.parts;else if(e.parts&&t.parts)for(var r=0;r<t.parts.length;r++)e.parts&&e.parts[r]&&(n.parts[r]=Rs(e.parts[r],t.parts[r]));return n},Us=function(e,t){!e.resolvedUri&&e.uri&&(e.resolvedUri=Es(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=Es(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=Es(t,e.map.uri)),e.parts&&e.parts.length&&e.parts.forEach((function(e){e.resolvedUri||(e.resolvedUri=Es(t,e.uri))})),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach((function(e){e.resolvedUri||(e.resolvedUri=Es(t,e.uri))}))},Fs=function(e){var t=e.segments||[];return e.preloadSegment&&e.preloadSegment.parts&&t.push(e.preloadSegment),t},Bs=function(e,t){return e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence},js=function(e,t,n){void 0===n&&(n=Bs);var r=Rs(e,{}),i=r.playlists[t.id];if(!i)return null;if(n(i,t))return null;var a=Rs(i,t);t.segments=Fs(t),i.segments&&(a.segments=function(e,t,n){var r=e.slice(),i=t.slice();n=n||0;for(var a=Math.min(e.length,t.length+n),s=n;s<a;s++){var o=s-n;i[o]=Ns(r[s],i[o])}return i}(i.segments,t.segments,t.mediaSequence-i.mediaSequence)),a.segments.forEach((function(e){Us(e,a.resolvedUri)}));for(var s=0;s<r.playlists.length;s++)r.playlists[s].id===t.id&&(r.playlists[s]=a);return r.playlists[t.id]=a,r.playlists[t.uri]=a,Ps(e,(function(e,n,r,i){if(e.playlists)for(var a=0;a<e.playlists.length;a++)t.id===e.playlists[a].id&&(e.playlists[a]=t)})),r},Hs=function(e,t){var n=e.segments[e.segments.length-1],r=n&&n.parts&&n.parts[n.parts.length-1],i=r&&r.duration||n&&n.duration;return t&&i?1e3*i:500*(e.partTargetDuration||e.targetDuration||10)},Vs=function(e){function t(t,n,r){var i;if(void 0===r&&(r={}),i=e.call(this)||this,!t)throw new Error("A non-empty playlist URL or object is required");i.logger_=xs("PlaylistLoader");var a=r,s=a.withCredentials,o=void 0!==s&&s,u=a.handleManifestRedirects,l=void 0!==u&&u;i.src=t,i.vhs_=n,i.withCredentials=o,i.handleManifestRedirects=l;var c=n.options_;return i.customTagParsers=c&&c.customTagParsers||[],i.customTagMappers=c&&c.customTagMappers||[],i.experimentalLLHLS=c&&c.experimentalLLHLS||!1,i.state="HAVE_NOTHING",i.on("mediaupdatetimeout",(function(){"HAVE_METADATA"===i.state&&(i.state="HAVE_CURRENT_METADATA",i.request=i.vhs_.xhr({uri:Es(i.master.uri,i.media().uri),withCredentials:i.withCredentials},(function(e,t){if(i.request)return e?i.playlistRequestError(i.request,i.media(),"HAVE_METADATA"):void i.haveMetadata({playlistString:i.request.responseText,url:i.media().uri,id:i.media().id})})))})),i}(0,l.Z)(t,e);var n=t.prototype;return n.playlistRequestError=function(e,t,n){var r=t.uri,i=t.id;this.request=null,n&&(this.state=n),this.error={playlist:this.master.playlists[i],status:e.status,message:"HLS playlist request error at URL: "+r+".",responseText:e.responseText,code:e.status>=500?4:2},this.trigger("error")},n.haveMetadata=function(e){var t=this,n=e.playlistString,r=e.playlistObject,a=e.url,s=e.id;this.request=null,this.state="HAVE_METADATA";var o=r||Os({onwarn:function(e){var n=e.message;return t.logger_("m3u8-parser warn for "+s+": "+n)},oninfo:function(e){var n=e.message;return t.logger_("m3u8-parser info for "+s+": "+n)},manifestString:n,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,experimentalLLHLS:this.experimentalLLHLS});o.lastRequest=Date.now(),Ls({playlist:o,uri:a,id:s});var u=js(this.master,o);this.targetDuration=o.partTargetDuration||o.targetDuration,u?(this.master=u,this.media_=this.master.playlists[s]):this.trigger("playlistunchanged"),this.media().endList||(i().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=i().setTimeout((function(){t.trigger("mediaupdatetimeout")}),Hs(this.media(),!!u))),this.trigger("loadedplaylist")},n.dispose=function(){this.trigger("dispose"),this.stopRequest(),i().clearTimeout(this.mediaUpdateTimeout),i().clearTimeout(this.finalRenditionTimeout),this.off()},n.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},n.media=function(e,t){var n=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"==typeof e){if(!this.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.master.playlists[e]}if(i().clearTimeout(this.finalRenditionTimeout),t){var r=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=i().setTimeout(this.media.bind(this,e,!1),r)}else{var a=this.state,s=!this.media_||e.id!==this.media_.id,o=this.master.playlists[e.id];if(o&&o.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(s&&(this.trigger("mediachanging"),"HAVE_MASTER"===a?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(s){if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials},(function(t,r){if(n.request){if(e.lastRequest=Date.now(),e.resolvedUri=Cs(n.handleManifestRedirects,e.resolvedUri,r),t)return n.playlistRequestError(n.request,e,a);n.haveMetadata({playlistString:r.responseText,url:e.uri,id:e.id}),"HAVE_MASTER"===a?n.trigger("loadedmetadata"):n.trigger("mediachange")}}))}}},n.pause=function(){this.stopRequest(),i().clearTimeout(this.mediaUpdateTimeout),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")},n.load=function(e){var t=this;i().clearTimeout(this.mediaUpdateTimeout);var n=this.media();if(e){var r=n?(n.partTargetDuration||n.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=i().setTimeout((function(){return t.load()}),r)}else this.started?n&&!n.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()},n.start=function(){var e=this;if(this.started=!0,"object"==typeof this.src)return this.src.uri||(this.src.uri=i().location.href),this.src.resolvedUri=this.src.uri,void setTimeout((function(){e.setupInitialPlaylist(e.src)}),0);this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},(function(t,n){if(e.request){if(e.request=null,t)return e.error={status:n.status,message:"HLS playlist request error at URL: "+e.src+".",responseText:n.responseText,code:2},"HAVE_NOTHING"===e.state&&(e.started=!1),e.trigger("error");e.src=Cs(e.handleManifestRedirects,e.src,n);var r=Os({manifestString:n.responseText,customTagParsers:e.customTagParsers,customTagMappers:e.customTagMappers,experimentalLLHLS:e.experimentalLLHLS});e.setupInitialPlaylist(r)}}))},n.srcUri=function(){return"string"==typeof this.src?this.src:this.src.uri},n.setupInitialPlaylist=function(e){if(this.state="HAVE_MASTER",e.playlists)return this.master=e,Ds(this.master,this.srcUri()),e.playlists.forEach((function(e){e.segments=Fs(e),e.segments.forEach((function(t){Us(t,e.resolvedUri)}))})),this.trigger("loadedplaylist"),void(this.request||this.media(this.master.playlists[0]));var t=this.srcUri()||i().location.href;this.master=function(e,t){var n=As(0,t),r={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:i().location.href,resolvedUri:i().location.href,playlists:[{uri:t,id:n,resolvedUri:t,attributes:{}}]};return r.playlists[n]=r.playlists[0],r.playlists[t]=r.playlists[0],r}(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},t}(Ms),qs=1/30,Ws=.1,zs=function(e,t){var n,r=[];if(e&&e.length)for(n=0;n<e.length;n++)t(e.start(n),e.end(n))&&r.push([e.start(n),e.end(n)]);return Ss.createTimeRanges(r)},Gs=function(e,t){return zs(e,(function(e,n){return e-Ws<=t&&n+Ws>=t}))},Xs=function(e,t){return zs(e,(function(e){return e-qs>=t}))},$s=function(e){var t=[];if(!e||!e.length)return"";for(var n=0;n<e.length;n++)t.push(e.start(n)+" => "+e.end(n));return t.join(", ")},Ks=function(e){for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t},Zs=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},Ys=Ss.createTimeRange,Qs=function(e,t){if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;var n=t.segments&&t.segments.length&&t.segments[t.segments.length-1],r=n&&n.parts&&n.parts.length;return r&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:r&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},Js=function(e,t,n){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;var r=function(e,t){var n=0,r=t-e.mediaSequence,i=e.segments[r];if(i){if(void 0!==i.start)return{result:i.start,precise:!0};if(void 0!==i.end)return{result:i.end-i.duration,precise:!0}}for(;r--;){if(void 0!==(i=e.segments[r]).end)return{result:n+i.end,precise:!0};if(n+=i.duration,void 0!==i.start)return{result:n+i.start,precise:!0}}return{result:n,precise:!1}}(e,t);if(r.precise)return r.result;var i=function(e,t){for(var n,r=0,i=t-e.mediaSequence;i<e.segments.length;i++){if(void 0!==(n=e.segments[i]).start)return{result:n.start-r,precise:!0};if(r+=n.duration,void 0!==n.end)return{result:n.end-r,precise:!0}}return{result:-1,precise:!1}}(e,t);return i.precise?i.result:r.result+n},eo=function(e,t,n){if(!e)return 0;if("number"!=typeof n&&(n=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return i()[1/0]}return Js(e,t,n)},to=function(e,t,n){var r=0;if(t>n){var i=[n,t];t=i[0],n=i[1]}if(t<0){for(var a=t;a<Math.min(0,n);a++)r+=e.targetDuration;t=0}for(var s=t;s<n;s++)r+=e.segments[s].duration;return r},no=function(e,t,n,r){if(!e||!e.segments)return null;if(e.endList)return eo(e);if(null===t)return null;t=t||0;var i=Js(e,e.mediaSequence+e.segments.length,t);return n&&(i-=r="number"==typeof r?r:Qs(null,e)),Math.max(0,i)},ro=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},io=function(e){return e.excludeUntil&&e.excludeUntil===1/0},ao=function(e){var t=ro(e);return!e.disabled&&!t},so=function(e,t){return t.attributes&&t.attributes[e]},oo=function(e,t){if(1===e.playlists.length)return!0;var n=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((function(e){return!!ao(e)&&(e.attributes.BANDWIDTH||0)<n})).length},uo=function(e,t){return!(!e&&!t||!e&&t||e&&!t||e!==t&&(!e.id||!t.id||e.id!==t.id)&&(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)&&(!e.uri||!t.uri||e.uri!==t.uri))},lo=function(e,t){var n=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{},r=!1;for(var i in n){for(var a in n[i])if(r=t(n[i][a]))break;if(r)break}return!!r},co=function(e){if(!e||!e.playlists||!e.playlists.length)return lo(e,(function(e){return e.playlists&&e.playlists.length||e.uri}));for(var t=function(t){var n=e.playlists[t],r=n.attributes&&n.attributes.CODECS;return r&&r.split(",").every((function(e){return H(e)}))||lo(e,(function(e){return uo(n,e)}))?"continue":{v:!1}},n=0;n<e.playlists.length;n++){var r=t(n);if("continue"!==r&&"object"==typeof r)return r.v}return!0},ho={liveEdgeDelay:Qs,duration:eo,seekable:function(e,t,n){var r=t||0,i=no(e,t,!0,n);return null===i?Ys():Ys(r,i)},getMediaInfoForTime:function(e,t,n,r){var i=function(e){return(e.segments||[]).reduce((function(e,t,n){return t.parts?t.parts.forEach((function(t,r){e.push({duration:t.duration,segmentIndex:n,partIndex:r})})):e.push({duration:t.duration,segmentIndex:n,partIndex:null}),e}),[])}(e),a=t-r;if(a<0){if(n>0)for(var s=n-1;s>=0;s--){var o=i[s];if((a+=o.duration+qs)>0)return{mediaIndex:o.segmentIndex,startTime:r-to(e,n,o.segmentIndex),partIndex:o.partIndex}}return{mediaIndex:i[0]&&i[0].segmentIndex||0,partIndex:i[0]&&i[0].partIndex||null,startTime:t}}if(n<0){for(var u=n;u<0;u++)if((a-=e.targetDuration)<0)return{mediaIndex:i[0].segmentIndex,startTime:t};n=0}for(var l=n;l<i.length;l++){var c=i[l];if((a-=c.duration+qs)<0)return{mediaIndex:c.segmentIndex,startTime:r+to(e,n,c.segmentIndex),partIndex:c.partIndex}}return{mediaIndex:i[i.length-1].segmentIndex,partIndex:i[i.length-1].partIndex,startTime:t}},isEnabled:ao,isDisabled:function(e){return e.disabled},isBlacklisted:ro,isIncompatible:io,playlistEnd:no,isAes:function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:so,estimateSegmentRequestTime:function(e,t,n,r){return void 0===r&&(r=0),so("BANDWIDTH",n)?(e*n.attributes.BANDWIDTH-8*r)/t:NaN},isLowestEnabledRendition:oo,isAudioOnly:co,playlistMatch:uo},fo=Ss.xhr,po=Ss.mergeOptions,mo=function(e,t,n,r){var i="arraybuffer"===e.responseType?e.response:e.responseText;!t&&i&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=i.byteLength||i.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),n.headers&&(e.responseHeaders=n.headers),t&&"ETIMEDOUT"===t.code&&(e.timedout=!0),t||e.aborted||200===n.statusCode||206===n.statusCode||0===n.statusCode||(t=new Error("XHR Failed with a response of: "+(e&&(i||e.responseText)))),r(t,e)},go=function(){var e=function e(t,n){t=po({timeout:45e3},t);var r=e.beforeRequest||Ss.Vhs.xhr.beforeRequest;if(r&&"function"==typeof r){var i=r(t);i&&(t=i)}var a=(!0===Ss.Vhs.xhr.original?fo:Ss.Vhs.xhr)(t,(function(e,t){return mo(a,e,t,n)})),s=a.abort;return a.abort=function(){return a.aborted=!0,s.apply(a,arguments)},a.uri=t.uri,a.requestTime=Date.now(),a};return e.original=!0,e},vo=function(e){var t,n,r={};return e.byterange&&(r.Range=(n=(t=e.byterange).offset+t.length-1,"bytes="+t.offset+"-"+n)),r},yo=function(e,t){return e.start(t)+"-"+e.end(t)},_o=function(e,t){var n=e.toString(16);return"00".substring(0,2-n.length)+n+(t%2?" ":"")},bo=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},To=function(e){var t={};return Object.keys(e).forEach((function(n){var r=e[n];ArrayBuffer.isView(r)?t[n]={bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}:t[n]=r})),t},So=function(e){var t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},wo=function(e){return e.resolvedUri},ko=function(e){for(var t=Array.prototype.slice.call(e),n=16,r="",i=0;i<t.length/n;i++)r+=t.slice(i*n,i*n+n).map(_o).join("")+" "+t.slice(i*n,i*n+n).map(bo).join("")+"\n";return r},Eo=Object.freeze({__proto__:null,createTransferableMessage:To,initSegmentId:So,segmentKeyId:wo,hexDump:ko,tagDump:function(e){var t=e.bytes;return ko(t)},textRanges:function(e){var t,n="";for(t=0;t<e.length;t++)n+=yo(e,t)+" ";return n}}),Co=function e(t){var n=t.programTime,r=t.playlist,i=t.retryCount,a=void 0===i?2:i,s=t.seekTo,o=t.pauseAfterSeek,u=void 0===o||o,l=t.tech,c=t.callback;if(!c)throw new Error("seekToProgramTime: callback must be provided");if(void 0===n||!r||!s)return c({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!r.endList&&!l.hasStarted_)return c({message:"player must be playing a live stream to start buffering"});if(!function(e){if(!e.segments||0===e.segments.length)return!1;for(var t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0}(r))return c({message:"programDateTime tags must be provided in the manifest "+r.resolvedUri});var d=function(e,t){var n;try{n=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;var r=t.segments[0];if(n<r.dateTimeObject)return null;for(var i=0;i<t.segments.length-1&&(r=t.segments[i],!(n<t.segments[i+1].dateTimeObject));i++);var a,s=t.segments[t.segments.length-1],o=s.dateTimeObject,u=s.videoTimingInfo?(a=s.videoTimingInfo).transmuxedPresentationEnd-a.transmuxedPresentationStart-a.transmuxerPrependedSeconds:s.duration+.25*s.duration;return n>new Date(o.getTime()+1e3*u)?null:(n>o&&(r=s),{segment:r,estimatedStart:r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationStart:ho.duration(t,t.mediaSequence+t.segments.indexOf(r)),type:r.videoTimingInfo?"accurate":"estimate"})}(n,r);if(!d)return c({message:n+" was not found in the stream"});var h=d.segment,f=function(e,t){var n,r;try{n=new Date(e),r=new Date(t)}catch(e){}var i=n.getTime();return(r.getTime()-i)/1e3}(h.dateTimeObject,n);if("estimate"===d.type)return 0===a?c({message:n+" is not buffered yet. Try again"}):(s(d.estimatedStart+f),void l.one("seeked",(function(){e({programTime:n,playlist:r,retryCount:a-1,seekTo:s,pauseAfterSeek:u,tech:l,callback:c})})));var p=h.start+f;l.one("seeked",(function(){return c(null,l.currentTime())})),u&&l.pause(),s(p)},xo=function(e,t){if(4===e.readyState)return t()},Io=Ss.EventTarget,Ao=Ss.mergeOptions,Oo=function(e,t){if(!Bs(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(var n=0;n<e.segments.length;n++){var r=e.segments[n],i=t.segments[n];if(r.uri!==i.uri)return!1;if(r.byterange||i.byterange){var a=r.byterange,s=i.byterange;if(a&&!s||!a&&s)return!1;if(a.offset!==s.offset||a.length!==s.length)return!1}}return!0},Po=function(e,t){return(Boolean(!e.map&&!t.map)||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length))&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length},Lo=function(e,t){var n={};for(var r in e){var i=e[r].sidx;if(i){var a=se(i);if(!t[a])break;var s=t[a].sidxInfo;Po(s,i)&&(n[a]=t[a])}}return n},Do=function(e){function t(t,n,r,i){var a;void 0===r&&(r={}),(a=e.call(this)||this).masterPlaylistLoader_=i||(0,u.Z)(a),i||(a.isMaster_=!0);var s=r,o=s.withCredentials,l=void 0!==o&&o,c=s.handleManifestRedirects,d=void 0!==c&&c;if(a.vhs_=n,a.withCredentials=l,a.handleManifestRedirects=d,!t)throw new Error("A non-empty playlist URL or object is required");return a.on("minimumUpdatePeriod",(function(){a.refreshXml_()})),a.on("mediaupdatetimeout",(function(){a.refreshMedia_(a.media().id)})),a.state="HAVE_NOTHING",a.loadedPlaylists_={},a.logger_=xs("DashPlaylistLoader"),a.isMaster_?(a.masterPlaylistLoader_.srcUrl=t,a.masterPlaylistLoader_.sidxMapping_={}):a.childPlaylist_=t,a}(0,l.Z)(t,e);var n=t.prototype;return n.requestErrored_=function(e,t,n){return!this.request||(this.request=null,e?(this.error="object"!=typeof e||e instanceof Error?{status:t.status,message:"DASH request error at URL: "+t.uri,response:t.response,code:2}:e,n&&(this.state=n),this.trigger("error"),!0):void 0)},n.addSidxSegments_=function(e,t,n){var r=this,a=e.sidx&&se(e.sidx);if(e.sidx&&a&&!this.masterPlaylistLoader_.sidxMapping_[a]){var s=Cs(this.handleManifestRedirects,e.sidx.resolvedUri),o=function(i,s){if(!r.requestErrored_(i,s,t)){var o,u=r.masterPlaylistLoader_.sidxMapping_;try{o=De()(Re(s.response).subarray(8))}catch(e){return void r.requestErrored_(e,s,t)}return u[a]={sidxInfo:e.sidx,sidx:o},ae(e,o,e.sidx.resolvedUri),n(!0)}};this.request=function(e,t,n){var r,i=[],a=!1,s=function(e,t,r,i){return t.abort(),a=!0,n(e,t,r,i)},o=function(e,t){if(!a){if(e)return s(e,t,"",i);var n=t.responseText.substring(i&&i.byteLength||0,t.responseText.length);if(i=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t=t.filter((function(e){return e&&(e.byteLength||e.length)&&"string"!=typeof e})),t.length<=1)return Re(t[0]);var r=t.reduce((function(e,t,n){return e+(t.byteLength||t.length)}),0),i=new Uint8Array(r),a=0;return t.forEach((function(e){e=Re(e),i.set(e,a),a+=e.byteLength})),i}(i,Fe(n,!0)),r=r||He(i),i.length<10||r&&i.length<r+2)return xo(t,(function(){return s(e,t,"",i)}));var o=ot(i);return"ts"===o&&i.length<188||!o&&i.length<376?xo(t,(function(){return s(e,t,"",i)})):s(null,t,o,i)}},u={uri:e,beforeSend:function(e){e.overrideMimeType("text/plain; charset=x-user-defined"),e.addEventListener("progress",(function(t){return t.total,t.loaded,mo(e,null,{statusCode:e.status},o)}))}},l=t(u,(function(e,t){return mo(l,e,t,o)}));return l}(s,this.vhs_.xhr,(function(t,n,i,a){if(t)return o(t,n);if(!i||"mp4"!==i)return o({status:n.status,message:"Unsupported "+(i||"unknown")+" container type for sidx segment at URL: "+s,response:"",playlist:e,internal:!0,blacklistDuration:1/0,code:2},n);var u=e.sidx.byterange,l=u.offset,c=u.length;if(a.length>=c+l)return o(t,{response:a.subarray(l,l+c),status:n.status,uri:n.uri});r.request=r.vhs_.xhr({uri:s,responseType:"arraybuffer",headers:vo({byterange:e.sidx.byterange})},o)}))}else this.mediaRequest_=i().setTimeout((function(){return n(!1)}),0)},n.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},i().clearTimeout(this.minimumUpdatePeriodTimeout_),i().clearTimeout(this.mediaRequest_),i().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.off()},n.hasPendingRequest=function(){return this.request||this.mediaRequest_},n.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},n.media=function(e){var t=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var n=this.state;if("string"==typeof e){if(!this.masterPlaylistLoader_.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.masterPlaylistLoader_.master.playlists[e]}var r=!this.media_||e.id!==this.media_.id;if(r&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(r&&(this.trigger("mediachanging"),this.trigger("mediachange")));r&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,n,(function(r){t.haveMetadata({startingState:n,playlist:e})})))},n.haveMetadata=function(e){var t=e.startingState,n=e.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[n.id]=n,this.mediaRequest_=null,this.refreshMedia_(n.id),"HAVE_MASTER"===t?this.trigger("loadedmetadata"):this.trigger("mediachange")},n.pause=function(){this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),i().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMaster_&&(i().clearTimeout(this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_),this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)},n.load=function(e){var t=this;i().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;var n=this.media();if(e){var r=n?n.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=i().setTimeout((function(){return t.load()}),r)}else this.started?n&&!n.endList?(this.isMaster_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()},n.start=function(){var e=this;this.started=!0,this.isMaster_?this.requestMaster_((function(t,n){e.haveMaster_(),e.hasPendingRequest()||e.media_||e.media(e.masterPlaylistLoader_.master.playlists[0])})):this.mediaRequest_=i().setTimeout((function(){return e.haveMaster_()}),0)},n.requestMaster_=function(e){var t=this;this.request=this.vhs_.xhr({uri:this.masterPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},(function(n,r){if(!t.requestErrored_(n,r)){var i=r.responseText!==t.masterPlaylistLoader_.masterXml_;return t.masterPlaylistLoader_.masterXml_=r.responseText,r.responseHeaders&&r.responseHeaders.date?t.masterLoaded_=Date.parse(r.responseHeaders.date):t.masterLoaded_=Date.now(),t.masterPlaylistLoader_.srcUrl=Cs(t.handleManifestRedirects,t.masterPlaylistLoader_.srcUrl,r),i?(t.handleMaster_(),void t.syncClientServerClock_((function(){return e(r,i)}))):e(r,i)}"HAVE_NOTHING"===t.state&&(t.started=!1)}))},n.syncClientServerClock_=function(e){var t,n=this,r=(t=this.masterPlaylistLoader_.masterXml_,function(e){var t=Te(e,"UTCTiming")[0];if(!t)return null;var n=Ee(t);switch(n.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":n.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":n.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":n.method="DIRECT",n.value=Date.parse(n.value);break;default:throw new Error("UNSUPPORTED_UTC_TIMING_SCHEME")}return n}(Oe(t)));return null===r?(this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now(),e()):"DIRECT"===r.method?(this.masterPlaylistLoader_.clientOffset_=r.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:Es(this.masterPlaylistLoader_.srcUrl,r.value),method:r.method,withCredentials:this.withCredentials},(function(t,i){if(n.request){if(t)return n.masterPlaylistLoader_.clientOffset_=n.masterLoaded_-Date.now(),e();var a;a="HEAD"===r.method?i.responseHeaders&&i.responseHeaders.date?Date.parse(i.responseHeaders.date):n.masterLoaded_:Date.parse(i.responseText),n.masterPlaylistLoader_.clientOffset_=a-Date.now(),e()}})))},n.haveMaster_=function(){this.state="HAVE_MASTER",this.isMaster_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)},n.handleMaster_=function(){this.mediaRequest_=null;var e,t,n,r=(e={masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_},n=Pe(e.masterXml,{manifestUri:t=e.srcUrl,clientOffset:e.clientOffset,sidxMapping:e.sidxMapping}),Ds(n,t),n),i=this.masterPlaylistLoader_.master;i&&(r=function(e,t,n){for(var r=!0,i=Ao(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod}),a=0;a<t.playlists.length;a++){var s=t.playlists[a];if(s.sidx){var o=se(s.sidx);n&&n[o]&&n[o].sidx&&ae(s,n[o].sidx,s.sidx.resolvedUri)}var u=js(i,s,Oo);u&&(i=u,r=!1)}return Ps(t,(function(e,t,n,a){if(e.playlists&&e.playlists.length){var s=e.playlists[0].id,o=js(i,e.playlists[0],Oo);o&&((i=o).mediaGroups[t][n][a].playlists[0]=i.playlists[s],r=!1)}})),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(r=!1),r?null:i}(i,r,this.masterPlaylistLoader_.sidxMapping_)),this.masterPlaylistLoader_.master=r||i;var a=this.masterPlaylistLoader_.master.locations&&this.masterPlaylistLoader_.master.locations[0];return a&&a!==this.masterPlaylistLoader_.srcUrl&&(this.masterPlaylistLoader_.srcUrl=a),(!i||r&&r.minimumUpdatePeriod!==i.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),Boolean(r)},n.updateMinimumUpdatePeriodTimeout_=function(){var e=this.masterPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(i().clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);var t=e.master&&e.master.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),"number"!=typeof t||t<=0?t<0&&this.logger_("found invalid minimumUpdatePeriod of "+t+", not setting a timeout"):this.createMUPTimeout_(t)},n.createMUPTimeout_=function(e){var t=this.masterPlaylistLoader_;t.minimumUpdatePeriodTimeout_=i().setTimeout((function(){t.minimumUpdatePeriodTimeout_=null,t.trigger("minimumUpdatePeriod"),t.createMUPTimeout_(e)}),e)},n.refreshXml_=function(){var e=this;this.requestMaster_((function(t,n){var r,i,a;n&&(e.media_&&(e.media_=e.masterPlaylistLoader_.master.playlists[e.media_.id]),e.masterPlaylistLoader_.sidxMapping_=(r=e.masterPlaylistLoader_.master,i=e.masterPlaylistLoader_.sidxMapping_,a=Lo(r.playlists,i),Ps(r,(function(e,t,n,r){if(e.playlists&&e.playlists.length){var s=e.playlists;a=Ao(a,Lo(s,i))}})),a),e.addSidxSegments_(e.media(),e.state,(function(t){e.refreshMedia_(e.media().id)})))}))},n.refreshMedia_=function(e){var t=this;if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMaster_&&this.handleMaster_();var n=this.masterPlaylistLoader_.master.playlists,r=!this.media_||this.media_!==n[e];r?this.media_=n[e]:this.trigger("playlistunchanged"),this.mediaUpdateTimeout||function e(){t.media().endList||(t.mediaUpdateTimeout=i().setTimeout((function(){t.trigger("mediaupdatetimeout"),e()}),Hs(t.media(),Boolean(r))))}(),this.trigger("loadedplaylist")},t}(Io),Ro={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30},Mo=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},No=function(e){return function(){var t=function(e){try{return URL.createObjectURL(new Blob([e],{type:"application/javascript"}))}catch(n){var t=new BlobBuilder;return t.append(e),URL.createObjectURL(t.getBlob())}}(e),n=Mo(new Worker(t));n.objURL=t;var r=n.terminate;return n.on=n.addEventListener,n.off=n.removeEventListener,n.terminate=function(){return URL.revokeObjectURL(t),r.call(this)},n}},Uo=function(e){return"var browserWorkerPolyFill = "+Mo.toString()+";\nbrowserWorkerPolyFill(self);\n"+e},Fo=function(e){return e.toString().replace(/^function.+?{/,"").slice(0,-1)},Bo=Uo(Fo((function(){var e=function(){this.init=function(){var e={};this.on=function(t,n){e[t]||(e[t]=[]),e[t]=e[t].concat(n)},this.off=function(t,n){var r;return!!e[t]&&(r=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(r,1),r>-1)},this.trigger=function(t){var n,r,i,a;if(n=e[t])if(2===arguments.length)for(i=n.length,r=0;r<i;++r)n[r].call(this,arguments[1]);else{for(a=[],r=arguments.length,r=1;r<arguments.length;++r)a.push(arguments[r]);for(i=n.length,r=0;r<i;++r)n[r].apply(this,a)}},this.dispose=function(){e={}}}};e.prototype.pipe=function(e){return this.on("data",(function(t){e.push(t)})),this.on("done",(function(t){e.flush(t)})),this.on("partialdone",(function(t){e.partialFlush(t)})),this.on("endedtimeline",(function(t){e.endTimeline(t)})),this.on("reset",(function(t){e.reset(t)})),e},e.prototype.push=function(e){this.trigger("data",e)},e.prototype.flush=function(e){this.trigger("done",e)},e.prototype.partialFlush=function(e){this.trigger("partialdone",e)},e.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},e.prototype.reset=function(e){this.trigger("reset",e)};var t,n,r,i,a,s,o,u,l,c,d,h,f,p,m,g,v,y,_,b,T,S,w,k,E,C,x,I,A,O,P,L,D,R,M,N,U,F,B,j,H=e,V=Math.pow(2,32)-1;!function(){var e;if(S={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(e in S)S.hasOwnProperty(e)&&(S[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);w=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),E=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),k=new Uint8Array([0,0,0,1]),C=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),x=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),I={video:C,audio:x},P=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),O=new Uint8Array([0,0,0,0,0,0,0,0]),L=new Uint8Array([0,0,0,0,0,0,0,0]),D=L,R=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),M=L,A=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),t=function(e){var t,n,r=[],i=0;for(t=1;t<arguments.length;t++)r.push(arguments[t]);for(t=r.length;t--;)i+=r[t].byteLength;for(n=new Uint8Array(i+8),new DataView(n.buffer,n.byteOffset,n.byteLength).setUint32(0,n.byteLength),n.set(e,4),t=0,i=8;t<r.length;t++)n.set(r[t],i),i+=r[t].byteLength;return n},n=function(){return t(S.dinf,t(S.dref,P))},r=function(e){return t(S.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},m=function(e){return t(S.hdlr,I[e])},p=function(e){var n=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(n[12]=e.samplerate>>>24&255,n[13]=e.samplerate>>>16&255,n[14]=e.samplerate>>>8&255,n[15]=255&e.samplerate),t(S.mdhd,n)},f=function(e){return t(S.mdia,p(e),m(e.type),s(e))},a=function(e){return t(S.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},s=function(e){return t(S.minf,"video"===e.type?t(S.vmhd,A):t(S.smhd,O),n(),v(e))},o=function(e,n){for(var r=[],i=n.length;i--;)r[i]=_(n[i]);return t.apply(null,[S.moof,a(e)].concat(r))},u=function(e){for(var n=e.length,r=[];n--;)r[n]=d(e[n]);return t.apply(null,[S.moov,c(4294967295)].concat(r).concat(l(e)))},l=function(e){for(var n=e.length,r=[];n--;)r[n]=b(e[n]);return t.apply(null,[S.mvex].concat(r))},c=function(e){var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return t(S.mvhd,n)},g=function(e){var n,r,i=e.samples||[],a=new Uint8Array(4+i.length);for(r=0;r<i.length;r++)n=i[r].flags,a[r+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return t(S.sdtp,a)},v=function(e){return t(S.stbl,y(e),t(S.stts,M),t(S.stsc,D),t(S.stsz,R),t(S.stco,L))},y=function(e){return t(S.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===e.type?N(e):U(e))},N=function(e){var n,r,i=e.sps||[],a=e.pps||[],s=[],o=[];for(n=0;n<i.length;n++)s.push((65280&i[n].byteLength)>>>8),s.push(255&i[n].byteLength),s=s.concat(Array.prototype.slice.call(i[n]));for(n=0;n<a.length;n++)o.push((65280&a[n].byteLength)>>>8),o.push(255&a[n].byteLength),o=o.concat(Array.prototype.slice.call(a[n]));if(r=[S.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),t(S.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([i.length],s,[a.length],o))),t(S.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var u=e.sarRatio[0],l=e.sarRatio[1];r.push(t(S.pasp,new Uint8Array([(4278190080&u)>>24,(16711680&u)>>16,(65280&u)>>8,255&u,(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l])))}return t.apply(null,r)},U=function(e){return t(S.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),r(e))},h=function(e){var n=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return t(S.tkhd,n)},_=function(e){var n,r,i,a,s,o;return n=t(S.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),s=Math.floor(e.baseMediaDecodeTime/(V+1)),o=Math.floor(e.baseMediaDecodeTime%(V+1)),r=t(S.tfdt,new Uint8Array([1,0,0,0,s>>>24&255,s>>>16&255,s>>>8&255,255&s,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),"audio"===e.type?(i=T(e,92),t(S.traf,n,r,i)):(a=g(e),i=T(e,a.length+92),t(S.traf,n,r,i,a))},d=function(e){return e.duration=e.duration||4294967295,t(S.trak,h(e),f(e))},b=function(e){var n=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(n[n.length-1]=0),t(S.trex,n)},j=function(e,t){var n=0,r=0,i=0,a=0;return e.length&&(void 0!==e[0].duration&&(n=1),void 0!==e[0].size&&(r=2),void 0!==e[0].flags&&(i=4),void 0!==e[0].compositionTimeOffset&&(a=8)),[0,0,n|r|i|a,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},B=function(e,n){var r,i,a,s,o,u;for(n+=20+16*(s=e.samples||[]).length,a=j(s,n),(i=new Uint8Array(a.length+16*s.length)).set(a),r=a.length,u=0;u<s.length;u++)o=s[u],i[r++]=(4278190080&o.duration)>>>24,i[r++]=(16711680&o.duration)>>>16,i[r++]=(65280&o.duration)>>>8,i[r++]=255&o.duration,i[r++]=(4278190080&o.size)>>>24,i[r++]=(16711680&o.size)>>>16,i[r++]=(65280&o.size)>>>8,i[r++]=255&o.size,i[r++]=o.flags.isLeading<<2|o.flags.dependsOn,i[r++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,i[r++]=61440&o.flags.degradationPriority,i[r++]=15&o.flags.degradationPriority,i[r++]=(4278190080&o.compositionTimeOffset)>>>24,i[r++]=(16711680&o.compositionTimeOffset)>>>16,i[r++]=(65280&o.compositionTimeOffset)>>>8,i[r++]=255&o.compositionTimeOffset;return t(S.trun,i)},F=function(e,n){var r,i,a,s,o,u;for(n+=20+8*(s=e.samples||[]).length,a=j(s,n),(r=new Uint8Array(a.length+8*s.length)).set(a),i=a.length,u=0;u<s.length;u++)o=s[u],r[i++]=(4278190080&o.duration)>>>24,r[i++]=(16711680&o.duration)>>>16,r[i++]=(65280&o.duration)>>>8,r[i++]=255&o.duration,r[i++]=(4278190080&o.size)>>>24,r[i++]=(16711680&o.size)>>>16,r[i++]=(65280&o.size)>>>8,r[i++]=255&o.size;return t(S.trun,r)},T=function(e,t){return"audio"===e.type?F(e,t):B(e,t)},i=function(){return t(S.ftyp,w,k,w,E)};var q,W,z,G,X,$,K,Z,Y=function(e){return t(S.mdat,e)},Q=o,J=function(e,t){var n={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return n.dataOffset=t,n.compositionTimeOffset=e.pts-e.dts,n.duration=e.duration,n.size=4*e.length,n.size+=e.byteLength,e.keyFrame&&(n.flags.dependsOn=2,n.flags.isNonSyncSample=0),n},ee=[33,16,5,32,164,27],te=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],ne=function(e){for(var t=[];e--;)t.push(0);return t},re=9e4;$=function(e,t){return W(X(e,t))},K=function(e,t){return z(G(e),t)},Z=function(e,t,n){return G(n?e:e-t)};var ie=re,ae=W=function(e){return e*re},se=(z=function(e,t){return e*t},G=function(e){return e/re}),oe=(X=function(e,t){return e/t},$),ue=K,le=Z,ce=function(e,t,n,r){var i,a,s,o,u,l=0,c=0,d=0;if(t.length&&(i=oe(e.baseMediaDecodeTime,e.samplerate),a=Math.ceil(ie/(e.samplerate/1024)),n&&r&&(l=i-Math.max(n,r),d=(c=Math.floor(l/a))*a),!(c<1||d>45e3))){for((s=function(){if(!q){var e={96e3:[ee,[227,64],ne(154),[56]],88200:[ee,[231],ne(170),[56]],64e3:[ee,[248,192],ne(240),[56]],48e3:[ee,[255,192],ne(268),[55,148,128],ne(54),[112]],44100:[ee,[255,192],ne(268),[55,163,128],ne(84),[112]],32e3:[ee,[255,192],ne(268),[55,234],ne(226),[112]],24e3:[ee,[255,192],ne(268),[55,255,128],ne(268),[111,112],ne(126),[224]],16e3:[ee,[255,192],ne(268),[55,255,128],ne(268),[111,255],ne(269),[223,108],ne(195),[1,192]],12e3:[te,ne(268),[3,127,248],ne(268),[6,255,240],ne(268),[13,255,224],ne(268),[27,253,128],ne(259),[56]],11025:[te,ne(268),[3,127,248],ne(268),[6,255,240],ne(268),[13,255,224],ne(268),[27,255,192],ne(268),[55,175,128],ne(108),[112]],8e3:[te,ne(268),[3,121,16],ne(47),[7]]};t=e,q=Object.keys(t).reduce((function(e,n){return e[n]=new Uint8Array(t[n].reduce((function(e,t){return e.concat(t)}),[])),e}),{})}var t;return q}()[e.samplerate])||(s=t[0].data),o=0;o<c;o++)u=t[0],t.splice(0,0,{data:s,dts:u.dts-a,pts:u.pts-a});return e.baseMediaDecodeTime-=Math.floor(ue(d,e.samplerate)),d}},de=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},he=function(e,t){var n,r=e.minSegmentDts;return t||(r-=e.timelineStartInfo.dts),n=e.timelineStartInfo.baseMediaDecodeTime,n+=r,n=Math.max(0,n),"audio"===e.type&&(n*=e.samplerate/9e4,n=Math.floor(n)),n},fe=function(e,t){"number"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))},pe=function e(t){t=t||{},e.prototype.init.call(this),this.parse708captions_="boolean"!=typeof t.parse708captions||t.parse708captions,this.captionPackets_=[],this.ccStreams_=[new ke(0,0),new ke(0,1),new ke(1,0),new ke(1,1)],this.parse708captions_&&(this.cc708Stream_=new _e),this.reset(),this.ccStreams_.forEach((function(e){e.on("data",this.trigger.bind(this,"data")),e.on("partialdone",this.trigger.bind(this,"partialdone")),e.on("done",this.trigger.bind(this,"done"))}),this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};(pe.prototype=new H).push=function(e){var t,n,r;if("sei_rbsp"===e.nalUnitType&&(t=function(e){for(var t=0,n={payloadType:-1,payloadSize:0},r=0,i=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)r+=255,t++;for(r+=e[t++];255===e[t];)i+=255,t++;if(i+=e[t++],!n.payload&&4===r){if("GA94"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){n.payloadType=r,n.payloadSize=i,n.payload=e.subarray(t,t+i);break}n.payload=void 0}t+=i,r=0,i=0}return n}(e.escapedRBSP)).payload&&4===t.payloadType&&(n=function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)}(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));r=function(e,t){var n,r,i,a,s=[];if(!(64&t[0]))return s;for(r=31&t[0],n=0;n<r;n++)a={type:3&t[2+(i=3*n)],pts:e},4&t[i+2]&&(a.ccData=t[i+3]<<8|t[i+4],s.push(a));return s}(e.pts,n),this.captionPackets_=this.captionPackets_.concat(r),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},pe.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return"flush"===e?t.flush():t.partialFlush()}),this)},pe.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts})),this.captionPackets_.forEach((function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)}),this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},pe.prototype.flush=function(){return this.flushStream("flush")},pe.prototype.partialFlush=function(){return this.flushStream("partialFlush")},pe.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},pe.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},pe.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},pe.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},pe.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},pe.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var me={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},ge=function(e){return 32<=e&&e<=127||160<=e&&e<=255},ve=function(e){this.windowNum=e,this.reset()};ve.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},ve.prototype.getText=function(){return this.rows.join("\n")},ve.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},ve.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&"function"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},ve.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},ve.prototype.addText=function(e){this.rows[this.rowIdx]+=e},ve.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var ye=function(e){this.serviceNum=e,this.text="",this.currentWindow=new ve(-1),this.windows=[]};ye.prototype.init=function(e,t){this.startPts=e;for(var n=0;n<8;n++)this.windows[n]=new ve(n),"function"==typeof t&&(this.windows[n].beforeRowOverflow=t)},ye.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]};var _e=function e(){e.prototype.init.call(this);var t=this;this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(t.new708Packet(),t.add708Bytes(e)):(null===t.current708Packet&&t.new708Packet(),t.add708Bytes(e))}};_e.prototype=new H,_e.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},_e.prototype.add708Bytes=function(e){var t=e.ccData,n=t>>>8,r=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(n),this.current708Packet.data.push(r)},_e.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,n=null,r=null,i=0,a=t[i++];for(e.seq=a>>6,e.sizeCode=63&a;i<t.length;i++)r=31&(a=t[i++]),7==(n=a>>5)&&r>0&&(n=a=t[i++]),this.pushServiceBlock(n,i,r),r>0&&(i+=r-1)},_e.prototype.pushServiceBlock=function(e,t,n){var r,i=t,a=this.current708Packet.data,s=this.services[e];for(s||(s=this.initService(e,i));i<t+n&&i<a.length;i++)r=a[i],ge(r)?i=this.handleText(i,s):16===r?i=this.extendedCommands(i,s):128<=r&&r<=135?i=this.setCurrentWindow(i,s):152<=r&&r<=159?i=this.defineWindow(i,s):136===r?i=this.clearWindows(i,s):140===r?i=this.deleteWindows(i,s):137===r?i=this.displayWindows(i,s):138===r?i=this.hideWindows(i,s):139===r?i=this.toggleWindows(i,s):151===r?i=this.setWindowAttributes(i,s):144===r?i=this.setPenAttributes(i,s):145===r?i=this.setPenColor(i,s):146===r?i=this.setPenLocation(i,s):143===r?s=this.reset(i,s):8===r?s.currentWindow.backspace():12===r?s.currentWindow.clearText():13===r?s.currentWindow.pendingNewLine=!0:14===r?s.currentWindow.clearText():141===r&&i++},_e.prototype.extendedCommands=function(e,t){var n=this.current708Packet.data[++e];return ge(n)&&(e=this.handleText(e,t,!0)),e},_e.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},_e.prototype.initService=function(e,t){var n=this;return this.services[e]=new ye(e),this.services[e].init(this.getPts(t),(function(t){n.flushDisplayed(t,n.services[e])})),this.services[e]},_e.prototype.handleText=function(e,t,n){var r,i,a=this.current708Packet.data[e],s=(i=me[r=(n?4096:0)|a]||r,4096&r&&r===i?"":String.fromCharCode(i)),o=t.currentWindow;return o.pendingNewLine&&!o.isEmpty()&&o.newLine(this.getPts(e)),o.pendingNewLine=!1,o.addText(s),e},_e.prototype.setCurrentWindow=function(e,t){var n=7&this.current708Packet.data[e];return t.setCurrentWindow(n),e},_e.prototype.defineWindow=function(e,t){var n=this.current708Packet.data,r=n[e],i=7&r;t.setCurrentWindow(i);var a=t.currentWindow;return r=n[++e],a.visible=(32&r)>>5,a.rowLock=(16&r)>>4,a.columnLock=(8&r)>>3,a.priority=7&r,r=n[++e],a.relativePositioning=(128&r)>>7,a.anchorVertical=127&r,r=n[++e],a.anchorHorizontal=r,r=n[++e],a.anchorPoint=(240&r)>>4,a.rowCount=15&r,r=n[++e],a.columnCount=63&r,r=n[++e],a.windowStyle=(56&r)>>3,a.penStyle=7&r,a.virtualRowCount=a.rowCount+1,e},_e.prototype.setWindowAttributes=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.winAttr;return r=n[++e],i.fillOpacity=(192&r)>>6,i.fillRed=(48&r)>>4,i.fillGreen=(12&r)>>2,i.fillBlue=3&r,r=n[++e],i.borderType=(192&r)>>6,i.borderRed=(48&r)>>4,i.borderGreen=(12&r)>>2,i.borderBlue=3&r,r=n[++e],i.borderType+=(128&r)>>5,i.wordWrap=(64&r)>>6,i.printDirection=(48&r)>>4,i.scrollDirection=(12&r)>>2,i.justify=3&r,r=n[++e],i.effectSpeed=(240&r)>>4,i.effectDirection=(12&r)>>2,i.displayEffect=3&r,e},_e.prototype.flushDisplayed=function(e,t){for(var n=[],r=0;r<8;r++)t.windows[r].visible&&!t.windows[r].isEmpty()&&n.push(t.windows[r].getText());t.endPts=e,t.text=n.join("\n\n"),this.pushCaption(t),t.startPts=e},_e.prototype.pushCaption=function(e){""!==e.text&&(this.trigger("data",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:"cc708_"+e.serviceNum}),e.text="",e.startPts=e.endPts)},_e.prototype.displayWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&(t.windows[i].visible=1);return e},_e.prototype.hideWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&(t.windows[i].visible=0);return e},_e.prototype.toggleWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&(t.windows[i].visible^=1);return e},_e.prototype.clearWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&t.windows[i].clearText();return e},_e.prototype.deleteWindows=function(e,t){var n=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var i=0;i<8;i++)n&1<<i&&t.windows[i].reset();return e},_e.prototype.setPenAttributes=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.penAttr;return r=n[++e],i.textTag=(240&r)>>4,i.offset=(12&r)>>2,i.penSize=3&r,r=n[++e],i.italics=(128&r)>>7,i.underline=(64&r)>>6,i.edgeType=(56&r)>>3,i.fontStyle=7&r,e},_e.prototype.setPenColor=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.penColor;return r=n[++e],i.fgOpacity=(192&r)>>6,i.fgRed=(48&r)>>4,i.fgGreen=(12&r)>>2,i.fgBlue=3&r,r=n[++e],i.bgOpacity=(192&r)>>6,i.bgRed=(48&r)>>4,i.bgGreen=(12&r)>>2,i.bgBlue=3&r,r=n[++e],i.edgeRed=(48&r)>>4,i.edgeGreen=(12&r)>>2,i.edgeBlue=3&r,e},_e.prototype.setPenLocation=function(e,t){var n=this.current708Packet.data,r=n[e],i=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,r=n[++e],i.row=15&r,r=n[++e],i.column=63&r,e},_e.prototype.reset=function(e,t){var n=this.getPts(e);return this.flushDisplayed(n,t),this.initService(t.serviceNum,e)};var be={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Te=function(e){return null===e?"":(e=be[e]||e,String.fromCharCode(e))},Se=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],we=function(){for(var e=[],t=15;t--;)e.push("");return e},ke=function e(t,n){e.prototype.init.call(this),this.field_=t||0,this.dataChannel_=n||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,n,r,i,a;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),r=t>>>8,i=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),n=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=n,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=we();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=we();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=we()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(r,i))a=Te((r=(3&r)<<8)|i),this[this.mode_](e.pts,a),this.column_++;else if(this.isExtCharacter(r,i))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),a=Te((r=(3&r)<<8)|i),this[this.mode_](e.pts,a),this.column_++;else if(this.isMidRowCode(r,i))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14==(14&i)&&this.addFormatting(e.pts,["i"]),1==(1&i)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(r,i))this.column_+=3&i;else if(this.isPAC(r,i)){var s=Se.indexOf(7968&t);"rollUp"===this.mode_&&(s-this.rollUpRows_+1<0&&(s=this.rollUpRows_-1),this.setRollUp(e.pts,s)),s!==this.row_&&(this.clearFormatting(e.pts),this.row_=s),1&i&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16==(16&t)&&(this.column_=4*((14&t)>>1)),this.isColorPAC(i)&&14==(14&i)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(r)&&(0===i&&(i=null),a=Te(r),a+=Te(i),this[this.mode_](e.pts,a),this.column_+=a.length)}else this.lastControlCode_=null}};ke.prototype=new H,ke.prototype.flushDisplayed=function(e){var t=this.displayed_.map((function(e){try{return e.trim()}catch(e){return console.error("Skipping malformed caption."),""}})).join("\n").replace(/^\n+|\n+$/g,"");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})},ke.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=we(),this.nonDisplayed_=we(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},ke.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},ke.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},ke.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},ke.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},ke.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},ke.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},ke.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},ke.prototype.isNormalChar=function(e){return e>=32&&e<=127},ke.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=we(),this.displayed_=we()),void 0!==t&&t!==this.row_)for(var n=0;n<this.rollUpRows_;n++)this.displayed_[t-n]=this.displayed_[this.row_-n],this.displayed_[this.row_-n]="";void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},ke.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var n=t.reduce((function(e,t){return e+"<"+t+">"}),"");this[this.mode_](e,n)},ke.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+"</"+t+">"}),"");this.formatting_=[],this[this.mode_](e,t)}},ke.prototype.popOn=function(e,t){var n=this.nonDisplayed_[this.row_];n+=t,this.nonDisplayed_[this.row_]=n},ke.prototype.rollUp=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n},ke.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]="";for(e=this.row_+1;e<15;e++)this.displayed_[e]="";for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]=""},ke.prototype.paintOn=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n};var Ee={CaptionStream:pe,Cea608Stream:ke,Cea708Stream:_e},Ce={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},xe="shared",Ie=function(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e},Ae=function e(t){var n,r;e.prototype.init.call(this),this.type_=t||xe,this.push=function(e){this.type_!==xe&&e.type!==this.type_||(void 0===r&&(r=e.dts),e.dts=Ie(e.dts,r),e.pts=Ie(e.pts,r),n=e.dts,this.trigger("data",e))},this.flush=function(){r=n,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){r=void 0,n=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};Ae.prototype=new H;var Oe,Pe=Ae,Le=Ie,De=function(e,t,n){var r,i="";for(r=t;r<n;r++)i+="%"+("00"+e[r].toString(16)).slice(-2);return i},Re=function(e,t,n){return decodeURIComponent(De(e,t,n))},Me=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},Ne={TXXX:function(e){var t;if(3===e.data[0]){for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=Re(e.data,1,t),e.value=Re(e.data,t+1,e.data.length).replace(/\0*$/,"");break}e.data=e.value}},WXXX:function(e){var t;if(3===e.data[0])for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=Re(e.data,1,t),e.url=Re(e.data,t+1,e.data.length);break}},PRIV:function(e){var t,n;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=(n=e.data,unescape(De(n,0,t)));break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}};Oe=function(e){var t,n={debug:!(!e||!e.debug),descriptor:e&&e.descriptor},r=0,i=[],a=0;if(Oe.prototype.init.call(this),this.dispatchType=Ce.METADATA_STREAM_TYPE.toString(16),n.descriptor)for(t=0;t<n.descriptor.length;t++)this.dispatchType+=("00"+n.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,s,o,u,l;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(a=0,i.length=0),0===i.length&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0)))n.debug&&console.log("Skipping unrecognized metadata packet");else if(i.push(e),a+=e.data.byteLength,1===i.length&&(r=Me(e.data.subarray(6,10)),r+=10),!(a<r)){for(t={data:new Uint8Array(r),frames:[],pts:i[0].pts,dts:i[0].dts},l=0;l<r;)t.data.set(i[0].data.subarray(0,r-l),l),l+=i[0].data.byteLength,a-=i[0].data.byteLength,i.shift();s=10,64&t.data[5]&&(s+=4,s+=Me(t.data.subarray(10,14)),r-=Me(t.data.subarray(16,20)));do{if((o=Me(t.data.subarray(s+4,s+8)))<1)return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.");if((u={id:String.fromCharCode(t.data[s],t.data[s+1],t.data[s+2],t.data[s+3]),data:t.data.subarray(s+10,s+o+10)}).key=u.id,Ne[u.id]&&(Ne[u.id](u),"com.apple.streaming.transportStreamTimestamp"===u.owner)){var c=u.data,d=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;d*=4,d+=3&c[7],u.timeStamp=d,void 0===t.pts&&void 0===t.dts&&(t.pts=u.timeStamp,t.dts=u.timeStamp),this.trigger("timestamp",u)}t.frames.push(u),s+=10,s+=o}while(s<r);this.trigger("data",t)}}},Oe.prototype=new H;var Ue,Fe,Be,je=Oe,He=Pe,Ve=188;(Ue=function(){var e=new Uint8Array(Ve),t=0;Ue.prototype.init.call(this),this.push=function(n){var r,i=0,a=Ve;for(t?((r=new Uint8Array(n.byteLength+t)).set(e.subarray(0,t)),r.set(n,t),t=0):r=n;a<r.byteLength;)71!==r[i]||71!==r[a]?(i++,a++):(this.trigger("data",r.subarray(i,a)),i+=Ve,a+=Ve);i<r.byteLength&&(e.set(r.subarray(i),0),t=r.byteLength-i)},this.flush=function(){t===Ve&&71===e[0]&&(this.trigger("data",e),t=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){t=0,this.trigger("reset")}}).prototype=new H,Fe=function(){var e,t,n,r;Fe.prototype.init.call(this),r=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,r){var i=0;r.payloadUnitStartIndicator&&(i+=e[i]+1),"pat"===r.type?t(e.subarray(i),r):n(e.subarray(i),r)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],r.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=r.pmtPid},n=function(e,t){var n,i;if(1&e[5]){for(r.programMapTable={video:null,audio:null,"timed-metadata":{}},n=3+((15&e[1])<<8|e[2])-4,i=12+((15&e[10])<<8|e[11]);i<n;){var a=e[i],s=(31&e[i+1])<<8|e[i+2];a===Ce.H264_STREAM_TYPE&&null===r.programMapTable.video?r.programMapTable.video=s:a===Ce.ADTS_STREAM_TYPE&&null===r.programMapTable.audio?r.programMapTable.audio=s:a===Ce.METADATA_STREAM_TYPE&&(r.programMapTable["timed-metadata"][s]=a),i+=5+((15&e[i+3])<<8|e[i+4])}t.programMapTable=r.programMapTable}},this.push=function(t){var n={},r=4;if(n.payloadUnitStartIndicator=!!(64&t[1]),n.pid=31&t[1],n.pid<<=8,n.pid|=t[2],(48&t[3])>>>4>1&&(r+=t[r]+1),0===n.pid)n.type="pat",e(t.subarray(r),n),this.trigger("data",n);else if(n.pid===this.pmtPid)for(n.type="pmt",e(t.subarray(r),n),this.trigger("data",n);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,r,n]):this.processPes_(t,r,n)},this.processPes_=function(e,t,n){n.pid===this.programMapTable.video?n.streamType=Ce.H264_STREAM_TYPE:n.pid===this.programMapTable.audio?n.streamType=Ce.ADTS_STREAM_TYPE:n.streamType=this.programMapTable["timed-metadata"][n.pid],n.type="pes",n.data=e.subarray(t),this.trigger("data",n)}},Fe.prototype=new H,Fe.STREAM_TYPES={h264:27,adts:15},Be=function(){var e,t=this,n={data:[],size:0},r={data:[],size:0},i={data:[],size:0},a=function(e,n,r){var i,a,s=new Uint8Array(e.size),o={type:n},u=0,l=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,u=0;u<e.data.length;u++)a=e.data[u],s.set(a.data,l),l+=a.data.byteLength;var c,d,h,f;d=o,f=(c=s)[0]<<16|c[1]<<8|c[2],d.data=new Uint8Array,1===f&&(d.packetLength=6+(c[4]<<8|c[5]),d.dataAlignmentIndicator=0!=(4&c[6]),192&(h=c[7])&&(d.pts=(14&c[9])<<27|(255&c[10])<<20|(254&c[11])<<12|(255&c[12])<<5|(254&c[13])>>>3,d.pts*=4,d.pts+=(6&c[13])>>>1,d.dts=d.pts,64&h&&(d.dts=(14&c[14])<<27|(255&c[15])<<20|(254&c[16])<<12|(255&c[17])<<5|(254&c[18])>>>3,d.dts*=4,d.dts+=(6&c[18])>>>1)),d.data=c.subarray(9+c[8])),i="video"===n||o.packetLength<=e.size,(r||i)&&(e.size=0,e.data.length=0),i&&t.trigger("data",o)}};Be.prototype.init.call(this),this.push=function(s){({pat:function(){},pes:function(){var e,t;switch(s.streamType){case Ce.H264_STREAM_TYPE:e=n,t="video";break;case Ce.ADTS_STREAM_TYPE:e=r,t="audio";break;case Ce.METADATA_STREAM_TYPE:e=i,t="timed-metadata";break;default:return}s.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(s),e.size+=s.data.byteLength},pmt:function(){var n={type:"metadata",tracks:[]};null!==(e=s.programMapTable).video&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),t.trigger("data",n)}})[s.type]()},this.reset=function(){n.size=0,n.data.length=0,r.size=0,r.data.length=0,this.trigger("reset")},this.flushStreams_=function(){a(n,"video"),a(r,"audio"),a(i,"timed-metadata")},this.flush=function(){this.flushStreams_(),this.trigger("done")}},Be.prototype=new H;var qe={PAT_PID:0,MP2T_PACKET_LENGTH:Ve,TransportPacketStream:Ue,TransportParseStream:Fe,ElementaryStream:Be,TimestampRolloverStream:He,CaptionStream:Ee.CaptionStream,Cea608Stream:Ee.Cea608Stream,Cea708Stream:Ee.Cea708Stream,MetadataStream:je};for(var We in Ce)Ce.hasOwnProperty(We)&&(qe[We]=Ce[We]);var ze,Ge=qe,Xe=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];ze=function(e){var t,n=0;ze.prototype.init.call(this),this.push=function(r){var i,a,s,o,u,l,c=0;if(e||(n=0),"audio"===r.type)for(t?(o=t,(t=new Uint8Array(o.byteLength+r.data.byteLength)).set(o),t.set(r.data,o.byteLength)):t=r.data;c+5<t.length;)if(255===t[c]&&240==(246&t[c+1])){if(a=2*(1&~t[c+1]),i=(3&t[c+3])<<11|t[c+4]<<3|(224&t[c+5])>>5,l=9e4*(u=1024*(1+(3&t[c+6])))/Xe[(60&t[c+2])>>>2],s=c+i,t.byteLength<s)return;if(this.trigger("data",{pts:r.pts+n*l,dts:r.dts+n*l,sampleCount:u,audioobjecttype:1+(t[c+2]>>>6&3),channelcount:(1&t[c+2])<<2|(192&t[c+3])>>>6,samplerate:Xe[(60&t[c+2])>>>2],samplingfrequencyindex:(60&t[c+2])>>>2,samplesize:16,data:t.subarray(c+7+a,s)}),n++,t.byteLength===s)return void(t=void 0);t=t.subarray(s)}else c++},this.flush=function(){n=0,this.trigger("done")},this.reset=function(){t=void 0,this.trigger("reset")},this.endTimeline=function(){t=void 0,this.trigger("endedtimeline")}},ze.prototype=new H;var $e,Ke,Ze,Ye=ze,Qe=function(e){var t=e.byteLength,n=0,r=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+r},this.loadWord=function(){var i=e.byteLength-t,a=new Uint8Array(4),s=Math.min(4,t);if(0===s)throw new Error("no bytes available");a.set(e.subarray(i,i+s)),n=new DataView(a.buffer).getUint32(0),r=8*s,t-=s},this.skipBits=function(e){var i;r>e?(n<<=e,r-=e):(e-=r,e-=8*(i=Math.floor(e/8)),t-=i,this.loadWord(),n<<=e,r-=e)},this.readBits=function(e){var i=Math.min(r,e),a=n>>>32-i;return(r-=i)>0?n<<=i:t>0&&this.loadWord(),(i=e-i)>0?a<<i|this.readBits(i):a},this.skipLeadingZeros=function(){var e;for(e=0;e<r;++e)if(0!=(n&2147483648>>>e))return n<<=e,r-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};Ke=function(){var e,t,n=0;Ke.prototype.init.call(this),this.push=function(r){var i;t?((i=new Uint8Array(t.byteLength+r.data.byteLength)).set(t),i.set(r.data,t.byteLength),t=i):t=r.data;for(var a=t.byteLength;n<a-3;n++)if(1===t[n+2]){e=n+5;break}for(;e<a;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}n+3!==e-2&&this.trigger("data",t.subarray(n+3,e-2));do{e++}while(1!==t[e]&&e<a);n=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(n+3,e-2)),n=e-2,e+=3;break;default:e+=3}t=t.subarray(n),e-=n,n=0},this.reset=function(){t=null,n=0,this.trigger("reset")},this.flush=function(){t&&t.byteLength>3&&this.trigger("data",t.subarray(n+3)),t=null,n=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},Ke.prototype=new H,Ze={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},$e=function(){var e,t,n,r,i,a,s,o=new Ke;$e.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,n=e.pts,r=e.dts,o.push(e))},o.on("data",(function(s){var o={trackId:t,pts:n,dts:r,data:s};switch(31&s[0]){case 5:o.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:o.nalUnitType="sei_rbsp",o.escapedRBSP=i(s.subarray(1));break;case 7:o.nalUnitType="seq_parameter_set_rbsp",o.escapedRBSP=i(s.subarray(1)),o.config=a(o.escapedRBSP);break;case 8:o.nalUnitType="pic_parameter_set_rbsp";break;case 9:o.nalUnitType="access_unit_delimiter_rbsp"}e.trigger("data",o)})),o.on("done",(function(){e.trigger("done")})),o.on("partialdone",(function(){e.trigger("partialdone")})),o.on("reset",(function(){e.trigger("reset")})),o.on("endedtimeline",(function(){e.trigger("endedtimeline")})),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},s=function(e,t){var n,r=8,i=8;for(n=0;n<e;n++)0!==i&&(i=(r+t.readExpGolomb()+256)%256),r=0===i?r:i},i=function(e){for(var t,n,r=e.byteLength,i=[],a=1;a<r-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(i.push(a+2),a+=2):a++;if(0===i.length)return e;t=r-i.length,n=new Uint8Array(t);var s=0;for(a=0;a<t;s++,a++)s===i[0]&&(s++,i.shift()),n[a]=e[s];return n},a=function(e){var t,n,r,i,a,o,u,l,c,d,h,f,p,m=0,g=0,v=0,y=0,_=1;if(n=(t=new Qe(e)).readUnsignedByte(),i=t.readUnsignedByte(),r=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),Ze[n]&&(3===(a=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==a?8:12,p=0;p<h;p++)t.readBoolean()&&s(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),u=t.readUnsignedExpGolomb(),p=0;p<u;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),l=t.readUnsignedExpGolomb(),c=t.readUnsignedExpGolomb(),0===(d=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),v=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:f=[1,1];break;case 2:f=[12,11];break;case 3:f=[10,11];break;case 4:f=[16,11];break;case 5:f=[40,33];break;case 6:f=[24,11];break;case 7:f=[20,11];break;case 8:f=[32,11];break;case 9:f=[80,33];break;case 10:f=[18,11];break;case 11:f=[15,11];break;case 12:f=[64,33];break;case 13:f=[160,99];break;case 14:f=[4,3];break;case 15:f=[3,2];break;case 16:f=[2,1];break;case 255:f=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}f&&(_=f[0]/f[1])}return{profileIdc:n,levelIdc:r,profileCompatibility:i,width:Math.ceil((16*(l+1)-2*m-2*g)*_),height:(2-d)*(c+1)*16-2*v-2*y,sarRatio:f}}},$e.prototype=new H;var Je,et={H264Stream:$e,NalByteStream:Ke},tt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],nt=function(e,t){var n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return n=n>=0?n:0,(16&e[t+5])>>4?n+20:n+10},rt=function e(t,n){return t.length-n<10||t[n]!=="I".charCodeAt(0)||t[n+1]!=="D".charCodeAt(0)||t[n+2]!=="3".charCodeAt(0)?n:e(t,n+=nt(t,n))},it=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},at={isLikelyAacData:function(e){var t=rt(e,0);return e.length>=t+2&&255==(255&e[t])&&240==(240&e[t+1])&&16==(22&e[t+1])},parseId3TagSize:nt,parseAdtsSize:function(e,t){var n=(224&e[t+5])>>5,r=e[t+4]<<3;return 6144&e[t+3]|r|n},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240==(240&e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return tt[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,n,r;t=10,64&e[5]&&(t+=4,t+=it(e.subarray(10,14)));do{if((n=it(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){r=e.subarray(t+10,t+n+10);for(var i=0;i<r.byteLength;i++)if(0===r[i]){var a=unescape(function(e,t,n){var r,i="";for(r=0;r<n;r++)i+="%"+("00"+e[r].toString(16)).slice(-2);return i}(r,0,i));if("com.apple.streaming.transportStreamTimestamp"===a){var s=r.subarray(i+1),o=(1&s[3])<<30|s[4]<<22|s[5]<<14|s[6]<<6|s[7]>>>2;return(o*=4)+(3&s[7])}break}}t+=10,t+=n}while(t<e.byteLength);return null}};(Je=function(){var e=new Uint8Array,t=0;Je.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(n){var r,i,a,s,o=0,u=0;for(e.length?(s=e.length,(e=new Uint8Array(n.byteLength+s)).set(e.subarray(0,s)),e.set(n,s)):e=n;e.length-u>=3;)if(e[u]!=="I".charCodeAt(0)||e[u+1]!=="D".charCodeAt(0)||e[u+2]!=="3".charCodeAt(0))if(255!=(255&e[u])||240!=(240&e[u+1]))u++;else{if(e.length-u<7)break;if(u+(o=at.parseAdtsSize(e,u))>e.length)break;a={type:"audio",data:e.subarray(u,u+o),pts:t,dts:t},this.trigger("data",a),u+=o}else{if(e.length-u<10)break;if(u+(o=at.parseId3TagSize(e,u))>e.length)break;i={type:"timed-metadata",data:e.subarray(u,u+o)},this.trigger("data",i),u+=o}r=e.length-u,e=r>0?e.subarray(u):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){e=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new H;var st,ot,ut,lt,ct=Je,dt=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],ht=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],ft=et.H264Stream,pt=at.isLikelyAacData,mt=function(e,t){var n;if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},gt=function(e,t,n,r,i,a){return{start:{dts:e,pts:e+(n-t)},end:{dts:e+(r-t),pts:e+(i-n)},prependedContentDuration:a,baseMediaDecodeTime:e}};ot=function(e,t){var n=[],r=0,i=0,a=0,s=1/0;t=t||{},ot.prototype.init.call(this),this.push=function(t){fe(e,t),e&&dt.forEach((function(n){e[n]=t[n]})),n.push(t)},this.setEarliestDts=function(e){i=e},this.setVideoBaseMediaDecodeTime=function(e){s=e},this.setAudioAppendStart=function(e){a=e},this.flush=function(){var o,u,l,c,d,h,f;0!==n.length?(o=function(e,t,n){return t.minSegmentDts>=n?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=n&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))}(n,e,i),e.baseMediaDecodeTime=he(e,t.keepOriginalTimestamps),f=ce(e,o,a,s),e.samples=function(e){var t,n,r=[];for(t=0;t<e.length;t++)n=e[t],r.push({size:n.data.byteLength,duration:1024});return r}(o),l=Y(function(e){var t,n,r=0,i=new Uint8Array(function(e){var t,n=0;for(t=0;t<e.length;t++)n+=e[t].data.byteLength;return n}(e));for(t=0;t<e.length;t++)n=e[t],i.set(n.data,r),r+=n.data.byteLength;return i}(o)),n=[],u=Q(r,[e]),c=new Uint8Array(u.byteLength+l.byteLength),r++,c.set(u),c.set(l,u.byteLength),de(e),d=Math.ceil(9216e4/e.samplerate),o.length&&(h=o.length*d,this.trigger("segmentTimingInfo",gt(oe(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,f||0)),this.trigger("timingInfo",{start:o[0].pts,end:o[0].pts+h})),this.trigger("data",{track:e,boxes:c}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.reset=function(){de(e),n=[],this.trigger("reset")}},ot.prototype=new H,st=function(e,t){var n,r,i=0,a=[],s=[];t=t||{},st.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){fe(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||n||(n=t.config,e.sps=[t.data],ht.forEach((function(t){e[t]=n[t]}),this)),"pic_parameter_set_rbsp"!==t.nalUnitType||r||(r=t.data,e.pps=[t.data]),a.push(t)},this.flush=function(){for(var n,r,o,u,l,c,d,h,f=0;a.length&&"access_unit_delimiter_rbsp"!==a[0].nalUnitType;)a.shift();if(0===a.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(n=function(e){var t,n,r=[],i=[];for(i.byteLength=0,i.nalCount=0,i.duration=0,r.byteLength=0,t=0;t<e.length;t++)"access_unit_delimiter_rbsp"===(n=e[t]).nalUnitType?(r.length&&(r.duration=n.dts-r.dts,i.byteLength+=r.byteLength,i.nalCount+=r.length,i.duration+=r.duration,i.push(r)),(r=[n]).byteLength=n.data.byteLength,r.pts=n.pts,r.dts=n.dts):("slice_layer_without_partitioning_rbsp_idr"===n.nalUnitType&&(r.keyFrame=!0),r.duration=n.dts-r.dts,r.byteLength+=n.data.byteLength,r.push(n));return i.length&&(!r.duration||r.duration<=0)&&(r.duration=i[i.length-1].duration),i.byteLength+=r.byteLength,i.nalCount+=r.length,i.duration+=r.duration,i.push(r),i}(a),(o=function(e){var t,n,r=[],i=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=e[0].pts,r.dts=e[0].dts,i.byteLength=0,i.nalCount=0,i.duration=0,i.pts=e[0].pts,i.dts=e[0].dts,t=0;t<e.length;t++)(n=e[t]).keyFrame?(r.length&&(i.push(r),i.byteLength+=r.byteLength,i.nalCount+=r.nalCount,i.duration+=r.duration),(r=[n]).nalCount=n.length,r.byteLength=n.byteLength,r.pts=n.pts,r.dts=n.dts,r.duration=n.duration):(r.duration+=n.duration,r.nalCount+=n.length,r.byteLength+=n.byteLength,r.push(n));return i.length&&r.duration<=0&&(r.duration=i[i.length-1].duration),i.byteLength+=r.byteLength,i.nalCount+=r.nalCount,i.duration+=r.duration,i.push(r),i}(n))[0][0].keyFrame||((r=this.getGopForFusion_(a[0],e))?(f=r.duration,o.unshift(r),o.byteLength+=r.byteLength,o.nalCount+=r.nalCount,o.pts=r.pts,o.dts=r.dts,o.duration+=r.duration):o=function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e}(o)),s.length){var p;if(!(p=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),a=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");de(e),o=p}fe(e,o),e.samples=function(e,t){var n,r,i,a,s,o=t||0,u=[];for(n=0;n<e.length;n++)for(a=e[n],r=0;r<a.length;r++)s=a[r],o+=(i=J(s,o)).size,u.push(i);return u}(o),l=Y(function(e){var t,n,r,i,a,s,o=0,u=e.byteLength,l=e.nalCount,c=new Uint8Array(u+4*l),d=new DataView(c.buffer);for(t=0;t<e.length;t++)for(i=e[t],n=0;n<i.length;n++)for(a=i[n],r=0;r<a.length;r++)s=a[r],d.setUint32(o,s.data.byteLength),o+=4,c.set(s.data,o),o+=s.data.byteLength;return c}(o)),e.baseMediaDecodeTime=he(e,t.keepOriginalTimestamps),this.trigger("processedGopsInfo",o.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),d=o[0],h=o[o.length-1],this.trigger("segmentTimingInfo",gt(e.baseMediaDecodeTime,d.dts,d.pts,h.dts+h.duration,h.pts+h.duration,f)),this.trigger("timingInfo",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),a=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),u=Q(i,[e]),c=new Uint8Array(u.byteLength+l.byteLength),i++,c.set(u),c.set(l,u.byteLength),this.trigger("data",{track:e,boxes:c}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),a=[],this.gopCache_.length=0,s.length=0,this.trigger("reset")},this.resetStream_=function(){de(e),n=void 0,r=void 0},this.getGopForFusion_=function(t){var n,r,i,a,s,o=1/0;for(s=0;s<this.gopCache_.length;s++)i=(a=this.gopCache_[s]).gop,e.pps&&mt(e.pps[0],a.pps[0])&&e.sps&&mt(e.sps[0],a.sps[0])&&(i.dts<e.timelineStartInfo.dts||(n=t.dts-i.dts-i.duration)>=-1e4&&n<=45e3&&(!r||o>n)&&(r=a,o=n));return r?r.gop:null},this.alignGopsAtStart_=function(e){var t,n,r,i,a,o,u,l;for(a=e.byteLength,o=e.nalCount,u=e.duration,t=n=0;t<s.length&&n<e.length&&(r=s[t],i=e[n],r.pts!==i.pts);)i.pts>r.pts?t++:(n++,a-=i.byteLength,o-=i.nalCount,u-=i.duration);return 0===n?e:n===e.length?null:((l=e.slice(n)).byteLength=a,l.duration=u,l.nalCount=o,l.pts=l[0].pts,l.dts=l[0].dts,l)},this.alignGopsAtEnd_=function(e){var t,n,r,i,a,o,u;for(t=s.length-1,n=e.length-1,a=null,o=!1;t>=0&&n>=0;){if(r=s[t],i=e[n],r.pts===i.pts){o=!0;break}r.pts>i.pts?t--:(t===s.length-1&&(a=n),n--)}if(!o&&null===a)return null;if(0===(u=o?n:a))return e;var l=e.slice(u),c=l.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return l.byteLength=c.byteLength,l.duration=c.duration,l.nalCount=c.nalCount,l.pts=l[0].pts,l.dts=l[0].dts,l},this.alignGopsWith=function(e){s=e}},st.prototype=new H,lt=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,"boolean"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,lt.prototype.init.call(this),this.push=function(e){return e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void("audio"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}},lt.prototype=new H,lt.prototype.flush=function(e){var t,n,r,a,s=0,o={captions:[],captionStreams:{},metadata:[],info:{}},l=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(l=this.videoTrack.timelineStartInfo.pts,ht.forEach((function(e){o.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(l=this.audioTrack.timelineStartInfo.pts,dt.forEach((function(e){o.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?o.type=this.pendingTracks[0].type:o.type="combined",this.emittedTracks+=this.pendingTracks.length,r=function(e){var t,n=i(),r=u(e);return(t=new Uint8Array(n.byteLength+r.byteLength)).set(n),t.set(r,n.byteLength),t}(this.pendingTracks),o.initSegment=new Uint8Array(r.byteLength),o.initSegment.set(r),o.data=new Uint8Array(this.pendingBytes),a=0;a<this.pendingBoxes.length;a++)o.data.set(this.pendingBoxes[a],s),s+=this.pendingBoxes[a].byteLength;for(a=0;a<this.pendingCaptions.length;a++)(t=this.pendingCaptions[a]).startTime=le(t.startPts,l,this.keepOriginalTimestamps),t.endTime=le(t.endPts,l,this.keepOriginalTimestamps),o.captionStreams[t.stream]=!0,o.captions.push(t);for(a=0;a<this.pendingMetadata.length;a++)(n=this.pendingMetadata[a]).cueTime=le(n.pts,l,this.keepOriginalTimestamps),o.metadata.push(n);for(o.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",o),a=0;a<o.captions.length;a++)t=o.captions[a],this.trigger("caption",t);for(a=0;a<o.metadata.length;a++)n=o.metadata[a],this.trigger("id3Frame",n)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},lt.prototype.setRemux=function(e){this.remuxTracks=e},ut=function(e){var t,n,r=this,i=!0;ut.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var i={};this.transmuxPipeline_=i,i.type="aac",i.metadataStream=new Ge.MetadataStream,i.aacStream=new ct,i.audioTimestampRolloverStream=new Ge.TimestampRolloverStream("audio"),i.timedMetadataTimestampRolloverStream=new Ge.TimestampRolloverStream("timed-metadata"),i.adtsStream=new Ye,i.coalesceStream=new lt(e,i.metadataStream),i.headOfPipeline=i.aacStream,i.aacStream.pipe(i.audioTimestampRolloverStream).pipe(i.adtsStream),i.aacStream.pipe(i.timedMetadataTimestampRolloverStream).pipe(i.metadataStream).pipe(i.coalesceStream),i.metadataStream.on("timestamp",(function(e){i.aacStream.setTimestamp(e.timeStamp)})),i.aacStream.on("data",(function(a){"timed-metadata"!==a.type&&"audio"!==a.type||i.audioSegmentStream||(n=n||{timelineStartInfo:{baseMediaDecodeTime:r.baseMediaDecodeTime},codec:"adts",type:"audio"},i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new ot(n,e),i.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo")),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream),r.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t}))})),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var i={};this.transmuxPipeline_=i,i.type="ts",i.metadataStream=new Ge.MetadataStream,i.packetStream=new Ge.TransportPacketStream,i.parseStream=new Ge.TransportParseStream,i.elementaryStream=new Ge.ElementaryStream,i.timestampRolloverStream=new Ge.TimestampRolloverStream,i.adtsStream=new Ye,i.h264Stream=new ft,i.captionStream=new Ge.CaptionStream(e),i.coalesceStream=new lt(e,i.metadataStream),i.headOfPipeline=i.packetStream,i.packetStream.pipe(i.parseStream).pipe(i.elementaryStream).pipe(i.timestampRolloverStream),i.timestampRolloverStream.pipe(i.h264Stream),i.timestampRolloverStream.pipe(i.adtsStream),i.timestampRolloverStream.pipe(i.metadataStream).pipe(i.coalesceStream),i.h264Stream.pipe(i.captionStream).pipe(i.coalesceStream),i.elementaryStream.on("data",(function(a){var s;if("metadata"===a.type){for(s=a.tracks.length;s--;)t||"video"!==a.tracks[s].type?n||"audio"!==a.tracks[s].type||((n=a.tracks[s]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime):(t=a.tracks[s]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime;t&&!i.videoSegmentStream&&(i.coalesceStream.numberOfTracks++,i.videoSegmentStream=new st(t,e),i.videoSegmentStream.on("timelineStartInfo",(function(t){n&&!e.keepOriginalTimestamps&&(n.timelineStartInfo=t,i.audioSegmentStream.setEarliestDts(t.dts-r.baseMediaDecodeTime))})),i.videoSegmentStream.on("processedGopsInfo",r.trigger.bind(r,"gopInfo")),i.videoSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"videoSegmentTimingInfo")),i.videoSegmentStream.on("baseMediaDecodeTime",(function(e){n&&i.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),i.videoSegmentStream.on("timingInfo",r.trigger.bind(r,"videoTimingInfo")),i.h264Stream.pipe(i.videoSegmentStream).pipe(i.coalesceStream)),n&&!i.audioSegmentStream&&(i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new ot(n,e),i.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo")),i.audioSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"audioSegmentTimingInfo")),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream)),r.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t})}})),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("id3Frame",(function(e){e.dispatchType=i.metadataStream.dispatchType,r.trigger("id3Frame",e)})),i.coalesceStream.on("caption",this.trigger.bind(this,"caption")),i.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setBaseMediaDecodeTime=function(r){var i=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=r),n&&(n.timelineStartInfo.dts=void 0,n.timelineStartInfo.pts=void 0,de(n),i.audioTimestampRolloverStream&&i.audioTimestampRolloverStream.discontinuity()),t&&(i.videoSegmentStream&&(i.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,de(t),i.captionStream.reset()),i.timestampRolloverStream&&i.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){n&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var n=this.transmuxPipeline_;e.remux=t,n&&n.coalesceStream&&n.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.push=function(e){if(i){var t=pt(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),i=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){i=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},ut.prototype=new H;var vt,yt,_t,bt={Transmuxer:ut,VideoSegmentStream:st,AudioSegmentStream:ot,AUDIO_PROPERTIES:dt,VIDEO_PROPERTIES:ht,generateSegmentTimingInfo:gt},Tt=function(e){return e>>>0},St=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),(t+=String.fromCharCode(e[2]))+String.fromCharCode(e[3])},wt=Tt,kt=function e(t,n){var r,i,a,s,o,u=[];if(!n.length)return null;for(r=0;r<t.byteLength;)i=wt(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3]),a=St(t.subarray(r+4,r+8)),s=i>1?r+i:t.byteLength,a===n[0]&&(1===n.length?u.push(t.subarray(r+8,s)):(o=e(t.subarray(r+8,s),n.slice(1))).length&&(u=u.concat(o))),r=s;return u},Et=Tt,Ct=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},xt=function(e){for(var t,n,r=e.byteLength,i=[],a=1;a<r-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(i.push(a+2),a+=2):a++;if(0===i.length)return e;t=r-i.length,n=new Uint8Array(t);var s=0;for(a=0;a<t;s++,a++)s===i[0]&&(s++,i.shift()),n[a]=e[s];return n},It=Ee.CaptionStream,At=function(e,t){for(var n=e,r=0;r<t.length;r++){var i=t[r];if(n<i.size)return i;n-=i.size}return null},Ot=function(e,t){var n=kt(e,["moof","traf"]),r=kt(e,["mdat"]),i={},a=[];return r.forEach((function(e,t){var r=n[t];a.push({mdat:e,traf:r})})),a.forEach((function(e){var n,r,a=e.mdat,s=e.traf,o=function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:n.getUint32(4)},i=1&r.flags[2],a=2&r.flags[2],s=8&r.flags[2],o=16&r.flags[2],u=32&r.flags[2],l=65536&r.flags[0],c=131072&r.flags[0];return t=8,i&&(t+=4,r.baseDataOffset=n.getUint32(12),t+=4),a&&(r.sampleDescriptionIndex=n.getUint32(t),t+=4),s&&(r.defaultSampleDuration=n.getUint32(t),t+=4),o&&(r.defaultSampleSize=n.getUint32(t),t+=4),u&&(r.defaultSampleFlags=n.getUint32(t)),l&&(r.durationIsEmpty=!0),!i&&c&&(r.baseDataOffsetIsMoof=!0),r}(kt(s,["tfhd"])[0]),u=o.trackId,l=kt(s,["tfdt"]),c=l.length>0?function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4)),baseMediaDecodeTime:Et(e[4]<<24|e[5]<<16|e[6]<<8|e[7])};return 1===t.version&&(t.baseMediaDecodeTime*=Math.pow(2,32),t.baseMediaDecodeTime+=Et(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),t}(l[0]).baseMediaDecodeTime:0,d=kt(s,["trun"]);t===u&&d.length>0&&(n=function(e,t,n){var r=t,i=n.defaultSampleDuration||0,a=n.defaultSampleSize||0,s=n.trackId,o=[];return e.forEach((function(e){var t=function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},r=new DataView(e.buffer,e.byteOffset,e.byteLength),i=1&n.flags[2],a=4&n.flags[2],s=1&n.flags[1],o=2&n.flags[1],u=4&n.flags[1],l=8&n.flags[1],c=r.getUint32(4),d=8;for(i&&(n.dataOffset=r.getInt32(d),d+=4),a&&c&&(t={flags:Ct(e.subarray(d,d+4))},d+=4,s&&(t.duration=r.getUint32(d),d+=4),o&&(t.size=r.getUint32(d),d+=4),l&&(1===n.version?t.compositionTimeOffset=r.getInt32(d):t.compositionTimeOffset=r.getUint32(d),d+=4),n.samples.push(t),c--);c--;)t={},s&&(t.duration=r.getUint32(d),d+=4),o&&(t.size=r.getUint32(d),d+=4),u&&(t.flags=Ct(e.subarray(d,d+4)),d+=4),l&&(1===n.version?t.compositionTimeOffset=r.getInt32(d):t.compositionTimeOffset=r.getUint32(d),d+=4),n.samples.push(t);return n}(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=i),void 0===e.size&&(e.size=a),e.trackId=s,e.dts=r,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),e.pts=r+e.compositionTimeOffset,r+=e.duration})),o=o.concat(t)})),o}(d,c,o),r=function(e,t,n){var r,i,a,s,o=new DataView(e.buffer,e.byteOffset,e.byteLength),u=[];for(i=0;i+4<e.length;i+=a)if(a=o.getUint32(i),i+=4,!(a<=0))switch(31&e[i]){case 6:var l=e.subarray(i+1,i+1+a),c=At(i,t);if(r={nalUnitType:"sei_rbsp",size:a,data:l,escapedRBSP:xt(l),trackId:n},c)r.pts=c.pts,r.dts=c.dts,s=c;else{if(!s){console.log("We've encountered a nal unit without data. See mux.js#233.");break}r.pts=s.pts,r.dts=s.dts}u.push(r)}return u}(a,n,u),i[u]||(i[u]=[]),i[u]=i[u].concat(r))})),i},Pt=function(){var e,t,n,r,i,a,s=!1;this.isInitialized=function(){return s},this.init=function(t){e=new It,s=!0,a=!!t&&t.isPartial,e.on("data",(function(e){e.startTime=e.startPts/r,e.endTime=e.endPts/r,i.captions.push(e),i.captionStreams[e.stream]=!0}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&"object"==typeof t&&0===Object.keys(t).length||n===e[0]&&r===t[n])},this.parse=function(e,a,s){var o;if(!this.isInitialized())return null;if(!a||!s)return null;if(this.isNewInit(a,s))n=a[0],r=s[n];else if(null===n||!r)return t.push(e),null;for(;t.length>0;){var u=t.shift();this.parse(u,a,s)}return o=function(e,t,n){return null===t?null:{seiNals:Ot(e,t)[t],timescale:n}}(e,n,r),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),i):null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach((function(t){e.push(t)}))},this.flushStream=function(){if(!this.isInitialized())return null;a?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){i.captions=[],i.captionStreams={}},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],n=null,r=null,i?this.clearParsedCaptions():i={captions:[],captionStreams:{}},this.resetCaptionStream()},this.reset()},Lt=Tt,Dt=function(e){return("00"+e.toString(16)).slice(-2)};vt=function(e,t){var n,r,i;return n=kt(t,["moof","traf"]),r=[].concat.apply([],n.map((function(t){return kt(t,["tfhd"]).map((function(n){var r,i,a;return r=Lt(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),i=e[r]||9e4,a=kt(t,["tfdt"]).map((function(e){var t,n;return t=e[0],n=Lt(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),1===t&&(n*=Math.pow(2,32),n+=Lt(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),n}))[0],(a="number"!=typeof a||isNaN(a)?1/0:a)/i}))}))),i=Math.min.apply(null,r),isFinite(i)?i:0},_t=function(e){var t=0===e[0]?12:20;return Lt(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},yt=function(e){var t=kt(e,["moov","trak"]),n=[];return t.forEach((function(e){var t,r,i={},a=kt(e,["tkhd"])[0];a&&(r=(t=new DataView(a.buffer,a.byteOffset,a.byteLength)).getUint8(0),i.id=0===r?t.getUint32(12):t.getUint32(20));var s=kt(e,["mdia","hdlr"])[0];if(s){var o=St(s.subarray(8,12));i.type="vide"===o?"video":"soun"===o?"audio":o}var u=kt(e,["mdia","minf","stbl","stsd"])[0];if(u){var l=u.subarray(8);i.codec=St(l.subarray(4,8));var c,d=kt(l,[i.codec])[0];d&&(/^[a-z]vc[1-9]$/i.test(i.codec)?(c=d.subarray(78),"avcC"===St(c.subarray(4,8))&&c.length>11?(i.codec+=".",i.codec+=Dt(c[9]),i.codec+=Dt(c[10]),i.codec+=Dt(c[11])):i.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(i.codec)?(c=d.subarray(28),"esds"===St(c.subarray(4,8))&&c.length>20&&0!==c[19]?(i.codec+="."+Dt(c[19]),i.codec+="."+Dt(c[20]>>>2&63).replace(/^0/,"")):i.codec="mp4a.40.2"):i.codec=i.codec.toLowerCase())}var h=kt(e,["mdia","mdhd"])[0];h&&(i.timescale=_t(h)),n.push(i)})),n};var Rt=vt,Mt=yt,Nt=function(e){var t=31&e[1];return(t<<=8)|e[2]},Ut=function(e){return!!(64&e[1])},Ft=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},Bt=function(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},jt={parseType:function(e,t){var n=Nt(e);return 0===n?"pat":n===t?"pmt":t?"pes":null},parsePat:function(e){var t=Ut(e),n=4+Ft(e);return t&&(n+=e[n]+1),(31&e[n+10])<<8|e[n+11]},parsePmt:function(e){var t={},n=Ut(e),r=4+Ft(e);if(n&&(r+=e[r]+1),1&e[r+5]){var i;i=3+((15&e[r+1])<<8|e[r+2])-4;for(var a=12+((15&e[r+10])<<8|e[r+11]);a<i;){var s=r+a;t[(31&e[s+1])<<8|e[s+2]]=e[s],a+=5+((15&e[s+3])<<8|e[s+4])}return t}},parsePayloadUnitStartIndicator:Ut,parsePesType:function(e,t){switch(t[Nt(e)]){case Ce.H264_STREAM_TYPE:return"video";case Ce.ADTS_STREAM_TYPE:return"audio";case Ce.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!Ut(e))return null;var t=4+Ft(e);if(t>=e.byteLength)return null;var n,r=null;return 192&(n=e[t+7])&&((r={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,r.pts*=4,r.pts+=(6&e[t+13])>>>1,r.dts=r.pts,64&n&&(r.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,r.dts*=4,r.dts+=(6&e[t+18])>>>1)),r},videoPacketContainsKeyFrame:function(e){for(var t=4+Ft(e),n=e.subarray(t),r=0,i=0,a=!1;i<n.byteLength-3;i++)if(1===n[i+2]){r=i+5;break}for(;r<n.byteLength;)switch(n[r]){case 0:if(0!==n[r-1]){r+=2;break}if(0!==n[r-2]){r++;break}i+3!==r-2&&"slice_layer_without_partitioning_rbsp_idr"===Bt(31&n[i+3])&&(a=!0);do{r++}while(1!==n[r]&&r<n.length);i=r-2,r+=3;break;case 1:if(0!==n[r-1]||0!==n[r-2]){r+=3;break}"slice_layer_without_partitioning_rbsp_idr"===Bt(31&n[i+3])&&(a=!0),i=r-2,r+=3;break;default:r+=3}return n=n.subarray(i),r-=i,i=0,n&&n.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===Bt(31&n[i+3])&&(a=!0),a}},Ht=Le,Vt={};Vt.ts=jt,Vt.aac=at;var qt=ie,Wt=188,zt=71,Gt=function(e,t,n){for(var r,i,a,s,o=0,u=Wt,l=!1;u<=e.byteLength;)if(e[o]!==zt||e[u]!==zt&&u!==e.byteLength)o++,u++;else{if(r=e.subarray(o,u),"pes"===Vt.ts.parseType(r,t.pid)&&(i=Vt.ts.parsePesType(r,t.table),a=Vt.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(s=Vt.ts.parsePesTime(r))&&(s.type="audio",n.audio.push(s),l=!0)),l)break;o+=Wt,u+=Wt}for(o=(u=e.byteLength)-Wt,l=!1;o>=0;)if(e[o]!==zt||e[u]!==zt&&u!==e.byteLength)o--,u--;else{if(r=e.subarray(o,u),"pes"===Vt.ts.parseType(r,t.pid)&&(i=Vt.ts.parsePesType(r,t.table),a=Vt.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(s=Vt.ts.parsePesTime(r))&&(s.type="audio",n.audio.push(s),l=!0)),l)break;o-=Wt,u-=Wt}},Xt=function(e,t,n){for(var r,i,a,s,o,u,l,c=0,d=Wt,h=!1,f={data:[],size:0};d<e.byteLength;)if(e[c]!==zt||e[d]!==zt)c++,d++;else{if(r=e.subarray(c,d),"pes"===Vt.ts.parseType(r,t.pid)&&(i=Vt.ts.parsePesType(r,t.table),a=Vt.ts.parsePayloadUnitStartIndicator(r),"video"===i&&(a&&!h&&(s=Vt.ts.parsePesTime(r))&&(s.type="video",n.video.push(s),h=!0),!n.firstKeyFrame))){if(a&&0!==f.size){for(o=new Uint8Array(f.size),u=0;f.data.length;)l=f.data.shift(),o.set(l,u),u+=l.byteLength;if(Vt.ts.videoPacketContainsKeyFrame(o)){var p=Vt.ts.parsePesTime(o);p?(n.firstKeyFrame=p,n.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}f.size=0}f.data.push(r),f.size+=r.byteLength}if(h&&n.firstKeyFrame)break;c+=Wt,d+=Wt}for(c=(d=e.byteLength)-Wt,h=!1;c>=0;)if(e[c]!==zt||e[d]!==zt)c--,d--;else{if(r=e.subarray(c,d),"pes"===Vt.ts.parseType(r,t.pid)&&(i=Vt.ts.parsePesType(r,t.table),a=Vt.ts.parsePayloadUnitStartIndicator(r),"video"===i&&a&&(s=Vt.ts.parsePesTime(r))&&(s.type="video",n.video.push(s),h=!0)),h)break;c-=Wt,d-=Wt}},$t=function(e,t){var n;return n=Vt.aac.isLikelyAacData(e)?function(e){for(var t,n=!1,r=0,i=null,a=null,s=0,o=0;e.length-o>=3;){switch(Vt.aac.parseType(e,o)){case"timed-metadata":if(e.length-o<10){n=!0;break}if((s=Vt.aac.parseId3TagSize(e,o))>e.length){n=!0;break}null===a&&(t=e.subarray(o,o+s),a=Vt.aac.parseAacTimestamp(t)),o+=s;break;case"audio":if(e.length-o<7){n=!0;break}if((s=Vt.aac.parseAdtsSize(e,o))>e.length){n=!0;break}null===i&&(t=e.subarray(o,o+s),i=Vt.aac.parseSampleRate(t)),r++,o+=s;break;default:o++}if(n)return null}if(null===i||null===a)return null;var u=qt/i;return{audio:[{type:"audio",dts:a,pts:a},{type:"audio",dts:a+1024*r*u,pts:a+1024*r*u}]}}(e):function(e){var t={pid:null,table:null},n={};for(var r in function(e,t){for(var n,r=0,i=Wt;i<e.byteLength;)if(e[r]!==zt||e[i]!==zt)r++,i++;else{switch(n=e.subarray(r,i),Vt.ts.parseType(n,t.pid)){case"pat":t.pid||(t.pid=Vt.ts.parsePat(n));break;case"pmt":t.table||(t.table=Vt.ts.parsePmt(n))}if(t.pid&&t.table)return;r+=Wt,i+=Wt}}(e,t),t.table)if(t.table.hasOwnProperty(r))switch(t.table[r]){case Ce.H264_STREAM_TYPE:n.video=[],Xt(e,t,n),0===n.video.length&&delete n.video;break;case Ce.ADTS_STREAM_TYPE:n.audio=[],Gt(e,t,n),0===n.audio.length&&delete n.audio}return n}(e),n&&(n.audio||n.video)?(function(e,t){if(e.audio&&e.audio.length){var n=t;(void 0===n||isNaN(n))&&(n=e.audio[0].dts),e.audio.forEach((function(e){e.dts=Ht(e.dts,n),e.pts=Ht(e.pts,n),e.dtsTime=e.dts/qt,e.ptsTime=e.pts/qt}))}if(e.video&&e.video.length){var r=t;if((void 0===r||isNaN(r))&&(r=e.video[0].dts),e.video.forEach((function(e){e.dts=Ht(e.dts,r),e.pts=Ht(e.pts,r),e.dtsTime=e.dts/qt,e.ptsTime=e.pts/qt})),e.firstKeyFrame){var i=e.firstKeyFrame;i.dts=Ht(i.dts,r),i.pts=Ht(i.pts,r),i.dtsTime=i.dts/qt,i.ptsTime=i.pts/qt}}}(n,t),n):null},Kt=function(){function e(e,t){this.options=t||{},this.self=e,this.init()}var t=e.prototype;return t.init=function(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new bt.Transmuxer(this.options),function(e,t){t.on("data",(function(t){var n=t.initSegment;t.initSegment={data:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength};var r=t.data;t.data=r.buffer,e.postMessage({action:"data",segment:t,byteOffset:r.byteOffset,byteLength:r.byteLength},[t.data])})),t.on("done",(function(t){e.postMessage({action:"done"})})),t.on("gopInfo",(function(t){e.postMessage({action:"gopInfo",gopInfo:t})})),t.on("videoSegmentTimingInfo",(function(t){var n={start:{decode:se(t.start.dts),presentation:se(t.start.pts)},end:{decode:se(t.end.dts),presentation:se(t.end.pts)},baseMediaDecodeTime:se(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=se(t.prependedContentDuration)),e.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:n})})),t.on("audioSegmentTimingInfo",(function(t){var n={start:{decode:se(t.start.dts),presentation:se(t.start.pts)},end:{decode:se(t.end.dts),presentation:se(t.end.pts)},baseMediaDecodeTime:se(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=se(t.prependedContentDuration)),e.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:n})})),t.on("id3Frame",(function(t){e.postMessage({action:"id3Frame",id3Frame:t})})),t.on("caption",(function(t){e.postMessage({action:"caption",caption:t})})),t.on("trackinfo",(function(t){e.postMessage({action:"trackinfo",trackInfo:t})})),t.on("audioTimingInfo",(function(t){e.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:se(t.start),end:se(t.end)}})})),t.on("videoTimingInfo",(function(t){e.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:se(t.start),end:se(t.end)}})}))}(this.self,this.transmuxer)},t.pushMp4Captions=function(e){this.captionParser||(this.captionParser=new Pt,this.captionParser.init());var t=new Uint8Array(e.data,e.byteOffset,e.byteLength),n=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:"mp4Captions",captions:n&&n.captions||[],data:t.buffer},[t.buffer])},t.probeMp4StartTime=function(e){var t=e.timescales,n=e.data,r=Rt(t,n);this.self.postMessage({action:"probeMp4StartTime",startTime:r,data:n},[n.buffer])},t.probeMp4Tracks=function(e){var t=e.data,n=Mt(t);this.self.postMessage({action:"probeMp4Tracks",tracks:n,data:t},[t.buffer])},t.probeTs=function(e){var t=e.data,n=e.baseStartTime,r="number"!=typeof n||isNaN(n)?void 0:n*ie,i=$t(t,r),a=null;i&&((a={hasVideo:i.video&&2===i.video.length||!1,hasAudio:i.audio&&2===i.audio.length||!1}).hasVideo&&(a.videoStart=i.video[0].ptsTime),a.hasAudio&&(a.audioStart=i.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:a,data:t},[t.buffer])},t.clearAllMp4Captions=function(){this.captionParser&&this.captionParser.clearAllCaptions()},t.clearParsedMp4Captions=function(){this.captionParser&&this.captionParser.clearParsedCaptions()},t.push=function(e){var t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)},t.reset=function(){this.transmuxer.reset()},t.setTimestampOffset=function(e){var t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(ae(t)))},t.setAudioAppendStart=function(e){this.transmuxer.setAudioAppendStart(Math.ceil(ae(e.appendStart)))},t.setRemux=function(e){this.transmuxer.setRemux(e.remux)},t.flush=function(e){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})},t.endTimeline=function(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})},t.alignGopsWith=function(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())},e}();self.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new Kt(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new Kt(self)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}}))),jo=No(Bo),Ho=function(e){var t=e.transmuxer,n=e.bytes,r=e.audioAppendStart,i=e.gopsToAlignWith,a=e.remux,s=e.onData,o=e.onTrackInfo,u=e.onAudioTimingInfo,l=e.onVideoTimingInfo,c=e.onVideoSegmentTimingInfo,d=e.onAudioSegmentTimingInfo,h=e.onId3,f=e.onCaptions,p=e.onDone,m=e.onEndedTimeline,g=e.isEndOfTimeline,v={buffer:[]},y=g;if(t.onmessage=function(n){t.currentTransmux===e&&("data"===n.data.action&&function(e,t,n){var r=e.data.segment,i=r.type,a=r.initSegment,s=r.captions,o=r.captionStreams,u=r.metadata,l=r.videoFrameDtsTime,c=r.videoFramePtsTime;t.buffer.push({captions:s,captionStreams:o,metadata:u});var d=e.data.segment.boxes||{data:e.data.segment.data},h={type:i,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(a.data,a.byteOffset,a.byteLength)};void 0!==l&&(h.videoFrameDtsTime=l),void 0!==c&&(h.videoFramePtsTime=c),n(h)}(n,v,s),"trackinfo"===n.data.action&&o(n.data.trackInfo),"gopInfo"===n.data.action&&function(e,t){t.gopInfo=e.data.gopInfo}(n,v),"audioTimingInfo"===n.data.action&&u(n.data.audioTimingInfo),"videoTimingInfo"===n.data.action&&l(n.data.videoTimingInfo),"videoSegmentTimingInfo"===n.data.action&&c(n.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===n.data.action&&d(n.data.audioSegmentTimingInfo),"id3Frame"===n.data.action&&h([n.data.id3Frame],n.data.id3Frame.dispatchType),"caption"===n.data.action&&f(n.data.caption),"endedtimeline"===n.data.action&&(y=!1,m()),"transmuxed"===n.data.type&&(y||(t.onmessage=null,function(e){var t=e.transmuxedData,n=e.callback;t.buffer=[],n(t)}({transmuxedData:v,callback:p}),Vo(t))))},r&&t.postMessage({action:"setAudioAppendStart",appendStart:r}),Array.isArray(i)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:i}),void 0!==a&&t.postMessage({action:"setRemux",remux:a}),n.byteLength){var _=n instanceof ArrayBuffer?n:n.buffer,b=n instanceof ArrayBuffer?0:n.byteOffset;t.postMessage({action:"push",data:_,byteOffset:b,byteLength:n.byteLength},[_])}g&&t.postMessage({action:"endTimeline"}),t.postMessage({action:"flush"})},Vo=function(e){e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),"function"==typeof e.currentTransmux?e.currentTransmux():Ho(e.currentTransmux))},qo=function(e,t){e.postMessage({action:t}),Vo(e)},Wo=function(e){!function(e,t){if(!t.currentTransmux)return t.currentTransmux=e,void qo(t,e);t.transmuxQueue.push(qo.bind(null,t,e))}("reset",e)},zo=function(e){var t=e.transmuxer,n=e.endAction||e.action,r=e.callback,i=(0,o.Z)({},e,{endAction:null,transmuxer:null,callback:null});if(t.addEventListener("message",(function i(a){a.data.action===n&&(t.removeEventListener("message",i),a.data.data&&(a.data.data=new Uint8Array(a.data.data,e.byteOffset||0,e.byteLength||a.data.data.byteLength),e.data&&(e.data=a.data.data)),r(a.data))})),e.data){var a=e.data instanceof ArrayBuffer;i.byteOffset=a?0:e.data.byteOffset,i.byteLength=e.data.byteLength;var s=[a?e.data:e.data.buffer];t.postMessage(i,s)}else t.postMessage(i)},Go=-101,Xo=-102,$o=function(e){e.forEach((function(e){e.abort()}))},Ko=function(e,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:Go,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:Xo,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:2,xhr:t}:null},Zo=function(e){var t=e.segment,n=e.bytes,r=e.trackInfoFn,i=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,s=e.audioSegmentTimingInfoFn,o=e.id3Fn,u=e.captionsFn,l=e.isEndOfTimeline,c=e.endedTimelineFn,d=e.dataFn,h=e.doneFn,f=t.map&&t.map.tracks||{},p=Boolean(f.audio&&f.video),m=i.bind(null,t,"audio","start"),g=i.bind(null,t,"audio","end"),v=i.bind(null,t,"video","start"),y=i.bind(null,t,"video","end");zo({action:"probeTs",transmuxer:t.transmuxer,data:n,baseStartTime:t.baseStartTime,callback:function(e){t.bytes=n=e.data;var i=e.result;i&&(r(t,{hasAudio:i.hasAudio,hasVideo:i.hasVideo,isMuxed:p}),r=null,i.hasAudio&&!p&&m(i.audioStart),i.hasVideo&&v(i.videoStart),m=null,v=null),function(e){if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void Ho(e);e.transmuxer.transmuxQueue.push(e)}({bytes:n,transmuxer:t.transmuxer,audioAppendStart:t.audioAppendStart,gopsToAlignWith:t.gopsToAlignWith,remux:p,onData:function(e){e.type="combined"===e.type?"video":e.type,d(t,e)},onTrackInfo:function(e){r&&(p&&(e.isMuxed=!0),r(t,e))},onAudioTimingInfo:function(e){m&&void 0!==e.start&&(m(e.start),m=null),g&&void 0!==e.end&&g(e.end)},onVideoTimingInfo:function(e){v&&void 0!==e.start&&(v(e.start),v=null),y&&void 0!==e.end&&y(e.end)},onVideoSegmentTimingInfo:function(e){a(e)},onAudioSegmentTimingInfo:function(e){s(e)},onId3:function(e,n){o(t,e,n)},onCaptions:function(e){u(t,[e])},isEndOfTimeline:l,onEndedTimeline:function(){c()},onDone:function(e){h&&(e.type="combined"===e.type?"video":e.type,h(null,t,e))}})}})},Yo=function(e){var t=e.segment,n=e.bytes,r=e.trackInfoFn,i=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,s=e.audioSegmentTimingInfoFn,o=e.id3Fn,u=e.captionsFn,l=e.isEndOfTimeline,c=e.endedTimelineFn,d=e.dataFn,h=e.doneFn,f=new Uint8Array(n);if(function(e){return We(e,["moof"]).length>0}(f)){t.isFmp4=!0;var p=t.map.tracks,m={isFmp4:!0,hasVideo:!!p.video,hasAudio:!!p.audio};p.audio&&p.audio.codec&&"enca"!==p.audio.codec&&(m.audioCodec=p.audio.codec),p.video&&p.video.codec&&"encv"!==p.video.codec&&(m.videoCodec=p.video.codec),p.video&&p.audio&&(m.isMuxed=!0),r(t,m);var g=function(e){d(t,{data:f,type:m.hasAudio&&!m.isMuxed?"audio":"video"}),e&&e.length&&u(t,e),h(null,t,{})};zo({action:"probeMp4StartTime",timescales:t.map.timescales,data:f,transmuxer:t.transmuxer,callback:function(e){var r=e.data,a=e.startTime;n=r.buffer,t.bytes=f=r,m.hasAudio&&!m.isMuxed&&i(t,"audio","start",a),m.hasVideo&&i(t,"video","start",a),p.video&&r.byteLength&&t.transmuxer?zo({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:t.transmuxer,data:f,timescales:t.map.timescales,trackIds:[p.video.id],callback:function(e){n=e.data.buffer,t.bytes=f=e.data,g(e.captions)}}):g()}})}else if(t.transmuxer){if(void 0===t.container&&(t.container=ot(f)),"ts"!==t.container&&"aac"!==t.container)return r(t,{hasAudio:!1,hasVideo:!1}),void h(null,t,{});Zo({segment:t,bytes:n,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:u,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:h})}else h(null,t,{})},Qo=function(e){var t=e.xhr,n=e.xhrOptions,r=e.decryptionWorker,i=e.segment,a=e.abortFn,s=e.progressFn,o=e.trackInfoFn,u=e.timingInfoFn,l=e.videoSegmentTimingInfoFn,c=e.audioSegmentTimingInfoFn,d=e.id3Fn,h=e.captionsFn,f=e.isEndOfTimeline,p=e.endedTimelineFn,m=e.dataFn,g=e.doneFn,v=[],y=function(e){var t=e.activeXhrs,n=e.decryptionWorker,r=e.trackInfoFn,i=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,s=e.audioSegmentTimingInfoFn,o=e.id3Fn,u=e.captionsFn,l=e.isEndOfTimeline,c=e.endedTimelineFn,d=e.dataFn,h=e.doneFn,f=0,p=!1;return function(e,m){if(!p){if(e)return p=!0,$o(t),h(e,m);if((f+=1)===t.length){if(m.endOfAllRequests=Date.now(),m.encryptedBytes)return function(e){var t,n=e.decryptionWorker,r=e.segment,i=e.trackInfoFn,a=e.timingInfoFn,s=e.videoSegmentTimingInfoFn,o=e.audioSegmentTimingInfoFn,u=e.id3Fn,l=e.captionsFn,c=e.isEndOfTimeline,d=e.endedTimelineFn,h=e.dataFn,f=e.doneFn;n.addEventListener("message",(function e(t){if(t.data.source===r.requestId){n.removeEventListener("message",e);var p=t.data.decrypted;r.bytes=new Uint8Array(p.bytes,p.byteOffset,p.byteLength),Yo({segment:r,bytes:r.bytes,trackInfoFn:i,timingInfoFn:a,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:o,id3Fn:u,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:h,doneFn:f})}})),t=r.key.bytes.slice?r.key.bytes.slice():new Uint32Array(Array.prototype.slice.call(r.key.bytes)),n.postMessage(To({source:r.requestId,encrypted:r.encryptedBytes,key:t,iv:r.key.iv}),[r.encryptedBytes.buffer,t.buffer])}({decryptionWorker:n,segment:m,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:u,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:h});Yo({segment:m,bytes:m.bytes,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:u,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:h})}}}}({activeXhrs:v,decryptionWorker:r,trackInfoFn:o,timingInfoFn:u,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:h,isEndOfTimeline:f,endedTimelineFn:p,dataFn:m,doneFn:g});if(i.key&&!i.key.bytes){var _=Ss.mergeOptions(n,{uri:i.key.resolvedUri,responseType:"arraybuffer"}),b=function(e,t){return function(n,r){var i=r.response,a=Ko(n,r);if(a)return t(a,e);if(16!==i.byteLength)return t({status:r.status,message:"Invalid HLS key at URL: "+r.uri,code:2,xhr:r},e);var s=new DataView(i);return e.key.bytes=new Uint32Array([s.getUint32(0),s.getUint32(4),s.getUint32(8),s.getUint32(12)]),t(null,e)}}(i,y),T=t(_,b);v.push(T)}if(i.map&&!i.map.bytes){var S=Ss.mergeOptions(n,{uri:i.map.resolvedUri,responseType:"arraybuffer",headers:vo(i.map)}),w=function(e){var t=e.segment,n=e.finishProcessingFn;return function(e,r){var i=r.response,a=Ko(e,r);if(a)return n(a,t);if(0===i.byteLength)return n({status:r.status,message:"Empty HLS segment content at URL: "+r.uri,code:2,xhr:r},t);t.map.bytes=new Uint8Array(r.response);var s=ot(t.map.bytes);if("mp4"!==s)return n({status:r.status,message:"Found unsupported "+(s||"unknown")+" container for initialization segment at URL: "+r.uri,code:2,internal:!0,xhr:r},t);zo({action:"probeMp4Tracks",data:t.map.bytes,transmuxer:t.transmuxer,callback:function(e){var r=e.tracks,i=e.data;return t.map.bytes=i,r.forEach((function(e){t.map.tracks=t.map.tracks||{},t.map.tracks[e.type]||(t.map.tracks[e.type]=e,"number"==typeof e.id&&e.timescale&&(t.map.timescales=t.map.timescales||{},t.map.timescales[e.id]=e.timescale))})),n(null,t)}})}}({segment:i,finishProcessingFn:y}),k=t(S,w);v.push(k)}var E=Ss.mergeOptions(n,{uri:i.part&&i.part.resolvedUri||i.resolvedUri,responseType:"arraybuffer",headers:vo(i)}),C=t(E,function(e){var t=e.segment,n=e.finishProcessingFn,r=e.responseType;return function(e,i){var a=i.response,s=Ko(e,i);if(s)return n(s,t);var o="arraybuffer"!==r&&i.responseText?function(e){for(var t=new Uint8Array(new ArrayBuffer(e.length)),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t.buffer}(i.responseText.substring(t.lastReachedChar||0)):i.response;return 0===a.byteLength?n({status:i.status,message:"Empty HLS segment content at URL: "+i.uri,code:2,xhr:i},t):(t.stats=function(e){return{bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}}(i),t.key?t.encryptedBytes=new Uint8Array(o):t.bytes=new Uint8Array(o),n(null,t))}}({segment:i,finishProcessingFn:y,responseType:E.responseType}));C.addEventListener("progress",function(e){var t=e.segment,n=e.progressFn;return e.trackInfoFn,e.timingInfoFn,e.videoSegmentTimingInfoFn,e.audioSegmentTimingInfoFn,e.id3Fn,e.captionsFn,e.isEndOfTimeline,e.endedTimelineFn,e.dataFn,function(e){if(!e.target.aborted)return t.stats=Ss.mergeOptions(t.stats,(i=(r=e).target,(a={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-i.requestTime||0}).bytesReceived=r.loaded,a.bandwidth=Math.floor(a.bytesReceived/a.roundTripTime*8*1e3),a)),!t.stats.firstBytesReceivedAt&&t.stats.bytesReceived&&(t.stats.firstBytesReceivedAt=Date.now()),n(e,t);var r,i,a}}({segment:i,progressFn:s,trackInfoFn:o,timingInfoFn:u,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:h,isEndOfTimeline:f,endedTimelineFn:p,dataFn:m})),v.push(C);var x={};return v.forEach((function(e){e.addEventListener("loadend",function(e){var t=e.loadendState,n=e.abortFn;return function(e){e.target.aborted&&n&&!t.calledAbortFn&&(n(),t.calledAbortFn=!0)}}({loadendState:x,abortFn:a}))})),function(){return $o(v)}},Jo=xs("CodecUtils"),eu=function(e,t){var n=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&n.AUDIO&&e.mediaGroups.AUDIO[n.AUDIO]},tu=function(e){var t={};return e.forEach((function(e){var n=e.mediaType,r=e.type,i=e.details;t[n]=t[n]||[],t[n].push(B(""+r+i))})),Object.keys(t).forEach((function(e){if(t[e].length>1)return Jo("multiple "+e+" codecs found as attributes: "+t[e].join(", ")+". Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs."),void(t[e]=null);t[e]=t[e][0]})),t},nu=function(e){var t=0;return e.audio&&t++,e.video&&t++,t},ru=function(e,t){var n=t.attributes||{},r=tu(function(e){var t=e.attributes||{};if(t.CODECS)return j(t.CODECS)}(t)||[]);if(eu(e,t)&&!r.audio&&!function(e,t){if(!eu(e,t))return!0;var n=t.attributes||{},r=e.mediaGroups.AUDIO[n.AUDIO];for(var i in r)if(!r[i].uri&&!r[i].playlists)return!0;return!1}(e,t)){var i=tu(function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var n=e.mediaGroups.AUDIO[t];if(!n)return null;for(var r in n){var i=n[r];if(i.default&&i.playlists)return j(i.playlists[0].attributes.CODECS)}return null}(e,n.AUDIO)||[]);i.audio&&(r.audio=i.audio)}return r},iu=xs("PlaylistSelector"),au=function(e){if(e&&e.playlist){var t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||""})}},su=function(e,t){if(!e)return"";var n=i().getComputedStyle(e);return n?n[t]:""},ou=function(e,t){var n=e.slice();e.sort((function(e,r){var i=t(e,r);return 0===i?n.indexOf(e)-n.indexOf(r):i}))},uu=function(e,t){var n,r;return e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),n=n||i().Number.MAX_VALUE,t.attributes.BANDWIDTH&&(r=t.attributes.BANDWIDTH),n-(r||i().Number.MAX_VALUE)},lu=function(e,t,n,r,a,s){if(e){var o={bandwidth:t,width:n,height:r,limitRenditionByPlayerDimensions:a},u=e.playlists;ho.isAudioOnly(e)&&(u=s.getAudioTrackPlaylists_(),o.audioOnly=!0);var l=u.map((function(e){var t=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,n=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return{bandwidth:e.attributes&&e.attributes.BANDWIDTH||i().Number.MAX_VALUE,width:t,height:n,playlist:e}}));ou(l,(function(e,t){return e.bandwidth-t.bandwidth}));var c=(l=l.filter((function(e){return!ho.isIncompatible(e.playlist)}))).filter((function(e){return ho.isEnabled(e.playlist)}));c.length||(c=l.filter((function(e){return!ho.isDisabled(e.playlist)})));var d=c.filter((function(e){return e.bandwidth*Ro.BANDWIDTH_VARIANCE<t})),h=d[d.length-1],f=d.filter((function(e){return e.bandwidth===h.bandwidth}))[0];if(!1===a){var p=f||c[0]||l[0];if(p&&p.playlist){var m="sortedPlaylistReps";return f&&(m="bandwidthBestRep"),c[0]&&(m="enabledPlaylistReps"),iu("choosing "+au(p)+" using "+m+" with options",o),p.playlist}return iu("could not choose a playlist with options",o),null}var g=d.filter((function(e){return e.width&&e.height}));ou(g,(function(e,t){return e.width-t.width}));var v=g.filter((function(e){return e.width===n&&e.height===r}));h=v[v.length-1];var y,_,b,T=v.filter((function(e){return e.bandwidth===h.bandwidth}))[0];T||(_=(y=g.filter((function(e){return e.width>n||e.height>r}))).filter((function(e){return e.width===y[0].width&&e.height===y[0].height})),h=_[_.length-1],b=_.filter((function(e){return e.bandwidth===h.bandwidth}))[0]);var S=b||T||f||c[0]||l[0];if(S&&S.playlist){var w="sortedPlaylistReps";return b?w="resolutionPlusOneRep":T?w="resolutionBestRep":f?w="bandwidthBestRep":c[0]&&(w="enabledPlaylistReps"),iu("choosing "+au(S)+" using "+w+" with options",o),S.playlist}return iu("could not choose a playlist with options",o),null}},cu=function(){var e=this.useDevicePixelRatio&&i().devicePixelRatio||1;return lu(this.playlists.master,this.systemBandwidth,parseInt(su(this.tech_.el(),"width"),10)*e,parseInt(su(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)},du=function(e,t,n){var r,i;if(n&&n.cues)for(r=n.cues.length;r--;)(i=n.cues[r]).startTime>=e&&i.endTime<=t&&n.removeCue(i)},hu=function(e){return"number"==typeof e&&isFinite(e)},fu=1/60,pu=function(e){var t=e.startOfSegment,n=e.duration,r=e.segment,i=r.start,a=r.end,s=r.parts,o=e.playlist,u=o.mediaSequence,l=o.id,c=o.segments,d=void 0===c?[]:c,h=e.mediaIndex,f=e.partIndex,p=e.timeline,m=d.length-1,g="mediaIndex/partIndex increment";return e.getMediaInfoForTime?g="getMediaInfoForTime ("+e.getMediaInfoForTime+")":e.isSyncRequest&&(g="getSyncSegmentCandidate (isSyncRequest)"),(e.segment.uri?"segment":"pre-segment")+" ["+h+"/"+m+"]"+(f?" part ["+f+"/"+(s.length-1)+"]":"")+" mediaSequenceNumber ["+u+"/"+(u+m)+"] start/end ["+i+" => "+a+"] startOfSegment ["+t+"] duration ["+n+"] timeline ["+p+"] selected by ["+g+"] playlist ["+l+"]"},mu=function(e){return e+"TimingInfo"},gu=function(e){var t=e.timelineChangeController,n=e.currentTimeline,r=e.segmentTimeline,i=e.loaderType,a=e.audioDisabled;if(n===r)return!1;if("audio"===i){var s=t.lastTimelineChange({type:"main"});return!s||s.to!==r}if("main"===i&&a){var o=t.pendingTimelineChange({type:"audio"});return!o||o.to!==r}return!1},vu=function(e){var t=e.segmentDuration,n=e.maxDuration;return!!t&&Math.round(t)>n+qs},yu=function(e){function t(t,n){var r;if(r=e.call(this)||this,!t)throw new TypeError("Initialization settings are required");if("function"!=typeof t.currentTime)throw new TypeError("No currentTime getter specified");if(!t.mediaSource)throw new TypeError("No MediaSource specified");return r.bandwidth=t.bandwidth,r.throughput={rate:0,count:0},r.roundTrip=NaN,r.resetStats_(),r.mediaIndex=null,r.partIndex=null,r.hasPlayed_=t.hasPlayed,r.currentTime_=t.currentTime,r.seekable_=t.seekable,r.seeking_=t.seeking,r.duration_=t.duration,r.mediaSource_=t.mediaSource,r.vhs_=t.vhs,r.loaderType_=t.loaderType,r.currentMediaInfo_=void 0,r.startingMediaInfo_=void 0,r.segmentMetadataTrack_=t.segmentMetadataTrack,r.goalBufferLength_=t.goalBufferLength,r.sourceType_=t.sourceType,r.sourceUpdater_=t.sourceUpdater,r.inbandTextTracks_=t.inbandTextTracks,r.state_="INIT",r.timelineChangeController_=t.timelineChangeController,r.shouldSaveSegmentTimingInfo_=!0,r.parse708captions_=t.parse708captions,r.checkBufferTimeout_=null,r.error_=void 0,r.currentTimeline_=-1,r.pendingSegment_=null,r.xhrOptions_=null,r.pendingSegments_=[],r.audioDisabled_=!1,r.isPendingTimestampOffset_=!1,r.gopBuffer_=[],r.timeMapping_=0,r.safeAppend_=Ss.browser.IE_VERSION>=11,r.appendInitSegment_={audio:!0,video:!0},r.playlistOfLastInitSegment_={audio:null,video:null},r.callQueue_=[],r.loadQueue_=[],r.metadataQueue_={id3:[],caption:[]},r.waitingOnRemove_=!1,r.quotaExceededErrorRetryTimeout_=null,r.activeInitSegmentId_=null,r.initSegments_={},r.cacheEncryptionKeys_=t.cacheEncryptionKeys,r.keyCache_={},r.decrypter_=t.decrypter,r.syncController_=t.syncController,r.syncPoint_={segmentIndex:0,time:0},r.transmuxer_=r.createTransmuxer_(),r.triggerSyncInfoUpdate_=function(){return r.trigger("syncinfoupdate")},r.syncController_.on("syncinfoupdate",r.triggerSyncInfoUpdate_),r.mediaSource_.addEventListener("sourceopen",(function(){r.isEndOfStream_()||(r.ended_=!1)})),r.fetchAtBuffer_=!1,r.logger_=xs("SegmentLoader["+r.loaderType_+"]"),Object.defineProperty((0,u.Z)(r),"state",{get:function(){return this.state_},set:function(e){e!==this.state_&&(this.logger_(this.state_+" -> "+e),this.state_=e,this.trigger("statechange"))}}),r.sourceUpdater_.on("ready",(function(){r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),"main"===r.loaderType_&&r.timelineChangeController_.on("pendingtimelinechange",(function(){r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),"audio"===r.loaderType_&&r.timelineChangeController_.on("timelinechange",(function(){r.hasEnoughInfoToLoad_()&&r.processLoadQueue_(),r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),r}(0,l.Z)(t,e);var n=t.prototype;return n.createTransmuxer_=function(){return function(e){var t=new jo;t.currentTransmux=null,t.transmuxQueue=[];var n=t.terminate;return t.terminate=function(){return t.currentTransmux=null,t.transmuxQueue.length=0,n.call(t)},t.postMessage({action:"init",options:e}),t}({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_})},n.resetStats_=function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0},n.dispose=function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&i().clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()},n.setAudio=function(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())},n.abort=function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)},n.abort_=function(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,i().clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null},n.checkForAbort_=function(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)},n.error=function(e){return void 0!==e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_},n.endOfStream=function(){this.ended_=!0,this.transmuxer_&&Wo(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},n.buffered_=function(){if(!this.sourceUpdater_||!this.startingMediaInfo_)return Ss.createTimeRanges();if("main"===this.loaderType_){var e=this.startingMediaInfo_,t=e.hasAudio,n=e.hasVideo,r=e.isMuxed;if(n&&t&&!this.audioDisabled_&&!r)return this.sourceUpdater_.buffered();if(n)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()},n.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=So(e),r=this.initSegments_[n];return t&&!r&&e.bytes&&(this.initSegments_[n]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),r||e},n.segmentKey=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=wo(e),r=this.keyCache_[n];this.cacheEncryptionKeys_&&t&&!r&&e.bytes&&(this.keyCache_[n]=r={resolvedUri:e.resolvedUri,bytes:e.bytes});var i={resolvedUri:(r||e).resolvedUri};return r&&(i.bytes=r.bytes),i},n.couldBeginLoading_=function(){return this.playlist_&&!this.paused()},n.load=function(){if(this.monitorBuffer_(),this.playlist_)return"INIT"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY"))},n.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},n.playlist=function(e,t){if(void 0===t&&(t={}),e){var n=this.playlist_,r=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},"main"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));var i=null;if(n&&(n.id?i=n.id:n.uri&&(i=n.uri)),this.logger_("playlist update ["+i+" => "+(e.id||e.uri)+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!n||n.uri!==e.uri)return null!==this.mediaIndex&&this.resyncLoader(),this.currentMediaInfo_=void 0,void this.trigger("playlistupdate");var a=e.mediaSequence-n.mediaSequence;if(this.logger_("live window shift ["+a+"]"),null!==this.mediaIndex)if(this.mediaIndex-=a,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{var s=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!s.parts||!s.parts.length||!s.parts[this.partIndex])){var o=this.mediaIndex;this.logger_("currently processing part (index "+this.partIndex+") no longer exists."),this.resetLoader(),this.mediaIndex=o}}r&&(r.mediaIndex-=a,r.mediaIndex<0?(r.mediaIndex=null,r.partIndex=null):(r.mediaIndex>=0&&(r.segment=e.segments[r.mediaIndex]),r.partIndex>=0&&r.segment.parts&&(r.part=r.segment.parts[r.partIndex]))),this.syncController_.saveExpiredSegmentInfo(n,e)}},n.pause=function(){this.checkBufferTimeout_&&(i().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},n.paused=function(){return null===this.checkBufferTimeout_},n.resetEverything=function(e){this.ended_=!1,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"})},n.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},n.resyncLoader=function(){this.transmuxer_&&Wo(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})},n.remove=function(e,t,n,r){if(void 0===n&&(n=function(){}),void 0===r&&(r=!1),t===1/0&&(t=this.duration_()),t<=e)this.logger_("skipping remove because end ${end} is <= start ${start}");else if(this.sourceUpdater_&&this.startingMediaInfo_){var i=1,a=function(){0==--i&&n()};for(var s in!r&&this.audioDisabled_||(i++,this.sourceUpdater_.removeAudio(e,t,a)),(r||"main"===this.loaderType_)&&(this.gopBuffer_=function(e,t,n,r){for(var i=Math.ceil((t-r)*ut.ONE_SECOND_IN_TS),a=Math.ceil((n-r)*ut.ONE_SECOND_IN_TS),s=e.slice(),o=e.length;o--&&!(e[o].pts<=a););if(-1===o)return s;for(var u=o+1;u--&&!(e[u].pts<=i););return u=Math.max(u,0),s.splice(u,o-u+1),s}(this.gopBuffer_,e,t,this.timeMapping_),i++,this.sourceUpdater_.removeVideo(e,t,a)),this.inbandTextTracks_)du(e,t,this.inbandTextTracks_[s]);du(e,t,this.segmentMetadataTrack_),a()}else this.logger_("skipping remove because no source updater or starting media info")},n.monitorBuffer_=function(){this.checkBufferTimeout_&&i().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=i().setTimeout(this.monitorBufferTick_.bind(this),1)},n.monitorBufferTick_=function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&i().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=i().setTimeout(this.monitorBufferTick_.bind(this),500)},n.fillBuffer_=function(){if(!this.sourceUpdater_.updating()){var e=this.chooseNextRequest_();e&&("number"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e))}},n.isEndOfStream_=function(e,t,n){if(void 0===e&&(e=this.mediaIndex),void 0===t&&(t=this.playlist_),void 0===n&&(n=this.partIndex),!t||!this.mediaSource_)return!1;var r="number"==typeof e&&t.segments[e],i=e+1===t.segments.length,a=!r||!r.parts||n+1===r.parts.length;return t.endList&&"open"===this.mediaSource_.readyState&&i&&a},n.chooseNextRequest_=function(){var e=Zs(this.buffered_())||0,t=Math.max(0,e-this.currentTime_()),n=!this.hasPlayed_()&&t>=1,r=t>=this.goalBufferLength_(),i=this.playlist_.segments;if(!i.length||n||r)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_());var a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=function(e,t){var n=(void 0===t?{}:t).segments,r=void 0===n?[]:n;if(-1===e)return 0;var i=r.reduce((function(t,n,r){return n.timeline===e&&t.push(r),t}),[]);return i.length?i[Math.min(i.length-1,1)]:Math.max(r.length-1,0)}(this.currentTimeline_,this.playlist_);else if(null!==this.mediaIndex){var s=i[this.mediaIndex],o="number"==typeof this.partIndex?this.partIndex:-1;a.startOfSegment=s.end?s.end:e,s.parts&&s.parts[o+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=o+1):a.mediaIndex=this.mediaIndex+1}else{var u=ho.getMediaInfoForTime(this.playlist_,this.fetchAtBuffer_?e:this.currentTime_(),this.syncPoint_.segmentIndex,this.syncPoint_.time);a.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd":"currentTime",a.mediaIndex=u.mediaIndex,a.startOfSegment=u.startTime,a.partIndex=u.partIndex}var l=i[a.mediaIndex],c=l&&"number"==typeof a.partIndex&&l.parts&&l.parts[a.partIndex];if(!l||"number"==typeof a.partIndex&&!c)return null;"number"!=typeof a.partIndex&&l.parts&&(a.partIndex=0);var d=this.mediaSource_&&"ended"===this.mediaSource_.readyState;return a.mediaIndex>=i.length-1&&d&&!this.seeking_()?null:this.generateSegmentInfo_(a)},n.generateSegmentInfo_=function(e){var t=e.playlist,n=e.mediaIndex,r=e.startOfSegment,i=e.isSyncRequest,a=e.partIndex,s=e.forceTimestampOffset,o=e.getMediaInfoForTime,u=t.segments[n],l="number"==typeof a&&u.parts[a],c={requestId:"segment-loader-"+Math.random(),uri:l&&l.resolvedUri||u.resolvedUri,mediaIndex:n,partIndex:l?a:null,isSyncRequest:i,startOfSegment:r,playlist:t,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:u.timeline,duration:u.duration,segment:u,part:l,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:o},d=void 0!==s?s:this.isPendingTimestampOffset_;c.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:u.timeline,currentTimeline:this.currentTimeline_,startOfSegment:r,buffered:this.buffered_(),overrideCheck:d});var h=Zs(this.sourceUpdater_.audioBuffered());return"number"==typeof h&&(c.audioAppendStart=h-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(c.gopsToAlignWith=function(e,t,n){if(null==t||!e.length)return[];var r,i=Math.ceil((t-n+3)*ut.ONE_SECOND_IN_TS);for(r=0;r<e.length&&!(e[r].pts>i);r++);return e.slice(r)}(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),c},n.timestampOffsetForSegment_=function(e){return n=(t=e).segmentTimeline,r=t.currentTimeline,i=t.startOfSegment,a=t.buffered,t.overrideCheck||n!==r?n<r?i:a.length?a.end(a.length-1):i:null;var t,n,r,i,a},n.earlyAbortWhenNeeded_=function(e){if(!this.vhs_.tech_.paused()&&this.xhrOptions_.timeout&&this.playlist_.attributes.BANDWIDTH&&!(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)){var t=this.currentTime_(),n=e.bandwidth,r=this.pendingSegment_.duration,i=ho.estimateSegmentRequestTime(r,n,this.playlist_,e.bytesReceived),a=function(e,t,n){return void 0===n&&(n=1),((e.length?e.end(e.length-1):0)-t)/n}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(!(i<=a)){var s=function(e){var t=e.currentTime,n=e.bandwidth,r=e.duration,i=e.segmentDuration,a=e.timeUntilRebuffer,s=e.currentTimeline,o=e.syncController,u=e.master.playlists.filter((function(e){return!ho.isIncompatible(e)})),l=u.filter(ho.isEnabled);l.length||(l=u.filter((function(e){return!ho.isDisabled(e)})));var c=l.filter(ho.hasAttribute.bind(null,"BANDWIDTH")).map((function(e){var u=o.getSyncPoint(e,r,s,t)?1:2;return{playlist:e,rebufferingImpact:ho.estimateSegmentRequestTime(i,n,e)*u-a}})),d=c.filter((function(e){return e.rebufferingImpact<=0}));return ou(d,(function(e,t){return uu(t.playlist,e.playlist)})),d.length?d[0]:(ou(c,(function(e,t){return e.rebufferingImpact-t.rebufferingImpact})),c[0]||null)}({master:this.vhs_.playlists.master,currentTime:t,bandwidth:n,duration:this.duration_(),segmentDuration:r,timeUntilRebuffer:a,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(s){var o=i-a-s.rebufferingImpact,u=.5;a<=qs&&(u=1),!s.playlist||s.playlist.uri===this.playlist_.uri||o<u||(this.bandwidth=s.playlist.attributes.BANDWIDTH*Ro.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}}}},n.handleAbort_=function(e){this.logger_("Aborting "+pu(e)),this.mediaRequestsAborted+=1},n.handleProgress_=function(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger("progress")},n.handleTrackInfo_=function(e,t){this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;var n=Object.keys(e).sort(),r=Object.keys(t).sort();if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++){var a=n[i];if(a!==r[i])return!1;if(e[a]!==t[a])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_("trackinfo update",t),this.trigger("trackinfo")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()&&this.processCallQueue_()))},n.handleTimingInfo_=function(e,t,n,r){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)){var i=this.pendingSegment_,a=mu(t);i[a]=i[a]||{},i[a][n]=r,this.logger_("timinginfo: "+t+" - "+n+" - "+r),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}},n.handleCaptions_=function(e,t){var n=this;if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(0!==t.length)if(this.pendingSegment_.hasAppendedData_){var r=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),a={};t.forEach((function(e){a[e.stream]=a[e.stream]||{startTime:1/0,captions:[],endTime:0};var t=a[e.stream];t.startTime=Math.min(t.startTime,e.startTime+r),t.endTime=Math.max(t.endTime,e.endTime+r),t.captions.push(e)})),Object.keys(a).forEach((function(e){var t=a[e],s=t.startTime,o=t.endTime,u=t.captions,l=n.inbandTextTracks_;n.logger_("adding cues from "+s+" -> "+o+" for "+e),function(e,t,n){if(!e[n]){t.trigger({type:"usage",name:"vhs-608"}),t.trigger({type:"usage",name:"hls-608"});var r=t.textTracks().getTrackById(n);e[n]=r||t.addRemoteTextTrack({kind:"captions",id:n,label:n},!1).track}}(l,n.vhs_.tech_,e),du(s,o,l[e]),function(e){var t=e.inbandTextTracks,n=e.captionArray,r=e.timestampOffset;if(n){var a=i().WebKitDataCue||i().VTTCue;n.forEach((function(e){var n=e.stream;t[n].addCue(new a(e.startTime+r,e.endTime+r,e.text))}))}}({captionArray:u,inbandTextTracks:l,timestampOffset:r})})),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}else this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));else this.logger_("SegmentLoader received no captions from a caption event")},n.handleId3_=function(e,t,n){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(this.pendingSegment_.hasAppendedData_){var r=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();!function(e,t,n){e.metadataTrack_||(e.metadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,e.metadataTrack_.inBandMetadataTrackDispatchType=t)}(this.inbandTextTracks_,n,this.vhs_.tech_),function(e){var t=e.inbandTextTracks,n=e.metadataArray,r=e.timestampOffset,a=e.videoDuration;if(n){var s=i().WebKitDataCue||i().VTTCue,o=t.metadataTrack_;if(o&&(n.forEach((function(e){var t=e.cueTime+r;!("number"!=typeof t||i().isNaN(t)||t<0)&&t<1/0&&e.frames.forEach((function(e){var n=new s(t,t,e.value||e.url||e.data||"");n.frame=e,n.value=e,function(e){Object.defineProperties(e.frame,{id:{get:function(){return Ss.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key}},value:{get:function(){return Ss.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data}},privateData:{get:function(){return Ss.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data}}})}(n),o.addCue(n)}))})),o.cues&&o.cues.length)){for(var u=o.cues,l=[],c=0;c<u.length;c++)u[c]&&l.push(u[c]);var d=l.reduce((function(e,t){var n=e[t.startTime]||[];return n.push(t),e[t.startTime]=n,e}),{}),h=Object.keys(d).sort((function(e,t){return Number(e)-Number(t)}));h.forEach((function(e,t){var n=d[e],r=Number(h[t+1])||a;n.forEach((function(e){e.endTime=r}))}))}}}({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:r,videoDuration:this.duration_()})}else this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,n))},n.processMetadataQueue_=function(){this.metadataQueue_.id3.forEach((function(e){return e()})),this.metadataQueue_.caption.forEach((function(e){return e()})),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]},n.processCallQueue_=function(){var e=this.callQueue_;this.callQueue_=[],e.forEach((function(e){return e()}))},n.processLoadQueue_=function(){var e=this.loadQueue_;this.loadQueue_=[],e.forEach((function(e){return e()}))},n.hasEnoughInfoToLoad_=function(){if("audio"!==this.loaderType_)return!0;var e=this.pendingSegment_;return!(!e||this.currentMediaInfo_&&gu({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},n.hasEnoughInfoToAppend_=function(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;var e=this.pendingSegment_;if(!e||!e.trackInfo)return!1;var t=this.currentMediaInfo_,n=t.hasAudio,r=t.hasVideo,i=t.isMuxed;return!(r&&!e.videoTimingInfo||n&&!this.audioDisabled_&&!i&&!e.audioTimingInfo||gu({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},n.handleData_=function(e,t){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(!this.callQueue_.length&&this.hasEnoughInfoToAppend_()){var n=this.pendingSegment_;if(this.setTimeMapping_(n.timeline),this.updateMediaSecondsLoaded_(n.segment),"closed"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),n.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),n.isFmp4=e.isFmp4,n.timingInfo=n.timingInfo||{},n.isFmp4)this.trigger("fmp4"),n.timingInfo.start=n[mu(t.type)].start;else{var r,i="main"===this.loaderType_&&this.currentMediaInfo_.hasVideo;i&&(r=n.videoTimingInfo.start),n.timingInfo.start=this.trueSegmentStart_({currentStart:n.timingInfo.start,playlist:n.playlist,mediaIndex:n.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:i,firstVideoFrameTimeForData:r,videoTimingInfo:n.videoTimingInfo,audioTimingInfo:n.audioTimingInfo})}this.updateAppendInitSegmentStatus(n,t.type),this.updateSourceBufferTimestampOffset_(n),n.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(n,t)}}else this.callQueue_.push(this.handleData_.bind(this,e,t))},n.updateAppendInitSegmentStatus=function(e,t){"main"!==this.loaderType_||"number"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)},n.getInitSegmentAndUpdateState_=function(e){var t=e.type,n=e.initSegment,r=e.map,i=e.playlist;if(r){var a=So(r);if(this.activeInitSegmentId_===a)return null;n=this.initSegmentForMap(r,!0).bytes,this.activeInitSegmentId_=a}return n&&this.appendInitSegment_[t]?(this.playlistOfLastInitSegment_[t]=i,this.appendInitSegment_[t]=!1,this.activeInitSegmentId_=null,n):null},n.handleQuotaExceededError_=function(e,t){var n=this,r=e.segmentInfo,a=e.type,s=e.bytes,o=this.sourceUpdater_.audioBuffered(),u=this.sourceUpdater_.videoBuffered();o.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+Ks(o).join(", ")),u.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+Ks(u).join(", "));var l=o.length?o.start(0):0,c=o.length?o.end(o.length-1):0,d=u.length?u.start(0):0,h=u.length?u.end(u.length-1):0;if(c-l<=1&&h-d<=1)return this.logger_("On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: "+s.byteLength+", audio buffer: "+Ks(o).join(", ")+", video buffer: "+Ks(u).join(", ")+", "),this.error({message:"Quota exceeded error with append of a single segment of content",blacklistDuration:1/0}),void this.trigger("error");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:r,type:a,bytes:s}));var f=this.currentTime_()-1;this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to "+f),this.remove(0,f,(function(){n.logger_("On QUOTA_EXCEEDED_ERR, retrying append in 1s"),n.waitingOnRemove_=!1,n.quotaExceededErrorRetryTimeout_=i().setTimeout((function(){n.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),n.quotaExceededErrorRetryTimeout_=null,n.processCallQueue_()}),1e3)}),!0)},n.handleAppendError_=function(e,t){var n=e.segmentInfo,r=e.type,i=e.bytes;t&&(22!==t.code?(this.logger_("Received non QUOTA_EXCEEDED_ERR on append",t),this.error(r+" append of "+i.length+"b failed for segment #"+n.mediaIndex+" in playlist "+n.playlist.id),this.trigger("appenderror")):this.handleQuotaExceededError_({segmentInfo:n,type:r,bytes:i}))},n.appendToSourceBuffer_=function(e){var t,n,r,i=e.segmentInfo,a=e.type,s=e.initSegment,o=e.data,u=e.bytes;if(!u){var l=[o],c=o.byteLength;s&&(l.unshift(s),c+=s.byteLength),r=0,(t={bytes:c,segments:l}).bytes&&(n=new Uint8Array(t.bytes),t.segments.forEach((function(e){n.set(e,r),r+=e.byteLength}))),u=n}this.sourceUpdater_.appendBuffer({segmentInfo:i,type:a,bytes:u},this.handleAppendError_.bind(this,{segmentInfo:i,type:a,bytes:u}))},n.handleSegmentTimingInfo_=function(e,t,n){if(this.pendingSegment_&&t===this.pendingSegment_.requestId){var r=this.pendingSegment_.segment,i=e+"TimingInfo";r[i]||(r[i]={}),r[i].transmuxerPrependedSeconds=n.prependedContentDuration||0,r[i].transmuxedPresentationStart=n.start.presentation,r[i].transmuxedDecodeStart=n.start.decode,r[i].transmuxedPresentationEnd=n.end.presentation,r[i].transmuxedDecodeEnd=n.end.decode,r[i].baseMediaDecodeTime=n.baseMediaDecodeTime}},n.appendData_=function(e,t){var n=t.type,r=t.data;if(r&&r.byteLength&&("audio"!==n||!this.audioDisabled_)){var i=this.getInitSegmentAndUpdateState_({type:n,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:n,initSegment:i,data:r})}},n.loadSegment_=function(e){var t=this;this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),"number"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.hasEnoughInfoToLoad_()?this.updateTransmuxerAndRequestSegment_(e):this.loadQueue_.push((function(){var n=(0,o.Z)({},e,{forceTimestampOffset:!0});(0,o.Z)(e,t.generateSegmentInfo_(n)),t.isPendingTimestampOffset_=!1,t.updateTransmuxerAndRequestSegment_(e)}))},n.updateTransmuxerAndRequestSegment_=function(e){var t=this;this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));var n=this.createSimplifiedSegmentObj_(e),r=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),i=null!==this.mediaIndex,a=e.timeline!==this.currentTimeline_&&e.timeline>0,s=r||i&&a;this.logger_("Requesting "+pu(e)),n.map&&!n.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Qo({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:n,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:s,endedTimelineFn:function(){t.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this)})},n.trimBackBuffer_=function(e){var t=function(e,t,n){var r=t-Ro.BACK_BUFFER_LENGTH;e.length&&(r=Math.max(r,e.start(0)));var i=t-n;return Math.min(i,r)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)},n.createSimplifiedSegmentObj_=function(e){var t=e.segment,n=e.part,r={resolvedUri:n?n.resolvedUri:t.resolvedUri,byterange:n?n.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part},i=e.playlist.segments[e.mediaIndex-1];if(i&&i.timeline===t.timeline&&(i.videoTimingInfo?r.baseStartTime=i.videoTimingInfo.transmuxedDecodeEnd:i.audioTimingInfo&&(r.baseStartTime=i.audioTimingInfo.transmuxedDecodeEnd)),t.key){var a=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=a}return t.map&&(r.map=this.initSegmentForMap(t.map)),r},n.saveTransferStats_=function(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)},n.saveBandwidthRelatedStats_=function(e,t){this.pendingSegment_.byteLength=t.bytesReceived,e<fu?this.logger_("Ignoring segment's bandwidth because its duration of "+e+" is less than the min to record "+fu):(this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime)},n.handleTimeout_=function(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate")},n.segmentRequestFinished_=function(e,t,n){if(this.callQueue_.length)this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,n));else if(this.saveTransferStats_(t.stats),this.pendingSegment_&&t.requestId===this.pendingSegment_.requestId){if(e){if(this.pendingSegment_=null,this.state="READY",e.code===Xo)return;return this.pause(),e.code===Go?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error"))}var r=this.pendingSegment_;this.saveBandwidthRelatedStats_(r.duration,t.stats),r.endOfAllRequests=t.endOfAllRequests,n.gopInfo&&(this.gopBuffer_=function(e,t,n){if(!t.length)return e;if(n)return t.slice();for(var r=t[0].pts,i=0;i<e.length&&!(e[i].pts>=r);i++);return e.slice(0,i).concat(t)}(this.gopBuffer_,n.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(r)}},n.setTimeMapping_=function(e){var t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)},n.updateMediaSecondsLoaded_=function(e){"number"==typeof e.start&&"number"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration},n.shouldUpdateTransmuxerTimestampOffset_=function(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())},n.trueSegmentStart_=function(e){var t=e.currentStart,n=e.playlist,r=e.mediaIndex,i=e.firstVideoFrameTimeForData,a=e.currentVideoTimestampOffset,s=e.useVideoTimingInfo,o=e.videoTimingInfo,u=e.audioTimingInfo;if(void 0!==t)return t;if(!s)return u.start;var l=n.segments[r-1];return 0!==r&&l&&void 0!==l.start&&l.end===i+a?o.start:i},n.waitForAppendsToComplete_=function(e){if(!this.currentMediaInfo_)return this.error({message:"No starting media returned, likely due to an unsupported media format.",blacklistDuration:1/0}),void this.trigger("error");var t=this.currentMediaInfo_,n=t.hasAudio,r=t.hasVideo,i=t.isMuxed,a="main"===this.loaderType_&&r,s=!this.audioDisabled_&&n&&!i;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||"number"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);a&&e.waitingOnAppends++,s&&e.waitingOnAppends++,a&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),s&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))},n.checkAppendsDone_=function(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())},n.checkForIllegalMediaSwitch=function(e){var t=function(e,t,n){return"main"===e&&t&&n?n.hasAudio||n.hasVideo?t.hasVideo&&!n.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!t.hasVideo&&n.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null}(this.loaderType_,this.currentMediaInfo_,e);return!!t&&(this.error({message:t,blacklistDuration:1/0}),this.trigger("error"),!0)},n.updateSourceBufferTimestampOffset_=function(e){if(null!==e.timestampOffset&&"number"==typeof e.timingInfo.start&&!e.changedTimestampOffset&&"main"===this.loaderType_){var t=!1;e.timestampOffset-=e.timingInfo.start,e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger("timestampoffset")}},n.updateTimingInfoEnd_=function(e){e.timingInfo=e.timingInfo||{};var t="main"===this.loaderType_&&this.currentMediaInfo_.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;t&&(e.timingInfo.end="number"==typeof t.end?t.end:t.start+e.duration)},n.handleAppendsDone_=function(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var e=this.pendingSegment_;this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:"main"===this.loaderType_}),this.logger_("Appended "+pu(e));var t=function(e,t){if("hls"!==t)return null;var n,r,i,a,s=(n=e.audioTimingInfo,r=e.videoTimingInfo,i=n&&"number"==typeof n.start&&"number"==typeof n.end?n.end-n.start:0,a=r&&"number"==typeof r.start&&"number"==typeof r.end?r.end-r.start:0,Math.max(i,a));if(!s)return null;var o=e.playlist.targetDuration,u=vu({segmentDuration:s,maxDuration:2*o}),l=vu({segmentDuration:s,maxDuration:o}),c="Segment with index "+e.mediaIndex+" from playlist "+e.playlist.id+" has a duration of "+s+" when the reported duration is "+e.duration+" and the target duration is "+o+". For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1";return u||l?{severity:u?"warn":"info",message:c}:null}(e,this.sourceType_);if(t&&("warn"===t.severity?Ss.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",e.isSyncRequest)this.trigger("syncinfoupdate");else{this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),"main"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");var n=e.segment;n.end&&this.currentTime_()-n.end>3*e.playlist.targetDuration?this.resetEverything():(null!==this.mediaIndex&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),this.paused()||this.monitorBuffer_())}},n.recordThroughput_=function(e){if(e.duration<fu)this.logger_("Ignoring segment's throughput because its duration of "+e.duration+" is less than the min to record "+fu);else{var t=this.throughput.rate,n=Date.now()-e.endOfAllRequests+1,r=Math.floor(e.byteLength/n*8*1e3);this.throughput.rate+=(r-t)/++this.throughput.count}},n.addSegmentMetadataCue_=function(e){if(this.segmentMetadataTrack_){var t=e.segment,n=t.start,r=t.end;if(hu(n)&&hu(r)){du(n,r,this.segmentMetadataTrack_);var a=i().WebKitDataCue||i().VTTCue,s={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:n,end:r},o=new a(n,r,JSON.stringify(s));o.value=s,this.segmentMetadataTrack_.addCue(o)}}},t}(Ss.EventTarget);function _u(){}var bu,Tu=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))},Su=["video","audio"],wu=function(e,t){var n=t[e+"Buffer"];return n&&n.updating||t.queuePending[e]},ku=function e(t,n){if(0!==n.queue.length){var r=0,i=n.queue[r];if("mediaSource"!==i.type){if("mediaSource"!==t&&n.ready()&&"closed"!==n.mediaSource.readyState&&!wu(t,n)){if(i.type!==t){if(r=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];if("mediaSource"===r.type)return null;if(r.type===e)return n}return null}(t,n.queue),null===r)return;i=n.queue[r]}return n.queue.splice(r,1),n.queuePending[t]=i,i.action(t,n),i.doneFn?void 0:(n.queuePending[t]=null,void e(t,n))}}else n.updating()||"closed"===n.mediaSource.readyState||(n.queue.shift(),i.action(n),i.doneFn&&i.doneFn(),e("audio",n),e("video",n))}},Eu=function(e,t){var n=t[e+"Buffer"],r=Tu(e);n&&(n.removeEventListener("updateend",t["on"+r+"UpdateEnd_"]),n.removeEventListener("error",t["on"+r+"Error_"]),t.codecs[e]=null,t[e+"Buffer"]=null)},Cu=function(e,t){return e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t)},xu=function(e,t,n){return function(r,i){var a=i[r+"Buffer"];if(Cu(i.mediaSource,a)){i.logger_("Appending segment "+t.mediaIndex+"'s "+e.length+" bytes to "+r+"Buffer");try{a.appendBuffer(e)}catch(e){i.logger_("Error with code "+e.code+" "+(22===e.code?"(QUOTA_EXCEEDED_ERR) ":"")+"when appending segment "+t.mediaIndex+" to "+r+"Buffer"),i.queuePending[r]=null,n(e)}}}},Iu=function(e,t){return function(n,r){var i=r[n+"Buffer"];if(Cu(r.mediaSource,i)){r.logger_("Removing "+e+" to "+t+" from "+n+"Buffer");try{i.remove(e,t)}catch(i){r.logger_("Remove "+e+" to "+t+" from "+n+"Buffer failed")}}}},Au=function(e){return function(t,n){var r=n[t+"Buffer"];Cu(n.mediaSource,r)&&(n.logger_("Setting "+t+"timestampOffset to "+e),r.timestampOffset=e)}},Ou=function(e){return function(t,n){e()}},Pu=function(e){return function(t){if("open"===t.mediaSource.readyState){t.logger_("Calling mediaSource endOfStream("+(e||"")+")");try{t.mediaSource.endOfStream(e)}catch(e){Ss.log.warn("Failed to call media source endOfStream",e)}}}},Lu=function(e,t){return function(n){var r=Tu(e),i=V(t);n.logger_("Adding "+e+"Buffer with codec "+t+" to mediaSource");var a=n.mediaSource.addSourceBuffer(i);a.addEventListener("updateend",n["on"+r+"UpdateEnd_"]),a.addEventListener("error",n["on"+r+"Error_"]),n.codecs[e]=t,n[e+"Buffer"]=a}},Du=function(e){return function(t){var n=t[e+"Buffer"];if(Eu(e,t),Cu(t.mediaSource,n)){t.logger_("Removing "+e+"Buffer with codec "+t.codecs[e]+" from mediaSource");try{t.mediaSource.removeSourceBuffer(n)}catch(t){Ss.log.warn("Failed to removeSourceBuffer "+e+"Buffer",t)}}}},Ru=function(e){return function(t,n){var r=n[t+"Buffer"],i=V(e);Cu(n.mediaSource,r)&&n.codecs[t]!==e&&(n.logger_("changing "+t+"Buffer codec from "+n.codecs[t]+" to "+e),r.changeType(i),n.codecs[t]=e)}},Mu=function(e){var t=e.type,n=e.sourceUpdater,r=e.action,i=e.doneFn,a=e.name;n.queue.push({type:t,action:r,doneFn:i,name:a}),ku(t,n)},Nu=function(e,t){return function(n){if(t.queuePending[e]){var r=t.queuePending[e].doneFn;t.queuePending[e]=null,r&&r(t[e+"Error_"])}ku(e,t)}},Uu=function(e){function t(t){var n;return(n=e.call(this)||this).mediaSource=t,n.sourceopenListener_=function(){return ku("mediaSource",(0,u.Z)(n))},n.mediaSource.addEventListener("sourceopen",n.sourceopenListener_),n.logger_=xs("SourceUpdater"),n.audioTimestampOffset_=0,n.videoTimestampOffset_=0,n.queue=[],n.queuePending={audio:null,video:null},n.delayedAudioAppendQueue_=[],n.videoAppendQueued_=!1,n.codecs={},n.onVideoUpdateEnd_=Nu("video",(0,u.Z)(n)),n.onAudioUpdateEnd_=Nu("audio",(0,u.Z)(n)),n.onVideoError_=function(e){n.videoError_=e},n.onAudioError_=function(e){n.audioError_=e},n.createdSourceBuffers_=!1,n.initializedEme_=!1,n.triggeredReady_=!1,n}(0,l.Z)(t,e);var n=t.prototype;return n.initializedEme=function(){this.initializedEme_=!0,this.triggerReady()},n.hasCreatedSourceBuffers=function(){return this.createdSourceBuffers_},n.hasInitializedAnyEme=function(){return this.initializedEme_},n.ready=function(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()},n.createSourceBuffers=function(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())},n.triggerReady=function(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))},n.addSourceBuffer=function(e,t){Mu({type:"mediaSource",sourceUpdater:this,action:Lu(e,t),name:"addSourceBuffer"})},n.abort=function(e){Mu({type:e,sourceUpdater:this,action:function(e,t){if("open"===t.mediaSource.readyState){var n=t[e+"Buffer"];if(Cu(t.mediaSource,n)){t.logger_("calling abort on "+e+"Buffer");try{n.abort()}catch(t){Ss.log.warn("Failed to abort on "+e+"Buffer",t)}}}},name:"abort"})},n.removeSourceBuffer=function(e){this.canRemoveSourceBuffer()?Mu({type:"mediaSource",sourceUpdater:this,action:Du(e),name:"removeSourceBuffer"}):Ss.log.error("removeSourceBuffer is not supported!")},n.canRemoveSourceBuffer=function(){return!Ss.browser.IE_VERSION&&!Ss.browser.IS_FIREFOX&&i().MediaSource&&i().MediaSource.prototype&&"function"==typeof i().MediaSource.prototype.removeSourceBuffer},t.canChangeType=function(){return i().SourceBuffer&&i().SourceBuffer.prototype&&"function"==typeof i().SourceBuffer.prototype.changeType},n.canChangeType=function(){return this.constructor.canChangeType()},n.changeType=function(e,t){this.canChangeType()?Mu({type:e,sourceUpdater:this,action:Ru(t),name:"changeType"}):Ss.log.error("changeType is not supported!")},n.addOrChangeSourceBuffers=function(e){var t=this;if(!e||"object"!=typeof e||0===Object.keys(e).length)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach((function(n){var r=e[n];if(!t.hasCreatedSourceBuffers())return t.addSourceBuffer(n,r);t.canChangeType()&&t.changeType(n,r)}))},n.appendBuffer=function(e,t){var n=this,r=e.segmentInfo,i=e.type,a=e.bytes;if(this.processedAppend_=!0,"audio"===i&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_("delayed audio append of "+a.length+" until video append");if(Mu({type:i,sourceUpdater:this,action:xu(a,r||{mediaIndex:-1},t),doneFn:t,name:"appendBuffer"}),"video"===i){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;var s=this.delayedAudioAppendQueue_.slice();this.logger_("queuing delayed audio "+s.length+" appendBuffers"),this.delayedAudioAppendQueue_.length=0,s.forEach((function(e){n.appendBuffer.apply(n,e)}))}},n.audioBuffered=function(){return Cu(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Ss.createTimeRange()},n.videoBuffered=function(){return Cu(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Ss.createTimeRange()},n.buffered=function(){var e=Cu(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Cu(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){var n=null,r=null,i=0,a=[],s=[];if(!(e&&e.length&&t&&t.length))return Ss.createTimeRange();for(var o=e.length;o--;)a.push({time:e.start(o),type:"start"}),a.push({time:e.end(o),type:"end"});for(o=t.length;o--;)a.push({time:t.start(o),type:"start"}),a.push({time:t.end(o),type:"end"});for(a.sort((function(e,t){return e.time-t.time})),o=0;o<a.length;o++)"start"===a[o].type?2==++i&&(n=a[o].time):"end"===a[o].type&&1==--i&&(r=a[o].time),null!==n&&null!==r&&(s.push([n,r]),n=null,r=null);return Ss.createTimeRanges(s)}(this.audioBuffered(),this.videoBuffered())},n.setDuration=function(e,t){var n;void 0===t&&(t=_u),Mu({type:"mediaSource",sourceUpdater:this,action:(n=e,function(e){e.logger_("Setting mediaSource duration to "+n);try{e.mediaSource.duration=n}catch(e){Ss.log.warn("Failed to set media source duration",e)}}),name:"duration",doneFn:t})},n.endOfStream=function(e,t){void 0===e&&(e=null),void 0===t&&(t=_u),"string"!=typeof e&&(e=void 0),Mu({type:"mediaSource",sourceUpdater:this,action:Pu(e),name:"endOfStream",doneFn:t})},n.removeAudio=function(e,t,n){void 0===n&&(n=_u),this.audioBuffered().length&&0!==this.audioBuffered().end(0)?Mu({type:"audio",sourceUpdater:this,action:Iu(e,t),doneFn:n,name:"remove"}):n()},n.removeVideo=function(e,t,n){void 0===n&&(n=_u),this.videoBuffered().length&&0!==this.videoBuffered().end(0)?Mu({type:"video",sourceUpdater:this,action:Iu(e,t),doneFn:n,name:"remove"}):n()},n.updating=function(){return!(!wu("audio",this)&&!wu("video",this))},n.audioTimestampOffset=function(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(Mu({type:"audio",sourceUpdater:this,action:Au(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_},n.videoTimestampOffset=function(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset!==e&&(Mu({type:"video",sourceUpdater:this,action:Au(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_},n.audioQueueCallback=function(e){this.audioBuffer&&Mu({type:"audio",sourceUpdater:this,action:Ou(e),name:"callback"})},n.videoQueueCallback=function(e){this.videoBuffer&&Mu({type:"video",sourceUpdater:this,action:Ou(e),name:"callback"})},n.dispose=function(){var e=this;this.trigger("dispose"),Su.forEach((function(t){e.abort(t),e.canRemoveSourceBuffer()?e.removeSourceBuffer(t):e[t+"QueueCallback"]((function(){return Eu(t,e)}))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()},t}(Ss.EventTarget),Fu=function(e){return decodeURIComponent(escape(String.fromCharCode.apply(null,e)))},Bu=new Uint8Array("\n\n".split("").map((function(e){return e.charCodeAt(0)}))),ju=function(e){function t(t,n){var r;return void 0===n&&(n={}),(r=e.call(this,t,n)||this).mediaSource_=null,r.subtitlesTrack_=null,r.loaderType_="subtitle",r.featuresNativeTextTracks_=t.featuresNativeTextTracks,r.shouldSaveSegmentTimingInfo_=!1,r}(0,l.Z)(t,e);var n=t.prototype;return n.createTransmuxer_=function(){return null},n.buffered_=function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Ss.createTimeRanges();var e=this.subtitlesTrack_.cues,t=e[0].startTime,n=e[e.length-1].startTime;return Ss.createTimeRanges([[t,n]])},n.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=So(e),r=this.initSegments_[n];if(t&&!r&&e.bytes){var i=Bu.byteLength+e.bytes.byteLength,a=new Uint8Array(i);a.set(e.bytes),a.set(Bu,e.bytes.byteLength),this.initSegments_[n]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:a}}return r||e},n.couldBeginLoading_=function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()},n.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},n.track=function(e){return void 0===e||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_},n.remove=function(e,t){du(e,t,this.subtitlesTrack_)},n.fillBuffer_=function(){var e=this,t=this.chooseNextRequest_();if(t){if(null===this.syncController_.timestampOffsetForTimeline(t.timeline))return this.syncController_.one("timestampoffset",(function(){e.state="READY",e.paused()||e.monitorBuffer_()})),void(this.state="WAITING_ON_TIMELINE");this.loadSegment_(t)}},n.timestampOffsetForSegment_=function(){return null},n.chooseNextRequest_=function(){return this.skipEmptySegments_(e.prototype.chooseNextRequest_.call(this))},n.skipEmptySegments_=function(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e},n.stopForError=function(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")},n.segmentRequestFinished_=function(e,t,n){var r=this;if(this.subtitlesTrack_){if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return e.code===Go&&this.handleTimeout_(),e.code===Xo?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);var a=this.pendingSegment_;this.saveBandwidthRelatedStats_(a.duration,t.stats),this.state="APPENDING",this.trigger("appending");var s=a.segment;if(s.map&&(s.map.bytes=t.map.bytes),a.bytes=t.bytes,"function"!=typeof i().WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var o,u=function(){r.subtitlesTrack_.tech_.off("vttjsloaded",o),r.stopForError({message:"Error loading vtt.js"})};return o=function(){r.subtitlesTrack_.tech_.off("vttjserror",u),r.segmentRequestFinished_(e,t,n)},this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",o),void this.subtitlesTrack_.tech_.one("vttjserror",u)}s.requested=!0;try{this.parseVTTCues_(a)}catch(e){return void this.stopForError({message:e.message})}if(this.updateTimeMapping_(a,this.syncController_.timelines[a.timeline],this.playlist_),a.cues.length?a.timingInfo={start:a.cues[0].startTime,end:a.cues[a.cues.length-1].endTime}:a.timingInfo={start:a.startOfSegment,end:a.startOfSegment+a.duration},a.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");a.byteLength=a.bytes.byteLength,this.mediaSecondsLoaded+=s.duration,a.cues.forEach((function(e){r.subtitlesTrack_.addCue(r.featuresNativeTextTracks_?new(i().VTTCue)(e.startTime,e.endTime,e.text):e)})),function(e){var t=e.cues;if(t)for(var n=0;n<t.length;n++){for(var r=[],i=0,a=0;a<t.length;a++)t[n].startTime===t[a].startTime&&t[n].endTime===t[a].endTime&&t[n].text===t[a].text&&++i>1&&r.push(t[a]);r.length&&r.forEach((function(t){return e.removeCue(t)}))}}(this.subtitlesTrack_),this.handleAppendsDone_()}else this.state="READY"},n.handleData_=function(){},n.updateTimingInfoEnd_=function(){},n.parseVTTCues_=function(e){var t,n=!1;"function"==typeof i().TextDecoder?t=new(i().TextDecoder)("utf8"):(t=i().WebVTT.StringDecoder(),n=!0);var r=new(i().WebVTT.Parser)(i(),i().vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},r.oncue=e.cues.push.bind(e.cues),r.ontimestampmap=function(t){e.timestampmap=t},r.onparsingerror=function(e){Ss.log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){var a=e.segment.map.bytes;n&&(a=Fu(a)),r.parse(a)}var s=e.bytes;n&&(s=Fu(s)),r.parse(s),r.flush()},n.updateTimeMapping_=function(e,t,n){var r=e.segment;if(t)if(e.cues.length){var i=e.timestampmap,a=i.MPEGTS/ut.ONE_SECOND_IN_TS-i.LOCAL+t.mapping;if(e.cues.forEach((function(e){e.startTime+=a,e.endTime+=a})),!n.syncInfo){var s=e.cues[0].startTime,o=e.cues[e.cues.length-1].startTime;n.syncInfo={mediaSequence:n.mediaSequence+e.mediaIndex,time:Math.min(s,o-r.duration)}}}else r.empty=!0},t}(yu),Hu=function(e,t){for(var n=e.cues,r=0;r<n.length;r++){var i=n[r];if(t>=i.adStartTime&&t<=i.adEndTime)return i}return null},Vu=function(e,t,n){void 0===n&&(n=0);var r=t.segments;return t.endList||0===n?e:r.length-(e+1)},qu=[{name:"VOD",run:function(e,t,n,r,i){return n!==1/0?{time:0,segmentIndex:0}:null}},{name:"ProgramDateTime",run:function(e,t,n,r,i){if(!Object.keys(e.timelineToDatetimeMappings).length)return null;var a=t.segments||[],s=null,o=null;i=i||0;for(var u=0;u<a.length;u++){var l=Vu(u,t,i),c=a[l],d=e.timelineToDatetimeMappings[c.timeline];if(d&&c.dateTimeObject){var h=c.dateTimeObject.getTime()/1e3+d,f=Math.abs(i-h);if(null!==o&&(0===f||o<f))break;o=f,s={time:h,segmentIndex:l}}}return s}},{name:"Segment",run:function(e,t,n,r,i){var a=t.segments||[],s=null,o=null;i=i||0;for(var u=0;u<a.length;u++){var l=Vu(u,t,i),c=a[l];if(c.timeline===r&&void 0!==c.start){var d=Math.abs(i-c.start);if(null!==o&&o<d)break;(!s||null===o||o>=d)&&(o=d,s={time:c.start,segmentIndex:l})}}return s}},{name:"Discontinuity",run:function(e,t,n,r,i){var a=null;if(i=i||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var s=null,o=0;o<t.discontinuityStarts.length;o++){var u=t.discontinuityStarts[o],l=t.discontinuitySequence+o+1,c=e.discontinuities[l];if(c){var d=Math.abs(i-c.time);if(null!==s&&s<d)break;(!a||null===s||s>=d)&&(s=d,a={time:c.time,segmentIndex:u})}}return a}},{name:"Playlist",run:function(e,t,n,r,i){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence}:null}}],Wu=function(e){function t(t){var n;return(n=e.call(this)||this).timelines=[],n.discontinuities=[],n.timelineToDatetimeMappings={},n.logger_=xs("SyncController"),n}(0,l.Z)(t,e);var n=t.prototype;return n.getSyncPoint=function(e,t,n,r){var i=this.runStrategies_(e,t,n,r);return i.length?this.selectSyncPoint_(i,{key:"time",value:r}):null},n.getExpiredTime=function(e,t){if(!e||!e.segments)return null;var n=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!n.length)return null;var r=this.selectSyncPoint_(n,{key:"segmentIndex",value:0});return r.segmentIndex>0&&(r.time*=-1),Math.abs(r.time+to(e,r.segmentIndex,0))},n.runStrategies_=function(e,t,n,r){for(var i=[],a=0;a<qu.length;a++){var s=qu[a],o=s.run(this,e,t,n,r);o&&(o.strategy=s.name,i.push({strategy:s.name,syncPoint:o}))}return i},n.selectSyncPoint_=function(e,t){for(var n=e[0].syncPoint,r=Math.abs(e[0].syncPoint[t.key]-t.value),i=e[0].strategy,a=1;a<e.length;a++){var s=Math.abs(e[a].syncPoint[t.key]-t.value);s<r&&(r=s,n=e[a].syncPoint,i=e[a].strategy)}return this.logger_("syncPoint for ["+t.key+": "+t.value+"] chosen with strategy ["+i+"]: [time:"+n.time+", segmentIndex:"+n.segmentIndex+"]"),n},n.saveExpiredSegmentInfo=function(e,t){for(var n=t.mediaSequence-e.mediaSequence-1;n>=0;n--){var r=e.segments[n];if(r&&void 0!==r.start){t.syncInfo={mediaSequence:e.mediaSequence+n,time:r.start},this.logger_("playlist refresh sync: [time:"+t.syncInfo.time+", mediaSequence: "+t.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}},n.setDateTimeMappingForStart=function(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){var t=e.segments[0],n=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-n}},n.saveSegmentTimingInfo=function(e){var t=e.segmentInfo,n=e.shouldSaveTimelineMapping,r=this.calculateSegmentTimeMapping_(t,t.timingInfo,n),i=t.segment;r&&(this.saveDiscontinuitySyncInfo_(t),t.playlist.syncInfo||(t.playlist.syncInfo={mediaSequence:t.playlist.mediaSequence+t.mediaIndex,time:i.start}));var a=i.dateTimeObject;i.discontinuity&&n&&a&&(this.timelineToDatetimeMappings[i.timeline]=-a.getTime()/1e3)},n.timestampOffsetForTimeline=function(e){return void 0===this.timelines[e]?null:this.timelines[e].time},n.mappingForTimeline=function(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping},n.calculateSegmentTimeMapping_=function(e,t,n){var r=e.segment,i=this.timelines[e.timeline];if("number"==typeof e.timestampOffset)i={time:e.startOfSegment,mapping:e.startOfSegment-t.start},n&&(this.timelines[e.timeline]=i,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+e.timeline+": [time: "+i.time+"] [mapping: "+i.mapping+"]")),r.start=e.startOfSegment,r.end=t.end+i.mapping;else{if(!i)return!1;r.start=t.start+i.mapping,r.end=t.end+i.mapping}return!0},n.saveDiscontinuitySyncInfo_=function(e){var t=e.playlist,n=e.segment;if(n.discontinuity)this.discontinuities[n.timeline]={time:n.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(var r=0;r<t.discontinuityStarts.length;r++){var i=t.discontinuityStarts[r],a=t.discontinuitySequence+r+1,s=i-e.mediaIndex,o=Math.abs(s);if(!this.discontinuities[a]||this.discontinuities[a].accuracy>o){var u;u=s<0?n.start-to(t,e.mediaIndex,i):n.end+to(t,e.mediaIndex+1,i),this.discontinuities[a]={time:u,accuracy:o}}}},n.dispose=function(){this.trigger("dispose"),this.off()},t}(Ss.EventTarget),zu=function(e){function t(){var t;return(t=e.call(this)||this).pendingTimelineChanges_={},t.lastTimelineChanges_={},t}(0,l.Z)(t,e);var n=t.prototype;return n.clearPendingTimelineChange=function(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")},n.pendingTimelineChange=function(e){var t=e.type,n=e.from,r=e.to;return"number"==typeof n&&"number"==typeof r&&(this.pendingTimelineChanges_[t]={type:t,from:n,to:r},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[t]},n.lastTimelineChange=function(e){var t=e.type,n=e.from,r=e.to;return"number"==typeof n&&"number"==typeof r&&(this.lastTimelineChanges_[t]={type:t,from:n,to:r},delete this.pendingTimelineChanges_[t],this.trigger("timelinechange")),this.lastTimelineChanges_[t]},n.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},t}(Ss.EventTarget),Gu=Uo(Fo((function(){function e(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var t=e((function(e){function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0})),n=e((function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,t(n,r)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0})),r=e((function(e){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0})),i=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(n,1),n>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,r=0;r<n;++r)t[r].call(this,arguments[1]);else for(var i=Array.prototype.slice.call(arguments,1),a=t.length,s=0;s<a;++s)t[s].apply(this,i)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}(),a=null,s=function(){function e(e){var t,n,r;a||(a=function(){var e,t,n,r,i,a,s,o,u=[[[],[],[],[],[]],[[],[],[],[],[]]],l=u[0],c=u[1],d=l[4],h=c[4],f=[],p=[];for(e=0;e<256;e++)p[(f[e]=e<<1^283*(e>>7))^e]=e;for(t=n=0;!d[t];t^=r||1,n=p[n]||1)for(a=(a=n^n<<1^n<<2^n<<3^n<<4)>>8^255&a^99,d[t]=a,h[a]=t,o=16843009*f[i=f[r=f[t]]]^65537*i^257*r^16843008*t,s=257*f[a]^16843008*a,e=0;e<4;e++)l[e][t]=s=s<<24^s>>>8,c[e][a]=o=o<<24^o>>>8;for(e=0;e<5;e++)l[e]=l[e].slice(0),c[e]=c[e].slice(0);return u}()),this._tables=[[a[0][0].slice(),a[0][1].slice(),a[0][2].slice(),a[0][3].slice(),a[0][4].slice()],[a[1][0].slice(),a[1][1].slice(),a[1][2].slice(),a[1][3].slice(),a[1][4].slice()]];var i=this._tables[0][4],s=this._tables[1],o=e.length,u=1;if(4!==o&&6!==o&&8!==o)throw new Error("Invalid aes key size");var l=e.slice(0),c=[];for(this._key=[l,c],t=o;t<4*o+28;t++)r=l[t-1],(t%o==0||8===o&&t%o==4)&&(r=i[r>>>24]<<24^i[r>>16&255]<<16^i[r>>8&255]<<8^i[255&r],t%o==0&&(r=r<<8^r>>>24^u<<24,u=u<<1^283*(u>>7))),l[t]=l[t-o]^r;for(n=0;t;n++,t--)r=l[3&n?t:t-4],c[n]=t<=4||n<4?r:s[0][i[r>>>24]]^s[1][i[r>>16&255]]^s[2][i[r>>8&255]]^s[3][i[255&r]]}return e.prototype.decrypt=function(e,t,n,r,i,a){var s,o,u,l,c=this._key[1],d=e^c[0],h=r^c[1],f=n^c[2],p=t^c[3],m=c.length/4-2,g=4,v=this._tables[1],y=v[0],_=v[1],b=v[2],T=v[3],S=v[4];for(l=0;l<m;l++)s=y[d>>>24]^_[h>>16&255]^b[f>>8&255]^T[255&p]^c[g],o=y[h>>>24]^_[f>>16&255]^b[p>>8&255]^T[255&d]^c[g+1],u=y[f>>>24]^_[p>>16&255]^b[d>>8&255]^T[255&h]^c[g+2],p=y[p>>>24]^_[d>>16&255]^b[h>>8&255]^T[255&f]^c[g+3],g+=4,d=s,h=o,f=u;for(l=0;l<4;l++)i[(3&-l)+a]=S[d>>>24]<<24^S[h>>16&255]<<16^S[f>>8&255]<<8^S[255&p]^c[g++],s=d,d=h,h=f,f=p,p=s},e}(),o=function(e){function t(){var t;return(t=e.call(this,i)||this).jobs=[],t.delay=1,t.timeout_=null,t}r(t,e);var n=t.prototype;return n.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},n.push=function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},t}(i),u=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},l=function(){function e(t,n,r,i){var a=e.STEP,s=new Int32Array(t.buffer),l=new Uint8Array(t.byteLength),c=0;for(this.asyncStream_=new o,this.asyncStream_.push(this.decryptChunk_(s.subarray(c,c+a),n,r,l)),c=a;c<s.length;c+=a)r=new Uint32Array([u(s[c-4]),u(s[c-3]),u(s[c-2]),u(s[c-1])]),this.asyncStream_.push(this.decryptChunk_(s.subarray(c,c+a),n,r,l));this.asyncStream_.push((function(){var e;i(null,(e=l).subarray(0,e.byteLength-e[e.byteLength-1]))}))}return e.prototype.decryptChunk_=function(e,t,n,r){return function(){var i=function(e,t,n){var r,i,a,o,l,c,d,h,f,p=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),m=new s(Array.prototype.slice.call(t)),g=new Uint8Array(e.byteLength),v=new Int32Array(g.buffer);for(r=n[0],i=n[1],a=n[2],o=n[3],f=0;f<p.length;f+=4)l=u(p[f]),c=u(p[f+1]),d=u(p[f+2]),h=u(p[f+3]),m.decrypt(l,c,d,h,v,f),v[f]=u(v[f]^r),v[f+1]=u(v[f+1]^i),v[f+2]=u(v[f+2]^a),v[f+3]=u(v[f+3]^o),r=l,i=c,a=d,o=h;return g}(e,t,n);r.set(i,e.byteOffset)}},t(e,null,[{key:"STEP",get:function(){return 32e3}}]),e}();self.onmessage=function(e){var t=e.data,n=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),r=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),i=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new l(n,r,i,(function(e,n){var r,i;self.postMessage((r={source:t.source,decrypted:n},i={},Object.keys(r).forEach((function(e){var t=r[e];ArrayBuffer.isView(t)?i[e]={bytes:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength}:i[e]=t})),i),[n.buffer])}))}}))),Xu=No(Gu),$u=function(e){var t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},Ku=function(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Zu=function(e,t){t.activePlaylistLoader=e,e.load()},Yu={AUDIO:function(e,t){return function(){var n=t.segmentLoaders[e],r=t.mediaTypes[e],i=t.blacklistCurrentPlaylist;Ku(n,r);var a=r.activeTrack(),s=r.activeGroup(),o=(s.filter((function(e){return e.default}))[0]||s[0]).id,u=r.tracks[o];if(a!==u){for(var l in Ss.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),r.tracks)r.tracks[l].enabled=r.tracks[l]===u;r.onTrackChanged()}else i({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(e,t){return function(){var n=t.segmentLoaders[e],r=t.mediaTypes[e];Ss.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),Ku(n,r);var i=r.activeTrack();i&&(i.mode="disabled"),r.onTrackChanged()}}},Qu={AUDIO:function(e,t,n){if(t){var r=n.tech,i=n.requestOptions,a=n.segmentLoaders[e];t.on("loadedmetadata",(function(){var e=t.media();a.playlist(e,i),(!r.paused()||e.endList&&"none"!==r.preload())&&a.load()})),t.on("loadedplaylist",(function(){a.playlist(t.media(),i),r.paused()||a.load()})),t.on("error",Yu[e](e,n))}},SUBTITLES:function(e,t,n){var r=n.tech,i=n.requestOptions,a=n.segmentLoaders[e],s=n.mediaTypes[e];t.on("loadedmetadata",(function(){var e=t.media();a.playlist(e,i),a.track(s.activeTrack()),(!r.paused()||e.endList&&"none"!==r.preload())&&a.load()})),t.on("loadedplaylist",(function(){a.playlist(t.media(),i),r.paused()||a.load()})),t.on("error",Yu[e](e,n))}},Ju={AUDIO:function(e,t){var n=t.vhs,r=t.sourceType,i=t.segmentLoaders[e],a=t.requestOptions,s=t.master.mediaGroups,o=t.mediaTypes[e],u=o.groups,l=o.tracks,c=o.logger_,d=t.masterPlaylistLoader,h=co(d.master);for(var f in s[e]&&0!==Object.keys(s[e]).length||(s[e]={main:{default:{default:!0}}}),s[e])for(var p in u[f]||(u[f]=[]),s[e][f]){var m=s[e][f][p],g=void 0;if(h?(c("AUDIO group '"+f+"' label '"+p+"' is a master playlist"),m.isMasterPlaylist=!0,g=null):g="vhs-json"===r&&m.playlists?new Vs(m.playlists[0],n,a):m.resolvedUri?new Vs(m.resolvedUri,n,a):m.playlists&&"dash"===r?new Do(m.playlists[0],n,a,d):null,m=Ss.mergeOptions({id:p,playlistLoader:g},m),Qu[e](e,m.playlistLoader,t),u[f].push(m),void 0===l[p]){var v=new Ss.AudioTrack({id:p,kind:$u(m),enabled:!1,language:m.language,default:m.default,label:p});l[p]=v}}i.on("error",Yu[e](e,t))},SUBTITLES:function(e,t){var n=t.tech,r=t.vhs,i=t.sourceType,a=t.segmentLoaders[e],s=t.requestOptions,o=t.master.mediaGroups,u=t.mediaTypes[e],l=u.groups,c=u.tracks,d=t.masterPlaylistLoader;for(var h in o[e])for(var f in l[h]||(l[h]=[]),o[e][h])if(!o[e][h][f].forced){var p=o[e][h][f],m=void 0;if("hls"===i)m=new Vs(p.resolvedUri,r,s);else if("dash"===i){if(!p.playlists.filter((function(e){return e.excludeUntil!==1/0})).length)return;m=new Do(p.playlists[0],r,s,d)}else"vhs-json"===i&&(m=new Vs(p.playlists?p.playlists[0]:p.resolvedUri,r,s));if(p=Ss.mergeOptions({id:f,playlistLoader:m},p),Qu[e](e,p.playlistLoader,t),l[h].push(p),void 0===c[f]){var g=n.addRemoteTextTrack({id:f,kind:"subtitles",default:p.default&&p.autoselect,language:p.language,label:f},!1).track;c[f]=g}}a.on("error",Yu[e](e,t))},"CLOSED-CAPTIONS":function(e,t){var n=t.tech,r=t.master.mediaGroups,i=t.mediaTypes[e],a=i.groups,s=i.tracks;for(var o in r[e])for(var u in a[o]||(a[o]=[]),r[e][o]){var l=r[e][o][u];if(l.instreamId.match(/CC\d/)&&(a[o].push(Ss.mergeOptions({id:u},l)),void 0===s[u])){var c=n.addRemoteTextTrack({id:l.instreamId,kind:"captions",default:l.default&&l.autoselect,language:l.language,label:u},!1).track;s[u]=c}}}},el=function e(t,n){for(var r=0;r<t.length;r++){if(uo(n,t[r]))return!0;if(t[r].playlists&&e(t[r].playlists,n))return!0}return!1},tl={AUDIO:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var r in n)if(n[r].enabled)return n[r];return null}},SUBTITLES:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var r in n)if("showing"===n[r].mode||"hidden"===n[r].mode)return n[r];return null}}},nl=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred"],rl=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]},il=function(e){function t(t){var n;n=e.call(this)||this;var r=t.src,a=t.handleManifestRedirects,s=t.withCredentials,o=t.tech,l=t.bandwidth,c=t.externVhs,d=t.useCueTags,h=t.blacklistDuration,f=t.enableLowInitialPlaylist,p=t.sourceType,m=t.cacheEncryptionKeys,g=t.experimentalBufferBasedABR;if(!r)throw new Error("A non-empty playlist URL or JSON manifest string is required");bu=c,n.experimentalBufferBasedABR=Boolean(g),n.withCredentials=s,n.tech_=o,n.vhs_=o.vhs,n.sourceType_=p,n.useCueTags_=d,n.blacklistDuration=h,n.enableLowInitialPlaylist=f,n.useCueTags_&&(n.cueTagsTrack_=n.tech_.addTextTrack("metadata","ad-cues"),n.cueTagsTrack_.inBandMetadataTrackDispatchType=""),n.requestOptions_={withCredentials:s,handleManifestRedirects:a,timeout:null},n.on("error",n.pauseLoading),n.mediaTypes_=function(){var e={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:_u,activeTrack:_u,getActiveGroup:_u,onGroupChanged:_u,onTrackChanged:_u,lastTrack_:null,logger_:xs("MediaGroups["+t+"]")}})),e}(),n.mediaSource=new(i().MediaSource),n.handleDurationChange_=n.handleDurationChange_.bind((0,u.Z)(n)),n.handleSourceOpen_=n.handleSourceOpen_.bind((0,u.Z)(n)),n.handleSourceEnded_=n.handleSourceEnded_.bind((0,u.Z)(n)),n.mediaSource.addEventListener("durationchange",n.handleDurationChange_),n.mediaSource.addEventListener("sourceopen",n.handleSourceOpen_),n.mediaSource.addEventListener("sourceended",n.handleSourceEnded_),n.seekable_=Ss.createTimeRanges(),n.hasPlayed_=!1,n.syncController_=new Wu(t),n.segmentMetadataTrack_=o.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,n.decrypter_=new Xu,n.sourceUpdater_=new Uu(n.mediaSource),n.inbandTextTracks_={},n.timelineChangeController_=new zu;var v={vhs:n.vhs_,parse708captions:t.parse708captions,mediaSource:n.mediaSource,currentTime:n.tech_.currentTime.bind(n.tech_),seekable:function(){return n.seekable()},seeking:function(){return n.tech_.seeking()},duration:function(){return n.duration()},hasPlayed:function(){return n.hasPlayed_},goalBufferLength:function(){return n.goalBufferLength()},bandwidth:l,syncController:n.syncController_,decrypter:n.decrypter_,sourceType:n.sourceType_,inbandTextTracks:n.inbandTextTracks_,cacheEncryptionKeys:m,sourceUpdater:n.sourceUpdater_,timelineChangeController:n.timelineChangeController_};return n.masterPlaylistLoader_="dash"===n.sourceType_?new Do(r,n.vhs_,n.requestOptions_):new Vs(r,n.vhs_,n.requestOptions_),n.setupMasterPlaylistLoaderListeners_(),n.mainSegmentLoader_=new yu(Ss.mergeOptions(v,{segmentMetadataTrack:n.segmentMetadataTrack_,loaderType:"main"}),t),n.audioSegmentLoader_=new yu(Ss.mergeOptions(v,{loaderType:"audio"}),t),n.subtitleSegmentLoader_=new ju(Ss.mergeOptions(v,{loaderType:"vtt",featuresNativeTextTracks:n.tech_.featuresNativeTextTracks}),t),n.setupSegmentLoaderListeners_(),n.experimentalBufferBasedABR&&(n.masterPlaylistLoader_.one("loadedplaylist",(function(){return n.startABRTimer_()})),n.tech_.on("pause",(function(){return n.stopABRTimer_()})),n.tech_.on("play",(function(){return n.startABRTimer_()}))),nl.forEach((function(e){n[e+"_"]=rl.bind((0,u.Z)(n),e)})),n.logger_=xs("MPC"),n.triggeredFmp4Usage=!1,"none"===n.tech_.preload()?(n.loadOnPlay_=function(){n.loadOnPlay_=null,n.masterPlaylistLoader_.load()},n.tech_.one("play",n.loadOnPlay_)):n.masterPlaylistLoader_.load(),n}(0,l.Z)(t,e);var n=t.prototype;return n.checkABR_=function(){var e=this.selectPlaylist();this.shouldSwitchToMedia_(e)&&this.switchMedia_(e,"abr")},n.switchMedia_=function(e,t,n){var r=this.media(),i=r&&(r.id||r.uri),a=e.id||e.uri;i&&i!==a&&(this.logger_("switch media "+i+" -> "+a+" from "+t),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+t})),this.masterPlaylistLoader_.media(e,n)},n.startABRTimer_=function(){var e=this;this.stopABRTimer_(),this.abrTimer_=i().setInterval((function(){return e.checkABR_()}),250)},n.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(i().clearInterval(this.abrTimer_),this.abrTimer_=null)},n.getAudioTrackPlaylists_=function(){var e=this.master();if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return e&&e.playlists||[];var t,n=e.mediaGroups.AUDIO,r=Object.keys(n);if(Object.keys(this.mediaTypes_.AUDIO.groups).length)t=this.mediaTypes_.AUDIO.activeTrack();else{var i=n.main||r.length&&n[r[0]];for(var a in i)if(i[a].default){t={label:a};break}}if(!t)return[];var s=[];for(var o in n)if(n[o][t.label]){var u=n[o][t.label];u.playlists?s.push.apply(s,u.playlists):s.push(u)}return s},n.setupMasterPlaylistLoaderListeners_=function(){var e=this;this.masterPlaylistLoader_.on("loadedmetadata",(function(){var t=e.masterPlaylistLoader_.media(),n=1.5*t.targetDuration*1e3;oo(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=n,t.endList&&"none"!==e.tech_.preload()&&(e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load()),function(e){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){Ju[t](t,e)}));var t=e.mediaTypes,n=e.masterPlaylistLoader,r=e.tech,i=e.vhs,a=e.segmentLoaders,s=a.AUDIO,o=a.main;["AUDIO","SUBTITLES"].forEach((function(n){t[n].activeGroup=function(e,t){return function(n){var r=t.masterPlaylistLoader,i=t.mediaTypes[e].groups,a=r.media();if(!a)return null;var s=null;a.attributes[e]&&(s=i[a.attributes[e]]);var o=Object.keys(i);if(!s)if("AUDIO"===e&&o.length>1&&co(t.master))for(var u=0;u<o.length;u++){var l=i[o[u]];if(el(l,a)){s=l;break}}else i.main?s=i.main:1===o.length&&(s=i[o[0]]);return void 0===n?s:null!==n&&s&&s.filter((function(e){return e.id===n.id}))[0]||null}}(n,e),t[n].activeTrack=tl[n](n,e),t[n].onGroupChanged=function(e,t){return function(){var n=t.segmentLoaders,r=n[e],i=n.main,a=t.mediaTypes[e],s=a.activeTrack(),o=a.getActiveGroup(),u=a.activePlaylistLoader,l=a.lastGroup_;o&&l&&o.id===l.id||(a.lastGroup_=o,a.lastTrack_=s,Ku(r,a),o&&!o.isMasterPlaylist&&(o.playlistLoader?(r.resyncLoader(),Zu(o.playlistLoader,a)):u&&i.resetEverything()))}}(n,e),t[n].onGroupChanging=function(e,t){return function(){var n=t.segmentLoaders[e];t.mediaTypes[e].lastGroup_=null,n.abort(),n.pause()}}(n,e),t[n].onTrackChanged=function(e,t){return function(){var n=t.masterPlaylistLoader,r=t.segmentLoaders,i=r[e],a=r.main,s=t.mediaTypes[e],o=s.activeTrack(),u=s.getActiveGroup(),l=s.activePlaylistLoader,c=s.lastTrack_;if((!c||!o||c.id!==o.id)&&(s.lastGroup_=u,s.lastTrack_=o,Ku(i,s),u)){if(u.isMasterPlaylist){if(!o||!c||o.id===c.id)return;var d=t.vhs.masterPlaylistController_,h=d.selectPlaylist();if(d.media()===h)return;return s.logger_("track change. Switching master audio from "+c.id+" to "+o.id),n.pause(),a.resetEverything(),void d.fastQualityChange_(h)}if("AUDIO"===e){if(!u.playlistLoader)return a.setAudio(!0),void a.resetEverything();i.setAudio(!0),a.setAudio(!1)}l!==u.playlistLoader?(i.track&&i.track(o),i.resetEverything(),Zu(u.playlistLoader,s)):Zu(u.playlistLoader,s)}}}(n,e),t[n].getActiveGroup=function(e,t){var n=t.mediaTypes;return function(){var t=n[e].activeTrack();return t?n[e].activeGroup(t):null}}(n,e)}));var u=t.AUDIO.activeGroup();if(u){var l=(u.filter((function(e){return e.default}))[0]||u[0]).id;t.AUDIO.tracks[l].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged(),t.AUDIO.getActiveGroup().playlistLoader?(o.setAudio(!1),s.setAudio(!0)):o.setAudio(!0)}n.on("mediachange",(function(){["AUDIO","SUBTITLES"].forEach((function(e){return t[e].onGroupChanged()}))})),n.on("mediachanging",(function(){["AUDIO","SUBTITLES"].forEach((function(e){return t[e].onGroupChanging()}))}));var c=function(){t.AUDIO.onTrackChanged(),r.trigger({type:"usage",name:"vhs-audio-change"}),r.trigger({type:"usage",name:"hls-audio-change"})};for(var d in r.audioTracks().addEventListener("change",c),r.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),i.on("dispose",(function(){r.audioTracks().removeEventListener("change",c),r.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)})),r.clearTracks("audio"),t.AUDIO.tracks)r.audioTracks().addTrack(t.AUDIO.tracks[d])}({sourceType:e.sourceType_,segmentLoaders:{AUDIO:e.audioSegmentLoader_,SUBTITLES:e.subtitleSegmentLoader_,main:e.mainSegmentLoader_},tech:e.tech_,requestOptions:e.requestOptions_,masterPlaylistLoader:e.masterPlaylistLoader_,vhs:e.vhs_,master:e.master(),mediaTypes:e.mediaTypes_,blacklistCurrentPlaylist:e.blacklistCurrentPlaylist.bind(e)}),e.triggerPresenceUsage_(e.master(),t),e.setupFirstPlay(),!e.mediaTypes_.AUDIO.activePlaylistLoader||e.mediaTypes_.AUDIO.activePlaylistLoader.media()?e.trigger("selectedinitialmedia"):e.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",(function(){e.trigger("selectedinitialmedia")}))})),this.masterPlaylistLoader_.on("loadedplaylist",(function(){e.loadOnPlay_&&e.tech_.off("play",e.loadOnPlay_);var t=e.masterPlaylistLoader_.media();if(!t){var n;if(e.excludeUnsupportedVariants_(),e.enableLowInitialPlaylist&&(n=e.selectInitialPlaylist()),n||(n=e.selectPlaylist()),!n||!e.shouldSwitchToMedia_(n))return;if(e.initialMedia_=n,e.switchMedia_(e.initialMedia_,"initial"),"vhs-json"!==e.sourceType_||!e.initialMedia_.segments)return;t=e.initialMedia_}e.handleUpdatedMediaPlaylist(t)})),this.masterPlaylistLoader_.on("error",(function(){e.blacklistCurrentPlaylist(e.masterPlaylistLoader_.error)})),this.masterPlaylistLoader_.on("mediachanging",(function(){e.mainSegmentLoader_.abort(),e.mainSegmentLoader_.pause()})),this.masterPlaylistLoader_.on("mediachange",(function(){var t=e.masterPlaylistLoader_.media(),n=1.5*t.targetDuration*1e3;oo(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=n,e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load(),e.tech_.trigger({type:"mediachange",bubbles:!0})})),this.masterPlaylistLoader_.on("playlistunchanged",(function(){var t=e.masterPlaylistLoader_.media();"playlist-unchanged"!==t.lastExcludeReason_&&e.stuckAtPlaylistEnd_(t)&&(e.blacklistCurrentPlaylist({message:"Playlist no longer updating.",reason:"playlist-unchanged"}),e.tech_.trigger("playliststuck"))})),this.masterPlaylistLoader_.on("renditiondisabled",(function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})})),this.masterPlaylistLoader_.on("renditionenabled",(function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})}))},n.handleUpdatedMediaPlaylist=function(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())},n.triggerPresenceUsage_=function(e,t){var n=e.mediaGroups||{},r=!0,i=Object.keys(n.AUDIO);for(var a in n.AUDIO)for(var s in n.AUDIO[a])n.AUDIO[a][s].uri||(r=!1);r&&(this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),this.tech_.trigger({type:"usage",name:"hls-demuxed"})),Object.keys(n.SUBTITLES).length&&(this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),this.tech_.trigger({type:"usage",name:"hls-webvtt"})),bu.Playlist.isAes(t)&&(this.tech_.trigger({type:"usage",name:"vhs-aes"}),this.tech_.trigger({type:"usage",name:"hls-aes"})),i.length&&Object.keys(n.AUDIO[i[0]]).length>1&&(this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.tech_.trigger({type:"usage",name:"hls-alternate-audio"})),this.useCueTags_&&(this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"}),this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"}))},n.shouldSwitchToMedia_=function(e){var t=this.masterPlaylistLoader_.media(),n=this.tech_.buffered();return function(e){var t=e.currentPlaylist,n=e.nextPlaylist,r=e.forwardBuffer,i=e.bufferLowWaterLine,a=e.bufferHighWaterLine,s=e.duration,o=e.experimentalBufferBasedABR,u=e.log;if(!n)return Ss.log.warn("We received no playlist to switch to. Please check your stream."),!1;var l="allowing switch "+(t&&t.id||"null")+" -> "+n.id;if(!t||!t.endList)return u(l+" as current playlist "+(t?"is live":"is not set")),!0;if(n.id===t.id)return!1;var c=o?Ro.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Ro.MAX_BUFFER_LOW_WATER_LINE;if(s<c)return u(l+" as duration < max low water line ("+s+" < "+c+")"),!0;var d=n.attributes.BANDWIDTH,h=t.attributes.BANDWIDTH;if(d<h&&(!o||r<a)){var f=l+" as next bandwidth < current bandwidth ("+d+" < "+h+")";return o&&(f+=" and forwardBuffer < bufferHighWaterLine ("+r+" < "+a+")"),u(f),!0}if((!o||d>h)&&r>=i){var p=l+" as forwardBuffer >= bufferLowWaterLine ("+r+" >= "+i+")";return o&&(p+=" and next bandwidth > current bandwidth ("+d+" > "+h+")"),u(p),!0}return u("not "+l+" as no switching criteria met"),!1}({currentPlaylist:t,nextPlaylist:e,forwardBuffer:n.length?n.end(n.length-1)-this.tech_.currentTime():0,bufferLowWaterLine:this.bufferLowWaterLine(),bufferHighWaterLine:this.bufferHighWaterLine(),duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})},n.setupSegmentLoaderListeners_=function(){var e=this;this.experimentalBufferBasedABR||(this.mainSegmentLoader_.on("bandwidthupdate",(function(){var t=e.selectPlaylist();e.shouldSwitchToMedia_(t)&&e.switchMedia_(t,"bandwidthupdate"),e.tech_.trigger("bandwidthupdate")})),this.mainSegmentLoader_.on("progress",(function(){e.trigger("progress")}))),this.mainSegmentLoader_.on("error",(function(){e.blacklistCurrentPlaylist(e.mainSegmentLoader_.error())})),this.mainSegmentLoader_.on("appenderror",(function(){e.error=e.mainSegmentLoader_.error_,e.trigger("error")})),this.mainSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on("timestampoffset",(function(){e.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"}),e.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})})),this.audioSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.audioSegmentLoader_.on("appenderror",(function(){e.error=e.audioSegmentLoader_.error_,e.trigger("error")})),this.mainSegmentLoader_.on("ended",(function(){e.logger_("main segment loader ended"),e.onEndOfStream()})),this.mainSegmentLoader_.on("earlyabort",(function(t){e.experimentalBufferBasedABR||(e.delegateLoaders_("all",["abort"]),e.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120))}));var t=function(){if(!e.sourceUpdater_.hasCreatedSourceBuffers())return e.tryToCreateSourceBuffers_();var t=e.getCodecsOrExclude_();t&&e.sourceUpdater_.addOrChangeSourceBuffers(t)};this.mainSegmentLoader_.on("trackinfo",t),this.audioSegmentLoader_.on("trackinfo",t),this.mainSegmentLoader_.on("fmp4",(function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("fmp4",(function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("ended",(function(){e.logger_("audioSegmentLoader ended"),e.onEndOfStream()}))},n.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},n.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},n.smoothQualityChange_=function(e){void 0===e&&(e=this.selectPlaylist()),e!==this.masterPlaylistLoader_.media()&&(this.switchMedia_(e,"smooth-quality"),this.mainSegmentLoader_.resetLoader())},n.fastQualityChange_=function(e){var t=this;void 0===e&&(e=this.selectPlaylist()),e!==this.masterPlaylistLoader_.media()?(this.switchMedia_(e,"fast-quality"),this.mainSegmentLoader_.resetEverything((function(){Ss.browser.IE_VERSION||Ss.browser.IS_EDGE?t.tech_.setCurrentTime(t.tech_.currentTime()+.04):t.tech_.setCurrentTime(t.tech_.currentTime())}))):this.logger_("skipping fastQualityChange because new media is same as old")},n.play=function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();var e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}},n.setupFirstPlay=function(){var e=this,t=this.masterPlaylistLoader_.media();if(!t||this.tech_.paused()||this.hasPlayed_)return!1;if(!t.endList){var n=this.seekable();if(!n.length)return!1;if(Ss.browser.IE_VERSION&&0===this.tech_.readyState())return this.tech_.one("loadedmetadata",(function(){e.trigger("firstplay"),e.tech_.setCurrentTime(n.end(0)),e.hasPlayed_=!0})),!1;this.trigger("firstplay"),this.tech_.setCurrentTime(n.end(0))}return this.hasPlayed_=!0,this.load(),!0},n.handleSourceOpen_=function(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){var e=this.tech_.play();void 0!==e&&"function"==typeof e.then&&e.then(null,(function(e){}))}this.trigger("sourceopen")},n.handleSourceEnded_=function(){if(this.inbandTextTracks_.metadataTrack_){var e=this.inbandTextTracks_.metadataTrack_.cues;if(e&&e.length){var t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}}},n.handleDurationChange_=function(){this.tech_.trigger("durationchange")},n.onEndOfStream=function(){var e=this.mainSegmentLoader_.ended_;this.mediaTypes_.AUDIO.activePlaylistLoader&&(e=!this.mainSegmentLoader_.currentMediaInfo_||this.mainSegmentLoader_.currentMediaInfo_.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_),e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())},n.stuckAtPlaylistEnd_=function(e){if(!this.seekable().length)return!1;var t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;var n=bu.Playlist.playlistEnd(e,t),r=this.tech_.currentTime(),i=this.tech_.buffered();if(!i.length)return n-r<=Ws;var a=i.end(i.length-1);return a-r<=Ws&&n-a<=Ws},n.blacklistCurrentPlaylist=function(e,t){void 0===e&&(e={});var n=e.playlist||this.masterPlaylistLoader_.media();if(t=t||e.blacklistDuration||this.blacklistDuration,!n)return this.error=e,void("open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network"));var r=this.masterPlaylistLoader_.master.playlists,i=r.filter(ao),a=1===i.length&&i[0]===n;if(1===r.length&&t!==1/0)return Ss.log.warn("Problem encountered with playlist "+n.id+". Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(a);if(a){var s=!1;r.forEach((function(e){if(e!==n){var t=e.excludeUntil;void 0!==t&&t!==1/0&&(s=!0,delete e.excludeUntil)}})),s&&(Ss.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}n.excludeUntil=Date.now()+1e3*t,e.reason&&(n.lastExcludeReason_=e.reason),this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-blacklisted"}),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});var o=this.selectPlaylist();if(!o)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");var u=e.internal?this.logger_:Ss.log.warn,l=e.message?" "+e.message:"";u((e.internal?"Internal problem":"Problem")+" encountered with playlist "+n.id+"."+l+" Switching to playlist "+o.id+"."),o.attributes.AUDIO!==n.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),o.attributes.SUBTITLES!==n.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);var c=o.targetDuration/2*1e3||5e3,d="number"==typeof o.lastRequest&&Date.now()-o.lastRequest<=c;return this.switchMedia_(o,"exclude",a||d)},n.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},n.delegateLoaders_=function(e,t){var n=this,r=[],i="all"===e;(i||"main"===e)&&r.push(this.masterPlaylistLoader_);var a=[];(i||"audio"===e)&&a.push("AUDIO"),(i||"subtitle"===e)&&(a.push("CLOSED-CAPTIONS"),a.push("SUBTITLES")),a.forEach((function(e){var t=n.mediaTypes_[e]&&n.mediaTypes_[e].activePlaylistLoader;t&&r.push(t)})),["main","audio","subtitle"].forEach((function(t){var i=n[t+"SegmentLoader_"];!i||e!==t&&"all"!==e||r.push(i)})),r.forEach((function(e){return t.forEach((function(t){"function"==typeof e[t]&&e[t]()}))}))},n.setCurrentTime=function(e){var t=Gs(this.tech_.buffered(),e);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),void this.load()):0},n.duration=function(){if(!this.masterPlaylistLoader_)return 0;var e=this.masterPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:bu.Playlist.duration(e):1/0:0},n.seekable=function(){return this.seekable_},n.onSyncInfoUpdate_=function(){var e;if(this.masterPlaylistLoader_){var t=this.masterPlaylistLoader_.media();if(t){var n=this.syncController_.getExpiredTime(t,this.duration());if(null!==n){var r=this.masterPlaylistLoader_.master,i=bu.Playlist.seekable(t,n,bu.Playlist.liveEdgeDelay(r,t));if(0!==i.length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(t=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(n=this.syncController_.getExpiredTime(t,this.duration())))return;if(0===(e=bu.Playlist.seekable(t,n,bu.Playlist.liveEdgeDelay(r,t))).length)return}var a,s;this.seekable_&&this.seekable_.length&&(a=this.seekable_.end(0),s=this.seekable_.start(0)),e?e.start(0)>i.end(0)||i.start(0)>e.end(0)?this.seekable_=i:this.seekable_=Ss.createTimeRanges([[e.start(0)>i.start(0)?e.start(0):i.start(0),e.end(0)<i.end(0)?e.end(0):i.end(0)]]):this.seekable_=i,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===a&&this.seekable_.start(0)===s||(this.logger_("seekable updated ["+$s(this.seekable_)+"]"),this.tech_.trigger("seekablechanged"))}}}}},n.updateDuration=function(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),"open"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener("sourceopen",this.updateDuration_);if(e){var t=this.seekable();if(!t.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<t.end(t.length-1))&&this.sourceUpdater_.setDuration(t.end(t.length-1))}else{var n=this.tech_.buffered(),r=bu.Playlist.duration(this.masterPlaylistLoader_.media());n.length>0&&(r=Math.max(r,n.end(n.length-1))),this.mediaSource.duration!==r&&this.sourceUpdater_.setDuration(r)}},n.dispose=function(){var e=this;this.trigger("dispose"),this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach((function(t){var n=e.mediaTypes_[t].groups;for(var r in n)n[r].forEach((function(e){e.playlistLoader&&e.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()},n.master=function(){return this.masterPlaylistLoader_.master},n.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},n.areMediaTypesKnown_=function(){var e=!!this.mediaTypes_.AUDIO.activePlaylistLoader;return!(!this.mainSegmentLoader_.currentMediaInfo_||e&&!this.audioSegmentLoader_.currentMediaInfo_)},n.getCodecsOrExclude_=function(){var e=this,t={main:this.mainSegmentLoader_.currentMediaInfo_||{},audio:this.audioSegmentLoader_.currentMediaInfo_||{}};t.video=t.main;var n=ru(this.master(),this.media()),r={},i=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(t.main.hasVideo&&(r.video=n.video||t.main.videoCodec||"avc1.4d400d"),t.main.isMuxed&&(r.video+=","+(n.audio||t.main.audioCodec||z)),(t.main.hasAudio&&!t.main.isMuxed||t.audio.hasAudio||i)&&(r.audio=n.audio||t.main.audioCodec||t.audio.audioCodec||z,t.audio.isFmp4=t.main.hasAudio&&!t.main.isMuxed?t.main.isFmp4:t.audio.isFmp4),r.audio||r.video){var a,s={};if(["video","audio"].forEach((function(e){if(r.hasOwnProperty(e)&&(i=t[e].isFmp4,o=r[e],!(i?q(o):W(o)))){var n=t[e].isFmp4?"browser":"muxer";s[n]=s[n]||[],s[n].push(r[e]),"audio"===e&&(a=n)}var i,o})),i&&a&&this.media().attributes.AUDIO){var o=this.media().attributes.AUDIO;this.master().playlists.forEach((function(t){(t.attributes&&t.attributes.AUDIO)===o&&t!==e.media()&&(t.excludeUntil=1/0)})),this.logger_("excluding audio group "+o+" as "+a+' does not support codec(s): "'+r.audio+'"')}if(!Object.keys(s).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var u=[];if(["video","audio"].forEach((function(t){var n=(j(e.sourceUpdater_.codecs[t]||"")[0]||{}).type,i=(j(r[t]||"")[0]||{}).type;n&&i&&n.toLowerCase()!==i.toLowerCase()&&u.push('"'+e.sourceUpdater_.codecs[t]+'" -> "'+r[t]+'"')})),u.length)return void this.blacklistCurrentPlaylist({playlist:this.media(),message:"Codec switching not supported: "+u.join(", ")+".",blacklistDuration:1/0,internal:!0})}return r}var l=Object.keys(s).reduce((function(e,t){return e&&(e+=", "),e+(t+' does not support codec(s): "')+s[t].join(",")+'"'}),"")+".";this.blacklistCurrentPlaylist({playlist:this.media(),internal:!0,message:l,blacklistDuration:1/0})}else this.blacklistCurrentPlaylist({playlist:this.media(),message:"Could not determine codecs for playlist.",blacklistDuration:1/0})},n.tryToCreateSourceBuffers_=function(){if("open"===this.mediaSource.readyState&&!this.sourceUpdater_.hasCreatedSourceBuffers()&&this.areMediaTypesKnown_()){var e=this.getCodecsOrExclude_();if(e){this.sourceUpdater_.createSourceBuffers(e);var t=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(t)}}},n.excludeUnsupportedVariants_=function(){var e=this,t=this.master().playlists,n=[];Object.keys(t).forEach((function(r){var i=t[r];if(-1===n.indexOf(i.id)){n.push(i.id);var a=ru(e.master,i),s=[];!a.audio||W(a.audio)||q(a.audio)||s.push("audio codec "+a.audio),!a.video||W(a.video)||q(a.video)||s.push("video codec "+a.video),a.text&&"stpp.ttml.im1t"===a.text&&s.push("text codec "+a.text),s.length&&(i.excludeUntil=1/0,e.logger_("excluding "+i.id+" for unsupported: "+s.join(", ")))}}))},n.excludeIncompatibleVariants_=function(e){var t=this,n=[],r=this.master().playlists,i=tu(j(e)),a=nu(i),s=i.video&&j(i.video)[0]||null,o=i.audio&&j(i.audio)[0]||null;Object.keys(r).forEach((function(e){var i=r[e];if(-1===n.indexOf(i.id)&&i.excludeUntil!==1/0){n.push(i.id);var u=[],l=ru(t.masterPlaylistLoader_.master,i),c=nu(l);if(l.audio||l.video){if(c!==a&&u.push('codec count "'+c+'" !== "'+a+'"'),!t.sourceUpdater_.canChangeType()){var d=l.video&&j(l.video)[0]||null,h=l.audio&&j(l.audio)[0]||null;d&&s&&d.type.toLowerCase()!==s.type.toLowerCase()&&u.push('video codec "'+d.type+'" !== "'+s.type+'"'),h&&o&&h.type.toLowerCase()!==o.type.toLowerCase()&&u.push('audio codec "'+h.type+'" !== "'+o.type+'"')}u.length&&(i.excludeUntil=1/0,t.logger_("blacklisting "+i.id+": "+u.join(" && ")))}}}))},n.updateAdCues_=function(e){var t=0,n=this.seekable();n.length&&(t=n.start(0)),function(e,t,n){if(void 0===n&&(n=0),e.segments)for(var r,a=n,s=0;s<e.segments.length;s++){var o=e.segments[s];if(r||(r=Hu(t,a+o.duration/2)),r){if("cueIn"in o){r.endTime=a,r.adEndTime=a,a+=o.duration,r=null;continue}if(a<r.endTime){a+=o.duration;continue}r.endTime+=o.duration}else if("cueOut"in o&&((r=new(i().VTTCue)(a,a+o.duration,o.cueOut)).adStartTime=a,r.adEndTime=a+parseFloat(o.cueOut),t.addCue(r)),"cueOutCont"in o){var u=o.cueOutCont.split("/").map(parseFloat),l=u[0],c=u[1];(r=new(i().VTTCue)(a,a+o.duration,"")).adStartTime=a-l,r.adEndTime=r.adStartTime+c,t.addCue(r)}a+=o.duration}}(e,this.cueTagsTrack_,t)},n.goalBufferLength=function(){var e=this.tech_.currentTime(),t=Ro.GOAL_BUFFER_LENGTH,n=Ro.GOAL_BUFFER_LENGTH_RATE,r=Math.max(t,Ro.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*n,r)},n.bufferLowWaterLine=function(){var e=this.tech_.currentTime(),t=Ro.BUFFER_LOW_WATER_LINE,n=Ro.BUFFER_LOW_WATER_LINE_RATE,r=Math.max(t,Ro.MAX_BUFFER_LOW_WATER_LINE),i=Math.max(t,Ro.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*n,this.experimentalBufferBasedABR?i:r)},n.bufferHighWaterLine=function(){return Ro.BUFFER_HIGH_WATER_LINE},t}(Ss.EventTarget),al=function(e,t,n){var r,i,a,s=e.masterPlaylistController_,o=s[(e.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(s);if(t.attributes){var u=t.attributes.RESOLUTION;this.width=u&&u.width,this.height=u&&u.height,this.bandwidth=t.attributes.BANDWIDTH}this.codecs=ru(s.master(),t),this.playlist=t,this.id=n,this.enabled=(r=e.playlists,i=t.id,a=o,function(e){var t=r.master.playlists[i],n=io(t),s=ao(t);return void 0===e?s:(e?delete t.disabled:t.disabled=!0,e===s||n||(a(),e?r.trigger("renditionenabled"):r.trigger("renditiondisabled")),e)})},sl=["seeking","seeked","pause","playing","error"],ol=function(){function e(e){var t=this;this.masterPlaylistController_=e.masterPlaylistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=xs("PlaybackWatcher"),this.logger_("initialize");var n=function(){return t.monitorCurrentTime_()},r=function(){return t.monitorCurrentTime_()},a=function(){return t.techWaiting_()},s=function(){return t.cancelTimer_()},o=function(){return t.fixesBadSeeks_()},u=this.masterPlaylistController_,l=["main","subtitle","audio"],c={};l.forEach((function(e){c[e]={reset:function(){return t.resetSegmentDownloads_(e)},updateend:function(){return t.checkSegmentDownloads_(e)}},u[e+"SegmentLoader_"].on("appendsdone",c[e].updateend),u[e+"SegmentLoader_"].on("playlistupdate",c[e].reset),t.tech_.on(["seeked","seeking"],c[e].reset)})),this.tech_.on("seekablechanged",o),this.tech_.on("waiting",a),this.tech_.on(sl,s),this.tech_.on("canplay",r),this.tech_.one("play",n),this.dispose=function(){t.logger_("dispose"),t.tech_.off("seekablechanged",o),t.tech_.off("waiting",a),t.tech_.off(sl,s),t.tech_.off("canplay",r),t.tech_.off("play",n),l.forEach((function(e){u[e+"SegmentLoader_"].off("appendsdone",c[e].updateend),u[e+"SegmentLoader_"].off("playlistupdate",c[e].reset),t.tech_.off(["seeked","seeking"],c[e].reset)})),t.checkCurrentTimeTimeout_&&i().clearTimeout(t.checkCurrentTimeTimeout_),t.cancelTimer_()}}var t=e.prototype;return t.monitorCurrentTime_=function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&i().clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=i().setTimeout(this.monitorCurrentTime_.bind(this),250)},t.resetSegmentDownloads_=function(e){var t=this.masterPlaylistController_[e+"SegmentLoader_"];this[e+"StalledDownloads_"]>0&&this.logger_("resetting possible stalled download count for "+e+" loader"),this[e+"StalledDownloads_"]=0,this[e+"Buffered_"]=t.buffered_()},t.checkSegmentDownloads_=function(e){var t=this.masterPlaylistController_,n=t[e+"SegmentLoader_"],r=n.buffered_(),i=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e.start(n)!==t.start(n)||e.end(n)!==t.end(n))return!0;return!1}(this[e+"Buffered_"],r);this[e+"Buffered_"]=r,i?this.resetSegmentDownloads_(e):(this[e+"StalledDownloads_"]++,this.logger_("found #"+this[e+"StalledDownloads_"]+" "+e+" appends that did not increase buffer (possible stalled download)",{playlistId:n.playlist_&&n.playlist_.id,buffered:Ks(r)}),this[e+"StalledDownloads_"]<10||(this.logger_(e+" loader stalled download exclusion"),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:"vhs-"+e+"-download-exclusion"}),"subtitle"!==e&&t.blacklistCurrentPlaylist({message:"Excessive "+e+" segment downloading detected."},1/0)))},t.checkCurrentTime_=function(){if(this.tech_.seeking()&&this.fixesBadSeeks_())return this.consecutiveUpdates=0,void(this.lastRecordedTime=this.tech_.currentTime());if(!this.tech_.paused()&&!this.tech_.seeking()){var e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+Ws>=t.end(t.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}},t.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null},t.fixesBadSeeks_=function(){if(!this.tech_.seeking())return!1;var e,t=this.seekable(),n=this.tech_.currentTime();if(this.afterSeekableWindow_(t,n,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(e=t.end(t.length-1)),this.beforeSeekableWindow_(t,n)){var r=t.start(0);e=r+(r===t.end(0)?0:Ws)}if(void 0!==e)return this.logger_("Trying to seek outside of seekable at time "+n+" with seekable range "+$s(t)+". Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0;var i=this.tech_.buffered();return!!function(e){var t=e.buffered,n=e.targetDuration,r=e.currentTime;return!(!t.length||t.end(0)-t.start(0)<2*n||r>t.start(0)||!(t.start(0)-r<n))}({buffered:i,targetDuration:this.media().targetDuration,currentTime:n})&&(e=i.start(0)+Ws,this.logger_("Buffered region starts ("+i.start(0)+") just beyond seek point ("+n+"). Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0)},t.waiting_=function(){if(!this.techWaiting_()){var e=this.tech_.currentTime(),t=this.tech_.buffered(),n=Gs(t,e);return n.length&&e+3<=n.end(0)?(this.cancelTimer_(),this.tech_.setCurrentTime(e),this.logger_("Stopped at "+e+" while inside a buffered region ["+n.start(0)+" -> "+n.end(0)+"]. Attempting to resume playback by seeking to the current time."),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"}),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})):void 0}},t.techWaiting_=function(){var e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking()&&this.fixesBadSeeks_())return!0;if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(e,t)){var n=e.end(e.length-1);return this.logger_("Fell out of live window at time "+t+". Seeking to live point (seekable end) "+n),this.cancelTimer_(),this.tech_.setCurrentTime(n),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var r=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,i=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:r.audioBuffered(),videoBuffered:r.videoBuffered(),currentTime:t}))return this.cancelTimer_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;var a=Xs(i,t);if(a.length>0){var s=a.start(0)-t;return this.logger_("Stopped at "+t+", setting timer for "+s+", seeking to "+a.start(0)),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*s,t),!0}return!1},t.afterSeekableWindow_=function(e,t,n,r){if(void 0===r&&(r=!1),!e.length)return!1;var i=e.end(e.length-1)+Ws;return!n.endList&&r&&(i=e.end(e.length-1)+3*n.targetDuration),t>i},t.beforeSeekableWindow_=function(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)},t.videoUnderflow_=function(e){var t=e.videoBuffered,n=e.audioBuffered,r=e.currentTime;if(t){var i;if(t.length&&n.length){var a=Gs(t,r-3),s=Gs(t,r),o=Gs(n,r);o.length&&!s.length&&a.length&&(i={start:a.end(0),end:o.end(0)})}else Xs(t,r).length||(i=this.gapFromVideoUnderflow_(t,r));return!!i&&(this.logger_("Encountered a gap in video from "+i.start+" to "+i.end+". Seeking to current time "+r),!0)}},t.skipTheGap_=function(e){var t=this.tech_.buffered(),n=this.tech_.currentTime(),r=Xs(t,n);this.cancelTimer_(),0!==r.length&&n===e&&(this.logger_("skipTheGap_:","currentTime:",n,"scheduled currentTime:",e,"nextRange start:",r.start(0)),this.tech_.setCurrentTime(r.start(0)+qs),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"}),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))},t.gapFromVideoUnderflow_=function(e,t){for(var n=function(e){if(e.length<2)return Ss.createTimeRanges();for(var t=[],n=1;n<e.length;n++){var r=e.end(n-1),i=e.start(n);t.push([r,i])}return Ss.createTimeRanges(t)}(e),r=0;r<n.length;r++){var i=n.start(r),a=n.end(r);if(t-i<4&&t-i>2)return{start:i,end:a}}return null},e}(),ul={errorInterval:30,getSource:function(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},ll=function e(t,n){var r=0,i=0,a=Ss.mergeOptions(ul,n);t.ready((function(){t.trigger({type:"usage",name:"vhs-error-reload-initialized"}),t.trigger({type:"usage",name:"hls-error-reload-initialized"})}));var s=function(){i&&t.currentTime(i)},o=function(e){null!=e&&(i=t.duration()!==1/0&&t.currentTime()||0,t.one("loadedmetadata",s),t.src(e),t.trigger({type:"usage",name:"vhs-error-reload"}),t.trigger({type:"usage",name:"hls-error-reload"}),t.play())},u=function(){return Date.now()-r<1e3*a.errorInterval?(t.trigger({type:"usage",name:"vhs-error-reload-canceled"}),void t.trigger({type:"usage",name:"hls-error-reload-canceled"})):a.getSource&&"function"==typeof a.getSource?(r=Date.now(),a.getSource.call(t,o)):void Ss.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")},l=function e(){t.off("loadedmetadata",s),t.off("error",u),t.off("dispose",e)};t.on("error",u),t.on("dispose",l),t.reloadSourceOnError=function(n){l(),e(t,n)}},cl=function(e){ll(this,e)},dl="2.8.2",hl={PlaylistLoader:Vs,Playlist:ho,utils:Eo,STANDARD_PLAYLIST_SELECTOR:cu,INITIAL_PLAYLIST_SELECTOR:function(){var e=this,t=this.playlists.master.playlists.filter(ho.isEnabled);return ou(t,(function(e,t){return uu(e,t)})),t.filter((function(t){return!!ru(e.playlists.master,t).video}))[0]||null},lastBandwidthSelector:cu,movingAverageBandwidthSelector:function(e){var t=-1;if(e<0||e>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){var n=this.useDevicePixelRatio&&i().devicePixelRatio||1;return t<0&&(t=this.systemBandwidth),t=e*this.systemBandwidth+(1-e)*t,lu(this.playlists.master,t,parseInt(su(this.tech_.el(),"width"),10)*n,parseInt(su(this.tech_.el(),"height"),10)*n,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)}},comparePlaylistBandwidth:uu,comparePlaylistResolution:function(e,t){var n,r;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),n=n||i().Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(r=t.attributes.RESOLUTION.width),n===(r=r||i().Number.MAX_VALUE)&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:n-r},xhr:go()};Object.keys(Ro).forEach((function(e){Object.defineProperty(hl,e,{get:function(){return Ss.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),Ro[e]},set:function(t){Ss.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),"number"!=typeof t||t<0?Ss.log.warn("value of Vhs."+e+" must be greater than or equal to 0"):Ro[e]=t}})}));var fl="videojs-vhs",pl=function(e,t){for(var n=t.media(),r=-1,i=0;i<e.length;i++)if(e[i].id===n.id){r=i;break}e.selectedIndex_=r,e.trigger({selectedIndex:r,type:"change"})};hl.canPlaySource=function(){return Ss.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var ml=function(){if(!i().localStorage)return null;var e=i().localStorage.getItem(fl);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}};hl.supportsNativeHls=function(){if(!s()||!s().createElement)return!1;var e=s().createElement("video");return!!Ss.getTech("Html5").isSupported()&&["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),hl.supportsNativeDash=!!(s()&&s().createElement&&Ss.getTech("Html5").isSupported())&&/maybe|probably/i.test(s().createElement("video").canPlayType("application/dash+xml")),hl.supportsTypeNatively=function(e){return"hls"===e?hl.supportsNativeHls:"dash"===e&&hl.supportsNativeDash},hl.isSupported=function(){return Ss.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var gl=function(e){function t(t,n,r){var i;if(i=e.call(this,n,Ss.mergeOptions(r.hls,r.vhs))||this,r.hls&&Object.keys(r.hls).length&&Ss.log.warn("Using hls options is deprecated. Use vhs instead."),"number"==typeof r.initialBandwidth&&(i.options_.bandwidth=r.initialBandwidth),i.logger_=xs("VhsHandler"),n.options_&&n.options_.playerId){var a=Ss(n.options_.playerId);a.hasOwnProperty("hls")||Object.defineProperty(a,"hls",{get:function(){return Ss.log.warn("player.hls is deprecated. Use player.tech().vhs instead."),n.trigger({type:"usage",name:"hls-player-access"}),(0,u.Z)(i)},configurable:!0}),a.hasOwnProperty("vhs")||Object.defineProperty(a,"vhs",{get:function(){return Ss.log.warn("player.vhs is deprecated. Use player.tech().vhs instead."),n.trigger({type:"usage",name:"vhs-player-access"}),(0,u.Z)(i)},configurable:!0}),a.hasOwnProperty("dash")||Object.defineProperty(a,"dash",{get:function(){return Ss.log.warn("player.dash is deprecated. Use player.tech().vhs instead."),(0,u.Z)(i)},configurable:!0}),i.player_=a}if(i.tech_=n,i.source_=t,i.stats={},i.ignoreNextSeekingEvent_=!1,i.setOptions_(),i.options_.overrideNative&&n.overrideNativeAudioTracks&&n.overrideNativeVideoTracks)n.overrideNativeAudioTracks(!0),n.overrideNativeVideoTracks(!0);else if(i.options_.overrideNative&&(n.featuresNativeVideoTracks||n.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return i.on(s(),["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],(function(e){var t=s().fullscreenElement||s().webkitFullscreenElement||s().mozFullScreenElement||s().msFullscreenElement;t&&t.contains(i.tech_.el())&&i.masterPlaylistController_.smoothQualityChange_()})),i.on(i.tech_,"seeking",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),i.on(i.tech_,"error",(function(){this.tech_.error()&&this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()})),i.on(i.tech_,"play",i.play),i}(0,l.Z)(t,e);var n=t.prototype;return n.setOptions_=function(){var e=this;if(this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.handleManifestRedirects=!1!==this.options_.handleManifestRedirects,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.smoothQualityChange=this.options_.smoothQualityChange||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,"number"!=typeof this.options_.blacklistDuration&&(this.options_.blacklistDuration=300),"number"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){var t=ml();t&&t.bandwidth&&(this.options_.bandwidth=t.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-bandwidth-from-local-storage"})),t&&t.throughput&&(this.options_.throughput=t.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-throughput-from-local-storage"}))}"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Ro.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Ro.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","experimentalBufferBasedABR","liveRangeSafeTimeDelta","experimentalLLHLS"].forEach((function(t){void 0!==e.source_[t]&&(e.options_[t]=e.source_[t])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio},n.src=function(e,t){var n=this;if(e){var r;this.setOptions_(),this.options_.src=0===(r=this.source_.src).toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(r.substring(r.indexOf(",")+1)):r,this.options_.tech=this.tech_,this.options_.externVhs=hl,this.options_.sourceType=$(t),this.options_.seekTo=function(e){n.tech_.setCurrentTime(e)},this.masterPlaylistController_=new il(this.options_);var a=Ss.mergeOptions({liveRangeSafeTimeDelta:Ws},this.options_,{seekable:function(){return n.seekable()},media:function(){return n.masterPlaylistController_.media()},masterPlaylistController:this.masterPlaylistController_});this.playbackWatcher_=new ol(a),this.masterPlaylistController_.on("error",(function(){var e=Ss.players[n.tech_.options_.playerId],t=n.masterPlaylistController_.error;"object"!=typeof t||t.code?"string"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));var s=this.options_.experimentalBufferBasedABR?hl.movingAverageBandwidthSelector(.55):hl.STANDARD_PLAYLIST_SELECTOR;this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):s.bind(this),this.masterPlaylistController_.selectInitialPlaylist=hl.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.masterPlaylistController_.masterPlaylistLoader_,this.mediaSource=this.masterPlaylistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get:function(){return this.masterPlaylistController_.selectPlaylist},set:function(e){this.masterPlaylistController_.selectPlaylist=e.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=e,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.bandwidth},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=e,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var e,t=1/(this.bandwidth||1);return e=this.throughput>0?1/this.throughput:0,Math.floor(1/(t+e))},set:function(){Ss.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:function(){return n.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return n.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return n.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return n.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return n.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return n.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return n.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return n.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},buffered:{get:function(){return Ks(n.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return n.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return n.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return n.tech_.name_},enumerable:!0},duration:{get:function(){return n.tech_.duration()},enumerable:!0},master:{get:function(){return n.playlists.master},enumerable:!0},playerDimensions:{get:function(){return n.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return Ks(n.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return n.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",(function(){n.options_.useBandwidthFromLocalStorage&&function(e){if(!i().localStorage)return!1;var t=ml();t=t?Ss.mergeOptions(t,e):e;try{i().localStorage.setItem(fl,JSON.stringify(t))}catch(e){return!1}}({bandwidth:n.bandwidth,throughput:Math.round(n.throughput)})})),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var e;(e=n).representations=function(){var t=e.masterPlaylistController_.master(),n=co(t)?e.masterPlaylistController_.getAudioTrackPlaylists_():t.playlists;return n?n.filter((function(e){return!io(e)})).map((function(t,n){return new al(e,t,t.id)})):[]}})),this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",(function(){n.setupEme_()})),this.on(this.masterPlaylistController_,"progress",(function(){this.tech_.trigger("progress")})),this.on(this.masterPlaylistController_,"firstplay",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=i().URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}},n.setupEme_=function(){var e,t,n,r=this,i=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,a=(e={player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:i&&i.media()},t=e.player,!(!(n=function(e,t,n){if(!e)return e;var r={};t&&t.attributes&&t.attributes.CODECS&&(r=tu(j(t.attributes.CODECS))),n&&n.attributes&&n.attributes.CODECS&&(r.audio=n.attributes.CODECS);var i=V(r.video),a=V(r.audio),s={};for(var o in e)s[o]={},a&&(s[o].audioContentType=a),i&&(s[o].videoContentType=i),t.contentProtection&&t.contentProtection[o]&&t.contentProtection[o].pssh&&(s[o].pssh=t.contentProtection[o].pssh),"string"==typeof e[o]&&(s[o].url=e[o]);return Ss.mergeOptions(e,s)}(e.sourceKeySystems,e.media,e.audioMedia))||(t.currentSource().keySystems=n,n&&!t.eme&&(Ss.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),1))));11!==Ss.browser.IE_VERSION&&a?(this.logger_("waiting for EME key session creation"),function(e){var t=e.player,n=e.sourceKeySystems,r=e.audioMedia,i=e.mainPlaylists;if(!t.eme.initializeMediaKeys)return Promise.resolve();var a,s,o=(a=r?i.concat([r]):i,s=Object.keys(n),a.reduce((function(e,t){if(!t.contentProtection)return e;var n=s.reduce((function(e,n){var r=t.contentProtection[n];return r&&r.pssh&&(e[n]={pssh:r.pssh}),e}),{});return Object.keys(n).length&&e.push(n),e}),[])),u=[],l=[];return o.forEach((function(e){l.push(new Promise((function(e,n){t.tech_.one("keysessioncreated",e)}))),u.push(new Promise((function(n,r){t.eme.initializeMediaKeys({keySystems:e},(function(e){e?r(e):n()}))})))})),Promise.race([Promise.all(u),Promise.race(l)])}({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:i&&i.media(),mainPlaylists:this.playlists.master.playlists}).then((function(){r.logger_("created EME key session"),r.masterPlaylistController_.sourceUpdater_.initializedEme()})).catch((function(e){r.logger_("error while creating EME key session",e),r.player_.error({message:"Failed to initialize media keys for EME",code:3})}))):this.masterPlaylistController_.sourceUpdater_.initializedEme()},n.setupQualityLevels_=function(){var e=this,t=Ss.players[this.tech_.options_.playerId];t&&t.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=t.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var t,n;t=e.qualityLevels_,(n=e).representations().forEach((function(e){t.addQualityLevel(e)})),pl(t,n.playlists)})),this.playlists.on("mediachange",(function(){pl(e.qualityLevels_,e.playlists)})))},t.version=function(){return{"@videojs/http-streaming":dl,"mux.js":"5.11.0","mpd-parser":"0.16.0","m3u8-parser":"4.7.0","aes-decrypter":"3.1.2"}},n.version=function(){return this.constructor.version()},n.canChangeType=function(){return Uu.canChangeType()},n.play=function(){this.masterPlaylistController_.play()},n.setCurrentTime=function(e){this.masterPlaylistController_.setCurrentTime(e)},n.duration=function(){return this.masterPlaylistController_.duration()},n.seekable=function(){return this.masterPlaylistController_.seekable()},n.dispose=function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.player_&&(delete this.player_.vhs,delete this.player_.dash,delete this.player_.hls),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.tech_&&delete this.tech_.hls,this.mediaSourceUrl_&&i().URL.revokeObjectURL&&(i().URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),e.prototype.dispose.call(this)},n.convertToProgramTime=function(e,t){return function(e){var t=e.playlist,n=e.time,r=void 0===n?void 0:n,i=e.callback;if(!i)throw new Error("getProgramTime: callback must be provided");if(!t||void 0===r)return i({message:"getProgramTime: playlist and time must be provided"});var a=function(e,t){if(!t||!t.segments||0===t.segments.length)return null;for(var n,r=0,i=0;i<t.segments.length&&!(e<=(r=(n=t.segments[i]).videoTimingInfo?n.videoTimingInfo.transmuxedPresentationEnd:r+n.duration));i++);var a=t.segments[t.segments.length-1];if(a.videoTimingInfo&&a.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>r){if(e>r+.25*a.duration)return null;n=a}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:r-n.duration,type:n.videoTimingInfo?"accurate":"estimate"}}(r,t);if(!a)return i({message:"valid programTime was not found"});if("estimate"===a.type)return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:a.estimatedStart});var s={mediaSeconds:r},o=function(e,t){if(!t.dateTimeObject)return null;var n=t.videoTimingInfo.transmuxerPrependedSeconds,r=e-(t.videoTimingInfo.transmuxedPresentationStart+n);return new Date(t.dateTimeObject.getTime()+1e3*r)}(r,a.segment);return o&&(s.programDateTime=o.toISOString()),i(null,s)}({playlist:this.masterPlaylistController_.media(),time:e,callback:t})},n.seekToProgramTime=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=2),Co({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:r,pauseAfterSeek:n,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})},t}(Ss.getComponent("Component")),vl={name:"videojs-http-streaming",VERSION:dl,canHandleSource:function(e,t){void 0===t&&(t={});var n=Ss.mergeOptions(Ss.options,t);return vl.canPlayType(e.type,n)},handleSource:function(e,t,n){void 0===n&&(n={});var r=Ss.mergeOptions(Ss.options,n);return t.vhs=new gl(e,t,r),Ss.hasOwnProperty("hls")||Object.defineProperty(t,"hls",{get:function(){return Ss.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),t.vhs},configurable:!0}),t.vhs.xhr=go(),t.vhs.src(e.src,e.type),t.vhs},canPlayType:function(e,t){void 0===t&&(t={});var n=Ss.mergeOptions(Ss.options,t).vhs.overrideNative,r=void 0===n?!Ss.browser.IS_ANY_SAFARI:n,i=$(e);return!i||hl.supportsTypeNatively(i)&&!r?"":"maybe"}};q("avc1.4d400d,mp4a.40.2")&&Ss.getTech("Html5").registerSourceHandler(vl,0),Ss.VhsHandler=gl,Object.defineProperty(Ss,"HlsHandler",{get:function(){return Ss.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),gl},configurable:!0}),Ss.VhsSourceHandler=vl,Object.defineProperty(Ss,"HlsSourceHandler",{get:function(){return Ss.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),vl},configurable:!0}),Ss.Vhs=hl,Object.defineProperty(Ss,"Hls",{get:function(){return Ss.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),hl},configurable:!0}),Ss.use||(Ss.registerComponent("Hls",hl),Ss.registerComponent("Vhs",hl)),Ss.options.vhs=Ss.options.vhs||{},Ss.options.hls=Ss.options.hls||{},Ss.registerPlugin?Ss.registerPlugin("reloadSourceOnError",cl):Ss.plugin("reloadSourceOnError",cl);const yl=Ss},52002:(e,t,n)=>{"use strict";var r=n(42612),i=n(3384),a=n.n(i);function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var o=function e(t){var n=this;if(r.Z.browser.IS_IE8)for(var i in n=a().createElement("custom"),e.prototype)"constructor"!==i&&(n[i]=e.prototype[i]);return n.id=t.id,n.label=n.id,n.width=t.width,n.height=t.height,n.bitrate=t.bandwidth,n.enabled_=t.enabled,Object.defineProperty(n,"enabled",{get:function(){return n.enabled_()},set:function(e){n.enabled_(e)}}),n},u=function(e){var t,n;function i(){var t,n=s(s(t=e.call(this)||this));if(r.Z.browser.IS_IE8)for(var o in n=a().createElement("custom"),i.prototype)"constructor"!==o&&(n[o]=i.prototype[o]);return n.levels_=[],n.selectedIndex_=-1,Object.defineProperty(n,"selectedIndex",{get:function(){return n.selectedIndex_}}),Object.defineProperty(n,"length",{get:function(){return n.levels_.length}}),n||s(t)}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var u=i.prototype;return u.addQualityLevel=function(e){var t=this.getQualityLevelById(e.id);if(t)return t;var n=this.levels_.length;return t=new o(e),""+n in this||Object.defineProperty(this,n,{get:function(){return this.levels_[n]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:"addqualitylevel"}),t},u.removeQualityLevel=function(e){for(var t=null,n=0,r=this.length;n<r;n++)if(this[n]===e){t=this.levels_.splice(n,1)[0],this.selectedIndex_===n?this.selectedIndex_=-1:this.selectedIndex_>n&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t},u.getQualityLevelById=function(e){for(var t=0,n=this.length;t<n;t++){var r=this[t];if(r.id===e)return r}return null},u.dispose=function(){this.selectedIndex_=-1,this.levels_.length=0},i}(r.Z.EventTarget);for(var l in u.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"},u.prototype.allowedEvents_)u.prototype["on"+l]=null;var c="2.0.9",d=function(e){return t=this,r.Z.mergeOptions({},e),n=t.qualityLevels,i=new u,t.on("dispose",(function e(){i.dispose(),t.qualityLevels=n,t.off("dispose",e)})),t.qualityLevels=function(){return i},t.qualityLevels.VERSION=c,i;var t,n,i};(r.Z.registerPlugin||r.Z.plugin)("qualityLevels",d),d.VERSION=c},83983:(e,t,n)=>{var r=n(51562),i=e.exports={WebVTT:n(77735),VTTCue:n(65997),VTTRegion:n(17193)};r.vttjs=i,r.WebVTT=i.WebVTT;var a=i.VTTCue,s=i.VTTRegion,o=r.VTTCue,u=r.VTTRegion;i.shim=function(){r.VTTCue=a,r.VTTRegion=s},i.restore=function(){r.VTTCue=o,r.VTTRegion=u},r.VTTCue||i.shim()},77735:(e,t,n)=>{var r=n(3384),i=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function a(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function s(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+(0|r)/1e3}var n=e.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}function o(){this.values=i(null)}function u(e,t,n,r){var i=r?e.split(r):[e];for(var a in i)if("string"==typeof i[a]){var s=i[a].split(n);2===s.length&&t(s[0].trim(),s[1].trim())}}function l(e,t,n){var r=e;function i(){var t=s(e);if(null===t)throw new a(a.Errors.BadTimeStamp,"Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function l(){e=e.replace(/^\s+/,"")}if(l(),t.startTime=i(),l(),"--\x3e"!==e.substr(0,3))throw new a(a.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),l(),t.endTime=i(),l(),function(e,t){var r=new o;u(e,(function(e,t){switch(e){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===t){r.set(e,n[i].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),s=a[0];r.integer(e,s),r.percent(e,s)&&r.set("snapToLines",!1),r.alt(e,s,["auto"]),2===a.length&&r.alt("lineAlign",a[1],["start","center","end"]);break;case"position":a=t.split(","),r.percent(e,a[0]),2===a.length&&r.alt("positionAlign",a[1],["start","center","end"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start","center","end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");try{t.line=r.get("line","auto")}catch(e){}t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100);try{t.align=r.get("align","center")}catch(e){t.align=r.get("align","middle")}try{t.position=r.get("position","auto")}catch(e){t.position=r.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=r.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(e,t)}a.prototype=i(Error.prototype),a.prototype.constructor=a,a.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},o.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var c=r.createElement&&r.createElement("textarea"),d={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},h={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},f={v:"title",lang:"lang"},p={rt:"ruby"};function m(e,t){function n(){if(!t)return null;var e,n=t.match(/^([^<]*)(<[^>]*>?)?/);return e=n[1]?n[1]:n[2],t=t.substr(e.length),e}function r(e,t){return!p[t.localName]||p[t.localName]===e.localName}function i(t,n){var r=d[t];if(!r)return null;var i=e.document.createElement(r),a=f[t];return a&&n&&(i[a]=n.trim()),i}for(var a,o,u=e.document.createElement("div"),l=u,m=[];null!==(a=n());)if("<"!==a[0])l.appendChild(e.document.createTextNode((o=a,c.innerHTML=o,o=c.textContent,c.textContent="",o)));else{if("/"===a[1]){m.length&&m[m.length-1]===a.substr(2).replace(">","")&&(m.pop(),l=l.parentNode);continue}var g,v=s(a.substr(1,a.length-2));if(v){g=e.document.createProcessingInstruction("timestamp",v),l.appendChild(g);continue}var y=a.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!y)continue;if(!(g=i(y[1],y[3])))continue;if(!r(l,g))continue;if(y[2]){var _=y[2].split(".");_.forEach((function(e){var t=/^bg_/.test(e),n=t?e.slice(3):e;if(h.hasOwnProperty(n)){var r=t?"background-color":"color",i=h[n];g.style[r]=i}})),g.className=_.join(" ")}m.push(y[1]),l.appendChild(g),l=g}return u}var g=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function v(e){for(var t=0;t<g.length;t++){var n=g[t];if(e>=n[0]&&e<=n[1])return!0}return!1}function y(e){var t=[],n="";if(!e||!e.childNodes)return"ltr";function r(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function i(e){if(!e||!e.length)return null;var t=e.pop(),n=t.textContent||t.innerText;if(n){var a=n.match(/^.*(\n|\r)/);return a?(e.length=0,a[0]):n}return"ruby"===t.tagName?i(e):t.childNodes?(r(e,t),i(e)):void 0}for(r(t,e);n=i(t);)for(var a=0;a<n.length;a++)if(v(n.charCodeAt(a)))return"rtl";return"ltr"}function _(){}function b(e,t,n){_.call(this),this.cue=t,this.cueDiv=m(e,t.text);var r={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(r,this.cueDiv),this.div=e.document.createElement("div"),r={direction:y(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(r),this.div.appendChild(this.cueDiv);var i=0;switch(t.positionAlign){case"start":case"line-left":i=t.position;break;case"center":i=t.position-t.size/2;break;case"end":case"line-right":i=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(i,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(i,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function T(e){var t,n,r,i;if(e.div){n=e.div.offsetHeight,r=e.div.offsetWidth,i=e.div.offsetTop;var a=(a=e.div.childNodes)&&(a=a[0])&&a.getClientRects&&a.getClientRects();e=e.div.getBoundingClientRect(),t=a?Math.max(a[0]&&a[0].height||0,e.height/a.length):0}this.left=e.left,this.right=e.right,this.top=e.top||i,this.height=e.height||n,this.bottom=e.bottom||i+(e.height||n),this.width=e.width||r,this.lineHeight=void 0!==t?t:e.lineHeight}function S(e,t,n,r){var i=new T(t),a=t.cue,s=function(e){if("number"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,n=t.textTrackList,r=0,i=0;i<n.length&&n[i]!==t;i++)"showing"===n[i].mode&&r++;return-1*++r}(a),o=[];if(a.snapToLines){var u;switch(a.vertical){case"":o=["+y","-y"],u="height";break;case"rl":o=["+x","-x"],u="width";break;case"lr":o=["-x","+x"],u="width"}var l=i.lineHeight,c=l*Math.round(s),d=n[u]+l,h=o[0];Math.abs(c)>d&&(c=c<0?-1:1,c*=Math.ceil(d/l)*l),s<0&&(c+=""===a.vertical?n.height:n.width,o=o.reverse()),i.move(h,c)}else{var f=i.lineHeight/n.height*100;switch(a.lineAlign){case"center":s-=f/2;break;case"end":s-=f}switch(a.vertical){case"":t.applyStyles({top:t.formatStyle(s,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(s,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(s,"%")})}o=["+y","-x","+x","-y"],i=new T(t)}var p=function(e,t){for(var i,a=new T(e),s=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(n,t[o])||e.within(n)&&e.overlapsAny(r);)e.move(t[o]);if(e.within(n))return e;var u=e.intersectPercentage(n);s>u&&(i=new T(e),s=u),e=new T(a)}return i||a}(i,o);t.move(p.toCSSCompatValues(n))}function w(){}_.prototype.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},_.prototype.formatStyle=function(e,t){return 0===e?0:e+t},b.prototype=i(_.prototype),b.prototype.constructor=b,T.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},T.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},T.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},T.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},T.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},T.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},T.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},T.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,r=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||r,height:e.height||t,bottom:e.bottom||r+(e.height||t),width:e.width||n}},w.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},w.convertCueToDOMTree=function(e,t){return e&&t?m(e,t):null},w.processCues=function(e,t,n){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var r=e.document.createElement("div");if(r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin="1.5%",n.appendChild(r),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var i=[],a=T.getSimpleBoxPosition(r),s={font:Math.round(.05*a.height*100)/100+"px sans-serif"};!function(){for(var n,o,u=0;u<t.length;u++)o=t[u],n=new b(e,o,s),r.appendChild(n.div),S(0,n,a,i),o.displayState=n.div,i.push(T.getSimpleBoxPosition(n))}()}else for(var o=0;o<t.length;o++)r.appendChild(t[o].displayState)},w.Parser=function(e,t,n){n||(n=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=n||new TextDecoder("utf8"),this.regionList=[]},w.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof a))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t,n=this;function r(){for(var e=n.buffer,t=0;t<e.length&&"\r"!==e[t]&&"\n"!==e[t];)++t;var r=e.substr(0,t);return"\r"===e[t]&&++t,"\n"===e[t]&&++t,n.buffer=e.substr(t),r}e&&(n.buffer+=n.decoder.decode(e,{stream:!0}));try{var i;if("INITIAL"===n.state){if(!/\r\n|\n/.test(n.buffer))return this;var c=(i=r()).match(/^WEBVTT([ \t].*)?$/);if(!c||!c[0])throw new a(a.Errors.BadSignature);n.state="HEADER"}for(var d=!1;n.buffer;){if(!/\r\n|\n/.test(n.buffer))return this;switch(d?d=!1:i=r(),n.state){case"HEADER":/:/.test(i)?(t=i).match(/X-TIMESTAMP-MAP/)?u(t,(function(e,t){"X-TIMESTAMP-MAP"===e&&function(e){var t=new o;u(e,(function(e,n){switch(e){case"MPEGT":t.integer(e+"S",n);break;case"LOCA":t.set(e+"L",s(n))}}),/[^\d]:/,/,/),n.ontimestampmap&&n.ontimestampmap({MPEGTS:t.get("MPEGTS"),LOCAL:t.get("LOCAL")})}(t)}),/=/):u(t,(function(e,t){"Region"===e&&function(e){var t=new o;if(u(e,(function(e,n){switch(e){case"id":t.set(e,n);break;case"width":t.percent(e,n);break;case"lines":t.integer(e,n);break;case"regionanchor":case"viewportanchor":var r=n.split(",");if(2!==r.length)break;var i=new o;if(i.percent("x",r[0]),i.percent("y",r[1]),!i.has("x")||!i.has("y"))break;t.set(e+"X",i.get("x")),t.set(e+"Y",i.get("y"));break;case"scroll":t.alt(e,n,["up"])}}),/=/,/\s/),t.has("id")){var r=new(n.vttjs.VTTRegion||n.window.VTTRegion);r.width=t.get("width",100),r.lines=t.get("lines",3),r.regionAnchorX=t.get("regionanchorX",0),r.regionAnchorY=t.get("regionanchorY",100),r.viewportAnchorX=t.get("viewportanchorX",0),r.viewportAnchorY=t.get("viewportanchorY",100),r.scroll=t.get("scroll",""),n.onregion&&n.onregion(r),n.regionList.push({id:t.get("id"),region:r})}}(t)}),/:/):i||(n.state="ID");continue;case"NOTE":i||(n.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){n.state="NOTE";break}if(!i)continue;n.cue=new(n.vttjs.VTTCue||n.window.VTTCue)(0,0,"");try{n.cue.align="center"}catch(e){n.cue.align="middle"}if(n.state="CUE",-1===i.indexOf("--\x3e")){n.cue.id=i;continue}case"CUE":try{l(i,n.cue,n.regionList)}catch(e){n.reportOrThrowError(e),n.cue=null,n.state="BADCUE";continue}n.state="CUETEXT";continue;case"CUETEXT":var h=-1!==i.indexOf("--\x3e");if(!i||h&&(d=!0)){n.oncue&&n.oncue(n.cue),n.cue=null,n.state="ID";continue}n.cue.text&&(n.cue.text+="\n"),n.cue.text+=i.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":i||(n.state="ID");continue}}}catch(e){n.reportOrThrowError(e),"CUETEXT"===n.state&&n.cue&&n.oncue&&n.oncue(n.cue),n.cue=null,n.state="INITIAL"===n.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new a(a.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}},e.exports=w},65997:e=>{var t={"":1,lr:1,rl:1},n={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function r(e){return"string"==typeof e&&!!n[e.toLowerCase()]&&e.toLowerCase()}function i(e,n,i){this.hasBeenReset=!1;var a="",s=!1,o=e,u=n,l=i,c=null,d="",h=!0,f="auto",p="start",m="auto",g="auto",v=100,y="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return a},set:function(e){a=""+e}},pauseOnExit:{enumerable:!0,get:function(){return s},set:function(e){s=!!e}},startTime:{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");o=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");u=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return l},set:function(e){l=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return c},set:function(e){c=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return d},set:function(e){var n=function(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===n)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");d=n,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return h},set:function(e){h=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return f},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("Line: an invalid number or illegal string was specified.");f=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return p},set:function(e){var t=r(e);t?(p=t,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return m},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");m=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return g},set:function(e){var t=r(e);t?(g=t,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return v},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");v=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return y},set:function(e){var t=r(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");y=t,this.hasBeenReset=!0}}}),this.displayState=void 0}i.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=i},17193:e=>{var t={"":!0,up:!0};function n(e){return"number"==typeof e&&e>=0&&e<=100}e.exports=function(){var e=100,r=3,i=0,a=100,s=0,o=100,u="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!n(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return r},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");r=e}},regionAnchorY:{enumerable:!0,get:function(){return a},set:function(e){if(!n(e))throw new Error("RegionAnchorX must be between 0 and 100.");a=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!n(e))throw new Error("RegionAnchorY must be between 0 and 100.");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!n(e))throw new Error("ViewportAnchorY must be between 0 and 100.");o=e}},viewportAnchorX:{enumerable:!0,get:function(){return s},set:function(e){if(!n(e))throw new Error("ViewportAnchorX must be between 0 and 100.");s=e}},scroll:{enumerable:!0,get:function(){return u},set:function(e){var n=function(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}(e);!1===n?console.warn("Scroll: an invalid or illegal string was specified."):u=n}}})}},73668:(e,t,n)=>{function r(e){this.options=e||{locator:{}}}function i(){this.cdata=!1}function a(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function s(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function o(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function u(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}r.prototype.parseFromString=function(e,t){var n=this.options,r=new d,a=n.domBuilder||new i,o=n.errorHandler,u=n.locator,c=n.xmlns||{},h=/\/x?html?$/.test(t),f=h?l.entityMap:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return u&&a.setDocumentLocator(u),r.errorHandler=function(e,t,n){if(!e){if(t instanceof i)return t;e=t}var r={},a=e instanceof Function;function o(t){var i=e[t];!i&&a&&(i=2==e.length?function(n){e(t,n)}:e),r[t]=i&&function(e){i("[xmldom "+t+"]\t"+e+s(n))}||function(){}}return n=n||{},o("warning"),o("error"),o("fatalError"),r}(o,a,u),r.domBuilder=n.domBuilder||a,h&&(c[""]="http://www.w3.org/1999/xhtml"),c.xml=c.xml||"http://www.w3.org/XML/1998/namespace",e&&"string"==typeof e?r.parse(e,c,f):r.errorHandler.error("invalid doc source"),a.doc},i.prototype={startDocument:function(){this.doc=(new f).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.doc,s=i.createElementNS(e,n||t),o=r.length;u(this,s),this.currentElement=s,this.locator&&a(this.locator,s);for(var l=0;l<o;l++){e=r.getURI(l);var c=r.getValue(l),d=(n=r.getQName(l),i.createAttributeNS(e,n));this.locator&&a(r.getLocator(l),d),d.value=d.nodeValue=c,s.setAttributeNode(d)}},endElement:function(e,t,n){var r=this.currentElement;r.tagName,this.currentElement=r.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&a(this.locator,n),u(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=o.apply(this,arguments)){if(this.cdata)var r=this.doc.createCDATASection(e);else r=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(e)&&this.doc.appendChild(r),this.locator&&a(this.locator,r)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,n){e=o.apply(this,arguments);var r=this.doc.createComment(e);this.locator&&a(this.locator,r),u(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n){var r=this.doc.implementation;if(r&&r.createDocumentType){var i=r.createDocumentType(e,t,n);this.locator&&a(this.locator,i),u(this,i)}},warning:function(e){console.warn("[xmldom warning]\t"+e,s(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,s(this.locator))},fatalError:function(e){throw new h(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){i.prototype[e]=function(){return null}}));var l=n(70624),c=n(91186),d=c.XMLReader,h=c.ParseError,f=n(51676).DOMImplementation;n(51676),t.a=r},51676:(e,t)=>{function n(e,t){for(var n in e)t[n]=e[n]}function r(e,t){var r=e.prototype;if(!(r instanceof t)){function i(){}i.prototype=t.prototype,n(r,i=new i),e.prototype=r=i}r.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),r.constructor=e)}var i="http://www.w3.org/1999/xhtml",a={},s=a.ELEMENT_NODE=1,o=a.ATTRIBUTE_NODE=2,u=a.TEXT_NODE=3,l=a.CDATA_SECTION_NODE=4,c=a.ENTITY_REFERENCE_NODE=5,d=a.ENTITY_NODE=6,h=a.PROCESSING_INSTRUCTION_NODE=7,f=a.COMMENT_NODE=8,p=a.DOCUMENT_NODE=9,m=a.DOCUMENT_TYPE_NODE=10,g=a.DOCUMENT_FRAGMENT_NODE=11,v=a.NOTATION_NODE=12,y={},_={},b=(y.INDEX_SIZE_ERR=(_[1]="Index size error",1),y.DOMSTRING_SIZE_ERR=(_[2]="DOMString size error",2),y.HIERARCHY_REQUEST_ERR=(_[3]="Hierarchy request error",3)),T=(y.WRONG_DOCUMENT_ERR=(_[4]="Wrong document",4),y.INVALID_CHARACTER_ERR=(_[5]="Invalid character",5),y.NO_DATA_ALLOWED_ERR=(_[6]="No data allowed",6),y.NO_MODIFICATION_ALLOWED_ERR=(_[7]="No modification allowed",7),y.NOT_FOUND_ERR=(_[8]="Not found",8)),S=(y.NOT_SUPPORTED_ERR=(_[9]="Not supported",9),y.INUSE_ATTRIBUTE_ERR=(_[10]="Attribute in use",10));function w(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,_[e]),this.message=_[e],Error.captureStackTrace&&Error.captureStackTrace(this,w);return n.code=e,t&&(this.message=this.message+": "+t),n}function k(){}function E(e,t){this._node=e,this._refresh=t,C(this)}function C(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var r=e._refresh(e._node);re(e,"length",r.length),n(r,e),e._inc=t}}function x(){}function I(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function A(e,t,n,r){if(r?t[I(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&N(i,e,r),function(e,t,n){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&(t._nsMap[n.prefix?n.localName:""]=n.value)}(i,e,n))}}function O(e,t,n){var r=I(t,n);if(!(r>=0))throw w(T,new Error(e.tagName+"@"+n));for(var i=t.length-1;r<i;)t[r]=t[++r];if(t.length=i,e){var a=e.ownerDocument;a&&(N(a,e,n),n.ownerElement=null)}}function P(e){if(this._features={},e)for(var t in e)this._features=e[t]}function L(){}function D(e){return("<"==e?"<":">"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function R(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(R(e,t))return!0}while(e=e.nextSibling)}function M(){}function N(e,t,n,r){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&delete t._nsMap[n.prefix?n.localName:""]}function U(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,a=0;i;)r[a++]=i,i=i.nextSibling;r.length=a}}}function F(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,U(e.ownerDocument,e),t}function B(e,t,n){var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===g){var i=t.firstChild;if(null==i)return t;var a=t.lastChild}else i=a=t;var s=n?n.previousSibling:e.lastChild;i.previousSibling=s,a.nextSibling=n,s?s.nextSibling=i:e.firstChild=i,null==n?e.lastChild=a:n.previousSibling=a;do{i.parentNode=e}while(i!==a&&(i=i.nextSibling));return U(e.ownerDocument||e,e),t.nodeType==g&&(t.firstChild=t.lastChild=null),t}function j(){this._nsMap={}}function H(){}function V(){}function q(){}function W(){}function z(){}function G(){}function X(){}function $(){}function K(){}function Z(){}function Y(){}function Q(e,t){var n=[],r=9==this.nodeType&&this.documentElement||this,i=r.prefix,a=r.namespaceURI;if(a&&null==i&&null==(i=r.lookupPrefix(a)))var s=[{namespace:a,prefix:null}];return ee(this,n,e,t,s),n.join("")}function J(e,t,n){var r=e.prefix||"",i=e.namespaceURI;if(!r&&!i)return!1;if("xml"===r&&"http://www.w3.org/XML/1998/namespace"===i||"http://www.w3.org/2000/xmlns/"==i)return!1;for(var a=n.length;a--;){var s=n[a];if(s.prefix==r)return s.namespace!=i}return!0}function ee(e,t,n,r,a){if(r){if(!(e=r(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case s:a||(a=[]),a.length;var d=e.attributes,v=d.length,y=e.firstChild,_=e.tagName;n=i===e.namespaceURI||n,t.push("<",_);for(var b=0;b<v;b++)"xmlns"==(T=d.item(b)).prefix?a.push({prefix:T.localName,namespace:T.value}):"xmlns"==T.nodeName&&a.push({prefix:"",namespace:T.value});for(b=0;b<v;b++){var T;if(J(T=d.item(b),0,a)){var S=T.prefix||"",w=T.namespaceURI,k=S?" xmlns:"+S:" xmlns";t.push(k,'="',w,'"'),a.push({prefix:S,namespace:w})}ee(T,t,n,r,a)}if(J(e,0,a)&&(S=e.prefix||"",w=e.namespaceURI,k=S?" xmlns:"+S:" xmlns",t.push(k,'="',w,'"'),a.push({prefix:S,namespace:w})),y||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(_)){if(t.push(">"),n&&/^script$/i.test(_))for(;y;)y.data?t.push(y.data):ee(y,t,n,r,a),y=y.nextSibling;else for(;y;)ee(y,t,n,r,a),y=y.nextSibling;t.push("</",_,">")}else t.push("/>");return;case p:case g:for(y=e.firstChild;y;)ee(y,t,n,r,a),y=y.nextSibling;return;case o:return t.push(" ",e.name,'="',e.value.replace(/[&"]/g,D),'"');case u:return t.push(e.data.replace(/[<&]/g,D).replace(/]]>/g,"]]>"));case l:return t.push("<![CDATA[",e.data,"]]>");case f:return t.push("\x3c!--",e.data,"--\x3e");case m:var E=e.publicId,C=e.systemId;if(t.push("<!DOCTYPE ",e.name),E)t.push(" PUBLIC ",E),C&&"."!=C&&t.push(" ",C),t.push(">");else if(C&&"."!=C)t.push(" SYSTEM ",C,">");else{var x=e.internalSubset;x&&t.push(" [",x,"]"),t.push(">")}return;case h:return t.push("<?",e.target," ",e.data,"?>");case c:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function te(e,t,n){var r;switch(t.nodeType){case s:(r=t.cloneNode(!1)).ownerDocument=e;case g:break;case o:n=!0}if(r||(r=t.cloneNode(!1)),r.ownerDocument=e,r.parentNode=null,n)for(var i=t.firstChild;i;)r.appendChild(te(e,i,n)),i=i.nextSibling;return r}function ne(e,t,n){var r=new t.constructor;for(var i in t){var a=t[i];"object"!=typeof a&&a!=r[i]&&(r[i]=a)}switch(t.childNodes&&(r.childNodes=new k),r.ownerDocument=e,r.nodeType){case s:var u=t.attributes,l=r.attributes=new x,c=u.length;l._ownerElement=r;for(var d=0;d<c;d++)r.setAttributeNode(ne(e,u.item(d),!0));break;case o:n=!0}if(n)for(var h=t.firstChild;h;)r.appendChild(ne(e,h,n)),h=h.nextSibling;return r}function re(e,t,n){e[t]=n}y.INVALID_STATE_ERR=(_[11]="Invalid state",11),y.SYNTAX_ERR=(_[12]="Syntax error",12),y.INVALID_MODIFICATION_ERR=(_[13]="Invalid modification",13),y.NAMESPACE_ERR=(_[14]="Invalid namespace",14),y.INVALID_ACCESS_ERR=(_[15]="Invalid access",15),w.prototype=Error.prototype,n(y,w),k.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var n=[],r=0;r<this.length;r++)ee(this[r],n,e,t);return n.join("")}},E.prototype.item=function(e){return C(this),this[e]},r(E,k),x.prototype={length:0,item:k.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var n=this[t];if(n.nodeName==e)return n}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new w(S);var n=this.getNamedItem(e.nodeName);return A(this._ownerElement,this,e,n),n},setNamedItemNS:function(e){var t,n=e.ownerElement;if(n&&n!=this._ownerElement)throw new w(S);return t=this.getNamedItemNS(e.namespaceURI,e.localName),A(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return O(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);return O(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){for(var n=this.length;n--;){var r=this[n];if(r.localName==t&&r.namespaceURI==e)return r}return null}},P.prototype={hasFeature:function(e,t){var n=this._features[e.toLowerCase()];return!(!n||t&&!(t in n))},createDocument:function(e,t,n){var r=new M;if(r.implementation=this,r.childNodes=new k,r.doctype=n,n&&r.appendChild(n),t){var i=r.createElementNS(e,t);r.appendChild(i)}return r},createDocumentType:function(e,t,n){var r=new G;return r.name=e,r.nodeName=e,r.publicId=t,r.systemId=n,r}},L.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return B(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return F(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return ne(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==u&&e.nodeType==u?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var r in n)if(n[r]==e)return r;t=t.nodeType==o?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=t.nodeType==o?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},n(a,L),n(a,L.prototype),M.prototype={nodeName:"#document",nodeType:p,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==g){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return null==this.documentElement&&e.nodeType==s&&(this.documentElement=e),B(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),F(this,e)},importNode:function(e,t){return te(this,e,t)},getElementById:function(e){var t=null;return R(this.documentElement,(function(n){if(n.nodeType==s&&n.getAttribute("id")==e)return t=n,!0})),t},getElementsByClassName:function(e){var t=new RegExp("(^|\\s)"+e+"(\\s|$)");return new E(this,(function(e){var n=[];return R(e.documentElement,(function(r){r!==e&&r.nodeType==s&&t.test(r.getAttribute("class"))&&n.push(r)})),n}))},createElement:function(e){var t=new j;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new k,(t.attributes=new x)._ownerElement=t,t},createDocumentFragment:function(){var e=new Z;return e.ownerDocument=this,e.childNodes=new k,e},createTextNode:function(e){var t=new q;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new W;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new z;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new Y;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new H;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new K;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new j,r=t.split(":"),i=n.attributes=new x;return n.childNodes=new k,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,i._ownerElement=n,n},createAttributeNS:function(e,t){var n=new H,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},r(M,L),j.prototype={nodeType:s,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===g?this.insertBefore(e,null):function(e,t){var n=t.parentNode;if(n){var r=e.lastChild;n.removeChild(t),r=e.lastChild}return r=e.lastChild,t.parentNode=e,t.previousSibling=r,t.nextSibling=null,r?r.nextSibling=t:e.firstChild=t,e.lastChild=t,U(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new E(this,(function(t){var n=[];return R(t,(function(r){r===t||r.nodeType!=s||"*"!==e&&r.tagName!=e||n.push(r)})),n}))},getElementsByTagNameNS:function(e,t){return new E(this,(function(n){var r=[];return R(n,(function(i){i===n||i.nodeType!==s||"*"!==e&&i.namespaceURI!==e||"*"!==t&&i.localName!=t||r.push(i)})),r}))}},M.prototype.getElementsByTagName=j.prototype.getElementsByTagName,M.prototype.getElementsByTagNameNS=j.prototype.getElementsByTagNameNS,r(j,L),H.prototype.nodeType=o,r(H,L),V.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(_[b])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},r(V,L),q.prototype={nodeName:"#text",nodeType:u,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},r(q,V),W.prototype={nodeName:"#comment",nodeType:f},r(W,V),z.prototype={nodeName:"#cdata-section",nodeType:l},r(z,V),G.prototype.nodeType=m,r(G,L),X.prototype.nodeType=v,r(X,L),$.prototype.nodeType=d,r($,L),K.prototype.nodeType=c,r(K,L),Z.prototype.nodeName="#document-fragment",Z.prototype.nodeType=g,r(Z,L),Y.prototype.nodeType=h,r(Y,L),L.prototype.toString=Q;try{if(Object.defineProperty){function ie(e){switch(e.nodeType){case s:case g:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(ie(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(E.prototype,"length",{get:function(){return C(this),this.$$length}}),Object.defineProperty(L.prototype,"textContent",{get:function(){return ie(this)},set:function(e){switch(this.nodeType){case s:case g:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),re=function(e,t,n){e["$$"+t]=n}}}catch(ae){}t.DOMImplementation=P},70624:(e,t)=>{t.entityMap={lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}},91186:(e,t)=>{var n=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,r=new RegExp("[\\-\\.0-9"+n.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),i=new RegExp("^"+n.source+r.source+"*(?::"+n.source+r.source+"*)?$");function a(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,a)}function s(){}function o(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function u(e,t,n,r,i,a){function s(e,t,r){e in n.attributeNames&&a.fatalError("Attribute "+e+" redefined"),n.addValue(e,t,r)}for(var o,u=++t,l=0;;){var c=e.charAt(u);switch(c){case"=":if(1===l)o=e.slice(t,u),l=3;else{if(2!==l)throw new Error("attribute equal must after attrName");l=3}break;case"'":case'"':if(3===l||1===l){if(1===l&&(a.warning('attribute value must after "="'),o=e.slice(t,u)),t=u+1,!((u=e.indexOf(c,t))>0))throw new Error("attribute value no end '"+c+"' match");s(o,d=e.slice(t,u).replace(/&#?\w+;/g,i),t-1),l=5}else{if(4!=l)throw new Error('attribute value must after "="');s(o,d=e.slice(t,u).replace(/&#?\w+;/g,i),t),a.warning('attribute "'+o+'" missed start quot('+c+")!!"),t=u+1,l=5}break;case"/":switch(l){case 0:n.setTagName(e.slice(t,u));case 5:case 6:case 7:l=7,n.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),0==l&&n.setTagName(e.slice(t,u)),u;case">":switch(l){case 0:n.setTagName(e.slice(t,u));case 5:case 6:case 7:break;case 4:case 1:"/"===(d=e.slice(t,u)).slice(-1)&&(n.closed=!0,d=d.slice(0,-1));case 2:2===l&&(d=o),4==l?(a.warning('attribute "'+d+'" missed quot(")!'),s(o,d.replace(/&#?\w+;/g,i),t)):("http://www.w3.org/1999/xhtml"===r[""]&&d.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+d+'" missed value!! "'+d+'" instead!!'),s(d,d,t));break;case 3:throw new Error("attribute value missed!!")}return u;case"":c=" ";default:if(c<=" ")switch(l){case 0:n.setTagName(e.slice(t,u)),l=6;break;case 1:o=e.slice(t,u),l=2;break;case 4:var d=e.slice(t,u).replace(/&#?\w+;/g,i);a.warning('attribute "'+d+'" missed quot(")!!'),s(o,d,t);case 5:l=6}else switch(l){case 2:n.tagName,"http://www.w3.org/1999/xhtml"===r[""]&&o.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+o+'" missed value!! "'+o+'" instead2!!'),s(o,o,t),t=u,l=1;break;case 5:a.warning('attribute space is required"'+o+'"!!');case 6:l=1,t=u;break;case 3:l=4,t=u;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}u++}}function l(e,t,n){for(var r=e.tagName,i=null,a=e.length;a--;){var s=e[a],o=s.qName,u=s.value;if((f=o.indexOf(":"))>0)var l=s.prefix=o.slice(0,f),c=o.slice(f+1),d="xmlns"===l&&c;else c=o,l=null,d="xmlns"===o&&"";s.localName=c,!1!==d&&(null==i&&(i={},h(n,n={})),n[d]=i[d]=u,s.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(d,u))}for(a=e.length;a--;)(l=(s=e[a]).prefix)&&("xml"===l&&(s.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==l&&(s.uri=n[l||""]));var f;(f=r.indexOf(":"))>0?(l=e.prefix=r.slice(0,f),c=e.localName=r.slice(f+1)):(l=null,c=e.localName=r);var p=e.uri=n[l||""];if(t.startElement(p,c,r,e),!e.closed)return e.currentNSMap=n,e.localNSMap=i,!0;if(t.endElement(p,c,r),i)for(l in i)t.endPrefixMapping(l)}function c(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var a=e.indexOf("</"+n+">",t),s=e.substring(t+1,a);if(/[&<]/.test(s))return/^script$/i.test(n)?(i.characters(s,0,s.length),a):(s=s.replace(/&#?\w+;/g,r),i.characters(s,0,s.length),a)}return t+1}function d(e,t,n,r){var i=r[n];return null==i&&((i=e.lastIndexOf("</"+n+">"))<t&&(i=e.lastIndexOf("</"+n)),r[n]=i),i<t}function h(e,t){for(var n in e)t[n]=e[n]}function f(e,t,n,r){if("-"===e.charAt(t+2))return"-"===e.charAt(t+3)?(i=e.indexOf("--\x3e",t+4))>t?(n.comment(e,t+4,i-t-4),i+3):(r.error("Unclosed comment"),-1):-1;if("CDATA["==e.substr(t+3,6)){var i=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,i-t-9),n.endCDATA(),i+3}var a=function(e,t){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(i.lastIndex=t,i.exec(e);n=i.exec(e);)if(r.push(n),n[1])return r}(e,t),s=a.length;if(s>1&&/!doctype/i.test(a[0][0])){var o=a[1][0],u=!1,l=!1;s>3&&(/^public$/i.test(a[2][0])?(u=a[3][0],l=s>4&&a[4][0]):/^system$/i.test(a[2][0])&&(l=a[3][0]));var c=a[s-1];return n.startDTD(o,u,l),n.endDTD(),c.index+c[0].length}return-1}function p(e,t,n){var r=e.indexOf("?>",t);if(r){var i=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return i?(i[0].length,n.processingInstruction(i[1],i[2]),r+2):-1}return-1}function m(){this.attributeNames={}}a.prototype=new Error,a.prototype.name=a.name,s.prototype={parse:function(e,t,n){var r=this.domBuilder;r.startDocument(),h(t,t={}),function(e,t,n,r,i){function s(e){var t=e.slice(1,-1);return t in n?n[t]:"#"===t.charAt(0)?function(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}(parseInt(t.substr(1).replace("x","0x"))):(i.error("entity not found:"+e),e)}function h(t){if(t>w){var n=e.substring(w,t).replace(/&#?\w+;/g,s);b&&g(w),r.characters(n,0,t-w),w=t}}function g(t,n){for(;t>=y&&(n=_.exec(e));)v=n.index,y=v+n[0].length,b.lineNumber++;b.columnNumber=t-v+1}for(var v=0,y=0,_=/.*(?:\r\n?|\n)|.*$/g,b=r.locator,T=[{currentNSMap:t}],S={},w=0;;){try{var k=e.indexOf("<",w);if(k<0){if(!e.substr(w).match(/^\s*$/)){var E=r.doc,C=E.createTextNode(e.substr(w));E.appendChild(C),r.currentElement=C}return}switch(k>w&&h(k),e.charAt(k+1)){case"/":var x=e.indexOf(">",k+3),I=e.substring(k+2,x),A=T.pop();x<0?(I=e.substring(k+2).replace(/[\s<].*/,""),i.error("end tag name: "+I+" is not complete:"+A.tagName),x=k+1+I.length):I.match(/\s</)&&(I=I.replace(/[\s<].*/,""),i.error("end tag name: "+I+" maybe not complete"),x=k+1+I.length);var O=A.localNSMap,P=A.tagName==I;if(P||A.tagName&&A.tagName.toLowerCase()==I.toLowerCase()){if(r.endElement(A.uri,A.localName,I),O)for(var L in O)r.endPrefixMapping(L);P||i.fatalError("end tag name: "+I+" is not match the current start tagName:"+A.tagName)}else T.push(A);x++;break;case"?":b&&g(k),x=p(e,k,r);break;case"!":b&&g(k),x=f(e,k,r,i);break;default:b&&g(k);var D=new m,R=T[T.length-1].currentNSMap,M=(x=u(e,k,D,R,s,i),D.length);if(!D.closed&&d(e,x,D.tagName,S)&&(D.closed=!0,n.nbsp||i.warning("unclosed xml attribute")),b&&M){for(var N=o(b,{}),U=0;U<M;U++){var F=D[U];g(F.offset),F.locator=o(b,{})}r.locator=N,l(D,r,R)&&T.push(D),r.locator=b}else l(D,r,R)&&T.push(D);"http://www.w3.org/1999/xhtml"!==D.uri||D.closed?x++:x=c(e,x,D.tagName,s,r)}}catch(e){if(e instanceof a)throw e;i.error("element parse error: "+e),x=-1}x>w?w=x:h(Math.max(k,w)+1)}}(e,t,n,r,this.errorHandler),r.endDocument()}},m.prototype={setTagName:function(e){if(!i.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,n){if(!i.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},t.XMLReader=s,t.ParseError=a},448:e=>{function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(this,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}}]);
|